@zappar/zappar-cv 3.3.0-beta.1 → 3.4.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/lib/bridged-camera-source.d.ts +2 -0
- package/lib/bridged-camera-source.js +13 -0
- package/lib/bridged-message.d.ts +1 -0
- package/lib/bridged-world-tracker.js +8 -6
- package/lib/camera-frame-data.d.ts +1 -2
- package/lib/ceres-worker.d.ts +1 -1
- package/lib/ceres-worker.js +5 -5
- package/lib/gen/zappar-bridge.d.ts +3 -1
- package/lib/gen/zappar-client.js +100 -71
- package/lib/gen/zappar-cwrap.js +27 -6
- package/lib/gen/zappar-native.d.ts +6 -3
- package/lib/gen/zappar-native.js +1 -0
- package/lib/gen/zappar-server.js +80 -68
- package/lib/gen/zappar.d.ts +3 -1
- package/lib/html-element-source.js +3 -4
- package/lib/index-standalone.js +1 -1
- package/lib/mstp-camera-source.d.ts +3 -0
- package/lib/mstp-camera-source.js +21 -0
- package/lib/native.js +20 -14
- package/lib/options.d.ts +2 -1
- package/lib/pipeline.d.ts +1 -0
- package/lib/pipeline.js +13 -0
- package/lib/profile.js +1 -2
- package/lib/src/additional.d.ts +49 -0
- package/lib/src/android-bridge-message-handler.d.ts +15 -0
- package/lib/src/array-from-string.d.ts +2 -0
- package/lib/src/bridged-camera-source.d.ts +53 -0
- package/lib/src/bridged-d3-tracker.d.ts +18 -0
- package/lib/src/bridged-message-parser.d.ts +12 -0
- package/lib/src/bridged-message.d.ts +79 -0
- package/lib/src/bridged-world-tracker.d.ts +21 -0
- package/lib/src/camera-frame-data.d.ts +10 -0
- package/lib/src/camera-source-map.d.ts +11 -0
- package/lib/src/camera-source.d.ts +28 -0
- package/lib/src/cameramodel.d.ts +2 -0
- package/lib/src/ceres-worker.d.ts +1 -0
- package/lib/src/compatibility.d.ts +5 -0
- package/lib/src/data-download.d.ts +8 -0
- package/lib/src/deserializer.d.ts +41 -0
- package/lib/src/direct.d.ts +3 -0
- package/lib/src/drawaxis.d.ts +2 -0
- package/lib/src/drawcamera.d.ts +12 -0
- package/lib/src/drawface.d.ts +16 -0
- package/lib/src/drawfaceproject.d.ts +15 -0
- package/lib/src/drawgrid.d.ts +2 -0
- package/lib/src/drawmesh.d.ts +14 -0
- package/lib/src/drawplane.d.ts +2 -0
- package/lib/src/drawpoints.d.ts +11 -0
- package/lib/src/drawpointswithtype.d.ts +13 -0
- package/lib/src/drawpolygon.d.ts +5 -0
- package/lib/src/drawpreviewmesh.d.ts +16 -0
- package/lib/src/drawquad.d.ts +2 -0
- package/lib/src/event.d.ts +30 -0
- package/lib/src/facelandmark.d.ts +11 -0
- package/lib/src/facelandmarkdata.d.ts +4 -0
- package/lib/src/facelandmarkinterface.d.ts +5 -0
- package/lib/src/facemesh.d.ts +27 -0
- package/lib/src/gen/zappar-bridge.d.ts +182 -0
- package/lib/src/gen/zappar-client.d.ts +26 -0
- package/lib/src/gen/zappar-cwrap.d.ts +12 -0
- package/lib/src/gen/zappar-native.d.ts +256 -0
- package/lib/src/gen/zappar-server.d.ts +50 -0
- package/lib/src/gen/zappar.d.ts +311 -0
- package/lib/src/gfx.d.ts +1 -0
- package/lib/src/gl-state-manager.d.ts +9 -0
- package/lib/src/html-element-source.d.ts +42 -0
- package/lib/src/image-process-gl.d.ts +40 -0
- package/lib/src/imagebitmap-camera-source.d.ts +39 -0
- package/lib/src/imagetracker-previewmesh.d.ts +2 -0
- package/lib/src/imagetracker.d.ts +43 -0
- package/lib/src/index-standalone.d.ts +3 -0
- package/lib/src/index.d.ts +7 -0
- package/lib/src/landmarkdatagenerate.d.ts +2 -0
- package/lib/src/loglevel.d.ts +5 -0
- package/lib/src/messages.d.ts +13 -0
- package/lib/src/mstp-camera-source.d.ts +44 -0
- package/lib/src/native.d.ts +3 -0
- package/lib/src/options.d.ts +5 -0
- package/lib/src/permission.d.ts +12 -0
- package/lib/src/pipeline.d.ts +88 -0
- package/lib/src/profile.d.ts +24 -0
- package/lib/src/riff-reader.d.ts +18 -0
- package/lib/src/sequencerecorder.d.ts +99 -0
- package/lib/src/sequencesource.d.ts +25 -0
- package/lib/src/serializer.d.ts +60 -0
- package/lib/src/shader.d.ts +2 -0
- package/lib/src/source.d.ts +22 -0
- package/lib/src/tr.d.ts +6 -0
- package/lib/src/tracing/jsontracer.d.ts +14 -0
- package/lib/src/tracing/performancetracer.d.ts +11 -0
- package/lib/src/tracing/sharedtracer.d.ts +2 -0
- package/lib/src/tracing/usertimingtracer.d.ts +10 -0
- package/lib/src/version.d.ts +1 -0
- package/lib/src/worker-client.d.ts +4 -0
- package/lib/src/worker-imagebitmap.d.ts +5 -0
- package/lib/src/worker-messages.d.ts +11 -0
- package/lib/src/worker-server.d.ts +3 -0
- package/lib/src/worker.d.ts +1 -0
- package/lib/src/workerinterface.d.ts +110 -0
- package/lib/src/yuv-conversion-gl.d.ts +44 -0
- package/lib/tests/barcode-finder.d.ts +1 -0
- package/lib/tests/camera-data-raw.d.ts +1 -0
- package/lib/tests/camera-data-rgb.d.ts +1 -0
- package/lib/tests/camera-far-near.d.ts +1 -0
- package/lib/tests/camera-only.d.ts +1 -0
- package/lib/tests/common.d.ts +15 -0
- package/lib/tests/d3-tracking.d.ts +1 -0
- package/lib/tests/drawanchor.d.ts +3 -0
- package/lib/tests/face-landmarks.d.ts +1 -0
- package/lib/tests/face-tracking.d.ts +1 -0
- package/lib/tests/image-tracking-cylinder.d.ts +1 -0
- package/lib/tests/image-tracking-preview-mesh.d.ts +1 -0
- package/lib/tests/image-tracking.d.ts +1 -0
- package/lib/tests/instant-tracking.d.ts +1 -0
- package/lib/tests/no-rendering.d.ts +1 -0
- package/lib/tests/sequence-preview.d.ts +1 -0
- package/lib/tests/two-pipelines.d.ts +1 -0
- package/lib/tests/video-face-tracking.d.ts +1 -0
- package/lib/tests/world-tracking-camera-offset-anchor.d.ts +1 -0
- package/lib/tests/world-tracking-meshes.d.ts +1 -0
- package/lib/tests/world-tracking-plane-offset-anchor.d.ts +1 -0
- package/lib/tests/world-tracking.d.ts +1 -0
- package/lib/tests/zapcode-tracking.d.ts +1 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/worker-client.d.ts +1 -1
- package/lib/worker-client.js +23 -9
- package/lib/worker-messages.d.ts +2 -1
- package/lib/worker-messages.js +2 -1
- package/lib/worker-server.js +27 -10
- package/lib/workerinterface.d.ts +2 -1
- package/lib/zappar-cv.js +1 -1
- package/lib/zappar-cv.wasm +0 -0
- package/package.json +2 -4
- package/umd/169.zappar-cv.js +0 -1
- package/umd/25.zappar-cv.js +0 -1
- package/umd/287.zappar-cv.js +0 -1
- package/umd/482727c0e7dd40d73f5a.zbin +0 -0
- package/umd/670905e7f3a8925b89cb.wasm +0 -0
- package/umd/867.zappar-cv.js +0 -1
- package/umd/b4f46e148a3b3b5aef90.zbin +0 -0
- package/umd/f7b62a3a53b5c9b3222b.zbin +0 -0
- package/umd/zappar-cv-ceres.worker.js +0 -1
- package/umd/zappar-cv.js +0 -1
- package/umd/zappar-cv.worker.js +0 -1
package/lib/zappar-cv.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zappar/zappar-cv",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0-beta.0",
|
|
4
4
|
"description": "Zappar's core computer vision library, supporting image, face and world tracking.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -23,10 +23,8 @@
|
|
|
23
23
|
"files": [
|
|
24
24
|
"README.md",
|
|
25
25
|
"CHANGELOG.md",
|
|
26
|
-
"lib/**/*"
|
|
27
|
-
"umd/**/*"
|
|
26
|
+
"lib/**/*"
|
|
28
27
|
],
|
|
29
|
-
"upkg": "umd/zappar-cv.js",
|
|
30
28
|
"license": "Proprietary",
|
|
31
29
|
"devDependencies": {
|
|
32
30
|
"@playwright/test": "^1.48.2",
|
package/umd/169.zappar-cv.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunkZCV=self.webpackChunkZCV||[]).push([[169],{685:(i,e,o)=>{"use strict";o.d(e,{WT:()=>a});var a="undefined"!=typeof Float32Array?Float32Array:Array;Math.random,Math.PI,Math.hypot||(Math.hypot=function(){for(var i=0,e=arguments.length;e--;)i+=arguments[e]*arguments[e];return Math.sqrt(i)})},975:(i,e,o)=>{"use strict";o.d(e,{Ue:()=>r,xJ:()=>n,yR:()=>t});var a=o(685);function r(){var i=new a.WT(16);return a.WT!=Float32Array&&(i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[11]=0,i[12]=0,i[13]=0,i[14]=0),i[0]=1,i[5]=1,i[10]=1,i[15]=1,i}function t(i){return i[0]=1,i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=1,i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=1,i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,i}function n(i,e){return i[0]=e[0],i[1]=0,i[2]=0,i[3]=0,i[4]=0,i[5]=e[1],i[6]=0,i[7]=0,i[8]=0,i[9]=0,i[10]=e[2],i[11]=0,i[12]=0,i[13]=0,i[14]=0,i[15]=1,i}},238:function(i,e,o){var a;!function(r,t){"use strict";var n="function",s="undefined",b="object",w="string",l="model",d="name",u="type",c="vendor",p="version",m="architecture",h="console",f="mobile",v="tablet",g="smarttv",x="wearable",k="embedded",y="Amazon",_="Apple",T="ASUS",q="BlackBerry",S="Browser",z="Chrome",A="Firefox",N="Google",C="Huawei",E="LG",M="Microsoft",O="Motorola",U="Opera",j="Samsung",R="Sharp",V="Sony",P="Xiaomi",B="Zebra",W="Facebook",F=function(i){for(var e={},o=0;o<i.length;o++)e[i[o].toUpperCase()]=i[o];return e},I=function(i,e){return typeof i===w&&-1!==D(e).indexOf(D(i))},D=function(i){return i.toLowerCase()},Z=function(i,e){if(typeof i===w)return i=i.replace(/^\s\s*/,""),typeof e===s?i:i.substring(0,350)},G=function(i,e){for(var o,a,r,s,w,l,d=0;d<e.length&&!w;){var u=e[d],c=e[d+1];for(o=a=0;o<u.length&&!w;)if(w=u[o++].exec(i))for(r=0;r<c.length;r++)l=w[++a],typeof(s=c[r])===b&&s.length>0?2===s.length?typeof s[1]==n?this[s[0]]=s[1].call(this,l):this[s[0]]=s[1]:3===s.length?typeof s[1]!==n||s[1].exec&&s[1].test?this[s[0]]=l?l.replace(s[1],s[2]):t:this[s[0]]=l?s[1].call(this,l,s[2]):t:4===s.length&&(this[s[0]]=l?s[3].call(this,l.replace(s[1],s[2])):t):this[s]=l||t;d+=2}},L=function(i,e){for(var o in e)if(typeof e[o]===b&&e[o].length>0){for(var a=0;a<e[o].length;a++)if(I(e[o][a],i))return"?"===o?t:o}else if(I(e[o],i))return"?"===o?t:o;return i},H={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"},$={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[p,[d,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[p,[d,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[d,p],[/opios[\/ ]+([\w\.]+)/i],[p,[d,U+" Mini"]],[/\bopr\/([\w\.]+)/i],[p,[d,U]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[d,p],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[p,[d,"UC"+S]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[p,[d,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[p,[d,"WeChat"]],[/konqueror\/([\w\.]+)/i],[p,[d,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[p,[d,"IE"]],[/yabrowser\/([\w\.]+)/i],[p,[d,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[d,/(.+)/,"$1 Secure "+S],p],[/\bfocus\/([\w\.]+)/i],[p,[d,A+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[d,U+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[d,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[d,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[d,U+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[d,"MIUI "+S]],[/fxios\/([-\w\.]+)/i],[p,[d,A]],[/\bqihu|(qi?ho?o?|360)browser/i],[[d,"360 "+S]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[d,/(.+)/,"$1 "+S],p],[/(comodo_dragon)\/([\w\.]+)/i],[[d,/_/g," "],p],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[d,p],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[d],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[d,W],p],[/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[d,p],[/\bgsa\/([\w\.]+) .*safari\//i],[p,[d,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[p,[d,z+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[d,z+" WebView"],p],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[p,[d,"Android "+S]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[d,p],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[p,[d,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[p,d],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[d,[p,L,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[d,p],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[d,"Netscape"],p],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[p,[d,A+" 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],[d,p],[/(cobalt)\/([\w\.]+)/i],[d,[p,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[m,"amd64"]],[/(ia32(?=;))/i],[[m,D]],[/((?:i[346]|x)86)[;\)]/i],[[m,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[m,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[m,"armhf"]],[/windows (ce|mobile); ppc;/i],[[m,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[m,/ower/,"",D]],[/(sun4\w)[;\)]/i],[[m,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[m,D]]],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],[l,[c,j],[u,v]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[l,[c,j],[u,f]],[/\((ip(?:hone|od)[\w ]*);/i],[l,[c,_],[u,f]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[l,[c,_],[u,v]],[/(macintosh);/i],[l,[c,_]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[l,[c,C],[u,v]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[l,[c,C],[u,f]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[l,/_/g," "],[c,P],[u,f]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[l,/_/g," "],[c,P],[u,v]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[l,[c,"OPPO"],[u,f]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[l,[c,"Vivo"],[u,f]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[l,[c,"Realme"],[u,f]],[/\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],[l,[c,O],[u,f]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[l,[c,O],[u,v]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[l,[c,E],[u,v]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[l,[c,E],[u,f]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[l,[c,"Lenovo"],[u,v]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[l,/_/g," "],[c,"Nokia"],[u,f]],[/(pixel c)\b/i],[l,[c,N],[u,v]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[l,[c,N],[u,f]],[/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],[l,[c,V],[u,f]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[l,"Xperia Tablet"],[c,V],[u,v]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[l,[c,"OnePlus"],[u,f]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[l,[c,y],[u,v]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[l,/(.+)/g,"Fire Phone $1"],[c,y],[u,f]],[/(playbook);[-\w\),; ]+(rim)/i],[l,c,[u,v]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[l,[c,q],[u,f]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[l,[c,T],[u,v]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[l,[c,T],[u,f]],[/(nexus 9)/i],[l,[c,"HTC"],[u,v]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic|sony(?!-bra))[-_ ]?([-\w]*)/i],[c,[l,/_/g," "],[u,f]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[l,[c,"Acer"],[u,v]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[l,[c,"Meizu"],[u,f]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[l,[c,R],[u,f]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[c,l,[u,f]],[/(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],[c,l,[u,v]],[/(surface duo)/i],[l,[c,M],[u,v]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[l,[c,"Fairphone"],[u,f]],[/(u304aa)/i],[l,[c,"AT&T"],[u,f]],[/\bsie-(\w*)/i],[l,[c,"Siemens"],[u,f]],[/\b(rct\w+) b/i],[l,[c,"RCA"],[u,v]],[/\b(venue[\d ]{2,7}) b/i],[l,[c,"Dell"],[u,v]],[/\b(q(?:mv|ta)\w+) b/i],[l,[c,"Verizon"],[u,v]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[l,[c,"Barnes & Noble"],[u,v]],[/\b(tm\d{3}\w+) b/i],[l,[c,"NuVision"],[u,v]],[/\b(k88) b/i],[l,[c,"ZTE"],[u,v]],[/\b(nx\d{3}j) b/i],[l,[c,"ZTE"],[u,f]],[/\b(gen\d{3}) b.+49h/i],[l,[c,"Swiss"],[u,f]],[/\b(zur\d{3}) b/i],[l,[c,"Swiss"],[u,v]],[/\b((zeki)?tb.*\b) b/i],[l,[c,"Zeki"],[u,v]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[c,"Dragon Touch"],l,[u,v]],[/\b(ns-?\w{0,9}) b/i],[l,[c,"Insignia"],[u,v]],[/\b((nxa|next)-?\w{0,9}) b/i],[l,[c,"NextBook"],[u,v]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[c,"Voice"],l,[u,f]],[/\b(lvtel\-)?(v1[12]) b/i],[[c,"LvTel"],l,[u,f]],[/\b(ph-1) /i],[l,[c,"Essential"],[u,f]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[l,[c,"Envizen"],[u,v]],[/\b(trio[-\w\. ]+) b/i],[l,[c,"MachSpeed"],[u,v]],[/\btu_(1491) b/i],[l,[c,"Rotor"],[u,v]],[/(shield[\w ]+) b/i],[l,[c,"Nvidia"],[u,v]],[/(sprint) (\w+)/i],[c,l,[u,f]],[/(kin\.[onetw]{3})/i],[[l,/\./g," "],[c,M],[u,f]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[l,[c,B],[u,v]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[l,[c,B],[u,f]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[c,l,[u,h]],[/droid.+; (shield) bui/i],[l,[c,"Nvidia"],[u,h]],[/(playstation [345portablevi]+)/i],[l,[c,V],[u,h]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[l,[c,M],[u,h]],[/smart-tv.+(samsung)/i],[c,[u,g]],[/hbbtv.+maple;(\d+)/i],[[l,/^/,"SmartTV"],[c,j],[u,g]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[c,E],[u,g]],[/(apple) ?tv/i],[c,[l,_+" TV"],[u,g]],[/crkey/i],[[l,z+"cast"],[c,N],[u,g]],[/droid.+aft(\w)( bui|\))/i],[l,[c,y],[u,g]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[l,[c,R],[u,g]],[/(bravia[\w ]+)( bui|\))/i],[l,[c,V],[u,g]],[/(mitv-\w{5}) bui/i],[l,[c,P],[u,g]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w ]*; *(\w[^;]*);([^;]*)/i],[[c,Z],[l,Z],[u,g]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[u,g]],[/((pebble))app/i],[c,l,[u,x]],[/droid.+; (glass) \d/i],[l,[c,N],[u,x]],[/droid.+; (wt63?0{2,3})\)/i],[l,[c,B],[u,x]],[/(quest( 2)?)/i],[l,[c,W],[u,x]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[c,[u,k]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[l,[u,f]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[l,[u,v]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[u,v]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[u,f]],[/(android[-\w\. ]{0,9});.+buil/i],[l,[c,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[p,[d,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[p,[d,"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],[d,p],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[p,d]],os:[[/microsoft (windows) (vista|xp)/i],[d,p],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[d,[p,L,H]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[d,"Windows"],[p,L,H]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[p,/_/g,"."],[d,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[d,"Mac OS"],[p,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[p,d],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[d,p],[/\(bb(10);/i],[p,[d,q]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[d,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[d,A+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[d,"webOS"]],[/crkey\/([\d\.]+)/i],[p,[d,z+"cast"]],[/(cros) [\w]+ ([\w\.]+\w)/i],[[d,"Chromium OS"],p],[/(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],[d,p],[/(sunos) ?([\w\.\d]*)/i],[[d,"Solaris"],p],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[d,p]]},X=function(i,e){if(typeof i===b&&(e=i,i=t),!(this instanceof X))return new X(i,e).getResult();var o=i||(typeof r!==s&&r.navigator&&r.navigator.userAgent?r.navigator.userAgent:""),a=e?function(i,e){var o={};for(var a in i)e[a]&&e[a].length%2==0?o[a]=e[a].concat(i[a]):o[a]=i[a];return o}($,e):$;return this.getBrowser=function(){var i,e={};return e[d]=t,e[p]=t,G.call(e,o,a.browser),e.major=typeof(i=e.version)===w?i.replace(/[^\d\.]/g,"").split(".")[0]:t,e},this.getCPU=function(){var i={};return i[m]=t,G.call(i,o,a.cpu),i},this.getDevice=function(){var i={};return i[c]=t,i[l]=t,i[u]=t,G.call(i,o,a.device),i},this.getEngine=function(){var i={};return i[d]=t,i[p]=t,G.call(i,o,a.engine),i},this.getOS=function(){var i={};return i[d]=t,i[p]=t,G.call(i,o,a.os),i},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 o},this.setUA=function(i){return o=typeof i===w&&i.length>350?Z(i,350):i,this},this.setUA(o),this};X.VERSION="1.0.33",X.BROWSER=F([d,p,"major"]),X.CPU=F([m]),X.DEVICE=F([l,c,u,h,f,g,v,x,k]),X.ENGINE=X.OS=F([d,p]),typeof e!==s?(i.exports&&(e=i.exports=X),e.UAParser=X):o.amdO?(a=function(){return X}.call(e,o,e,i))===t||(i.exports=a):typeof r!==s&&(r.UAParser=X);var J=typeof r!==s&&(r.jQuery||r.Zepto);if(J&&!J.ua){var K=new X;J.ua=K.getResult(),J.ua.get=function(){return K.getUA()},J.ua.set=function(i){K.setUA(i);var e=K.getResult();for(var o in e)J.ua[o]=e[o]}}}("object"==typeof window?window:this)}}]);
|
package/umd/25.zappar-cv.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ZCV=t():e.ZCV=t()}(self,(()=>(()=>{"use strict";var e,t,r={25:(e,t,r)=>{var n=r(604),o=r(581);const a=self;let s=e=>{e&&e.data&&"wasm"===e.data.t&&(!function(e,t,r){var a,s,i,c;a=this,s=void 0,c=function*(){let a=o.Z({locateFile:(t,r)=>t.endsWith("zappar-cv.wasm")?e:r+t,instantiateWasm:(e,r)=>{const n=new WebAssembly.Instance(t,e);return r(n),n.exports},onRuntimeInitialized:()=>{const e=a.cwrap("ceres_worker",null,[]),t=(0,n.g)(a);r.addEventListener("message",(n=>{if("msgsend"!==n.data.t)return;const o=n.data.data,s=n.data.reference,i=a._malloc(o.byteLength);a.HEAPU8.set(o,i),t.worker_message_receive(s,o.byteLength,i),a._free(i),e();const c=t.worker_message_send_count();for(let e=0;e<c;e++){const n=t.worker_message_send_reference(e),o=t.worker_message_send_data_size(e),s=t.worker_message_send_data(e),i=a.HEAPU8.slice(s,s+o);r.postMessage({t:"msgrec",data:i,reference:n},[i.buffer])}t.worker_message_send_clear()})),r.start()}})},new((i=void 0)||(i=Promise))((function(e,t){function r(e){try{o(c.next(e))}catch(e){t(e)}}function n(e){try{o(c.throw(e))}catch(e){t(e)}}function o(t){var o;t.done?e(t.value):(o=t.value,o instanceof i?o:new i((function(e){e(o)}))).then(r,n)}o((c=c.apply(a,s||[])).next())}))}(location.href.startsWith("blob")?e.data.url:new URL(r(751),r.b).toString(),e.data.module,e.data.port),a.removeEventListener("message",s))};a.addEventListener("message",s)}},n={};function o(e){var t=n[e];if(void 0!==t)return t.exports;var a=n[e]={exports:{}};return r[e](a,a.exports,o),a.exports}return o.m=r,o.x=()=>{var e=o.O(void 0,[867],(()=>o(25)));return o.O(e)},e=[],o.O=(t,r,n,a)=>{if(!r){var s=1/0;for(l=0;l<e.length;l++){for(var[r,n,a]=e[l],i=!0,c=0;c<r.length;c++)(!1&a||s>=a)&&Object.keys(o.O).every((e=>o.O[e](r[c])))?r.splice(c--,1):(i=!1,a<s&&(s=a));if(i){e.splice(l--,1);var f=n();void 0!==f&&(t=f)}}return t}a=a||0;for(var l=e.length;l>0&&e[l-1][2]>a;l--)e[l]=e[l-1];e[l]=[r,n,a]},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.f={},o.e=e=>Promise.all(Object.keys(o.f).reduce(((t,r)=>(o.f[r](e,t),t)),[])),o.u=e=>e+".zappar-cv.js",o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var t=o.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&!e;)e=r[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})(),(()=>{o.b=self.location+"";var e={25:1};o.f.i=(t,r)=>{e[t]||importScripts(o.p+o.u(t))};var t=self.webpackChunkZCV=self.webpackChunkZCV||[],r=t.push.bind(t);t.push=t=>{var[n,a,s]=t;for(var i in a)o.o(a,i)&&(o.m[i]=a[i]);for(s&&s(o);n.length;)e[n.pop()]=1;r(t)}})(),t=o.x,o.x=()=>o.e(867).then(t),o.x()})()));
|
package/umd/287.zappar-cv.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ZCV=t():e.ZCV=t()}(self,(()=>(()=>{"use strict";var e,t,r={287:(e,t,r)=>{var a=r(581);class _{constructor(e){this._messageSender=e,this._freeBufferPool=[],this._buffer=new ArrayBuffer(16),this._i32View=new Int32Array(this._buffer),this._f32View=new Float32Array(this._buffer),this._f64View=new Float64Array(this._buffer),this._u8View=new Uint8Array(this._buffer),this._u8cView=new Uint8ClampedArray(this._buffer),this._u16View=new Uint16Array(this._buffer),this._u32View=new Uint32Array(this._buffer),this._offset=1,this._startOffset=-1,this._timeoutSet=!1,this._appender={int:e=>this.int(e),bool:e=>this.int(e?1:0),float:e=>this.float(e),string:e=>this.string(e),dataWithLength:e=>this.arrayBuffer(e),type:e=>this.int(e),matrix4x4:e=>this.float32ArrayBuffer(e),matrix3x3:e=>this.float32ArrayBuffer(e),floatArray:e=>this.float32ArrayBuffer(e),ucharArray:e=>this.uint8ArrayBuffer(e),identityCoefficients:e=>this.float32ArrayBuffer(e),expressionCoefficients:e=>this.float32ArrayBuffer(e),cameraModel:e=>this.float32ArrayBuffer(e),timestamp:e=>this.double(e),barcodeFormat:e=>this.int(e),faceLandmarkName:e=>this.int(e),instantTrackerTransformOrientation:e=>this.int(e),transformOrientation:e=>this.int(e),planeOrientation:e=>this.int(e),anchorStatus:e=>this.int(e),logLevel:e=>this.int(e)},this._freeBufferPool.push(new ArrayBuffer(16)),this._freeBufferPool.push(new ArrayBuffer(16))}bufferReturn(e){this._freeBufferPool.push(e)}_ensureArrayBuffer(e){let t,r=4*(this._offset+e+8);if(this._buffer&&this._buffer.byteLength>=r)return;if(!t){let e=r;e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,e++,t=new ArrayBuffer(e)}let a=this._buffer?this._i32View:void 0;this._buffer=t,this._i32View=new Int32Array(this._buffer),this._f32View=new Float32Array(this._buffer),this._f64View=new Float64Array(this._buffer),this._u8View=new Uint8Array(this._buffer),this._u8cView=new Uint8ClampedArray(this._buffer),this._u16View=new Uint16Array(this._buffer),this._u32View=new Uint32Array(this._buffer),a&&this._i32View.set(a.subarray(0,this._offset))}sendMessage(e,t){this._ensureArrayBuffer(4),this._startOffset=this._offset,this._i32View[this._offset+1]=e,this._offset+=2,t(this._appender),this._i32View[this._startOffset]=this._offset-this._startOffset,this._startOffset=-1,this._sendOneTime()}_sendOneTime(){!1===this._timeoutSet&&(this._timeoutSet=!0,setTimeout((()=>{this._timeoutSet=!1,this._send()}),0))}_send(){0!==this._freeBufferPool.length?(this._i32View[0]=this._offset,this._messageSender(this._buffer),this._buffer=void 0,this._buffer=this._freeBufferPool.pop(),this._i32View=new Int32Array(this._buffer),this._f32View=new Float32Array(this._buffer),this._f64View=new Float64Array(this._buffer),this._u8View=new Uint8Array(this._buffer),this._u8cView=new Uint8ClampedArray(this._buffer),this._u16View=new Uint16Array(this._buffer),this._u32View=new Uint32Array(this._buffer),this._offset=1,this._startOffset=-1):this._sendOneTime()}int(e){this._ensureArrayBuffer(1),this._i32View[this._offset]=e,this._offset++}double(e){this._ensureArrayBuffer(2),this._offset%2==1&&this._offset++,this._f64View[this._offset/2]=e,this._offset+=2}float(e){this._ensureArrayBuffer(1),this._f32View[this._offset]=e,this._offset++}int32Array(e){this._ensureArrayBuffer(e.length);for(let t=0;t<e.length;++t)this._i32View[this._offset+t]=e[t];this._offset+=e.length}float32Array(e){this._ensureArrayBuffer(e.length);for(let t=0;t<e.length;++t)this._f32View[this._offset+t]=e[t];this._offset+=e.length}booleanArray(e){this._ensureArrayBuffer(e.length);for(let t=0;t<e.length;++t)this._i32View[this._offset+t]=e[t]?1:0;this._offset+=e.length}uint8ArrayBuffer(e){this._ensureArrayBuffer(e.byteLength/4),this._i32View[this._offset]=e.byteLength,this._offset++,this._u8View.set(e,4*this._offset),this._offset+=e.byteLength>>2,0!=(3&e.byteLength)&&this._offset++}arrayBuffer(e){let t=new Uint8Array(e);this.uint8ArrayBuffer(t)}uint8ClampedArrayBuffer(e){this._ensureArrayBuffer(e.byteLength/4),this._i32View[this._offset]=e.byteLength,this._offset++,this._u8cView.set(e,4*this._offset),this._offset+=e.byteLength>>2,0!=(3&e.byteLength)&&this._offset++}float32ArrayBuffer(e){this._ensureArrayBuffer(e.byteLength/4),this._i32View[this._offset]=e.length,this._offset++,this._f32View.set(e,this._offset),this._offset+=e.length}uint16ArrayBuffer(e){this._ensureArrayBuffer(e.byteLength/4),this._i32View[this._offset]=e.length,this._offset++;let t=2*this._offset;this._u16View.set(e,t),this._offset+=e.length>>1,0!=(1&e.length)&&this._offset++}int32ArrayBuffer(e){this._ensureArrayBuffer(e.byteLength/4),this._i32View[this._offset]=e.length,this._offset++,this._i32View.set(e,this._offset),this._offset+=e.length}uint32ArrayBuffer(e){this._ensureArrayBuffer(e.byteLength/4),this._i32View[this._offset]=e.length,this._offset++,this._u32View.set(e,this._offset),this._offset+=e.length}string(e){let t=(new TextEncoder).encode(e);this._ensureArrayBuffer(t.byteLength/4),this._i32View[this._offset]=t.byteLength,this._offset++,this._u8View.set(t,4*this._offset),this._offset+=t.byteLength>>2,0!=(3&t.byteLength)&&this._offset++}}class i{constructor(){this._buffer=new ArrayBuffer(0),this._i32View=new Int32Array(this._buffer),this._f32View=new Float32Array(this._buffer),this._f64View=new Float64Array(this._buffer),this._u8View=new Uint8Array(this._buffer),this._u16View=new Uint16Array(this._buffer),this._u32View=new Uint32Array(this._buffer),this._offset=0,this._length=0,this._startOffset=-1,this._processor={int:()=>this._i32View[this._startOffset++],bool:()=>1===this._i32View[this._startOffset++],type:()=>this._i32View[this._startOffset++],float:()=>this._f32View[this._startOffset++],timestamp:()=>{this._startOffset%2==1&&this._startOffset++;let e=this._f64View[this._startOffset/2];return this._startOffset+=2,e},string:()=>{let e=this._i32View[this._startOffset++],t=(new TextDecoder).decode(new Uint8Array(this._buffer,4*this._startOffset,e));return this._startOffset+=e>>2,0!=(3&e)&&this._startOffset++,t},dataWithLength:()=>{let e=this._i32View[this._startOffset++],t=new Uint8Array(e);return t.set(this._u8View.subarray(4*this._startOffset,4*this._startOffset+e)),this._startOffset+=t.byteLength>>2,0!=(3&t.byteLength)&&this._startOffset++,t.buffer},ucharArray:()=>{let e=this._i32View[this._startOffset++],t=new Uint8Array(e);return t.set(this._u8View.subarray(4*this._startOffset,4*this._startOffset+e)),this._startOffset+=t.byteLength>>2,0!=(3&t.byteLength)&&this._startOffset++,t},floatArray:()=>{let e=this._i32View[this._startOffset++],t=new Float32Array(e);return t.set(this._f32View.subarray(this._startOffset,this._startOffset+e)),this._startOffset+=e,t},matrix4x4:()=>{let e=this._i32View[this._startOffset++],t=new Float32Array(e);return t.set(this._f32View.subarray(this._startOffset,this._startOffset+16)),this._startOffset+=e,t},matrix3x3:()=>{let e=this._i32View[this._startOffset++],t=new Float32Array(e);return t.set(this._f32View.subarray(this._startOffset,this._startOffset+9)),this._startOffset+=e,t},identityCoefficients:()=>{let e=this._i32View[this._startOffset++],t=new Float32Array(e);return t.set(this._f32View.subarray(this._startOffset,this._startOffset+50)),this._startOffset+=e,t},expressionCoefficients:()=>{let e=this._i32View[this._startOffset++],t=new Float32Array(e);return t.set(this._f32View.subarray(this._startOffset,this._startOffset+29)),this._startOffset+=e,t},cameraModel:()=>{let e=this._i32View[this._startOffset++],t=new Float32Array(e);return t.set(this._f32View.subarray(this._startOffset,this._startOffset+6)),this._startOffset+=e,t},barcodeFormat:()=>this._i32View[this._startOffset++],faceLandmarkName:()=>this._i32View[this._startOffset++],instantTrackerTransformOrientation:()=>this._i32View[this._startOffset++],transformOrientation:()=>this._i32View[this._startOffset++],planeOrientation:()=>this._i32View[this._startOffset++],anchorStatus:()=>this._i32View[this._startOffset++],logLevel:()=>this._i32View[this._startOffset++]}}setData(e){this._buffer=e,this._i32View=new Int32Array(this._buffer),this._f32View=new Float32Array(this._buffer),this._f64View=new Float64Array(this._buffer),this._u8View=new Uint8Array(this._buffer),this._u16View=new Uint16Array(this._buffer),this._u32View=new Uint32Array(this._buffer),this._offset=0,this._length=0,e.byteLength>=4&&(this._offset=1,this._length=this._i32View[0]),this._startOffset=-1}hasMessage(){return this._offset+1<this._length}forMessages(e){for(;this.hasMessage();){let t=this._i32View[this._offset],r=this._i32View[this._offset+1];this._startOffset=this._offset+2,this._offset+=t,e(r,this._processor)}}}class n{constructor(e,t){this._impl=e,this._sender=t,this._deserializer=new i,this.serializersByPipelineId=new Map,this._pipeline_id_by_pipeline_id=new Map,this._pipeline_by_instance=new Map,this._pipeline_id_by_camera_source_id=new Map,this._camera_source_by_instance=new Map,this._pipeline_id_by_sequence_source_id=new Map,this._sequence_source_by_instance=new Map,this._pipeline_id_by_image_tracker_id=new Map,this._image_tracker_by_instance=new Map,this._pipeline_id_by_face_tracker_id=new Map,this._face_tracker_by_instance=new Map,this._pipeline_id_by_face_mesh_id=new Map,this._face_mesh_by_instance=new Map,this._pipeline_id_by_face_landmark_id=new Map,this._face_landmark_by_instance=new Map,this._pipeline_id_by_barcode_finder_id=new Map,this._barcode_finder_by_instance=new Map,this._pipeline_id_by_instant_world_tracker_id=new Map,this._instant_world_tracker_by_instance=new Map,this._pipeline_id_by_zapcode_tracker_id=new Map,this._zapcode_tracker_by_instance=new Map,this._pipeline_id_by_world_tracker_id=new Map,this._world_tracker_by_instance=new Map,this._pipeline_id_by_custom_anchor_id=new Map,this._custom_anchor_by_instance=new Map,this._pipeline_id_by_d3_tracker_id=new Map,this._d3_tracker_by_instance=new Map}processBuffer(e){this._deserializer.setData(e),this._deserializer.forMessages(((e,t)=>{switch(e){case 38:this._impl.log_level_set(t.logLevel());break;case 35:this._impl.analytics_project_id_set(t.string(),t.string());break;case 31:{let e=t.type(),r=this._impl.pipeline_create();this._pipeline_by_instance.set(e,r),this._pipeline_id_by_pipeline_id.set(e,e),this.serializersByPipelineId.set(e,new _((t=>{this._sender(e,t)})));break}case 32:{let e=t.type(),r=this._pipeline_by_instance.get(e);if(void 0===r)return;this._impl.pipeline_destroy(r),this._pipeline_by_instance.delete(e);break}case 9:{let e=t.type(),r=this._pipeline_by_instance.get(e);if(void 0===r)return;this._impl.pipeline_frame_update(r);break}case 8:{let e=t.type(),r=this._pipeline_by_instance.get(e);if(void 0===r)return;this._impl.pipeline_camera_frame_submit(r,t.dataWithLength(),t.int(),t.int(),t.int(),t.matrix4x4(),t.cameraModel(),t.bool(),t.float());break}case 10:{let e=t.type(),r=this._pipeline_by_instance.get(e);if(void 0===r)return;this._impl.pipeline_motion_accelerometer_submit(r,t.timestamp(),t.float(),t.float(),t.float());break}case 12:{let e=t.type(),r=this._pipeline_by_instance.get(e);if(void 0===r)return;this._impl.pipeline_motion_accelerometer_with_gravity_submit_int(r,t.timestamp(),t.timestamp(),t.float(),t.float(),t.float());break}case 11:{let e=t.type(),r=this._pipeline_by_instance.get(e);if(void 0===r)return;this._impl.pipeline_motion_accelerometer_without_gravity_submit_int(r,t.timestamp(),t.timestamp(),t.float(),t.float(),t.float());break}case 15:{let e=t.type(),r=this._pipeline_by_instance.get(e);if(void 0===r)return;this._impl.pipeline_motion_rotation_rate_submit(r,t.timestamp(),t.float(),t.float(),t.float());break}case 13:{let e=t.type(),r=this._pipeline_by_instance.get(e);if(void 0===r)return;this._impl.pipeline_motion_rotation_rate_submit_int(r,t.timestamp(),t.timestamp(),t.float(),t.float(),t.float());break}case 16:{let e=t.type(),r=this._pipeline_by_instance.get(e);if(void 0===r)return;this._impl.pipeline_motion_attitude_submit(r,t.timestamp(),t.float(),t.float(),t.float());break}case 14:{let e=t.type(),r=this._pipeline_by_instance.get(e);if(void 0===r)return;this._impl.pipeline_motion_attitude_submit_int(r,t.timestamp(),t.timestamp(),t.float(),t.float(),t.float());break}case 17:{let e=t.type(),r=this._pipeline_by_instance.get(e);if(void 0===r)return;this._impl.pipeline_motion_attitude_matrix_submit(r,t.matrix4x4());break}case 33:{let e=t.type(),r=t.type(),a=this._pipeline_by_instance.get(r),_=t.string(),i=this._impl.camera_source_create(a,_);this._camera_source_by_instance.set(e,i),this._pipeline_id_by_camera_source_id.set(e,r);break}case 34:{let e=t.type(),r=this._camera_source_by_instance.get(e);if(void 0===r)return;this._impl.camera_source_destroy(r),this._camera_source_by_instance.delete(e);break}case 39:{let e=t.type(),r=t.type(),a=this._pipeline_by_instance.get(r),_=this._impl.sequence_source_create(a);this._sequence_source_by_instance.set(e,_),this._pipeline_id_by_sequence_source_id.set(e,r);break}case 40:{let e=t.type(),r=this._sequence_source_by_instance.get(e);if(void 0===r)return;this._impl.sequence_source_destroy(r),this._sequence_source_by_instance.delete(e);break}case 2:{let e=t.type(),r=t.type(),a=this._pipeline_by_instance.get(r),_=this._impl.image_tracker_create(a);this._image_tracker_by_instance.set(e,_),this._pipeline_id_by_image_tracker_id.set(e,r);break}case 18:{let e=t.type(),r=this._image_tracker_by_instance.get(e);if(void 0===r)return;this._impl.image_tracker_destroy(r),this._image_tracker_by_instance.delete(e);break}case 4:{let e=t.type(),r=this._image_tracker_by_instance.get(e);if(void 0===r)return;this._impl.image_tracker_target_load_from_memory(r,t.dataWithLength());break}case 3:{let e=t.type(),r=this._image_tracker_by_instance.get(e);if(void 0===r)return;this._impl.image_tracker_enabled_set(r,t.bool());break}case 24:{let e=t.type(),r=t.type(),a=this._pipeline_by_instance.get(r),_=this._impl.face_tracker_create(a);this._face_tracker_by_instance.set(e,_),this._pipeline_id_by_face_tracker_id.set(e,r);break}case 25:{let e=t.type(),r=this._face_tracker_by_instance.get(e);if(void 0===r)return;this._impl.face_tracker_destroy(r),this._face_tracker_by_instance.delete(e);break}case 26:{let e=t.type(),r=this._face_tracker_by_instance.get(e);if(void 0===r)return;this._impl.face_tracker_model_load_from_memory(r,t.dataWithLength());break}case 27:{let e=t.type(),r=this._face_tracker_by_instance.get(e);if(void 0===r)return;this._impl.face_tracker_enabled_set(r,t.bool());break}case 28:{let e=t.type(),r=this._face_tracker_by_instance.get(e);if(void 0===r)return;this._impl.face_tracker_max_faces_set(r,t.int());break}case 29:{let e=t.type(),r=this._impl.face_mesh_create();this._face_mesh_by_instance.set(e,r);break}case 30:{let e=t.type(),r=this._face_mesh_by_instance.get(e);if(void 0===r)return;this._impl.face_mesh_destroy(r),this._face_mesh_by_instance.delete(e);break}case 36:{let e=t.type(),r=t.faceLandmarkName(),a=this._impl.face_landmark_create(r);this._face_landmark_by_instance.set(e,a);break}case 37:{let e=t.type(),r=this._face_landmark_by_instance.get(e);if(void 0===r)return;this._impl.face_landmark_destroy(r),this._face_landmark_by_instance.delete(e);break}case 20:{let e=t.type(),r=t.type(),a=this._pipeline_by_instance.get(r),_=this._impl.barcode_finder_create(a);this._barcode_finder_by_instance.set(e,_),this._pipeline_id_by_barcode_finder_id.set(e,r);break}case 21:{let e=t.type(),r=this._barcode_finder_by_instance.get(e);if(void 0===r)return;this._impl.barcode_finder_destroy(r),this._barcode_finder_by_instance.delete(e);break}case 22:{let e=t.type(),r=this._barcode_finder_by_instance.get(e);if(void 0===r)return;this._impl.barcode_finder_enabled_set(r,t.bool());break}case 23:{let e=t.type(),r=this._barcode_finder_by_instance.get(e);if(void 0===r)return;this._impl.barcode_finder_formats_set(r,t.barcodeFormat());break}case 5:{let e=t.type(),r=t.type(),a=this._pipeline_by_instance.get(r),_=this._impl.instant_world_tracker_create(a);this._instant_world_tracker_by_instance.set(e,_),this._pipeline_id_by_instant_world_tracker_id.set(e,r);break}case 19:{let e=t.type(),r=this._instant_world_tracker_by_instance.get(e);if(void 0===r)return;this._impl.instant_world_tracker_destroy(r),this._instant_world_tracker_by_instance.delete(e);break}case 6:{let e=t.type(),r=this._instant_world_tracker_by_instance.get(e);if(void 0===r)return;this._impl.instant_world_tracker_enabled_set(r,t.bool());break}case 7:{let e=t.type(),r=this._instant_world_tracker_by_instance.get(e);if(void 0===r)return;this._impl.instant_world_tracker_anchor_pose_set_from_camera_offset_raw(r,t.float(),t.float(),t.float(),t.instantTrackerTransformOrientation());break}case 41:{let e=t.type(),r=t.type(),a=this._pipeline_by_instance.get(r),_=this._impl.zapcode_tracker_create(a);this._zapcode_tracker_by_instance.set(e,_),this._pipeline_id_by_zapcode_tracker_id.set(e,r);break}case 44:{let e=t.type(),r=this._zapcode_tracker_by_instance.get(e);if(void 0===r)return;this._impl.zapcode_tracker_destroy(r),this._zapcode_tracker_by_instance.delete(e);break}case 43:{let e=t.type(),r=this._zapcode_tracker_by_instance.get(e);if(void 0===r)return;this._impl.zapcode_tracker_target_load_from_memory(r,t.dataWithLength());break}case 42:{let e=t.type(),r=this._zapcode_tracker_by_instance.get(e);if(void 0===r)return;this._impl.zapcode_tracker_enabled_set(r,t.bool());break}case 45:{let e=t.type(),r=t.type(),a=this._pipeline_by_instance.get(r),_=this._impl.world_tracker_create(a);this._world_tracker_by_instance.set(e,_),this._pipeline_id_by_world_tracker_id.set(e,r);break}case 46:{let e=t.type(),r=this._world_tracker_by_instance.get(e);if(void 0===r)return;this._impl.world_tracker_destroy(r),this._world_tracker_by_instance.delete(e);break}case 47:{let e=t.type(),r=this._world_tracker_by_instance.get(e);if(void 0===r)return;this._impl.world_tracker_enabled_set(r,t.bool());break}case 48:{let e=t.type(),r=this._world_tracker_by_instance.get(e);if(void 0===r)return;this._impl.world_tracker_horizontal_plane_detection_enabled_set(r,t.bool());break}case 49:{let e=t.type(),r=this._world_tracker_by_instance.get(e);if(void 0===r)return;this._impl.world_tracker_vertical_plane_detection_enabled_set(r,t.bool());break}case 50:{let e=t.type(),r=this._world_tracker_by_instance.get(e);if(void 0===r)return;this._impl.world_tracker_reset(r);break}case 51:{let e=t.type(),r=this._world_tracker_by_instance.get(e);if(void 0===r)return;this._impl.world_tracker_tracks_data_enabled_set(r,t.bool());break}case 52:{let e=t.type(),r=this._world_tracker_by_instance.get(e);if(void 0===r)return;this._impl.world_tracker_projections_data_enabled_set(r,t.bool());break}case 53:{let e=t.type(),r=t.type(),a=this._pipeline_by_instance.get(r),_=t.type(),i=this._world_tracker_by_instance.get(_),n=t.string(),s=this._impl.custom_anchor_create(a,i,n);this._custom_anchor_by_instance.set(e,s),this._pipeline_id_by_custom_anchor_id.set(e,r);break}case 54:{let e=t.type(),r=this._custom_anchor_by_instance.get(e);if(void 0===r)return;this._impl.custom_anchor_destroy(r),this._custom_anchor_by_instance.delete(e);break}case 55:{let e=t.type(),r=this._custom_anchor_by_instance.get(e);if(void 0===r)return;this._impl.custom_anchor_pose_set_from_camera_offset_raw(r,t.float(),t.float(),t.float(),t.transformOrientation());break}case 56:{let e=t.type(),r=this._custom_anchor_by_instance.get(e);if(void 0===r)return;this._impl.custom_anchor_pose_set_from_anchor_offset(r,t.string(),t.float(),t.float(),t.float(),t.transformOrientation());break}case 57:{let e=t.type(),r=this._custom_anchor_by_instance.get(e);if(void 0===r)return;this._impl.custom_anchor_pose_set(r,t.matrix4x4());break}case 58:{let e=t.type(),r=this._custom_anchor_by_instance.get(e);if(void 0===r)return;this._impl.custom_anchor_pose_set_with_parent(r,t.matrix4x4(),t.string());break}case 59:{let e=t.type(),r=t.type(),a=this._pipeline_by_instance.get(r),_=this._impl.d3_tracker_create(a);this._d3_tracker_by_instance.set(e,_),this._pipeline_id_by_d3_tracker_id.set(e,r);break}case 60:{let e=t.type(),r=this._d3_tracker_by_instance.get(e);if(void 0===r)return;this._impl.d3_tracker_destroy(r),this._d3_tracker_by_instance.delete(e);break}}}))}exploreState(){for(let[e,t]of this._pipeline_by_instance){let r=this._pipeline_id_by_pipeline_id.get(e);if(!r)continue;let a=this.serializersByPipelineId.get(r);a&&(a.sendMessage(9,(r=>{r.type(e),r.int(this._impl.pipeline_frame_number(t))})),a.sendMessage(6,(r=>{r.type(e),r.cameraModel(this._impl.pipeline_camera_model(t))})),a.sendMessage(7,(r=>{r.type(e),r.int(this._impl.pipeline_camera_data_width(t))})),a.sendMessage(8,(r=>{r.type(e),r.int(this._impl.pipeline_camera_data_height(t))})),a.sendMessage(5,(r=>{r.type(e),r.int(this._impl.pipeline_camera_frame_user_data(t))})),a.sendMessage(13,(r=>{r.type(e),r.matrix4x4(this._impl.pipeline_camera_frame_camera_attitude(t))})),a.sendMessage(14,(r=>{r.type(e),r.matrix4x4(this._impl.pipeline_camera_frame_device_attitude(t))})))}for(let[e,t]of this._camera_source_by_instance){let t=this._pipeline_id_by_camera_source_id.get(e);t&&this.serializersByPipelineId.get(t)}for(let[e,t]of this._sequence_source_by_instance){let t=this._pipeline_id_by_sequence_source_id.get(e);t&&this.serializersByPipelineId.get(t)}for(let[e,t]of this._image_tracker_by_instance){let r=this._pipeline_id_by_image_tracker_id.get(e);if(!r)continue;let a=this.serializersByPipelineId.get(r);if(a){a.sendMessage(21,(r=>{r.type(e),r.int(this._impl.image_tracker_target_loaded_version(t))})),a.sendMessage(1,(r=>{r.type(e),r.int(this._impl.image_tracker_anchor_count(t))}));for(let r=0;r<this._impl.image_tracker_anchor_count(t);r++)a.sendMessage(2,(a=>{a.type(e),a.int(r),a.string(this._impl.image_tracker_anchor_id(t,r))}));for(let r=0;r<this._impl.image_tracker_anchor_count(t);r++)a.sendMessage(3,(a=>{a.type(e),a.int(r),a.matrix4x4(this._impl.image_tracker_anchor_pose_raw(t,r))}))}}for(let[e,t]of this._face_tracker_by_instance){let r=this._pipeline_id_by_face_tracker_id.get(e);if(!r)continue;let a=this.serializersByPipelineId.get(r);if(a){a.sendMessage(20,(r=>{r.type(e),r.int(this._impl.face_tracker_model_loaded_version(t))})),a.sendMessage(15,(r=>{r.type(e),r.int(this._impl.face_tracker_anchor_count(t))}));for(let r=0;r<this._impl.face_tracker_anchor_count(t);r++)a.sendMessage(16,(a=>{a.type(e),a.int(r),a.string(this._impl.face_tracker_anchor_id(t,r))}));for(let r=0;r<this._impl.face_tracker_anchor_count(t);r++)a.sendMessage(17,(a=>{a.type(e),a.int(r),a.matrix4x4(this._impl.face_tracker_anchor_pose_raw(t,r))}));for(let r=0;r<this._impl.face_tracker_anchor_count(t);r++)a.sendMessage(18,(a=>{a.type(e),a.int(r),a.identityCoefficients(this._impl.face_tracker_anchor_identity_coefficients(t,r))}));for(let r=0;r<this._impl.face_tracker_anchor_count(t);r++)a.sendMessage(19,(a=>{a.type(e),a.int(r),a.expressionCoefficients(this._impl.face_tracker_anchor_expression_coefficients(t,r))}))}}for(let[e,t]of this._face_mesh_by_instance){let t=this._pipeline_id_by_face_mesh_id.get(e);t&&this.serializersByPipelineId.get(t)}for(let[e,t]of this._face_landmark_by_instance){let t=this._pipeline_id_by_face_landmark_id.get(e);t&&this.serializersByPipelineId.get(t)}for(let[e,t]of this._barcode_finder_by_instance){let r=this._pipeline_id_by_barcode_finder_id.get(e);if(!r)continue;let a=this.serializersByPipelineId.get(r);if(a){a.sendMessage(10,(r=>{r.type(e),r.int(this._impl.barcode_finder_found_number(t))}));for(let r=0;r<this._impl.barcode_finder_found_number(t);r++)a.sendMessage(11,(a=>{a.type(e),a.int(r),a.string(this._impl.barcode_finder_found_text(t,r))}));for(let r=0;r<this._impl.barcode_finder_found_number(t);r++)a.sendMessage(12,(a=>{a.type(e),a.int(r),a.barcodeFormat(this._impl.barcode_finder_found_format(t,r))}))}}for(let[e,t]of this._instant_world_tracker_by_instance){let r=this._pipeline_id_by_instant_world_tracker_id.get(e);if(!r)continue;let a=this.serializersByPipelineId.get(r);a&&a.sendMessage(4,(r=>{r.type(e),r.matrix4x4(this._impl.instant_world_tracker_anchor_pose_raw(t))}))}for(let[e,t]of this._zapcode_tracker_by_instance){let r=this._pipeline_id_by_zapcode_tracker_id.get(e);if(!r)continue;let a=this.serializersByPipelineId.get(r);if(a){a.sendMessage(26,(r=>{r.type(e),r.int(this._impl.zapcode_tracker_target_loaded_version(t))})),a.sendMessage(23,(r=>{r.type(e),r.int(this._impl.zapcode_tracker_anchor_count(t))}));for(let r=0;r<this._impl.zapcode_tracker_anchor_count(t);r++)a.sendMessage(24,(a=>{a.type(e),a.int(r),a.string(this._impl.zapcode_tracker_anchor_id(t,r))}));for(let r=0;r<this._impl.zapcode_tracker_anchor_count(t);r++)a.sendMessage(25,(a=>{a.type(e),a.int(r),a.matrix4x4(this._impl.zapcode_tracker_anchor_pose_raw(t,r))}))}}for(let[e,t]of this._world_tracker_by_instance){let r=this._pipeline_id_by_world_tracker_id.get(e);if(!r)continue;let a=this.serializersByPipelineId.get(r);if(a){a.sendMessage(42,(r=>{r.type(e),r.int(this._impl.world_tracker_quality(t))})),a.sendMessage(27,(r=>{r.type(e),r.int(this._impl.world_tracker_plane_anchor_count(t))}));for(let r=0;r<this._impl.world_tracker_plane_anchor_count(t);r++)a.sendMessage(35,(a=>{a.type(e),a.int(r),a.string(this._impl.world_tracker_plane_anchor_id(t,r))}));for(let r=0;r<this._impl.world_tracker_plane_anchor_count(t);r++)a.sendMessage(28,(a=>{a.type(e),a.int(r),a.matrix4x4(this._impl.world_tracker_plane_anchor_pose_raw(t,r))}));for(let r=0;r<this._impl.world_tracker_plane_anchor_count(t);r++)a.sendMessage(30,(a=>{a.type(e),a.int(r),a.anchorStatus(this._impl.world_tracker_plane_anchor_status(t,r))}));for(let r=0;r<this._impl.world_tracker_plane_anchor_count(t);r++)a.sendMessage(31,(a=>{a.type(e),a.int(r),a.int(this._impl.world_tracker_plane_anchor_polygon_data_size(t,r))}));for(let r=0;r<this._impl.world_tracker_plane_anchor_count(t);r++)a.sendMessage(32,(a=>{a.type(e),a.int(r),a.floatArray(this._impl.world_tracker_plane_anchor_polygon_data(t,r))}));for(let r=0;r<this._impl.world_tracker_plane_anchor_count(t);r++)a.sendMessage(33,(a=>{a.type(e),a.int(r),a.int(this._impl.world_tracker_plane_anchor_polygon_version(t,r))}));for(let r=0;r<this._impl.world_tracker_plane_anchor_count(t);r++)a.sendMessage(34,(a=>{a.type(e),a.int(r),a.planeOrientation(this._impl.world_tracker_plane_anchor_orientation(t,r))}));a.sendMessage(38,(r=>{r.type(e),r.anchorStatus(this._impl.world_tracker_world_anchor_status(t))})),a.sendMessage(37,(r=>{r.type(e),r.string(this._impl.world_tracker_world_anchor_id(t))})),a.sendMessage(36,(r=>{r.type(e),r.matrix4x4(this._impl.world_tracker_world_anchor_pose_raw(t))})),a.sendMessage(40,(r=>{r.type(e),r.string(this._impl.world_tracker_ground_anchor_id(t))})),a.sendMessage(41,(r=>{r.type(e),r.anchorStatus(this._impl.world_tracker_ground_anchor_status(t))})),a.sendMessage(39,(r=>{r.type(e),r.matrix4x4(this._impl.world_tracker_ground_anchor_pose_raw(t))})),a.sendMessage(45,(r=>{r.type(e),r.int(this._impl.world_tracker_tracks_data_size(t))})),a.sendMessage(44,(r=>{r.type(e),r.floatArray(this._impl.world_tracker_tracks_data(t))})),a.sendMessage(47,(r=>{r.type(e),r.int(this._impl.world_tracker_tracks_type_data_size(t))})),a.sendMessage(46,(r=>{r.type(e),r.ucharArray(this._impl.world_tracker_tracks_type_data(t))})),a.sendMessage(50,(r=>{r.type(e),r.int(this._impl.world_tracker_projections_data_size(t))})),a.sendMessage(49,(r=>{r.type(e),r.floatArray(this._impl.world_tracker_projections_data(t))}))}}for(let[e,t]of this._custom_anchor_by_instance){let r=this._pipeline_id_by_custom_anchor_id.get(e);if(!r)continue;let a=this.serializersByPipelineId.get(r);a&&(a.sendMessage(52,(r=>{r.type(e),r.anchorStatus(this._impl.custom_anchor_status(t))})),a.sendMessage(53,(r=>{r.type(e),r.int(this._impl.custom_anchor_pose_version(t))})),a.sendMessage(51,(r=>{r.type(e),r.matrix4x4(this._impl.custom_anchor_pose_raw(t))})))}for(let[e,t]of this._d3_tracker_by_instance){let t=this._pipeline_id_by_d3_tracker_id.get(e);t&&this.serializersByPipelineId.get(t)}}}class s{constructor(){this._funcs=[]}bind(e){this._funcs.push(e)}unbind(e){let t=this._funcs.indexOf(e);t>-1&&this._funcs.splice(t,1)}emit(){for(var e=0,t=this._funcs.length;e<t;e++)this._funcs[e]()}}class o{constructor(){this._funcs=[]}bind(e){this._funcs.push(e)}unbind(e){let t=this._funcs.indexOf(e);t>-1&&this._funcs.splice(t,1)}emit(e){for(var t=0,r=this._funcs.length;t<r;t++)this._funcs[t](e)}}var c,l,p,u,f,d,h,m,b,w,y,g=r(975);!function(e){e[e.UNKNOWN=131072]="UNKNOWN",e[e.AZTEC=1]="AZTEC",e[e.CODABAR=2]="CODABAR",e[e.CODE_39=4]="CODE_39",e[e.CODE_93=8]="CODE_93",e[e.CODE_128=16]="CODE_128",e[e.DATA_MATRIX=32]="DATA_MATRIX",e[e.EAN_8=64]="EAN_8",e[e.EAN_13=128]="EAN_13",e[e.ITF=256]="ITF",e[e.MAXICODE=512]="MAXICODE",e[e.PDF_417=1024]="PDF_417",e[e.QR_CODE=2048]="QR_CODE",e[e.RSS_14=4096]="RSS_14",e[e.RSS_EXPANDED=8192]="RSS_EXPANDED",e[e.UPC_A=16384]="UPC_A",e[e.UPC_E=32768]="UPC_E",e[e.UPC_EAN_EXTENSION=65536]="UPC_EAN_EXTENSION",e[e.ALL=131071]="ALL"}(c||(c={})),function(e){e[e.EYE_LEFT=0]="EYE_LEFT",e[e.EYE_RIGHT=1]="EYE_RIGHT",e[e.EAR_LEFT=2]="EAR_LEFT",e[e.EAR_RIGHT=3]="EAR_RIGHT",e[e.NOSE_BRIDGE=4]="NOSE_BRIDGE",e[e.NOSE_TIP=5]="NOSE_TIP",e[e.NOSE_BASE=6]="NOSE_BASE",e[e.LIP_TOP=7]="LIP_TOP",e[e.LIP_BOTTOM=8]="LIP_BOTTOM",e[e.MOUTH_CENTER=9]="MOUTH_CENTER",e[e.CHIN=10]="CHIN",e[e.EYEBROW_LEFT=11]="EYEBROW_LEFT",e[e.EYEBROW_RIGHT=12]="EYEBROW_RIGHT"}(l||(l={})),function(e){e[e.WORLD=3]="WORLD",e[e.MINUS_Z_AWAY_FROM_USER=4]="MINUS_Z_AWAY_FROM_USER",e[e.MINUS_Z_HEADING=5]="MINUS_Z_HEADING",e[e.UNCHANGED=6]="UNCHANGED"}(p||(p={})),function(e){e[e.UNCHANGED=0]="UNCHANGED",e[e.WORLD=1]="WORLD",e[e.PARENT=2]="PARENT",e[e.Z_TOWARDS_CAMERA=3]="Z_TOWARDS_CAMERA"}(u||(u={})),function(e){e[e.LOG_LEVEL_NONE=0]="LOG_LEVEL_NONE",e[e.LOG_LEVEL_ERROR=1]="LOG_LEVEL_ERROR",e[e.LOG_LEVEL_WARNING=2]="LOG_LEVEL_WARNING",e[e.LOG_LEVEL_VERBOSE=3]="LOG_LEVEL_VERBOSE"}(f||(f={})),function(e){e[e.FRAME_PIXEL_FORMAT_I420=0]="FRAME_PIXEL_FORMAT_I420",e[e.FRAME_PIXEL_FORMAT_I420A=1]="FRAME_PIXEL_FORMAT_I420A",e[e.FRAME_PIXEL_FORMAT_I422=2]="FRAME_PIXEL_FORMAT_I422",e[e.FRAME_PIXEL_FORMAT_I444=3]="FRAME_PIXEL_FORMAT_I444",e[e.FRAME_PIXEL_FORMAT_NV12=4]="FRAME_PIXEL_FORMAT_NV12",e[e.FRAME_PIXEL_FORMAT_RGBA=5]="FRAME_PIXEL_FORMAT_RGBA",e[e.FRAME_PIXEL_FORMAT_BGRA=6]="FRAME_PIXEL_FORMAT_BGRA",e[e.FRAME_PIXEL_FORMAT_Y=7]="FRAME_PIXEL_FORMAT_Y"}(d||(d={})),function(e){e[e.IMAGE_TRACKER_TYPE_PLANAR=0]="IMAGE_TRACKER_TYPE_PLANAR",e[e.IMAGE_TRACKER_TYPE_CYLINDRICAL=1]="IMAGE_TRACKER_TYPE_CYLINDRICAL",e[e.IMAGE_TRACKER_TYPE_CONICAL=2]="IMAGE_TRACKER_TYPE_CONICAL"}(h||(h={})),function(e){e[e.WORLD_TRACKER_QUALITY_INITIALIZING=0]="WORLD_TRACKER_QUALITY_INITIALIZING",e[e.WORLD_TRACKER_QUALITY_GOOD=1]="WORLD_TRACKER_QUALITY_GOOD",e[e.WORLD_TRACKER_QUALITY_LIMITED=2]="WORLD_TRACKER_QUALITY_LIMITED"}(m||(m={})),function(e){e[e.ANCHOR_STATUS_INITIALIZING=0]="ANCHOR_STATUS_INITIALIZING",e[e.ANCHOR_STATUS_TRACKING=1]="ANCHOR_STATUS_TRACKING",e[e.ANCHOR_STATUS_PAUSED=2]="ANCHOR_STATUS_PAUSED",e[e.ANCHOR_STATUS_STOPPED=3]="ANCHOR_STATUS_STOPPED"}(b||(b={})),function(e){e[e.PLANE_ORIENTATION_HORIZONTAL=0]="PLANE_ORIENTATION_HORIZONTAL",e[e.PLANE_ORIENTATION_VERTICAL=1]="PLANE_ORIENTATION_VERTICAL"}(w||(w={})),function(e){e[e.DEFAULT=0]="DEFAULT",e[e.HIGH=1]="HIGH"}(y||(y={}));const A=new Map;class E{constructor(e){this._gl=e,this._viewports=[],this._underlyingViewport=this._gl.viewport,this._viewports.push(this._gl.getParameter(this._gl.VIEWPORT)),this._gl.viewport=(e,t,r,a)=>{this._viewports[this._viewports.length-1]=[e,t,r,a],this._underlyingViewport.call(this._gl,e,t,r,a)}}static get(e){let t=A.get(e);return t||(t=new E(e),A.set(e,t)),t}push(){this._viewports.push(this._viewports[this._viewports.length-1])}pop(){const e=this._viewports.pop(),t=this._viewports[this._viewports.length-1];e&&e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]||this._underlyingViewport.call(this._gl,t[0],t[1],t[2],t[3])}}var k=r(238);new TextDecoder;const T=new Uint8Array([90,80,82,77]),R=new Uint16Array(T.buffer),v=new Uint32Array(T.buffer)[0],x=new Uint32Array(1),L=new Uint16Array(x.buffer);const I=/^zprreply:(\d{1,12}):(?:0:|(1):(?:(\d{1,12}):|$))/;class O{constructor(){this._messageId=0,this._replyResolvers=new Map,this._queuedMessages=[],this._processMessage=e=>{"string"!=typeof e.data?"object"==typeof e.data&&e.data instanceof ArrayBuffer&&this._processArrayBufferMessage(e.data):this._processStringMessage(e.data)},this._initRequested=!1}static IsSupported(){return!!globalThis.zprCameraBridge}static SharedInstance(){return null==O._instance&&(O._instance=new O),O._instance}postMessage(e){return t=this,r=void 0,_=function*(){let t=`zpr:${this._messageId}:${e}`,r=new Promise(((e,t)=>{this._replyResolvers.set(this._messageId,{resolve:e,reject:t})}));return this._nativePort?this._nativePort.postMessage(t):(this._queuedMessages.push(t),this._initPort()),this._messageId++,r},new((a=void 0)||(a=Promise))((function(e,i){function n(e){try{o(_.next(e))}catch(e){i(e)}}function s(e){try{o(_.throw(e))}catch(e){i(e)}}function o(t){var r;t.done?e(t.value):(r=t.value,r instanceof a?r:new a((function(e){e(r)}))).then(n,s)}o((_=_.apply(t,r||[])).next())}));var t,r,a,_}_processStringMessage(e){if(!((t=e).length<16)&&t.charCodeAt(0)===R[0]&&t.charCodeAt(1)===R[1]){let t=function(e){return e.length<16?4294967295:(L[0]=e.charCodeAt(2),L[1]=e.charCodeAt(3),x[0])}(e),r=this._replyResolvers.get(t);if(!r)return;return this._replyResolvers.delete(t),void r.resolve(e)}var t;let r=e.match(I);if(!r)return;let a=r[0].length,_=Number.parseInt(r[1]),i=this._replyResolvers.get(_);if(!i)return;if(this._replyResolvers.delete(_),"1"!==r[2])return void i.reject(new Error(e.substring(a)));if(void 0===r[3])return void i.resolve();let n=a+Number.parseInt(r[3]);if(n==e.length)return void i.resolve(e.substring(a));let s=e.substring(a,n),o=new ArrayBuffer(2*e.length);!function(e,t){!function(e,t){const r=Math.min(t.length,e.length);let a=0;for(a=0;a+31<r;a+=32)e[a]=t.charCodeAt(a),e[a+1]=t.charCodeAt(a+1),e[a+2]=t.charCodeAt(a+2),e[a+3]=t.charCodeAt(a+3),e[a+4]=t.charCodeAt(a+4),e[a+5]=t.charCodeAt(a+5),e[a+6]=t.charCodeAt(a+6),e[a+7]=t.charCodeAt(a+7),e[a+8]=t.charCodeAt(a+8),e[a+9]=t.charCodeAt(a+9),e[a+10]=t.charCodeAt(a+10),e[a+11]=t.charCodeAt(a+11),e[a+12]=t.charCodeAt(a+12),e[a+13]=t.charCodeAt(a+13),e[a+14]=t.charCodeAt(a+14),e[a+15]=t.charCodeAt(a+15),e[a+16]=t.charCodeAt(a+16),e[a+17]=t.charCodeAt(a+17),e[a+18]=t.charCodeAt(a+18),e[a+19]=t.charCodeAt(a+19),e[a+20]=t.charCodeAt(a+20),e[a+21]=t.charCodeAt(a+21),e[a+22]=t.charCodeAt(a+22),e[a+23]=t.charCodeAt(a+23),e[a+24]=t.charCodeAt(a+24),e[a+25]=t.charCodeAt(a+25),e[a+26]=t.charCodeAt(a+26),e[a+27]=t.charCodeAt(a+27),e[a+28]=t.charCodeAt(a+28),e[a+29]=t.charCodeAt(a+29),e[a+30]=t.charCodeAt(a+30),e[a+31]=t.charCodeAt(a+31);for(;a<r;a++)e[a]=t.charCodeAt(a)}(new Uint16Array(e),t)}(o,e);let c=2*n;c=c+15>>4<<4;let l={stringData:s,arrayBuffer:o,byteDataOffset:c};i.resolve(l)}_processArrayBufferMessage(e){if(e.byteLength<32)return;let t=new Uint32Array(e,0,2);if(t[0]!==v)return;let r=t[1],a=this._replyResolvers.get(r);a&&(this._replyResolvers.delete(r),a.resolve(e))}_initPort(){if(this._initRequested)return;this._initRequested=!0;const e=t=>{if("zprCameraBridgePort"===t.data&&t.ports.length>0){this._nativePort=t.ports[0];for(const e of this._queuedMessages)this._nativePort.postMessage(e);this._queuedMessages=[],window.removeEventListener("message",e),window.addEventListener("message",this._processMessage)}};window.addEventListener("message",e);let t=window.origin||document.location.origin;window.zprCameraBridge.requestMessageChannel(t)}}var M;O._instance=null,function(e){e[e.OBJECT_URL=0]="OBJECT_URL",e[e.SRC_OBJECT=1]="SRC_OBJECT"}(M||(M={}));let F={deviceMotionMutliplier:-1,blacklisted:!1,showGyroPermissionsWarningIfNecessary:!1,showSafariPermissionsResetIfNecessary:!1,requestHighFrameRate:!1,videoWidth:640,videoHeight:480,getDataSize:e=>e===y.HIGH?[640,480]:[320,240],videoElementInDOM:!1,preferMediaStreamTrackProcessorCamera:!O.IsSupported(),preferImageBitmapCamera:!1,ios164CameraSelection:!1,relyOnConstraintsForCameraSelection:!1,forceWindowOrientation:!1,intervalMultiplier:1,trustSensorIntervals:!1,offscreenCanvasSupported:void 0!==globalThis.OffscreenCanvas};"undefined"!=typeof window&&(window.zeeProfile=F,window.location.href.indexOf("_mstppipeline")>=0&&(console.log("Configuring for MSTP camera pipeline (if supported)"),F.preferMediaStreamTrackProcessorCamera=!0),window.location.href.indexOf("_imagebitmappipeline")>=0&&(console.log("Configuring for ImageBitmap camera pipeline (if supported)"),F.preferImageBitmapCamera=!0));let C=new k.UAParser,z=(C.getOS().name||"unknown").toLowerCase(),P=(C.getEngine().name||"unknown").toLowerCase();function B(e){F.forceWindowOrientation=!0,F.preferMediaStreamTrackProcessorCamera=!1,F.intervalMultiplier=1e3,F.trustSensorIntervals=!0;let t=e.split(".");if(t.length>=2){const e=parseInt(t[0]),r=parseInt(t[1]);(e<11||11===e&&r<3)&&(F.blacklisted=!0),(e<12||12===e&&r<2)&&(F.videoElementInDOM=!0),(12===e&&r>=2||e>=13)&&(F.showGyroPermissionsWarningIfNecessary=!0),e>=13&&(F.showSafariPermissionsResetIfNecessary=!0),(e>=12&&r>1||e>=13)&&navigator.mediaDevices&&navigator.mediaDevices.getSupportedConstraints&&navigator.mediaDevices.getSupportedConstraints().frameRate&&(F.requestHighFrameRate=!0,e<14&&(F.videoHeight=360,F.getDataSize=e=>e===y.HIGH?[640,360]:[320,180])),16===e&&r>=4&&(F.ios164CameraSelection=!0),e>=17&&(F.relyOnConstraintsForCameraSelection=!0)}}function U(e,t,r){let a=e.createShader(t);if(!a)throw new Error("Unable to create shader");e.shaderSource(a,r),e.compileShader(a);let _=e.getShaderInfoLog(a);if(_&&_.trim().length>0)throw new Error("Shader compile error: "+_);return a}"webkit"===P&&"ios"!==z&&(F.deviceMotionMutliplier=1,"undefined"!=typeof window&&void 0!==window.orientation&&B("15.0")),"webkit"===P&&"ios"===z&&(F.deviceMotionMutliplier=1,B(C.getOS().version||"15.0"));class V{constructor(e){this._gl=e,this._isPaused=!0,this._hadFrames=!1,this._isUserFacing=!1,this._cameraToScreenRotation=0,this._isUploadFrame=!0,this._computedTransformRotation=-1,this._computedFrontCameraRotation=!1,this._cameraUvTransform=g.Ue(),this._framebufferWidth=0,this._framebufferHeight=0,this._framebufferId=null,this._renderTexture=null,this._isWebGL2=!1,this._isWebGL2=e.getParameter(e.VERSION).indexOf("WebGL 2")>=0,this._isWebGL2||(this._instancedArraysExtension=this._gl.getExtension("ANGLE_instanced_arrays"))}resetGLContext(){this._framebufferId=null,this._renderTexture=null,this._vertexBuffer=void 0,this._indexBuffer=void 0,this._greyscaleShader=void 0}destroy(){this.resetGLContext()}uploadFrame(e,t,r,a,_){let i=this._gl;const n=E.get(i);n.push();const s=i.isEnabled(i.SCISSOR_TEST),o=i.isEnabled(i.DEPTH_TEST),c=i.isEnabled(i.BLEND),l=i.isEnabled(i.CULL_FACE),p=i.isEnabled(i.STENCIL_TEST),u=i.getParameter(i.ACTIVE_TEXTURE),f=i.getParameter(i.UNPACK_FLIP_Y_WEBGL),d=i.getParameter(i.CURRENT_PROGRAM);i.activeTexture(i.TEXTURE0);const h=i.getParameter(i.TEXTURE_BINDING_2D),m=i.getParameter(i.FRAMEBUFFER_BINDING),b=i.getParameter(i.ARRAY_BUFFER_BINDING),w=i.getParameter(i.ELEMENT_ARRAY_BUFFER_BINDING);i.disable(i.SCISSOR_TEST),i.disable(i.DEPTH_TEST),i.disable(i.BLEND),i.disable(i.CULL_FACE),i.disable(i.STENCIL_TEST),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,!1),i.bindTexture(i.TEXTURE_2D,e);const y=i.RGBA,g=i.RGBA,A=i.UNSIGNED_BYTE;i.texImage2D(i.TEXTURE_2D,0,y,g,A,t);let k=0,T=0;"undefined"!=typeof HTMLVideoElement&&t instanceof HTMLVideoElement?(k=t.videoWidth,T=t.videoHeight):(k=t.width,T=t.height),T>k&&(T=[k,k=T][0]),this._updateTransforms(r,a);const[R,v]=F.getDataSize(_);let x=this._getFramebuffer(i,R/4,v),L=this._getVertexBuffer(i),I=this._getIndexBuffer(i),O=this._getGreyscaleShader(i);const M=i.getVertexAttrib(O.aVertexPositionLoc,i.VERTEX_ATTRIB_ARRAY_SIZE),C=i.getVertexAttrib(O.aVertexPositionLoc,i.VERTEX_ATTRIB_ARRAY_TYPE),z=i.getVertexAttrib(O.aVertexPositionLoc,i.VERTEX_ATTRIB_ARRAY_NORMALIZED),P=i.getVertexAttrib(O.aVertexPositionLoc,i.VERTEX_ATTRIB_ARRAY_STRIDE),B=i.getVertexAttribOffset(O.aVertexPositionLoc,i.VERTEX_ATTRIB_ARRAY_POINTER),U=i.getVertexAttrib(O.aVertexPositionLoc,i.VERTEX_ATTRIB_ARRAY_ENABLED),V=i.getVertexAttrib(O.aVertexPositionLoc,i.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING),S=i.getVertexAttrib(O.aTextureCoordLoc,i.VERTEX_ATTRIB_ARRAY_SIZE),N=i.getVertexAttrib(O.aTextureCoordLoc,i.VERTEX_ATTRIB_ARRAY_TYPE),D=i.getVertexAttrib(O.aTextureCoordLoc,i.VERTEX_ATTRIB_ARRAY_NORMALIZED),G=i.getVertexAttrib(O.aTextureCoordLoc,i.VERTEX_ATTRIB_ARRAY_STRIDE),H=i.getVertexAttribOffset(O.aTextureCoordLoc,i.VERTEX_ATTRIB_ARRAY_POINTER),X=i.getVertexAttrib(O.aTextureCoordLoc,i.VERTEX_ATTRIB_ARRAY_BUFFER_BINDING),W=i.getVertexAttrib(O.aTextureCoordLoc,i.VERTEX_ATTRIB_ARRAY_ENABLED);let Y=0,q=0;this._isWebGL2?(Y=i.getVertexAttrib(O.aVertexPositionLoc,i.VERTEX_ATTRIB_ARRAY_DIVISOR),q=i.getVertexAttrib(O.aTextureCoordLoc,i.VERTEX_ATTRIB_ARRAY_DIVISOR),i.vertexAttribDivisor(O.aVertexPositionLoc,0),i.vertexAttribDivisor(O.aTextureCoordLoc,0)):this._instancedArraysExtension&&(Y=i.getVertexAttrib(O.aVertexPositionLoc,this._instancedArraysExtension.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE),q=i.getVertexAttrib(O.aTextureCoordLoc,this._instancedArraysExtension.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE),this._instancedArraysExtension.vertexAttribDivisorANGLE(O.aVertexPositionLoc,0),this._instancedArraysExtension.vertexAttribDivisorANGLE(O.aTextureCoordLoc,0)),i.bindFramebuffer(i.FRAMEBUFFER,x),i.viewport(0,0,this._framebufferWidth,this._framebufferHeight),i.clear(i.COLOR_BUFFER_BIT),i.bindBuffer(i.ARRAY_BUFFER,L),i.vertexAttribPointer(O.aVertexPositionLoc,2,i.FLOAT,!1,16,0),i.enableVertexAttribArray(O.aVertexPositionLoc),i.vertexAttribPointer(O.aTextureCoordLoc,2,i.FLOAT,!1,16,8),i.enableVertexAttribArray(O.aTextureCoordLoc),i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,I),i.useProgram(O.program),i.uniform1f(O.uTexWidthLoc,R),i.uniformMatrix4fv(O.uUvTransformLoc,!1,this._cameraUvTransform),i.activeTexture(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,e),i.uniform1i(O.uSamplerLoc,0),i.drawElements(i.TRIANGLES,6,i.UNSIGNED_SHORT,0),i.bindBuffer(i.ARRAY_BUFFER,V),i.vertexAttribPointer(O.aVertexPositionLoc,M,C,z,P,B),i.bindBuffer(i.ARRAY_BUFFER,X),i.vertexAttribPointer(O.aTextureCoordLoc,S,N,D,G,H),i.bindBuffer(i.ARRAY_BUFFER,b),i.bindBuffer(i.ELEMENT_ARRAY_BUFFER,w),U||i.disableVertexAttribArray(O.aVertexPositionLoc),W||i.disableVertexAttribArray(O.aTextureCoordLoc),this._isWebGL2?(i.vertexAttribDivisor(O.aVertexPositionLoc,Y),i.vertexAttribDivisor(O.aTextureCoordLoc,q)):this._instancedArraysExtension&&(this._instancedArraysExtension.vertexAttribDivisorANGLE(O.aVertexPositionLoc,Y),this._instancedArraysExtension.vertexAttribDivisorANGLE(O.aTextureCoordLoc,q)),i.bindFramebuffer(i.FRAMEBUFFER,m),i.useProgram(d),i.bindTexture(i.TEXTURE_2D,h),i.activeTexture(u),i.pixelStorei(i.UNPACK_FLIP_Y_WEBGL,f),n.pop(),c&&i.enable(i.BLEND),l&&i.enable(i.CULL_FACE),o&&i.enable(i.DEPTH_TEST),s&&i.enable(i.SCISSOR_TEST),p&&i.enable(i.STENCIL_TEST)}readFrame(e,t,r){let a=this._gl,_=new Uint8Array(t);const i=a.getParameter(a.FRAMEBUFFER_BINDING),[n,s]=F.getDataSize(r);let o=this._getFramebuffer(a,n/4,s);return a.bindFramebuffer(a.FRAMEBUFFER,o),a.readPixels(0,0,this._framebufferWidth,this._framebufferHeight,a.RGBA,a.UNSIGNED_BYTE,_),a.bindFramebuffer(a.FRAMEBUFFER,i),{uvTransform:this._cameraUvTransform,data:t,texture:e,dataWidth:n,dataHeight:s,userFacing:this._computedFrontCameraRotation}}_updateTransforms(e,t){e==this._computedTransformRotation&&t==this._computedFrontCameraRotation||(this._computedTransformRotation=e,this._computedFrontCameraRotation=t,this._cameraUvTransform=this._getCameraUvTransform())}_getCameraUvTransform(){switch(this._computedTransformRotation){case 270:return new Float32Array([0,1,0,0,-1,0,0,0,0,0,1,0,1,0,0,1]);case 180:return new Float32Array([-1,0,0,0,0,-1,0,0,0,0,1,0,1,1,0,1]);case 90:return new Float32Array([0,-1,0,0,1,0,0,0,0,0,1,0,0,1,0,1])}return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}_getFramebuffer(e,t,r){if(this._framebufferWidth===t&&this._framebufferHeight===r&&this._framebufferId)return this._framebufferId;if(this._framebufferId&&(e.deleteFramebuffer(this._framebufferId),this._framebufferId=null),this._renderTexture&&(e.deleteTexture(this._renderTexture),this._renderTexture=null),this._framebufferId=e.createFramebuffer(),!this._framebufferId)throw new Error("Unable to create framebuffer");if(e.bindFramebuffer(e.FRAMEBUFFER,this._framebufferId),this._renderTexture=e.createTexture(),!this._renderTexture)throw new Error("Unable to create render texture");e.activeTexture(e.TEXTURE0);const a=e.getParameter(e.TEXTURE_BINDING_2D);e.bindTexture(e.TEXTURE_2D,this._renderTexture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,t,r,0,e.RGBA,e.UNSIGNED_BYTE,null),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameterf(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this._renderTexture,0);let _=e.checkFramebufferStatus(e.FRAMEBUFFER);if(_!==e.FRAMEBUFFER_COMPLETE)throw new Error("Framebuffer not complete: "+_.toString());return this._framebufferWidth=t,this._framebufferHeight=r,e.bindTexture(e.TEXTURE_2D,a),e.bindFramebuffer(e.FRAMEBUFFER,null),this._framebufferId}_getVertexBuffer(e){if(this._vertexBuffer)return this._vertexBuffer;if(this._vertexBuffer=e.createBuffer(),!this._vertexBuffer)throw new Error("Unable to create vertex buffer");e.bindBuffer(e.ARRAY_BUFFER,this._vertexBuffer);let t=new Float32Array([-1,-1,0,0,-1,1,0,1,1,1,1,1,1,-1,1,0]);return e.bufferData(e.ARRAY_BUFFER,t,e.STATIC_DRAW),this._vertexBuffer}_getIndexBuffer(e){if(this._indexBuffer)return this._indexBuffer;if(this._indexBuffer=e.createBuffer(),!this._indexBuffer)throw new Error("Unable to create index buffer");e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this._indexBuffer);let t=new Uint16Array([0,1,2,0,2,3]);return e.bufferData(e.ELEMENT_ARRAY_BUFFER,t,e.STATIC_DRAW),this._indexBuffer}_getGreyscaleShader(e){if(this._greyscaleShader)return this._greyscaleShader;let t=e.createProgram();if(!t)throw new Error("Unable to create program");let r=U(e,e.VERTEX_SHADER,H),a=U(e,e.FRAGMENT_SHADER,X);e.attachShader(t,r),e.attachShader(t,a),function(e,t){e.linkProgram(t);let r=e.getProgramInfoLog(t);if(r&&r.trim().length>0)throw new Error("Unable to link: "+r)}(e,t);let _=e.getUniformLocation(t,"uTexWidth");if(!_)throw new Error("Unable to get uniform location uTexWidth");let i=e.getUniformLocation(t,"uUvTransform");if(!i)throw new Error("Unable to get uniform location uUvTransform");let n=e.getUniformLocation(t,"uSampler");if(!n)throw new Error("Unable to get uniform location uSampler");return this._greyscaleShader={program:t,aVertexPositionLoc:e.getAttribLocation(t,"aVertexPosition"),aTextureCoordLoc:e.getAttribLocation(t,"aTextureCoord"),uTexWidthLoc:_,uUvTransformLoc:i,uSamplerLoc:n},this._greyscaleShader}}let S,N,D,G,H="\n attribute vec4 aVertexPosition;\n attribute vec2 aTextureCoord;\n\n varying highp vec2 vTextureCoord1;\n varying highp vec2 vTextureCoord2;\n varying highp vec2 vTextureCoord3;\n varying highp vec2 vTextureCoord4;\n\n uniform float uTexWidth;\n\tuniform mat4 uUvTransform;\n\n void main(void) {\n highp vec2 offset1 = vec2(1.5 / uTexWidth, 0);\n highp vec2 offset2 = vec2(0.5 / uTexWidth, 0);\n\n gl_Position = aVertexPosition;\n vTextureCoord1 = (uUvTransform * vec4(aTextureCoord - offset1, 0, 1)).xy;\n vTextureCoord2 = (uUvTransform * vec4(aTextureCoord - offset2, 0, 1)).xy;\n vTextureCoord3 = (uUvTransform * vec4(aTextureCoord + offset2, 0, 1)).xy;\n vTextureCoord4 = (uUvTransform * vec4(aTextureCoord + offset1, 0, 1)).xy;\n }\n",X="\n varying highp vec2 vTextureCoord1;\n varying highp vec2 vTextureCoord2;\n varying highp vec2 vTextureCoord3;\n varying highp vec2 vTextureCoord4;\n\n uniform sampler2D uSampler;\n\n const lowp vec3 colorWeights = vec3(77.0 / 256.0, 150.0 / 256.0, 29.0 / 256.0);\n\n void main(void) {\n lowp vec4 outpx;\n\n outpx.r = dot(colorWeights, texture2D(uSampler, vTextureCoord1).xyz);\n outpx.g = dot(colorWeights, texture2D(uSampler, vTextureCoord2).xyz);\n outpx.b = dot(colorWeights, texture2D(uSampler, vTextureCoord3).xyz);\n outpx.a = dot(colorWeights, texture2D(uSampler, vTextureCoord4).xyz);\n\n gl_FragColor = outpx;\n }\n";var W=r(604),Y=function(e,t,r,a){return new(r||(r=Promise))((function(_,i){function n(e){try{o(a.next(e))}catch(e){i(e)}}function s(e){try{o(a.throw(e))}catch(e){i(e)}}function o(e){var t;e.done?_(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(n,s)}o((a=a.apply(e,t||[])).next())}))};let q,j=new class{constructor(){this.onOutgoingMessage=new s,this.onIncomingMessage=new o,this._outgoingMessages=[]}postIncomingMessage(e){this.onIncomingMessage.emit(e)}postOutgoingMessage(e,t){this._outgoingMessages.push({msg:e,transferables:t}),this.onOutgoingMessage.emit()}getOutgoingMessages(){let e=this._outgoingMessages;return this._outgoingMessages=[],e}},Z=0,K=!1;const Q=new Map,$=new Map;function J(e,t,r){return Y(this,void 0,void 0,(function*(){let _=a.Z({locateFile:(t,r)=>t.endsWith("zappar-cv.wasm")?e:r+t,instantiateWasm:(e,r)=>{const a=new WebAssembly.Instance(t,e);return r(a),a.exports},onRuntimeInitialized:()=>{let e=function(e){let t=e.cwrap("zappar_log_level","number",[]),r=e.cwrap("zappar_log_level_set",null,["number"]),a=e.cwrap("zappar_analytics_project_id_set",null,["string","string"]),_=e.cwrap("zappar_pipeline_create","number",[]),i=e.cwrap("zappar_pipeline_destroy",null,["number"]),n=e.cwrap("zappar_pipeline_camera_frame_data_raw","number",["number"]),s=e.cwrap("zappar_pipeline_camera_frame_data_raw_size","number",["number"]),o=e.cwrap("zappar_pipeline_frame_update",null,["number"]),c=e.cwrap("zappar_pipeline_frame_number","number",["number"]),l=e.cwrap("zappar_pipeline_camera_model","number",["number"]),p=e.cwrap("zappar_pipeline_camera_data_width","number",["number"]),u=e.cwrap("zappar_pipeline_camera_data_height","number",["number"]),f=e.cwrap("zappar_pipeline_camera_frame_user_data","number",["number"]),d=e.cwrap("zappar_pipeline_camera_frame_submit",null,["number","number","number","number","number","number","number","number","number","number"]),h=e.cwrap("zappar_pipeline_camera_frame_submit_raw_pointer",null,["number","number","number","number","number","number","number","number","number","number","number","number","number"]),m=e.cwrap("zappar_pipeline_camera_frame_camera_attitude","number",["number"]),b=e.cwrap("zappar_pipeline_camera_frame_device_attitude","number",["number"]),w=e.cwrap("zappar_pipeline_motion_accelerometer_submit",null,["number","number","number","number","number"]),y=e.cwrap("zappar_pipeline_motion_accelerometer_with_gravity_submit_int",null,["number","number","number","number","number","number"]),g=e.cwrap("zappar_pipeline_motion_accelerometer_without_gravity_submit_int",null,["number","number","number","number","number","number"]),A=e.cwrap("zappar_pipeline_motion_rotation_rate_submit",null,["number","number","number","number","number"]),E=e.cwrap("zappar_pipeline_motion_rotation_rate_submit_int",null,["number","number","number","number","number","number"]),k=e.cwrap("zappar_pipeline_motion_attitude_submit",null,["number","number","number","number","number"]),T=e.cwrap("zappar_pipeline_motion_attitude_submit_int",null,["number","number","number","number","number","number"]),R=e.cwrap("zappar_pipeline_motion_attitude_matrix_submit",null,["number","number"]),v=e.cwrap("zappar_camera_source_create","number",["number","string"]),x=e.cwrap("zappar_camera_source_destroy",null,["number"]),L=e.cwrap("zappar_sequence_source_create","number",["number"]),I=e.cwrap("zappar_sequence_source_destroy",null,["number"]),O=e.cwrap("zappar_image_tracker_create","number",["number"]),M=e.cwrap("zappar_image_tracker_destroy",null,["number"]),F=e.cwrap("zappar_image_tracker_target_load_from_memory",null,["number","number","number"]),C=e.cwrap("zappar_image_tracker_target_loaded_version","number",["number"]),z=e.cwrap("zappar_image_tracker_enabled","number",["number"]),P=e.cwrap("zappar_image_tracker_enabled_set",null,["number","number"]),B=e.cwrap("zappar_image_tracker_anchor_count","number",["number"]),U=e.cwrap("zappar_image_tracker_anchor_id","string",["number","number"]),V=e.cwrap("zappar_image_tracker_anchor_pose_raw","number",["number","number"]),S=e.cwrap("zappar_face_tracker_create","number",["number"]),N=e.cwrap("zappar_face_tracker_destroy",null,["number"]),D=e.cwrap("zappar_face_tracker_model_load_from_memory",null,["number","number","number"]),G=e.cwrap("zappar_face_tracker_model_loaded_version","number",["number"]),H=e.cwrap("zappar_face_tracker_enabled_set",null,["number","number"]),X=e.cwrap("zappar_face_tracker_enabled","number",["number"]),W=e.cwrap("zappar_face_tracker_max_faces_set",null,["number","number"]),Y=e.cwrap("zappar_face_tracker_max_faces","number",["number"]),q=e.cwrap("zappar_face_tracker_anchor_count","number",["number"]),j=e.cwrap("zappar_face_tracker_anchor_id","string",["number","number"]),Z=e.cwrap("zappar_face_tracker_anchor_pose_raw","number",["number","number"]),K=e.cwrap("zappar_face_tracker_anchor_identity_coefficients","number",["number","number"]),Q=e.cwrap("zappar_face_tracker_anchor_expression_coefficients","number",["number","number"]),$=e.cwrap("zappar_face_mesh_create","number",[]),J=e.cwrap("zappar_face_mesh_destroy",null,["number"]),ee=e.cwrap("zappar_face_landmark_create","number",["number"]),te=e.cwrap("zappar_face_landmark_destroy",null,["number"]),re=e.cwrap("zappar_barcode_finder_create","number",["number"]),ae=e.cwrap("zappar_barcode_finder_destroy",null,["number"]),_e=e.cwrap("zappar_barcode_finder_enabled_set",null,["number","number"]),ie=e.cwrap("zappar_barcode_finder_enabled","number",["number"]),ne=e.cwrap("zappar_barcode_finder_found_number","number",["number"]),se=e.cwrap("zappar_barcode_finder_found_text","string",["number","number"]),oe=e.cwrap("zappar_barcode_finder_found_format","number",["number","number"]),ce=e.cwrap("zappar_barcode_finder_formats","number",["number"]),le=e.cwrap("zappar_barcode_finder_formats_set",null,["number","number"]),pe=e.cwrap("zappar_instant_world_tracker_create","number",["number"]),ue=e.cwrap("zappar_instant_world_tracker_destroy",null,["number"]),fe=e.cwrap("zappar_instant_world_tracker_enabled_set",null,["number","number"]),de=e.cwrap("zappar_instant_world_tracker_enabled","number",["number"]),he=e.cwrap("zappar_instant_world_tracker_anchor_pose_raw","number",["number"]),me=e.cwrap("zappar_instant_world_tracker_anchor_pose_set_from_camera_offset_raw",null,["number","number","number","number","number"]),be=e.cwrap("zappar_zapcode_tracker_create","number",["number"]),we=e.cwrap("zappar_zapcode_tracker_destroy",null,["number"]),ye=e.cwrap("zappar_zapcode_tracker_target_load_from_memory",null,["number","number","number"]),ge=e.cwrap("zappar_zapcode_tracker_target_loaded_version","number",["number"]),Ae=e.cwrap("zappar_zapcode_tracker_enabled","number",["number"]),Ee=e.cwrap("zappar_zapcode_tracker_enabled_set",null,["number","number"]),ke=e.cwrap("zappar_zapcode_tracker_anchor_count","number",["number"]),Te=e.cwrap("zappar_zapcode_tracker_anchor_id","string",["number","number"]),Re=e.cwrap("zappar_zapcode_tracker_anchor_pose_raw","number",["number","number"]),ve=e.cwrap("zappar_world_tracker_create","number",["number"]),xe=e.cwrap("zappar_world_tracker_destroy",null,["number"]),Le=e.cwrap("zappar_world_tracker_enabled","number",["number"]),Ie=e.cwrap("zappar_world_tracker_enabled_set",null,["number","number"]),Oe=e.cwrap("zappar_world_tracker_quality","number",["number"]),Me=e.cwrap("zappar_world_tracker_horizontal_plane_detection_enabled","number",["number"]),Fe=e.cwrap("zappar_world_tracker_horizontal_plane_detection_enabled_set",null,["number","number"]),Ce=e.cwrap("zappar_world_tracker_vertical_plane_detection_enabled","number",["number"]),ze=e.cwrap("zappar_world_tracker_vertical_plane_detection_enabled_set",null,["number","number"]),Pe=e.cwrap("zappar_world_tracker_plane_anchor_count","number",["number"]),Be=e.cwrap("zappar_world_tracker_plane_anchor_id","string",["number","number"]),Ue=e.cwrap("zappar_world_tracker_plane_anchor_pose_raw","number",["number","number"]),Ve=e.cwrap("zappar_world_tracker_plane_anchor_status","number",["number","number"]),Se=e.cwrap("zappar_world_tracker_plane_anchor_polygon_data_size","number",["number","number"]),Ne=e.cwrap("zappar_world_tracker_plane_anchor_polygon_data","number",["number","number"]),De=e.cwrap("zappar_world_tracker_plane_anchor_polygon_version","number",["number","number"]),Ge=e.cwrap("zappar_world_tracker_plane_anchor_orientation","number",["number","number"]),He=e.cwrap("zappar_world_tracker_world_anchor_status","number",["number"]),Xe=e.cwrap("zappar_world_tracker_world_anchor_id","string",["number"]),We=e.cwrap("zappar_world_tracker_world_anchor_pose_raw","number",["number"]),Ye=e.cwrap("zappar_world_tracker_ground_anchor_id","string",["number"]),qe=e.cwrap("zappar_world_tracker_ground_anchor_status","number",["number"]),je=e.cwrap("zappar_world_tracker_ground_anchor_pose_raw","number",["number"]),Ze=e.cwrap("zappar_world_tracker_reset",null,["number"]),Ke=e.cwrap("zappar_world_tracker_tracks_data_enabled","number",["number"]),Qe=e.cwrap("zappar_world_tracker_tracks_data_enabled_set",null,["number","number"]),$e=e.cwrap("zappar_world_tracker_tracks_data_size","number",["number"]),Je=e.cwrap("zappar_world_tracker_tracks_data","number",["number"]),et=e.cwrap("zappar_world_tracker_tracks_type_data_size","number",["number"]),tt=e.cwrap("zappar_world_tracker_tracks_type_data","number",["number"]),rt=e.cwrap("zappar_world_tracker_projections_data_enabled","number",["number"]),at=e.cwrap("zappar_world_tracker_projections_data_enabled_set",null,["number","number"]),_t=e.cwrap("zappar_world_tracker_projections_data_size","number",["number"]),it=e.cwrap("zappar_world_tracker_projections_data","number",["number"]),nt=e.cwrap("zappar_custom_anchor_create","number",["number","number","string"]),st=e.cwrap("zappar_custom_anchor_destroy",null,["number"]),ot=e.cwrap("zappar_custom_anchor_status","number",["number"]),ct=e.cwrap("zappar_custom_anchor_pose_version","number",["number"]),lt=e.cwrap("zappar_custom_anchor_pose_raw","number",["number"]),pt=e.cwrap("zappar_custom_anchor_pose_set_from_camera_offset_raw",null,["number","number","number","number","number"]),ut=e.cwrap("zappar_custom_anchor_pose_set_from_anchor_offset",null,["number","string","number","number","number","number"]),ft=e.cwrap("zappar_custom_anchor_pose_set",null,["number","number"]),dt=e.cwrap("zappar_custom_anchor_pose_set_with_parent",null,["number","number","string"]),ht=e.cwrap("zappar_d3_tracker_create","number",["number"]),mt=e.cwrap("zappar_d3_tracker_destroy",null,["number"]),bt=32,wt=e._malloc(bt),yt=(e._malloc(64),new Map),gt=(t,r)=>{let a=yt.get(t);return(!a||a[0]<r)&&(a&&e._free(a[1]),a=[r,e._malloc(r)],yt.set(t,a)),a[1]};return{log_level:()=>t(),log_level_set:e=>r(e),analytics_project_id_set:(e,t)=>a(e,t),pipeline_create:()=>_(),pipeline_destroy:()=>{i()},pipeline_camera_frame_data_raw:e=>n(e),pipeline_camera_frame_data_raw_size:e=>s(e),pipeline_frame_update:e=>o(e),pipeline_frame_number:e=>c(e),pipeline_camera_model:t=>{let r=l(t),a=new Float32Array(6);return a.set(e.HEAPF32.subarray(r/4,6+r/4)),r=a,r},pipeline_camera_data_width:e=>p(e),pipeline_camera_data_height:e=>u(e),pipeline_camera_frame_user_data:e=>f(e),pipeline_camera_frame_submit:(t,r,a,_,i,n,s,o,c)=>{bt<r.byteLength&&(e._free(wt),bt=r.byteLength,wt=e._malloc(bt));let l=wt,p=r.byteLength;e.HEAPU8.set(new Uint8Array(r),wt);let u=a,f=_,h=i,m=gt(4,n.byteLength);e.HEAPF32.set(n,m/4);let b=gt(5,s.byteLength);return e.HEAPF32.set(s,b/4),d(t,l,p,u,f,h,m,b,o?1:0,c)},pipeline_camera_frame_submit_raw_pointer:(t,r,a,_,i,n,s,o,c,l,p,u,f)=>{let d=r,m=a,b=_,w=i,y=n,g=s,A=gt(6,o.byteLength);e.HEAPF32.set(o,A/4);let E=c,k=gt(8,l.byteLength);return e.HEAPF32.set(l,k/4),h(t,d,m,b,w,y,g,A,E,k,p?1:0,u,f?1:0)},pipeline_camera_frame_camera_attitude:t=>{let r=m(t),a=new Float32Array(16);return a.set(e.HEAPF32.subarray(r/4,16+r/4)),r=a,r},pipeline_camera_frame_device_attitude:t=>{let r=b(t),a=new Float32Array(16);return a.set(e.HEAPF32.subarray(r/4,16+r/4)),r=a,r},pipeline_motion_accelerometer_submit:(e,t,r,a,_)=>w(e,t,r,a,_),pipeline_motion_accelerometer_with_gravity_submit_int:(e,t,r,a,_,i)=>y(e,t,r,a,_,i),pipeline_motion_accelerometer_without_gravity_submit_int:(e,t,r,a,_,i)=>g(e,t,r,a,_,i),pipeline_motion_rotation_rate_submit:(e,t,r,a,_)=>A(e,t,r,a,_),pipeline_motion_rotation_rate_submit_int:(e,t,r,a,_,i)=>E(e,t,r,a,_,i),pipeline_motion_attitude_submit:(e,t,r,a,_)=>k(e,t,r,a,_),pipeline_motion_attitude_submit_int:(e,t,r,a,_,i)=>T(e,t,r,a,_,i),pipeline_motion_attitude_matrix_submit:(t,r)=>{let a=gt(0,r.byteLength);return e.HEAPF32.set(r,a/4),R(t,a)},camera_source_create:(e,t)=>v(e,t),camera_source_destroy:()=>{x()},sequence_source_create:e=>L(e),sequence_source_destroy:()=>{I()},image_tracker_create:e=>O(e),image_tracker_destroy:()=>{M()},image_tracker_target_load_from_memory:(t,r)=>{bt<r.byteLength&&(e._free(wt),bt=r.byteLength,wt=e._malloc(bt));let a=wt,_=r.byteLength;return e.HEAPU8.set(new Uint8Array(r),wt),F(t,a,_)},image_tracker_target_loaded_version:e=>C(e),image_tracker_enabled:e=>{let t=z(e);return t=1===t,t},image_tracker_enabled_set:(e,t)=>P(e,t?1:0),image_tracker_anchor_count:e=>B(e),image_tracker_anchor_id:(e,t)=>U(e,t),image_tracker_anchor_pose_raw:(t,r)=>{let a=V(t,r),_=new Float32Array(16);return _.set(e.HEAPF32.subarray(a/4,16+a/4)),a=_,a},face_tracker_create:e=>S(e),face_tracker_destroy:()=>{N()},face_tracker_model_load_from_memory:(t,r)=>{bt<r.byteLength&&(e._free(wt),bt=r.byteLength,wt=e._malloc(bt));let a=wt,_=r.byteLength;return e.HEAPU8.set(new Uint8Array(r),wt),D(t,a,_)},face_tracker_model_loaded_version:e=>G(e),face_tracker_enabled_set:(e,t)=>H(e,t?1:0),face_tracker_enabled:e=>{let t=X(e);return t=1===t,t},face_tracker_max_faces_set:(e,t)=>W(e,t),face_tracker_max_faces:e=>Y(e),face_tracker_anchor_count:e=>q(e),face_tracker_anchor_id:(e,t)=>j(e,t),face_tracker_anchor_pose_raw:(t,r)=>{let a=Z(t,r),_=new Float32Array(16);return _.set(e.HEAPF32.subarray(a/4,16+a/4)),a=_,a},face_tracker_anchor_identity_coefficients:(t,r)=>{let a=K(t,r),_=new Float32Array(50);return _.set(e.HEAPF32.subarray(a/4,50+a/4)),a=_,a},face_tracker_anchor_expression_coefficients:(t,r)=>{let a=Q(t,r),_=new Float32Array(29);return _.set(e.HEAPF32.subarray(a/4,29+a/4)),a=_,a},face_mesh_create:()=>$(),face_mesh_destroy:()=>{J()},face_landmark_create:e=>ee(e),face_landmark_destroy:()=>{te()},barcode_finder_create:e=>re(e),barcode_finder_destroy:()=>{ae()},barcode_finder_enabled_set:(e,t)=>_e(e,t?1:0),barcode_finder_enabled:e=>{let t=ie(e);return t=1===t,t},barcode_finder_found_number:e=>ne(e),barcode_finder_found_text:(e,t)=>se(e,t),barcode_finder_found_format:(e,t)=>oe(e,t),barcode_finder_formats:e=>ce(e),barcode_finder_formats_set:(e,t)=>le(e,t),instant_world_tracker_create:e=>pe(e),instant_world_tracker_destroy:()=>{ue()},instant_world_tracker_enabled_set:(e,t)=>fe(e,t?1:0),instant_world_tracker_enabled:e=>{let t=de(e);return t=1===t,t},instant_world_tracker_anchor_pose_raw:t=>{let r=he(t),a=new Float32Array(16);return a.set(e.HEAPF32.subarray(r/4,16+r/4)),r=a,r},instant_world_tracker_anchor_pose_set_from_camera_offset_raw:(e,t,r,a,_)=>me(e,t,r,a,_),zapcode_tracker_create:e=>be(e),zapcode_tracker_destroy:()=>{we()},zapcode_tracker_target_load_from_memory:(t,r)=>{bt<r.byteLength&&(e._free(wt),bt=r.byteLength,wt=e._malloc(bt));let a=wt,_=r.byteLength;return e.HEAPU8.set(new Uint8Array(r),wt),ye(t,a,_)},zapcode_tracker_target_loaded_version:e=>ge(e),zapcode_tracker_enabled:e=>{let t=Ae(e);return t=1===t,t},zapcode_tracker_enabled_set:(e,t)=>Ee(e,t?1:0),zapcode_tracker_anchor_count:e=>ke(e),zapcode_tracker_anchor_id:(e,t)=>Te(e,t),zapcode_tracker_anchor_pose_raw:(t,r)=>{let a=Re(t,r),_=new Float32Array(16);return _.set(e.HEAPF32.subarray(a/4,16+a/4)),a=_,a},world_tracker_create:e=>ve(e),world_tracker_destroy:()=>{xe()},world_tracker_enabled:e=>{let t=Le(e);return t=1===t,t},world_tracker_enabled_set:(e,t)=>Ie(e,t?1:0),world_tracker_quality:e=>Oe(e),world_tracker_horizontal_plane_detection_enabled:e=>{let t=Me(e);return t=1===t,t},world_tracker_horizontal_plane_detection_enabled_set:(e,t)=>Fe(e,t?1:0),world_tracker_vertical_plane_detection_enabled:e=>{let t=Ce(e);return t=1===t,t},world_tracker_vertical_plane_detection_enabled_set:(e,t)=>ze(e,t?1:0),world_tracker_plane_anchor_count:e=>Pe(e),world_tracker_plane_anchor_id:(e,t)=>Be(e,t),world_tracker_plane_anchor_pose_raw:(t,r)=>{let a=Ue(t,r),_=new Float32Array(16);return _.set(e.HEAPF32.subarray(a/4,16+a/4)),a=_,a},world_tracker_plane_anchor_status:(e,t)=>Ve(e,t),world_tracker_plane_anchor_polygon_data_size:(e,t)=>Se(e,t),world_tracker_plane_anchor_polygon_data:(t,r)=>{let a=Ne(t,r),_=Se(t,r),i=new Float32Array(_);return i.set(e.HEAPF32.subarray(a/4,_+a/4)),a=i,a},world_tracker_plane_anchor_polygon_version:(e,t)=>De(e,t),world_tracker_plane_anchor_orientation:(e,t)=>Ge(e,t),world_tracker_world_anchor_status:e=>He(e),world_tracker_world_anchor_id:e=>Xe(e),world_tracker_world_anchor_pose_raw:t=>{let r=We(t),a=new Float32Array(16);return a.set(e.HEAPF32.subarray(r/4,16+r/4)),r=a,r},world_tracker_ground_anchor_id:e=>Ye(e),world_tracker_ground_anchor_status:e=>qe(e),world_tracker_ground_anchor_pose_raw:t=>{let r=je(t),a=new Float32Array(16);return a.set(e.HEAPF32.subarray(r/4,16+r/4)),r=a,r},world_tracker_reset:e=>Ze(e),world_tracker_tracks_data_enabled:e=>{let t=Ke(e);return t=1===t,t},world_tracker_tracks_data_enabled_set:(e,t)=>Qe(e,t?1:0),world_tracker_tracks_data_size:e=>$e(e),world_tracker_tracks_data:t=>{let r=Je(t),a=$e(t),_=new Float32Array(a);return _.set(e.HEAPF32.subarray(r/4,a+r/4)),r=_,r},world_tracker_tracks_type_data_size:e=>et(e),world_tracker_tracks_type_data:t=>{let r=tt(t),a=et(t),_=new Uint8Array(a);return _.set(e.HEAPU8.subarray(r,a+r)),r=_,r},world_tracker_projections_data_enabled:e=>{let t=rt(e);return t=1===t,t},world_tracker_projections_data_enabled_set:(e,t)=>at(e,t?1:0),world_tracker_projections_data_size:e=>_t(e),world_tracker_projections_data:t=>{let r=it(t),a=_t(t),_=new Float32Array(a);return _.set(e.HEAPF32.subarray(r/4,a+r/4)),r=_,r},custom_anchor_create:(e,t,r)=>nt(e,t,r),custom_anchor_destroy:()=>{st()},custom_anchor_status:e=>ot(e),custom_anchor_pose_version:e=>ct(e),custom_anchor_pose_raw:t=>{let r=lt(t),a=new Float32Array(16);return a.set(e.HEAPF32.subarray(r/4,16+r/4)),r=a,r},custom_anchor_pose_set_from_camera_offset_raw:(e,t,r,a,_)=>pt(e,t,r,a,_),custom_anchor_pose_set_from_anchor_offset:(e,t,r,a,_,i)=>ut(e,t,r,a,_,i),custom_anchor_pose_set:(t,r)=>{let a=gt(0,r.byteLength);return e.HEAPF32.set(r,a/4),ft(t,a)},custom_anchor_pose_set_with_parent:(t,r,a)=>{let _=gt(0,r.byteLength);return e.HEAPF32.set(r,_/4),dt(t,_,a)},d3_tracker_create:e=>ht(e),d3_tracker_destroy:()=>{mt()}}}(_);const t=(0,W.g)(_),a=r>0?function(e){return{data_download_clear:e.cwrap("data_download_clear",null,[]),data_download_size:e.cwrap("data_download_size","number",[]),data_download:e.cwrap("data_download","number",[]),data_should_record_set:e.cwrap("data_should_record_set",null,["number"])}}(_):void 0;null==a||a.data_should_record_set(r);let i=new n(e,((e,t)=>{j.postOutgoingMessage({p:e,t:"zappar",d:t},[t])}));j.postOutgoingMessage("loaded",[]),j.onIncomingMessage.bind((r=>{var n,s,o;switch(r.t){case"zappar":i.processBuffer(r.d),j.postOutgoingMessage({t:"buf",d:r.d},[r.d]);break;case"buf":null===(n=i.serializersByPipelineId.get(r.p))||void 0===n||n.bufferReturn(r.d);break;case"cameraFrameC2S":{let n,s=r,o=i._pipeline_by_instance.get(s.p);o&&(e.pipeline_camera_frame_submit(o,s.d,s.width,s.height,s.token,s.c2d,s.cm,s.userFacing,s.captureTime),e.pipeline_frame_update(o),n=e.pipeline_camera_frame_device_attitude(o),i.exploreState(),ce(_,t),a&&le(_,a));let c={token:s.token,d:s.d,p:s.p,t:"cameraFrameRecycleS2C",att:n};j.postOutgoingMessage(c,[s.d]);break}case"rawenabled":K=r.v;break;case"rawrequest":{const e=r,t=Q.get(e.p),a={t:"raw",token:e.token,p:e.p,data:t&&null!==(o=null===(s=t.ready.find((t=>t.token===e.token)))||void 0===s?void 0:s.data)&&void 0!==o?o:null};j.postOutgoingMessage(a,[]);break}case"cameraProfileC2S":{let e=r;$.set(e.source,e.p);break}case"streamC2S":{let n=r;(function(e,t,r,a,_,i,n,s,o){return Y(this,void 0,void 0,(function*(){for(;;){let c;try{c=yield r.getReader()}catch(e){yield se(1e3);continue}try{return void(yield ne(e,t,c,a,_,i,n,s,o))}catch(e){}return void(yield se(1e3))}}))})(_,e,n.s,n.p,n.userFacing,i,n.source,t,a).then((()=>{let e={t:"streamEndedS2C",p:n.p,source:n.source};j.postOutgoingMessage(e,[])})).catch((e=>{}));break}case"cameraToScreenC2S":Z=r.r;break;case"imageBitmapC2S":!function(e,t,r,a){const[_,i]=function(){if(!D||!G){const e=new OffscreenCanvas(1,1);if(G=e.getContext("webgl"),!G)throw new Error("Unable to get offscreen GL context");D=new V(G)}return[D,G]}();if(N||(N=i.createTexture(),i.bindTexture(i.TEXTURE_2D,N),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR)),!N)return;const[n,s]=F.getDataSize(e.cp);(!S||S.byteLength<n*s)&&(S=new ArrayBuffer(n*s)),_.uploadFrame(N,e.i,e.r,e.userFacing,e.cp);let o=_.readFrame(N,S,e.cp),c={t:"imageBitmapS2C",dataWidth:o.dataWidth,dataHeight:o.dataHeight,frame:e.i,userFacing:o.userFacing,uvTransform:o.uvTransform||g.Ue(),tokenId:e.tokenId,p:e.p};a.postOutgoingMessage(c,[e.i]);let l=r._pipeline_by_instance.get(e.p);l&&(t.pipeline_camera_frame_submit(l,S,o.dataWidth,o.dataHeight,e.tokenId,e.cameraToDevice,e.cameraModel,o.userFacing,performance.now()),t.pipeline_frame_update(l),r.exploreState())}(r,e,i,j);break;case"sensorDataC2S":{const t=r,a=i._pipeline_by_instance.get(t.p);if(!a)break;switch(t.sensor){case"accel":e.pipeline_motion_accelerometer_submit(a,t.timestamp,t.x,t.y,t.z);break;case"accel_w_gravity_int":e.pipeline_motion_accelerometer_with_gravity_submit_int(a,t.timestamp,t.interval,t.x,t.y,t.z);break;case"accel_wo_gravity_int":e.pipeline_motion_accelerometer_without_gravity_submit_int(a,t.timestamp,t.interval,t.x,t.y,t.z);break;case"attitude_int":e.pipeline_motion_attitude_submit_int(a,t.timestamp,t.interval,t.x,t.y,t.z);break;case"attitude":e.pipeline_motion_attitude_submit(a,t.timestamp,t.x,t.y,t.z);break;case"rotation_rate_int":e.pipeline_motion_rotation_rate_submit_int(a,t.timestamp,t.interval,t.x,t.y,t.z);break;case"rotation_rate":e.pipeline_motion_rotation_rate_submit(a,t.timestamp,t.x,t.y,t.z)}break}case"attitudeMatrixC2S":{const t=r,a=i._pipeline_by_instance.get(t.p);if(!a)break;e.pipeline_motion_attitude_matrix_submit(a,t.m);break}}}))}})}))}let ee=0,te=0,re=1;function ae(e){return new Promise(((t,r)=>{const a=setTimeout((()=>{r("Frame timeout")}),2e3);e.read().then((e=>{clearTimeout(a),t(e)}))}))}const _e=g.Ue(),ie=new Float32Array([300,300,160,120,0,0]);function ne(e,t,r,a,_,i,n,s,o){var c,l;return Y(this,void 0,void 0,(function*(){for(;;){let p=yield ae(r);if(p.done)return void(null===(c=p.value)||void 0===c||c.close());let u=p.value,f=u.allocationSize();f>te&&(ee>0&&e._free(ee),ee=e._malloc(f),te=f),yield u.copyTo(e.HEAPU8.subarray(ee,ee+te));let d=re;re++;const h=u.visibleRect.width,m=u.visibleRect.height;let b,w=h,A=m;switch(Z){case 270:b=new Float32Array([0,1,0,0,-1,0,0,0,0,0,1,0,1,0,0,1]),w=m,A=h;break;case 180:b=new Float32Array([-1,0,0,0,0,-1,0,0,0,0,1,0,1,1,0,1]);break;case 90:b=new Float32Array([0,-1,0,0,1,0,0,0,0,0,1,0,0,1,0,1]),w=m,A=h;break;default:b=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}let E=!1;$.get(n)!==y.HIGH&&(w/=2,A/=2,E=!0);let k=u.clone();_?g.xJ(_e,[-1,1,-1]):g.yR(_e);let T=(_?300:240)*w/320;ie[0]=T,ie[1]=T,ie[2]=.5*w,ie[3]=.5*A;const R={token:d,d:k,p:a,t:"videoFrameS2C",userFacing:_,uvTransform:b,w,h:A,cameraToDevice:_e,cameraModel:ie,source:n};j.postOutgoingMessage(R,[R.d,R.uvTransform.buffer]);const v=i._pipeline_by_instance.get(a);if(v){try{t.pipeline_camera_frame_submit_raw_pointer(v,ee,f,oe(u.format),h,m,d,_e,Z,ie,_,1e-6*(null!==(l=u.timestamp)&&void 0!==l?l:-1),E),ce(e,s),o&&le(e,o)}catch(e){console.log("Exception during camera processing",e)}if(t.pipeline_frame_update(v),K){let r=Q.get(a);if(r||(r={available:[],ready:[]},Q.set(a,r)),r.ready.length>4){const e=r.ready.splice(0,1);for(const t of e)r.available.push(new Uint8Array(t.data.data))}const _=t.pipeline_camera_frame_data_raw_size(v);let i;for(;!i||i.byteLength<_;)r.available.length<1&&r.available.push(new Uint8Array(_)),i=r.available.pop();const n=t.pipeline_camera_frame_data_raw(v);i.set(e.HEAPU8.subarray(n,n+_)),r.ready.push({token:d,data:{data:i,width:t.pipeline_camera_data_width(a),height:t.pipeline_camera_data_height(a)}})}i.exploreState()}u.close()}}))}function se(e){return new Promise((t=>{setTimeout(t,e)}))}function oe(e){switch(e){case"I420":return d.FRAME_PIXEL_FORMAT_I420;case"I420A":return d.FRAME_PIXEL_FORMAT_I420A;case"I422":return d.FRAME_PIXEL_FORMAT_I422;case"I444":return d.FRAME_PIXEL_FORMAT_I444;case"NV12":return d.FRAME_PIXEL_FORMAT_NV12;case"RGBA":case"RGBX":return d.FRAME_PIXEL_FORMAT_RGBA;case"BGRA":case"BGRX":return d.FRAME_PIXEL_FORMAT_BGRA}return d.FRAME_PIXEL_FORMAT_Y}function ce(e,t){const r=t.worker_message_send_count();if(0!==r){q||(q=new MessageChannel,q.port1.start(),q.port1.addEventListener("message",(r=>{if("msgrec"!==r.data.t)return;const a=r.data.data,_=e._malloc(a.byteLength);e.HEAPU8.set(a,_),t.worker_message_receive(r.data.reference,a.byteLength,_),e._free(_)})),j.postOutgoingMessage({t:"setupCeresWorker",port:q.port2},[q.port2]));for(let a=0;a<r;a++){const r=t.worker_message_send_reference(a),_=t.worker_message_send_data_size(a),i=t.worker_message_send_data(a),n=e.HEAPU8.slice(i,i+_);q.port1.postMessage({t:"msgsend",data:n,reference:r},[n.buffer])}t.worker_message_send_clear()}}function le(e,t){const r=t.data_download_size();if(0===r)return;const a=t.data_download(),_=e.HEAPU8.slice(a,a+r);j.postOutgoingMessage({t:"_z_datadownload",data:_},[_.buffer]),t.data_download_clear()}const pe=self;j.onOutgoingMessage.bind((()=>{let e=j.getOutgoingMessages();for(let t of e)pe.postMessage(t.msg,t.transferables)}));let ue=e=>{var t;e&&e.data&&"wasm"===e.data.t&&(J(location.href.startsWith("blob")?e.data.url:new URL(r(751),r.b).toString(),e.data.module,null!==(t=e.data.shouldRecordData)&&void 0!==t?t:0),pe.removeEventListener("message",ue))};pe.addEventListener("message",ue),pe.addEventListener("message",(e=>{j.postIncomingMessage(e.data)}))}},a={};function _(e){var t=a[e];if(void 0!==t)return t.exports;var i=a[e]={exports:{}};return r[e].call(i.exports,i,i.exports,_),i.exports}return _.m=r,_.x=()=>{var e=_.O(void 0,[169,867],(()=>_(287)));return _.O(e)},_.amdO={},e=[],_.O=(t,r,a,i)=>{if(!r){var n=1/0;for(l=0;l<e.length;l++){for(var[r,a,i]=e[l],s=!0,o=0;o<r.length;o++)(!1&i||n>=i)&&Object.keys(_.O).every((e=>_.O[e](r[o])))?r.splice(o--,1):(s=!1,i<n&&(n=i));if(s){e.splice(l--,1);var c=a();void 0!==c&&(t=c)}}return t}i=i||0;for(var l=e.length;l>0&&e[l-1][2]>i;l--)e[l]=e[l-1];e[l]=[r,a,i]},_.d=(e,t)=>{for(var r in t)_.o(t,r)&&!_.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},_.f={},_.e=e=>Promise.all(Object.keys(_.f).reduce(((t,r)=>(_.f[r](e,t),t)),[])),_.u=e=>e+".zappar-cv.js",_.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),_.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e;_.g.importScripts&&(e=_.g.location+"");var t=_.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var a=r.length-1;a>-1&&!e;)e=r[a--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),_.p=e})(),(()=>{_.b=self.location+"";var e={287:1};_.f.i=(t,r)=>{e[t]||importScripts(_.p+_.u(t))};var t=self.webpackChunkZCV=self.webpackChunkZCV||[],r=t.push.bind(t);t.push=t=>{var[a,i,n]=t;for(var s in i)_.o(i,s)&&(_.m[s]=i[s]);for(n&&n(_);a.length;)e[a.pop()]=1;r(t)}})(),t=_.x,_.x=()=>Promise.all([_.e(169),_.e(867)]).then(t),_.x()})()));
|
|
Binary file
|
|
Binary file
|