barcode-detector 2.0.3 → 2.0.4
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 +12 -12
- package/dist/cjs/pure.js +3 -3
- package/dist/es/pure.js +563 -547
- package/dist/iife/index.js +3 -3
- package/dist/iife/pure.js +3 -3
- package/dist/iife/side-effects.js +3 -3
- package/package.json +16 -16
package/dist/iife/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var ur=(R,L,q)=>{if(!L.has(R))throw TypeError("Cannot "+q)};var re=(R,L,q)=>(ur(R,L,"read from private field"),q?q.call(R):L.get(R)),cr=(R,L,q)=>{if(L.has(R))throw TypeError("Cannot add the same private member more than once");L instanceof WeakSet?L.add(R):L.set(R,q)},lr=(R,L,q,pt)=>(ur(R,L,"write to private field"),pt?pt.call(R,q):L.set(R,q),q);var BarcodeDetectionAPI=function(R){var ft;"use strict";const L=["aztec","code_128","code_39","code_93","codabar","data_matrix","ean_13","ean_8","itf","pdf417","qr_code","upc_a","upc_e","unknown"];function q(c){if(pt(c))return{width:c.naturalWidth,height:c.naturalHeight};if(ne(c))return{width:c.width.baseVal.value,height:c.height.baseVal.value};if(ae(c))return{width:c.videoWidth,height:c.videoHeight};if(ie(c))return{width:c.width,height:c.height};if(ue(c))return{width:c.displayWidth,height:c.displayHeight};if(oe(c))return{width:c.width,height:c.height};if(se(c))return{width:c.width,height:c.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}function pt(c){try{return c instanceof HTMLImageElement}catch{return!1}}function ne(c){try{return c instanceof SVGImageElement}catch{return!1}}function ae(c){try{return c instanceof HTMLVideoElement}catch{return!1}}function oe(c){try{return c instanceof HTMLCanvasElement}catch{return!1}}function ie(c){try{return c instanceof ImageBitmap}catch{return!1}}function se(c){try{return c instanceof OffscreenCanvas}catch{return!1}}function ue(c){try{return c instanceof VideoFrame}catch{return!1}}function ce(c){try{return c instanceof Blob}catch{return!1}}function fr(c){try{return c instanceof ImageData}catch{return!1}}function dr(c,m){try{const u=new OffscreenCanvas(c,m);if(u.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return u;throw void 0}catch{const u=document.createElement("canvas");return u.width=c,u.height=m,u}}async function le(c){if(pt(c)&&!await yr(c))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(ne(c)&&!await vr(c))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(ue(c)&&gr(c))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(ae(c)&&(c.readyState===0||c.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(ie(c)&&$r(c))throw new DOMException("The image source is detached.","InvalidStateError");const{width:m,height:u}=q(c);if(m===0||u===0)return null;const $=dr(m,u).getContext("2d");$.drawImage(c,0,0);try{return $.getImageData(0,0,m,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function hr(c){let m;try{if(createImageBitmap)m=await createImageBitmap(c);else if(Image){m=new Image;let g="";try{g=URL.createObjectURL(c),m.src=g,await m.decode()}finally{URL.revokeObjectURL(g)}}else return c}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await le(m)}function pr(c){const{width:m,height:u}=c;if(m===0||u===0)return null;const g=c.getContext("2d");try{return g.getImageData(0,0,m,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function mr(c){if(ce(c))return await hr(c);if(fr(c)){if(wr(c))throw new DOMException("The image data has been detached.","InvalidStateError");return c}return oe(c)||se(c)?pr(c):await le(c)}async function yr(c){try{return await c.decode(),!0}catch{return!1}}async function vr(c){var m;try{return await((m=c.decode)==null?void 0:m.call(c)),!0}catch{return!1}}function gr(c){return c.format===null}function wr(c){return c.data.buffer.byteLength===0}function $r(c){return c.width===0&&c.height===0}function fe(c,m){return c instanceof DOMException?new DOMException(`${m}: ${c.message}`,c.name):c instanceof Error?new c.constructor(`${m}: ${c.message}`):new Error(`${m}: ${c}`)}const de=c=>{let m;const u=new Set,g=(O,G)=>{const j=typeof O=="function"?O(m):O;if(!Object.is(j,m)){const F=m;m=G??typeof j!="object"?j:Object.assign({},m,j),u.forEach(Y=>Y(m,F))}},$=()=>m,w={setState:g,getState:$,subscribe:O=>(u.add(O),()=>u.delete(O)),destroy:()=>{u.clear()}};return m=c(g,$,w),w},br=c=>c?de(c):de,Cr={locateFile:(c,m)=>{var u;const g=(u=c.match(/_(.+?)\.wasm$/))==null?void 0:u[1];return g?`https://fastly.jsdelivr.net/npm/@sec-ant/zxing-wasm@2.1.5/dist/${g}/${c}`:m+c}},ot=br()(()=>({zxingModuleWeakMap:new WeakMap,zxingModuleOverrides:Cr}));function _r(c){ot.setState({zxingModuleOverrides:c})}function Bt(c,m=ot.getState().zxingModuleOverrides){const{zxingModuleWeakMap:u}=ot.getState(),g=u.get(c);if(g&&Object.is(m,ot.getState().zxingModuleOverrides))return g;{ot.setState({zxingModuleOverrides:m});const $=c(m);return u.set(c,$),$}}const he=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","UPC-A","UPC-E"],k={tryHarder:!0,formats:[],maxSymbols:255};async function Tr(c,{tryHarder:m=k.tryHarder,formats:u=k.formats,maxSymbols:g=k.maxSymbols}=k,$){const w=await Bt($,ot.getState().zxingModuleOverrides),{size:O}=c,G=new Uint8Array(await c.arrayBuffer()),j=w._malloc(O);w.HEAP8.set(G,j);const F=w.readBarcodesFromImage(j,O,m,pe(u),g);w._free(j);const Y=[];for(let N=0;N<F.size();++N){const z=F.get(N);Y.push({...z,format:me(z.format)})}return Y}async function Pr(c,{tryHarder:m=k.tryHarder,formats:u=k.formats,maxSymbols:g=k.maxSymbols}=k,$){const w=await Bt($,ot.getState().zxingModuleOverrides),{data:O,width:G,height:j,data:{byteLength:F}}=c,Y=w._malloc(F);w.HEAP8.set(O,Y);const N=w.readBarcodesFromPixmap(Y,G,j,m,pe(u),g);w._free(Y);const z=[];for(let X=0;X<N.size();++X){const K=N.get(X);z.push({...K,format:me(K.format)})}return z}function pe(c){return c.join("|")}function me(c){const m=ye(c);let u=0,g=he.length-1;for(;u<=g;){const $=Math.floor((u+g)/2),w=he[$],O=ye(w);if(O===m)return w;O<m?u=$+1:g=$-1}return"None"}function ye(c){return c.toLowerCase().replace(/_-\[\]/g,"")}var Ut=(()=>{var c=document.currentScript&&document.currentScript.src||new URL("index.js",document.baseURI).href;return function(m={}){var u=m,g,$;u.ready=new Promise((t,e)=>{g=t,$=e});var w=Object.assign({},u),O="./this.program",G=typeof window=="object",j=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var F="";function Y(t){return u.locateFile?u.locateFile(t,F):F+t}var N;(G||j)&&(j?F=self.location.href:typeof document<"u"&&document.currentScript&&(F=document.currentScript.src),c&&(F=c),F.indexOf("blob:")!==0?F=F.substr(0,F.replace(/[?#].*/,"").lastIndexOf("/")+1):F="",j&&(N=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)})),u.print||console.log.bind(console);var z=u.printErr||console.error.bind(console);Object.assign(u,w),w=null,u.arguments&&u.arguments,u.thisProgram&&(O=u.thisProgram),u.quit&&u.quit;var X;u.wasmBinary&&(X=u.wasmBinary),u.noExitRuntime,typeof WebAssembly!="object"&&Pt("no native wasm support detected");var K,mt=!1,J,B,yt,Tt,U,D,ge,we;function $e(){var t=K.buffer;u.HEAP8=J=new Int8Array(t),u.HEAP16=yt=new Int16Array(t),u.HEAPU8=B=new Uint8Array(t),u.HEAPU16=Tt=new Uint16Array(t),u.HEAP32=U=new Int32Array(t),u.HEAPU32=D=new Uint32Array(t),u.HEAPF32=ge=new Float32Array(t),u.HEAPF64=we=new Float64Array(t)}var be=[],Ce=[],_e=[];function Sr(){if(u.preRun)for(typeof u.preRun=="function"&&(u.preRun=[u.preRun]);u.preRun.length;)Mr(u.preRun.shift());Lt(be)}function Or(){Lt(Ce)}function Fr(){if(u.postRun)for(typeof u.postRun=="function"&&(u.postRun=[u.postRun]);u.postRun.length;)Ir(u.postRun.shift());Lt(_e)}function Mr(t){be.unshift(t)}function jr(t){Ce.unshift(t)}function Ir(t){_e.unshift(t)}var it=0,vt=null;function Rr(t){it++,u.monitorRunDependencies&&u.monitorRunDependencies(it)}function Hr(t){if(it--,u.monitorRunDependencies&&u.monitorRunDependencies(it),it==0&&vt){var e=vt;vt=null,e()}}function Pt(t){u.onAbort&&u.onAbort(t),t="Aborted("+t+")",z(t),mt=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw $(e),e}var Wr="data:application/octet-stream;base64,";function Te(t){return t.startsWith(Wr)}var st;u.locateFile?(st="zxing_reader.wasm",Te(st)||(st=Y(st))):st=new URL("/reader/zxing_reader.wasm",self.location).href;function Pe(t){if(t==st&&X)return new Uint8Array(X);if(N)return N(t);throw"both async and sync fetching of the wasm failed"}function kr(t){return!X&&(G||j)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(e=>{if(!e.ok)throw"failed to load wasm binary file at '"+t+"'";return e.arrayBuffer()}).catch(()=>Pe(t)):Promise.resolve().then(()=>Pe(t))}function Ee(t,e,r){return kr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{z(`failed to asynchronously prepare wasm: ${n}`),Pt(n)})}function Br(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!Te(e)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(a=>{var o=WebAssembly.instantiateStreaming(a,r);return o.then(n,function(i){return z(`wasm streaming compile failed: ${i}`),z("falling back to ArrayBuffer instantiation"),Ee(e,r,n)})}):Ee(e,r,n)}function Ur(){var t={a:$a};function e(n,a){return S=n.exports,K=S.qa,$e(),Be=S.ua,jr(S.ra),Hr(),S}Rr();function r(n){e(n.instance)}if(u.instantiateWasm)try{return u.instantiateWasm(t,e)}catch(n){z(`Module.instantiateWasm callback failed with error: ${n}`),$(n)}return Br(X,st,t,r).catch($),{}}var Lt=t=>{for(;t.length>0;)t.shift()(u)},Et=[],xt=0,Vr=t=>{var e=new At(t);return e.get_caught()||(e.set_caught(!0),xt--),e.set_rethrown(!1),Et.push(e),rr(e.excPtr),e.get_exception_ptr()},tt=0,Lr=()=>{b(0,0);var t=Et.pop();er(t.excPtr),tt=0};function At(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(e){D[this.ptr+4>>2]=e},this.get_type=function(){return D[this.ptr+4>>2]},this.set_destructor=function(e){D[this.ptr+8>>2]=e},this.get_destructor=function(){return D[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,J[this.ptr+12>>0]=e},this.get_caught=function(){return J[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,J[this.ptr+13>>0]=e},this.get_rethrown=function(){return J[this.ptr+13>>0]!=0},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){D[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return D[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=ar(this.get_type());if(e)return D[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}var zr=t=>{throw tt||(tt=t),tt},zt=t=>{var e=tt;if(!e)return _t(0),0;var r=new At(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return _t(0),e;for(var a in t){var o=t[a];if(o===0||o===n)break;var i=r.ptr+16;if(nr(o,n,i))return _t(o),e}return _t(n),e},Yr=()=>zt([]),Nr=t=>zt([t]),Gr=(t,e)=>zt([t,e]),Xr=t=>{var e=new At(t).get_exception_ptr();return e},qr=()=>{var t=Et.pop();t||Pt("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(Et.push(t),t.set_rethrown(!0),t.set_caught(!1),xt++),tt=e,tt},Jr=(t,e,r)=>{var n=new At(t);throw n.init(e,r),tt=t,xt++,tt},Qr=()=>xt,Dt={},xe=t=>{for(;t.length;){var e=t.pop(),r=t.pop();r(e)}};function Yt(t){return this.fromWireType(U[t>>2])}var dt={},ut={},St={},Ae,Ot=t=>{throw new Ae(t)},ct=(t,e,r)=>{t.forEach(function(s){St[s]=e});function n(s){var l=r(s);l.length!==t.length&&Ot("Mismatched type converter count");for(var f=0;f<t.length;++f)et(t[f],l[f])}var a=new Array(e.length),o=[],i=0;e.forEach((s,l)=>{ut.hasOwnProperty(s)?a[l]=ut[s]:(o.push(s),dt.hasOwnProperty(s)||(dt[s]=[]),dt[s].push(()=>{a[l]=ut[s],++i,i===o.length&&n(a)}))}),o.length===0&&n(a)},Zr=t=>{var e=Dt[t];delete Dt[t];var r=e.rawConstructor,n=e.rawDestructor,a=e.fields,o=a.map(i=>i.getterReturnType).concat(a.map(i=>i.setterArgumentType));ct([t],o,i=>{var s={};return a.forEach((l,f)=>{var h=l.fieldName,y=i[f],v=l.getter,T=l.getterContext,x=i[f+a.length],H=l.setter,A=l.setterContext;s[h]={read:W=>y.fromWireType(v(T,W)),write:(W,d)=>{var p=[];H(A,W,x.toWireType(p,d)),xe(p)}}}),[{name:e.name,fromWireType:l=>{var f={};for(var h in s)f[h]=s[h].read(l);return n(l),f},toWireType:(l,f)=>{for(var h in s)if(!(h in f))throw new TypeError(`Missing field: "${h}"`);var y=r();for(h in s)s[h].write(y,f[h]);return l!==null&&l.push(n,y),y},argPackAdvance:rt,readValueFromPointer:Yt,destructorFunction:n}]})},Kr=(t,e,r,n,a)=>{},tn=()=>{for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);De=t},De,V=t=>{for(var e="",r=t;B[r];)e+=De[B[r++]];return e},ht,P=t=>{throw new ht(t)};function en(t,e,r={}){var n=e.name;if(t||P(`type "${n}" must have a positive integer typeid pointer`),ut.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;P(`Cannot register type '${n}' twice`)}if(ut[t]=e,delete St[t],dt.hasOwnProperty(t)){var a=dt[t];delete dt[t],a.forEach(o=>o())}}function et(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return en(t,e,r)}var rt=8,rn=(t,e,r,n)=>{e=V(e),et(t,{name:e,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?r:n},argPackAdvance:rt,readValueFromPointer:function(a){return this.fromWireType(B[a])},destructorFunction:null})},nn=t=>({count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}),Nt=t=>{function e(r){return r.$$.ptrType.registeredClass.name}P(e(t)+" instance already deleted")},Gt=!1,Se=t=>{},an=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},Oe=t=>{t.count.value-=1;var e=t.count.value===0;e&&an(t)},Fe=(t,e,r)=>{if(e===r)return t;if(r.baseClass===void 0)return null;var n=Fe(t,e,r.baseClass);return n===null?null:r.downcast(n)},Me={},on=()=>Object.keys($t).length,sn=()=>{var t=[];for(var e in $t)$t.hasOwnProperty(e)&&t.push($t[e]);return t},gt=[],Xt=()=>{for(;gt.length;){var t=gt.pop();t.$$.deleteScheduled=!1,t.delete()}},wt,un=t=>{wt=t,gt.length&&wt&&wt(Xt)},cn=()=>{u.getInheritedInstanceCount=on,u.getLiveInheritedInstances=sn,u.flushPendingDeletes=Xt,u.setDelayFunction=un},$t={},ln=(t,e)=>{for(e===void 0&&P("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},fn=(t,e)=>(e=ln(t,e),$t[e]),Ft=(t,e)=>{(!e.ptrType||!e.ptr)&&Ot("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&Ot("Both smartPtrType and smartPtr must be specified"),e.count={value:1},bt(Object.create(t,{$$:{value:e}}))};function dn(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=fn(this.registeredClass,e);if(r!==void 0){if(r.$$.count.value===0)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function a(){return this.isSmartPointer?Ft(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):Ft(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var o=this.registeredClass.getActualType(e),i=Me[o];if(!i)return a.call(this);var s;this.isConst?s=i.constPointerType:s=i.pointerType;var l=Fe(e,this.registeredClass,s.registeredClass);return l===null?a.call(this):this.isSmartPointer?Ft(s.registeredClass.instancePrototype,{ptrType:s,ptr:l,smartPtrType:this,smartPtr:t}):Ft(s.registeredClass.instancePrototype,{ptrType:s,ptr:l})}var bt=t=>typeof FinalizationRegistry>"u"?(bt=e=>e,t):(Gt=new FinalizationRegistry(e=>{Oe(e.$$)}),bt=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Gt.register(e,a,e)}return e},Se=e=>Gt.unregister(e),bt(t)),hn=()=>{Object.assign(Mt.prototype,{isAliasOf(t){if(!(this instanceof Mt)||!(t instanceof Mt))return!1;var e=this.$$.ptrType.registeredClass,r=this.$$.ptr;t.$$=t.$$;for(var n=t.$$.ptrType.registeredClass,a=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)a=n.upcast(a),n=n.baseClass;return e===n&&r===a},clone(){if(this.$$.ptr||Nt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=bt(Object.create(Object.getPrototypeOf(this),{$$:{value:nn(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||Nt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&P("Object already scheduled for deletion"),Se(this),Oe(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Nt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&P("Object already scheduled for deletion"),gt.push(this),gt.length===1&&wt&&wt(Xt),this.$$.deleteScheduled=!0,this}})};function Mt(){}var pn=48,mn=57,je=t=>{if(t===void 0)return"_unknown";t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=pn&&e<=mn?`_${t}`:t};function Ie(t,e){return t=je(t),{[t]:function(){return e.apply(this,arguments)}}[t]}var Re=(t,e,r)=>{if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||P(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${t[e].overloadTable})!`),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}},He=(t,e,r)=>{u.hasOwnProperty(t)?((r===void 0||u[t].overloadTable!==void 0&&u[t].overloadTable[r]!==void 0)&&P(`Cannot register public name '${t}' twice`),Re(u,t,t),u.hasOwnProperty(r)&&P(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),u[t].overloadTable[r]=e):(u[t]=e,r!==void 0&&(u[t].numArguments=r))};function yn(t,e,r,n,a,o,i,s){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=i,this.downcast=s,this.pureVirtualFunctions=[]}var qt=(t,e,r)=>{for(;e!==r;)e.upcast||P(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t};function vn(t,e){if(e===null)return this.isReference&&P(`null is not a valid ${this.name}`),0;e.$$||P(`Cannot pass "${Zt(e)}" as a ${this.name}`),e.$$.ptr||P(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=qt(e.$$.ptr,r,this.registeredClass);return n}function gn(t,e){var r;if(e===null)return this.isReference&&P(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;e.$$||P(`Cannot pass "${Zt(e)}" as a ${this.name}`),e.$$.ptr||P(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&P(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);var n=e.$$.ptrType.registeredClass;if(r=qt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&P("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:P(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var a=e.clone();r=this.rawShare(r,at.toHandle(()=>a.delete())),t!==null&&t.push(this.rawDestructor,r)}break;default:P("Unsupporting sharing policy")}return r}function wn(t,e){if(e===null)return this.isReference&&P(`null is not a valid ${this.name}`),0;e.$$||P(`Cannot pass "${Zt(e)}" as a ${this.name}`),e.$$.ptr||P(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&P(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=qt(e.$$.ptr,r,this.registeredClass);return n}function We(t){return this.fromWireType(D[t>>2])}var $n=()=>{Object.assign(jt.prototype,{getPointee(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},destructor(t){this.rawDestructor&&this.rawDestructor(t)},argPackAdvance:rt,readValueFromPointer:We,deleteObject(t){t!==null&&t.delete()},fromWireType:dn})};function jt(t,e,r,n,a,o,i,s,l,f,h){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=i,this.rawGetPointee=s,this.rawConstructor=l,this.rawShare=f,this.rawDestructor=h,!a&&e.baseClass===void 0?n?(this.toWireType=vn,this.destructorFunction=null):(this.toWireType=wn,this.destructorFunction=null):this.toWireType=gn}var ke=(t,e,r)=>{u.hasOwnProperty(t)||Ot("Replacing nonexistant public symbol"),u[t].overloadTable!==void 0&&r!==void 0?u[t].overloadTable[r]=e:(u[t]=e,u[t].argCount=r)},bn=(t,e,r)=>{var n=u["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},It=[],Be,E=t=>{var e=It[t];return e||(t>=It.length&&(It.length=t+1),It[t]=e=Be.get(t)),e},Cn=(t,e,r)=>{if(t.includes("j"))return bn(t,e,r);var n=E(e).apply(null,r);return n},_n=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),Cn(t,e,r)}},Z=(t,e)=>{t=V(t);function r(){return t.includes("j")?_n(t,e):E(e)}var n=r();return typeof n!="function"&&P(`unknown function pointer with signature ${t}: ${e}`),n},Tn=(t,e)=>{var r=Ie(e,function(n){this.name=e,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+`
|
|
2
|
-
`+a.replace(/^Error(:[^\n]*)?\n/,""))});return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},r},Ue,Ve=t=>{var e=tr(t),r=V(e);return nt(e),r},Rt=(t,e)=>{var r=[],n={};function a(o){if(!n[o]&&!ut[o]){if(St[o]){St[o].forEach(a);return}r.push(o),n[o]=!0}}throw e.forEach(a),new Ue(`${t}: `+r.map(Ve).join([", "]))},Pn=(t,e,r,n,a,o,i,s,l,f,h,y,v)=>{h=V(h),o=Z(a,o),s&&(s=Z(i,s)),f&&(f=Z(l,f)),v=Z(y,v);var T=je(h);He(T,function(){Rt(`Cannot construct ${h} due to unbound types`,[n])}),ct([t,e,r],n?[n]:[],function(x){x=x[0];var H,A;n?(H=x.registeredClass,A=H.instancePrototype):A=Mt.prototype;var W=Ie(T,function(){if(Object.getPrototypeOf(this)!==d)throw new ht("Use 'new' to construct "+h);if(p.constructor_body===void 0)throw new ht(h+" has no accessible constructor");var kt=p.constructor_body[arguments.length];if(kt===void 0)throw new ht(`Tried to invoke ctor of ${h} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(p.constructor_body).toString()}) parameters instead!`);return kt.apply(this,arguments)}),d=Object.create(A,{constructor:{value:W}});W.prototype=d;var p=new yn(h,W,d,v,H,o,s,f);p.baseClass&&(p.baseClass.__derivedClasses===void 0&&(p.baseClass.__derivedClasses=[]),p.baseClass.__derivedClasses.push(p));var M=new jt(h,p,!0,!1,!1),I=new jt(h+"*",p,!1,!1,!1),lt=new jt(h+" const*",p,!1,!0,!1);return Me[t]={pointerType:I,constPointerType:lt},ke(T,W),[M,I,lt]})},Jt=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(D[e+n*4>>2]);return r};function Qt(t,e,r,n,a,o){var i=e.length;i<2&&P("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=e[1]!==null&&r!==null,l=!1,f=1;f<e.length;++f)if(e[f]!==null&&e[f].destructorFunction===void 0){l=!0;break}var h=e[0].name!=="void",y=i-2,v=new Array(y),T=[],x=[];return function(){arguments.length!==y&&P(`function ${t} called with ${arguments.length} arguments, expected ${y}`),x.length=0;var H;T.length=s?2:1,T[0]=a,s&&(H=e[1].toWireType(x,this),T[1]=H);for(var A=0;A<y;++A)v[A]=e[A+2].toWireType(x,arguments[A]),T.push(v[A]);var W=n.apply(null,T);function d(p){if(l)xe(x);else for(var M=s?1:2;M<e.length;M++){var I=M===1?H:v[M-2];e[M].destructorFunction!==null&&e[M].destructorFunction(I)}if(h)return e[0].fromWireType(p)}return d(W)}}var En=(t,e,r,n,a,o)=>{var i=Jt(e,r);a=Z(n,a),ct([],[t],function(s){s=s[0];var l=`constructor ${s.name}`;if(s.registeredClass.constructor_body===void 0&&(s.registeredClass.constructor_body=[]),s.registeredClass.constructor_body[e-1]!==void 0)throw new ht(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${s.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return s.registeredClass.constructor_body[e-1]=()=>{Rt(`Cannot construct ${s.name} due to unbound types`,i)},ct([],i,f=>(f.splice(1,0,null),s.registeredClass.constructor_body[e-1]=Qt(l,f,null,a,o),[])),[]})},xn=(t,e,r,n,a,o,i,s,l)=>{var f=Jt(r,n);e=V(e),o=Z(a,o),ct([],[t],function(h){h=h[0];var y=`${h.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&h.registeredClass.pureVirtualFunctions.push(e);function v(){Rt(`Cannot call ${y} due to unbound types`,f)}var T=h.registeredClass.instancePrototype,x=T[e];return x===void 0||x.overloadTable===void 0&&x.className!==h.name&&x.argCount===r-2?(v.argCount=r-2,v.className=h.name,T[e]=v):(Re(T,e,y),T[e].overloadTable[r-2]=v),ct([],f,function(H){var A=Qt(y,H,h,o,i);return T[e].overloadTable===void 0?(A.argCount=r-2,T[e]=A):T[e].overloadTable[r-2]=A,[]}),[]})};function An(){Object.assign(Le.prototype,{get(t){return this.allocated[t]},has(t){return this.allocated[t]!==void 0},allocate(t){var e=this.freelist.pop()||this.allocated.length;return this.allocated[e]=t,e},free(t){this.allocated[t]=void 0,this.freelist.push(t)}})}function Le(){this.allocated=[void 0],this.freelist=[]}var Q=new Le,ze=t=>{t>=Q.reserved&&--Q.get(t).refcount===0&&Q.free(t)},Dn=()=>{for(var t=0,e=Q.reserved;e<Q.allocated.length;++e)Q.allocated[e]!==void 0&&++t;return t},Sn=()=>{Q.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),Q.reserved=Q.allocated.length,u.count_emval_handles=Dn},at={toValue:t=>(t||P("Cannot use deleted val. handle = "+t),Q.get(t).value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Q.allocate({refcount:1,value:t})}}},On=(t,e)=>{e=V(e),et(t,{name:e,fromWireType:r=>{var n=at.toValue(r);return ze(r),n},toWireType:(r,n)=>at.toHandle(n),argPackAdvance:rt,readValueFromPointer:Yt,destructorFunction:null})},Zt=t=>{if(t===null)return"null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t},Fn=(t,e)=>{switch(e){case 4:return function(r){return this.fromWireType(ge[r>>2])};case 8:return function(r){return this.fromWireType(we[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},Mn=(t,e,r)=>{e=V(e),et(t,{name:e,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:rt,readValueFromPointer:Fn(e,r),destructorFunction:null})},jn=(t,e,r,n,a,o,i)=>{var s=Jt(e,r);t=V(t),a=Z(n,a),He(t,function(){Rt(`Cannot call ${t} due to unbound types`,s)},e-1),ct([],s,function(l){var f=[l[0],null].concat(l.slice(1));return ke(t,Qt(t,f,null,a,o),e-1),[]})},In=(t,e,r)=>{switch(e){case 1:return r?n=>J[n>>0]:n=>B[n>>0];case 2:return r?n=>yt[n>>1]:n=>Tt[n>>1];case 4:return r?n=>U[n>>2]:n=>D[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Rn=(t,e,r,n,a)=>{e=V(e);var o=h=>h;if(n===0){var i=32-8*r;o=h=>h<<i>>>i}var s=e.includes("unsigned"),l=(h,y)=>{},f;s?f=function(h,y){return l(y,this.name),y>>>0}:f=function(h,y){return l(y,this.name),y},et(t,{name:e,fromWireType:o,toWireType:f,argPackAdvance:rt,readValueFromPointer:In(e,r,n!==0),destructorFunction:null})},Hn=(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function o(i){var s=D[i>>2],l=D[i+4>>2];return new a(J.buffer,l,s)}r=V(r),et(t,{name:r,fromWireType:o,argPackAdvance:rt,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},Ye=(t,e,r,n)=>{if(!(n>0))return 0;for(var a=r,o=r+n-1,i=0;i<t.length;++i){var s=t.charCodeAt(i);if(s>=55296&&s<=57343){var l=t.charCodeAt(++i);s=65536+((s&1023)<<10)|l&1023}if(s<=127){if(r>=o)break;e[r++]=s}else if(s<=2047){if(r+1>=o)break;e[r++]=192|s>>6,e[r++]=128|s&63}else if(s<=65535){if(r+2>=o)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|s&63}else{if(r+3>=o)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|s&63}}return e[r]=0,r-a},Wn=(t,e,r)=>Ye(t,B,e,r),Ne=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e},Ge=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,kn=(t,e,r)=>{for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&Ge)return Ge.decode(t.subarray(e,a));for(var o="";e<a;){var i=t[e++];if(!(i&128)){o+=String.fromCharCode(i);continue}var s=t[e++]&63;if((i&224)==192){o+=String.fromCharCode((i&31)<<6|s);continue}var l=t[e++]&63;if((i&240)==224?i=(i&15)<<12|s<<6|l:i=(i&7)<<18|s<<12|l<<6|t[e++]&63,i<65536)o+=String.fromCharCode(i);else{var f=i-65536;o+=String.fromCharCode(55296|f>>10,56320|f&1023)}}return o},Kt=(t,e)=>t?kn(B,t,e):"",Bn=(t,e)=>{e=V(e);var r=e==="std::string";et(t,{name:e,fromWireType(n){var a=D[n>>2],o=n+4,i;if(r)for(var s=o,l=0;l<=a;++l){var f=o+l;if(l==a||B[f]==0){var h=f-s,y=Kt(s,h);i===void 0?i=y:(i+=String.fromCharCode(0),i+=y),s=f+1}}else{for(var v=new Array(a),l=0;l<a;++l)v[l]=String.fromCharCode(B[o+l]);i=v.join("")}return nt(n),i},toWireType(n,a){a instanceof ArrayBuffer&&(a=new Uint8Array(a));var o,i=typeof a=="string";i||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int8Array||P("Cannot pass non-string to std::string"),r&&i?o=Ne(a):o=a.length;var s=ee(4+o+1),l=s+4;if(D[s>>2]=o,r&&i)Wn(a,l,o+1);else if(i)for(var f=0;f<o;++f){var h=a.charCodeAt(f);h>255&&(nt(l),P("String has UTF-16 code units that do not fit in 8 bits")),B[l+f]=h}else for(var f=0;f<o;++f)B[l+f]=a[f];return n!==null&&n.push(nt,s),s},argPackAdvance:rt,readValueFromPointer:We,destructorFunction(n){nt(n)}})},Xe=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Un=(t,e)=>{for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&Tt[n];)++n;if(r=n<<1,r-t>32&&Xe)return Xe.decode(B.subarray(t,r));for(var o="",i=0;!(i>=e/2);++i){var s=yt[t+i*2>>1];if(s==0)break;o+=String.fromCharCode(s)}return o},Vn=(t,e,r)=>{if(r===void 0&&(r=2147483647),r<2)return 0;r-=2;for(var n=e,a=r<t.length*2?r/2:t.length,o=0;o<a;++o){var i=t.charCodeAt(o);yt[e>>1]=i,e+=2}return yt[e>>1]=0,e-n},Ln=t=>t.length*2,zn=(t,e)=>{for(var r=0,n="";!(r>=e/4);){var a=U[t+r*4>>2];if(a==0)break;if(++r,a>=65536){var o=a-65536;n+=String.fromCharCode(55296|o>>10,56320|o&1023)}else n+=String.fromCharCode(a)}return n},Yn=(t,e,r)=>{if(r===void 0&&(r=2147483647),r<4)return 0;for(var n=e,a=n+r-4,o=0;o<t.length;++o){var i=t.charCodeAt(o);if(i>=55296&&i<=57343){var s=t.charCodeAt(++o);i=65536+((i&1023)<<10)|s&1023}if(U[e>>2]=i,e+=4,e+4>a)break}return U[e>>2]=0,e-n},Nn=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e},Gn=(t,e,r)=>{r=V(r);var n,a,o,i,s;e===2?(n=Un,a=Vn,i=Ln,o=()=>Tt,s=1):e===4&&(n=zn,a=Yn,i=Nn,o=()=>D,s=2),et(t,{name:r,fromWireType:l=>{for(var f=D[l>>2],h=o(),y,v=l+4,T=0;T<=f;++T){var x=l+4+T*e;if(T==f||h[x>>s]==0){var H=x-v,A=n(v,H);y===void 0?y=A:(y+=String.fromCharCode(0),y+=A),v=x+e}}return nt(l),y},toWireType:(l,f)=>{typeof f!="string"&&P(`Cannot pass non-string to C++ string type ${r}`);var h=i(f),y=ee(4+h+e);return D[y>>2]=h>>s,a(f,y+4,h+e),l!==null&&l.push(nt,y),y},argPackAdvance:rt,readValueFromPointer:Yt,destructorFunction(l){nt(l)}})},Xn=(t,e,r,n,a,o)=>{Dt[t]={name:V(e),rawConstructor:Z(r,n),rawDestructor:Z(a,o),fields:[]}},qn=(t,e,r,n,a,o,i,s,l,f)=>{Dt[t].fields.push({fieldName:V(e),getterReturnType:r,getter:Z(n,a),getterContext:o,setterArgumentType:i,setter:Z(s,l),setterContext:f})},Jn=(t,e)=>{e=V(e),et(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},Qn={},Zn=t=>{var e=Qn[t];return e===void 0?V(t):e},qe=()=>{if(typeof globalThis=="object")return globalThis;function t(e){e.$$$embind_global$$$=e;var r=typeof $$$embind_global$$$=="object"&&e.$$$embind_global$$$==e;return r||delete e.$$$embind_global$$$,r}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&t(global)?$$$embind_global$$$=global:typeof self=="object"&&t(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},Kn=t=>t===0?at.toHandle(qe()):(t=Zn(t),at.toHandle(qe()[t])),ta=t=>{t>4&&(Q.get(t).refcount+=1)},Je=(t,e)=>{var r=ut[t];return r===void 0&&P(e+" has unknown type "+Ve(t)),r},ea=t=>{var e=new Array(t+1);return function(r,n,a){e[0]=r;for(var o=0;o<t;++o){var i=Je(D[n+o*4>>2],"parameter "+o);e[o+1]=i.readValueFromPointer(a),a+=i.argPackAdvance}var s=new(r.bind.apply(r,e));return at.toHandle(s)}},Qe={},ra=(t,e,r,n)=>{t=at.toValue(t);var a=Qe[e];return a||(a=ea(e),Qe[e]=a),a(t,r,n)},na=(t,e)=>{t=Je(t,"_emval_take_value");var r=t.readValueFromPointer(e);return at.toHandle(r)},aa=()=>{Pt("")},oa=(t,e,r)=>B.copyWithin(t,e,e+r),ia=()=>2147483648,sa=t=>{var e=K.buffer,r=(t-e.byteLength+65535)/65536;try{return K.grow(r),$e(),1}catch{}},ua=t=>{var e=B.length;t>>>=0;var r=ia();if(t>r)return!1;for(var n=(l,f)=>l+(f-l%f)%f,a=1;a<=4;a*=2){var o=e*(1+.2/a);o=Math.min(o,t+100663296);var i=Math.min(r,n(Math.max(t,o),65536)),s=sa(i);if(s)return!0}return!1},te={},ca=()=>O||"./this.program",Ct=()=>{if(!Ct.strings){var t=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:t,_:ca()};for(var r in te)te[r]===void 0?delete e[r]:e[r]=te[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);Ct.strings=n}return Ct.strings},la=(t,e)=>{for(var r=0;r<t.length;++r)J[e++>>0]=t.charCodeAt(r);J[e>>0]=0},fa=(t,e)=>{var r=0;return Ct().forEach((n,a)=>{var o=e+r;D[t+a*4>>2]=o,la(n,o),r+=n.length+1}),0},da=(t,e)=>{var r=Ct();D[t>>2]=r.length;var n=0;return r.forEach(a=>n+=a.length+1),D[e>>2]=n,0},ha=t=>t,Ht=t=>t%4===0&&(t%100!==0||t%400===0),pa=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},Ze=[31,29,31,30,31,30,31,31,30,31,30,31],Ke=[31,28,31,30,31,30,31,31,30,31,30,31],ma=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=Ht(r.getFullYear()),a=r.getMonth(),o=(n?Ze:Ke)[a];if(e>o-r.getDate())e-=o-r.getDate()+1,r.setDate(1),a<11?r.setMonth(a+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1));else return r.setDate(r.getDate()+e),r}return r};function ya(t,e,r){var n=r>0?r:Ne(t)+1,a=new Array(n),o=Ye(t,a,0,a.length);return e&&(a.length=o),a}var va=(t,e)=>{J.set(t,e)},ga=(t,e,r,n)=>{var a=D[n+40>>2],o={tm_sec:U[n>>2],tm_min:U[n+4>>2],tm_hour:U[n+8>>2],tm_mday:U[n+12>>2],tm_mon:U[n+16>>2],tm_year:U[n+20>>2],tm_wday:U[n+24>>2],tm_yday:U[n+28>>2],tm_isdst:U[n+32>>2],tm_gmtoff:U[n+36>>2],tm_zone:a?Kt(a):""},i=Kt(r),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in s)i=i.replace(new RegExp(l,"g"),s[l]);var f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h=["January","February","March","April","May","June","July","August","September","October","November","December"];function y(d,p,M){for(var I=typeof d=="number"?d.toString():d||"";I.length<p;)I=M[0]+I;return I}function v(d,p){return y(d,p,"0")}function T(d,p){function M(lt){return lt<0?-1:lt>0?1:0}var I;return(I=M(d.getFullYear()-p.getFullYear()))===0&&(I=M(d.getMonth()-p.getMonth()))===0&&(I=M(d.getDate()-p.getDate())),I}function x(d){switch(d.getDay()){case 0:return new Date(d.getFullYear()-1,11,29);case 1:return d;case 2:return new Date(d.getFullYear(),0,3);case 3:return new Date(d.getFullYear(),0,2);case 4:return new Date(d.getFullYear(),0,1);case 5:return new Date(d.getFullYear()-1,11,31);case 6:return new Date(d.getFullYear()-1,11,30)}}function H(d){var p=ma(new Date(d.tm_year+1900,0,1),d.tm_yday),M=new Date(p.getFullYear(),0,4),I=new Date(p.getFullYear()+1,0,4),lt=x(M),kt=x(I);return T(lt,p)<=0?T(kt,p)<=0?p.getFullYear()+1:p.getFullYear():p.getFullYear()-1}var A={"%a":d=>f[d.tm_wday].substring(0,3),"%A":d=>f[d.tm_wday],"%b":d=>h[d.tm_mon].substring(0,3),"%B":d=>h[d.tm_mon],"%C":d=>{var p=d.tm_year+1900;return v(p/100|0,2)},"%d":d=>v(d.tm_mday,2),"%e":d=>y(d.tm_mday,2," "),"%g":d=>H(d).toString().substring(2),"%G":d=>H(d),"%H":d=>v(d.tm_hour,2),"%I":d=>{var p=d.tm_hour;return p==0?p=12:p>12&&(p-=12),v(p,2)},"%j":d=>v(d.tm_mday+pa(Ht(d.tm_year+1900)?Ze:Ke,d.tm_mon-1),3),"%m":d=>v(d.tm_mon+1,2),"%M":d=>v(d.tm_min,2),"%n":()=>`
|
|
3
|
-
`,"%p":d=>d.tm_hour>=0&&d.tm_hour<12?"AM":"PM","%S":d=>v(d.tm_sec,2),"%t":()=>" ","%u":d=>d.tm_wday||7,"%U":d=>{var p=d.tm_yday+7-d.tm_wday;return v(Math.floor(p/7),2)},"%V":d=>{var p=Math.floor((d.tm_yday+7-(d.tm_wday+6)%7)/7);if((d.tm_wday+371-d.tm_yday-2)%7<=2&&p++,p){if(p==53){var M=(d.tm_wday+371-d.tm_yday)%7;M!=4&&(M!=3||!Ht(d.tm_year))&&(p=1)}}else{p=52;var I=(d.tm_wday+7-d.tm_yday-1)%7;(I==4||I==5&&Ht(d.tm_year%400-1))&&p++}return v(p,2)},"%w":d=>d.tm_wday,"%W":d=>{var p=d.tm_yday+7-(d.tm_wday+6)%7;return v(Math.floor(p/7),2)},"%y":d=>(d.tm_year+1900).toString().substring(2),"%Y":d=>d.tm_year+1900,"%z":d=>{var p=d.tm_gmtoff,M=p>=0;return p=Math.abs(p)/60,p=p/60*100+p%60,(M?"+":"-")+("0000"+p).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};i=i.replace(/%%/g,"\0\0");for(var l in A)i.includes(l)&&(i=i.replace(new RegExp(l,"g"),A[l](o)));i=i.replace(/\0\0/g,"%");var W=
|
|
1
|
+
var lr=(R,V,q)=>{if(!V.has(R))throw TypeError("Cannot "+q)};var ne=(R,V,q)=>(lr(R,V,"read from private field"),q?q.call(R):V.get(R)),fr=(R,V,q)=>{if(V.has(R))throw TypeError("Cannot add the same private member more than once");V instanceof WeakSet?V.add(R):V.set(R,q)},dr=(R,V,q,pt)=>(lr(R,V,"write to private field"),pt?pt.call(R,q):V.set(R,q),q);var BarcodeDetectionAPI=function(R){var ft;"use strict";const V=["aztec","code_128","code_39","code_93","codabar","data_matrix","ean_13","ean_8","itf","pdf417","qr_code","upc_a","upc_e","unknown"];function q(c){if(pt(c))return{width:c.naturalWidth,height:c.naturalHeight};if(ae(c))return{width:c.width.baseVal.value,height:c.height.baseVal.value};if(oe(c))return{width:c.videoWidth,height:c.videoHeight};if(se(c))return{width:c.width,height:c.height};if(ce(c))return{width:c.displayWidth,height:c.displayHeight};if(ie(c))return{width:c.width,height:c.height};if(ue(c))return{width:c.width,height:c.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}function pt(c){try{return c instanceof HTMLImageElement}catch{return!1}}function ae(c){try{return c instanceof SVGImageElement}catch{return!1}}function oe(c){try{return c instanceof HTMLVideoElement}catch{return!1}}function ie(c){try{return c instanceof HTMLCanvasElement}catch{return!1}}function se(c){try{return c instanceof ImageBitmap}catch{return!1}}function ue(c){try{return c instanceof OffscreenCanvas}catch{return!1}}function ce(c){try{return c instanceof VideoFrame}catch{return!1}}function le(c){try{return c instanceof Blob}catch{return!1}}function hr(c){try{return c instanceof ImageData}catch{return!1}}function pr(c,m){try{const u=new OffscreenCanvas(c,m);if(u.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return u;throw void 0}catch{const u=document.createElement("canvas");return u.width=c,u.height=m,u}}async function fe(c){if(pt(c)&&!await gr(c))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(ae(c)&&!await wr(c))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(ce(c)&&$r(c))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(oe(c)&&(c.readyState===0||c.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(se(c)&&Cr(c))throw new DOMException("The image source is detached.","InvalidStateError");const{width:m,height:u}=q(c);if(m===0||u===0)return null;const $=pr(m,u).getContext("2d");$.drawImage(c,0,0);try{return $.getImageData(0,0,m,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function mr(c){let m;try{if(createImageBitmap)m=await createImageBitmap(c);else if(Image){m=new Image;let g="";try{g=URL.createObjectURL(c),m.src=g,await m.decode()}finally{URL.revokeObjectURL(g)}}else return c}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await fe(m)}function yr(c){const{width:m,height:u}=c;if(m===0||u===0)return null;const g=c.getContext("2d");try{return g.getImageData(0,0,m,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function vr(c){if(le(c))return await mr(c);if(hr(c)){if(br(c))throw new DOMException("The image data has been detached.","InvalidStateError");return c}return ie(c)||ue(c)?yr(c):await fe(c)}async function gr(c){try{return await c.decode(),!0}catch{return!1}}async function wr(c){var m;try{return await((m=c.decode)==null?void 0:m.call(c)),!0}catch{return!1}}function $r(c){return c.format===null}function br(c){return c.data.buffer.byteLength===0}function Cr(c){return c.width===0&&c.height===0}function de(c,m){return c instanceof DOMException?new DOMException(`${m}: ${c.message}`,c.name):c instanceof Error?new c.constructor(`${m}: ${c.message}`):new Error(`${m}: ${c}`)}const he=c=>{let m;const u=new Set,g=(O,G)=>{const j=typeof O=="function"?O(m):O;if(!Object.is(j,m)){const F=m;m=G??typeof j!="object"?j:Object.assign({},m,j),u.forEach(z=>z(m,F))}},$=()=>m,w={setState:g,getState:$,subscribe:O=>(u.add(O),()=>u.delete(O)),destroy:()=>{u.clear()}};return m=c(g,$,w),w},_r=c=>c?he(c):he,Tr={locateFile:(c,m)=>{var u;const g=(u=c.match(/_(.+?)\.wasm$/))==null?void 0:u[1];return g?`https://fastly.jsdelivr.net/npm/@sec-ant/zxing-wasm@2.1.6/dist/${g}/${c}`:m+c}},ot=_r()(()=>({zxingModuleWeakMap:new WeakMap,zxingModuleOverrides:Tr}));function Pr(c){ot.setState({zxingModuleOverrides:c})}function Bt(c,m=ot.getState().zxingModuleOverrides){const{zxingModuleWeakMap:u}=ot.getState(),g=u.get(c);if(g&&Object.is(m,ot.getState().zxingModuleOverrides))return g;{ot.setState({zxingModuleOverrides:m});const $=c(m);return u.set(c,$),$}}const pe=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","UPC-A","UPC-E"],k={tryHarder:!0,formats:[],maxSymbols:255};async function Er(c,{tryHarder:m=k.tryHarder,formats:u=k.formats,maxSymbols:g=k.maxSymbols}=k,$){const w=await Bt($,ot.getState().zxingModuleOverrides),{size:O}=c,G=new Uint8Array(await c.arrayBuffer()),j=w._malloc(O);w.HEAPU8.set(G,j);const F=w.readBarcodesFromImage(j,O,m,me(u),g);w._free(j);const z=[];for(let Y=0;Y<F.size();++Y){const L=F.get(Y);z.push({...L,format:ye(L.format)})}return z}async function xr(c,{tryHarder:m=k.tryHarder,formats:u=k.formats,maxSymbols:g=k.maxSymbols}=k,$){const w=await Bt($,ot.getState().zxingModuleOverrides),{data:O,width:G,height:j,data:{byteLength:F}}=c,z=w._malloc(F);w.HEAPU8.set(O,z);const Y=w.readBarcodesFromPixmap(z,G,j,m,me(u),g);w._free(z);const L=[];for(let X=0;X<Y.size();++X){const K=Y.get(X);L.push({...K,format:ye(K.format)})}return L}function me(c){return c.join("|")}function ye(c){const m=ve(c);let u=0,g=pe.length-1;for(;u<=g;){const $=Math.floor((u+g)/2),w=pe[$],O=ve(w);if(O===m)return w;O<m?u=$+1:g=$-1}return"None"}function ve(c){return c.toLowerCase().replace(/_-\[\]/g,"")}var Ut=(()=>{var c=document.currentScript&&document.currentScript.src||new URL("index.js",document.baseURI).href;return function(m={}){var u=m,g,$;u.ready=new Promise((t,e)=>{g=t,$=e});var w=Object.assign({},u),O="./this.program",G=typeof window=="object",j=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var F="";function z(t){return u.locateFile?u.locateFile(t,F):F+t}var Y;(G||j)&&(j?F=self.location.href:typeof document<"u"&&document.currentScript&&(F=document.currentScript.src),c&&(F=c),F.indexOf("blob:")!==0?F=F.substr(0,F.replace(/[?#].*/,"").lastIndexOf("/")+1):F="",j&&(Y=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)})),u.print||console.log.bind(console);var L=u.printErr||console.error.bind(console);Object.assign(u,w),w=null,u.arguments&&u.arguments,u.thisProgram&&(O=u.thisProgram),u.quit&&u.quit;var X;u.wasmBinary&&(X=u.wasmBinary),typeof WebAssembly!="object"&>("no native wasm support detected");var K,mt=!1;function Lt(t,e){t||gt(e)}var J,N,yt,Pt,B,D,we,$e;function be(){var t=K.buffer;u.HEAP8=J=new Int8Array(t),u.HEAP16=yt=new Int16Array(t),u.HEAPU8=N=new Uint8Array(t),u.HEAPU16=Pt=new Uint16Array(t),u.HEAP32=B=new Int32Array(t),u.HEAPU32=D=new Uint32Array(t),u.HEAPF32=we=new Float32Array(t),u.HEAPF64=$e=new Float64Array(t)}var Ce=[],_e=[],Te=[];function Fr(){if(u.preRun)for(typeof u.preRun=="function"&&(u.preRun=[u.preRun]);u.preRun.length;)Ir(u.preRun.shift());zt(Ce)}function Mr(){zt(_e)}function jr(){if(u.postRun)for(typeof u.postRun=="function"&&(u.postRun=[u.postRun]);u.postRun.length;)Hr(u.postRun.shift());zt(Te)}function Ir(t){Ce.unshift(t)}function Rr(t){_e.unshift(t)}function Hr(t){Te.unshift(t)}var it=0,vt=null;function Wr(t){it++,u.monitorRunDependencies&&u.monitorRunDependencies(it)}function kr(t){if(it--,u.monitorRunDependencies&&u.monitorRunDependencies(it),it==0&&vt){var e=vt;vt=null,e()}}function gt(t){u.onAbort&&u.onAbort(t),t="Aborted("+t+")",L(t),mt=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw $(e),e}var Br="data:application/octet-stream;base64,",Pe=t=>t.startsWith(Br),st;u.locateFile?(st="zxing_reader.wasm",Pe(st)||(st=z(st))):st=new URL("/reader/zxing_reader.wasm",self.location).href;function Ee(t){if(t==st&&X)return new Uint8Array(X);if(Y)return Y(t);throw"both async and sync fetching of the wasm failed"}function Ur(t){return!X&&(G||j)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(e=>{if(!e.ok)throw"failed to load wasm binary file at '"+t+"'";return e.arrayBuffer()}).catch(()=>Ee(t)):Promise.resolve().then(()=>Ee(t))}function xe(t,e,r){return Ur(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{L(`failed to asynchronously prepare wasm: ${n}`),gt(n)})}function Vr(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!Pe(e)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(a=>{var o=WebAssembly.instantiateStreaming(a,r);return o.then(n,function(i){return L(`wasm streaming compile failed: ${i}`),L("falling back to ArrayBuffer instantiation"),xe(e,r,n)})}):xe(e,r,n)}function Lr(){var t={a:Ca};function e(n,a){return S=n.exports,K=S.ra,be(),Ue=S.va,Rr(S.sa),kr(),S}Wr();function r(n){e(n.instance)}if(u.instantiateWasm)try{return u.instantiateWasm(t,e)}catch(n){L(`Module.instantiateWasm callback failed with error: ${n}`),$(n)}return Vr(X,st,t,r).catch($),{}}var zt=t=>{for(;t.length>0;)t.shift()(u)};u.noExitRuntime;var Et=[],xt=0,zr=t=>{var e=new At(t);return e.get_caught()||(e.set_caught(!0),xt--),e.set_rethrown(!1),Et.push(e),ar(e.excPtr),e.get_exception_ptr()},tt=0,Yr=()=>{b(0,0);var t=Et.pop();nr(t.excPtr),tt=0};function At(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(e){D[this.ptr+4>>2]=e},this.get_type=function(){return D[this.ptr+4>>2]},this.set_destructor=function(e){D[this.ptr+8>>2]=e},this.get_destructor=function(){return D[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,J[this.ptr+12>>0]=e},this.get_caught=function(){return J[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,J[this.ptr+13>>0]=e},this.get_rethrown=function(){return J[this.ptr+13>>0]!=0},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){D[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return D[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=ir(this.get_type());if(e)return D[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}var Nr=t=>{throw tt||(tt=t),tt},Yt=t=>{var e=tt;if(!e)return Tt(0),0;var r=new At(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return Tt(0),e;for(var a in t){var o=t[a];if(o===0||o===n)break;var i=r.ptr+16;if(or(o,n,i))return Tt(o),e}return Tt(n),e},Gr=()=>Yt([]),Xr=t=>Yt([t]),qr=(t,e)=>Yt([t,e]),Jr=t=>{var e=new At(t).get_exception_ptr();return e},Qr=()=>{var t=Et.pop();t||gt("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(Et.push(t),t.set_rethrown(!0),t.set_caught(!1),xt++),tt=e,tt},Zr=(t,e,r)=>{var n=new At(t);throw n.init(e,r),tt=t,xt++,tt},Kr=()=>xt,Dt={},Ae=t=>{for(;t.length;){var e=t.pop(),r=t.pop();r(e)}};function Nt(t){return this.fromWireType(B[t>>2])}var dt={},ut={},St={},De,Ot=t=>{throw new De(t)},ct=(t,e,r)=>{t.forEach(function(s){St[s]=e});function n(s){var l=r(s);l.length!==t.length&&Ot("Mismatched type converter count");for(var f=0;f<t.length;++f)et(t[f],l[f])}var a=new Array(e.length),o=[],i=0;e.forEach((s,l)=>{ut.hasOwnProperty(s)?a[l]=ut[s]:(o.push(s),dt.hasOwnProperty(s)||(dt[s]=[]),dt[s].push(()=>{a[l]=ut[s],++i,i===o.length&&n(a)}))}),o.length===0&&n(a)},tn=t=>{var e=Dt[t];delete Dt[t];var r=e.rawConstructor,n=e.rawDestructor,a=e.fields,o=a.map(i=>i.getterReturnType).concat(a.map(i=>i.setterArgumentType));ct([t],o,i=>{var s={};return a.forEach((l,f)=>{var h=l.fieldName,y=i[f],v=l.getter,P=l.getterContext,x=i[f+a.length],H=l.setter,A=l.setterContext;s[h]={read:W=>y.fromWireType(v(P,W)),write:(W,d)=>{var p=[];H(A,W,x.toWireType(p,d)),Ae(p)}}}),[{name:e.name,fromWireType:l=>{var f={};for(var h in s)f[h]=s[h].read(l);return n(l),f},toWireType:(l,f)=>{for(var h in s)if(!(h in f))throw new TypeError(`Missing field: "${h}"`);var y=r();for(h in s)s[h].write(y,f[h]);return l!==null&&l.push(n,y),y},argPackAdvance:rt,readValueFromPointer:Nt,destructorFunction:n}]})},en=(t,e,r,n,a)=>{},rn=()=>{for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);Se=t},Se,U=t=>{for(var e="",r=t;N[r];)e+=Se[N[r++]];return e},ht,E=t=>{throw new ht(t)};function nn(t,e,r={}){var n=e.name;if(t||E(`type "${n}" must have a positive integer typeid pointer`),ut.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;E(`Cannot register type '${n}' twice`)}if(ut[t]=e,delete St[t],dt.hasOwnProperty(t)){var a=dt[t];delete dt[t],a.forEach(o=>o())}}function et(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return nn(t,e,r)}var rt=8,an=(t,e,r,n)=>{e=U(e),et(t,{name:e,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?r:n},argPackAdvance:rt,readValueFromPointer:function(a){return this.fromWireType(N[a])},destructorFunction:null})},on=t=>({count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}),Gt=t=>{function e(r){return r.$$.ptrType.registeredClass.name}E(e(t)+" instance already deleted")},Xt=!1,Oe=t=>{},sn=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},Fe=t=>{t.count.value-=1;var e=t.count.value===0;e&&sn(t)},Me=(t,e,r)=>{if(e===r)return t;if(r.baseClass===void 0)return null;var n=Me(t,e,r.baseClass);return n===null?null:r.downcast(n)},je={},un=()=>Object.keys(bt).length,cn=()=>{var t=[];for(var e in bt)bt.hasOwnProperty(e)&&t.push(bt[e]);return t},wt=[],qt=()=>{for(;wt.length;){var t=wt.pop();t.$$.deleteScheduled=!1,t.delete()}},$t,ln=t=>{$t=t,wt.length&&$t&&$t(qt)},fn=()=>{u.getInheritedInstanceCount=un,u.getLiveInheritedInstances=cn,u.flushPendingDeletes=qt,u.setDelayFunction=ln},bt={},dn=(t,e)=>{for(e===void 0&&E("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},hn=(t,e)=>(e=dn(t,e),bt[e]),Ft=(t,e)=>{(!e.ptrType||!e.ptr)&&Ot("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&Ot("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Ct(Object.create(t,{$$:{value:e}}))};function pn(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=hn(this.registeredClass,e);if(r!==void 0){if(r.$$.count.value===0)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function a(){return this.isSmartPointer?Ft(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):Ft(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var o=this.registeredClass.getActualType(e),i=je[o];if(!i)return a.call(this);var s;this.isConst?s=i.constPointerType:s=i.pointerType;var l=Me(e,this.registeredClass,s.registeredClass);return l===null?a.call(this):this.isSmartPointer?Ft(s.registeredClass.instancePrototype,{ptrType:s,ptr:l,smartPtrType:this,smartPtr:t}):Ft(s.registeredClass.instancePrototype,{ptrType:s,ptr:l})}var Ct=t=>typeof FinalizationRegistry>"u"?(Ct=e=>e,t):(Xt=new FinalizationRegistry(e=>{Fe(e.$$)}),Ct=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Xt.register(e,a,e)}return e},Oe=e=>Xt.unregister(e),Ct(t)),mn=()=>{Object.assign(Mt.prototype,{isAliasOf(t){if(!(this instanceof Mt)||!(t instanceof Mt))return!1;var e=this.$$.ptrType.registeredClass,r=this.$$.ptr;t.$$=t.$$;for(var n=t.$$.ptrType.registeredClass,a=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)a=n.upcast(a),n=n.baseClass;return e===n&&r===a},clone(){if(this.$$.ptr||Gt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=Ct(Object.create(Object.getPrototypeOf(this),{$$:{value:on(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||Gt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&E("Object already scheduled for deletion"),Oe(this),Fe(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Gt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&E("Object already scheduled for deletion"),wt.push(this),wt.length===1&&$t&&$t(qt),this.$$.deleteScheduled=!0,this}})};function Mt(){}var yn=48,vn=57,Ie=t=>{if(t===void 0)return"_unknown";t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=yn&&e<=vn?`_${t}`:t};function Re(t,e){return t=Ie(t),{[t]:function(){return e.apply(this,arguments)}}[t]}var He=(t,e,r)=>{if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||E(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${t[e].overloadTable})!`),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}},We=(t,e,r)=>{u.hasOwnProperty(t)?((r===void 0||u[t].overloadTable!==void 0&&u[t].overloadTable[r]!==void 0)&&E(`Cannot register public name '${t}' twice`),He(u,t,t),u.hasOwnProperty(r)&&E(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),u[t].overloadTable[r]=e):(u[t]=e,r!==void 0&&(u[t].numArguments=r))};function gn(t,e,r,n,a,o,i,s){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=i,this.downcast=s,this.pureVirtualFunctions=[]}var Jt=(t,e,r)=>{for(;e!==r;)e.upcast||E(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t};function wn(t,e){if(e===null)return this.isReference&&E(`null is not a valid ${this.name}`),0;e.$$||E(`Cannot pass "${Kt(e)}" as a ${this.name}`),e.$$.ptr||E(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Jt(e.$$.ptr,r,this.registeredClass);return n}function $n(t,e){var r;if(e===null)return this.isReference&&E(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;e.$$||E(`Cannot pass "${Kt(e)}" as a ${this.name}`),e.$$.ptr||E(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&E(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);var n=e.$$.ptrType.registeredClass;if(r=Jt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&E("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:E(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var a=e.clone();r=this.rawShare(r,at.toHandle(()=>a.delete())),t!==null&&t.push(this.rawDestructor,r)}break;default:E("Unsupporting sharing policy")}return r}function bn(t,e){if(e===null)return this.isReference&&E(`null is not a valid ${this.name}`),0;e.$$||E(`Cannot pass "${Kt(e)}" as a ${this.name}`),e.$$.ptr||E(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&E(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Jt(e.$$.ptr,r,this.registeredClass);return n}function ke(t){return this.fromWireType(D[t>>2])}var Cn=()=>{Object.assign(jt.prototype,{getPointee(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},destructor(t){this.rawDestructor&&this.rawDestructor(t)},argPackAdvance:rt,readValueFromPointer:ke,deleteObject(t){t!==null&&t.delete()},fromWireType:pn})};function jt(t,e,r,n,a,o,i,s,l,f,h){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=i,this.rawGetPointee=s,this.rawConstructor=l,this.rawShare=f,this.rawDestructor=h,!a&&e.baseClass===void 0?n?(this.toWireType=wn,this.destructorFunction=null):(this.toWireType=bn,this.destructorFunction=null):this.toWireType=$n}var Be=(t,e,r)=>{u.hasOwnProperty(t)||Ot("Replacing nonexistant public symbol"),u[t].overloadTable!==void 0&&r!==void 0?u[t].overloadTable[r]=e:(u[t]=e,u[t].argCount=r)},_n=(t,e,r)=>{var n=u["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},It=[],Ue,T=t=>{var e=It[t];return e||(t>=It.length&&(It.length=t+1),It[t]=e=Ue.get(t)),e},Tn=(t,e,r)=>{if(t.includes("j"))return _n(t,e,r);var n=T(e).apply(null,r);return n},Pn=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),Tn(t,e,r)}},Z=(t,e)=>{t=U(t);function r(){return t.includes("j")?Pn(t,e):T(e)}var n=r();return typeof n!="function"&&E(`unknown function pointer with signature ${t}: ${e}`),n},En=(t,e)=>{var r=Re(e,function(n){this.name=e,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+`
|
|
2
|
+
`+a.replace(/^Error(:[^\n]*)?\n/,""))});return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},r},Ve,Le=t=>{var e=rr(t),r=U(e);return nt(e),r},Rt=(t,e)=>{var r=[],n={};function a(o){if(!n[o]&&!ut[o]){if(St[o]){St[o].forEach(a);return}r.push(o),n[o]=!0}}throw e.forEach(a),new Ve(`${t}: `+r.map(Le).join([", "]))},xn=(t,e,r,n,a,o,i,s,l,f,h,y,v)=>{h=U(h),o=Z(a,o),s&&(s=Z(i,s)),f&&(f=Z(l,f)),v=Z(y,v);var P=Ie(h);We(P,function(){Rt(`Cannot construct ${h} due to unbound types`,[n])}),ct([t,e,r],n?[n]:[],function(x){x=x[0];var H,A;n?(H=x.registeredClass,A=H.instancePrototype):A=Mt.prototype;var W=Re(P,function(){if(Object.getPrototypeOf(this)!==d)throw new ht("Use 'new' to construct "+h);if(p.constructor_body===void 0)throw new ht(h+" has no accessible constructor");var kt=p.constructor_body[arguments.length];if(kt===void 0)throw new ht(`Tried to invoke ctor of ${h} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(p.constructor_body).toString()}) parameters instead!`);return kt.apply(this,arguments)}),d=Object.create(A,{constructor:{value:W}});W.prototype=d;var p=new gn(h,W,d,v,H,o,s,f);p.baseClass&&(p.baseClass.__derivedClasses===void 0&&(p.baseClass.__derivedClasses=[]),p.baseClass.__derivedClasses.push(p));var M=new jt(h,p,!0,!1,!1),I=new jt(h+"*",p,!1,!1,!1),lt=new jt(h+" const*",p,!1,!0,!1);return je[t]={pointerType:I,constPointerType:lt},Be(P,W),[M,I,lt]})},Qt=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(D[e+n*4>>2]);return r};function Zt(t,e,r,n,a,o){var i=e.length;i<2&&E("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=e[1]!==null&&r!==null,l=!1,f=1;f<e.length;++f)if(e[f]!==null&&e[f].destructorFunction===void 0){l=!0;break}var h=e[0].name!=="void",y=i-2,v=new Array(y),P=[],x=[];return function(){arguments.length!==y&&E(`function ${t} called with ${arguments.length} arguments, expected ${y}`),x.length=0;var H;P.length=s?2:1,P[0]=a,s&&(H=e[1].toWireType(x,this),P[1]=H);for(var A=0;A<y;++A)v[A]=e[A+2].toWireType(x,arguments[A]),P.push(v[A]);var W=n.apply(null,P);function d(p){if(l)Ae(x);else for(var M=s?1:2;M<e.length;M++){var I=M===1?H:v[M-2];e[M].destructorFunction!==null&&e[M].destructorFunction(I)}if(h)return e[0].fromWireType(p)}return d(W)}}var An=(t,e,r,n,a,o)=>{var i=Qt(e,r);a=Z(n,a),ct([],[t],function(s){s=s[0];var l=`constructor ${s.name}`;if(s.registeredClass.constructor_body===void 0&&(s.registeredClass.constructor_body=[]),s.registeredClass.constructor_body[e-1]!==void 0)throw new ht(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${s.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return s.registeredClass.constructor_body[e-1]=()=>{Rt(`Cannot construct ${s.name} due to unbound types`,i)},ct([],i,f=>(f.splice(1,0,null),s.registeredClass.constructor_body[e-1]=Zt(l,f,null,a,o),[])),[]})},ze=t=>{t=t.trim();const e=t.indexOf("(");return e!==-1?(Lt(t[t.length-1]==")","Parentheses for argument names should match."),t.substr(0,e)):t},Dn=(t,e,r,n,a,o,i,s,l)=>{var f=Qt(r,n);e=U(e),e=ze(e),o=Z(a,o),ct([],[t],function(h){h=h[0];var y=`${h.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&h.registeredClass.pureVirtualFunctions.push(e);function v(){Rt(`Cannot call ${y} due to unbound types`,f)}var P=h.registeredClass.instancePrototype,x=P[e];return x===void 0||x.overloadTable===void 0&&x.className!==h.name&&x.argCount===r-2?(v.argCount=r-2,v.className=h.name,P[e]=v):(He(P,e,y),P[e].overloadTable[r-2]=v),ct([],f,function(H){var A=Zt(y,H,h,o,i);return P[e].overloadTable===void 0?(A.argCount=r-2,P[e]=A):P[e].overloadTable[r-2]=A,[]}),[]})};function Sn(){Object.assign(Ye.prototype,{get(t){return this.allocated[t]},has(t){return this.allocated[t]!==void 0},allocate(t){var e=this.freelist.pop()||this.allocated.length;return this.allocated[e]=t,e},free(t){this.allocated[t]=void 0,this.freelist.push(t)}})}function Ye(){this.allocated=[void 0],this.freelist=[]}var Q=new Ye,Ne=t=>{t>=Q.reserved&&--Q.get(t).refcount===0&&Q.free(t)},On=()=>{for(var t=0,e=Q.reserved;e<Q.allocated.length;++e)Q.allocated[e]!==void 0&&++t;return t},Fn=()=>{Q.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),Q.reserved=Q.allocated.length,u.count_emval_handles=On},at={toValue:t=>(t||E("Cannot use deleted val. handle = "+t),Q.get(t).value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Q.allocate({refcount:1,value:t})}}},Mn=(t,e)=>{e=U(e),et(t,{name:e,fromWireType:r=>{var n=at.toValue(r);return Ne(r),n},toWireType:(r,n)=>at.toHandle(n),argPackAdvance:rt,readValueFromPointer:Nt,destructorFunction:null})},Kt=t=>{if(t===null)return"null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t},jn=(t,e)=>{switch(e){case 4:return function(r){return this.fromWireType(we[r>>2])};case 8:return function(r){return this.fromWireType($e[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},In=(t,e,r)=>{e=U(e),et(t,{name:e,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:rt,readValueFromPointer:jn(e,r),destructorFunction:null})},Rn=(t,e,r,n,a,o,i)=>{var s=Qt(e,r);t=U(t),t=ze(t),a=Z(n,a),We(t,function(){Rt(`Cannot call ${t} due to unbound types`,s)},e-1),ct([],s,function(l){var f=[l[0],null].concat(l.slice(1));return Be(t,Zt(t,f,null,a,o),e-1),[]})},Hn=(t,e,r)=>{switch(e){case 1:return r?n=>J[n>>0]:n=>N[n>>0];case 2:return r?n=>yt[n>>1]:n=>Pt[n>>1];case 4:return r?n=>B[n>>2]:n=>D[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Wn=(t,e,r,n,a)=>{e=U(e);var o=h=>h;if(n===0){var i=32-8*r;o=h=>h<<i>>>i}var s=e.includes("unsigned"),l=(h,y)=>{},f;s?f=function(h,y){return l(y,this.name),y>>>0}:f=function(h,y){return l(y,this.name),y},et(t,{name:e,fromWireType:o,toWireType:f,argPackAdvance:rt,readValueFromPointer:Hn(e,r,n!==0),destructorFunction:null})},kn=(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function o(i){var s=D[i>>2],l=D[i+4>>2];return new a(J.buffer,l,s)}r=U(r),et(t,{name:r,fromWireType:o,argPackAdvance:rt,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},Ge=(t,e,r,n)=>{if(!(n>0))return 0;for(var a=r,o=r+n-1,i=0;i<t.length;++i){var s=t.charCodeAt(i);if(s>=55296&&s<=57343){var l=t.charCodeAt(++i);s=65536+((s&1023)<<10)|l&1023}if(s<=127){if(r>=o)break;e[r++]=s}else if(s<=2047){if(r+1>=o)break;e[r++]=192|s>>6,e[r++]=128|s&63}else if(s<=65535){if(r+2>=o)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|s&63}else{if(r+3>=o)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|s&63}}return e[r]=0,r-a},Bn=(t,e,r)=>Ge(t,N,e,r),Xe=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e},qe=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Un=(t,e,r)=>{for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&qe)return qe.decode(t.subarray(e,a));for(var o="";e<a;){var i=t[e++];if(!(i&128)){o+=String.fromCharCode(i);continue}var s=t[e++]&63;if((i&224)==192){o+=String.fromCharCode((i&31)<<6|s);continue}var l=t[e++]&63;if((i&240)==224?i=(i&15)<<12|s<<6|l:i=(i&7)<<18|s<<12|l<<6|t[e++]&63,i<65536)o+=String.fromCharCode(i);else{var f=i-65536;o+=String.fromCharCode(55296|f>>10,56320|f&1023)}}return o},te=(t,e)=>t?Un(N,t,e):"",Vn=(t,e)=>{e=U(e);var r=e==="std::string";et(t,{name:e,fromWireType(n){var a=D[n>>2],o=n+4,i;if(r)for(var s=o,l=0;l<=a;++l){var f=o+l;if(l==a||N[f]==0){var h=f-s,y=te(s,h);i===void 0?i=y:(i+=String.fromCharCode(0),i+=y),s=f+1}}else{for(var v=new Array(a),l=0;l<a;++l)v[l]=String.fromCharCode(N[o+l]);i=v.join("")}return nt(n),i},toWireType(n,a){a instanceof ArrayBuffer&&(a=new Uint8Array(a));var o,i=typeof a=="string";i||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int8Array||E("Cannot pass non-string to std::string"),r&&i?o=Xe(a):o=a.length;var s=re(4+o+1),l=s+4;if(D[s>>2]=o,r&&i)Bn(a,l,o+1);else if(i)for(var f=0;f<o;++f){var h=a.charCodeAt(f);h>255&&(nt(l),E("String has UTF-16 code units that do not fit in 8 bits")),N[l+f]=h}else for(var f=0;f<o;++f)N[l+f]=a[f];return n!==null&&n.push(nt,s),s},argPackAdvance:rt,readValueFromPointer:ke,destructorFunction(n){nt(n)}})},Je=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Ln=(t,e)=>{for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&Pt[n];)++n;if(r=n<<1,r-t>32&&Je)return Je.decode(N.subarray(t,r));for(var o="",i=0;!(i>=e/2);++i){var s=yt[t+i*2>>1];if(s==0)break;o+=String.fromCharCode(s)}return o},zn=(t,e,r)=>{if(r===void 0&&(r=2147483647),r<2)return 0;r-=2;for(var n=e,a=r<t.length*2?r/2:t.length,o=0;o<a;++o){var i=t.charCodeAt(o);yt[e>>1]=i,e+=2}return yt[e>>1]=0,e-n},Yn=t=>t.length*2,Nn=(t,e)=>{for(var r=0,n="";!(r>=e/4);){var a=B[t+r*4>>2];if(a==0)break;if(++r,a>=65536){var o=a-65536;n+=String.fromCharCode(55296|o>>10,56320|o&1023)}else n+=String.fromCharCode(a)}return n},Gn=(t,e,r)=>{if(r===void 0&&(r=2147483647),r<4)return 0;for(var n=e,a=n+r-4,o=0;o<t.length;++o){var i=t.charCodeAt(o);if(i>=55296&&i<=57343){var s=t.charCodeAt(++o);i=65536+((i&1023)<<10)|s&1023}if(B[e>>2]=i,e+=4,e+4>a)break}return B[e>>2]=0,e-n},Xn=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e},qn=(t,e,r)=>{r=U(r);var n,a,o,i,s;e===2?(n=Ln,a=zn,i=Yn,o=()=>Pt,s=1):e===4&&(n=Nn,a=Gn,i=Xn,o=()=>D,s=2),et(t,{name:r,fromWireType:l=>{for(var f=D[l>>2],h=o(),y,v=l+4,P=0;P<=f;++P){var x=l+4+P*e;if(P==f||h[x>>s]==0){var H=x-v,A=n(v,H);y===void 0?y=A:(y+=String.fromCharCode(0),y+=A),v=x+e}}return nt(l),y},toWireType:(l,f)=>{typeof f!="string"&&E(`Cannot pass non-string to C++ string type ${r}`);var h=i(f),y=re(4+h+e);return D[y>>2]=h>>s,a(f,y+4,h+e),l!==null&&l.push(nt,y),y},argPackAdvance:rt,readValueFromPointer:Nt,destructorFunction(l){nt(l)}})},Jn=(t,e,r,n,a,o)=>{Dt[t]={name:U(e),rawConstructor:Z(r,n),rawDestructor:Z(a,o),fields:[]}},Qn=(t,e,r,n,a,o,i,s,l,f)=>{Dt[t].fields.push({fieldName:U(e),getterReturnType:r,getter:Z(n,a),getterContext:o,setterArgumentType:i,setter:Z(s,l),setterContext:f})},Zn=(t,e)=>{e=U(e),et(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},Kn={},ta=t=>{var e=Kn[t];return e===void 0?U(t):e},Qe=()=>{if(typeof globalThis=="object")return globalThis;function t(e){e.$$$embind_global$$$=e;var r=typeof $$$embind_global$$$=="object"&&e.$$$embind_global$$$==e;return r||delete e.$$$embind_global$$$,r}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&t(global)?$$$embind_global$$$=global:typeof self=="object"&&t(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},ea=t=>t===0?at.toHandle(Qe()):(t=ta(t),at.toHandle(Qe()[t])),ra=t=>{t>4&&(Q.get(t).refcount+=1)},Ze=(t,e)=>{var r=ut[t];return r===void 0&&E(e+" has unknown type "+Le(t)),r},na=t=>{var e=new Array(t+1);return function(r,n,a){e[0]=r;for(var o=0;o<t;++o){var i=Ze(D[n+o*4>>2],"parameter "+o);e[o+1]=i.readValueFromPointer(a),a+=i.argPackAdvance}var s=new(r.bind.apply(r,e));return at.toHandle(s)}},Ke={},aa=(t,e,r,n)=>{t=at.toValue(t);var a=Ke[e];return a||(a=na(e),Ke[e]=a),a(t,r,n)},oa=(t,e)=>{t=Ze(t,"_emval_take_value");var r=t.readValueFromPointer(e);return at.toHandle(r)},ia=()=>{gt("")},sa=(t,e,r)=>N.copyWithin(t,e,e+r),ua=()=>2147483648,ca=t=>{var e=K.buffer,r=(t-e.byteLength+65535)/65536;try{return K.grow(r),be(),1}catch{}},la=t=>{var e=N.length;t>>>=0;var r=ua();if(t>r)return!1;for(var n=(l,f)=>l+(f-l%f)%f,a=1;a<=4;a*=2){var o=e*(1+.2/a);o=Math.min(o,t+100663296);var i=Math.min(r,n(Math.max(t,o),65536)),s=ca(i);if(s)return!0}return!1},ee={},fa=()=>O||"./this.program",_t=()=>{if(!_t.strings){var t=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:t,_:fa()};for(var r in ee)ee[r]===void 0?delete e[r]:e[r]=ee[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);_t.strings=n}return _t.strings},da=(t,e)=>{for(var r=0;r<t.length;++r)J[e++>>0]=t.charCodeAt(r);J[e>>0]=0},ha=(t,e)=>{var r=0;return _t().forEach((n,a)=>{var o=e+r;D[t+a*4>>2]=o,da(n,o),r+=n.length+1}),0},pa=(t,e)=>{var r=_t();D[t>>2]=r.length;var n=0;return r.forEach(a=>n+=a.length+1),D[e>>2]=n,0},ma=t=>t,Ht=t=>t%4===0&&(t%100!==0||t%400===0),ya=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},tr=[31,29,31,30,31,30,31,31,30,31,30,31],er=[31,28,31,30,31,30,31,31,30,31,30,31],va=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=Ht(r.getFullYear()),a=r.getMonth(),o=(n?tr:er)[a];if(e>o-r.getDate())e-=o-r.getDate()+1,r.setDate(1),a<11?r.setMonth(a+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1));else return r.setDate(r.getDate()+e),r}return r};function ga(t,e,r){var n=r>0?r:Xe(t)+1,a=new Array(n),o=Ge(t,a,0,a.length);return e&&(a.length=o),a}var wa=(t,e)=>{J.set(t,e)},$a=(t,e,r,n)=>{var a=D[n+40>>2],o={tm_sec:B[n>>2],tm_min:B[n+4>>2],tm_hour:B[n+8>>2],tm_mday:B[n+12>>2],tm_mon:B[n+16>>2],tm_year:B[n+20>>2],tm_wday:B[n+24>>2],tm_yday:B[n+28>>2],tm_isdst:B[n+32>>2],tm_gmtoff:B[n+36>>2],tm_zone:a?te(a):""},i=te(r),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in s)i=i.replace(new RegExp(l,"g"),s[l]);var f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h=["January","February","March","April","May","June","July","August","September","October","November","December"];function y(d,p,M){for(var I=typeof d=="number"?d.toString():d||"";I.length<p;)I=M[0]+I;return I}function v(d,p){return y(d,p,"0")}function P(d,p){function M(lt){return lt<0?-1:lt>0?1:0}var I;return(I=M(d.getFullYear()-p.getFullYear()))===0&&(I=M(d.getMonth()-p.getMonth()))===0&&(I=M(d.getDate()-p.getDate())),I}function x(d){switch(d.getDay()){case 0:return new Date(d.getFullYear()-1,11,29);case 1:return d;case 2:return new Date(d.getFullYear(),0,3);case 3:return new Date(d.getFullYear(),0,2);case 4:return new Date(d.getFullYear(),0,1);case 5:return new Date(d.getFullYear()-1,11,31);case 6:return new Date(d.getFullYear()-1,11,30)}}function H(d){var p=va(new Date(d.tm_year+1900,0,1),d.tm_yday),M=new Date(p.getFullYear(),0,4),I=new Date(p.getFullYear()+1,0,4),lt=x(M),kt=x(I);return P(lt,p)<=0?P(kt,p)<=0?p.getFullYear()+1:p.getFullYear():p.getFullYear()-1}var A={"%a":d=>f[d.tm_wday].substring(0,3),"%A":d=>f[d.tm_wday],"%b":d=>h[d.tm_mon].substring(0,3),"%B":d=>h[d.tm_mon],"%C":d=>{var p=d.tm_year+1900;return v(p/100|0,2)},"%d":d=>v(d.tm_mday,2),"%e":d=>y(d.tm_mday,2," "),"%g":d=>H(d).toString().substring(2),"%G":d=>H(d),"%H":d=>v(d.tm_hour,2),"%I":d=>{var p=d.tm_hour;return p==0?p=12:p>12&&(p-=12),v(p,2)},"%j":d=>v(d.tm_mday+ya(Ht(d.tm_year+1900)?tr:er,d.tm_mon-1),3),"%m":d=>v(d.tm_mon+1,2),"%M":d=>v(d.tm_min,2),"%n":()=>`
|
|
3
|
+
`,"%p":d=>d.tm_hour>=0&&d.tm_hour<12?"AM":"PM","%S":d=>v(d.tm_sec,2),"%t":()=>" ","%u":d=>d.tm_wday||7,"%U":d=>{var p=d.tm_yday+7-d.tm_wday;return v(Math.floor(p/7),2)},"%V":d=>{var p=Math.floor((d.tm_yday+7-(d.tm_wday+6)%7)/7);if((d.tm_wday+371-d.tm_yday-2)%7<=2&&p++,p){if(p==53){var M=(d.tm_wday+371-d.tm_yday)%7;M!=4&&(M!=3||!Ht(d.tm_year))&&(p=1)}}else{p=52;var I=(d.tm_wday+7-d.tm_yday-1)%7;(I==4||I==5&&Ht(d.tm_year%400-1))&&p++}return v(p,2)},"%w":d=>d.tm_wday,"%W":d=>{var p=d.tm_yday+7-(d.tm_wday+6)%7;return v(Math.floor(p/7),2)},"%y":d=>(d.tm_year+1900).toString().substring(2),"%Y":d=>d.tm_year+1900,"%z":d=>{var p=d.tm_gmtoff,M=p>=0;return p=Math.abs(p)/60,p=p/60*100+p%60,(M?"+":"-")+("0000"+p).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};i=i.replace(/%%/g,"\0\0");for(var l in A)i.includes(l)&&(i=i.replace(new RegExp(l,"g"),A[l](o)));i=i.replace(/\0\0/g,"%");var W=ga(i,!1);return W.length>e?0:(wa(W,t),W.length-1)},ba=(t,e,r,n,a)=>$a(t,e,r,n);De=u.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},rn(),ht=u.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},mn(),fn(),Cn(),Ve=u.UnboundTypeError=En(Error,"UnboundTypeError"),Sn(),Fn();var Ca={q:zr,u:Yr,a:Gr,h:Xr,l:qr,I:Jr,P:Qr,n:Zr,aa:Kr,d:Nr,pa:tn,X:en,fa:an,oa:xn,na:An,D:Dn,ea:Mn,U:In,J:Rn,w:Wn,s:kn,T:Vn,L:qn,Q:Jn,qa:Qn,ga:Zn,ba:Ne,ma:ea,V:ra,ja:aa,la:oa,K:ia,da:sa,ca:la,_:ha,$:pa,H:Ua,S:Qa,C:za,p:Wa,b:_a,z:ka,ha:Na,c:Aa,j:Sa,i:Ea,x:La,O:Ba,v:Ra,G:Xa,N:qa,B:Ya,F:Za,Y:to,W:eo,k:Da,f:xa,e:Pa,g:Ta,M:Ja,m:Ia,ia:Va,o:Oa,R:Fa,t:ja,ka:Ha,y:Ga,r:Ma,E:Ka,A:ma,Z:ba},S=Lr(),nt=u._free=t=>(nt=u._free=S.ta)(t),re=u._malloc=t=>(re=u._malloc=S.ua)(t),rr=t=>(rr=S.wa)(t);u.__embind_initialize_bindings=()=>(u.__embind_initialize_bindings=S.xa)();var b=(t,e)=>(b=S.ya)(t,e),Tt=t=>(Tt=S.za)(t),C=()=>(C=S.Aa)(),_=t=>(_=S.Ba)(t),nr=t=>(nr=S.Ca)(t),ar=t=>(ar=S.Da)(t),or=(t,e,r)=>(or=S.Ea)(t,e,r),ir=t=>(ir=S.Fa)(t);u.dynCall_viijii=(t,e,r,n,a,o,i)=>(u.dynCall_viijii=S.Ga)(t,e,r,n,a,o,i);var sr=u.dynCall_jiii=(t,e,r,n)=>(sr=u.dynCall_jiii=S.Ha)(t,e,r,n),ur=u.dynCall_jiiii=(t,e,r,n,a)=>(ur=u.dynCall_jiiii=S.Ia)(t,e,r,n,a);u.dynCall_iiiiij=(t,e,r,n,a,o,i)=>(u.dynCall_iiiiij=S.Ja)(t,e,r,n,a,o,i),u.dynCall_iiiiijj=(t,e,r,n,a,o,i,s,l)=>(u.dynCall_iiiiijj=S.Ka)(t,e,r,n,a,o,i,s,l),u.dynCall_iiiiiijj=(t,e,r,n,a,o,i,s,l,f)=>(u.dynCall_iiiiiijj=S.La)(t,e,r,n,a,o,i,s,l,f);function _a(t,e){var r=C();try{return T(t)(e)}catch(n){if(_(r),n!==n+0)throw n;b(1,0)}}function Ta(t,e,r,n){var a=C();try{T(t)(e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function Pa(t,e,r){var n=C();try{T(t)(e,r)}catch(a){if(_(n),a!==a+0)throw a;b(1,0)}}function Ea(t,e,r,n,a){var o=C();try{return T(t)(e,r,n,a)}catch(i){if(_(o),i!==i+0)throw i;b(1,0)}}function xa(t,e){var r=C();try{T(t)(e)}catch(n){if(_(r),n!==n+0)throw n;b(1,0)}}function Aa(t,e,r){var n=C();try{return T(t)(e,r)}catch(a){if(_(n),a!==a+0)throw a;b(1,0)}}function Da(t){var e=C();try{T(t)()}catch(r){if(_(e),r!==r+0)throw r;b(1,0)}}function Sa(t,e,r,n){var a=C();try{return T(t)(e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function Oa(t,e,r,n,a,o){var i=C();try{T(t)(e,r,n,a,o)}catch(s){if(_(i),s!==s+0)throw s;b(1,0)}}function Fa(t,e,r,n,a,o,i){var s=C();try{T(t)(e,r,n,a,o,i)}catch(l){if(_(s),l!==l+0)throw l;b(1,0)}}function Ma(t,e,r,n,a,o,i,s,l,f,h){var y=C();try{T(t)(e,r,n,a,o,i,s,l,f,h)}catch(v){if(_(y),v!==v+0)throw v;b(1,0)}}function ja(t,e,r,n,a,o,i,s){var l=C();try{T(t)(e,r,n,a,o,i,s)}catch(f){if(_(l),f!==f+0)throw f;b(1,0)}}function Ia(t,e,r,n,a){var o=C();try{T(t)(e,r,n,a)}catch(i){if(_(o),i!==i+0)throw i;b(1,0)}}function Ra(t,e,r,n,a,o,i){var s=C();try{return T(t)(e,r,n,a,o,i)}catch(l){if(_(s),l!==l+0)throw l;b(1,0)}}function Ha(t,e,r,n,a,o,i,s,l){var f=C();try{T(t)(e,r,n,a,o,i,s,l)}catch(h){if(_(f),h!==h+0)throw h;b(1,0)}}function Wa(t){var e=C();try{return T(t)()}catch(r){if(_(e),r!==r+0)throw r;b(1,0)}}function ka(t,e,r,n){var a=C();try{return T(t)(e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function Ba(t,e,r,n,a,o,i){var s=C();try{return T(t)(e,r,n,a,o,i)}catch(l){if(_(s),l!==l+0)throw l;b(1,0)}}function Ua(t,e,r,n){var a=C();try{return T(t)(e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function Va(t,e,r,n,a,o,i,s){var l=C();try{T(t)(e,r,n,a,o,i,s)}catch(f){if(_(l),f!==f+0)throw f;b(1,0)}}function La(t,e,r,n,a,o){var i=C();try{return T(t)(e,r,n,a,o)}catch(s){if(_(i),s!==s+0)throw s;b(1,0)}}function za(t,e,r,n,a,o){var i=C();try{return T(t)(e,r,n,a,o)}catch(s){if(_(i),s!==s+0)throw s;b(1,0)}}function Ya(t,e,r,n,a,o,i,s,l,f){var h=C();try{return T(t)(e,r,n,a,o,i,s,l,f)}catch(y){if(_(h),y!==y+0)throw y;b(1,0)}}function Na(t,e,r){var n=C();try{return T(t)(e,r)}catch(a){if(_(n),a!==a+0)throw a;b(1,0)}}function Ga(t,e,r,n,a,o,i,s,l,f){var h=C();try{T(t)(e,r,n,a,o,i,s,l,f)}catch(y){if(_(h),y!==y+0)throw y;b(1,0)}}function Xa(t,e,r,n,a,o,i,s){var l=C();try{return T(t)(e,r,n,a,o,i,s)}catch(f){if(_(l),f!==f+0)throw f;b(1,0)}}function qa(t,e,r,n,a,o,i,s,l){var f=C();try{return T(t)(e,r,n,a,o,i,s,l)}catch(h){if(_(f),h!==h+0)throw h;b(1,0)}}function Ja(t,e,r,n,a,o,i){var s=C();try{T(t)(e,r,n,a,o,i)}catch(l){if(_(s),l!==l+0)throw l;b(1,0)}}function Qa(t,e,r,n){var a=C();try{return T(t)(e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function Za(t,e,r,n,a,o,i,s,l,f,h,y){var v=C();try{return T(t)(e,r,n,a,o,i,s,l,f,h,y)}catch(P){if(_(v),P!==P+0)throw P;b(1,0)}}function Ka(t,e,r,n,a,o,i,s,l,f,h,y,v,P,x,H){var A=C();try{T(t)(e,r,n,a,o,i,s,l,f,h,y,v,P,x,H)}catch(W){if(_(A),W!==W+0)throw W;b(1,0)}}function to(t,e,r,n){var a=C();try{return sr(t,e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function eo(t,e,r,n,a){var o=C();try{return ur(t,e,r,n,a)}catch(i){if(_(o),i!==i+0)throw i;b(1,0)}}var Wt;vt=function t(){Wt||cr(),Wt||(vt=t)};function cr(){if(it>0||(Fr(),it>0))return;function t(){Wt||(Wt=!0,u.calledRun=!0,!mt&&(Mr(),g(u),u.onRuntimeInitialized&&u.onRuntimeInitialized(),jr()))}u.setStatus?(u.setStatus("Running..."),setTimeout(function(){setTimeout(function(){u.setStatus("")},1),t()},1)):t()}if(u.preInit)for(typeof u.preInit=="function"&&(u.preInit=[u.preInit]);u.preInit.length>0;)u.preInit.pop()();return cr(),m.ready}})();function Ar(c){return Bt(Ut,c)}async function Dr(c,{tryHarder:m=k.tryHarder,formats:u=k.formats,maxSymbols:g=k.maxSymbols}=k){return Er(c,{tryHarder:m,formats:u,maxSymbols:g},Ut)}async function Sr(c,{tryHarder:m=k.tryHarder,formats:u=k.formats,maxSymbols:g=k.maxSymbols}=k){return xr(c,{tryHarder:m,formats:u,maxSymbols:g},Ut)}const Vt=new Map([["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["data_matrix","DataMatrix"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["pdf417","PDF417"],["qr_code","QRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"]]);function Or(c){for(const[m,u]of Vt)if(c===u)return m;return"unknown"}class ge extends EventTarget{constructor(u={}){var g;super();fr(this,ft,void 0);try{const $=(g=u==null?void 0:u.formats)==null?void 0:g.filter(w=>w!=="unknown");if(($==null?void 0:$.length)===0)throw new TypeError("Hint option provided, but is empty.");$==null||$.forEach(w=>{if(!V.includes(w))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${w}' is not a valid enum value of type BarcodeFormat.`)}),dr(this,ft,$??[]),Ar().then(w=>{this.dispatchEvent(new CustomEvent("load",{detail:w}))}).catch(w=>{this.dispatchEvent(new CustomEvent("error",{detail:w}))})}catch($){throw de($,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return V.filter(u=>u!=="unknown")}async detect(u){try{const g=await vr(u);if(g===null)return[];let $;try{le(g)?$=await Dr(g,{tryHarder:!0,formats:ne(this,ft).map(w=>Vt.get(w))}):$=await Sr(g,{tryHarder:!0,formats:ne(this,ft).map(w=>Vt.get(w))})}catch(w){throw console.error(w),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return $.map(w=>{const{topLeft:{x:O,y:G},topRight:{x:j,y:F},bottomLeft:{x:z,y:Y},bottomRight:{x:L,y:X}}=w.position,K=Math.min(O,j,z,L),mt=Math.min(G,F,Y,X),Lt=Math.max(O,j,z,L),J=Math.max(G,F,Y,X);return{boundingBox:new DOMRectReadOnly(K,mt,Lt-K,J-mt),rawValue:new TextDecoder().decode(w.bytes),format:Or(w.format),cornerPoints:[{x:O,y:G},{x:j,y:F},{x:L,y:X},{x:z,y:Y}]}})}catch(g){throw de(g,"Failed to execute 'detect' on 'BarcodeDetector'")}}}return ft=new WeakMap,globalThis.BarcodeDetector??(globalThis.BarcodeDetector=ge),R.BarcodeDetector=ge,R.setZXingModuleOverrides=Pr,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"}),R}({});
|
package/dist/iife/pure.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var sr=(R,L,q)=>{if(!L.has(R))throw TypeError("Cannot "+q)};var re=(R,L,q)=>(sr(R,L,"read from private field"),q?q.call(R):L.get(R)),ur=(R,L,q)=>{if(L.has(R))throw TypeError("Cannot add the same private member more than once");L instanceof WeakSet?L.add(R):L.set(R,q)},cr=(R,L,q,pt)=>(sr(R,L,"write to private field"),pt?pt.call(R,q):L.set(R,q),q);var BarcodeDetectionAPI=function(R){var ft;"use strict";const L=["aztec","code_128","code_39","code_93","codabar","data_matrix","ean_13","ean_8","itf","pdf417","qr_code","upc_a","upc_e","unknown"];function q(c){if(pt(c))return{width:c.naturalWidth,height:c.naturalHeight};if(ne(c))return{width:c.width.baseVal.value,height:c.height.baseVal.value};if(ae(c))return{width:c.videoWidth,height:c.videoHeight};if(ie(c))return{width:c.width,height:c.height};if(ue(c))return{width:c.displayWidth,height:c.displayHeight};if(oe(c))return{width:c.width,height:c.height};if(se(c))return{width:c.width,height:c.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}function pt(c){try{return c instanceof HTMLImageElement}catch{return!1}}function ne(c){try{return c instanceof SVGImageElement}catch{return!1}}function ae(c){try{return c instanceof HTMLVideoElement}catch{return!1}}function oe(c){try{return c instanceof HTMLCanvasElement}catch{return!1}}function ie(c){try{return c instanceof ImageBitmap}catch{return!1}}function se(c){try{return c instanceof OffscreenCanvas}catch{return!1}}function ue(c){try{return c instanceof VideoFrame}catch{return!1}}function ce(c){try{return c instanceof Blob}catch{return!1}}function lr(c){try{return c instanceof ImageData}catch{return!1}}function fr(c,m){try{const u=new OffscreenCanvas(c,m);if(u.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return u;throw void 0}catch{const u=document.createElement("canvas");return u.width=c,u.height=m,u}}async function le(c){if(pt(c)&&!await mr(c))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(ne(c)&&!await yr(c))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(ue(c)&&vr(c))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(ae(c)&&(c.readyState===0||c.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(ie(c)&&wr(c))throw new DOMException("The image source is detached.","InvalidStateError");const{width:m,height:u}=q(c);if(m===0||u===0)return null;const $=fr(m,u).getContext("2d");$.drawImage(c,0,0);try{return $.getImageData(0,0,m,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function dr(c){let m;try{if(createImageBitmap)m=await createImageBitmap(c);else if(Image){m=new Image;let g="";try{g=URL.createObjectURL(c),m.src=g,await m.decode()}finally{URL.revokeObjectURL(g)}}else return c}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await le(m)}function hr(c){const{width:m,height:u}=c;if(m===0||u===0)return null;const g=c.getContext("2d");try{return g.getImageData(0,0,m,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function pr(c){if(ce(c))return await dr(c);if(lr(c)){if(gr(c))throw new DOMException("The image data has been detached.","InvalidStateError");return c}return oe(c)||se(c)?hr(c):await le(c)}async function mr(c){try{return await c.decode(),!0}catch{return!1}}async function yr(c){var m;try{return await((m=c.decode)==null?void 0:m.call(c)),!0}catch{return!1}}function vr(c){return c.format===null}function gr(c){return c.data.buffer.byteLength===0}function wr(c){return c.width===0&&c.height===0}function fe(c,m){return c instanceof DOMException?new DOMException(`${m}: ${c.message}`,c.name):c instanceof Error?new c.constructor(`${m}: ${c.message}`):new Error(`${m}: ${c}`)}const de=c=>{let m;const u=new Set,g=(O,G)=>{const j=typeof O=="function"?O(m):O;if(!Object.is(j,m)){const F=m;m=G??typeof j!="object"?j:Object.assign({},m,j),u.forEach(Y=>Y(m,F))}},$=()=>m,w={setState:g,getState:$,subscribe:O=>(u.add(O),()=>u.delete(O)),destroy:()=>{u.clear()}};return m=c(g,$,w),w},$r=c=>c?de(c):de,br={locateFile:(c,m)=>{var u;const g=(u=c.match(/_(.+?)\.wasm$/))==null?void 0:u[1];return g?`https://fastly.jsdelivr.net/npm/@sec-ant/zxing-wasm@2.1.5/dist/${g}/${c}`:m+c}},ot=$r()(()=>({zxingModuleWeakMap:new WeakMap,zxingModuleOverrides:br}));function Cr(c){ot.setState({zxingModuleOverrides:c})}function Bt(c,m=ot.getState().zxingModuleOverrides){const{zxingModuleWeakMap:u}=ot.getState(),g=u.get(c);if(g&&Object.is(m,ot.getState().zxingModuleOverrides))return g;{ot.setState({zxingModuleOverrides:m});const $=c(m);return u.set(c,$),$}}const he=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","UPC-A","UPC-E"],k={tryHarder:!0,formats:[],maxSymbols:255};async function _r(c,{tryHarder:m=k.tryHarder,formats:u=k.formats,maxSymbols:g=k.maxSymbols}=k,$){const w=await Bt($,ot.getState().zxingModuleOverrides),{size:O}=c,G=new Uint8Array(await c.arrayBuffer()),j=w._malloc(O);w.HEAP8.set(G,j);const F=w.readBarcodesFromImage(j,O,m,pe(u),g);w._free(j);const Y=[];for(let N=0;N<F.size();++N){const z=F.get(N);Y.push({...z,format:me(z.format)})}return Y}async function Tr(c,{tryHarder:m=k.tryHarder,formats:u=k.formats,maxSymbols:g=k.maxSymbols}=k,$){const w=await Bt($,ot.getState().zxingModuleOverrides),{data:O,width:G,height:j,data:{byteLength:F}}=c,Y=w._malloc(F);w.HEAP8.set(O,Y);const N=w.readBarcodesFromPixmap(Y,G,j,m,pe(u),g);w._free(Y);const z=[];for(let X=0;X<N.size();++X){const K=N.get(X);z.push({...K,format:me(K.format)})}return z}function pe(c){return c.join("|")}function me(c){const m=ye(c);let u=0,g=he.length-1;for(;u<=g;){const $=Math.floor((u+g)/2),w=he[$],O=ye(w);if(O===m)return w;O<m?u=$+1:g=$-1}return"None"}function ye(c){return c.toLowerCase().replace(/_-\[\]/g,"")}var Ut=(()=>{var c=document.currentScript&&document.currentScript.src||new URL("pure.js",document.baseURI).href;return function(m={}){var u=m,g,$;u.ready=new Promise((t,e)=>{g=t,$=e});var w=Object.assign({},u),O="./this.program",G=typeof window=="object",j=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var F="";function Y(t){return u.locateFile?u.locateFile(t,F):F+t}var N;(G||j)&&(j?F=self.location.href:typeof document<"u"&&document.currentScript&&(F=document.currentScript.src),c&&(F=c),F.indexOf("blob:")!==0?F=F.substr(0,F.replace(/[?#].*/,"").lastIndexOf("/")+1):F="",j&&(N=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)})),u.print||console.log.bind(console);var z=u.printErr||console.error.bind(console);Object.assign(u,w),w=null,u.arguments&&u.arguments,u.thisProgram&&(O=u.thisProgram),u.quit&&u.quit;var X;u.wasmBinary&&(X=u.wasmBinary),u.noExitRuntime,typeof WebAssembly!="object"&&Pt("no native wasm support detected");var K,mt=!1,J,B,yt,Tt,U,S,ve,ge;function we(){var t=K.buffer;u.HEAP8=J=new Int8Array(t),u.HEAP16=yt=new Int16Array(t),u.HEAPU8=B=new Uint8Array(t),u.HEAPU16=Tt=new Uint16Array(t),u.HEAP32=U=new Int32Array(t),u.HEAPU32=S=new Uint32Array(t),u.HEAPF32=ve=new Float32Array(t),u.HEAPF64=ge=new Float64Array(t)}var $e=[],be=[],Ce=[];function Dr(){if(u.preRun)for(typeof u.preRun=="function"&&(u.preRun=[u.preRun]);u.preRun.length;)Mr(u.preRun.shift());Lt($e)}function Or(){Lt(be)}function Fr(){if(u.postRun)for(typeof u.postRun=="function"&&(u.postRun=[u.postRun]);u.postRun.length;)Ir(u.postRun.shift());Lt(Ce)}function Mr(t){$e.unshift(t)}function jr(t){be.unshift(t)}function Ir(t){Ce.unshift(t)}var it=0,vt=null;function Rr(t){it++,u.monitorRunDependencies&&u.monitorRunDependencies(it)}function Hr(t){if(it--,u.monitorRunDependencies&&u.monitorRunDependencies(it),it==0&&vt){var e=vt;vt=null,e()}}function Pt(t){u.onAbort&&u.onAbort(t),t="Aborted("+t+")",z(t),mt=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw $(e),e}var Wr="data:application/octet-stream;base64,";function _e(t){return t.startsWith(Wr)}var st;u.locateFile?(st="zxing_reader.wasm",_e(st)||(st=Y(st))):st=new URL("/reader/zxing_reader.wasm",self.location).href;function Te(t){if(t==st&&X)return new Uint8Array(X);if(N)return N(t);throw"both async and sync fetching of the wasm failed"}function kr(t){return!X&&(G||j)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(e=>{if(!e.ok)throw"failed to load wasm binary file at '"+t+"'";return e.arrayBuffer()}).catch(()=>Te(t)):Promise.resolve().then(()=>Te(t))}function Pe(t,e,r){return kr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{z(`failed to asynchronously prepare wasm: ${n}`),Pt(n)})}function Br(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!_e(e)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(a=>{var o=WebAssembly.instantiateStreaming(a,r);return o.then(n,function(i){return z(`wasm streaming compile failed: ${i}`),z("falling back to ArrayBuffer instantiation"),Pe(e,r,n)})}):Pe(e,r,n)}function Ur(){var t={a:$a};function e(n,a){return D=n.exports,K=D.qa,we(),ke=D.ua,jr(D.ra),Hr(),D}Rr();function r(n){e(n.instance)}if(u.instantiateWasm)try{return u.instantiateWasm(t,e)}catch(n){z(`Module.instantiateWasm callback failed with error: ${n}`),$(n)}return Br(X,st,t,r).catch($),{}}var Lt=t=>{for(;t.length>0;)t.shift()(u)},Et=[],xt=0,Vr=t=>{var e=new At(t);return e.get_caught()||(e.set_caught(!0),xt--),e.set_rethrown(!1),Et.push(e),er(e.excPtr),e.get_exception_ptr()},tt=0,Lr=()=>{b(0,0);var t=Et.pop();tr(t.excPtr),tt=0};function At(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(e){S[this.ptr+4>>2]=e},this.get_type=function(){return S[this.ptr+4>>2]},this.set_destructor=function(e){S[this.ptr+8>>2]=e},this.get_destructor=function(){return S[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,J[this.ptr+12>>0]=e},this.get_caught=function(){return J[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,J[this.ptr+13>>0]=e},this.get_rethrown=function(){return J[this.ptr+13>>0]!=0},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){S[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return S[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=nr(this.get_type());if(e)return S[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}var zr=t=>{throw tt||(tt=t),tt},zt=t=>{var e=tt;if(!e)return _t(0),0;var r=new At(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return _t(0),e;for(var a in t){var o=t[a];if(o===0||o===n)break;var i=r.ptr+16;if(rr(o,n,i))return _t(o),e}return _t(n),e},Yr=()=>zt([]),Nr=t=>zt([t]),Gr=(t,e)=>zt([t,e]),Xr=t=>{var e=new At(t).get_exception_ptr();return e},qr=()=>{var t=Et.pop();t||Pt("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(Et.push(t),t.set_rethrown(!0),t.set_caught(!1),xt++),tt=e,tt},Jr=(t,e,r)=>{var n=new At(t);throw n.init(e,r),tt=t,xt++,tt},Qr=()=>xt,St={},Ee=t=>{for(;t.length;){var e=t.pop(),r=t.pop();r(e)}};function Yt(t){return this.fromWireType(U[t>>2])}var dt={},ut={},Dt={},xe,Ot=t=>{throw new xe(t)},ct=(t,e,r)=>{t.forEach(function(s){Dt[s]=e});function n(s){var l=r(s);l.length!==t.length&&Ot("Mismatched type converter count");for(var f=0;f<t.length;++f)et(t[f],l[f])}var a=new Array(e.length),o=[],i=0;e.forEach((s,l)=>{ut.hasOwnProperty(s)?a[l]=ut[s]:(o.push(s),dt.hasOwnProperty(s)||(dt[s]=[]),dt[s].push(()=>{a[l]=ut[s],++i,i===o.length&&n(a)}))}),o.length===0&&n(a)},Zr=t=>{var e=St[t];delete St[t];var r=e.rawConstructor,n=e.rawDestructor,a=e.fields,o=a.map(i=>i.getterReturnType).concat(a.map(i=>i.setterArgumentType));ct([t],o,i=>{var s={};return a.forEach((l,f)=>{var h=l.fieldName,y=i[f],v=l.getter,T=l.getterContext,x=i[f+a.length],H=l.setter,A=l.setterContext;s[h]={read:W=>y.fromWireType(v(T,W)),write:(W,d)=>{var p=[];H(A,W,x.toWireType(p,d)),Ee(p)}}}),[{name:e.name,fromWireType:l=>{var f={};for(var h in s)f[h]=s[h].read(l);return n(l),f},toWireType:(l,f)=>{for(var h in s)if(!(h in f))throw new TypeError(`Missing field: "${h}"`);var y=r();for(h in s)s[h].write(y,f[h]);return l!==null&&l.push(n,y),y},argPackAdvance:rt,readValueFromPointer:Yt,destructorFunction:n}]})},Kr=(t,e,r,n,a)=>{},tn=()=>{for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);Ae=t},Ae,V=t=>{for(var e="",r=t;B[r];)e+=Ae[B[r++]];return e},ht,P=t=>{throw new ht(t)};function en(t,e,r={}){var n=e.name;if(t||P(`type "${n}" must have a positive integer typeid pointer`),ut.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;P(`Cannot register type '${n}' twice`)}if(ut[t]=e,delete Dt[t],dt.hasOwnProperty(t)){var a=dt[t];delete dt[t],a.forEach(o=>o())}}function et(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return en(t,e,r)}var rt=8,rn=(t,e,r,n)=>{e=V(e),et(t,{name:e,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?r:n},argPackAdvance:rt,readValueFromPointer:function(a){return this.fromWireType(B[a])},destructorFunction:null})},nn=t=>({count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}),Nt=t=>{function e(r){return r.$$.ptrType.registeredClass.name}P(e(t)+" instance already deleted")},Gt=!1,Se=t=>{},an=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},De=t=>{t.count.value-=1;var e=t.count.value===0;e&&an(t)},Oe=(t,e,r)=>{if(e===r)return t;if(r.baseClass===void 0)return null;var n=Oe(t,e,r.baseClass);return n===null?null:r.downcast(n)},Fe={},on=()=>Object.keys($t).length,sn=()=>{var t=[];for(var e in $t)$t.hasOwnProperty(e)&&t.push($t[e]);return t},gt=[],Xt=()=>{for(;gt.length;){var t=gt.pop();t.$$.deleteScheduled=!1,t.delete()}},wt,un=t=>{wt=t,gt.length&&wt&&wt(Xt)},cn=()=>{u.getInheritedInstanceCount=on,u.getLiveInheritedInstances=sn,u.flushPendingDeletes=Xt,u.setDelayFunction=un},$t={},ln=(t,e)=>{for(e===void 0&&P("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},fn=(t,e)=>(e=ln(t,e),$t[e]),Ft=(t,e)=>{(!e.ptrType||!e.ptr)&&Ot("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&Ot("Both smartPtrType and smartPtr must be specified"),e.count={value:1},bt(Object.create(t,{$$:{value:e}}))};function dn(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=fn(this.registeredClass,e);if(r!==void 0){if(r.$$.count.value===0)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function a(){return this.isSmartPointer?Ft(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):Ft(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var o=this.registeredClass.getActualType(e),i=Fe[o];if(!i)return a.call(this);var s;this.isConst?s=i.constPointerType:s=i.pointerType;var l=Oe(e,this.registeredClass,s.registeredClass);return l===null?a.call(this):this.isSmartPointer?Ft(s.registeredClass.instancePrototype,{ptrType:s,ptr:l,smartPtrType:this,smartPtr:t}):Ft(s.registeredClass.instancePrototype,{ptrType:s,ptr:l})}var bt=t=>typeof FinalizationRegistry>"u"?(bt=e=>e,t):(Gt=new FinalizationRegistry(e=>{De(e.$$)}),bt=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Gt.register(e,a,e)}return e},Se=e=>Gt.unregister(e),bt(t)),hn=()=>{Object.assign(Mt.prototype,{isAliasOf(t){if(!(this instanceof Mt)||!(t instanceof Mt))return!1;var e=this.$$.ptrType.registeredClass,r=this.$$.ptr;t.$$=t.$$;for(var n=t.$$.ptrType.registeredClass,a=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)a=n.upcast(a),n=n.baseClass;return e===n&&r===a},clone(){if(this.$$.ptr||Nt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=bt(Object.create(Object.getPrototypeOf(this),{$$:{value:nn(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||Nt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&P("Object already scheduled for deletion"),Se(this),De(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Nt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&P("Object already scheduled for deletion"),gt.push(this),gt.length===1&&wt&&wt(Xt),this.$$.deleteScheduled=!0,this}})};function Mt(){}var pn=48,mn=57,Me=t=>{if(t===void 0)return"_unknown";t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=pn&&e<=mn?`_${t}`:t};function je(t,e){return t=Me(t),{[t]:function(){return e.apply(this,arguments)}}[t]}var Ie=(t,e,r)=>{if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||P(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${t[e].overloadTable})!`),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}},Re=(t,e,r)=>{u.hasOwnProperty(t)?((r===void 0||u[t].overloadTable!==void 0&&u[t].overloadTable[r]!==void 0)&&P(`Cannot register public name '${t}' twice`),Ie(u,t,t),u.hasOwnProperty(r)&&P(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),u[t].overloadTable[r]=e):(u[t]=e,r!==void 0&&(u[t].numArguments=r))};function yn(t,e,r,n,a,o,i,s){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=i,this.downcast=s,this.pureVirtualFunctions=[]}var qt=(t,e,r)=>{for(;e!==r;)e.upcast||P(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t};function vn(t,e){if(e===null)return this.isReference&&P(`null is not a valid ${this.name}`),0;e.$$||P(`Cannot pass "${Zt(e)}" as a ${this.name}`),e.$$.ptr||P(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=qt(e.$$.ptr,r,this.registeredClass);return n}function gn(t,e){var r;if(e===null)return this.isReference&&P(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;e.$$||P(`Cannot pass "${Zt(e)}" as a ${this.name}`),e.$$.ptr||P(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&P(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);var n=e.$$.ptrType.registeredClass;if(r=qt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&P("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:P(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var a=e.clone();r=this.rawShare(r,at.toHandle(()=>a.delete())),t!==null&&t.push(this.rawDestructor,r)}break;default:P("Unsupporting sharing policy")}return r}function wn(t,e){if(e===null)return this.isReference&&P(`null is not a valid ${this.name}`),0;e.$$||P(`Cannot pass "${Zt(e)}" as a ${this.name}`),e.$$.ptr||P(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&P(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=qt(e.$$.ptr,r,this.registeredClass);return n}function He(t){return this.fromWireType(S[t>>2])}var $n=()=>{Object.assign(jt.prototype,{getPointee(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},destructor(t){this.rawDestructor&&this.rawDestructor(t)},argPackAdvance:rt,readValueFromPointer:He,deleteObject(t){t!==null&&t.delete()},fromWireType:dn})};function jt(t,e,r,n,a,o,i,s,l,f,h){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=i,this.rawGetPointee=s,this.rawConstructor=l,this.rawShare=f,this.rawDestructor=h,!a&&e.baseClass===void 0?n?(this.toWireType=vn,this.destructorFunction=null):(this.toWireType=wn,this.destructorFunction=null):this.toWireType=gn}var We=(t,e,r)=>{u.hasOwnProperty(t)||Ot("Replacing nonexistant public symbol"),u[t].overloadTable!==void 0&&r!==void 0?u[t].overloadTable[r]=e:(u[t]=e,u[t].argCount=r)},bn=(t,e,r)=>{var n=u["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},It=[],ke,E=t=>{var e=It[t];return e||(t>=It.length&&(It.length=t+1),It[t]=e=ke.get(t)),e},Cn=(t,e,r)=>{if(t.includes("j"))return bn(t,e,r);var n=E(e).apply(null,r);return n},_n=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),Cn(t,e,r)}},Z=(t,e)=>{t=V(t);function r(){return t.includes("j")?_n(t,e):E(e)}var n=r();return typeof n!="function"&&P(`unknown function pointer with signature ${t}: ${e}`),n},Tn=(t,e)=>{var r=je(e,function(n){this.name=e,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+`
|
|
2
|
-
`+a.replace(/^Error(:[^\n]*)?\n/,""))});return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},r},Be,Ue=t=>{var e=Ke(t),r=V(e);return nt(e),r},Rt=(t,e)=>{var r=[],n={};function a(o){if(!n[o]&&!ut[o]){if(Dt[o]){Dt[o].forEach(a);return}r.push(o),n[o]=!0}}throw e.forEach(a),new Be(`${t}: `+r.map(Ue).join([", "]))},Pn=(t,e,r,n,a,o,i,s,l,f,h,y,v)=>{h=V(h),o=Z(a,o),s&&(s=Z(i,s)),f&&(f=Z(l,f)),v=Z(y,v);var T=Me(h);Re(T,function(){Rt(`Cannot construct ${h} due to unbound types`,[n])}),ct([t,e,r],n?[n]:[],function(x){x=x[0];var H,A;n?(H=x.registeredClass,A=H.instancePrototype):A=Mt.prototype;var W=je(T,function(){if(Object.getPrototypeOf(this)!==d)throw new ht("Use 'new' to construct "+h);if(p.constructor_body===void 0)throw new ht(h+" has no accessible constructor");var kt=p.constructor_body[arguments.length];if(kt===void 0)throw new ht(`Tried to invoke ctor of ${h} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(p.constructor_body).toString()}) parameters instead!`);return kt.apply(this,arguments)}),d=Object.create(A,{constructor:{value:W}});W.prototype=d;var p=new yn(h,W,d,v,H,o,s,f);p.baseClass&&(p.baseClass.__derivedClasses===void 0&&(p.baseClass.__derivedClasses=[]),p.baseClass.__derivedClasses.push(p));var M=new jt(h,p,!0,!1,!1),I=new jt(h+"*",p,!1,!1,!1),lt=new jt(h+" const*",p,!1,!0,!1);return Fe[t]={pointerType:I,constPointerType:lt},We(T,W),[M,I,lt]})},Jt=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(S[e+n*4>>2]);return r};function Qt(t,e,r,n,a,o){var i=e.length;i<2&&P("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=e[1]!==null&&r!==null,l=!1,f=1;f<e.length;++f)if(e[f]!==null&&e[f].destructorFunction===void 0){l=!0;break}var h=e[0].name!=="void",y=i-2,v=new Array(y),T=[],x=[];return function(){arguments.length!==y&&P(`function ${t} called with ${arguments.length} arguments, expected ${y}`),x.length=0;var H;T.length=s?2:1,T[0]=a,s&&(H=e[1].toWireType(x,this),T[1]=H);for(var A=0;A<y;++A)v[A]=e[A+2].toWireType(x,arguments[A]),T.push(v[A]);var W=n.apply(null,T);function d(p){if(l)Ee(x);else for(var M=s?1:2;M<e.length;M++){var I=M===1?H:v[M-2];e[M].destructorFunction!==null&&e[M].destructorFunction(I)}if(h)return e[0].fromWireType(p)}return d(W)}}var En=(t,e,r,n,a,o)=>{var i=Jt(e,r);a=Z(n,a),ct([],[t],function(s){s=s[0];var l=`constructor ${s.name}`;if(s.registeredClass.constructor_body===void 0&&(s.registeredClass.constructor_body=[]),s.registeredClass.constructor_body[e-1]!==void 0)throw new ht(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${s.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return s.registeredClass.constructor_body[e-1]=()=>{Rt(`Cannot construct ${s.name} due to unbound types`,i)},ct([],i,f=>(f.splice(1,0,null),s.registeredClass.constructor_body[e-1]=Qt(l,f,null,a,o),[])),[]})},xn=(t,e,r,n,a,o,i,s,l)=>{var f=Jt(r,n);e=V(e),o=Z(a,o),ct([],[t],function(h){h=h[0];var y=`${h.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&h.registeredClass.pureVirtualFunctions.push(e);function v(){Rt(`Cannot call ${y} due to unbound types`,f)}var T=h.registeredClass.instancePrototype,x=T[e];return x===void 0||x.overloadTable===void 0&&x.className!==h.name&&x.argCount===r-2?(v.argCount=r-2,v.className=h.name,T[e]=v):(Ie(T,e,y),T[e].overloadTable[r-2]=v),ct([],f,function(H){var A=Qt(y,H,h,o,i);return T[e].overloadTable===void 0?(A.argCount=r-2,T[e]=A):T[e].overloadTable[r-2]=A,[]}),[]})};function An(){Object.assign(Ve.prototype,{get(t){return this.allocated[t]},has(t){return this.allocated[t]!==void 0},allocate(t){var e=this.freelist.pop()||this.allocated.length;return this.allocated[e]=t,e},free(t){this.allocated[t]=void 0,this.freelist.push(t)}})}function Ve(){this.allocated=[void 0],this.freelist=[]}var Q=new Ve,Le=t=>{t>=Q.reserved&&--Q.get(t).refcount===0&&Q.free(t)},Sn=()=>{for(var t=0,e=Q.reserved;e<Q.allocated.length;++e)Q.allocated[e]!==void 0&&++t;return t},Dn=()=>{Q.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),Q.reserved=Q.allocated.length,u.count_emval_handles=Sn},at={toValue:t=>(t||P("Cannot use deleted val. handle = "+t),Q.get(t).value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Q.allocate({refcount:1,value:t})}}},On=(t,e)=>{e=V(e),et(t,{name:e,fromWireType:r=>{var n=at.toValue(r);return Le(r),n},toWireType:(r,n)=>at.toHandle(n),argPackAdvance:rt,readValueFromPointer:Yt,destructorFunction:null})},Zt=t=>{if(t===null)return"null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t},Fn=(t,e)=>{switch(e){case 4:return function(r){return this.fromWireType(ve[r>>2])};case 8:return function(r){return this.fromWireType(ge[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},Mn=(t,e,r)=>{e=V(e),et(t,{name:e,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:rt,readValueFromPointer:Fn(e,r),destructorFunction:null})},jn=(t,e,r,n,a,o,i)=>{var s=Jt(e,r);t=V(t),a=Z(n,a),Re(t,function(){Rt(`Cannot call ${t} due to unbound types`,s)},e-1),ct([],s,function(l){var f=[l[0],null].concat(l.slice(1));return We(t,Qt(t,f,null,a,o),e-1),[]})},In=(t,e,r)=>{switch(e){case 1:return r?n=>J[n>>0]:n=>B[n>>0];case 2:return r?n=>yt[n>>1]:n=>Tt[n>>1];case 4:return r?n=>U[n>>2]:n=>S[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Rn=(t,e,r,n,a)=>{e=V(e);var o=h=>h;if(n===0){var i=32-8*r;o=h=>h<<i>>>i}var s=e.includes("unsigned"),l=(h,y)=>{},f;s?f=function(h,y){return l(y,this.name),y>>>0}:f=function(h,y){return l(y,this.name),y},et(t,{name:e,fromWireType:o,toWireType:f,argPackAdvance:rt,readValueFromPointer:In(e,r,n!==0),destructorFunction:null})},Hn=(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function o(i){var s=S[i>>2],l=S[i+4>>2];return new a(J.buffer,l,s)}r=V(r),et(t,{name:r,fromWireType:o,argPackAdvance:rt,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},ze=(t,e,r,n)=>{if(!(n>0))return 0;for(var a=r,o=r+n-1,i=0;i<t.length;++i){var s=t.charCodeAt(i);if(s>=55296&&s<=57343){var l=t.charCodeAt(++i);s=65536+((s&1023)<<10)|l&1023}if(s<=127){if(r>=o)break;e[r++]=s}else if(s<=2047){if(r+1>=o)break;e[r++]=192|s>>6,e[r++]=128|s&63}else if(s<=65535){if(r+2>=o)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|s&63}else{if(r+3>=o)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|s&63}}return e[r]=0,r-a},Wn=(t,e,r)=>ze(t,B,e,r),Ye=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e},Ne=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,kn=(t,e,r)=>{for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&Ne)return Ne.decode(t.subarray(e,a));for(var o="";e<a;){var i=t[e++];if(!(i&128)){o+=String.fromCharCode(i);continue}var s=t[e++]&63;if((i&224)==192){o+=String.fromCharCode((i&31)<<6|s);continue}var l=t[e++]&63;if((i&240)==224?i=(i&15)<<12|s<<6|l:i=(i&7)<<18|s<<12|l<<6|t[e++]&63,i<65536)o+=String.fromCharCode(i);else{var f=i-65536;o+=String.fromCharCode(55296|f>>10,56320|f&1023)}}return o},Kt=(t,e)=>t?kn(B,t,e):"",Bn=(t,e)=>{e=V(e);var r=e==="std::string";et(t,{name:e,fromWireType(n){var a=S[n>>2],o=n+4,i;if(r)for(var s=o,l=0;l<=a;++l){var f=o+l;if(l==a||B[f]==0){var h=f-s,y=Kt(s,h);i===void 0?i=y:(i+=String.fromCharCode(0),i+=y),s=f+1}}else{for(var v=new Array(a),l=0;l<a;++l)v[l]=String.fromCharCode(B[o+l]);i=v.join("")}return nt(n),i},toWireType(n,a){a instanceof ArrayBuffer&&(a=new Uint8Array(a));var o,i=typeof a=="string";i||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int8Array||P("Cannot pass non-string to std::string"),r&&i?o=Ye(a):o=a.length;var s=ee(4+o+1),l=s+4;if(S[s>>2]=o,r&&i)Wn(a,l,o+1);else if(i)for(var f=0;f<o;++f){var h=a.charCodeAt(f);h>255&&(nt(l),P("String has UTF-16 code units that do not fit in 8 bits")),B[l+f]=h}else for(var f=0;f<o;++f)B[l+f]=a[f];return n!==null&&n.push(nt,s),s},argPackAdvance:rt,readValueFromPointer:He,destructorFunction(n){nt(n)}})},Ge=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Un=(t,e)=>{for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&Tt[n];)++n;if(r=n<<1,r-t>32&&Ge)return Ge.decode(B.subarray(t,r));for(var o="",i=0;!(i>=e/2);++i){var s=yt[t+i*2>>1];if(s==0)break;o+=String.fromCharCode(s)}return o},Vn=(t,e,r)=>{if(r===void 0&&(r=2147483647),r<2)return 0;r-=2;for(var n=e,a=r<t.length*2?r/2:t.length,o=0;o<a;++o){var i=t.charCodeAt(o);yt[e>>1]=i,e+=2}return yt[e>>1]=0,e-n},Ln=t=>t.length*2,zn=(t,e)=>{for(var r=0,n="";!(r>=e/4);){var a=U[t+r*4>>2];if(a==0)break;if(++r,a>=65536){var o=a-65536;n+=String.fromCharCode(55296|o>>10,56320|o&1023)}else n+=String.fromCharCode(a)}return n},Yn=(t,e,r)=>{if(r===void 0&&(r=2147483647),r<4)return 0;for(var n=e,a=n+r-4,o=0;o<t.length;++o){var i=t.charCodeAt(o);if(i>=55296&&i<=57343){var s=t.charCodeAt(++o);i=65536+((i&1023)<<10)|s&1023}if(U[e>>2]=i,e+=4,e+4>a)break}return U[e>>2]=0,e-n},Nn=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e},Gn=(t,e,r)=>{r=V(r);var n,a,o,i,s;e===2?(n=Un,a=Vn,i=Ln,o=()=>Tt,s=1):e===4&&(n=zn,a=Yn,i=Nn,o=()=>S,s=2),et(t,{name:r,fromWireType:l=>{for(var f=S[l>>2],h=o(),y,v=l+4,T=0;T<=f;++T){var x=l+4+T*e;if(T==f||h[x>>s]==0){var H=x-v,A=n(v,H);y===void 0?y=A:(y+=String.fromCharCode(0),y+=A),v=x+e}}return nt(l),y},toWireType:(l,f)=>{typeof f!="string"&&P(`Cannot pass non-string to C++ string type ${r}`);var h=i(f),y=ee(4+h+e);return S[y>>2]=h>>s,a(f,y+4,h+e),l!==null&&l.push(nt,y),y},argPackAdvance:rt,readValueFromPointer:Yt,destructorFunction(l){nt(l)}})},Xn=(t,e,r,n,a,o)=>{St[t]={name:V(e),rawConstructor:Z(r,n),rawDestructor:Z(a,o),fields:[]}},qn=(t,e,r,n,a,o,i,s,l,f)=>{St[t].fields.push({fieldName:V(e),getterReturnType:r,getter:Z(n,a),getterContext:o,setterArgumentType:i,setter:Z(s,l),setterContext:f})},Jn=(t,e)=>{e=V(e),et(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},Qn={},Zn=t=>{var e=Qn[t];return e===void 0?V(t):e},Xe=()=>{if(typeof globalThis=="object")return globalThis;function t(e){e.$$$embind_global$$$=e;var r=typeof $$$embind_global$$$=="object"&&e.$$$embind_global$$$==e;return r||delete e.$$$embind_global$$$,r}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&t(global)?$$$embind_global$$$=global:typeof self=="object"&&t(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},Kn=t=>t===0?at.toHandle(Xe()):(t=Zn(t),at.toHandle(Xe()[t])),ta=t=>{t>4&&(Q.get(t).refcount+=1)},qe=(t,e)=>{var r=ut[t];return r===void 0&&P(e+" has unknown type "+Ue(t)),r},ea=t=>{var e=new Array(t+1);return function(r,n,a){e[0]=r;for(var o=0;o<t;++o){var i=qe(S[n+o*4>>2],"parameter "+o);e[o+1]=i.readValueFromPointer(a),a+=i.argPackAdvance}var s=new(r.bind.apply(r,e));return at.toHandle(s)}},Je={},ra=(t,e,r,n)=>{t=at.toValue(t);var a=Je[e];return a||(a=ea(e),Je[e]=a),a(t,r,n)},na=(t,e)=>{t=qe(t,"_emval_take_value");var r=t.readValueFromPointer(e);return at.toHandle(r)},aa=()=>{Pt("")},oa=(t,e,r)=>B.copyWithin(t,e,e+r),ia=()=>2147483648,sa=t=>{var e=K.buffer,r=(t-e.byteLength+65535)/65536;try{return K.grow(r),we(),1}catch{}},ua=t=>{var e=B.length;t>>>=0;var r=ia();if(t>r)return!1;for(var n=(l,f)=>l+(f-l%f)%f,a=1;a<=4;a*=2){var o=e*(1+.2/a);o=Math.min(o,t+100663296);var i=Math.min(r,n(Math.max(t,o),65536)),s=sa(i);if(s)return!0}return!1},te={},ca=()=>O||"./this.program",Ct=()=>{if(!Ct.strings){var t=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:t,_:ca()};for(var r in te)te[r]===void 0?delete e[r]:e[r]=te[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);Ct.strings=n}return Ct.strings},la=(t,e)=>{for(var r=0;r<t.length;++r)J[e++>>0]=t.charCodeAt(r);J[e>>0]=0},fa=(t,e)=>{var r=0;return Ct().forEach((n,a)=>{var o=e+r;S[t+a*4>>2]=o,la(n,o),r+=n.length+1}),0},da=(t,e)=>{var r=Ct();S[t>>2]=r.length;var n=0;return r.forEach(a=>n+=a.length+1),S[e>>2]=n,0},ha=t=>t,Ht=t=>t%4===0&&(t%100!==0||t%400===0),pa=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},Qe=[31,29,31,30,31,30,31,31,30,31,30,31],Ze=[31,28,31,30,31,30,31,31,30,31,30,31],ma=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=Ht(r.getFullYear()),a=r.getMonth(),o=(n?Qe:Ze)[a];if(e>o-r.getDate())e-=o-r.getDate()+1,r.setDate(1),a<11?r.setMonth(a+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1));else return r.setDate(r.getDate()+e),r}return r};function ya(t,e,r){var n=r>0?r:Ye(t)+1,a=new Array(n),o=ze(t,a,0,a.length);return e&&(a.length=o),a}var va=(t,e)=>{J.set(t,e)},ga=(t,e,r,n)=>{var a=S[n+40>>2],o={tm_sec:U[n>>2],tm_min:U[n+4>>2],tm_hour:U[n+8>>2],tm_mday:U[n+12>>2],tm_mon:U[n+16>>2],tm_year:U[n+20>>2],tm_wday:U[n+24>>2],tm_yday:U[n+28>>2],tm_isdst:U[n+32>>2],tm_gmtoff:U[n+36>>2],tm_zone:a?Kt(a):""},i=Kt(r),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in s)i=i.replace(new RegExp(l,"g"),s[l]);var f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h=["January","February","March","April","May","June","July","August","September","October","November","December"];function y(d,p,M){for(var I=typeof d=="number"?d.toString():d||"";I.length<p;)I=M[0]+I;return I}function v(d,p){return y(d,p,"0")}function T(d,p){function M(lt){return lt<0?-1:lt>0?1:0}var I;return(I=M(d.getFullYear()-p.getFullYear()))===0&&(I=M(d.getMonth()-p.getMonth()))===0&&(I=M(d.getDate()-p.getDate())),I}function x(d){switch(d.getDay()){case 0:return new Date(d.getFullYear()-1,11,29);case 1:return d;case 2:return new Date(d.getFullYear(),0,3);case 3:return new Date(d.getFullYear(),0,2);case 4:return new Date(d.getFullYear(),0,1);case 5:return new Date(d.getFullYear()-1,11,31);case 6:return new Date(d.getFullYear()-1,11,30)}}function H(d){var p=ma(new Date(d.tm_year+1900,0,1),d.tm_yday),M=new Date(p.getFullYear(),0,4),I=new Date(p.getFullYear()+1,0,4),lt=x(M),kt=x(I);return T(lt,p)<=0?T(kt,p)<=0?p.getFullYear()+1:p.getFullYear():p.getFullYear()-1}var A={"%a":d=>f[d.tm_wday].substring(0,3),"%A":d=>f[d.tm_wday],"%b":d=>h[d.tm_mon].substring(0,3),"%B":d=>h[d.tm_mon],"%C":d=>{var p=d.tm_year+1900;return v(p/100|0,2)},"%d":d=>v(d.tm_mday,2),"%e":d=>y(d.tm_mday,2," "),"%g":d=>H(d).toString().substring(2),"%G":d=>H(d),"%H":d=>v(d.tm_hour,2),"%I":d=>{var p=d.tm_hour;return p==0?p=12:p>12&&(p-=12),v(p,2)},"%j":d=>v(d.tm_mday+pa(Ht(d.tm_year+1900)?Qe:Ze,d.tm_mon-1),3),"%m":d=>v(d.tm_mon+1,2),"%M":d=>v(d.tm_min,2),"%n":()=>`
|
|
3
|
-
`,"%p":d=>d.tm_hour>=0&&d.tm_hour<12?"AM":"PM","%S":d=>v(d.tm_sec,2),"%t":()=>" ","%u":d=>d.tm_wday||7,"%U":d=>{var p=d.tm_yday+7-d.tm_wday;return v(Math.floor(p/7),2)},"%V":d=>{var p=Math.floor((d.tm_yday+7-(d.tm_wday+6)%7)/7);if((d.tm_wday+371-d.tm_yday-2)%7<=2&&p++,p){if(p==53){var M=(d.tm_wday+371-d.tm_yday)%7;M!=4&&(M!=3||!Ht(d.tm_year))&&(p=1)}}else{p=52;var I=(d.tm_wday+7-d.tm_yday-1)%7;(I==4||I==5&&Ht(d.tm_year%400-1))&&p++}return v(p,2)},"%w":d=>d.tm_wday,"%W":d=>{var p=d.tm_yday+7-(d.tm_wday+6)%7;return v(Math.floor(p/7),2)},"%y":d=>(d.tm_year+1900).toString().substring(2),"%Y":d=>d.tm_year+1900,"%z":d=>{var p=d.tm_gmtoff,M=p>=0;return p=Math.abs(p)/60,p=p/60*100+p%60,(M?"+":"-")+("0000"+p).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};i=i.replace(/%%/g,"\0\0");for(var l in A)i.includes(l)&&(i=i.replace(new RegExp(l,"g"),A[l](o)));i=i.replace(/\0\0/g,"%");var W=
|
|
1
|
+
var cr=(R,V,q)=>{if(!V.has(R))throw TypeError("Cannot "+q)};var ne=(R,V,q)=>(cr(R,V,"read from private field"),q?q.call(R):V.get(R)),lr=(R,V,q)=>{if(V.has(R))throw TypeError("Cannot add the same private member more than once");V instanceof WeakSet?V.add(R):V.set(R,q)},fr=(R,V,q,pt)=>(cr(R,V,"write to private field"),pt?pt.call(R,q):V.set(R,q),q);var BarcodeDetectionAPI=function(R){var ft;"use strict";const V=["aztec","code_128","code_39","code_93","codabar","data_matrix","ean_13","ean_8","itf","pdf417","qr_code","upc_a","upc_e","unknown"];function q(c){if(pt(c))return{width:c.naturalWidth,height:c.naturalHeight};if(ae(c))return{width:c.width.baseVal.value,height:c.height.baseVal.value};if(oe(c))return{width:c.videoWidth,height:c.videoHeight};if(se(c))return{width:c.width,height:c.height};if(ce(c))return{width:c.displayWidth,height:c.displayHeight};if(ie(c))return{width:c.width,height:c.height};if(ue(c))return{width:c.width,height:c.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}function pt(c){try{return c instanceof HTMLImageElement}catch{return!1}}function ae(c){try{return c instanceof SVGImageElement}catch{return!1}}function oe(c){try{return c instanceof HTMLVideoElement}catch{return!1}}function ie(c){try{return c instanceof HTMLCanvasElement}catch{return!1}}function se(c){try{return c instanceof ImageBitmap}catch{return!1}}function ue(c){try{return c instanceof OffscreenCanvas}catch{return!1}}function ce(c){try{return c instanceof VideoFrame}catch{return!1}}function le(c){try{return c instanceof Blob}catch{return!1}}function dr(c){try{return c instanceof ImageData}catch{return!1}}function hr(c,m){try{const u=new OffscreenCanvas(c,m);if(u.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return u;throw void 0}catch{const u=document.createElement("canvas");return u.width=c,u.height=m,u}}async function fe(c){if(pt(c)&&!await vr(c))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(ae(c)&&!await gr(c))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(ce(c)&&wr(c))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(oe(c)&&(c.readyState===0||c.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(se(c)&&br(c))throw new DOMException("The image source is detached.","InvalidStateError");const{width:m,height:u}=q(c);if(m===0||u===0)return null;const $=hr(m,u).getContext("2d");$.drawImage(c,0,0);try{return $.getImageData(0,0,m,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function pr(c){let m;try{if(createImageBitmap)m=await createImageBitmap(c);else if(Image){m=new Image;let g="";try{g=URL.createObjectURL(c),m.src=g,await m.decode()}finally{URL.revokeObjectURL(g)}}else return c}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await fe(m)}function mr(c){const{width:m,height:u}=c;if(m===0||u===0)return null;const g=c.getContext("2d");try{return g.getImageData(0,0,m,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function yr(c){if(le(c))return await pr(c);if(dr(c)){if($r(c))throw new DOMException("The image data has been detached.","InvalidStateError");return c}return ie(c)||ue(c)?mr(c):await fe(c)}async function vr(c){try{return await c.decode(),!0}catch{return!1}}async function gr(c){var m;try{return await((m=c.decode)==null?void 0:m.call(c)),!0}catch{return!1}}function wr(c){return c.format===null}function $r(c){return c.data.buffer.byteLength===0}function br(c){return c.width===0&&c.height===0}function de(c,m){return c instanceof DOMException?new DOMException(`${m}: ${c.message}`,c.name):c instanceof Error?new c.constructor(`${m}: ${c.message}`):new Error(`${m}: ${c}`)}const he=c=>{let m;const u=new Set,g=(O,G)=>{const j=typeof O=="function"?O(m):O;if(!Object.is(j,m)){const F=m;m=G??typeof j!="object"?j:Object.assign({},m,j),u.forEach(z=>z(m,F))}},$=()=>m,w={setState:g,getState:$,subscribe:O=>(u.add(O),()=>u.delete(O)),destroy:()=>{u.clear()}};return m=c(g,$,w),w},Cr=c=>c?he(c):he,_r={locateFile:(c,m)=>{var u;const g=(u=c.match(/_(.+?)\.wasm$/))==null?void 0:u[1];return g?`https://fastly.jsdelivr.net/npm/@sec-ant/zxing-wasm@2.1.6/dist/${g}/${c}`:m+c}},ot=Cr()(()=>({zxingModuleWeakMap:new WeakMap,zxingModuleOverrides:_r}));function Tr(c){ot.setState({zxingModuleOverrides:c})}function Bt(c,m=ot.getState().zxingModuleOverrides){const{zxingModuleWeakMap:u}=ot.getState(),g=u.get(c);if(g&&Object.is(m,ot.getState().zxingModuleOverrides))return g;{ot.setState({zxingModuleOverrides:m});const $=c(m);return u.set(c,$),$}}const pe=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","UPC-A","UPC-E"],k={tryHarder:!0,formats:[],maxSymbols:255};async function Pr(c,{tryHarder:m=k.tryHarder,formats:u=k.formats,maxSymbols:g=k.maxSymbols}=k,$){const w=await Bt($,ot.getState().zxingModuleOverrides),{size:O}=c,G=new Uint8Array(await c.arrayBuffer()),j=w._malloc(O);w.HEAPU8.set(G,j);const F=w.readBarcodesFromImage(j,O,m,me(u),g);w._free(j);const z=[];for(let Y=0;Y<F.size();++Y){const L=F.get(Y);z.push({...L,format:ye(L.format)})}return z}async function Er(c,{tryHarder:m=k.tryHarder,formats:u=k.formats,maxSymbols:g=k.maxSymbols}=k,$){const w=await Bt($,ot.getState().zxingModuleOverrides),{data:O,width:G,height:j,data:{byteLength:F}}=c,z=w._malloc(F);w.HEAPU8.set(O,z);const Y=w.readBarcodesFromPixmap(z,G,j,m,me(u),g);w._free(z);const L=[];for(let X=0;X<Y.size();++X){const K=Y.get(X);L.push({...K,format:ye(K.format)})}return L}function me(c){return c.join("|")}function ye(c){const m=ve(c);let u=0,g=pe.length-1;for(;u<=g;){const $=Math.floor((u+g)/2),w=pe[$],O=ve(w);if(O===m)return w;O<m?u=$+1:g=$-1}return"None"}function ve(c){return c.toLowerCase().replace(/_-\[\]/g,"")}var Ut=(()=>{var c=document.currentScript&&document.currentScript.src||new URL("pure.js",document.baseURI).href;return function(m={}){var u=m,g,$;u.ready=new Promise((t,e)=>{g=t,$=e});var w=Object.assign({},u),O="./this.program",G=typeof window=="object",j=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var F="";function z(t){return u.locateFile?u.locateFile(t,F):F+t}var Y;(G||j)&&(j?F=self.location.href:typeof document<"u"&&document.currentScript&&(F=document.currentScript.src),c&&(F=c),F.indexOf("blob:")!==0?F=F.substr(0,F.replace(/[?#].*/,"").lastIndexOf("/")+1):F="",j&&(Y=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)})),u.print||console.log.bind(console);var L=u.printErr||console.error.bind(console);Object.assign(u,w),w=null,u.arguments&&u.arguments,u.thisProgram&&(O=u.thisProgram),u.quit&&u.quit;var X;u.wasmBinary&&(X=u.wasmBinary),typeof WebAssembly!="object"&>("no native wasm support detected");var K,mt=!1;function Lt(t,e){t||gt(e)}var J,N,yt,Pt,B,S,ge,we;function $e(){var t=K.buffer;u.HEAP8=J=new Int8Array(t),u.HEAP16=yt=new Int16Array(t),u.HEAPU8=N=new Uint8Array(t),u.HEAPU16=Pt=new Uint16Array(t),u.HEAP32=B=new Int32Array(t),u.HEAPU32=S=new Uint32Array(t),u.HEAPF32=ge=new Float32Array(t),u.HEAPF64=we=new Float64Array(t)}var be=[],Ce=[],_e=[];function Fr(){if(u.preRun)for(typeof u.preRun=="function"&&(u.preRun=[u.preRun]);u.preRun.length;)Ir(u.preRun.shift());zt(be)}function Mr(){zt(Ce)}function jr(){if(u.postRun)for(typeof u.postRun=="function"&&(u.postRun=[u.postRun]);u.postRun.length;)Hr(u.postRun.shift());zt(_e)}function Ir(t){be.unshift(t)}function Rr(t){Ce.unshift(t)}function Hr(t){_e.unshift(t)}var it=0,vt=null;function Wr(t){it++,u.monitorRunDependencies&&u.monitorRunDependencies(it)}function kr(t){if(it--,u.monitorRunDependencies&&u.monitorRunDependencies(it),it==0&&vt){var e=vt;vt=null,e()}}function gt(t){u.onAbort&&u.onAbort(t),t="Aborted("+t+")",L(t),mt=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw $(e),e}var Br="data:application/octet-stream;base64,",Te=t=>t.startsWith(Br),st;u.locateFile?(st="zxing_reader.wasm",Te(st)||(st=z(st))):st=new URL("/reader/zxing_reader.wasm",self.location).href;function Pe(t){if(t==st&&X)return new Uint8Array(X);if(Y)return Y(t);throw"both async and sync fetching of the wasm failed"}function Ur(t){return!X&&(G||j)&&typeof fetch=="function"?fetch(t,{credentials:"same-origin"}).then(e=>{if(!e.ok)throw"failed to load wasm binary file at '"+t+"'";return e.arrayBuffer()}).catch(()=>Pe(t)):Promise.resolve().then(()=>Pe(t))}function Ee(t,e,r){return Ur(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{L(`failed to asynchronously prepare wasm: ${n}`),gt(n)})}function Vr(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!Te(e)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(a=>{var o=WebAssembly.instantiateStreaming(a,r);return o.then(n,function(i){return L(`wasm streaming compile failed: ${i}`),L("falling back to ArrayBuffer instantiation"),Ee(e,r,n)})}):Ee(e,r,n)}function Lr(){var t={a:Ca};function e(n,a){return D=n.exports,K=D.ra,$e(),Be=D.va,Rr(D.sa),kr(),D}Wr();function r(n){e(n.instance)}if(u.instantiateWasm)try{return u.instantiateWasm(t,e)}catch(n){L(`Module.instantiateWasm callback failed with error: ${n}`),$(n)}return Vr(X,st,t,r).catch($),{}}var zt=t=>{for(;t.length>0;)t.shift()(u)};u.noExitRuntime;var Et=[],xt=0,zr=t=>{var e=new At(t);return e.get_caught()||(e.set_caught(!0),xt--),e.set_rethrown(!1),Et.push(e),nr(e.excPtr),e.get_exception_ptr()},tt=0,Yr=()=>{b(0,0);var t=Et.pop();rr(t.excPtr),tt=0};function At(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(e){S[this.ptr+4>>2]=e},this.get_type=function(){return S[this.ptr+4>>2]},this.set_destructor=function(e){S[this.ptr+8>>2]=e},this.get_destructor=function(){return S[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,J[this.ptr+12>>0]=e},this.get_caught=function(){return J[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,J[this.ptr+13>>0]=e},this.get_rethrown=function(){return J[this.ptr+13>>0]!=0},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){S[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return S[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=or(this.get_type());if(e)return S[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}var Nr=t=>{throw tt||(tt=t),tt},Yt=t=>{var e=tt;if(!e)return Tt(0),0;var r=new At(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return Tt(0),e;for(var a in t){var o=t[a];if(o===0||o===n)break;var i=r.ptr+16;if(ar(o,n,i))return Tt(o),e}return Tt(n),e},Gr=()=>Yt([]),Xr=t=>Yt([t]),qr=(t,e)=>Yt([t,e]),Jr=t=>{var e=new At(t).get_exception_ptr();return e},Qr=()=>{var t=Et.pop();t||gt("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(Et.push(t),t.set_rethrown(!0),t.set_caught(!1),xt++),tt=e,tt},Zr=(t,e,r)=>{var n=new At(t);throw n.init(e,r),tt=t,xt++,tt},Kr=()=>xt,St={},xe=t=>{for(;t.length;){var e=t.pop(),r=t.pop();r(e)}};function Nt(t){return this.fromWireType(B[t>>2])}var dt={},ut={},Dt={},Ae,Ot=t=>{throw new Ae(t)},ct=(t,e,r)=>{t.forEach(function(s){Dt[s]=e});function n(s){var l=r(s);l.length!==t.length&&Ot("Mismatched type converter count");for(var f=0;f<t.length;++f)et(t[f],l[f])}var a=new Array(e.length),o=[],i=0;e.forEach((s,l)=>{ut.hasOwnProperty(s)?a[l]=ut[s]:(o.push(s),dt.hasOwnProperty(s)||(dt[s]=[]),dt[s].push(()=>{a[l]=ut[s],++i,i===o.length&&n(a)}))}),o.length===0&&n(a)},tn=t=>{var e=St[t];delete St[t];var r=e.rawConstructor,n=e.rawDestructor,a=e.fields,o=a.map(i=>i.getterReturnType).concat(a.map(i=>i.setterArgumentType));ct([t],o,i=>{var s={};return a.forEach((l,f)=>{var h=l.fieldName,y=i[f],v=l.getter,P=l.getterContext,x=i[f+a.length],H=l.setter,A=l.setterContext;s[h]={read:W=>y.fromWireType(v(P,W)),write:(W,d)=>{var p=[];H(A,W,x.toWireType(p,d)),xe(p)}}}),[{name:e.name,fromWireType:l=>{var f={};for(var h in s)f[h]=s[h].read(l);return n(l),f},toWireType:(l,f)=>{for(var h in s)if(!(h in f))throw new TypeError(`Missing field: "${h}"`);var y=r();for(h in s)s[h].write(y,f[h]);return l!==null&&l.push(n,y),y},argPackAdvance:rt,readValueFromPointer:Nt,destructorFunction:n}]})},en=(t,e,r,n,a)=>{},rn=()=>{for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);Se=t},Se,U=t=>{for(var e="",r=t;N[r];)e+=Se[N[r++]];return e},ht,E=t=>{throw new ht(t)};function nn(t,e,r={}){var n=e.name;if(t||E(`type "${n}" must have a positive integer typeid pointer`),ut.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;E(`Cannot register type '${n}' twice`)}if(ut[t]=e,delete Dt[t],dt.hasOwnProperty(t)){var a=dt[t];delete dt[t],a.forEach(o=>o())}}function et(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return nn(t,e,r)}var rt=8,an=(t,e,r,n)=>{e=U(e),et(t,{name:e,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?r:n},argPackAdvance:rt,readValueFromPointer:function(a){return this.fromWireType(N[a])},destructorFunction:null})},on=t=>({count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}),Gt=t=>{function e(r){return r.$$.ptrType.registeredClass.name}E(e(t)+" instance already deleted")},Xt=!1,De=t=>{},sn=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},Oe=t=>{t.count.value-=1;var e=t.count.value===0;e&&sn(t)},Fe=(t,e,r)=>{if(e===r)return t;if(r.baseClass===void 0)return null;var n=Fe(t,e,r.baseClass);return n===null?null:r.downcast(n)},Me={},un=()=>Object.keys(bt).length,cn=()=>{var t=[];for(var e in bt)bt.hasOwnProperty(e)&&t.push(bt[e]);return t},wt=[],qt=()=>{for(;wt.length;){var t=wt.pop();t.$$.deleteScheduled=!1,t.delete()}},$t,ln=t=>{$t=t,wt.length&&$t&&$t(qt)},fn=()=>{u.getInheritedInstanceCount=un,u.getLiveInheritedInstances=cn,u.flushPendingDeletes=qt,u.setDelayFunction=ln},bt={},dn=(t,e)=>{for(e===void 0&&E("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},hn=(t,e)=>(e=dn(t,e),bt[e]),Ft=(t,e)=>{(!e.ptrType||!e.ptr)&&Ot("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&Ot("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Ct(Object.create(t,{$$:{value:e}}))};function pn(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=hn(this.registeredClass,e);if(r!==void 0){if(r.$$.count.value===0)return r.$$.ptr=e,r.$$.smartPtr=t,r.clone();var n=r.clone();return this.destructor(t),n}function a(){return this.isSmartPointer?Ft(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):Ft(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var o=this.registeredClass.getActualType(e),i=Me[o];if(!i)return a.call(this);var s;this.isConst?s=i.constPointerType:s=i.pointerType;var l=Fe(e,this.registeredClass,s.registeredClass);return l===null?a.call(this):this.isSmartPointer?Ft(s.registeredClass.instancePrototype,{ptrType:s,ptr:l,smartPtrType:this,smartPtr:t}):Ft(s.registeredClass.instancePrototype,{ptrType:s,ptr:l})}var Ct=t=>typeof FinalizationRegistry>"u"?(Ct=e=>e,t):(Xt=new FinalizationRegistry(e=>{Oe(e.$$)}),Ct=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Xt.register(e,a,e)}return e},De=e=>Xt.unregister(e),Ct(t)),mn=()=>{Object.assign(Mt.prototype,{isAliasOf(t){if(!(this instanceof Mt)||!(t instanceof Mt))return!1;var e=this.$$.ptrType.registeredClass,r=this.$$.ptr;t.$$=t.$$;for(var n=t.$$.ptrType.registeredClass,a=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)a=n.upcast(a),n=n.baseClass;return e===n&&r===a},clone(){if(this.$$.ptr||Gt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=Ct(Object.create(Object.getPrototypeOf(this),{$$:{value:on(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||Gt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&E("Object already scheduled for deletion"),De(this),Oe(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Gt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&E("Object already scheduled for deletion"),wt.push(this),wt.length===1&&$t&&$t(qt),this.$$.deleteScheduled=!0,this}})};function Mt(){}var yn=48,vn=57,je=t=>{if(t===void 0)return"_unknown";t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=yn&&e<=vn?`_${t}`:t};function Ie(t,e){return t=je(t),{[t]:function(){return e.apply(this,arguments)}}[t]}var Re=(t,e,r)=>{if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||E(`Function '${r}' called with an invalid number of arguments (${arguments.length}) - expects one of (${t[e].overloadTable})!`),t[e].overloadTable[arguments.length].apply(this,arguments)},t[e].overloadTable=[],t[e].overloadTable[n.argCount]=n}},He=(t,e,r)=>{u.hasOwnProperty(t)?((r===void 0||u[t].overloadTable!==void 0&&u[t].overloadTable[r]!==void 0)&&E(`Cannot register public name '${t}' twice`),Re(u,t,t),u.hasOwnProperty(r)&&E(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),u[t].overloadTable[r]=e):(u[t]=e,r!==void 0&&(u[t].numArguments=r))};function gn(t,e,r,n,a,o,i,s){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=i,this.downcast=s,this.pureVirtualFunctions=[]}var Jt=(t,e,r)=>{for(;e!==r;)e.upcast||E(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t};function wn(t,e){if(e===null)return this.isReference&&E(`null is not a valid ${this.name}`),0;e.$$||E(`Cannot pass "${Kt(e)}" as a ${this.name}`),e.$$.ptr||E(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Jt(e.$$.ptr,r,this.registeredClass);return n}function $n(t,e){var r;if(e===null)return this.isReference&&E(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;e.$$||E(`Cannot pass "${Kt(e)}" as a ${this.name}`),e.$$.ptr||E(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&E(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);var n=e.$$.ptrType.registeredClass;if(r=Jt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&E("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:E(`Cannot convert argument of type ${e.$$.smartPtrType?e.$$.smartPtrType.name:e.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:r=e.$$.smartPtr;break;case 2:if(e.$$.smartPtrType===this)r=e.$$.smartPtr;else{var a=e.clone();r=this.rawShare(r,at.toHandle(()=>a.delete())),t!==null&&t.push(this.rawDestructor,r)}break;default:E("Unsupporting sharing policy")}return r}function bn(t,e){if(e===null)return this.isReference&&E(`null is not a valid ${this.name}`),0;e.$$||E(`Cannot pass "${Kt(e)}" as a ${this.name}`),e.$$.ptr||E(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&E(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Jt(e.$$.ptr,r,this.registeredClass);return n}function We(t){return this.fromWireType(S[t>>2])}var Cn=()=>{Object.assign(jt.prototype,{getPointee(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},destructor(t){this.rawDestructor&&this.rawDestructor(t)},argPackAdvance:rt,readValueFromPointer:We,deleteObject(t){t!==null&&t.delete()},fromWireType:pn})};function jt(t,e,r,n,a,o,i,s,l,f,h){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=i,this.rawGetPointee=s,this.rawConstructor=l,this.rawShare=f,this.rawDestructor=h,!a&&e.baseClass===void 0?n?(this.toWireType=wn,this.destructorFunction=null):(this.toWireType=bn,this.destructorFunction=null):this.toWireType=$n}var ke=(t,e,r)=>{u.hasOwnProperty(t)||Ot("Replacing nonexistant public symbol"),u[t].overloadTable!==void 0&&r!==void 0?u[t].overloadTable[r]=e:(u[t]=e,u[t].argCount=r)},_n=(t,e,r)=>{var n=u["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},It=[],Be,T=t=>{var e=It[t];return e||(t>=It.length&&(It.length=t+1),It[t]=e=Be.get(t)),e},Tn=(t,e,r)=>{if(t.includes("j"))return _n(t,e,r);var n=T(e).apply(null,r);return n},Pn=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),Tn(t,e,r)}},Z=(t,e)=>{t=U(t);function r(){return t.includes("j")?Pn(t,e):T(e)}var n=r();return typeof n!="function"&&E(`unknown function pointer with signature ${t}: ${e}`),n},En=(t,e)=>{var r=Ie(e,function(n){this.name=e,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+`
|
|
2
|
+
`+a.replace(/^Error(:[^\n]*)?\n/,""))});return r.prototype=Object.create(t.prototype),r.prototype.constructor=r,r.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},r},Ue,Ve=t=>{var e=er(t),r=U(e);return nt(e),r},Rt=(t,e)=>{var r=[],n={};function a(o){if(!n[o]&&!ut[o]){if(Dt[o]){Dt[o].forEach(a);return}r.push(o),n[o]=!0}}throw e.forEach(a),new Ue(`${t}: `+r.map(Ve).join([", "]))},xn=(t,e,r,n,a,o,i,s,l,f,h,y,v)=>{h=U(h),o=Z(a,o),s&&(s=Z(i,s)),f&&(f=Z(l,f)),v=Z(y,v);var P=je(h);He(P,function(){Rt(`Cannot construct ${h} due to unbound types`,[n])}),ct([t,e,r],n?[n]:[],function(x){x=x[0];var H,A;n?(H=x.registeredClass,A=H.instancePrototype):A=Mt.prototype;var W=Ie(P,function(){if(Object.getPrototypeOf(this)!==d)throw new ht("Use 'new' to construct "+h);if(p.constructor_body===void 0)throw new ht(h+" has no accessible constructor");var kt=p.constructor_body[arguments.length];if(kt===void 0)throw new ht(`Tried to invoke ctor of ${h} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(p.constructor_body).toString()}) parameters instead!`);return kt.apply(this,arguments)}),d=Object.create(A,{constructor:{value:W}});W.prototype=d;var p=new gn(h,W,d,v,H,o,s,f);p.baseClass&&(p.baseClass.__derivedClasses===void 0&&(p.baseClass.__derivedClasses=[]),p.baseClass.__derivedClasses.push(p));var M=new jt(h,p,!0,!1,!1),I=new jt(h+"*",p,!1,!1,!1),lt=new jt(h+" const*",p,!1,!0,!1);return Me[t]={pointerType:I,constPointerType:lt},ke(P,W),[M,I,lt]})},Qt=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(S[e+n*4>>2]);return r};function Zt(t,e,r,n,a,o){var i=e.length;i<2&&E("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=e[1]!==null&&r!==null,l=!1,f=1;f<e.length;++f)if(e[f]!==null&&e[f].destructorFunction===void 0){l=!0;break}var h=e[0].name!=="void",y=i-2,v=new Array(y),P=[],x=[];return function(){arguments.length!==y&&E(`function ${t} called with ${arguments.length} arguments, expected ${y}`),x.length=0;var H;P.length=s?2:1,P[0]=a,s&&(H=e[1].toWireType(x,this),P[1]=H);for(var A=0;A<y;++A)v[A]=e[A+2].toWireType(x,arguments[A]),P.push(v[A]);var W=n.apply(null,P);function d(p){if(l)xe(x);else for(var M=s?1:2;M<e.length;M++){var I=M===1?H:v[M-2];e[M].destructorFunction!==null&&e[M].destructorFunction(I)}if(h)return e[0].fromWireType(p)}return d(W)}}var An=(t,e,r,n,a,o)=>{var i=Qt(e,r);a=Z(n,a),ct([],[t],function(s){s=s[0];var l=`constructor ${s.name}`;if(s.registeredClass.constructor_body===void 0&&(s.registeredClass.constructor_body=[]),s.registeredClass.constructor_body[e-1]!==void 0)throw new ht(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${s.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return s.registeredClass.constructor_body[e-1]=()=>{Rt(`Cannot construct ${s.name} due to unbound types`,i)},ct([],i,f=>(f.splice(1,0,null),s.registeredClass.constructor_body[e-1]=Zt(l,f,null,a,o),[])),[]})},Le=t=>{t=t.trim();const e=t.indexOf("(");return e!==-1?(Lt(t[t.length-1]==")","Parentheses for argument names should match."),t.substr(0,e)):t},Sn=(t,e,r,n,a,o,i,s,l)=>{var f=Qt(r,n);e=U(e),e=Le(e),o=Z(a,o),ct([],[t],function(h){h=h[0];var y=`${h.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&h.registeredClass.pureVirtualFunctions.push(e);function v(){Rt(`Cannot call ${y} due to unbound types`,f)}var P=h.registeredClass.instancePrototype,x=P[e];return x===void 0||x.overloadTable===void 0&&x.className!==h.name&&x.argCount===r-2?(v.argCount=r-2,v.className=h.name,P[e]=v):(Re(P,e,y),P[e].overloadTable[r-2]=v),ct([],f,function(H){var A=Zt(y,H,h,o,i);return P[e].overloadTable===void 0?(A.argCount=r-2,P[e]=A):P[e].overloadTable[r-2]=A,[]}),[]})};function Dn(){Object.assign(ze.prototype,{get(t){return this.allocated[t]},has(t){return this.allocated[t]!==void 0},allocate(t){var e=this.freelist.pop()||this.allocated.length;return this.allocated[e]=t,e},free(t){this.allocated[t]=void 0,this.freelist.push(t)}})}function ze(){this.allocated=[void 0],this.freelist=[]}var Q=new ze,Ye=t=>{t>=Q.reserved&&--Q.get(t).refcount===0&&Q.free(t)},On=()=>{for(var t=0,e=Q.reserved;e<Q.allocated.length;++e)Q.allocated[e]!==void 0&&++t;return t},Fn=()=>{Q.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),Q.reserved=Q.allocated.length,u.count_emval_handles=On},at={toValue:t=>(t||E("Cannot use deleted val. handle = "+t),Q.get(t).value),toHandle:t=>{switch(t){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Q.allocate({refcount:1,value:t})}}},Mn=(t,e)=>{e=U(e),et(t,{name:e,fromWireType:r=>{var n=at.toValue(r);return Ye(r),n},toWireType:(r,n)=>at.toHandle(n),argPackAdvance:rt,readValueFromPointer:Nt,destructorFunction:null})},Kt=t=>{if(t===null)return"null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t},jn=(t,e)=>{switch(e){case 4:return function(r){return this.fromWireType(ge[r>>2])};case 8:return function(r){return this.fromWireType(we[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},In=(t,e,r)=>{e=U(e),et(t,{name:e,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:rt,readValueFromPointer:jn(e,r),destructorFunction:null})},Rn=(t,e,r,n,a,o,i)=>{var s=Qt(e,r);t=U(t),t=Le(t),a=Z(n,a),He(t,function(){Rt(`Cannot call ${t} due to unbound types`,s)},e-1),ct([],s,function(l){var f=[l[0],null].concat(l.slice(1));return ke(t,Zt(t,f,null,a,o),e-1),[]})},Hn=(t,e,r)=>{switch(e){case 1:return r?n=>J[n>>0]:n=>N[n>>0];case 2:return r?n=>yt[n>>1]:n=>Pt[n>>1];case 4:return r?n=>B[n>>2]:n=>S[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},Wn=(t,e,r,n,a)=>{e=U(e);var o=h=>h;if(n===0){var i=32-8*r;o=h=>h<<i>>>i}var s=e.includes("unsigned"),l=(h,y)=>{},f;s?f=function(h,y){return l(y,this.name),y>>>0}:f=function(h,y){return l(y,this.name),y},et(t,{name:e,fromWireType:o,toWireType:f,argPackAdvance:rt,readValueFromPointer:Hn(e,r,n!==0),destructorFunction:null})},kn=(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function o(i){var s=S[i>>2],l=S[i+4>>2];return new a(J.buffer,l,s)}r=U(r),et(t,{name:r,fromWireType:o,argPackAdvance:rt,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},Ne=(t,e,r,n)=>{if(!(n>0))return 0;for(var a=r,o=r+n-1,i=0;i<t.length;++i){var s=t.charCodeAt(i);if(s>=55296&&s<=57343){var l=t.charCodeAt(++i);s=65536+((s&1023)<<10)|l&1023}if(s<=127){if(r>=o)break;e[r++]=s}else if(s<=2047){if(r+1>=o)break;e[r++]=192|s>>6,e[r++]=128|s&63}else if(s<=65535){if(r+2>=o)break;e[r++]=224|s>>12,e[r++]=128|s>>6&63,e[r++]=128|s&63}else{if(r+3>=o)break;e[r++]=240|s>>18,e[r++]=128|s>>12&63,e[r++]=128|s>>6&63,e[r++]=128|s&63}}return e[r]=0,r-a},Bn=(t,e,r)=>Ne(t,N,e,r),Ge=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++r):e+=3}return e},Xe=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,Un=(t,e,r)=>{for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&Xe)return Xe.decode(t.subarray(e,a));for(var o="";e<a;){var i=t[e++];if(!(i&128)){o+=String.fromCharCode(i);continue}var s=t[e++]&63;if((i&224)==192){o+=String.fromCharCode((i&31)<<6|s);continue}var l=t[e++]&63;if((i&240)==224?i=(i&15)<<12|s<<6|l:i=(i&7)<<18|s<<12|l<<6|t[e++]&63,i<65536)o+=String.fromCharCode(i);else{var f=i-65536;o+=String.fromCharCode(55296|f>>10,56320|f&1023)}}return o},te=(t,e)=>t?Un(N,t,e):"",Vn=(t,e)=>{e=U(e);var r=e==="std::string";et(t,{name:e,fromWireType(n){var a=S[n>>2],o=n+4,i;if(r)for(var s=o,l=0;l<=a;++l){var f=o+l;if(l==a||N[f]==0){var h=f-s,y=te(s,h);i===void 0?i=y:(i+=String.fromCharCode(0),i+=y),s=f+1}}else{for(var v=new Array(a),l=0;l<a;++l)v[l]=String.fromCharCode(N[o+l]);i=v.join("")}return nt(n),i},toWireType(n,a){a instanceof ArrayBuffer&&(a=new Uint8Array(a));var o,i=typeof a=="string";i||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int8Array||E("Cannot pass non-string to std::string"),r&&i?o=Ge(a):o=a.length;var s=re(4+o+1),l=s+4;if(S[s>>2]=o,r&&i)Bn(a,l,o+1);else if(i)for(var f=0;f<o;++f){var h=a.charCodeAt(f);h>255&&(nt(l),E("String has UTF-16 code units that do not fit in 8 bits")),N[l+f]=h}else for(var f=0;f<o;++f)N[l+f]=a[f];return n!==null&&n.push(nt,s),s},argPackAdvance:rt,readValueFromPointer:We,destructorFunction(n){nt(n)}})},qe=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Ln=(t,e)=>{for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&Pt[n];)++n;if(r=n<<1,r-t>32&&qe)return qe.decode(N.subarray(t,r));for(var o="",i=0;!(i>=e/2);++i){var s=yt[t+i*2>>1];if(s==0)break;o+=String.fromCharCode(s)}return o},zn=(t,e,r)=>{if(r===void 0&&(r=2147483647),r<2)return 0;r-=2;for(var n=e,a=r<t.length*2?r/2:t.length,o=0;o<a;++o){var i=t.charCodeAt(o);yt[e>>1]=i,e+=2}return yt[e>>1]=0,e-n},Yn=t=>t.length*2,Nn=(t,e)=>{for(var r=0,n="";!(r>=e/4);){var a=B[t+r*4>>2];if(a==0)break;if(++r,a>=65536){var o=a-65536;n+=String.fromCharCode(55296|o>>10,56320|o&1023)}else n+=String.fromCharCode(a)}return n},Gn=(t,e,r)=>{if(r===void 0&&(r=2147483647),r<4)return 0;for(var n=e,a=n+r-4,o=0;o<t.length;++o){var i=t.charCodeAt(o);if(i>=55296&&i<=57343){var s=t.charCodeAt(++o);i=65536+((i&1023)<<10)|s&1023}if(B[e>>2]=i,e+=4,e+4>a)break}return B[e>>2]=0,e-n},Xn=t=>{for(var e=0,r=0;r<t.length;++r){var n=t.charCodeAt(r);n>=55296&&n<=57343&&++r,e+=4}return e},qn=(t,e,r)=>{r=U(r);var n,a,o,i,s;e===2?(n=Ln,a=zn,i=Yn,o=()=>Pt,s=1):e===4&&(n=Nn,a=Gn,i=Xn,o=()=>S,s=2),et(t,{name:r,fromWireType:l=>{for(var f=S[l>>2],h=o(),y,v=l+4,P=0;P<=f;++P){var x=l+4+P*e;if(P==f||h[x>>s]==0){var H=x-v,A=n(v,H);y===void 0?y=A:(y+=String.fromCharCode(0),y+=A),v=x+e}}return nt(l),y},toWireType:(l,f)=>{typeof f!="string"&&E(`Cannot pass non-string to C++ string type ${r}`);var h=i(f),y=re(4+h+e);return S[y>>2]=h>>s,a(f,y+4,h+e),l!==null&&l.push(nt,y),y},argPackAdvance:rt,readValueFromPointer:Nt,destructorFunction(l){nt(l)}})},Jn=(t,e,r,n,a,o)=>{St[t]={name:U(e),rawConstructor:Z(r,n),rawDestructor:Z(a,o),fields:[]}},Qn=(t,e,r,n,a,o,i,s,l,f)=>{St[t].fields.push({fieldName:U(e),getterReturnType:r,getter:Z(n,a),getterContext:o,setterArgumentType:i,setter:Z(s,l),setterContext:f})},Zn=(t,e)=>{e=U(e),et(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},Kn={},ta=t=>{var e=Kn[t];return e===void 0?U(t):e},Je=()=>{if(typeof globalThis=="object")return globalThis;function t(e){e.$$$embind_global$$$=e;var r=typeof $$$embind_global$$$=="object"&&e.$$$embind_global$$$==e;return r||delete e.$$$embind_global$$$,r}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&t(global)?$$$embind_global$$$=global:typeof self=="object"&&t(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},ea=t=>t===0?at.toHandle(Je()):(t=ta(t),at.toHandle(Je()[t])),ra=t=>{t>4&&(Q.get(t).refcount+=1)},Qe=(t,e)=>{var r=ut[t];return r===void 0&&E(e+" has unknown type "+Ve(t)),r},na=t=>{var e=new Array(t+1);return function(r,n,a){e[0]=r;for(var o=0;o<t;++o){var i=Qe(S[n+o*4>>2],"parameter "+o);e[o+1]=i.readValueFromPointer(a),a+=i.argPackAdvance}var s=new(r.bind.apply(r,e));return at.toHandle(s)}},Ze={},aa=(t,e,r,n)=>{t=at.toValue(t);var a=Ze[e];return a||(a=na(e),Ze[e]=a),a(t,r,n)},oa=(t,e)=>{t=Qe(t,"_emval_take_value");var r=t.readValueFromPointer(e);return at.toHandle(r)},ia=()=>{gt("")},sa=(t,e,r)=>N.copyWithin(t,e,e+r),ua=()=>2147483648,ca=t=>{var e=K.buffer,r=(t-e.byteLength+65535)/65536;try{return K.grow(r),$e(),1}catch{}},la=t=>{var e=N.length;t>>>=0;var r=ua();if(t>r)return!1;for(var n=(l,f)=>l+(f-l%f)%f,a=1;a<=4;a*=2){var o=e*(1+.2/a);o=Math.min(o,t+100663296);var i=Math.min(r,n(Math.max(t,o),65536)),s=ca(i);if(s)return!0}return!1},ee={},fa=()=>O||"./this.program",_t=()=>{if(!_t.strings){var t=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:t,_:fa()};for(var r in ee)ee[r]===void 0?delete e[r]:e[r]=ee[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);_t.strings=n}return _t.strings},da=(t,e)=>{for(var r=0;r<t.length;++r)J[e++>>0]=t.charCodeAt(r);J[e>>0]=0},ha=(t,e)=>{var r=0;return _t().forEach((n,a)=>{var o=e+r;S[t+a*4>>2]=o,da(n,o),r+=n.length+1}),0},pa=(t,e)=>{var r=_t();S[t>>2]=r.length;var n=0;return r.forEach(a=>n+=a.length+1),S[e>>2]=n,0},ma=t=>t,Ht=t=>t%4===0&&(t%100!==0||t%400===0),ya=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},Ke=[31,29,31,30,31,30,31,31,30,31,30,31],tr=[31,28,31,30,31,30,31,31,30,31,30,31],va=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=Ht(r.getFullYear()),a=r.getMonth(),o=(n?Ke:tr)[a];if(e>o-r.getDate())e-=o-r.getDate()+1,r.setDate(1),a<11?r.setMonth(a+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1));else return r.setDate(r.getDate()+e),r}return r};function ga(t,e,r){var n=r>0?r:Ge(t)+1,a=new Array(n),o=Ne(t,a,0,a.length);return e&&(a.length=o),a}var wa=(t,e)=>{J.set(t,e)},$a=(t,e,r,n)=>{var a=S[n+40>>2],o={tm_sec:B[n>>2],tm_min:B[n+4>>2],tm_hour:B[n+8>>2],tm_mday:B[n+12>>2],tm_mon:B[n+16>>2],tm_year:B[n+20>>2],tm_wday:B[n+24>>2],tm_yday:B[n+28>>2],tm_isdst:B[n+32>>2],tm_gmtoff:B[n+36>>2],tm_zone:a?te(a):""},i=te(r),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in s)i=i.replace(new RegExp(l,"g"),s[l]);var f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h=["January","February","March","April","May","June","July","August","September","October","November","December"];function y(d,p,M){for(var I=typeof d=="number"?d.toString():d||"";I.length<p;)I=M[0]+I;return I}function v(d,p){return y(d,p,"0")}function P(d,p){function M(lt){return lt<0?-1:lt>0?1:0}var I;return(I=M(d.getFullYear()-p.getFullYear()))===0&&(I=M(d.getMonth()-p.getMonth()))===0&&(I=M(d.getDate()-p.getDate())),I}function x(d){switch(d.getDay()){case 0:return new Date(d.getFullYear()-1,11,29);case 1:return d;case 2:return new Date(d.getFullYear(),0,3);case 3:return new Date(d.getFullYear(),0,2);case 4:return new Date(d.getFullYear(),0,1);case 5:return new Date(d.getFullYear()-1,11,31);case 6:return new Date(d.getFullYear()-1,11,30)}}function H(d){var p=va(new Date(d.tm_year+1900,0,1),d.tm_yday),M=new Date(p.getFullYear(),0,4),I=new Date(p.getFullYear()+1,0,4),lt=x(M),kt=x(I);return P(lt,p)<=0?P(kt,p)<=0?p.getFullYear()+1:p.getFullYear():p.getFullYear()-1}var A={"%a":d=>f[d.tm_wday].substring(0,3),"%A":d=>f[d.tm_wday],"%b":d=>h[d.tm_mon].substring(0,3),"%B":d=>h[d.tm_mon],"%C":d=>{var p=d.tm_year+1900;return v(p/100|0,2)},"%d":d=>v(d.tm_mday,2),"%e":d=>y(d.tm_mday,2," "),"%g":d=>H(d).toString().substring(2),"%G":d=>H(d),"%H":d=>v(d.tm_hour,2),"%I":d=>{var p=d.tm_hour;return p==0?p=12:p>12&&(p-=12),v(p,2)},"%j":d=>v(d.tm_mday+ya(Ht(d.tm_year+1900)?Ke:tr,d.tm_mon-1),3),"%m":d=>v(d.tm_mon+1,2),"%M":d=>v(d.tm_min,2),"%n":()=>`
|
|
3
|
+
`,"%p":d=>d.tm_hour>=0&&d.tm_hour<12?"AM":"PM","%S":d=>v(d.tm_sec,2),"%t":()=>" ","%u":d=>d.tm_wday||7,"%U":d=>{var p=d.tm_yday+7-d.tm_wday;return v(Math.floor(p/7),2)},"%V":d=>{var p=Math.floor((d.tm_yday+7-(d.tm_wday+6)%7)/7);if((d.tm_wday+371-d.tm_yday-2)%7<=2&&p++,p){if(p==53){var M=(d.tm_wday+371-d.tm_yday)%7;M!=4&&(M!=3||!Ht(d.tm_year))&&(p=1)}}else{p=52;var I=(d.tm_wday+7-d.tm_yday-1)%7;(I==4||I==5&&Ht(d.tm_year%400-1))&&p++}return v(p,2)},"%w":d=>d.tm_wday,"%W":d=>{var p=d.tm_yday+7-(d.tm_wday+6)%7;return v(Math.floor(p/7),2)},"%y":d=>(d.tm_year+1900).toString().substring(2),"%Y":d=>d.tm_year+1900,"%z":d=>{var p=d.tm_gmtoff,M=p>=0;return p=Math.abs(p)/60,p=p/60*100+p%60,(M?"+":"-")+("0000"+p).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};i=i.replace(/%%/g,"\0\0");for(var l in A)i.includes(l)&&(i=i.replace(new RegExp(l,"g"),A[l](o)));i=i.replace(/\0\0/g,"%");var W=ga(i,!1);return W.length>e?0:(wa(W,t),W.length-1)},ba=(t,e,r,n,a)=>$a(t,e,r,n);Ae=u.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},rn(),ht=u.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},mn(),fn(),Cn(),Ue=u.UnboundTypeError=En(Error,"UnboundTypeError"),Dn(),Fn();var Ca={q:zr,u:Yr,a:Gr,h:Xr,l:qr,I:Jr,P:Qr,n:Zr,aa:Kr,d:Nr,pa:tn,X:en,fa:an,oa:xn,na:An,D:Sn,ea:Mn,U:In,J:Rn,w:Wn,s:kn,T:Vn,L:qn,Q:Jn,qa:Qn,ga:Zn,ba:Ye,ma:ea,V:ra,ja:aa,la:oa,K:ia,da:sa,ca:la,_:ha,$:pa,H:Ua,S:Qa,C:za,p:Wa,b:_a,z:ka,ha:Na,c:Aa,j:Da,i:Ea,x:La,O:Ba,v:Ra,G:Xa,N:qa,B:Ya,F:Za,Y:to,W:eo,k:Sa,f:xa,e:Pa,g:Ta,M:Ja,m:Ia,ia:Va,o:Oa,R:Fa,t:ja,ka:Ha,y:Ga,r:Ma,E:Ka,A:ma,Z:ba},D=Lr(),nt=u._free=t=>(nt=u._free=D.ta)(t),re=u._malloc=t=>(re=u._malloc=D.ua)(t),er=t=>(er=D.wa)(t);u.__embind_initialize_bindings=()=>(u.__embind_initialize_bindings=D.xa)();var b=(t,e)=>(b=D.ya)(t,e),Tt=t=>(Tt=D.za)(t),C=()=>(C=D.Aa)(),_=t=>(_=D.Ba)(t),rr=t=>(rr=D.Ca)(t),nr=t=>(nr=D.Da)(t),ar=(t,e,r)=>(ar=D.Ea)(t,e,r),or=t=>(or=D.Fa)(t);u.dynCall_viijii=(t,e,r,n,a,o,i)=>(u.dynCall_viijii=D.Ga)(t,e,r,n,a,o,i);var ir=u.dynCall_jiii=(t,e,r,n)=>(ir=u.dynCall_jiii=D.Ha)(t,e,r,n),sr=u.dynCall_jiiii=(t,e,r,n,a)=>(sr=u.dynCall_jiiii=D.Ia)(t,e,r,n,a);u.dynCall_iiiiij=(t,e,r,n,a,o,i)=>(u.dynCall_iiiiij=D.Ja)(t,e,r,n,a,o,i),u.dynCall_iiiiijj=(t,e,r,n,a,o,i,s,l)=>(u.dynCall_iiiiijj=D.Ka)(t,e,r,n,a,o,i,s,l),u.dynCall_iiiiiijj=(t,e,r,n,a,o,i,s,l,f)=>(u.dynCall_iiiiiijj=D.La)(t,e,r,n,a,o,i,s,l,f);function _a(t,e){var r=C();try{return T(t)(e)}catch(n){if(_(r),n!==n+0)throw n;b(1,0)}}function Ta(t,e,r,n){var a=C();try{T(t)(e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function Pa(t,e,r){var n=C();try{T(t)(e,r)}catch(a){if(_(n),a!==a+0)throw a;b(1,0)}}function Ea(t,e,r,n,a){var o=C();try{return T(t)(e,r,n,a)}catch(i){if(_(o),i!==i+0)throw i;b(1,0)}}function xa(t,e){var r=C();try{T(t)(e)}catch(n){if(_(r),n!==n+0)throw n;b(1,0)}}function Aa(t,e,r){var n=C();try{return T(t)(e,r)}catch(a){if(_(n),a!==a+0)throw a;b(1,0)}}function Sa(t){var e=C();try{T(t)()}catch(r){if(_(e),r!==r+0)throw r;b(1,0)}}function Da(t,e,r,n){var a=C();try{return T(t)(e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function Oa(t,e,r,n,a,o){var i=C();try{T(t)(e,r,n,a,o)}catch(s){if(_(i),s!==s+0)throw s;b(1,0)}}function Fa(t,e,r,n,a,o,i){var s=C();try{T(t)(e,r,n,a,o,i)}catch(l){if(_(s),l!==l+0)throw l;b(1,0)}}function Ma(t,e,r,n,a,o,i,s,l,f,h){var y=C();try{T(t)(e,r,n,a,o,i,s,l,f,h)}catch(v){if(_(y),v!==v+0)throw v;b(1,0)}}function ja(t,e,r,n,a,o,i,s){var l=C();try{T(t)(e,r,n,a,o,i,s)}catch(f){if(_(l),f!==f+0)throw f;b(1,0)}}function Ia(t,e,r,n,a){var o=C();try{T(t)(e,r,n,a)}catch(i){if(_(o),i!==i+0)throw i;b(1,0)}}function Ra(t,e,r,n,a,o,i){var s=C();try{return T(t)(e,r,n,a,o,i)}catch(l){if(_(s),l!==l+0)throw l;b(1,0)}}function Ha(t,e,r,n,a,o,i,s,l){var f=C();try{T(t)(e,r,n,a,o,i,s,l)}catch(h){if(_(f),h!==h+0)throw h;b(1,0)}}function Wa(t){var e=C();try{return T(t)()}catch(r){if(_(e),r!==r+0)throw r;b(1,0)}}function ka(t,e,r,n){var a=C();try{return T(t)(e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function Ba(t,e,r,n,a,o,i){var s=C();try{return T(t)(e,r,n,a,o,i)}catch(l){if(_(s),l!==l+0)throw l;b(1,0)}}function Ua(t,e,r,n){var a=C();try{return T(t)(e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function Va(t,e,r,n,a,o,i,s){var l=C();try{T(t)(e,r,n,a,o,i,s)}catch(f){if(_(l),f!==f+0)throw f;b(1,0)}}function La(t,e,r,n,a,o){var i=C();try{return T(t)(e,r,n,a,o)}catch(s){if(_(i),s!==s+0)throw s;b(1,0)}}function za(t,e,r,n,a,o){var i=C();try{return T(t)(e,r,n,a,o)}catch(s){if(_(i),s!==s+0)throw s;b(1,0)}}function Ya(t,e,r,n,a,o,i,s,l,f){var h=C();try{return T(t)(e,r,n,a,o,i,s,l,f)}catch(y){if(_(h),y!==y+0)throw y;b(1,0)}}function Na(t,e,r){var n=C();try{return T(t)(e,r)}catch(a){if(_(n),a!==a+0)throw a;b(1,0)}}function Ga(t,e,r,n,a,o,i,s,l,f){var h=C();try{T(t)(e,r,n,a,o,i,s,l,f)}catch(y){if(_(h),y!==y+0)throw y;b(1,0)}}function Xa(t,e,r,n,a,o,i,s){var l=C();try{return T(t)(e,r,n,a,o,i,s)}catch(f){if(_(l),f!==f+0)throw f;b(1,0)}}function qa(t,e,r,n,a,o,i,s,l){var f=C();try{return T(t)(e,r,n,a,o,i,s,l)}catch(h){if(_(f),h!==h+0)throw h;b(1,0)}}function Ja(t,e,r,n,a,o,i){var s=C();try{T(t)(e,r,n,a,o,i)}catch(l){if(_(s),l!==l+0)throw l;b(1,0)}}function Qa(t,e,r,n){var a=C();try{return T(t)(e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function Za(t,e,r,n,a,o,i,s,l,f,h,y){var v=C();try{return T(t)(e,r,n,a,o,i,s,l,f,h,y)}catch(P){if(_(v),P!==P+0)throw P;b(1,0)}}function Ka(t,e,r,n,a,o,i,s,l,f,h,y,v,P,x,H){var A=C();try{T(t)(e,r,n,a,o,i,s,l,f,h,y,v,P,x,H)}catch(W){if(_(A),W!==W+0)throw W;b(1,0)}}function to(t,e,r,n){var a=C();try{return ir(t,e,r,n)}catch(o){if(_(a),o!==o+0)throw o;b(1,0)}}function eo(t,e,r,n,a){var o=C();try{return sr(t,e,r,n,a)}catch(i){if(_(o),i!==i+0)throw i;b(1,0)}}var Wt;vt=function t(){Wt||ur(),Wt||(vt=t)};function ur(){if(it>0||(Fr(),it>0))return;function t(){Wt||(Wt=!0,u.calledRun=!0,!mt&&(Mr(),g(u),u.onRuntimeInitialized&&u.onRuntimeInitialized(),jr()))}u.setStatus?(u.setStatus("Running..."),setTimeout(function(){setTimeout(function(){u.setStatus("")},1),t()},1)):t()}if(u.preInit)for(typeof u.preInit=="function"&&(u.preInit=[u.preInit]);u.preInit.length>0;)u.preInit.pop()();return ur(),m.ready}})();function xr(c){return Bt(Ut,c)}async function Ar(c,{tryHarder:m=k.tryHarder,formats:u=k.formats,maxSymbols:g=k.maxSymbols}=k){return Pr(c,{tryHarder:m,formats:u,maxSymbols:g},Ut)}async function Sr(c,{tryHarder:m=k.tryHarder,formats:u=k.formats,maxSymbols:g=k.maxSymbols}=k){return Er(c,{tryHarder:m,formats:u,maxSymbols:g},Ut)}const Vt=new Map([["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["data_matrix","DataMatrix"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["pdf417","PDF417"],["qr_code","QRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"]]);function Dr(c){for(const[m,u]of Vt)if(c===u)return m;return"unknown"}class Or extends EventTarget{constructor(u={}){var g;super();lr(this,ft,void 0);try{const $=(g=u==null?void 0:u.formats)==null?void 0:g.filter(w=>w!=="unknown");if(($==null?void 0:$.length)===0)throw new TypeError("Hint option provided, but is empty.");$==null||$.forEach(w=>{if(!V.includes(w))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${w}' is not a valid enum value of type BarcodeFormat.`)}),fr(this,ft,$??[]),xr().then(w=>{this.dispatchEvent(new CustomEvent("load",{detail:w}))}).catch(w=>{this.dispatchEvent(new CustomEvent("error",{detail:w}))})}catch($){throw de($,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return V.filter(u=>u!=="unknown")}async detect(u){try{const g=await yr(u);if(g===null)return[];let $;try{le(g)?$=await Ar(g,{tryHarder:!0,formats:ne(this,ft).map(w=>Vt.get(w))}):$=await Sr(g,{tryHarder:!0,formats:ne(this,ft).map(w=>Vt.get(w))})}catch(w){throw console.error(w),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return $.map(w=>{const{topLeft:{x:O,y:G},topRight:{x:j,y:F},bottomLeft:{x:z,y:Y},bottomRight:{x:L,y:X}}=w.position,K=Math.min(O,j,z,L),mt=Math.min(G,F,Y,X),Lt=Math.max(O,j,z,L),J=Math.max(G,F,Y,X);return{boundingBox:new DOMRectReadOnly(K,mt,Lt-K,J-mt),rawValue:new TextDecoder().decode(w.bytes),format:Dr(w.format),cornerPoints:[{x:O,y:G},{x:j,y:F},{x:L,y:X},{x:z,y:Y}]}})}catch(g){throw de(g,"Failed to execute 'detect' on 'BarcodeDetector'")}}}return ft=new WeakMap,R.BarcodeDetector=Or,R.setZXingModuleOverrides=Tr,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"}),R}({});
|