UNPKG

zxing-wasm

Version:

ZXing-C++ WebAssembly as an ES/CJS module with types

19 lines (16 loc) 38.2 kB
"use strict";var Be=u=>{throw TypeError(u)};var Le=(u,f,h)=>f.has(u)||Be("Cannot "+h);var Y=(u,f,h)=>(Le(u,f,"read from private field"),h?h.call(u):f.get(u)),Fr=(u,f,h)=>f.has(u)?Be("Cannot add the same private member more than once"):f instanceof WeakSet?f.add(u):f.set(u,h),re=(u,f,h,l)=>(Le(u,f,"write to private field"),l?l.call(u,h):f.set(u,h),h);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ir=[["Aztec","M"],["Codabar","L"],["Code39","L"],["Code93","L"],["Code128","L"],["DataBar","L"],["DataBarExpanded","L"],["DataMatrix","M"],["EAN-8","L"],["EAN-13","L"],["ITF","L"],["MaxiCode","M"],["PDF417","M"],["QRCode","M"],["UPC-A","L"],["UPC-E","L"],["MicroQRCode","M"],["rMQRCode","M"],["DXFilmEdge","L"],["DataBarLimited","L"]],pr=Ir.map(([u])=>u),Xe=pr.filter((u,f)=>Ir[f][1]==="L"),Ze=pr.filter((u,f)=>Ir[f][1]==="M");function Mr(u){switch(u){case"Linear-Codes":return Xe.reduce((f,h)=>f|Mr(h),0);case"Matrix-Codes":return Ze.reduce((f,h)=>f|Mr(h),0);case"Any":return(1<<Ir.length)-1;case"None":return 0;default:return 1<<pr.indexOf(u)}}function Xi(u){if(u===0)return"None";const f=31-Math.clz32(u);return pr[f]}function Zi(u){return u.reduce((f,h)=>f|Mr(h),0)}const Ge=["LocalAverage","GlobalHistogram","FixedThreshold","BoolCast"];function Gi(u){return Ge.indexOf(u)}const ee=["Unknown","ASCII","ISO8859_1","ISO8859_2","ISO8859_3","ISO8859_4","ISO8859_5","ISO8859_6","ISO8859_7","ISO8859_8","ISO8859_9","ISO8859_10","ISO8859_11","ISO8859_13","ISO8859_14","ISO8859_15","ISO8859_16","Cp437","Cp1250","Cp1251","Cp1252","Cp1256","Shift_JIS","Big5","GB2312","GB18030","EUC_JP","EUC_KR","UTF16BE","UTF16BE","UTF8","UTF16LE","UTF32BE","UTF32LE","BINARY"];function qi(u){return u==="UnicodeBig"?ee.indexOf("UTF16BE"):ee.indexOf(u)}const qe=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function Qi(u){return qe[u]}const Qe=["Ignore","Read","Require"];function Yi(u){return Qe.indexOf(u)}const Ye=["Plain","ECI","HRI","Hex","Escaped"];function Ji(u){return Ye.indexOf(u)}const kr={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,tryDenoise:!1,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!0,returnErrors:!1,eanAddOnSymbol:"Ignore",textMode:"HRI",characterSet:"Unknown"};function He(u){return{...u,formats:Zi(u.formats),binarizer:Gi(u.binarizer),eanAddOnSymbol:Yi(u.eanAddOnSymbol),textMode:Ji(u.textMode),characterSet:qi(u.characterSet)}}function Ki(u){return{...u,format:Xi(u.format),contentType:Qi(u.contentType),eccLevel:u.ecLevel}}function Ve(u){var f;return{...u,image:(f=u.image&&new Blob([new Uint8Array(u.image)],{type:"image/png"}))!=null?f:null}}const te={format:"QRCode",readerInit:!1,forceSquareDataMatrix:!1,ecLevel:"",scale:0,sizeHint:0,rotate:0,withHRT:!1,withQuietZones:!0,options:""};function ra(u){return{...u,format:Mr(u.format)}}const ea="2.2.1",ta="c0a7c6cd2165457c721c58045edd22ffee9624e9",na={instantiateWasm(){throw Error(`To use zxing-wasm in a WeChat Mini Program, you must provide a custom "instantiateWasm" function, e.g.: prepareZXingModule({ overrides: { instantiateWasm(imports, successCallback) { WXWebAssembly.instantiate("path/to/zxing_full.wasm", imports).then(({ instance }) => successCallback(instance), ); return {}; }, } }); Learn more: - https://developers.weixin.qq.com/miniprogram/dev/framework/performance/wasm.html - https://emscripten.org/docs/api_reference/module.html#Module.instantiateWasm - https://github.com/Sec-ant/zxing-wasm#integrating-in-non-web-runtimes `)}},Or=new WeakMap;function ia(u,f){return Object.is(u,f)||Object.keys(u).length===Object.keys(f).length&&Object.keys(u).every(h=>Object.hasOwn(f,h)&&u[h]===f[h])}function ne(u,{overrides:f,equalityFn:h=ia,fireImmediately:l=!1}={}){var R;const[O,M]=(R=Or.get(u))!=null?R:[na],E=f!=null?f:O;let W;if(l){if(M&&(W=h(O,E)))return M;const x=u({...E});return Or.set(u,[E,x]),x}(W!=null?W:h(O,E))||Or.set(u,[E])}function aa(u){Or.delete(u)}async function oa(u,f,h=kr){const l={...kr,...h},O=await ne(u,{fireImmediately:!0});let M,E;if("width"in f&&"height"in f&&"data"in f){const{data:R,data:{byteLength:x},width:hr,height:xr}=f;E=O._malloc(x),O.HEAPU8.set(R,E),M=O.readBarcodesFromPixmap(E,hr,xr,He(l))}else{let R,x;if("buffer"in f)[R,x]=[f.byteLength,f];else if("byteLength"in f)[R,x]=[f.byteLength,new Uint8Array(f)];else if("size"in f)[R,x]=[f.size,new Uint8Array(await f.arrayBuffer())];else throw new TypeError("Invalid input type");E=O._malloc(R),O.HEAPU8.set(x,E),M=O.readBarcodesFromImage(E,R,He(l))}O._free(E);const W=[];for(let R=0;R<M.size();++R)W.push(Ki(M.get(R)));return W}async function sa(u,f,h=te){const l={...te,...h},O=ra(l),M=await ne(u,{fireImmediately:!0});if(typeof f=="string")return Ve(M.writeBarcodeFromText(f,O));const{byteLength:E}=f,W=M._malloc(E);M.HEAPU8.set(f,W);const R=M.writeBarcodeFromBytes(W,E,O);return M._free(W),Ve(R)}var J,vr,dr,Ne,ze;(ze=globalThis.Blob)!=null||(globalThis.Blob=(Ne=class{constructor(u,f){Fr(this,J);Fr(this,vr);Fr(this,dr,new Uint8Array);console.error("For the sake of robustness, a properly implemented Blob polyfill is required."),re(this,J,u),re(this,vr,f)}get size(){var u,f,h;return(h=(f=(u=Y(this,J))==null?void 0:u[0])==null?void 0:f.byteLength)!=null?h:0}get type(){var u,f;return(f=(u=Y(this,vr))==null?void 0:u.type)!=null?f:""}async arrayBuffer(){var u,f,h;return(h=(f=(u=Y(this,J))==null?void 0:u[0])==null?void 0:f.buffer)!=null?h:Y(this,dr).buffer}async bytes(){var u,f;return(f=(u=Y(this,J))==null?void 0:u[0])!=null?f:Y(this,dr)}slice(){throw new Error("Not implemented")}stream(){throw new Error("Not implemented")}text(){throw new Error("Not implemented")}get[Symbol.toStringTag](){return"Blob"}},J=new WeakMap,vr=new WeakMap,dr=new WeakMap,Ne));var Wr=async function(u={}){var f,h,l=u,O,M,E=new Promise((e,r)=>{O=e,M=r}),W=typeof window=="object",R=typeof Bun!="undefined",x=typeof WorkerGlobalScope!="undefined";typeof process=="object"&&(!((h=process.versions)===null||h===void 0)&&h.node)&&process.type!="renderer";var hr="./this.program",xr,Dr="";function Je(e){return l.locateFile?l.locateFile(e,Dr):Dr+e}var oe,jr;if(W||x||R){try{Dr=new URL(".",xr).href}catch(e){}x&&(jr=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),oe=async e=>{var r=await fetch(e,{credentials:"same-origin"});if(r.ok)return r.arrayBuffer();throw new Error(r.status+" : "+r.url)}}var se=console.log.bind(console),K=console.error.bind(console),ar,_r,ce=!1,z,j,gr,rr,er,C,ue,le;function fe(){var e=_r.buffer;z=new Int8Array(e),gr=new Int16Array(e),l.HEAPU8=j=new Uint8Array(e),rr=new Uint16Array(e),er=new Int32Array(e),C=new Uint32Array(e),ue=new Float32Array(e),le=new Float64Array(e)}function Ke(){if(l.preRun)for(typeof l.preRun=="function"&&(l.preRun=[l.preRun]);l.preRun.length;)vt(l.preRun.shift());ve(pe)}function rt(){T.Ea()}function et(){if(l.postRun)for(typeof l.postRun=="function"&&(l.postRun=[l.postRun]);l.postRun.length;)ft(l.postRun.shift());ve(de)}var X=0,or=null;function tt(e){var r;X++,(r=l.monitorRunDependencies)===null||r===void 0||r.call(l,X)}function nt(e){var r;if(X--,(r=l.monitorRunDependencies)===null||r===void 0||r.call(l,X),X==0&&or){var t=or;or=null,t()}}function Ur(e){var r;(r=l.onAbort)===null||r===void 0||r.call(l,e),e="Aborted("+e+")",K(e),ce=!0,e+=". Build with -sASSERTIONS for more info.";var t=new WXWebAssembly.RuntimeError(e);throw M(t),t}var tr;function it(){return Je("zxing_full.wasm")}function at(e){if(e==tr&&ar)return new Uint8Array(ar);if(jr)return jr(e);throw"both async and sync fetching of the wasm failed"}async function ot(e){if(!ar)try{var r=await oe(e);return new Uint8Array(r)}catch(t){}return at(e)}async function st(e,r){try{var t=await ot(e),n=await WXWebAssembly.instantiate(t,r);return n}catch(i){K(`failed to asynchronously prepare wasm: ${i}`),Ur(i)}}async function ct(e,r,t){if(!e&&typeof WXWebAssembly.instantiateStreaming=="function")try{var n=fetch(r,{credentials:"same-origin"}),i=await WXWebAssembly.instantiateStreaming(n,t);return i}catch(a){K(`wasm streaming compile failed: ${a}`),K("falling back to ArrayBuffer instantiation")}return st(r,t)}function ut(){return{a:Jn}}async function lt(){function e(a,s){return T=a.exports,_r=T.Da,fe(),Ae=T.Ha,nt(),T}tt();function r(a){return e(a.instance)}var t=ut();if(l.instantiateWasm)return new Promise((a,s)=>{l.instantiateWasm(t,(o,c)=>{a(e(o))})});tr!=null||(tr=it());try{var n=await ct(ar,tr,t),i=r(n);return i}catch(a){return M(a),Promise.reject(a)}}var ve=e=>{for(;e.length>0;)e.shift()(l)},de=[],ft=e=>de.push(e),pe=[],vt=e=>pe.push(e),g=e=>ti(e),m=()=>ni(),mr=[],yr=0,dt=e=>{var r=new Br(e);return r.get_caught()||(r.set_caught(!0),yr--),r.set_rethrown(!1),mr.push(r),ai(e),ri(e)},L=0,pt=()=>{_(0,0);var e=mr.pop();ii(e.excPtr),L=0};class Br{constructor(r){this.excPtr=r,this.ptr=r-24}set_type(r){C[this.ptr+4>>2]=r}get_type(){return C[this.ptr+4>>2]}set_destructor(r){C[this.ptr+8>>2]=r}get_destructor(){return C[this.ptr+8>>2]}set_caught(r){r=r?1:0,z[this.ptr+12]=r}get_caught(){return z[this.ptr+12]!=0}set_rethrown(r){r=r?1:0,z[this.ptr+13]=r}get_rethrown(){return z[this.ptr+13]!=0}init(r,t){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(t)}set_adjusted_ptr(r){C[this.ptr+16>>2]=r}get_adjusted_ptr(){return C[this.ptr+16>>2]}}var br=e=>ei(e),Lr=e=>{var r=L;if(!r)return br(0),0;var t=new Br(r);t.set_adjusted_ptr(r);var n=t.get_type();if(!n)return br(0),r;for(var i of e){if(i===0||i===n)break;var a=t.ptr+16;if(oi(i,n,a))return br(i),r}return br(n),r},ht=()=>Lr([]),_t=e=>Lr([e]),gt=(e,r)=>Lr([e,r]),mt=()=>{var e=mr.pop();e||Ur("no exception to throw");var r=e.excPtr;throw e.get_rethrown()||(mr.push(e),e.set_rethrown(!0),e.set_caught(!1),yr++),L=r,L},yt=(e,r,t)=>{var n=new Br(e);throw n.init(r,t),L=e,yr++,L},bt=()=>yr,wt=e=>{throw L||(L=e),L},he=typeof TextDecoder!="undefined"?new TextDecoder:void 0,_e=function(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NaN;for(var n=r+t,i=r;e[i]&&!(i>=n);)++i;if(i-r>16&&e.buffer&&he)return he.decode(e.subarray(r,i));for(var a="";r<i;){var s=e[r++];if(!(s&128)){a+=String.fromCharCode(s);continue}var o=e[r++]&63;if((s&224)==192){a+=String.fromCharCode((s&31)<<6|o);continue}var c=e[r++]&63;if((s&240)==224?s=(s&15)<<12|o<<6|c:s=(s&7)<<18|o<<12|c<<6|e[r++]&63,s<65536)a+=String.fromCharCode(s);else{var v=s-65536;a+=String.fromCharCode(55296|v>>10,56320|v&1023)}}return a},$t=(e,r)=>e?_e(j,e,r):"";function Ct(e,r,t){return 0}function Tt(e,r,t){return 0}var Pt=(e,r,t)=>{};function At(e,r,t,n){}var St=(e,r)=>{},Et=()=>Ur(""),wr={},Hr=e=>{for(;e.length;){var r=e.pop(),t=e.pop();t(r)}};function sr(e){return this.fromWireType(C[e>>2])}var nr={},Z={},$r={},Rt=class extends Error{constructor(r){super(r),this.name="InternalError"}},Cr=e=>{throw new Rt(e)},G=(e,r,t)=>{e.forEach(o=>$r[o]=r);function n(o){var c=t(o);c.length!==e.length&&Cr("Mismatched type converter count");for(var v=0;v<e.length;++v)B(e[v],c[v])}var i=new Array(r.length),a=[],s=0;r.forEach((o,c)=>{Z.hasOwnProperty(o)?i[c]=Z[o]:(a.push(o),nr.hasOwnProperty(o)||(nr[o]=[]),nr[o].push(()=>{i[c]=Z[o],++s,s===a.length&&n(i)}))}),a.length===0&&n(i)},Ft=e=>{var r=wr[e];delete wr[e];var t=r.rawConstructor,n=r.rawDestructor,i=r.fields,a=i.map(s=>s.getterReturnType).concat(i.map(s=>s.setterArgumentType));G([e],a,s=>{var o={};return i.forEach((c,v)=>{var d=c.fieldName,p=s[v],b=s[v].optional,w=c.getter,P=c.getterContext,S=s[v+i.length],A=c.setter,F=c.setterContext;o[d]={read:N=>p.fromWireType(w(P,N)),write:(N,I)=>{var D=[];A(F,N,S.toWireType(D,I)),Hr(D)},optional:b}}),[{name:r.name,fromWireType:c=>{var v={};for(var d in o)v[d]=o[d].read(c);return n(c),v},toWireType:(c,v)=>{for(var d in o)if(!(d in v)&&!o[d].optional)throw new TypeError(`Missing field: "${d}"`);var p=t();for(d in o)o[d].write(p,v[d]);return c!==null&&c.push(n,p),p},argPackAdvance:H,readValueFromPointer:sr,destructorFunction:n}]})},Ot=(e,r,t,n,i)=>{},Mt=()=>{for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);ge=e},ge,k=e=>{for(var r="",t=e;j[t];)r+=ge[j[t++]];return r},cr=class extends Error{constructor(r){super(r),this.name="BindingError"}},$=e=>{throw new cr(e)};function kt(e,r){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var n=r.name;if(e||$(`type "${n}" must have a positive integer typeid pointer`),Z.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;$(`Cannot register type '${n}' twice`)}if(Z[e]=r,delete $r[e],nr.hasOwnProperty(e)){var i=nr[e];delete nr[e],i.forEach(a=>a())}}function B(e,r){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return kt(e,r,t)}var H=8,It=(e,r,t,n)=>{r=k(r),B(e,{name:r,fromWireType:function(i){return!!i},toWireType:function(i,a){return a?t:n},argPackAdvance:H,readValueFromPointer:function(i){return this.fromWireType(j[i])},destructorFunction:null})},Wt=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Vr=e=>{function r(t){return t.$$.ptrType.registeredClass.name}$(r(e)+" instance already deleted")},Nr=!1,me=e=>{},xt=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},ye=e=>{e.count.value-=1;var r=e.count.value===0;r&&xt(e)},ur=e=>typeof FinalizationRegistry=="undefined"?(ur=r=>r,e):(Nr=new FinalizationRegistry(r=>{ye(r.$$)}),ur=r=>{var t=r.$$,n=!!t.smartPtr;if(n){var i={$$:t};Nr.register(r,i,r)}return r},me=r=>Nr.unregister(r),ur(e)),Dt=()=>{let e=Tr.prototype;Object.assign(e,{isAliasOf(t){if(!(this instanceof Tr)||!(t instanceof Tr))return!1;var n=this.$$.ptrType.registeredClass,i=this.$$.ptr;t.$$=t.$$;for(var a=t.$$.ptrType.registeredClass,s=t.$$.ptr;n.baseClass;)i=n.upcast(i),n=n.baseClass;for(;a.baseClass;)s=a.upcast(s),a=a.baseClass;return n===a&&i===s},clone(){if(this.$$.ptr||Vr(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=ur(Object.create(Object.getPrototypeOf(this),{$$:{value:Wt(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||Vr(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&$("Object already scheduled for deletion"),me(this),ye(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Vr(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&$("Object already scheduled for deletion"),this.$$.deleteScheduled=!0,this}});const r=Symbol.dispose;r&&(e[r]=e.delete)};function Tr(){}var zr=(e,r)=>Object.defineProperty(r,"name",{value:e}),be={},we=(e,r,t)=>{if(e[r].overloadTable===void 0){var n=e[r];e[r]=function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return e[r].overloadTable.hasOwnProperty(a.length)||$(`Function '${t}' called with an invalid number of arguments (${a.length}) - expects one of (${e[r].overloadTable})!`),e[r].overloadTable[a.length].apply(this,a)},e[r].overloadTable=[],e[r].overloadTable[n.argCount]=n}},$e=(e,r,t)=>{l.hasOwnProperty(e)?((t===void 0||l[e].overloadTable!==void 0&&l[e].overloadTable[t]!==void 0)&&$(`Cannot register public name '${e}' twice`),we(l,e,e),l[e].overloadTable.hasOwnProperty(t)&&$(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),l[e].overloadTable[t]=r):(l[e]=r,l[e].argCount=t)},jt=48,Ut=57,Bt=e=>{e=e.replace(/[^a-zA-Z0-9_]/g,"$");var r=e.charCodeAt(0);return r>=jt&&r<=Ut?`_${e}`:e};function Lt(e,r,t,n,i,a,s,o){this.name=e,this.constructor=r,this.instancePrototype=t,this.rawDestructor=n,this.baseClass=i,this.getActualType=a,this.upcast=s,this.downcast=o,this.pureVirtualFunctions=[]}var Xr=(e,r,t)=>{for(;r!==t;)r.upcast||$(`Expected null or instance of ${t.name}, got an instance of ${r.name}`),e=r.upcast(e),r=r.baseClass;return e},Zr=e=>{if(e===null)return"null";var r=typeof e;return r==="object"||r==="array"||r==="function"?e.toString():""+e};function Ht(e,r){if(r===null)return this.isReference&&$(`null is not a valid ${this.name}`),0;r.$$||$(`Cannot pass "${Zr(r)}" as a ${this.name}`),r.$$.ptr||$(`Cannot pass deleted object as a pointer of type ${this.name}`);var t=r.$$.ptrType.registeredClass,n=Xr(r.$$.ptr,t,this.registeredClass);return n}function Vt(e,r){var t;if(r===null)return this.isReference&&$(`null is not a valid ${this.name}`),this.isSmartPointer?(t=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,t),t):0;(!r||!r.$$)&&$(`Cannot pass "${Zr(r)}" as a ${this.name}`),r.$$.ptr||$(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&r.$$.ptrType.isConst&&$(`Cannot convert argument of type ${r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name} to parameter type ${this.name}`);var n=r.$$.ptrType.registeredClass;if(t=Xr(r.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(r.$$.smartPtr===void 0&&$("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:r.$$.smartPtrType===this?t=r.$$.smartPtr:$(`Cannot convert argument of type ${r.$$.smartPtrType?r.$$.smartPtrType.name:r.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:t=r.$$.smartPtr;break;case 2:if(r.$$.smartPtrType===this)t=r.$$.smartPtr;else{var i=r.clone();t=this.rawShare(t,V.toHandle(()=>i.delete())),e!==null&&e.push(this.rawDestructor,t)}break;default:$("Unsupporting sharing policy")}return t}function Nt(e,r){if(r===null)return this.isReference&&$(`null is not a valid ${this.name}`),0;r.$$||$(`Cannot pass "${Zr(r)}" as a ${this.name}`),r.$$.ptr||$(`Cannot pass deleted object as a pointer of type ${this.name}`),r.$$.ptrType.isConst&&$(`Cannot convert argument of type ${r.$$.ptrType.name} to parameter type ${this.name}`);var t=r.$$.ptrType.registeredClass,n=Xr(r.$$.ptr,t,this.registeredClass);return n}var Ce=(e,r,t)=>{if(r===t)return e;if(t.baseClass===void 0)return null;var n=Ce(e,r,t.baseClass);return n===null?null:t.downcast(n)},zt={},Xt=(e,r)=>{for(r===void 0&&$("ptr should not be undefined");e.baseClass;)r=e.upcast(r),e=e.baseClass;return r},Zt=(e,r)=>(r=Xt(e,r),zt[r]),Pr=(e,r)=>{(!r.ptrType||!r.ptr)&&Cr("makeClassHandle requires ptr and ptrType");var t=!!r.smartPtrType,n=!!r.smartPtr;return t!==n&&Cr("Both smartPtrType and smartPtr must be specified"),r.count={value:1},ur(Object.create(e,{$$:{value:r,writable:!0}}))};function Gt(e){var r=this.getPointee(e);if(!r)return this.destructor(e),null;var t=Zt(this.registeredClass,r);if(t!==void 0){if(t.$$.count.value===0)return t.$$.ptr=r,t.$$.smartPtr=e,t.clone();var n=t.clone();return this.destructor(e),n}function i(){return this.isSmartPointer?Pr(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:r,smartPtrType:this,smartPtr:e}):Pr(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var a=this.registeredClass.getActualType(r),s=be[a];if(!s)return i.call(this);var o;this.isConst?o=s.constPointerType:o=s.pointerType;var c=Ce(r,this.registeredClass,o.registeredClass);return c===null?i.call(this):this.isSmartPointer?Pr(o.registeredClass.instancePrototype,{ptrType:o,ptr:c,smartPtrType:this,smartPtr:e}):Pr(o.registeredClass.instancePrototype,{ptrType:o,ptr:c})}var qt=()=>{Object.assign(Ar.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){var r;(r=this.rawDestructor)===null||r===void 0||r.call(this,e)},argPackAdvance:H,readValueFromPointer:sr,fromWireType:Gt})};function Ar(e,r,t,n,i,a,s,o,c,v,d){this.name=e,this.registeredClass=r,this.isReference=t,this.isConst=n,this.isSmartPointer=i,this.pointeeType=a,this.sharingPolicy=s,this.rawGetPointee=o,this.rawConstructor=c,this.rawShare=v,this.rawDestructor=d,!i&&r.baseClass===void 0?n?(this.toWireType=Ht,this.destructorFunction=null):(this.toWireType=Nt,this.destructorFunction=null):this.toWireType=Vt}var Te=(e,r,t)=>{l.hasOwnProperty(e)||Cr("Replacing nonexistent public symbol"),l[e].overloadTable!==void 0&&t!==void 0?l[e].overloadTable[t]=r:(l[e]=r,l[e].argCount=t)},Pe=[],Ae,y=e=>{var r=Pe[e];return r||(Pe[e]=r=Ae.get(e)),r},Qt=function(e,r){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(e.includes("j"))return dynCallLegacy(e,r,t);var n=y(r),i=n(...t);function a(s){return s}return i},Yt=function(e,r){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return Qt(e,r,i,t)}},U=function(e,r){e=k(e);function t(){if(e.includes("j"))return Yt(e,r);var i=y(r);return i}var n=t();return typeof n!="function"&&$(`unknown function pointer with signature ${e}: ${r}`),n};class Jt extends Error{}var Se=e=>{var r=Kn(e),t=k(r);return Q(r),t},Sr=(e,r)=>{var t=[],n={};function i(a){if(!n[a]&&!Z[a]){if($r[a]){$r[a].forEach(i);return}t.push(a),n[a]=!0}}throw r.forEach(i),new Jt(`${e}: `+t.map(Se).join([", "]))},Kt=(e,r,t,n,i,a,s,o,c,v,d,p,b)=>{d=k(d),a=U(i,a),o&&(o=U(s,o)),v&&(v=U(c,v)),b=U(p,b);var w=Bt(d);$e(w,function(){Sr(`Cannot construct ${d} due to unbound types`,[n])}),G([e,r,t],n?[n]:[],P=>{P=P[0];var S,A;n?(S=P.registeredClass,A=S.instancePrototype):A=Tr.prototype;var F=zr(d,function(){if(Object.getPrototypeOf(this)!==N)throw new cr(`Use 'new' to construct ${d}`);if(I.constructor_body===void 0)throw new cr(`${d} has no accessible constructor`);for(var je=arguments.length,Er=new Array(je),Rr=0;Rr<je;Rr++)Er[Rr]=arguments[Rr];var Ue=I.constructor_body[Er.length];if(Ue===void 0)throw new cr(`Tried to invoke ctor of ${d} with invalid number of parameters (${Er.length}) - expected (${Object.keys(I.constructor_body).toString()}) parameters instead!`);return Ue.apply(this,Er)}),N=Object.create(A,{constructor:{value:F}});F.prototype=N;var I=new Lt(d,F,N,b,S,a,o,v);if(I.baseClass){var D,fr;(fr=(D=I.baseClass).__derivedClasses)!==null&&fr!==void 0||(D.__derivedClasses=[]),I.baseClass.__derivedClasses.push(I)}var zi=new Ar(d,I,!0,!1,!1),xe=new Ar(d+"*",I,!1,!1,!1),De=new Ar(d+" const*",I,!1,!0,!1);return be[e]={pointerType:xe,constPointerType:De},Te(w,F),[zi,xe,De]})},Gr=(e,r)=>{for(var t=[],n=0;n<e;n++)t.push(C[r+n*4>>2]);return t};function rn(e){for(var r=1;r<e.length;++r)if(e[r]!==null&&e[r].destructorFunction===void 0)return!0;return!1}function qr(e,r,t,n,i,a){var s=r.length;s<2&&$("argTypes array size mismatch! Must at least get return value and 'this' types!");var o=r[1]!==null&&t!==null,c=rn(r),v=r[0].name!=="void",d=s-2,p=new Array(d),b=[],w=[],P=function(){w.length=0;var S;b.length=o?2:1,b[0]=i,o&&(S=r[1].toWireType(w,this),b[1]=S);for(var A=0;A<d;++A)p[A]=r[A+2].toWireType(w,A<0||arguments.length<=A?void 0:arguments[A]),b.push(p[A]);var F=n(...b);function N(I){if(c)Hr(w);else for(var D=o?1:2;D<r.length;D++){var fr=D===1?S:p[D-2];r[D].destructorFunction!==null&&r[D].destructorFunction(fr)}if(v)return r[0].fromWireType(I)}return N(F)};return zr(e,P)}var en=(e,r,t,n,i,a)=>{var s=Gr(r,t);i=U(n,i),G([],[e],o=>{o=o[0];var c=`constructor ${o.name}`;if(o.registeredClass.constructor_body===void 0&&(o.registeredClass.constructor_body=[]),o.registeredClass.constructor_body[r-1]!==void 0)throw new cr(`Cannot register multiple constructors with identical number of parameters (${r-1}) for class '${o.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return o.registeredClass.constructor_body[r-1]=()=>{Sr(`Cannot construct ${o.name} due to unbound types`,s)},G([],s,v=>(v.splice(1,0,null),o.registeredClass.constructor_body[r-1]=qr(c,v,null,i,a),[])),[]})},Ee=e=>{e=e.trim();const r=e.indexOf("(");return r===-1?e:e.slice(0,r)},tn=(e,r,t,n,i,a,s,o,c,v)=>{var d=Gr(t,n);r=k(r),r=Ee(r),a=U(i,a),G([],[e],p=>{p=p[0];var b=`${p.name}.${r}`;r.startsWith("@@")&&(r=Symbol[r.substring(2)]),o&&p.registeredClass.pureVirtualFunctions.push(r);function w(){Sr(`Cannot call ${b} due to unbound types`,d)}var P=p.registeredClass.instancePrototype,S=P[r];return S===void 0||S.overloadTable===void 0&&S.className!==p.name&&S.argCount===t-2?(w.argCount=t-2,w.className=p.name,P[r]=w):(we(P,r,b),P[r].overloadTable[t-2]=w),G([],d,A=>{var F=qr(b,A,p,a,s);return P[r].overloadTable===void 0?(F.argCount=t-2,P[r]=F):P[r].overloadTable[t-2]=F,[]}),[]})},Re=[],q=[0,1,,1,null,1,!0,1,!1,1],Qr=e=>{e>9&&--q[e+1]===0&&(q[e]=void 0,Re.push(e))},V={toValue:e=>(e||$(`Cannot use deleted val. handle = ${e}`),q[e]),toHandle:e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const r=Re.pop()||q.length;return q[r]=e,q[r+1]=1,r}}}},Fe={name:"emscripten::val",fromWireType:e=>{var r=V.toValue(e);return Qr(e),r},toWireType:(e,r)=>V.toHandle(r),argPackAdvance:H,readValueFromPointer:sr,destructorFunction:null},nn=e=>B(e,Fe),an=(e,r)=>{switch(r){case 4:return function(t){return this.fromWireType(ue[t>>2])};case 8:return function(t){return this.fromWireType(le[t>>3])};default:throw new TypeError(`invalid float width (${r}): ${e}`)}},on=(e,r,t)=>{r=k(r),B(e,{name:r,fromWireType:n=>n,toWireType:(n,i)=>i,argPackAdvance:H,readValueFromPointer:an(r,t),destructorFunction:null})},sn=(e,r,t,n,i,a,s,o)=>{var c=Gr(r,t);e=k(e),e=Ee(e),i=U(n,i),$e(e,function(){Sr(`Cannot call ${e} due to unbound types`,c)},r-1),G([],c,v=>{var d=[v[0],null].concat(v.slice(1));return Te(e,qr(e,d,null,i,a),r-1),[]})},cn=(e,r,t)=>{switch(r){case 1:return t?n=>z[n]:n=>j[n];case 2:return t?n=>gr[n>>1]:n=>rr[n>>1];case 4:return t?n=>er[n>>2]:n=>C[n>>2];default:throw new TypeError(`invalid integer width (${r}): ${e}`)}},un=(e,r,t,n,i)=>{r=k(r);const a=n===0;let s=c=>c;if(a){var o=32-8*t;s=c=>c<<o>>>o,i=s(i)}B(e,{name:r,fromWireType:s,toWireType:(c,v)=>v,argPackAdvance:H,readValueFromPointer:cn(r,t,n!==0),destructorFunction:null})},ln=(e,r,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],i=n[r];function a(s){var o=C[s>>2],c=C[s+4>>2];return new i(z.buffer,c,o)}t=k(t),B(e,{name:t,fromWireType:a,argPackAdvance:H,readValueFromPointer:a},{ignoreDuplicateRegistrations:!0})},fn=Object.assign({optional:!0},Fe),vn=(e,r)=>{B(e,fn)},dn=(e,r,t,n)=>{if(!(n>0))return 0;for(var i=t,a=t+n-1,s=0;s<e.length;++s){var o=e.charCodeAt(s);if(o>=55296&&o<=57343){var c=e.charCodeAt(++s);o=65536+((o&1023)<<10)|c&1023}if(o<=127){if(t>=a)break;r[t++]=o}else if(o<=2047){if(t+1>=a)break;r[t++]=192|o>>6,r[t++]=128|o&63}else if(o<=65535){if(t+2>=a)break;r[t++]=224|o>>12,r[t++]=128|o>>6&63,r[t++]=128|o&63}else{if(t+3>=a)break;r[t++]=240|o>>18,r[t++]=128|o>>12&63,r[t++]=128|o>>6&63,r[t++]=128|o&63}}return r[t]=0,t-i},ir=(e,r,t)=>dn(e,j,r,t),Oe=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n<=127?r++:n<=2047?r+=2:n>=55296&&n<=57343?(r+=4,++t):r+=3}return r},pn=(e,r)=>{r=k(r),B(e,{name:r,fromWireType(t){for(var n=C[t>>2],i=t+4,a,s,o=i,s=0;s<=n;++s){var c=i+s;if(s==n||j[c]==0){var v=c-o,d=$t(o,v);a===void 0?a=d:(a+="\0",a+=d),o=c+1}}return Q(t),a},toWireType(t,n){n instanceof ArrayBuffer&&(n=new Uint8Array(n));var i,a=typeof n=="string";a||ArrayBuffer.isView(n)&&n.BYTES_PER_ELEMENT==1||$("Cannot pass non-string to std::string"),a?i=Oe(n):i=n.length;var s=We(4+i+1),o=s+4;return C[s>>2]=i,a?ir(n,o,i+1):j.set(n,o),t!==null&&t.push(Q,s),s},argPackAdvance:H,readValueFromPointer:sr,destructorFunction(t){Q(t)}})},Me=typeof TextDecoder!="undefined"?new TextDecoder("utf-16le"):void 0,hn=(e,r)=>{for(var t=e>>1,n=t+r/2,i=t;!(i>=n)&&rr[i];)++i;if(i-t>16&&Me)return Me.decode(rr.subarray(t,i));for(var a="",s=t;!(s>=n);++s){var o=rr[s];if(o==0)break;a+=String.fromCharCode(o)}return a},_n=(e,r,t)=>{if(t!=null||(t=2147483647),t<2)return 0;t-=2;for(var n=r,i=t<e.length*2?t/2:e.length,a=0;a<i;++a){var s=e.charCodeAt(a);gr[r>>1]=s,r+=2}return gr[r>>1]=0,r-n},gn=e=>e.length*2,mn=(e,r)=>{for(var t=0,n="";!(t>=r/4);){var i=er[e+t*4>>2];if(i==0)break;if(++t,i>=65536){var a=i-65536;n+=String.fromCharCode(55296|a>>10,56320|a&1023)}else n+=String.fromCharCode(i)}return n},yn=(e,r,t)=>{if(t!=null||(t=2147483647),t<4)return 0;for(var n=r,i=n+t-4,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343){var o=e.charCodeAt(++a);s=65536+((s&1023)<<10)|o&1023}if(er[r>>2]=s,r+=4,r+4>i)break}return er[r>>2]=0,r-n},bn=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n>=55296&&n<=57343&&++t,r+=4}return r},wn=(e,r,t)=>{t=k(t);var n,i,a,s;r===2?(n=hn,i=_n,s=gn,a=o=>rr[o>>1]):r===4&&(n=mn,i=yn,s=bn,a=o=>C[o>>2]),B(e,{name:t,fromWireType:o=>{for(var c=C[o>>2],v,d=o+4,p=0;p<=c;++p){var b=o+4+p*r;if(p==c||a(b)==0){var w=b-d,P=n(d,w);v===void 0?v=P:(v+="\0",v+=P),d=b+r}}return Q(o),v},toWireType:(o,c)=>{typeof c!="string"&&$(`Cannot pass non-string to C++ string type ${t}`);var v=s(c),d=We(4+v+r);return C[d>>2]=v/r,i(c,d+4,v+r),o!==null&&o.push(Q,d),d},argPackAdvance:H,readValueFromPointer:sr,destructorFunction(o){Q(o)}})},$n=(e,r,t,n,i,a)=>{wr[e]={name:k(r),rawConstructor:U(t,n),rawDestructor:U(i,a),fields:[]}},Cn=(e,r,t,n,i,a,s,o,c,v)=>{wr[e].fields.push({fieldName:k(r),getterReturnType:t,getter:U(n,i),getterContext:a,setterArgumentType:s,setter:U(o,c),setterContext:v})},Tn=(e,r)=>{r=k(r),B(e,{isVoid:!0,name:r,argPackAdvance:0,fromWireType:()=>{},toWireType:(t,n)=>{}})},Yr=[],Pn=(e,r,t,n)=>(e=Yr[e],r=V.toValue(r),e(null,r,t,n)),An={},Sn=e=>{var r=An[e];return r===void 0?k(e):r},ke=()=>{if(typeof globalThis=="object")return globalThis;function e(r){r.$$$embind_global$$$=r;var t=typeof $$$embind_global$$$=="object"&&r.$$$embind_global$$$==r;return t||delete r.$$$embind_global$$$,t}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&e(global)?$$$embind_global$$$=global:typeof self=="object"&&e(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},En=e=>e===0?V.toHandle(ke()):(e=Sn(e),V.toHandle(ke()[e])),Rn=e=>{var r=Yr.length;return Yr.push(e),r},Ie=(e,r)=>{var t=Z[e];return t===void 0&&$(`${r} has unknown type ${Se(e)}`),t},Fn=(e,r)=>{for(var t=new Array(e),n=0;n<e;++n)t[n]=Ie(C[r+n*4>>2],`parameter ${n}`);return t},On=(e,r,t)=>{var n=[],i=e.toWireType(n,t);return n.length&&(C[r>>2]=V.toHandle(n)),i},Mn=Reflect.construct,kn=(e,r,t)=>{var n=Fn(e,r),i=n.shift();e--;var a=new Array(e),s=(c,v,d,p)=>{for(var b=0,w=0;w<e;++w)a[w]=n[w].readValueFromPointer(p+b),b+=n[w].argPackAdvance;var P=t===1?Mn(v,a):v.apply(c,a);return On(i,d,P)},o=`methodCaller<(${n.map(c=>c.name).join(", ")}) => ${i.name}>`;return Rn(zr(o,s))},In=e=>{e>9&&(q[e+1]+=1)},Wn=e=>{var r=V.toValue(e);Hr(r),Qr(e)},xn=(e,r)=>{e=Ie(e,"_emval_take_value");var t=e.readValueFromPointer(r);return V.toHandle(t)},Dn=(e,r,t,n)=>{var i=new Date().getFullYear(),a=new Date(i,0,1),s=new Date(i,6,1),o=a.getTimezoneOffset(),c=s.getTimezoneOffset(),v=Math.max(o,c);C[e>>2]=v*60,er[r>>2]=+(o!=c);var d=w=>{var P=w>=0?"-":"+",S=Math.abs(w),A=String(Math.floor(S/60)).padStart(2,"0"),F=String(S%60).padStart(2,"0");return`UTC${P}${A}${F}`},p=d(o),b=d(c);c<o?(ir(p,t,17),ir(b,n,17)):(ir(p,n,17),ir(b,t,17))},jn=()=>2147483648,Un=(e,r)=>Math.ceil(e/r)*r,Bn=e=>{var r=_r.buffer,t=(e-r.byteLength+65535)/65536|0;try{return _r.grow(t),fe(),1}catch(n){}},Ln=e=>{var r=j.length;e>>>=0;var t=jn();if(e>t)return!1;for(var n=1;n<=4;n*=2){var i=r*(1+.2/n);i=Math.min(i,e+100663296);var a=Math.min(t,Un(Math.max(e,i),65536)),s=Bn(a);if(s)return!0}return!1},Jr={},Hn=()=>hr||"./this.program",lr=()=>{if(!lr.strings){var e=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:e,_:Hn()};for(var t in Jr)Jr[t]===void 0?delete r[t]:r[t]=Jr[t];var n=[];for(var t in r)n.push(`${t}=${r[t]}`);lr.strings=n}return lr.strings},Vn=(e,r)=>{var t=0,n=0;for(var i of lr()){var a=r+t;C[e+n>>2]=a,t+=ir(i,a,1/0)+1,n+=4}return 0},Nn=(e,r)=>{var t=lr();C[e>>2]=t.length;var n=0;for(var i of t)n+=Oe(i)+1;return C[r>>2]=n,0},zn=e=>52,Xn=(e,r,t,n)=>52;function Zn(e,r,t,n,i){return 70}var Gn=[null,[],[]],qn=(e,r)=>{var t=Gn[e];r===0||r===10?((e===1?se:K)(_e(t)),t.length=0):t.push(r)},Qn=(e,r,t,n)=>{for(var i=0,a=0;a<t;a++){var s=C[r>>2],o=C[r+4>>2];r+=8;for(var c=0;c<o;c++)qn(e,j[s+c]);i+=o}return C[n>>2]=i,0},Yn=e=>e;Mt(),Dt(),qt(),l.noExitRuntime&&l.noExitRuntime,l.print&&(se=l.print),l.printErr&&(K=l.printErr),l.wasmBinary&&(ar=l.wasmBinary),l.arguments&&l.arguments,l.thisProgram&&(hr=l.thisProgram);var Jn={r:dt,u:pt,a:ht,j:_t,l:gt,Q:mt,p:yt,ha:bt,d:wt,V:Ct,na:Tt,la:Pt,oa:At,ja:St,da:Et,Aa:Ft,ca:Ot,va:It,ya:Kt,xa:en,J:tn,ta:nn,Y:on,N:sn,y:un,t:ln,za:vn,ua:pn,R:wn,C:$n,Ba:Cn,wa:Tn,ka:Pn,Ca:Qr,F:En,sa:kn,Z:In,_:Wn,X:xn,ea:Dn,ia:Ln,fa:Vn,ga:Nn,T:zn,ma:Xn,aa:Zn,U:Qn,L:Mi,D:Ii,G:fi,S:Bi,q:Ei,b:pi,H:Oi,qa:xi,c:hi,pa:Di,h:li,i:yi,s:Ci,P:Fi,w:Pi,E:Si,M:Ri,z:Wi,K:Li,ba:Hi,$:Vi,k:_i,f:ui,e:di,g:vi,O:Ui,m:gi,ra:ki,o:Ti,A:bi,v:Ai,W:$i,B:ji,n:mi,I:wi,x:Yn},T=await lt();T.Ea;var Kn=T.Fa,Q=l._free=T.Ga,We=l._malloc=T.Ia,ri=T.Ja,_=T.Ka,ei=T.La,ti=T.Ma,ni=T.Na,ii=T.Oa,ai=T.Pa,oi=T.Qa;l.dynCall_viijii=T.Ra;var si=l.dynCall_iiijj=T.Sa;l.dynCall_jiji=T.Ta;var ci=l.dynCall_jiiii=T.Ua;l.dynCall_iiiiij=T.Va,l.dynCall_iiiiijj=T.Wa,l.dynCall_iiiiiijj=T.Xa;function ui(e,r){var t=m();try{y(e)(r)}catch(n){if(g(t),n!==n+0)throw n;_(1,0)}}function li(e,r,t,n){var i=m();try{return y(e)(r,t,n)}catch(a){if(g(i),a!==a+0)throw a;_(1,0)}}function fi(e,r,t,n,i){var a=m();try{return y(e)(r,t,n,i)}catch(s){if(g(a),s!==s+0)throw s;_(1,0)}}function vi(e,r,t,n){var i=m();try{y(e)(r,t,n)}catch(a){if(g(i),a!==a+0)throw a;_(1,0)}}function di(e,r,t){var n=m();try{y(e)(r,t)}catch(i){if(g(n),i!==i+0)throw i;_(1,0)}}function pi(e,r){var t=m();try{return y(e)(r)}catch(n){if(g(t),n!==n+0)throw n;_(1,0)}}function hi(e,r,t){var n=m();try{return y(e)(r,t)}catch(i){if(g(n),i!==i+0)throw i;_(1,0)}}function _i(e){var r=m();try{y(e)()}catch(t){if(g(r),t!==t+0)throw t;_(1,0)}}function gi(e,r,t,n,i){var a=m();try{y(e)(r,t,n,i)}catch(s){if(g(a),s!==s+0)throw s;_(1,0)}}function mi(e,r,t,n,i,a,s,o,c,v,d){var p=m();try{y(e)(r,t,n,i,a,s,o,c,v,d)}catch(b){if(g(p),b!==b+0)throw b;_(1,0)}}function yi(e,r,t,n,i){var a=m();try{return y(e)(r,t,n,i)}catch(s){if(g(a),s!==s+0)throw s;_(1,0)}}function bi(e,r,t,n,i,a,s){var o=m();try{y(e)(r,t,n,i,a,s)}catch(c){if(g(o),c!==c+0)throw c;_(1,0)}}function wi(e,r,t,n,i,a,s,o,c,v,d,p,b,w,P,S){var A=m();try{y(e)(r,t,n,i,a,s,o,c,v,d,p,b,w,P,S)}catch(F){if(g(A),F!==F+0)throw F;_(1,0)}}function $i(e,r,t,n,i,a,s,o,c){var v=m();try{y(e)(r,t,n,i,a,s,o,c)}catch(d){if(g(v),d!==d+0)throw d;_(1,0)}}function Ci(e,r,t,n,i,a){var s=m();try{return y(e)(r,t,n,i,a)}catch(o){if(g(s),o!==o+0)throw o;_(1,0)}}function Ti(e,r,t,n,i,a){var s=m();try{y(e)(r,t,n,i,a)}catch(o){if(g(s),o!==o+0)throw o;_(1,0)}}function Pi(e,r,t,n,i,a,s){var o=m();try{return y(e)(r,t,n,i,a,s)}catch(c){if(g(o),c!==c+0)throw c;_(1,0)}}function Ai(e,r,t,n,i,a,s,o){var c=m();try{y(e)(r,t,n,i,a,s,o)}catch(v){if(g(c),v!==v+0)throw v;_(1,0)}}function Si(e,r,t,n,i,a,s,o){var c=m();try{return y(e)(r,t,n,i,a,s,o)}catch(v){if(g(c),v!==v+0)throw v;_(1,0)}}function Ei(e){var r=m();try{return y(e)()}catch(t){if(g(r),t!==t+0)throw t;_(1,0)}}function Ri(e,r,t,n,i,a,s,o,c){var v=m();try{return y(e)(r,t,n,i,a,s,o,c)}catch(d){if(g(v),d!==d+0)throw d;_(1,0)}}function Fi(e,r,t,n,i,a,s){var o=m();try{return y(e)(r,t,n,i,a,s)}catch(c){if(g(o),c!==c+0)throw c;_(1,0)}}function Oi(e,r,t,n){var i=m();try{return y(e)(r,t,n)}catch(a){if(g(i),a!==a+0)throw a;_(1,0)}}function Mi(e,r,t,n){var i=m();try{return y(e)(r,t,n)}catch(a){if(g(i),a!==a+0)throw a;_(1,0)}}function ki(e,r,t,n,i,a,s,o){var c=m();try{y(e)(r,t,n,i,a,s,o)}catch(v){if(g(c),v!==v+0)throw v;_(1,0)}}function Ii(e,r,t,n,i,a){var s=m();try{return y(e)(r,t,n,i,a)}catch(o){if(g(s),o!==o+0)throw o;_(1,0)}}function Wi(e,r,t,n,i,a,s,o,c,v){var d=m();try{return y(e)(r,t,n,i,a,s,o,c,v)}catch(p){if(g(d),p!==p+0)throw p;_(1,0)}}function xi(e,r,t){var n=m();try{return y(e)(r,t)}catch(i){if(g(n),i!==i+0)throw i;_(1,0)}}function Di(e,r,t,n,i){var a=m();try{return y(e)(r,t,n,i)}catch(s){if(g(a),s!==s+0)throw s;_(1,0)}}function ji(e,r,t,n,i,a,s,o,c,v){var d=m();try{y(e)(r,t,n,i,a,s,o,c,v)}catch(p){if(g(d),p!==p+0)throw p;_(1,0)}}function Ui(e,r,t,n,i,a,s){var o=m();try{y(e)(r,t,n,i,a,s)}catch(c){if(g(o),c!==c+0)throw c;_(1,0)}}function Bi(e,r,t,n){var i=m();try{return y(e)(r,t,n)}catch(a){if(g(i),a!==a+0)throw a;_(1,0)}}function Li(e,r,t,n,i,a,s,o,c,v,d,p){var b=m();try{return y(e)(r,t,n,i,a,s,o,c,v,d,p)}catch(w){if(g(b),w!==w+0)throw w;_(1,0)}}function Hi(e,r,t,n,i,a,s){var o=m();try{return si(e,r,t,n,i,a,s)}catch(c){if(g(o),c!==c+0)throw c;_(1,0)}}function Vi(e,r,t,n,i){var a=m();try{return ci(e,r,t,n,i)}catch(s){if(g(a),s!==s+0)throw s;_(1,0)}}function Kr(){if(X>0){or=Kr;return}if(Ke(),X>0){or=Kr;return}function e(){var r;l.calledRun=!0,!ce&&(rt(),O(l),(r=l.onRuntimeInitialized)===null||r===void 0||r.call(l),et())}l.setStatus?(l.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>l.setStatus(""),1),e()},1)):e()}function Ni(){if(l.preInit)for(typeof l.preInit=="function"&&(l.preInit=[l.preInit]);l.preInit.length>0;)l.preInit.shift()()}return Ni(),Kr(),f=E,f};const ca={...kr,formats:[...kr.formats]},ua={...te};function ie(u){return ne(Wr,u)}function la(){return aa(Wr)}function fa(u){return ie({overrides:u,equalityFn:Object.is,fireImmediately:!0})}function va(u){ie({overrides:u,equalityFn:Object.is,fireImmediately:!1})}async function ae(u,f){return oa(Wr,u,f)}async function da(u,f){return ae(u,f)}async function pa(u,f){return ae(u,f)}async function ha(u,f){return sa(Wr,u,f)}const _a="3b7ce17efb752c53b50207f9e4f4d3a118a86969582e109556920b848958886e";exports.ZXING_CPP_COMMIT=ta;exports.ZXING_WASM_SHA256=_a;exports.ZXING_WASM_VERSION=ea;exports.barcodeFormats=pr;exports.binarizers=Ge;exports.characterSets=ee;exports.contentTypes=qe;exports.defaultReaderOptions=ca;exports.defaultWriterOptions=ua;exports.eanAddOnSymbols=Qe;exports.getZXingModule=fa;exports.linearBarcodeFormats=Xe;exports.matrixBarcodeFormats=Ze;exports.prepareZXingModule=ie;exports.purgeZXingModule=la;exports.readBarcodes=ae;exports.readBarcodesFromImageData=pa;exports.readBarcodesFromImageFile=da;exports.setZXingModuleOverrides=va;exports.textModes=Ye;exports.writeBarcode=ha;