You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3 lines
34 KiB

8 months ago
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("../core-CzvqAd2a.js");var Cr=(()=>{var Z;var j=typeof document<"u"&&((Z=document.currentScript)==null?void 0:Z.tagName.toUpperCase())==="SCRIPT"?document.currentScript.src:void 0;return function(Ve={}){var Zr,c=Ve,Xr,ar,Be=new Promise((r,e)=>{Xr=r,ar=e}),Ne=typeof window=="object",ze=typeof Bun<"u",Pr=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&typeof process.versions.node=="string"&&process.type!="renderer";var Gr=Object.assign({},c),qr="./this.program",O="";function Le(r){return c.locateFile?c.locateFile(r,O):O+r}var Kr,Ar;if(Ne||Pr||ze){var Fr;Pr?O=self.location.href:typeof document<"u"&&((Fr=document.currentScript)===null||Fr===void 0?void 0:Fr.tagName.toUpperCase())==="SCRIPT"&&(O=document.currentScript.src),j&&(O=j),O.startsWith("blob:")?O="":O=O.substr(0,O.replace(/[?#].*/,"").lastIndexOf("/")+1),Pr&&(Ar=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),Kr=r=>fetch(r,{credentials:"same-origin"}).then(e=>e.ok?e.arrayBuffer():Promise.reject(new Error(e.status+" : "+e.url)))}var Ze=c.print||console.log.bind(console),X=c.printErr||console.error.bind(console);Object.assign(c,Gr),Gr=null,c.arguments&&c.arguments,c.thisProgram&&(qr=c.thisProgram);var or=c.wasmBinary,sr,Qr=!1,W,F,G,Q,V,$,Yr,Jr;function re(){var r=sr.buffer;c.HEAP8=W=new Int8Array(r),c.HEAP16=G=new Int16Array(r),c.HEAPU8=F=new Uint8Array(r),c.HEAPU16=Q=new Uint16Array(r),c.HEAP32=V=new Int32Array(r),c.HEAPU32=$=new Uint32Array(r),c.HEAPF32=Yr=new Float32Array(r),c.HEAPF64=Jr=new Float64Array(r)}var ee=[],te=[],ne=[];function Xe(){var r=c.preRun;r&&(typeof r=="function"&&(r=[r]),r.forEach(Ke)),Rr(ee)}function Ge(){Rr(te)}function qe(){var r=c.postRun;r&&(typeof r=="function"&&(r=[r]),r.forEach(Ye)),Rr(ne)}function Ke(r){ee.unshift(r)}function Qe(r){te.unshift(r)}function Ye(r){ne.unshift(r)}var B=0,Y=null;function Je(r){var e;B++,(e=c.monitorRunDependencies)===null||e===void 0||e.call(c,B)}function rt(r){var e;if(B--,(e=c.monitorRunDependencies)===null||e===void 0||e.call(c,B),B==0&&Y){var t=Y;Y=null,t()}}function Er(r){var e;(e=c.onAbort)===null||e===void 0||e.call(c,r),r="Aborted("+r+")",X(r),Qr=!0,r+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(r);throw ar(t),t}var et="data:application/octet-stream;base64,",ie=r=>r.startsWith(et);function tt(){var r="zxing_reader.wasm";return ie(r)?r:Le(r)}var ur;function ae(r){if(r==ur&&or)return new Uint8Array(or);if(Ar)return Ar(r);throw"both async and sync fetching of the wasm failed"}function nt(r){return or?Promise.resolve().then(()=>ae(r)):Kr(r).then(e=>new Uint8Array(e),()=>ae(r))}function oe(r,e,t){return nt(r).then(n=>WebAssembly.instantiate(n,e)).then(t,n=>{X(`failed to asynchronously prepare wasm: ${n}`),Er(n)})}function it(r,e,t,n){return!r&&typeof WebAssembly.instantiateStreaming=="function"&&!ie(e)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(i=>{var a=WebAssembly.instantiateStreaming(i,t);return a.then(n,function(s){return X(`wasm streaming compile failed: ${s}`),X("falling back to ArrayBuffer instantiation"),oe(e,t,n)})}):oe(e,t,n)}function at(){return{a:qn}}function ot(){var r,e=at();function t(i,a){return w=i.exports,sr=w.za,re(),_e=w.Da,Qe(w.Aa),rt(),w}Je();function n(i){t(i.instance)}if(c.instantiateWasm)try{return c.instantiateWasm(e,t)}catch(i){X(`Module.instantiateWasm callback failed with error: ${i}`),ar(i)}return(r=ur)!==null&&r!==void 0||(ur=tt()),it(or,ur,e,n).catch(ar),{}}var Rr=r=>{r.forEach(e=>e(c))};c.noExitRuntime;var h=r=>Ee(r),_=()=>Re(),lr=[],cr=0,st=r=>{var e=new kr(r);return e.get_caught()||(e.set_caught(!0),cr--),e.set_rethrown(!1),lr.push(e),Se(r),Ae(r)},M=0,ut=()=>{d(0,0);var r=lr.pop();ke(r.excPtr),M=0};class kr{constructor(e){this.excPtr=e,this.ptr=e-24}set_type(e){$[this.ptr+4>>2]=e}get_type(){return $[this.ptr+4>>2]}set_destructor(e){$[this.ptr+8>>2]=e}get_destructor(){return $[this.ptr+8>>2]}set_caug
`+i.replace(/^Error(:[^\n]*)?\n/,""))});return t.prototype=Object.create(r.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},t},ge,ye=r=>{var e=Pe(r),t=A(e);return I(e),t},$r=(r,e)=>{var t=[],n={};function i(a){if(!n[a]&&!N[a]){if(dr[a]){dr[a].forEach(i);return}t.push(a),n[a]=!0}}throw e.forEach(i),new ge(`${r}: `+t.map(ye).join([", "]))},Bt=(r,e,t,n,i,a,s,o,u,l,f,v,p)=>{f=A(f),a=S(i,a),o&&(o=S(s,o)),l&&(l=S(u,l)),p=S(v,p);var m=jt(f);Dr(m,function(){$r(`Cannot construct ${f} due to unbound types`,[n])}),z([r,e,t],n?[n]:[],b=>{b=b[0];var P,T;n?(P=b.registeredClass,T=P.instancePrototype):T=gr.prototype;var C=er(f,function(){if(Object.getPrototypeOf(this)!==L)throw new K("Use 'new' to construct "+f);if(E.constructor_body===void 0)throw new K(f+" has no accessible constructor");for(var Ie=arguments.length,wr=new Array(Ie),Tr=0;Tr<Ie;Tr++)wr[Tr]=arguments[Tr];var He=E.constructor_body[wr.length];if(He===void 0)throw new K(`Tried to invoke ctor of ${f} with invalid number of parameters (${wr.length}) - expected (${Object.keys(E.constructor_body).toString()}) parameters instead!`);return He.apply(this,wr)}),L=Object.create(T,{constructor:{value:C}});C.prototype=L;var E=new Ot(f,C,L,p,P,a,o,l);if(E.baseClass){var H,ir;(ir=(H=E.baseClass).__derivedClasses)!==null&&ir!==void 0||(H.__derivedClasses=[]),E.baseClass.__derivedClasses.push(E)}var ki=new yr(f,E,!0,!1,!1),Ue=new yr(f+"*",E,!1,!1,!1),xe=new yr(f+" const*",E,!1,!0,!1);return ve[r]={pointerType:Ue,constPointerType:xe},he(m,C),[ki,Ue,xe]})},Ur=(r,e)=>{for(var t=[],n=0;n<r;n++)t.push($[e+n*4>>2]);return t};function Nt(r){for(var e=1;e<r.length;++e)if(r[e]!==null&&r[e].destructorFunction===void 0)return!0;return!1}function xr(r,e,t,n,i,a){var s=e.length;s<2&&y("argTypes array size mismatch! Must at least get return value and 'this' types!");var o=e[1]!==null&&t!==null,u=Nt(e),l=e[0].name!=="void",f=s-2,v=new Array(f),p=[],m=[],b=function(){m.length=0;var P;p.length=o?2:1,p[0]=i,o&&(P=e[1].toWireType(m,this),p[1]=P);for(var T=0;T<f;++T)v[T]=e[T+2].toWireType(m,T<0||arguments.length<=T?void 0:arguments[T]),p.push(v[T]);var C=n(...p);function L(E){if(u)jr(m);else for(var H=o?1:2;H<e.length;H++){var ir=H===1?P:v[H-2];e[H].destructorFunction!==null&&e[H].destructorFunction(ir)}if(l)return e[0].fromWireType(E)}return L(C)};return er(r,b)}var zt=(r,e,t,n,i,a)=>{var s=Ur(e,t);i=S(n,i),z([],[r],o=>{o=o[0];var u=`constructor ${o.name}`;if(o.registeredClass.constructor_body===void 0&&(o.registeredClass.constructor_body=[]),o.registeredClass.constructor_body[e-1]!==void 0)throw new K(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${o.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return o.registeredClass.constructor_body[e-1]=()=>{$r(`Cannot construct ${o.name} due to unbound types`,s)},z([],s,l=>(l.splice(1,0,null),o.registeredClass.constructor_body[e-1]=xr(u,l,null,i,a),[])),[]})},me=r=>{r=r.trim();const e=r.indexOf("(");return e!==-1?r.substr(0,e):r},Lt=(r,e,t,n,i,a,s,o,u,l)=>{var f=Ur(t,n);e=A(e),e=me(e),a=S(i,a),z([],[r],v=>{v=v[0];var p=`${v.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),o&&v.registeredClass.pureVirtualFunctions.push(e);function m(){$r(`Cannot call ${p} due to unbound types`,f)}var b=v.registeredClass.instancePrototype,P=b[e];return P===void 0||P.overloadTable===void 0&&P.className!==v.name&&P.argCount===t-2?(m.argCount=t-2,m.className=v.name,b[e]=m):(pe(b,e,p),b[e].overloadTable[t-2]=m),z([],f,T=>{var C=xr(p,T,v,a,s);return b[e].overloadTable===void 0?(C.argCount=t-2,b[e]=C):b[e].overloadTable[t-2]=C,[]}),[]})},Ir=[],U=[],Hr=r=>{r>9&&--U[r+1]===0&&(U[r]=void 0,Ir.push(r))},Zt=()=>U.length/2-5-Ir.length,Xt=()=>{U.push(0,1,void 0,1,null,1,!0,1,!1,1),c.count_emval_handles=Zt},x={toValue:r=>(r||y("Cannot use deleted val. handle = "+r),U[r]),toHandle:r=>{switch(r){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const e=Ir.pop()|