@sec-ant/barcode-detector
Advanced tools
Comparing version 1.2.1 to 1.2.2
@@ -1,3 +0,3 @@ | ||
"use strict";var He=(c,p,u)=>{if(!p.has(c))throw TypeError("Cannot "+u)};var ke=(c,p,u)=>(He(c,p,"read from private field"),u?u.call(c):p.get(c)),Ue=(c,p,u)=>{if(p.has(c))throw TypeError("Cannot add the same private member more than once");p instanceof WeakSet?p.add(c):p.set(c,u)},Be=(c,p,u,g)=>(He(c,p,"write to private field"),g?g.call(c,u):p.set(c,u),u);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ve=["aztec","code_128","code_39","code_93","codabar","data_matrix","ean_13","ean_8","itf","pdf417","qr_code","upc_a","upc_e","unknown"];function Ma(c){if(Ge(c))return{width:c.naturalWidth,height:c.naturalHeight};if(Xe(c))return{width:c.width.baseVal.value,height:c.height.baseVal.value};if(qe(c))return{width:c.videoWidth,height:c.videoHeight};if(ja(c))return{width:c.width,height:c.height};if(Je(c))return{width:c.width,height:c.height};if(Ra(c))return{width:c.width,height:c.height};if(Ze(c))return{width:c.displayWidth,height:c.displayHeight};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 Ge(c){try{return c instanceof HTMLImageElement}catch{return!1}}function Xe(c){try{return c instanceof SVGImageElement}catch{return!1}}function qe(c){try{return c instanceof HTMLVideoElement}catch{return!1}}function ja(c){try{return c instanceof HTMLCanvasElement}catch{return!1}}function Je(c){try{return c instanceof ImageBitmap}catch{return!1}}function Ra(c){try{return c instanceof OffscreenCanvas}catch{return!1}}function Ze(c){try{return c instanceof VideoFrame}catch{return!1}}function Ia(c){try{return c instanceof Blob}catch{return!1}}function Wa(c){try{return c instanceof ImageData}catch{return!1}}function Ha(c,p){try{const u=new OffscreenCanvas(c,p);if(u.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return u;throw void 0}catch{const u=document.createElement("canvas");return u.width=c,u.height=p,u}}async function Qe(c){if(Ge(c)&&!await Ba(c))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(Xe(c)&&!await Va(c))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(Ze(c)&&za(c))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(qe(c)&&(c.readyState===0||c.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(Je(c)&&Ya(c))throw new DOMException("The image source is detached.","InvalidStateError");const{width:p,height:u}=Ma(c);if(p===0||u===0)return null;const P=Ha(p,u).getContext("2d");P.drawImage(c,0,0);try{return P.getImageData(0,0,p,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function ka(c){let p;try{p=await createImageBitmap(c)}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await Qe(p)}async function Ua(c){if(Ia(c))return await ka(c);if(Wa(c)){if(La(c))throw new DOMException("The image data has been detached.","InvalidStateError");return c}return await Qe(c)}async function Ba(c){try{return await c.decode(),!0}catch{return!1}}async function Va(c){var p;try{return await((p=c.decode)==null?void 0:p.call(c)),!0}catch{return!1}}function za(c){return c.format===null}function La(c){return c.data.buffer.byteLength===0}function Ya(c){return c.width===0&&c.height===0}function ze(c,p){return c instanceof DOMException?new DOMException(`${p}: ${c.message}`,c.name):c instanceof Error?new c.constructor(`${p}: ${c.message}`):new Error(`${p}: ${c}`)}const Le=c=>{let p;const u=new Set,g=(M,N)=>{const k=typeof M=="function"?M(p):M;if(!Object.is(k,p)){const j=p;p=N??typeof k!="object"?k:Object.assign({},p,k),u.forEach(L=>L(p,j))}},P=()=>p,F={setState:g,getState:P,subscribe:M=>(u.add(M),()=>u.delete(M)),destroy:()=>{u.clear()}};return p=c(g,P,F),F},Na=c=>c?Le(c):Le,Ga={locateFile:(c,p)=>{var u;const g=(u=c.match(new RegExp("(?<=_).+?(?=\\.wasm$)")))==null?void 0:u[0];return g?`https://cdn.jsdelivr.net/npm/@sec-ant/zxing-wasm@2.1.2/dist/${g}/${c}`:p+c}},lt=Na()(()=>({zxingModuleWeakMap:new WeakMap,zxingModuleOverrides:Ga}));function Xa(c){lt.setState({zxingModuleOverrides:c})}function Ke(c,p=lt.getState().zxingModuleOverrides){const{zxingModuleWeakMap:u}=lt.getState(),g=u.get(c);if(g&&Object.is(p,lt.getState().zxingModuleOverrides))return g;{lt.setState({zxingModuleOverrides:p});const P=c(p);return u.set(c,P),P}}const Ye=["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"],rt={tryHarder:!0,formats:[],maxSymbols:255};async function qa(c,{tryHarder:p=rt.tryHarder,formats:u=rt.formats,maxSymbols:g=rt.maxSymbols}=rt,P){const F=await Ke(P,lt.getState().zxingModuleOverrides),{data:M,width:N,height:k,data:{byteLength:j}}=c,L=F._malloc(j);F.HEAP8.set(M,L);const G=F.readBarcodesFromPixmap(L,N,k,p,Ja(u),g);F._free(L);const B=[];for(let V=0;V<G.size();++V){const X=G.get(V);B.push({...X,format:Za(X.format)})}return B}function Ja(c){return c.join("|")}function Za(c){const p=Ne(c);let u=0,g=Ye.length-1;for(;u<=g;){const P=Math.floor((u+g)/2),F=Ye[P],M=Ne(F);if(M===p)return F;M<p?u=P+1:g=P-1}return"None"}function Ne(c){return c.toLowerCase().replace(/_-\[\]/g,"")}var tr=(()=>{var c=typeof document>"u"?require("url").pathToFileURL(__filename).href:document.currentScript&&document.currentScript.src||new URL("pure.js",document.baseURI).href;return function(p={}){var u=p,g,P;u.ready=new Promise((t,e)=>{g=t,P=e});var F=Object.assign({},u),M="./this.program",N=typeof window=="object",k=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var j="";function L(t){return u.locateFile?u.locateFile(t,j):j+t}var G;(N||k)&&(k?j=self.location.href:typeof document<"u"&&document.currentScript&&(j=document.currentScript.src),c&&(j=c),j.indexOf("blob:")!==0?j=j.substr(0,j.replace(/[?#].*/,"").lastIndexOf("/")+1):j="",k&&(G=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 B=u.printErr||console.error.bind(console);Object.assign(u,F),F=null,u.arguments&&u.arguments,u.thisProgram&&(M=u.thisProgram),u.quit&&u.quit;var V;u.wasmBinary&&(V=u.wasmBinary),u.noExitRuntime,typeof WebAssembly!="object"&&_t("no native wasm support detected");var X,E,bt=!1,q,U,ut,Ct,R,S,qt,Jt;function Zt(){var t=X.buffer;u.HEAP8=q=new Int8Array(t),u.HEAP16=ut=new Int16Array(t),u.HEAP32=R=new Int32Array(t),u.HEAPU8=U=new Uint8Array(t),u.HEAPU16=Ct=new Uint16Array(t),u.HEAPU32=S=new Uint32Array(t),u.HEAPF32=qt=new Float32Array(t),u.HEAPF64=Jt=new Float64Array(t)}var Qt,Kt=[],te=[],ee=[];function rr(){if(u.preRun)for(typeof u.preRun=="function"&&(u.preRun=[u.preRun]);u.preRun.length;)or(u.preRun.shift());It(Kt)}function nr(){It(te)}function ar(){if(u.postRun)for(typeof u.postRun=="function"&&(u.postRun=[u.postRun]);u.postRun.length;)sr(u.postRun.shift());It(ee)}function or(t){Kt.unshift(t)}function ir(t){te.unshift(t)}function sr(t){ee.unshift(t)}var nt=0,dt=null;function ur(t){nt++,u.monitorRunDependencies&&u.monitorRunDependencies(nt)}function cr(t){if(nt--,u.monitorRunDependencies&&u.monitorRunDependencies(nt),nt==0&&dt){var e=dt;dt=null,e()}}function _t(t){u.onAbort&&u.onAbort(t),t="Aborted("+t+")",B(t),bt=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw P(e),e}var fr="data:application/octet-stream;base64,";function re(t){return t.startsWith(fr)}var at;u.locateFile?(at="zxing_reader.wasm",re(at)||(at=L(at))):at=new URL("/reader/zxing_reader.wasm",self.location).href;function ne(t){if(t==at&&V)return new Uint8Array(V);if(G)return G(t);throw"both async and sync fetching of the wasm failed"}function lr(t){return!V&&(N||k)&&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(()=>ne(t)):Promise.resolve().then(()=>ne(t))}function ae(t,e,r){return lr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{B("failed to asynchronously prepare wasm: "+n),_t(n)})}function dr(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!re(e)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(a=>{var o=WebAssembly.instantiateStreaming(a,r);return o.then(n,function(i){return B("wasm streaming compile failed: "+i),B("falling back to ArrayBuffer instantiation"),ae(e,r,n)})}):ae(e,r,n)}function hr(){var t={a:ta};function e(n,a){var o=n.exports;return E=o,X=E.qa,Zt(),Qt=E.ua,ir(E.ra),cr(),o}ur();function r(n){e(n.instance)}if(u.instantiateWasm)try{return u.instantiateWasm(t,e)}catch(n){B("Module.instantiateWasm callback failed with error: "+n),P(n)}return dr(V,at,t,r).catch(P),{}}var It=t=>{for(;t.length>0;)t.shift()(u)},Tt=[],Pt=0;function pr(t){var e=new Et(t);return e.get_caught()||(e.set_caught(!0),Pt--),e.set_rethrown(!1),Tt.push(e),Oe(e.excPtr),e.get_exception_ptr()}var J=0;function yr(){w(0,0);var t=Tt.pop();Fe(t.excPtr),J=0}function Et(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,q[this.ptr+12>>0]=e},this.get_caught=function(){return q[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,q[this.ptr+13>>0]=e},this.get_rethrown=function(){return q[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=je(this.get_type());if(e)return S[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}function vr(t){throw J||(J=t),J}var Wt=t=>{var e=J;if(!e)return wt(0),0;var r=new Et(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return wt(0),e;for(var a in t){var o=t[a];if(o===0||o===n)break;var i=r.ptr+16;if(Me(o,n,i))return wt(o),e}return wt(n),e},mr=()=>Wt([]),gr=t=>Wt([t]),wr=(t,e)=>Wt([t,e]);function $r(t){var e=new Et(t).get_exception_ptr();return e}function br(){var t=Tt.pop();t||_t("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(Tt.push(t),t.set_rethrown(!0),t.set_caught(!1),Pt++),J=e,J}function Cr(t,e,r){var n=new Et(t);throw n.init(e,r),J=t,Pt++,J}function _r(){return Pt}var At={};function oe(t){for(;t.length;){var e=t.pop(),r=t.pop();r(e)}}function ht(t){return this.fromWireType(R[t>>2])}var ct={},ot={},xt={},ie=void 0;function Dt(t){throw new ie(t)}function it(t,e,r){t.forEach(function(s){xt[s]=e});function n(s){var f=r(s);f.length!==t.length&&Dt("Mismatched type converter count");for(var l=0;l<t.length;++l)Z(t[l],f[l])}var a=new Array(e.length),o=[],i=0;e.forEach((s,f)=>{ot.hasOwnProperty(s)?a[f]=ot[s]:(o.push(s),ct.hasOwnProperty(s)||(ct[s]=[]),ct[s].push(()=>{a[f]=ot[s],++i,i===o.length&&n(a)}))}),o.length===0&&n(a)}var Tr=function(t){var e=At[t];delete At[t];var r=e.rawConstructor,n=e.rawDestructor,a=e.fields,o=a.map(i=>i.getterReturnType).concat(a.map(i=>i.setterArgumentType));it([t],o,i=>{var s={};return a.forEach((f,l)=>{var h=f.fieldName,v=i[l],m=f.getter,C=f.getterContext,A=i[l+a.length],I=f.setter,x=f.setterContext;s[h]={read:W=>v.fromWireType(m(C,W)),write:(W,d)=>{var y=[];I(x,W,A.toWireType(y,d)),oe(y)}}}),[{name:e.name,fromWireType:function(f){var l={};for(var h in s)l[h]=s[h].read(f);return n(f),l},toWireType:function(f,l){for(var h in s)if(!(h in l))throw new TypeError(`Missing field: "${h}"`);var v=r();for(h in s)s[h].write(v,l[h]);return f!==null&&f.push(n,v),v},argPackAdvance:8,readValueFromPointer:ht,destructorFunction:n}]})};function Pr(t,e,r,n,a){}function Ht(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError(`Unknown type size: ${t}`)}}function Er(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);se=t}var se=void 0;function H(t){for(var e="",r=t;U[r];)e+=se[U[r++]];return e}var ft=void 0;function _(t){throw new ft(t)}function Ar(t,e,r={}){var n=e.name;if(t||_(`type "${n}" must have a positive integer typeid pointer`),ot.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;_(`Cannot register type '${n}' twice`)}if(ot[t]=e,delete xt[t],ct.hasOwnProperty(t)){var a=ct[t];delete ct[t],a.forEach(o=>o())}}function Z(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Ar(t,e,r)}function xr(t,e,r,n,a){var o=Ht(r);e=H(e),Z(t,{name:e,fromWireType:function(i){return!!i},toWireType:function(i,s){return s?n:a},argPackAdvance:8,readValueFromPointer:function(i){var s;if(r===1)s=q;else if(r===2)s=ut;else if(r===4)s=R;else throw new TypeError("Unknown boolean type size: "+e);return this.fromWireType(s[i>>o])},destructorFunction:null})}function Dr(t){if(!(this instanceof tt)||!(t instanceof tt))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,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}function Sr(t){return{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}}function kt(t){function e(r){return r.$$.ptrType.registeredClass.name}_(e(t)+" instance already deleted")}var Ut=!1;function ue(t){}function Fr(t){t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)}function ce(t){t.count.value-=1;var e=t.count.value===0;e&&Fr(t)}function 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)}var le={};function Or(){return Object.keys(vt).length}function Mr(){var t=[];for(var e in vt)vt.hasOwnProperty(e)&&t.push(vt[e]);return t}var pt=[];function Bt(){for(;pt.length;){var t=pt.pop();t.$$.deleteScheduled=!1,t.delete()}}var yt=void 0;function jr(t){yt=t,pt.length&&yt&&yt(Bt)}function Rr(){u.getInheritedInstanceCount=Or,u.getLiveInheritedInstances=Mr,u.flushPendingDeletes=Bt,u.setDelayFunction=jr}var vt={};function Ir(t,e){for(e===void 0&&_("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}function Wr(t,e){return e=Ir(t,e),vt[e]}function St(t,e){(!e.ptrType||!e.ptr)&&Dt("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&Dt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},mt(Object.create(t,{$$:{value:e}}))}function Hr(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=Wr(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?St(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):St(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var o=this.registeredClass.getActualType(e),i=le[o];if(!i)return a.call(this);var s;this.isConst?s=i.constPointerType:s=i.pointerType;var f=fe(e,this.registeredClass,s.registeredClass);return f===null?a.call(this):this.isSmartPointer?St(s.registeredClass.instancePrototype,{ptrType:s,ptr:f,smartPtrType:this,smartPtr:t}):St(s.registeredClass.instancePrototype,{ptrType:s,ptr:f})}var mt=function(t){return typeof FinalizationRegistry>"u"?(mt=e=>e,t):(Ut=new FinalizationRegistry(e=>{ce(e.$$)}),mt=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Ut.register(e,a,e)}return e},ue=e=>Ut.unregister(e),mt(t))};function kr(){if(this.$$.ptr||kt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=mt(Object.create(Object.getPrototypeOf(this),{$$:{value:Sr(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t}function Ur(){this.$$.ptr||kt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&_("Object already scheduled for deletion"),ue(this),ce(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Br(){return!this.$$.ptr}function Vr(){return this.$$.ptr||kt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&_("Object already scheduled for deletion"),pt.push(this),pt.length===1&&yt&&yt(Bt),this.$$.deleteScheduled=!0,this}function zr(){tt.prototype.isAliasOf=Dr,tt.prototype.clone=kr,tt.prototype.delete=Ur,tt.prototype.isDeleted=Br,tt.prototype.deleteLater=Vr}function tt(){}var Lr=48,Yr=57;function de(t){if(t===void 0)return"_unknown";t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=Lr&&e<=Yr?`_${t}`:t}function he(t,e){return t=de(t),{[t]:function(){return e.apply(this,arguments)}}[t]}function pe(t,e,r){if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||_(`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}}function ye(t,e,r){u.hasOwnProperty(t)?((r===void 0||u[t].overloadTable!==void 0&&u[t].overloadTable[r]!==void 0)&&_(`Cannot register public name '${t}' twice`),pe(u,t,t),u.hasOwnProperty(r)&&_(`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 Nr(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=[]}function Vt(t,e,r){for(;e!==r;)e.upcast||_(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t}function Gr(t,e){if(e===null)return this.isReference&&_(`null is not a valid ${this.name}`),0;e.$$||_(`Cannot pass "${Yt(e)}" as a ${this.name}`),e.$$.ptr||_(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Vt(e.$$.ptr,r,this.registeredClass);return n}function Xr(t,e){var r;if(e===null)return this.isReference&&_(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;e.$$||_(`Cannot pass "${Yt(e)}" as a ${this.name}`),e.$$.ptr||_(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&_(`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=Vt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&_("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:_(`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,et.toHandle(function(){a.delete()})),t!==null&&t.push(this.rawDestructor,r)}break;default:_("Unsupporting sharing policy")}return r}function qr(t,e){if(e===null)return this.isReference&&_(`null is not a valid ${this.name}`),0;e.$$||_(`Cannot pass "${Yt(e)}" as a ${this.name}`),e.$$.ptr||_(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&_(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Vt(e.$$.ptr,r,this.registeredClass);return n}function Jr(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function Zr(t){this.rawDestructor&&this.rawDestructor(t)}function Qr(t){t!==null&&t.delete()}function Kr(){Q.prototype.getPointee=Jr,Q.prototype.destructor=Zr,Q.prototype.argPackAdvance=8,Q.prototype.readValueFromPointer=ht,Q.prototype.deleteObject=Qr,Q.prototype.fromWireType=Hr}function Q(t,e,r,n,a,o,i,s,f,l,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=f,this.rawShare=l,this.rawDestructor=h,!a&&e.baseClass===void 0?n?(this.toWireType=Gr,this.destructorFunction=null):(this.toWireType=qr,this.destructorFunction=null):this.toWireType=Xr}function ve(t,e,r){u.hasOwnProperty(t)||Dt("Replacing nonexistant public symbol"),u[t].overloadTable!==void 0&&r!==void 0?u[t].overloadTable[r]=e:(u[t]=e,u[t].argCount=r)}var tn=(t,e,r)=>{var n=u["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},Ft=[],T=t=>{var e=Ft[t];return e||(t>=Ft.length&&(Ft.length=t+1),Ft[t]=e=Qt.get(t)),e},en=(t,e,r)=>{if(t.includes("j"))return tn(t,e,r);var n=T(e).apply(null,r);return n},rn=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),en(t,e,r)}};function Y(t,e){t=H(t);function r(){return t.includes("j")?rn(t,e):T(e)}var n=r();return typeof n!="function"&&_(`unknown function pointer with signature ${t}: ${e}`),n}function nn(t,e){var r=he(e,function(n){this.name=e,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+` | ||
"use strict";var He=(c,p,u)=>{if(!p.has(c))throw TypeError("Cannot "+u)};var ke=(c,p,u)=>(He(c,p,"read from private field"),u?u.call(c):p.get(c)),Ue=(c,p,u)=>{if(p.has(c))throw TypeError("Cannot add the same private member more than once");p instanceof WeakSet?p.add(c):p.set(c,u)},Be=(c,p,u,g)=>(He(c,p,"write to private field"),g?g.call(c,u):p.set(c,u),u);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ve=["aztec","code_128","code_39","code_93","codabar","data_matrix","ean_13","ean_8","itf","pdf417","qr_code","upc_a","upc_e","unknown"];function Ma(c){if(Ge(c))return{width:c.naturalWidth,height:c.naturalHeight};if(Xe(c))return{width:c.width.baseVal.value,height:c.height.baseVal.value};if(qe(c))return{width:c.videoWidth,height:c.videoHeight};if(ja(c))return{width:c.width,height:c.height};if(Je(c))return{width:c.width,height:c.height};if(Ra(c))return{width:c.width,height:c.height};if(Ze(c))return{width:c.displayWidth,height:c.displayHeight};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 Ge(c){try{return c instanceof HTMLImageElement}catch{return!1}}function Xe(c){try{return c instanceof SVGImageElement}catch{return!1}}function qe(c){try{return c instanceof HTMLVideoElement}catch{return!1}}function ja(c){try{return c instanceof HTMLCanvasElement}catch{return!1}}function Je(c){try{return c instanceof ImageBitmap}catch{return!1}}function Ra(c){try{return c instanceof OffscreenCanvas}catch{return!1}}function Ze(c){try{return c instanceof VideoFrame}catch{return!1}}function Ia(c){try{return c instanceof Blob}catch{return!1}}function Wa(c){try{return c instanceof ImageData}catch{return!1}}function Ha(c,p){try{const u=new OffscreenCanvas(c,p);if(u.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return u;throw void 0}catch{const u=document.createElement("canvas");return u.width=c,u.height=p,u}}async function Qe(c){if(Ge(c)&&!await Ba(c))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(Xe(c)&&!await Va(c))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(Ze(c)&&za(c))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(qe(c)&&(c.readyState===0||c.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(Je(c)&&Ya(c))throw new DOMException("The image source is detached.","InvalidStateError");const{width:p,height:u}=Ma(c);if(p===0||u===0)return null;const P=Ha(p,u).getContext("2d");P.drawImage(c,0,0);try{return P.getImageData(0,0,p,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function ka(c){let p;try{p=await createImageBitmap(c)}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await Qe(p)}async function Ua(c){if(Ia(c))return await ka(c);if(Wa(c)){if(La(c))throw new DOMException("The image data has been detached.","InvalidStateError");return c}return await Qe(c)}async function Ba(c){try{return await c.decode(),!0}catch{return!1}}async function Va(c){var p;try{return await((p=c.decode)==null?void 0:p.call(c)),!0}catch{return!1}}function za(c){return c.format===null}function La(c){return c.data.buffer.byteLength===0}function Ya(c){return c.width===0&&c.height===0}function ze(c,p){return c instanceof DOMException?new DOMException(`${p}: ${c.message}`,c.name):c instanceof Error?new c.constructor(`${p}: ${c.message}`):new Error(`${p}: ${c}`)}const Le=c=>{let p;const u=new Set,g=(M,N)=>{const k=typeof M=="function"?M(p):M;if(!Object.is(k,p)){const j=p;p=N??typeof k!="object"?k:Object.assign({},p,k),u.forEach(L=>L(p,j))}},P=()=>p,F={setState:g,getState:P,subscribe:M=>(u.add(M),()=>u.delete(M)),destroy:()=>{u.clear()}};return p=c(g,P,F),F},Na=c=>c?Le(c):Le,Ga={locateFile:(c,p)=>{var u;const g=(u=c.match(/_(.+?)\.wasm$/))==null?void 0:u[1];return g?`https://cdn.jsdelivr.net/npm/@sec-ant/zxing-wasm@2.1.3/dist/${g}/${c}`:p+c}},lt=Na()(()=>({zxingModuleWeakMap:new WeakMap,zxingModuleOverrides:Ga}));function Xa(c){lt.setState({zxingModuleOverrides:c})}function Ke(c,p=lt.getState().zxingModuleOverrides){const{zxingModuleWeakMap:u}=lt.getState(),g=u.get(c);if(g&&Object.is(p,lt.getState().zxingModuleOverrides))return g;{lt.setState({zxingModuleOverrides:p});const P=c(p);return u.set(c,P),P}}const Ye=["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"],rt={tryHarder:!0,formats:[],maxSymbols:255};async function qa(c,{tryHarder:p=rt.tryHarder,formats:u=rt.formats,maxSymbols:g=rt.maxSymbols}=rt,P){const F=await Ke(P,lt.getState().zxingModuleOverrides),{data:M,width:N,height:k,data:{byteLength:j}}=c,L=F._malloc(j);F.HEAP8.set(M,L);const G=F.readBarcodesFromPixmap(L,N,k,p,Ja(u),g);F._free(L);const B=[];for(let V=0;V<G.size();++V){const X=G.get(V);B.push({...X,format:Za(X.format)})}return B}function Ja(c){return c.join("|")}function Za(c){const p=Ne(c);let u=0,g=Ye.length-1;for(;u<=g;){const P=Math.floor((u+g)/2),F=Ye[P],M=Ne(F);if(M===p)return F;M<p?u=P+1:g=P-1}return"None"}function Ne(c){return c.toLowerCase().replace(/_-\[\]/g,"")}var tr=(()=>{var c=typeof document>"u"?require("url").pathToFileURL(__filename).href:document.currentScript&&document.currentScript.src||new URL("pure.js",document.baseURI).href;return function(p={}){var u=p,g,P;u.ready=new Promise((t,e)=>{g=t,P=e});var F=Object.assign({},u),M="./this.program",N=typeof window=="object",k=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var j="";function L(t){return u.locateFile?u.locateFile(t,j):j+t}var G;(N||k)&&(k?j=self.location.href:typeof document<"u"&&document.currentScript&&(j=document.currentScript.src),c&&(j=c),j.indexOf("blob:")!==0?j=j.substr(0,j.replace(/[?#].*/,"").lastIndexOf("/")+1):j="",k&&(G=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 B=u.printErr||console.error.bind(console);Object.assign(u,F),F=null,u.arguments&&u.arguments,u.thisProgram&&(M=u.thisProgram),u.quit&&u.quit;var V;u.wasmBinary&&(V=u.wasmBinary),u.noExitRuntime,typeof WebAssembly!="object"&&_t("no native wasm support detected");var X,E,bt=!1,q,U,ut,Ct,R,S,qt,Jt;function Zt(){var t=X.buffer;u.HEAP8=q=new Int8Array(t),u.HEAP16=ut=new Int16Array(t),u.HEAP32=R=new Int32Array(t),u.HEAPU8=U=new Uint8Array(t),u.HEAPU16=Ct=new Uint16Array(t),u.HEAPU32=S=new Uint32Array(t),u.HEAPF32=qt=new Float32Array(t),u.HEAPF64=Jt=new Float64Array(t)}var Qt,Kt=[],te=[],ee=[];function rr(){if(u.preRun)for(typeof u.preRun=="function"&&(u.preRun=[u.preRun]);u.preRun.length;)or(u.preRun.shift());It(Kt)}function nr(){It(te)}function ar(){if(u.postRun)for(typeof u.postRun=="function"&&(u.postRun=[u.postRun]);u.postRun.length;)sr(u.postRun.shift());It(ee)}function or(t){Kt.unshift(t)}function ir(t){te.unshift(t)}function sr(t){ee.unshift(t)}var nt=0,dt=null;function ur(t){nt++,u.monitorRunDependencies&&u.monitorRunDependencies(nt)}function cr(t){if(nt--,u.monitorRunDependencies&&u.monitorRunDependencies(nt),nt==0&&dt){var e=dt;dt=null,e()}}function _t(t){u.onAbort&&u.onAbort(t),t="Aborted("+t+")",B(t),bt=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw P(e),e}var fr="data:application/octet-stream;base64,";function re(t){return t.startsWith(fr)}var at;u.locateFile?(at="zxing_reader.wasm",re(at)||(at=L(at))):at=new URL("/reader/zxing_reader.wasm",self.location).href;function ne(t){if(t==at&&V)return new Uint8Array(V);if(G)return G(t);throw"both async and sync fetching of the wasm failed"}function lr(t){return!V&&(N||k)&&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(()=>ne(t)):Promise.resolve().then(()=>ne(t))}function ae(t,e,r){return lr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{B("failed to asynchronously prepare wasm: "+n),_t(n)})}function dr(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!re(e)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(a=>{var o=WebAssembly.instantiateStreaming(a,r);return o.then(n,function(i){return B("wasm streaming compile failed: "+i),B("falling back to ArrayBuffer instantiation"),ae(e,r,n)})}):ae(e,r,n)}function hr(){var t={a:ta};function e(n,a){var o=n.exports;return E=o,X=E.qa,Zt(),Qt=E.ua,ir(E.ra),cr(),o}ur();function r(n){e(n.instance)}if(u.instantiateWasm)try{return u.instantiateWasm(t,e)}catch(n){B("Module.instantiateWasm callback failed with error: "+n),P(n)}return dr(V,at,t,r).catch(P),{}}var It=t=>{for(;t.length>0;)t.shift()(u)},Tt=[],Pt=0;function pr(t){var e=new Et(t);return e.get_caught()||(e.set_caught(!0),Pt--),e.set_rethrown(!1),Tt.push(e),Oe(e.excPtr),e.get_exception_ptr()}var J=0;function yr(){w(0,0);var t=Tt.pop();Fe(t.excPtr),J=0}function Et(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,q[this.ptr+12>>0]=e},this.get_caught=function(){return q[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,q[this.ptr+13>>0]=e},this.get_rethrown=function(){return q[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=je(this.get_type());if(e)return S[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}function vr(t){throw J||(J=t),J}var Wt=t=>{var e=J;if(!e)return wt(0),0;var r=new Et(e);r.set_adjusted_ptr(e);var n=r.get_type();if(!n)return wt(0),e;for(var a in t){var o=t[a];if(o===0||o===n)break;var i=r.ptr+16;if(Me(o,n,i))return wt(o),e}return wt(n),e},mr=()=>Wt([]),gr=t=>Wt([t]),wr=(t,e)=>Wt([t,e]);function $r(t){var e=new Et(t).get_exception_ptr();return e}function br(){var t=Tt.pop();t||_t("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(Tt.push(t),t.set_rethrown(!0),t.set_caught(!1),Pt++),J=e,J}function Cr(t,e,r){var n=new Et(t);throw n.init(e,r),J=t,Pt++,J}function _r(){return Pt}var At={};function oe(t){for(;t.length;){var e=t.pop(),r=t.pop();r(e)}}function ht(t){return this.fromWireType(R[t>>2])}var ct={},ot={},xt={},ie=void 0;function Dt(t){throw new ie(t)}function it(t,e,r){t.forEach(function(s){xt[s]=e});function n(s){var f=r(s);f.length!==t.length&&Dt("Mismatched type converter count");for(var l=0;l<t.length;++l)Z(t[l],f[l])}var a=new Array(e.length),o=[],i=0;e.forEach((s,f)=>{ot.hasOwnProperty(s)?a[f]=ot[s]:(o.push(s),ct.hasOwnProperty(s)||(ct[s]=[]),ct[s].push(()=>{a[f]=ot[s],++i,i===o.length&&n(a)}))}),o.length===0&&n(a)}var Tr=function(t){var e=At[t];delete At[t];var r=e.rawConstructor,n=e.rawDestructor,a=e.fields,o=a.map(i=>i.getterReturnType).concat(a.map(i=>i.setterArgumentType));it([t],o,i=>{var s={};return a.forEach((f,l)=>{var h=f.fieldName,v=i[l],m=f.getter,C=f.getterContext,A=i[l+a.length],I=f.setter,x=f.setterContext;s[h]={read:W=>v.fromWireType(m(C,W)),write:(W,d)=>{var y=[];I(x,W,A.toWireType(y,d)),oe(y)}}}),[{name:e.name,fromWireType:function(f){var l={};for(var h in s)l[h]=s[h].read(f);return n(f),l},toWireType:function(f,l){for(var h in s)if(!(h in l))throw new TypeError(`Missing field: "${h}"`);var v=r();for(h in s)s[h].write(v,l[h]);return f!==null&&f.push(n,v),v},argPackAdvance:8,readValueFromPointer:ht,destructorFunction:n}]})};function Pr(t,e,r,n,a){}function Ht(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError(`Unknown type size: ${t}`)}}function Er(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);se=t}var se=void 0;function H(t){for(var e="",r=t;U[r];)e+=se[U[r++]];return e}var ft=void 0;function _(t){throw new ft(t)}function Ar(t,e,r={}){var n=e.name;if(t||_(`type "${n}" must have a positive integer typeid pointer`),ot.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;_(`Cannot register type '${n}' twice`)}if(ot[t]=e,delete xt[t],ct.hasOwnProperty(t)){var a=ct[t];delete ct[t],a.forEach(o=>o())}}function Z(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Ar(t,e,r)}function xr(t,e,r,n,a){var o=Ht(r);e=H(e),Z(t,{name:e,fromWireType:function(i){return!!i},toWireType:function(i,s){return s?n:a},argPackAdvance:8,readValueFromPointer:function(i){var s;if(r===1)s=q;else if(r===2)s=ut;else if(r===4)s=R;else throw new TypeError("Unknown boolean type size: "+e);return this.fromWireType(s[i>>o])},destructorFunction:null})}function Dr(t){if(!(this instanceof tt)||!(t instanceof tt))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,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}function Sr(t){return{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}}function kt(t){function e(r){return r.$$.ptrType.registeredClass.name}_(e(t)+" instance already deleted")}var Ut=!1;function ue(t){}function Fr(t){t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)}function ce(t){t.count.value-=1;var e=t.count.value===0;e&&Fr(t)}function 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)}var le={};function Or(){return Object.keys(vt).length}function Mr(){var t=[];for(var e in vt)vt.hasOwnProperty(e)&&t.push(vt[e]);return t}var pt=[];function Bt(){for(;pt.length;){var t=pt.pop();t.$$.deleteScheduled=!1,t.delete()}}var yt=void 0;function jr(t){yt=t,pt.length&&yt&&yt(Bt)}function Rr(){u.getInheritedInstanceCount=Or,u.getLiveInheritedInstances=Mr,u.flushPendingDeletes=Bt,u.setDelayFunction=jr}var vt={};function Ir(t,e){for(e===void 0&&_("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}function Wr(t,e){return e=Ir(t,e),vt[e]}function St(t,e){(!e.ptrType||!e.ptr)&&Dt("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&Dt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},mt(Object.create(t,{$$:{value:e}}))}function Hr(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=Wr(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?St(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):St(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var o=this.registeredClass.getActualType(e),i=le[o];if(!i)return a.call(this);var s;this.isConst?s=i.constPointerType:s=i.pointerType;var f=fe(e,this.registeredClass,s.registeredClass);return f===null?a.call(this):this.isSmartPointer?St(s.registeredClass.instancePrototype,{ptrType:s,ptr:f,smartPtrType:this,smartPtr:t}):St(s.registeredClass.instancePrototype,{ptrType:s,ptr:f})}var mt=function(t){return typeof FinalizationRegistry>"u"?(mt=e=>e,t):(Ut=new FinalizationRegistry(e=>{ce(e.$$)}),mt=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Ut.register(e,a,e)}return e},ue=e=>Ut.unregister(e),mt(t))};function kr(){if(this.$$.ptr||kt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=mt(Object.create(Object.getPrototypeOf(this),{$$:{value:Sr(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t}function Ur(){this.$$.ptr||kt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&_("Object already scheduled for deletion"),ue(this),ce(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function Br(){return!this.$$.ptr}function Vr(){return this.$$.ptr||kt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&_("Object already scheduled for deletion"),pt.push(this),pt.length===1&&yt&&yt(Bt),this.$$.deleteScheduled=!0,this}function zr(){tt.prototype.isAliasOf=Dr,tt.prototype.clone=kr,tt.prototype.delete=Ur,tt.prototype.isDeleted=Br,tt.prototype.deleteLater=Vr}function tt(){}var Lr=48,Yr=57;function de(t){if(t===void 0)return"_unknown";t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=Lr&&e<=Yr?`_${t}`:t}function he(t,e){return t=de(t),{[t]:function(){return e.apply(this,arguments)}}[t]}function pe(t,e,r){if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||_(`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}}function ye(t,e,r){u.hasOwnProperty(t)?((r===void 0||u[t].overloadTable!==void 0&&u[t].overloadTable[r]!==void 0)&&_(`Cannot register public name '${t}' twice`),pe(u,t,t),u.hasOwnProperty(r)&&_(`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 Nr(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=[]}function Vt(t,e,r){for(;e!==r;)e.upcast||_(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t}function Gr(t,e){if(e===null)return this.isReference&&_(`null is not a valid ${this.name}`),0;e.$$||_(`Cannot pass "${Yt(e)}" as a ${this.name}`),e.$$.ptr||_(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Vt(e.$$.ptr,r,this.registeredClass);return n}function Xr(t,e){var r;if(e===null)return this.isReference&&_(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;e.$$||_(`Cannot pass "${Yt(e)}" as a ${this.name}`),e.$$.ptr||_(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&_(`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=Vt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&_("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:_(`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,et.toHandle(function(){a.delete()})),t!==null&&t.push(this.rawDestructor,r)}break;default:_("Unsupporting sharing policy")}return r}function qr(t,e){if(e===null)return this.isReference&&_(`null is not a valid ${this.name}`),0;e.$$||_(`Cannot pass "${Yt(e)}" as a ${this.name}`),e.$$.ptr||_(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&_(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Vt(e.$$.ptr,r,this.registeredClass);return n}function Jr(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function Zr(t){this.rawDestructor&&this.rawDestructor(t)}function Qr(t){t!==null&&t.delete()}function Kr(){Q.prototype.getPointee=Jr,Q.prototype.destructor=Zr,Q.prototype.argPackAdvance=8,Q.prototype.readValueFromPointer=ht,Q.prototype.deleteObject=Qr,Q.prototype.fromWireType=Hr}function Q(t,e,r,n,a,o,i,s,f,l,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=f,this.rawShare=l,this.rawDestructor=h,!a&&e.baseClass===void 0?n?(this.toWireType=Gr,this.destructorFunction=null):(this.toWireType=qr,this.destructorFunction=null):this.toWireType=Xr}function ve(t,e,r){u.hasOwnProperty(t)||Dt("Replacing nonexistant public symbol"),u[t].overloadTable!==void 0&&r!==void 0?u[t].overloadTable[r]=e:(u[t]=e,u[t].argCount=r)}var tn=(t,e,r)=>{var n=u["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},Ft=[],T=t=>{var e=Ft[t];return e||(t>=Ft.length&&(Ft.length=t+1),Ft[t]=e=Qt.get(t)),e},en=(t,e,r)=>{if(t.includes("j"))return tn(t,e,r);var n=T(e).apply(null,r);return n},rn=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),en(t,e,r)}};function Y(t,e){t=H(t);function r(){return t.includes("j")?rn(t,e):T(e)}var n=r();return typeof n!="function"&&_(`unknown function pointer with signature ${t}: ${e}`),n}function nn(t,e){var r=he(e,function(n){this.name=e,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+` | ||
`+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}var me=void 0;function ge(t){var e=Se(t),r=H(e);return K(e),r}function Ot(t,e){var r=[],n={};function a(o){if(!n[o]&&!ot[o]){if(xt[o]){xt[o].forEach(a);return}r.push(o),n[o]=!0}}throw e.forEach(a),new me(`${t}: `+r.map(ge).join([", "]))}function an(t,e,r,n,a,o,i,s,f,l,h,v,m){h=H(h),o=Y(a,o),s&&(s=Y(i,s)),l&&(l=Y(f,l)),m=Y(v,m);var C=de(h);ye(C,function(){Ot(`Cannot construct ${h} due to unbound types`,[n])}),it([t,e,r],n?[n]:[],function(A){A=A[0];var I,x;n?(I=A.registeredClass,x=I.instancePrototype):x=tt.prototype;var W=he(C,function(){if(Object.getPrototypeOf(this)!==d)throw new ft("Use 'new' to construct "+h);if(y.constructor_body===void 0)throw new ft(h+" has no accessible constructor");var Rt=y.constructor_body[arguments.length];if(Rt===void 0)throw new ft(`Tried to invoke ctor of ${h} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(y.constructor_body).toString()}) parameters instead!`);return Rt.apply(this,arguments)}),d=Object.create(x,{constructor:{value:W}});W.prototype=d;var y=new Nr(h,W,d,m,I,o,s,l);y.baseClass&&(y.baseClass.__derivedClasses===void 0&&(y.baseClass.__derivedClasses=[]),y.baseClass.__derivedClasses.push(y));var D=new Q(h,y,!0,!1,!1),O=new Q(h+"*",y,!1,!1,!1),st=new Q(h+" const*",y,!1,!0,!1);return le[t]={pointerType:O,constPointerType:st},ve(C,W),[D,O,st]})}function zt(t,e){for(var r=[],n=0;n<t;n++)r.push(S[e+n*4>>2]);return r}function Lt(t,e,r,n,a,o){var i=e.length;i<2&&_("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=e[1]!==null&&r!==null,f=!1,l=1;l<e.length;++l)if(e[l]!==null&&e[l].destructorFunction===void 0){f=!0;break}var h=e[0].name!=="void",v=i-2,m=new Array(v),C=[],A=[];return function(){arguments.length!==v&&_(`function ${t} called with ${arguments.length} arguments, expected ${v} args!`),A.length=0;var I;C.length=s?2:1,C[0]=a,s&&(I=e[1].toWireType(A,this),C[1]=I);for(var x=0;x<v;++x)m[x]=e[x+2].toWireType(A,arguments[x]),C.push(m[x]);var W=n.apply(null,C);function d(y){if(f)oe(A);else for(var D=s?1:2;D<e.length;D++){var O=D===1?I:m[D-2];e[D].destructorFunction!==null&&e[D].destructorFunction(O)}if(h)return e[0].fromWireType(y)}return d(W)}}function on(t,e,r,n,a,o){var i=zt(e,r);a=Y(n,a),it([],[t],function(s){s=s[0];var f=`constructor ${s.name}`;if(s.registeredClass.constructor_body===void 0&&(s.registeredClass.constructor_body=[]),s.registeredClass.constructor_body[e-1]!==void 0)throw new ft(`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]=()=>{Ot(`Cannot construct ${s.name} due to unbound types`,i)},it([],i,function(l){return l.splice(1,0,null),s.registeredClass.constructor_body[e-1]=Lt(f,l,null,a,o),[]}),[]})}function sn(t,e,r,n,a,o,i,s,f){var l=zt(r,n);e=H(e),o=Y(a,o),it([],[t],function(h){h=h[0];var v=`${h.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),s&&h.registeredClass.pureVirtualFunctions.push(e);function m(){Ot(`Cannot call ${v} due to unbound types`,l)}var C=h.registeredClass.instancePrototype,A=C[e];return A===void 0||A.overloadTable===void 0&&A.className!==h.name&&A.argCount===r-2?(m.argCount=r-2,m.className=h.name,C[e]=m):(pe(C,e,v),C[e].overloadTable[r-2]=m),it([],l,function(I){var x=Lt(v,I,h,o,i);return C[e].overloadTable===void 0?(x.argCount=r-2,C[e]=x):C[e].overloadTable[r-2]=x,[]}),[]})}function un(){Object.assign(we.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 we(){this.allocated=[void 0],this.freelist=[]}var z=new we;function $e(t){t>=z.reserved&&--z.get(t).refcount===0&&z.free(t)}function cn(){for(var t=0,e=z.reserved;e<z.allocated.length;++e)z.allocated[e]!==void 0&&++t;return t}function fn(){z.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),z.reserved=z.allocated.length,u.count_emval_handles=cn}var et={toValue:t=>(t||_("Cannot use deleted val. handle = "+t),z.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 z.allocate({refcount:1,value:t})}}};function ln(t,e){e=H(e),Z(t,{name:e,fromWireType:function(r){var n=et.toValue(r);return $e(r),n},toWireType:function(r,n){return et.toHandle(n)},argPackAdvance:8,readValueFromPointer:ht,destructorFunction:null})}function Yt(t){if(t===null)return"null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t}function dn(t,e){switch(e){case 2:return function(r){return this.fromWireType(qt[r>>2])};case 3:return function(r){return this.fromWireType(Jt[r>>3])};default:throw new TypeError("Unknown float type: "+t)}}function hn(t,e,r){var n=Ht(r);e=H(e),Z(t,{name:e,fromWireType:function(a){return a},toWireType:function(a,o){return o},argPackAdvance:8,readValueFromPointer:dn(e,n),destructorFunction:null})}function pn(t,e,r,n,a,o,i){var s=zt(e,r);t=H(t),a=Y(n,a),ye(t,function(){Ot(`Cannot call ${t} due to unbound types`,s)},e-1),it([],s,function(f){var l=[f[0],null].concat(f.slice(1));return ve(t,Lt(t,l,null,a,o),e-1),[]})}function yn(t,e,r){switch(e){case 0:return r?function(n){return q[n]}:function(n){return U[n]};case 1:return r?function(n){return ut[n>>1]}:function(n){return Ct[n>>1]};case 2:return r?function(n){return R[n>>2]}:function(n){return S[n>>2]};default:throw new TypeError("Unknown integer type: "+t)}}function vn(t,e,r,n,a){e=H(e);var o=Ht(r),i=v=>v;if(n===0){var s=32-8*r;i=v=>v<<s>>>s}var f=e.includes("unsigned"),l=(v,m)=>{},h;f?h=function(v,m){return l(m,this.name),m>>>0}:h=function(v,m){return l(m,this.name),m},Z(t,{name:e,fromWireType:i,toWireType:h,argPackAdvance:8,readValueFromPointer:yn(e,o,n!==0),destructorFunction:null})}function mn(t,e,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function o(i){i=i>>2;var s=S,f=s[i],l=s[i+1];return new a(s.buffer,l,f)}r=H(r),Z(t,{name:r,fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})}var be=(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 f=t.charCodeAt(++i);s=65536+((s&1023)<<10)|f&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},gn=(t,e,r)=>be(t,U,e,r),Ce=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},_e=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,wn=(t,e,r)=>{for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&_e)return _e.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 f=t[e++]&63;if((i&240)==224?i=(i&15)<<12|s<<6|f:i=(i&7)<<18|s<<12|f<<6|t[e++]&63,i<65536)o+=String.fromCharCode(i);else{var l=i-65536;o+=String.fromCharCode(55296|l>>10,56320|l&1023)}}return o},Nt=(t,e)=>t?wn(U,t,e):"";function $n(t,e){e=H(e);var r=e==="std::string";Z(t,{name:e,fromWireType:function(n){var a=S[n>>2],o=n+4,i;if(r)for(var s=o,f=0;f<=a;++f){var l=o+f;if(f==a||U[l]==0){var h=l-s,v=Nt(s,h);i===void 0?i=v:(i+=String.fromCharCode(0),i+=v),s=l+1}}else{for(var m=new Array(a),f=0;f<a;++f)m[f]=String.fromCharCode(U[o+f]);i=m.join("")}return K(n),i},toWireType:function(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||_("Cannot pass non-string to std::string"),r&&i?o=Ce(a):o=a.length;var s=Xt(4+o+1),f=s+4;if(S[s>>2]=o,r&&i)gn(a,f,o+1);else if(i)for(var l=0;l<o;++l){var h=a.charCodeAt(l);h>255&&(K(f),_("String has UTF-16 code units that do not fit in 8 bits")),U[f+l]=h}else for(var l=0;l<o;++l)U[f+l]=a[l];return n!==null&&n.push(K,s),s},argPackAdvance:8,readValueFromPointer:ht,destructorFunction:function(n){K(n)}})}var Te=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,bn=(t,e)=>{for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&Ct[n];)++n;if(r=n<<1,r-t>32&&Te)return Te.decode(U.subarray(t,r));for(var o="",i=0;!(i>=e/2);++i){var s=ut[t+i*2>>1];if(s==0)break;o+=String.fromCharCode(s)}return o},Cn=(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);ut[e>>1]=i,e+=2}return ut[e>>1]=0,e-n},_n=t=>t.length*2,Tn=(t,e)=>{for(var r=0,n="";!(r>=e/4);){var a=R[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},Pn=(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(R[e>>2]=i,e+=4,e+4>a)break}return R[e>>2]=0,e-n},En=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},An=function(t,e,r){r=H(r);var n,a,o,i,s;e===2?(n=bn,a=Cn,i=_n,o=()=>Ct,s=1):e===4&&(n=Tn,a=Pn,i=En,o=()=>S,s=2),Z(t,{name:r,fromWireType:function(f){for(var l=S[f>>2],h=o(),v,m=f+4,C=0;C<=l;++C){var A=f+4+C*e;if(C==l||h[A>>s]==0){var I=A-m,x=n(m,I);v===void 0?v=x:(v+=String.fromCharCode(0),v+=x),m=A+e}}return K(f),v},toWireType:function(f,l){typeof l!="string"&&_(`Cannot pass non-string to C++ string type ${r}`);var h=i(l),v=Xt(4+h+e);return S[v>>2]=h>>s,a(l,v+4,h+e),f!==null&&f.push(K,v),v},argPackAdvance:8,readValueFromPointer:ht,destructorFunction:function(f){K(f)}})};function xn(t,e,r,n,a,o){At[t]={name:H(e),rawConstructor:Y(r,n),rawDestructor:Y(a,o),fields:[]}}function Dn(t,e,r,n,a,o,i,s,f,l){At[t].fields.push({fieldName:H(e),getterReturnType:r,getter:Y(n,a),getterContext:o,setterArgumentType:i,setter:Y(s,f),setterContext:l})}function Sn(t,e){e=H(e),Z(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:function(){},toWireType:function(r,n){}})}var Fn={};function On(t){var e=Fn[t];return e===void 0?H(t):e}function Pe(){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.")}function Mn(t){return t===0?et.toHandle(Pe()):(t=On(t),et.toHandle(Pe()[t]))}function jn(t){t>4&&(z.get(t).refcount+=1)}function Ee(t,e){var r=ot[t];return r===void 0&&_(e+" has unknown type "+ge(t)),r}function Rn(t){var e=new Array(t+1);return function(r,n,a){e[0]=r;for(var o=0;o<t;++o){var i=Ee(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 et.toHandle(s)}}var Ae={};function In(t,e,r,n){t=et.toValue(t);var a=Ae[e];return a||(a=Rn(e),Ae[e]=a),a(t,r,n)}function Wn(t,e){t=Ee(t,"_emval_take_value");var r=t.readValueFromPointer(e);return et.toHandle(r)}var Hn=()=>{_t("")},kn=(t,e,r)=>U.copyWithin(t,e,e+r),Un=()=>2147483648,Bn=t=>{var e=X.buffer,r=t-e.byteLength+65535>>>16;try{return X.grow(r),Zt(),1}catch{}},Vn=t=>{var e=U.length;t>>>=0;var r=Un();if(t>r)return!1;for(var n=(f,l)=>f+(l-f%l)%l,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=Bn(i);if(s)return!0}return!1},Gt={},zn=()=>M||"./this.program",gt=()=>{if(!gt.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,_:zn()};for(var r in Gt)Gt[r]===void 0?delete e[r]:e[r]=Gt[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);gt.strings=n}return gt.strings},Ln=(t,e)=>{for(var r=0;r<t.length;++r)q[e++>>0]=t.charCodeAt(r);q[e>>0]=0},Yn=(t,e)=>{var r=0;return gt().forEach(function(n,a){var o=e+r;S[t+a*4>>2]=o,Ln(n,o),r+=n.length+1}),0},Nn=(t,e)=>{var r=gt();S[t>>2]=r.length;var n=0;return r.forEach(function(a){n+=a.length+1}),S[e>>2]=n,0};function Gn(t){return t}var Mt=t=>t%4===0&&(t%100!==0||t%400===0),Xn=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},xe=[31,29,31,30,31,30,31,31,30,31,30,31],De=[31,28,31,30,31,30,31,31,30,31,30,31],qn=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=Mt(r.getFullYear()),a=r.getMonth(),o=(n?xe:De)[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 Jn(t,e,r){var n=r>0?r:Ce(t)+1,a=new Array(n),o=be(t,a,0,a.length);return e&&(a.length=o),a}var Zn=(t,e)=>{q.set(t,e)},Qn=(t,e,r,n)=>{var a=R[n+40>>2],o={tm_sec:R[n>>2],tm_min:R[n+4>>2],tm_hour:R[n+8>>2],tm_mday:R[n+12>>2],tm_mon:R[n+16>>2],tm_year:R[n+20>>2],tm_wday:R[n+24>>2],tm_yday:R[n+28>>2],tm_isdst:R[n+32>>2],tm_gmtoff:R[n+36>>2],tm_zone:a?Nt(a):""},i=Nt(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 f in s)i=i.replace(new RegExp(f,"g"),s[f]);var l=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h=["January","February","March","April","May","June","July","August","September","October","November","December"];function v(d,y,D){for(var O=typeof d=="number"?d.toString():d||"";O.length<y;)O=D[0]+O;return O}function m(d,y){return v(d,y,"0")}function C(d,y){function D(st){return st<0?-1:st>0?1:0}var O;return(O=D(d.getFullYear()-y.getFullYear()))===0&&(O=D(d.getMonth()-y.getMonth()))===0&&(O=D(d.getDate()-y.getDate())),O}function A(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 I(d){var y=qn(new Date(d.tm_year+1900,0,1),d.tm_yday),D=new Date(y.getFullYear(),0,4),O=new Date(y.getFullYear()+1,0,4),st=A(D),Rt=A(O);return C(st,y)<=0?C(Rt,y)<=0?y.getFullYear()+1:y.getFullYear():y.getFullYear()-1}var x={"%a":d=>l[d.tm_wday].substring(0,3),"%A":d=>l[d.tm_wday],"%b":d=>h[d.tm_mon].substring(0,3),"%B":d=>h[d.tm_mon],"%C":d=>{var y=d.tm_year+1900;return m(y/100|0,2)},"%d":d=>m(d.tm_mday,2),"%e":d=>v(d.tm_mday,2," "),"%g":d=>I(d).toString().substring(2),"%G":d=>I(d),"%H":d=>m(d.tm_hour,2),"%I":d=>{var y=d.tm_hour;return y==0?y=12:y>12&&(y-=12),m(y,2)},"%j":d=>m(d.tm_mday+Xn(Mt(d.tm_year+1900)?xe:De,d.tm_mon-1),3),"%m":d=>m(d.tm_mon+1,2),"%M":d=>m(d.tm_min,2),"%n":()=>` | ||
`,"%p":d=>d.tm_hour>=0&&d.tm_hour<12?"AM":"PM","%S":d=>m(d.tm_sec,2),"%t":()=>" ","%u":d=>d.tm_wday||7,"%U":d=>{var y=d.tm_yday+7-d.tm_wday;return m(Math.floor(y/7),2)},"%V":d=>{var y=Math.floor((d.tm_yday+7-(d.tm_wday+6)%7)/7);if((d.tm_wday+371-d.tm_yday-2)%7<=2&&y++,y){if(y==53){var D=(d.tm_wday+371-d.tm_yday)%7;D!=4&&(D!=3||!Mt(d.tm_year))&&(y=1)}}else{y=52;var O=(d.tm_wday+7-d.tm_yday-1)%7;(O==4||O==5&&Mt(d.tm_year%400-1))&&y++}return m(y,2)},"%w":d=>d.tm_wday,"%W":d=>{var y=d.tm_yday+7-(d.tm_wday+6)%7;return m(Math.floor(y/7),2)},"%y":d=>(d.tm_year+1900).toString().substring(2),"%Y":d=>d.tm_year+1900,"%z":d=>{var y=d.tm_gmtoff,D=y>=0;return y=Math.abs(y)/60,y=y/60*100+y%60,(D?"+":"-")+("0000"+y).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};i=i.replace(/%%/g,"\0\0");for(var f in x)i.includes(f)&&(i=i.replace(new RegExp(f,"g"),x[f](o)));i=i.replace(/\0\0/g,"%");var W=Jn(i,!1);return W.length>e?0:(Zn(W,t),W.length-1)},Kn=(t,e,r,n,a)=>Qn(t,e,r,n);ie=u.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},Er(),ft=u.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},zr(),Rr(),Kr(),me=u.UnboundTypeError=nn(Error,"UnboundTypeError"),un(),fn();var ta={q:pr,u:yr,a:mr,h:gr,l:wr,I:$r,P:br,n:Cr,ba:_r,d:vr,oa:Tr,Y:Pr,fa:xr,na:an,ma:on,D:sn,ea:ln,W:hn,J:pn,w:vn,s:mn,V:$n,L:An,Q:xn,pa:Dn,ga:Sn,U:$e,la:Mn,R:jn,ia:In,ka:Wn,K:Hn,da:kn,ca:Vn,$:Yn,aa:Nn,H:wa,T:xa,B:ba,p:va,b:ea,C:ga,ha:_a,c:ia,j:ua,i:aa,x:$a,O:ma,v:pa,G:Pa,N:Ea,A:Ca,F:Da,Z:Fa,X:Oa,k:sa,f:oa,e:na,g:ra,M:Aa,m:ha,o:ca,S:fa,t:da,ja:ya,y:Ta,r:la,E:Sa,z:Gn,_:Kn};hr();var K=u._free=t=>(K=u._free=E.sa)(t),Xt=u._malloc=t=>(Xt=u._malloc=E.ta)(t),Se=t=>(Se=E.va)(t);u.__embind_initialize_bindings=()=>(u.__embind_initialize_bindings=E.wa)();var w=(t,e)=>(w=E.xa)(t,e),wt=t=>(wt=E.ya)(t),$=()=>($=E.za)(),b=t=>(b=E.Aa)(t),Fe=t=>(Fe=E.Ba)(t),Oe=t=>(Oe=E.Ca)(t),Me=(t,e,r)=>(Me=E.Da)(t,e,r),je=t=>(je=E.Ea)(t);u.dynCall_viijii=(t,e,r,n,a,o,i)=>(u.dynCall_viijii=E.Fa)(t,e,r,n,a,o,i);var Re=u.dynCall_jiii=(t,e,r,n)=>(Re=u.dynCall_jiii=E.Ga)(t,e,r,n),Ie=u.dynCall_jiiii=(t,e,r,n,a)=>(Ie=u.dynCall_jiiii=E.Ha)(t,e,r,n,a);u.dynCall_iiiiij=(t,e,r,n,a,o,i)=>(u.dynCall_iiiiij=E.Ia)(t,e,r,n,a,o,i),u.dynCall_iiiiijj=(t,e,r,n,a,o,i,s,f)=>(u.dynCall_iiiiijj=E.Ja)(t,e,r,n,a,o,i,s,f),u.dynCall_iiiiiijj=(t,e,r,n,a,o,i,s,f,l)=>(u.dynCall_iiiiiijj=E.Ka)(t,e,r,n,a,o,i,s,f,l);function ea(t,e){var r=$();try{return T(t)(e)}catch(n){if(b(r),n!==n+0)throw n;w(1,0)}}function ra(t,e,r,n){var a=$();try{T(t)(e,r,n)}catch(o){if(b(a),o!==o+0)throw o;w(1,0)}}function na(t,e,r){var n=$();try{T(t)(e,r)}catch(a){if(b(n),a!==a+0)throw a;w(1,0)}}function aa(t,e,r,n,a){var o=$();try{return T(t)(e,r,n,a)}catch(i){if(b(o),i!==i+0)throw i;w(1,0)}}function oa(t,e){var r=$();try{T(t)(e)}catch(n){if(b(r),n!==n+0)throw n;w(1,0)}}function ia(t,e,r){var n=$();try{return T(t)(e,r)}catch(a){if(b(n),a!==a+0)throw a;w(1,0)}}function sa(t){var e=$();try{T(t)()}catch(r){if(b(e),r!==r+0)throw r;w(1,0)}}function ua(t,e,r,n){var a=$();try{return T(t)(e,r,n)}catch(o){if(b(a),o!==o+0)throw o;w(1,0)}}function ca(t,e,r,n,a,o){var i=$();try{T(t)(e,r,n,a,o)}catch(s){if(b(i),s!==s+0)throw s;w(1,0)}}function fa(t,e,r,n,a,o,i){var s=$();try{T(t)(e,r,n,a,o,i)}catch(f){if(b(s),f!==f+0)throw f;w(1,0)}}function la(t,e,r,n,a,o,i,s,f,l,h){var v=$();try{T(t)(e,r,n,a,o,i,s,f,l,h)}catch(m){if(b(v),m!==m+0)throw m;w(1,0)}}function da(t,e,r,n,a,o,i,s){var f=$();try{T(t)(e,r,n,a,o,i,s)}catch(l){if(b(f),l!==l+0)throw l;w(1,0)}}function ha(t,e,r,n,a){var o=$();try{T(t)(e,r,n,a)}catch(i){if(b(o),i!==i+0)throw i;w(1,0)}}function pa(t,e,r,n,a,o,i){var s=$();try{return T(t)(e,r,n,a,o,i)}catch(f){if(b(s),f!==f+0)throw f;w(1,0)}}function ya(t,e,r,n,a,o,i,s,f){var l=$();try{T(t)(e,r,n,a,o,i,s,f)}catch(h){if(b(l),h!==h+0)throw h;w(1,0)}}function va(t){var e=$();try{return T(t)()}catch(r){if(b(e),r!==r+0)throw r;w(1,0)}}function ma(t,e,r,n,a,o,i){var s=$();try{return T(t)(e,r,n,a,o,i)}catch(f){if(b(s),f!==f+0)throw f;w(1,0)}}function ga(t,e,r,n){var a=$();try{return T(t)(e,r,n)}catch(o){if(b(a),o!==o+0)throw o;w(1,0)}}function wa(t,e,r,n){var a=$();try{return T(t)(e,r,n)}catch(o){if(b(a),o!==o+0)throw o;w(1,0)}}function $a(t,e,r,n,a,o){var i=$();try{return T(t)(e,r,n,a,o)}catch(s){if(b(i),s!==s+0)throw s;w(1,0)}}function ba(t,e,r,n,a,o){var i=$();try{return T(t)(e,r,n,a,o)}catch(s){if(b(i),s!==s+0)throw s;w(1,0)}}function Ca(t,e,r,n,a,o,i,s,f,l){var h=$();try{return T(t)(e,r,n,a,o,i,s,f,l)}catch(v){if(b(h),v!==v+0)throw v;w(1,0)}}function _a(t,e,r){var n=$();try{return T(t)(e,r)}catch(a){if(b(n),a!==a+0)throw a;w(1,0)}}function Ta(t,e,r,n,a,o,i,s,f,l){var h=$();try{T(t)(e,r,n,a,o,i,s,f,l)}catch(v){if(b(h),v!==v+0)throw v;w(1,0)}}function Pa(t,e,r,n,a,o,i,s){var f=$();try{return T(t)(e,r,n,a,o,i,s)}catch(l){if(b(f),l!==l+0)throw l;w(1,0)}}function Ea(t,e,r,n,a,o,i,s,f){var l=$();try{return T(t)(e,r,n,a,o,i,s,f)}catch(h){if(b(l),h!==h+0)throw h;w(1,0)}}function Aa(t,e,r,n,a,o,i){var s=$();try{T(t)(e,r,n,a,o,i)}catch(f){if(b(s),f!==f+0)throw f;w(1,0)}}function xa(t,e,r,n){var a=$();try{return T(t)(e,r,n)}catch(o){if(b(a),o!==o+0)throw o;w(1,0)}}function Da(t,e,r,n,a,o,i,s,f,l,h,v){var m=$();try{return T(t)(e,r,n,a,o,i,s,f,l,h,v)}catch(C){if(b(m),C!==C+0)throw C;w(1,0)}}function Sa(t,e,r,n,a,o,i,s,f,l,h,v,m,C,A,I){var x=$();try{T(t)(e,r,n,a,o,i,s,f,l,h,v,m,C,A,I)}catch(W){if(b(x),W!==W+0)throw W;w(1,0)}}function Fa(t,e,r,n){var a=$();try{return Re(t,e,r,n)}catch(o){if(b(a),o!==o+0)throw o;w(1,0)}}function Oa(t,e,r,n,a){var o=$();try{return Ie(t,e,r,n,a)}catch(i){if(b(o),i!==i+0)throw i;w(1,0)}}var jt;dt=function t(){jt||We(),jt||(dt=t)};function We(){if(nt>0||(rr(),nt>0))return;function t(){jt||(jt=!0,u.calledRun=!0,!bt&&(nr(),g(u),u.onRuntimeInitialized&&u.onRuntimeInitialized(),ar()))}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 We(),p.ready}})();function Qa(c){return Ke(tr,c)}async function Ka(c,{tryHarder:p=rt.tryHarder,formats:u=rt.formats,maxSymbols:g=rt.maxSymbols}=rt){return qa(c,{tryHarder:p,formats:u,maxSymbols:g},tr)}const er=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 to(c){for(const[p,u]of er)if(c===u)return p;return"unknown"}var $t;class eo{constructor(p={}){Ue(this,$t,void 0);var u;try{const g=(u=p==null?void 0:p.formats)==null?void 0:u.filter(P=>P!=="unknown");if((g==null?void 0:g.length)===0)throw new TypeError("Hint option provided, but is empty.");g==null||g.forEach(P=>{if(!Ve.includes(P))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${P}' is not a valid enum value of type BarcodeFormat.`)}),Qa().catch(()=>{}),Be(this,$t,g??[])}catch(g){throw ze(g,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return Ve.filter(p=>p!=="unknown")}async detect(p){try{const u=await Ua(p);if(u===null)return[];let g;try{g=await Ka(u,{tryHarder:!0,formats:ke(this,$t).map(P=>er.get(P))})}catch{throw new DOMException("Barcode detection service unavailable. Use 'setZXingModuleOverrides' in offline or strict CSP environments.","NotSupportedError")}return g.map(P=>{const{topLeft:{x:F,y:M},topRight:{x:N,y:k},bottomLeft:{x:j,y:L},bottomRight:{x:G,y:B}}=P.position,V=Math.min(F,N,j,G),X=Math.min(M,k,L,B),E=Math.max(F,N,j,G),bt=Math.max(M,k,L,B);return{boundingBox:new DOMRectReadOnly(V,X,E-V,bt-X),rawValue:new TextDecoder().decode(P.bytes),format:to(P.format),cornerPoints:[{x:F,y:M},{x:N,y:k},{x:G,y:B},{x:j,y:L}]}})}catch(u){throw ze(u,"Failed to execute 'detect' on 'BarcodeDetector'")}}}$t=new WeakMap;exports.BarcodeDetector=eo;exports.setZXingModuleOverrides=Xa; |
@@ -1,3 +0,3 @@ | ||
var er=(M,B,z)=>{if(!B.has(M))throw TypeError("Cannot "+z)};var rr=(M,B,z)=>(er(M,B,"read from private field"),z?z.call(M):B.get(M)),nr=(M,B,z)=>{if(B.has(M))throw TypeError("Cannot add the same private member more than once");B instanceof WeakSet?B.add(M):B.set(M,z)},ar=(M,B,z,yt)=>(er(M,B,"write to private field"),yt?yt.call(M,z):B.set(M,z),z);var BarcodeDetectionAPI=function(M){var vt;"use strict";const B=["aztec","code_128","code_39","code_93","codabar","data_matrix","ean_13","ean_8","itf","pdf417","qr_code","upc_a","upc_e","unknown"];function z(c){if(yt(c))return{width:c.naturalWidth,height:c.naturalHeight};if(Kt(c))return{width:c.width.baseVal.value,height:c.height.baseVal.value};if(te(c))return{width:c.videoWidth,height:c.videoHeight};if(or(c))return{width:c.width,height:c.height};if(ee(c))return{width:c.width,height:c.height};if(ir(c))return{width:c.width,height:c.height};if(re(c))return{width:c.displayWidth,height:c.displayHeight};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 yt(c){try{return c instanceof HTMLImageElement}catch{return!1}}function Kt(c){try{return c instanceof SVGImageElement}catch{return!1}}function te(c){try{return c instanceof HTMLVideoElement}catch{return!1}}function or(c){try{return c instanceof HTMLCanvasElement}catch{return!1}}function ee(c){try{return c instanceof ImageBitmap}catch{return!1}}function ir(c){try{return c instanceof OffscreenCanvas}catch{return!1}}function re(c){try{return c instanceof VideoFrame}catch{return!1}}function sr(c){try{return c instanceof Blob}catch{return!1}}function ur(c){try{return c instanceof ImageData}catch{return!1}}function cr(c,v){try{const u=new OffscreenCanvas(c,v);if(u.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return u;throw void 0}catch{const u=document.createElement("canvas");return u.width=c,u.height=v,u}}async function ne(c){if(yt(c)&&!await dr(c))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(Kt(c)&&!await hr(c))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(re(c)&&pr(c))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(te(c)&&(c.readyState===0||c.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(ee(c)&&vr(c))throw new DOMException("The image source is detached.","InvalidStateError");const{width:v,height:u}=z(c);if(v===0||u===0)return null;const P=cr(v,u).getContext("2d");P.drawImage(c,0,0);try{return P.getImageData(0,0,v,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function fr(c){let v;try{v=await createImageBitmap(c)}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await ne(v)}async function lr(c){if(sr(c))return await fr(c);if(ur(c)){if(yr(c))throw new DOMException("The image data has been detached.","InvalidStateError");return c}return await ne(c)}async function dr(c){try{return await c.decode(),!0}catch{return!1}}async function hr(c){var v;try{return await((v=c.decode)==null?void 0:v.call(c)),!0}catch{return!1}}function pr(c){return c.format===null}function yr(c){return c.data.buffer.byteLength===0}function vr(c){return c.width===0&&c.height===0}function ae(c,v){return c instanceof DOMException?new DOMException(`${v}: ${c.message}`,c.name):c instanceof Error?new c.constructor(`${v}: ${c.message}`):new Error(`${v}: ${c}`)}const oe=c=>{let v;const u=new Set,w=(j,q)=>{const U=typeof j=="function"?j(v):j;if(!Object.is(U,v)){const R=v;v=q??typeof U!="object"?U:Object.assign({},v,U),u.forEach(G=>G(v,R))}},P=()=>v,F={setState:w,getState:P,subscribe:j=>(u.add(j),()=>u.delete(j)),destroy:()=>{u.clear()}};return v=c(w,P,F),F},mr=c=>c?oe(c):oe,gr={locateFile:(c,v)=>{var u;const w=(u=c.match(new RegExp("(?<=_).+?(?=\\.wasm$)")))==null?void 0:u[0];return w?`https://cdn.jsdelivr.net/npm/@sec-ant/zxing-wasm@2.1.2/dist/${w}/${c}`:v+c}},lt=mr()(()=>({zxingModuleWeakMap:new WeakMap,zxingModuleOverrides:gr}));function wr(c){lt.setState({zxingModuleOverrides:c})}function ie(c,v=lt.getState().zxingModuleOverrides){const{zxingModuleWeakMap:u}=lt.getState(),w=u.get(c);if(w&&Object.is(v,lt.getState().zxingModuleOverrides))return w;{lt.setState({zxingModuleOverrides:v});const P=c(v);return u.set(c,P),P}}const se=["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"],nt={tryHarder:!0,formats:[],maxSymbols:255};async function $r(c,{tryHarder:v=nt.tryHarder,formats:u=nt.formats,maxSymbols:w=nt.maxSymbols}=nt,P){const F=await ie(P,lt.getState().zxingModuleOverrides),{data:j,width:q,height:U,data:{byteLength:R}}=c,G=F._malloc(R);F.HEAP8.set(j,G);const J=F.readBarcodesFromPixmap(G,q,U,v,br(u),w);F._free(G);const L=[];for(let Y=0;Y<J.size();++Y){const Z=J.get(Y);L.push({...Z,format:Cr(Z.format)})}return L}function br(c){return c.join("|")}function Cr(c){const v=ue(c);let u=0,w=se.length-1;for(;u<=w;){const P=Math.floor((u+w)/2),F=se[P],j=ue(F);if(j===v)return F;j<v?u=P+1:w=P-1}return"None"}function ue(c){return c.toLowerCase().replace(/_-\[\]/g,"")}var ce=(()=>{var c=document.currentScript&&document.currentScript.src||new URL("index.js",document.baseURI).href;return function(v={}){var u=v,w,P;u.ready=new Promise((t,e)=>{w=t,P=e});var F=Object.assign({},u),j="./this.program",q=typeof window=="object",U=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var R="";function G(t){return u.locateFile?u.locateFile(t,R):R+t}var J;(q||U)&&(U?R=self.location.href:typeof document<"u"&&document.currentScript&&(R=document.currentScript.src),c&&(R=c),R.indexOf("blob:")!==0?R=R.substr(0,R.replace(/[?#].*/,"").lastIndexOf("/")+1):R="",U&&(J=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,F),F=null,u.arguments&&u.arguments,u.thisProgram&&(j=u.thisProgram),u.quit&&u.quit;var Y;u.wasmBinary&&(Y=u.wasmBinary),u.noExitRuntime,typeof WebAssembly!="object"&&At("no native wasm support detected");var Z,E,Pt=!1,Q,V,dt,Et,I,S,de,he;function pe(){var t=Z.buffer;u.HEAP8=Q=new Int8Array(t),u.HEAP16=dt=new Int16Array(t),u.HEAP32=I=new Int32Array(t),u.HEAPU8=V=new Uint8Array(t),u.HEAPU16=Et=new Uint16Array(t),u.HEAPU32=S=new Uint32Array(t),u.HEAPF32=de=new Float32Array(t),u.HEAPF64=he=new Float64Array(t)}var ye,ve=[],me=[],ge=[];function Er(){if(u.preRun)for(typeof u.preRun=="function"&&(u.preRun=[u.preRun]);u.preRun.length;)xr(u.preRun.shift());Bt(ve)}function Ar(){Bt(me)}function Dr(){if(u.postRun)for(typeof u.postRun=="function"&&(u.postRun=[u.postRun]);u.postRun.length;)Fr(u.postRun.shift());Bt(ge)}function xr(t){ve.unshift(t)}function Sr(t){me.unshift(t)}function Fr(t){ge.unshift(t)}var it=0,mt=null;function Or(t){it++,u.monitorRunDependencies&&u.monitorRunDependencies(it)}function Mr(t){if(it--,u.monitorRunDependencies&&u.monitorRunDependencies(it),it==0&&mt){var e=mt;mt=null,e()}}function At(t){u.onAbort&&u.onAbort(t),t="Aborted("+t+")",L(t),Pt=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw P(e),e}var jr="data:application/octet-stream;base64,";function we(t){return t.startsWith(jr)}var st;u.locateFile?(st="zxing_reader.wasm",we(st)||(st=G(st))):st=new URL("/reader/zxing_reader.wasm",self.location).href;function $e(t){if(t==st&&Y)return new Uint8Array(Y);if(J)return J(t);throw"both async and sync fetching of the wasm failed"}function Rr(t){return!Y&&(q||U)&&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(()=>$e(t)):Promise.resolve().then(()=>$e(t))}function be(t,e,r){return Rr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{L("failed to asynchronously prepare wasm: "+n),At(n)})}function Ir(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!we(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"),be(e,r,n)})}):be(e,r,n)}function Wr(){var t={a:Ta};function e(n,a){var o=n.exports;return E=o,Z=E.qa,pe(),ye=E.ua,Sr(E.ra),Mr(),o}Or();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),P(n)}return Ir(Y,st,t,r).catch(P),{}}var Bt=t=>{for(;t.length>0;)t.shift()(u)},Dt=[],xt=0;function Hr(t){var e=new St(t);return e.get_caught()||(e.set_caught(!0),xt--),e.set_rethrown(!1),Dt.push(e),qe(e.excPtr),e.get_exception_ptr()}var K=0;function kr(){g(0,0);var t=Dt.pop();Xe(t.excPtr),K=0}function St(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,Q[this.ptr+12>>0]=e},this.get_caught=function(){return Q[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,Q[this.ptr+13>>0]=e},this.get_rethrown=function(){return Q[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=Ze(this.get_type());if(e)return S[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}function Br(t){throw K||(K=t),K}var Ut=t=>{var e=K;if(!e)return Tt(0),0;var r=new St(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(Je(o,n,i))return Tt(o),e}return Tt(n),e},Ur=()=>Ut([]),Vr=t=>Ut([t]),zr=(t,e)=>Ut([t,e]);function Lr(t){var e=new St(t).get_exception_ptr();return e}function Yr(){var t=Dt.pop();t||At("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(Dt.push(t),t.set_rethrown(!0),t.set_caught(!1),xt++),K=e,K}function Nr(t,e,r){var n=new St(t);throw n.init(e,r),K=t,xt++,K}function Gr(){return xt}var Ft={};function Ce(t){for(;t.length;){var e=t.pop(),r=t.pop();r(e)}}function gt(t){return this.fromWireType(I[t>>2])}var ht={},ut={},Ot={},_e=void 0;function Mt(t){throw new _e(t)}function ct(t,e,r){t.forEach(function(s){Ot[s]=e});function n(s){var f=r(s);f.length!==t.length&&Mt("Mismatched type converter count");for(var l=0;l<t.length;++l)tt(t[l],f[l])}var a=new Array(e.length),o=[],i=0;e.forEach((s,f)=>{ut.hasOwnProperty(s)?a[f]=ut[s]:(o.push(s),ht.hasOwnProperty(s)||(ht[s]=[]),ht[s].push(()=>{a[f]=ut[s],++i,i===o.length&&n(a)}))}),o.length===0&&n(a)}var Xr=function(t){var e=Ft[t];delete Ft[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((f,l)=>{var h=f.fieldName,y=i[l],m=f.getter,C=f.getterContext,A=i[l+a.length],W=f.setter,D=f.setterContext;s[h]={read:H=>y.fromWireType(m(C,H)),write:(H,d)=>{var p=[];W(D,H,A.toWireType(p,d)),Ce(p)}}}),[{name:e.name,fromWireType:function(f){var l={};for(var h in s)l[h]=s[h].read(f);return n(f),l},toWireType:function(f,l){for(var h in s)if(!(h in l))throw new TypeError(`Missing field: "${h}"`);var y=r();for(h in s)s[h].write(y,l[h]);return f!==null&&f.push(n,y),y},argPackAdvance:8,readValueFromPointer:gt,destructorFunction:n}]})};function qr(t,e,r,n,a){}function Vt(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError(`Unknown type size: ${t}`)}}function Jr(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);Te=t}var Te=void 0;function k(t){for(var e="",r=t;V[r];)e+=Te[V[r++]];return e}var pt=void 0;function _(t){throw new pt(t)}function Zr(t,e,r={}){var n=e.name;if(t||_(`type "${n}" must have a positive integer typeid pointer`),ut.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;_(`Cannot register type '${n}' twice`)}if(ut[t]=e,delete Ot[t],ht.hasOwnProperty(t)){var a=ht[t];delete ht[t],a.forEach(o=>o())}}function tt(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Zr(t,e,r)}function Qr(t,e,r,n,a){var o=Vt(r);e=k(e),tt(t,{name:e,fromWireType:function(i){return!!i},toWireType:function(i,s){return s?n:a},argPackAdvance:8,readValueFromPointer:function(i){var s;if(r===1)s=Q;else if(r===2)s=dt;else if(r===4)s=I;else throw new TypeError("Unknown boolean type size: "+e);return this.fromWireType(s[i>>o])},destructorFunction:null})}function Kr(t){if(!(this instanceof at)||!(t instanceof at))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,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}function tn(t){return{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}}function zt(t){function e(r){return r.$$.ptrType.registeredClass.name}_(e(t)+" instance already deleted")}var Lt=!1;function Pe(t){}function en(t){t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)}function Ee(t){t.count.value-=1;var e=t.count.value===0;e&&en(t)}function Ae(t,e,r){if(e===r)return t;if(r.baseClass===void 0)return null;var n=Ae(t,e,r.baseClass);return n===null?null:r.downcast(n)}var De={};function rn(){return Object.keys(bt).length}function nn(){var t=[];for(var e in bt)bt.hasOwnProperty(e)&&t.push(bt[e]);return t}var wt=[];function Yt(){for(;wt.length;){var t=wt.pop();t.$$.deleteScheduled=!1,t.delete()}}var $t=void 0;function an(t){$t=t,wt.length&&$t&&$t(Yt)}function on(){u.getInheritedInstanceCount=rn,u.getLiveInheritedInstances=nn,u.flushPendingDeletes=Yt,u.setDelayFunction=an}var bt={};function sn(t,e){for(e===void 0&&_("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}function un(t,e){return e=sn(t,e),bt[e]}function jt(t,e){(!e.ptrType||!e.ptr)&&Mt("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&Mt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Ct(Object.create(t,{$$:{value:e}}))}function cn(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=un(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?jt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):jt(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var o=this.registeredClass.getActualType(e),i=De[o];if(!i)return a.call(this);var s;this.isConst?s=i.constPointerType:s=i.pointerType;var f=Ae(e,this.registeredClass,s.registeredClass);return f===null?a.call(this):this.isSmartPointer?jt(s.registeredClass.instancePrototype,{ptrType:s,ptr:f,smartPtrType:this,smartPtr:t}):jt(s.registeredClass.instancePrototype,{ptrType:s,ptr:f})}var Ct=function(t){return typeof FinalizationRegistry>"u"?(Ct=e=>e,t):(Lt=new FinalizationRegistry(e=>{Ee(e.$$)}),Ct=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Lt.register(e,a,e)}return e},Pe=e=>Lt.unregister(e),Ct(t))};function fn(){if(this.$$.ptr||zt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=Ct(Object.create(Object.getPrototypeOf(this),{$$:{value:tn(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t}function ln(){this.$$.ptr||zt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&_("Object already scheduled for deletion"),Pe(this),Ee(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function dn(){return!this.$$.ptr}function hn(){return this.$$.ptr||zt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&_("Object already scheduled for deletion"),wt.push(this),wt.length===1&&$t&&$t(Yt),this.$$.deleteScheduled=!0,this}function pn(){at.prototype.isAliasOf=Kr,at.prototype.clone=fn,at.prototype.delete=ln,at.prototype.isDeleted=dn,at.prototype.deleteLater=hn}function at(){}var yn=48,vn=57;function xe(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 Se(t,e){return t=xe(t),{[t]:function(){return e.apply(this,arguments)}}[t]}function Fe(t,e,r){if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||_(`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}}function Oe(t,e,r){u.hasOwnProperty(t)?((r===void 0||u[t].overloadTable!==void 0&&u[t].overloadTable[r]!==void 0)&&_(`Cannot register public name '${t}' twice`),Fe(u,t,t),u.hasOwnProperty(r)&&_(`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 mn(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=[]}function Nt(t,e,r){for(;e!==r;)e.upcast||_(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t}function gn(t,e){if(e===null)return this.isReference&&_(`null is not a valid ${this.name}`),0;e.$$||_(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||_(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Nt(e.$$.ptr,r,this.registeredClass);return n}function wn(t,e){var r;if(e===null)return this.isReference&&_(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;e.$$||_(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||_(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&_(`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=Nt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&_("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:_(`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,ot.toHandle(function(){a.delete()})),t!==null&&t.push(this.rawDestructor,r)}break;default:_("Unsupporting sharing policy")}return r}function $n(t,e){if(e===null)return this.isReference&&_(`null is not a valid ${this.name}`),0;e.$$||_(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||_(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&_(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Nt(e.$$.ptr,r,this.registeredClass);return n}function bn(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function Cn(t){this.rawDestructor&&this.rawDestructor(t)}function _n(t){t!==null&&t.delete()}function Tn(){et.prototype.getPointee=bn,et.prototype.destructor=Cn,et.prototype.argPackAdvance=8,et.prototype.readValueFromPointer=gt,et.prototype.deleteObject=_n,et.prototype.fromWireType=cn}function et(t,e,r,n,a,o,i,s,f,l,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=f,this.rawShare=l,this.rawDestructor=h,!a&&e.baseClass===void 0?n?(this.toWireType=gn,this.destructorFunction=null):(this.toWireType=$n,this.destructorFunction=null):this.toWireType=wn}function Me(t,e,r){u.hasOwnProperty(t)||Mt("Replacing nonexistant public symbol"),u[t].overloadTable!==void 0&&r!==void 0?u[t].overloadTable[r]=e:(u[t]=e,u[t].argCount=r)}var Pn=(t,e,r)=>{var n=u["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},Rt=[],T=t=>{var e=Rt[t];return e||(t>=Rt.length&&(Rt.length=t+1),Rt[t]=e=ye.get(t)),e},En=(t,e,r)=>{if(t.includes("j"))return Pn(t,e,r);var n=T(e).apply(null,r);return n},An=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),En(t,e,r)}};function X(t,e){t=k(t);function r(){return t.includes("j")?An(t,e):T(e)}var n=r();return typeof n!="function"&&_(`unknown function pointer with signature ${t}: ${e}`),n}function Dn(t,e){var r=Se(e,function(n){this.name=e,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+` | ||
`+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}var je=void 0;function Re(t){var e=Ge(t),r=k(e);return rt(e),r}function It(t,e){var r=[],n={};function a(o){if(!n[o]&&!ut[o]){if(Ot[o]){Ot[o].forEach(a);return}r.push(o),n[o]=!0}}throw e.forEach(a),new je(`${t}: `+r.map(Re).join([", "]))}function xn(t,e,r,n,a,o,i,s,f,l,h,y,m){h=k(h),o=X(a,o),s&&(s=X(i,s)),l&&(l=X(f,l)),m=X(y,m);var C=xe(h);Oe(C,function(){It(`Cannot construct ${h} due to unbound types`,[n])}),ct([t,e,r],n?[n]:[],function(A){A=A[0];var W,D;n?(W=A.registeredClass,D=W.instancePrototype):D=at.prototype;var H=Se(C,function(){if(Object.getPrototypeOf(this)!==d)throw new pt("Use 'new' to construct "+h);if(p.constructor_body===void 0)throw new pt(h+" has no accessible constructor");var kt=p.constructor_body[arguments.length];if(kt===void 0)throw new pt(`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(D,{constructor:{value:H}});H.prototype=d;var p=new mn(h,H,d,m,W,o,s,l);p.baseClass&&(p.baseClass.__derivedClasses===void 0&&(p.baseClass.__derivedClasses=[]),p.baseClass.__derivedClasses.push(p));var x=new et(h,p,!0,!1,!1),O=new et(h+"*",p,!1,!1,!1),ft=new et(h+" const*",p,!1,!0,!1);return De[t]={pointerType:O,constPointerType:ft},Me(C,H),[x,O,ft]})}function Gt(t,e){for(var r=[],n=0;n<t;n++)r.push(S[e+n*4>>2]);return r}function Xt(t,e,r,n,a,o){var i=e.length;i<2&&_("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=e[1]!==null&&r!==null,f=!1,l=1;l<e.length;++l)if(e[l]!==null&&e[l].destructorFunction===void 0){f=!0;break}var h=e[0].name!=="void",y=i-2,m=new Array(y),C=[],A=[];return function(){arguments.length!==y&&_(`function ${t} called with ${arguments.length} arguments, expected ${y} args!`),A.length=0;var W;C.length=s?2:1,C[0]=a,s&&(W=e[1].toWireType(A,this),C[1]=W);for(var D=0;D<y;++D)m[D]=e[D+2].toWireType(A,arguments[D]),C.push(m[D]);var H=n.apply(null,C);function d(p){if(f)Ce(A);else for(var x=s?1:2;x<e.length;x++){var O=x===1?W:m[x-2];e[x].destructorFunction!==null&&e[x].destructorFunction(O)}if(h)return e[0].fromWireType(p)}return d(H)}}function Sn(t,e,r,n,a,o){var i=Gt(e,r);a=X(n,a),ct([],[t],function(s){s=s[0];var f=`constructor ${s.name}`;if(s.registeredClass.constructor_body===void 0&&(s.registeredClass.constructor_body=[]),s.registeredClass.constructor_body[e-1]!==void 0)throw new pt(`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]=()=>{It(`Cannot construct ${s.name} due to unbound types`,i)},ct([],i,function(l){return l.splice(1,0,null),s.registeredClass.constructor_body[e-1]=Xt(f,l,null,a,o),[]}),[]})}function Fn(t,e,r,n,a,o,i,s,f){var l=Gt(r,n);e=k(e),o=X(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 m(){It(`Cannot call ${y} due to unbound types`,l)}var C=h.registeredClass.instancePrototype,A=C[e];return A===void 0||A.overloadTable===void 0&&A.className!==h.name&&A.argCount===r-2?(m.argCount=r-2,m.className=h.name,C[e]=m):(Fe(C,e,y),C[e].overloadTable[r-2]=m),ct([],l,function(W){var D=Xt(y,W,h,o,i);return C[e].overloadTable===void 0?(D.argCount=r-2,C[e]=D):C[e].overloadTable[r-2]=D,[]}),[]})}function On(){Object.assign(Ie.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 Ie(){this.allocated=[void 0],this.freelist=[]}var N=new Ie;function We(t){t>=N.reserved&&--N.get(t).refcount===0&&N.free(t)}function Mn(){for(var t=0,e=N.reserved;e<N.allocated.length;++e)N.allocated[e]!==void 0&&++t;return t}function jn(){N.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),N.reserved=N.allocated.length,u.count_emval_handles=Mn}var ot={toValue:t=>(t||_("Cannot use deleted val. handle = "+t),N.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 N.allocate({refcount:1,value:t})}}};function Rn(t,e){e=k(e),tt(t,{name:e,fromWireType:function(r){var n=ot.toValue(r);return We(r),n},toWireType:function(r,n){return ot.toHandle(n)},argPackAdvance:8,readValueFromPointer:gt,destructorFunction:null})}function qt(t){if(t===null)return"null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t}function In(t,e){switch(e){case 2:return function(r){return this.fromWireType(de[r>>2])};case 3:return function(r){return this.fromWireType(he[r>>3])};default:throw new TypeError("Unknown float type: "+t)}}function Wn(t,e,r){var n=Vt(r);e=k(e),tt(t,{name:e,fromWireType:function(a){return a},toWireType:function(a,o){return o},argPackAdvance:8,readValueFromPointer:In(e,n),destructorFunction:null})}function Hn(t,e,r,n,a,o,i){var s=Gt(e,r);t=k(t),a=X(n,a),Oe(t,function(){It(`Cannot call ${t} due to unbound types`,s)},e-1),ct([],s,function(f){var l=[f[0],null].concat(f.slice(1));return Me(t,Xt(t,l,null,a,o),e-1),[]})}function kn(t,e,r){switch(e){case 0:return r?function(n){return Q[n]}:function(n){return V[n]};case 1:return r?function(n){return dt[n>>1]}:function(n){return Et[n>>1]};case 2:return r?function(n){return I[n>>2]}:function(n){return S[n>>2]};default:throw new TypeError("Unknown integer type: "+t)}}function Bn(t,e,r,n,a){e=k(e);var o=Vt(r),i=y=>y;if(n===0){var s=32-8*r;i=y=>y<<s>>>s}var f=e.includes("unsigned"),l=(y,m)=>{},h;f?h=function(y,m){return l(m,this.name),m>>>0}:h=function(y,m){return l(m,this.name),m},tt(t,{name:e,fromWireType:i,toWireType:h,argPackAdvance:8,readValueFromPointer:kn(e,o,n!==0),destructorFunction:null})}function Un(t,e,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function o(i){i=i>>2;var s=S,f=s[i],l=s[i+1];return new a(s.buffer,l,f)}r=k(r),tt(t,{name:r,fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})}var He=(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 f=t.charCodeAt(++i);s=65536+((s&1023)<<10)|f&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},Vn=(t,e,r)=>He(t,V,e,r),ke=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},Be=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,zn=(t,e,r)=>{for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&Be)return Be.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 f=t[e++]&63;if((i&240)==224?i=(i&15)<<12|s<<6|f:i=(i&7)<<18|s<<12|f<<6|t[e++]&63,i<65536)o+=String.fromCharCode(i);else{var l=i-65536;o+=String.fromCharCode(55296|l>>10,56320|l&1023)}}return o},Jt=(t,e)=>t?zn(V,t,e):"";function Ln(t,e){e=k(e);var r=e==="std::string";tt(t,{name:e,fromWireType:function(n){var a=S[n>>2],o=n+4,i;if(r)for(var s=o,f=0;f<=a;++f){var l=o+f;if(f==a||V[l]==0){var h=l-s,y=Jt(s,h);i===void 0?i=y:(i+=String.fromCharCode(0),i+=y),s=l+1}}else{for(var m=new Array(a),f=0;f<a;++f)m[f]=String.fromCharCode(V[o+f]);i=m.join("")}return rt(n),i},toWireType:function(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||_("Cannot pass non-string to std::string"),r&&i?o=ke(a):o=a.length;var s=Qt(4+o+1),f=s+4;if(S[s>>2]=o,r&&i)Vn(a,f,o+1);else if(i)for(var l=0;l<o;++l){var h=a.charCodeAt(l);h>255&&(rt(f),_("String has UTF-16 code units that do not fit in 8 bits")),V[f+l]=h}else for(var l=0;l<o;++l)V[f+l]=a[l];return n!==null&&n.push(rt,s),s},argPackAdvance:8,readValueFromPointer:gt,destructorFunction:function(n){rt(n)}})}var Ue=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Yn=(t,e)=>{for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&Et[n];)++n;if(r=n<<1,r-t>32&&Ue)return Ue.decode(V.subarray(t,r));for(var o="",i=0;!(i>=e/2);++i){var s=dt[t+i*2>>1];if(s==0)break;o+=String.fromCharCode(s)}return o},Nn=(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);dt[e>>1]=i,e+=2}return dt[e>>1]=0,e-n},Gn=t=>t.length*2,Xn=(t,e)=>{for(var r=0,n="";!(r>=e/4);){var a=I[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},qn=(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(I[e>>2]=i,e+=4,e+4>a)break}return I[e>>2]=0,e-n},Jn=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},Zn=function(t,e,r){r=k(r);var n,a,o,i,s;e===2?(n=Yn,a=Nn,i=Gn,o=()=>Et,s=1):e===4&&(n=Xn,a=qn,i=Jn,o=()=>S,s=2),tt(t,{name:r,fromWireType:function(f){for(var l=S[f>>2],h=o(),y,m=f+4,C=0;C<=l;++C){var A=f+4+C*e;if(C==l||h[A>>s]==0){var W=A-m,D=n(m,W);y===void 0?y=D:(y+=String.fromCharCode(0),y+=D),m=A+e}}return rt(f),y},toWireType:function(f,l){typeof l!="string"&&_(`Cannot pass non-string to C++ string type ${r}`);var h=i(l),y=Qt(4+h+e);return S[y>>2]=h>>s,a(l,y+4,h+e),f!==null&&f.push(rt,y),y},argPackAdvance:8,readValueFromPointer:gt,destructorFunction:function(f){rt(f)}})};function Qn(t,e,r,n,a,o){Ft[t]={name:k(e),rawConstructor:X(r,n),rawDestructor:X(a,o),fields:[]}}function Kn(t,e,r,n,a,o,i,s,f,l){Ft[t].fields.push({fieldName:k(e),getterReturnType:r,getter:X(n,a),getterContext:o,setterArgumentType:i,setter:X(s,f),setterContext:l})}function ta(t,e){e=k(e),tt(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:function(){},toWireType:function(r,n){}})}var ea={};function ra(t){var e=ea[t];return e===void 0?k(t):e}function Ve(){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.")}function na(t){return t===0?ot.toHandle(Ve()):(t=ra(t),ot.toHandle(Ve()[t]))}function aa(t){t>4&&(N.get(t).refcount+=1)}function ze(t,e){var r=ut[t];return r===void 0&&_(e+" has unknown type "+Re(t)),r}function oa(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(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 ot.toHandle(s)}}var Le={};function ia(t,e,r,n){t=ot.toValue(t);var a=Le[e];return a||(a=oa(e),Le[e]=a),a(t,r,n)}function sa(t,e){t=ze(t,"_emval_take_value");var r=t.readValueFromPointer(e);return ot.toHandle(r)}var ua=()=>{At("")},ca=(t,e,r)=>V.copyWithin(t,e,e+r),fa=()=>2147483648,la=t=>{var e=Z.buffer,r=t-e.byteLength+65535>>>16;try{return Z.grow(r),pe(),1}catch{}},da=t=>{var e=V.length;t>>>=0;var r=fa();if(t>r)return!1;for(var n=(f,l)=>f+(l-f%l)%l,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=la(i);if(s)return!0}return!1},Zt={},ha=()=>j||"./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,_:ha()};for(var r in Zt)Zt[r]===void 0?delete e[r]:e[r]=Zt[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);_t.strings=n}return _t.strings},pa=(t,e)=>{for(var r=0;r<t.length;++r)Q[e++>>0]=t.charCodeAt(r);Q[e>>0]=0},ya=(t,e)=>{var r=0;return _t().forEach(function(n,a){var o=e+r;S[t+a*4>>2]=o,pa(n,o),r+=n.length+1}),0},va=(t,e)=>{var r=_t();S[t>>2]=r.length;var n=0;return r.forEach(function(a){n+=a.length+1}),S[e>>2]=n,0};function ma(t){return t}var Wt=t=>t%4===0&&(t%100!==0||t%400===0),ga=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},Ye=[31,29,31,30,31,30,31,31,30,31,30,31],Ne=[31,28,31,30,31,30,31,31,30,31,30,31],wa=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=Wt(r.getFullYear()),a=r.getMonth(),o=(n?Ye:Ne)[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 $a(t,e,r){var n=r>0?r:ke(t)+1,a=new Array(n),o=He(t,a,0,a.length);return e&&(a.length=o),a}var ba=(t,e)=>{Q.set(t,e)},Ca=(t,e,r,n)=>{var a=I[n+40>>2],o={tm_sec:I[n>>2],tm_min:I[n+4>>2],tm_hour:I[n+8>>2],tm_mday:I[n+12>>2],tm_mon:I[n+16>>2],tm_year:I[n+20>>2],tm_wday:I[n+24>>2],tm_yday:I[n+28>>2],tm_isdst:I[n+32>>2],tm_gmtoff:I[n+36>>2],tm_zone:a?Jt(a):""},i=Jt(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 f in s)i=i.replace(new RegExp(f,"g"),s[f]);var l=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h=["January","February","March","April","May","June","July","August","September","October","November","December"];function y(d,p,x){for(var O=typeof d=="number"?d.toString():d||"";O.length<p;)O=x[0]+O;return O}function m(d,p){return y(d,p,"0")}function C(d,p){function x(ft){return ft<0?-1:ft>0?1:0}var O;return(O=x(d.getFullYear()-p.getFullYear()))===0&&(O=x(d.getMonth()-p.getMonth()))===0&&(O=x(d.getDate()-p.getDate())),O}function A(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 W(d){var p=wa(new Date(d.tm_year+1900,0,1),d.tm_yday),x=new Date(p.getFullYear(),0,4),O=new Date(p.getFullYear()+1,0,4),ft=A(x),kt=A(O);return C(ft,p)<=0?C(kt,p)<=0?p.getFullYear()+1:p.getFullYear():p.getFullYear()-1}var D={"%a":d=>l[d.tm_wday].substring(0,3),"%A":d=>l[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 m(p/100|0,2)},"%d":d=>m(d.tm_mday,2),"%e":d=>y(d.tm_mday,2," "),"%g":d=>W(d).toString().substring(2),"%G":d=>W(d),"%H":d=>m(d.tm_hour,2),"%I":d=>{var p=d.tm_hour;return p==0?p=12:p>12&&(p-=12),m(p,2)},"%j":d=>m(d.tm_mday+ga(Wt(d.tm_year+1900)?Ye:Ne,d.tm_mon-1),3),"%m":d=>m(d.tm_mon+1,2),"%M":d=>m(d.tm_min,2),"%n":()=>` | ||
`,"%p":d=>d.tm_hour>=0&&d.tm_hour<12?"AM":"PM","%S":d=>m(d.tm_sec,2),"%t":()=>" ","%u":d=>d.tm_wday||7,"%U":d=>{var p=d.tm_yday+7-d.tm_wday;return m(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 x=(d.tm_wday+371-d.tm_yday)%7;x!=4&&(x!=3||!Wt(d.tm_year))&&(p=1)}}else{p=52;var O=(d.tm_wday+7-d.tm_yday-1)%7;(O==4||O==5&&Wt(d.tm_year%400-1))&&p++}return m(p,2)},"%w":d=>d.tm_wday,"%W":d=>{var p=d.tm_yday+7-(d.tm_wday+6)%7;return m(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,x=p>=0;return p=Math.abs(p)/60,p=p/60*100+p%60,(x?"+":"-")+("0000"+p).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};i=i.replace(/%%/g,"\0\0");for(var f in D)i.includes(f)&&(i=i.replace(new RegExp(f,"g"),D[f](o)));i=i.replace(/\0\0/g,"%");var H=$a(i,!1);return H.length>e?0:(ba(H,t),H.length-1)},_a=(t,e,r,n,a)=>Ca(t,e,r,n);_e=u.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},Jr(),pt=u.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},pn(),on(),Tn(),je=u.UnboundTypeError=Dn(Error,"UnboundTypeError"),On(),jn();var Ta={q:Hr,u:kr,a:Ur,h:Vr,l:zr,I:Lr,P:Yr,n:Nr,ba:Gr,d:Br,oa:Xr,Y:qr,fa:Qr,na:xn,ma:Sn,D:Fn,ea:Rn,W:Wn,J:Hn,w:Bn,s:Un,V:Ln,L:Zn,Q:Qn,pa:Kn,ga:ta,U:We,la:na,R:aa,ia,ka:sa,K:ua,da:ca,ca:da,$:ya,aa:va,H:za,T:Qa,B:Ya,p:Ba,b:Pa,C:Va,ha:Ga,c:Sa,j:Oa,i:Da,x:La,O:Ua,v:Ha,G:qa,N:Ja,A:Na,F:Ka,Z:eo,X:ro,k:Fa,f:xa,e:Aa,g:Ea,M:Za,m:Wa,o:Ma,S:ja,t:Ia,ja:ka,y:Xa,r:Ra,E:to,z:ma,_:_a};Wr();var rt=u._free=t=>(rt=u._free=E.sa)(t),Qt=u._malloc=t=>(Qt=u._malloc=E.ta)(t),Ge=t=>(Ge=E.va)(t);u.__embind_initialize_bindings=()=>(u.__embind_initialize_bindings=E.wa)();var g=(t,e)=>(g=E.xa)(t,e),Tt=t=>(Tt=E.ya)(t),$=()=>($=E.za)(),b=t=>(b=E.Aa)(t),Xe=t=>(Xe=E.Ba)(t),qe=t=>(qe=E.Ca)(t),Je=(t,e,r)=>(Je=E.Da)(t,e,r),Ze=t=>(Ze=E.Ea)(t);u.dynCall_viijii=(t,e,r,n,a,o,i)=>(u.dynCall_viijii=E.Fa)(t,e,r,n,a,o,i);var Qe=u.dynCall_jiii=(t,e,r,n)=>(Qe=u.dynCall_jiii=E.Ga)(t,e,r,n),Ke=u.dynCall_jiiii=(t,e,r,n,a)=>(Ke=u.dynCall_jiiii=E.Ha)(t,e,r,n,a);u.dynCall_iiiiij=(t,e,r,n,a,o,i)=>(u.dynCall_iiiiij=E.Ia)(t,e,r,n,a,o,i),u.dynCall_iiiiijj=(t,e,r,n,a,o,i,s,f)=>(u.dynCall_iiiiijj=E.Ja)(t,e,r,n,a,o,i,s,f),u.dynCall_iiiiiijj=(t,e,r,n,a,o,i,s,f,l)=>(u.dynCall_iiiiiijj=E.Ka)(t,e,r,n,a,o,i,s,f,l);function Pa(t,e){var r=$();try{return T(t)(e)}catch(n){if(b(r),n!==n+0)throw n;g(1,0)}}function Ea(t,e,r,n){var a=$();try{T(t)(e,r,n)}catch(o){if(b(a),o!==o+0)throw o;g(1,0)}}function Aa(t,e,r){var n=$();try{T(t)(e,r)}catch(a){if(b(n),a!==a+0)throw a;g(1,0)}}function Da(t,e,r,n,a){var o=$();try{return T(t)(e,r,n,a)}catch(i){if(b(o),i!==i+0)throw i;g(1,0)}}function xa(t,e){var r=$();try{T(t)(e)}catch(n){if(b(r),n!==n+0)throw n;g(1,0)}}function Sa(t,e,r){var n=$();try{return T(t)(e,r)}catch(a){if(b(n),a!==a+0)throw a;g(1,0)}}function Fa(t){var e=$();try{T(t)()}catch(r){if(b(e),r!==r+0)throw r;g(1,0)}}function Oa(t,e,r,n){var a=$();try{return T(t)(e,r,n)}catch(o){if(b(a),o!==o+0)throw o;g(1,0)}}function Ma(t,e,r,n,a,o){var i=$();try{T(t)(e,r,n,a,o)}catch(s){if(b(i),s!==s+0)throw s;g(1,0)}}function ja(t,e,r,n,a,o,i){var s=$();try{T(t)(e,r,n,a,o,i)}catch(f){if(b(s),f!==f+0)throw f;g(1,0)}}function Ra(t,e,r,n,a,o,i,s,f,l,h){var y=$();try{T(t)(e,r,n,a,o,i,s,f,l,h)}catch(m){if(b(y),m!==m+0)throw m;g(1,0)}}function Ia(t,e,r,n,a,o,i,s){var f=$();try{T(t)(e,r,n,a,o,i,s)}catch(l){if(b(f),l!==l+0)throw l;g(1,0)}}function Wa(t,e,r,n,a){var o=$();try{T(t)(e,r,n,a)}catch(i){if(b(o),i!==i+0)throw i;g(1,0)}}function Ha(t,e,r,n,a,o,i){var s=$();try{return T(t)(e,r,n,a,o,i)}catch(f){if(b(s),f!==f+0)throw f;g(1,0)}}function ka(t,e,r,n,a,o,i,s,f){var l=$();try{T(t)(e,r,n,a,o,i,s,f)}catch(h){if(b(l),h!==h+0)throw h;g(1,0)}}function Ba(t){var e=$();try{return T(t)()}catch(r){if(b(e),r!==r+0)throw r;g(1,0)}}function Ua(t,e,r,n,a,o,i){var s=$();try{return T(t)(e,r,n,a,o,i)}catch(f){if(b(s),f!==f+0)throw f;g(1,0)}}function Va(t,e,r,n){var a=$();try{return T(t)(e,r,n)}catch(o){if(b(a),o!==o+0)throw o;g(1,0)}}function za(t,e,r,n){var a=$();try{return T(t)(e,r,n)}catch(o){if(b(a),o!==o+0)throw o;g(1,0)}}function La(t,e,r,n,a,o){var i=$();try{return T(t)(e,r,n,a,o)}catch(s){if(b(i),s!==s+0)throw s;g(1,0)}}function Ya(t,e,r,n,a,o){var i=$();try{return T(t)(e,r,n,a,o)}catch(s){if(b(i),s!==s+0)throw s;g(1,0)}}function Na(t,e,r,n,a,o,i,s,f,l){var h=$();try{return T(t)(e,r,n,a,o,i,s,f,l)}catch(y){if(b(h),y!==y+0)throw y;g(1,0)}}function Ga(t,e,r){var n=$();try{return T(t)(e,r)}catch(a){if(b(n),a!==a+0)throw a;g(1,0)}}function Xa(t,e,r,n,a,o,i,s,f,l){var h=$();try{T(t)(e,r,n,a,o,i,s,f,l)}catch(y){if(b(h),y!==y+0)throw y;g(1,0)}}function qa(t,e,r,n,a,o,i,s){var f=$();try{return T(t)(e,r,n,a,o,i,s)}catch(l){if(b(f),l!==l+0)throw l;g(1,0)}}function Ja(t,e,r,n,a,o,i,s,f){var l=$();try{return T(t)(e,r,n,a,o,i,s,f)}catch(h){if(b(l),h!==h+0)throw h;g(1,0)}}function Za(t,e,r,n,a,o,i){var s=$();try{T(t)(e,r,n,a,o,i)}catch(f){if(b(s),f!==f+0)throw f;g(1,0)}}function Qa(t,e,r,n){var a=$();try{return T(t)(e,r,n)}catch(o){if(b(a),o!==o+0)throw o;g(1,0)}}function Ka(t,e,r,n,a,o,i,s,f,l,h,y){var m=$();try{return T(t)(e,r,n,a,o,i,s,f,l,h,y)}catch(C){if(b(m),C!==C+0)throw C;g(1,0)}}function to(t,e,r,n,a,o,i,s,f,l,h,y,m,C,A,W){var D=$();try{T(t)(e,r,n,a,o,i,s,f,l,h,y,m,C,A,W)}catch(H){if(b(D),H!==H+0)throw H;g(1,0)}}function eo(t,e,r,n){var a=$();try{return Qe(t,e,r,n)}catch(o){if(b(a),o!==o+0)throw o;g(1,0)}}function ro(t,e,r,n,a){var o=$();try{return Ke(t,e,r,n,a)}catch(i){if(b(o),i!==i+0)throw i;g(1,0)}}var Ht;mt=function t(){Ht||tr(),Ht||(mt=t)};function tr(){if(it>0||(Er(),it>0))return;function t(){Ht||(Ht=!0,u.calledRun=!0,!Pt&&(Ar(),w(u),u.onRuntimeInitialized&&u.onRuntimeInitialized(),Dr()))}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 tr(),v.ready}})();function _r(c){return ie(ce,c)}async function Tr(c,{tryHarder:v=nt.tryHarder,formats:u=nt.formats,maxSymbols:w=nt.maxSymbols}=nt){return $r(c,{tryHarder:v,formats:u,maxSymbols:w},ce)}const fe=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 Pr(c){for(const[v,u]of fe)if(c===u)return v;return"unknown"}class le{constructor(v={}){nr(this,vt,void 0);var u;try{const w=(u=v==null?void 0:v.formats)==null?void 0:u.filter(P=>P!=="unknown");if((w==null?void 0:w.length)===0)throw new TypeError("Hint option provided, but is empty.");w==null||w.forEach(P=>{if(!B.includes(P))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${P}' is not a valid enum value of type BarcodeFormat.`)}),_r().catch(()=>{}),ar(this,vt,w??[])}catch(w){throw ae(w,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return B.filter(v=>v!=="unknown")}async detect(v){try{const u=await lr(v);if(u===null)return[];let w;try{w=await Tr(u,{tryHarder:!0,formats:rr(this,vt).map(P=>fe.get(P))})}catch{throw new DOMException("Barcode detection service unavailable. Use 'setZXingModuleOverrides' in offline or strict CSP environments.","NotSupportedError")}return w.map(P=>{const{topLeft:{x:F,y:j},topRight:{x:q,y:U},bottomLeft:{x:R,y:G},bottomRight:{x:J,y:L}}=P.position,Y=Math.min(F,q,R,J),Z=Math.min(j,U,G,L),E=Math.max(F,q,R,J),Pt=Math.max(j,U,G,L);return{boundingBox:new DOMRectReadOnly(Y,Z,E-Y,Pt-Z),rawValue:new TextDecoder().decode(P.bytes),format:Pr(P.format),cornerPoints:[{x:F,y:j},{x:q,y:U},{x:J,y:L},{x:R,y:G}]}})}catch(u){throw ae(u,"Failed to execute 'detect' on 'BarcodeDetector'")}}}return vt=new WeakMap,globalThis.BarcodeDetector??(globalThis.BarcodeDetector=le),M.BarcodeDetector=le,M.setZXingModuleOverrides=wr,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"}),M}({}); | ||
var er=(M,B,z)=>{if(!B.has(M))throw TypeError("Cannot "+z)};var rr=(M,B,z)=>(er(M,B,"read from private field"),z?z.call(M):B.get(M)),nr=(M,B,z)=>{if(B.has(M))throw TypeError("Cannot add the same private member more than once");B instanceof WeakSet?B.add(M):B.set(M,z)},ar=(M,B,z,yt)=>(er(M,B,"write to private field"),yt?yt.call(M,z):B.set(M,z),z);var BarcodeDetectionAPI=function(M){var vt;"use strict";const B=["aztec","code_128","code_39","code_93","codabar","data_matrix","ean_13","ean_8","itf","pdf417","qr_code","upc_a","upc_e","unknown"];function z(c){if(yt(c))return{width:c.naturalWidth,height:c.naturalHeight};if(Kt(c))return{width:c.width.baseVal.value,height:c.height.baseVal.value};if(te(c))return{width:c.videoWidth,height:c.videoHeight};if(or(c))return{width:c.width,height:c.height};if(ee(c))return{width:c.width,height:c.height};if(ir(c))return{width:c.width,height:c.height};if(re(c))return{width:c.displayWidth,height:c.displayHeight};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 yt(c){try{return c instanceof HTMLImageElement}catch{return!1}}function Kt(c){try{return c instanceof SVGImageElement}catch{return!1}}function te(c){try{return c instanceof HTMLVideoElement}catch{return!1}}function or(c){try{return c instanceof HTMLCanvasElement}catch{return!1}}function ee(c){try{return c instanceof ImageBitmap}catch{return!1}}function ir(c){try{return c instanceof OffscreenCanvas}catch{return!1}}function re(c){try{return c instanceof VideoFrame}catch{return!1}}function sr(c){try{return c instanceof Blob}catch{return!1}}function ur(c){try{return c instanceof ImageData}catch{return!1}}function cr(c,v){try{const u=new OffscreenCanvas(c,v);if(u.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return u;throw void 0}catch{const u=document.createElement("canvas");return u.width=c,u.height=v,u}}async function ne(c){if(yt(c)&&!await dr(c))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(Kt(c)&&!await hr(c))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(re(c)&&pr(c))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(te(c)&&(c.readyState===0||c.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(ee(c)&&vr(c))throw new DOMException("The image source is detached.","InvalidStateError");const{width:v,height:u}=z(c);if(v===0||u===0)return null;const P=cr(v,u).getContext("2d");P.drawImage(c,0,0);try{return P.getImageData(0,0,v,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function fr(c){let v;try{v=await createImageBitmap(c)}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await ne(v)}async function lr(c){if(sr(c))return await fr(c);if(ur(c)){if(yr(c))throw new DOMException("The image data has been detached.","InvalidStateError");return c}return await ne(c)}async function dr(c){try{return await c.decode(),!0}catch{return!1}}async function hr(c){var v;try{return await((v=c.decode)==null?void 0:v.call(c)),!0}catch{return!1}}function pr(c){return c.format===null}function yr(c){return c.data.buffer.byteLength===0}function vr(c){return c.width===0&&c.height===0}function ae(c,v){return c instanceof DOMException?new DOMException(`${v}: ${c.message}`,c.name):c instanceof Error?new c.constructor(`${v}: ${c.message}`):new Error(`${v}: ${c}`)}const oe=c=>{let v;const u=new Set,w=(j,q)=>{const U=typeof j=="function"?j(v):j;if(!Object.is(U,v)){const R=v;v=q??typeof U!="object"?U:Object.assign({},v,U),u.forEach(G=>G(v,R))}},P=()=>v,F={setState:w,getState:P,subscribe:j=>(u.add(j),()=>u.delete(j)),destroy:()=>{u.clear()}};return v=c(w,P,F),F},mr=c=>c?oe(c):oe,gr={locateFile:(c,v)=>{var u;const w=(u=c.match(/_(.+?)\.wasm$/))==null?void 0:u[1];return w?`https://cdn.jsdelivr.net/npm/@sec-ant/zxing-wasm@2.1.3/dist/${w}/${c}`:v+c}},lt=mr()(()=>({zxingModuleWeakMap:new WeakMap,zxingModuleOverrides:gr}));function wr(c){lt.setState({zxingModuleOverrides:c})}function ie(c,v=lt.getState().zxingModuleOverrides){const{zxingModuleWeakMap:u}=lt.getState(),w=u.get(c);if(w&&Object.is(v,lt.getState().zxingModuleOverrides))return w;{lt.setState({zxingModuleOverrides:v});const P=c(v);return u.set(c,P),P}}const se=["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"],nt={tryHarder:!0,formats:[],maxSymbols:255};async function $r(c,{tryHarder:v=nt.tryHarder,formats:u=nt.formats,maxSymbols:w=nt.maxSymbols}=nt,P){const F=await ie(P,lt.getState().zxingModuleOverrides),{data:j,width:q,height:U,data:{byteLength:R}}=c,G=F._malloc(R);F.HEAP8.set(j,G);const J=F.readBarcodesFromPixmap(G,q,U,v,br(u),w);F._free(G);const L=[];for(let Y=0;Y<J.size();++Y){const Z=J.get(Y);L.push({...Z,format:Cr(Z.format)})}return L}function br(c){return c.join("|")}function Cr(c){const v=ue(c);let u=0,w=se.length-1;for(;u<=w;){const P=Math.floor((u+w)/2),F=se[P],j=ue(F);if(j===v)return F;j<v?u=P+1:w=P-1}return"None"}function ue(c){return c.toLowerCase().replace(/_-\[\]/g,"")}var ce=(()=>{var c=document.currentScript&&document.currentScript.src||new URL("index.js",document.baseURI).href;return function(v={}){var u=v,w,P;u.ready=new Promise((t,e)=>{w=t,P=e});var F=Object.assign({},u),j="./this.program",q=typeof window=="object",U=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var R="";function G(t){return u.locateFile?u.locateFile(t,R):R+t}var J;(q||U)&&(U?R=self.location.href:typeof document<"u"&&document.currentScript&&(R=document.currentScript.src),c&&(R=c),R.indexOf("blob:")!==0?R=R.substr(0,R.replace(/[?#].*/,"").lastIndexOf("/")+1):R="",U&&(J=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,F),F=null,u.arguments&&u.arguments,u.thisProgram&&(j=u.thisProgram),u.quit&&u.quit;var Y;u.wasmBinary&&(Y=u.wasmBinary),u.noExitRuntime,typeof WebAssembly!="object"&&At("no native wasm support detected");var Z,E,Pt=!1,Q,V,dt,Et,I,x,de,he;function pe(){var t=Z.buffer;u.HEAP8=Q=new Int8Array(t),u.HEAP16=dt=new Int16Array(t),u.HEAP32=I=new Int32Array(t),u.HEAPU8=V=new Uint8Array(t),u.HEAPU16=Et=new Uint16Array(t),u.HEAPU32=x=new Uint32Array(t),u.HEAPF32=de=new Float32Array(t),u.HEAPF64=he=new Float64Array(t)}var ye,ve=[],me=[],ge=[];function Er(){if(u.preRun)for(typeof u.preRun=="function"&&(u.preRun=[u.preRun]);u.preRun.length;)Sr(u.preRun.shift());Bt(ve)}function Ar(){Bt(me)}function Dr(){if(u.postRun)for(typeof u.postRun=="function"&&(u.postRun=[u.postRun]);u.postRun.length;)Fr(u.postRun.shift());Bt(ge)}function Sr(t){ve.unshift(t)}function xr(t){me.unshift(t)}function Fr(t){ge.unshift(t)}var it=0,mt=null;function Or(t){it++,u.monitorRunDependencies&&u.monitorRunDependencies(it)}function Mr(t){if(it--,u.monitorRunDependencies&&u.monitorRunDependencies(it),it==0&&mt){var e=mt;mt=null,e()}}function At(t){u.onAbort&&u.onAbort(t),t="Aborted("+t+")",L(t),Pt=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw P(e),e}var jr="data:application/octet-stream;base64,";function we(t){return t.startsWith(jr)}var st;u.locateFile?(st="zxing_reader.wasm",we(st)||(st=G(st))):st=new URL("/reader/zxing_reader.wasm",self.location).href;function $e(t){if(t==st&&Y)return new Uint8Array(Y);if(J)return J(t);throw"both async and sync fetching of the wasm failed"}function Rr(t){return!Y&&(q||U)&&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(()=>$e(t)):Promise.resolve().then(()=>$e(t))}function be(t,e,r){return Rr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{L("failed to asynchronously prepare wasm: "+n),At(n)})}function Ir(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!we(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"),be(e,r,n)})}):be(e,r,n)}function Wr(){var t={a:Ta};function e(n,a){var o=n.exports;return E=o,Z=E.qa,pe(),ye=E.ua,xr(E.ra),Mr(),o}Or();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),P(n)}return Ir(Y,st,t,r).catch(P),{}}var Bt=t=>{for(;t.length>0;)t.shift()(u)},Dt=[],St=0;function Hr(t){var e=new xt(t);return e.get_caught()||(e.set_caught(!0),St--),e.set_rethrown(!1),Dt.push(e),qe(e.excPtr),e.get_exception_ptr()}var K=0;function kr(){g(0,0);var t=Dt.pop();Xe(t.excPtr),K=0}function xt(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(e){x[this.ptr+4>>2]=e},this.get_type=function(){return x[this.ptr+4>>2]},this.set_destructor=function(e){x[this.ptr+8>>2]=e},this.get_destructor=function(){return x[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,Q[this.ptr+12>>0]=e},this.get_caught=function(){return Q[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,Q[this.ptr+13>>0]=e},this.get_rethrown=function(){return Q[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){x[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return x[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=Ze(this.get_type());if(e)return x[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}function Br(t){throw K||(K=t),K}var Ut=t=>{var e=K;if(!e)return Tt(0),0;var r=new xt(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(Je(o,n,i))return Tt(o),e}return Tt(n),e},Ur=()=>Ut([]),Vr=t=>Ut([t]),zr=(t,e)=>Ut([t,e]);function Lr(t){var e=new xt(t).get_exception_ptr();return e}function Yr(){var t=Dt.pop();t||At("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(Dt.push(t),t.set_rethrown(!0),t.set_caught(!1),St++),K=e,K}function Nr(t,e,r){var n=new xt(t);throw n.init(e,r),K=t,St++,K}function Gr(){return St}var Ft={};function Ce(t){for(;t.length;){var e=t.pop(),r=t.pop();r(e)}}function gt(t){return this.fromWireType(I[t>>2])}var ht={},ut={},Ot={},_e=void 0;function Mt(t){throw new _e(t)}function ct(t,e,r){t.forEach(function(s){Ot[s]=e});function n(s){var f=r(s);f.length!==t.length&&Mt("Mismatched type converter count");for(var l=0;l<t.length;++l)tt(t[l],f[l])}var a=new Array(e.length),o=[],i=0;e.forEach((s,f)=>{ut.hasOwnProperty(s)?a[f]=ut[s]:(o.push(s),ht.hasOwnProperty(s)||(ht[s]=[]),ht[s].push(()=>{a[f]=ut[s],++i,i===o.length&&n(a)}))}),o.length===0&&n(a)}var Xr=function(t){var e=Ft[t];delete Ft[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((f,l)=>{var h=f.fieldName,y=i[l],m=f.getter,C=f.getterContext,A=i[l+a.length],W=f.setter,D=f.setterContext;s[h]={read:H=>y.fromWireType(m(C,H)),write:(H,d)=>{var p=[];W(D,H,A.toWireType(p,d)),Ce(p)}}}),[{name:e.name,fromWireType:function(f){var l={};for(var h in s)l[h]=s[h].read(f);return n(f),l},toWireType:function(f,l){for(var h in s)if(!(h in l))throw new TypeError(`Missing field: "${h}"`);var y=r();for(h in s)s[h].write(y,l[h]);return f!==null&&f.push(n,y),y},argPackAdvance:8,readValueFromPointer:gt,destructorFunction:n}]})};function qr(t,e,r,n,a){}function Vt(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError(`Unknown type size: ${t}`)}}function Jr(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);Te=t}var Te=void 0;function k(t){for(var e="",r=t;V[r];)e+=Te[V[r++]];return e}var pt=void 0;function _(t){throw new pt(t)}function Zr(t,e,r={}){var n=e.name;if(t||_(`type "${n}" must have a positive integer typeid pointer`),ut.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;_(`Cannot register type '${n}' twice`)}if(ut[t]=e,delete Ot[t],ht.hasOwnProperty(t)){var a=ht[t];delete ht[t],a.forEach(o=>o())}}function tt(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Zr(t,e,r)}function Qr(t,e,r,n,a){var o=Vt(r);e=k(e),tt(t,{name:e,fromWireType:function(i){return!!i},toWireType:function(i,s){return s?n:a},argPackAdvance:8,readValueFromPointer:function(i){var s;if(r===1)s=Q;else if(r===2)s=dt;else if(r===4)s=I;else throw new TypeError("Unknown boolean type size: "+e);return this.fromWireType(s[i>>o])},destructorFunction:null})}function Kr(t){if(!(this instanceof at)||!(t instanceof at))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,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}function tn(t){return{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}}function zt(t){function e(r){return r.$$.ptrType.registeredClass.name}_(e(t)+" instance already deleted")}var Lt=!1;function Pe(t){}function en(t){t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)}function Ee(t){t.count.value-=1;var e=t.count.value===0;e&&en(t)}function Ae(t,e,r){if(e===r)return t;if(r.baseClass===void 0)return null;var n=Ae(t,e,r.baseClass);return n===null?null:r.downcast(n)}var De={};function rn(){return Object.keys(bt).length}function nn(){var t=[];for(var e in bt)bt.hasOwnProperty(e)&&t.push(bt[e]);return t}var wt=[];function Yt(){for(;wt.length;){var t=wt.pop();t.$$.deleteScheduled=!1,t.delete()}}var $t=void 0;function an(t){$t=t,wt.length&&$t&&$t(Yt)}function on(){u.getInheritedInstanceCount=rn,u.getLiveInheritedInstances=nn,u.flushPendingDeletes=Yt,u.setDelayFunction=an}var bt={};function sn(t,e){for(e===void 0&&_("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}function un(t,e){return e=sn(t,e),bt[e]}function jt(t,e){(!e.ptrType||!e.ptr)&&Mt("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&Mt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Ct(Object.create(t,{$$:{value:e}}))}function cn(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=un(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?jt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):jt(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var o=this.registeredClass.getActualType(e),i=De[o];if(!i)return a.call(this);var s;this.isConst?s=i.constPointerType:s=i.pointerType;var f=Ae(e,this.registeredClass,s.registeredClass);return f===null?a.call(this):this.isSmartPointer?jt(s.registeredClass.instancePrototype,{ptrType:s,ptr:f,smartPtrType:this,smartPtr:t}):jt(s.registeredClass.instancePrototype,{ptrType:s,ptr:f})}var Ct=function(t){return typeof FinalizationRegistry>"u"?(Ct=e=>e,t):(Lt=new FinalizationRegistry(e=>{Ee(e.$$)}),Ct=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Lt.register(e,a,e)}return e},Pe=e=>Lt.unregister(e),Ct(t))};function fn(){if(this.$$.ptr||zt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=Ct(Object.create(Object.getPrototypeOf(this),{$$:{value:tn(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t}function ln(){this.$$.ptr||zt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&_("Object already scheduled for deletion"),Pe(this),Ee(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function dn(){return!this.$$.ptr}function hn(){return this.$$.ptr||zt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&_("Object already scheduled for deletion"),wt.push(this),wt.length===1&&$t&&$t(Yt),this.$$.deleteScheduled=!0,this}function pn(){at.prototype.isAliasOf=Kr,at.prototype.clone=fn,at.prototype.delete=ln,at.prototype.isDeleted=dn,at.prototype.deleteLater=hn}function at(){}var yn=48,vn=57;function Se(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 xe(t,e){return t=Se(t),{[t]:function(){return e.apply(this,arguments)}}[t]}function Fe(t,e,r){if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||_(`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}}function Oe(t,e,r){u.hasOwnProperty(t)?((r===void 0||u[t].overloadTable!==void 0&&u[t].overloadTable[r]!==void 0)&&_(`Cannot register public name '${t}' twice`),Fe(u,t,t),u.hasOwnProperty(r)&&_(`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 mn(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=[]}function Nt(t,e,r){for(;e!==r;)e.upcast||_(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t}function gn(t,e){if(e===null)return this.isReference&&_(`null is not a valid ${this.name}`),0;e.$$||_(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||_(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Nt(e.$$.ptr,r,this.registeredClass);return n}function wn(t,e){var r;if(e===null)return this.isReference&&_(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;e.$$||_(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||_(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&_(`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=Nt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&_("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:_(`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,ot.toHandle(function(){a.delete()})),t!==null&&t.push(this.rawDestructor,r)}break;default:_("Unsupporting sharing policy")}return r}function $n(t,e){if(e===null)return this.isReference&&_(`null is not a valid ${this.name}`),0;e.$$||_(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||_(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&_(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Nt(e.$$.ptr,r,this.registeredClass);return n}function bn(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function Cn(t){this.rawDestructor&&this.rawDestructor(t)}function _n(t){t!==null&&t.delete()}function Tn(){et.prototype.getPointee=bn,et.prototype.destructor=Cn,et.prototype.argPackAdvance=8,et.prototype.readValueFromPointer=gt,et.prototype.deleteObject=_n,et.prototype.fromWireType=cn}function et(t,e,r,n,a,o,i,s,f,l,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=f,this.rawShare=l,this.rawDestructor=h,!a&&e.baseClass===void 0?n?(this.toWireType=gn,this.destructorFunction=null):(this.toWireType=$n,this.destructorFunction=null):this.toWireType=wn}function Me(t,e,r){u.hasOwnProperty(t)||Mt("Replacing nonexistant public symbol"),u[t].overloadTable!==void 0&&r!==void 0?u[t].overloadTable[r]=e:(u[t]=e,u[t].argCount=r)}var Pn=(t,e,r)=>{var n=u["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},Rt=[],T=t=>{var e=Rt[t];return e||(t>=Rt.length&&(Rt.length=t+1),Rt[t]=e=ye.get(t)),e},En=(t,e,r)=>{if(t.includes("j"))return Pn(t,e,r);var n=T(e).apply(null,r);return n},An=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),En(t,e,r)}};function X(t,e){t=k(t);function r(){return t.includes("j")?An(t,e):T(e)}var n=r();return typeof n!="function"&&_(`unknown function pointer with signature ${t}: ${e}`),n}function Dn(t,e){var r=xe(e,function(n){this.name=e,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+` | ||
`+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}var je=void 0;function Re(t){var e=Ge(t),r=k(e);return rt(e),r}function It(t,e){var r=[],n={};function a(o){if(!n[o]&&!ut[o]){if(Ot[o]){Ot[o].forEach(a);return}r.push(o),n[o]=!0}}throw e.forEach(a),new je(`${t}: `+r.map(Re).join([", "]))}function Sn(t,e,r,n,a,o,i,s,f,l,h,y,m){h=k(h),o=X(a,o),s&&(s=X(i,s)),l&&(l=X(f,l)),m=X(y,m);var C=Se(h);Oe(C,function(){It(`Cannot construct ${h} due to unbound types`,[n])}),ct([t,e,r],n?[n]:[],function(A){A=A[0];var W,D;n?(W=A.registeredClass,D=W.instancePrototype):D=at.prototype;var H=xe(C,function(){if(Object.getPrototypeOf(this)!==d)throw new pt("Use 'new' to construct "+h);if(p.constructor_body===void 0)throw new pt(h+" has no accessible constructor");var kt=p.constructor_body[arguments.length];if(kt===void 0)throw new pt(`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(D,{constructor:{value:H}});H.prototype=d;var p=new mn(h,H,d,m,W,o,s,l);p.baseClass&&(p.baseClass.__derivedClasses===void 0&&(p.baseClass.__derivedClasses=[]),p.baseClass.__derivedClasses.push(p));var S=new et(h,p,!0,!1,!1),O=new et(h+"*",p,!1,!1,!1),ft=new et(h+" const*",p,!1,!0,!1);return De[t]={pointerType:O,constPointerType:ft},Me(C,H),[S,O,ft]})}function Gt(t,e){for(var r=[],n=0;n<t;n++)r.push(x[e+n*4>>2]);return r}function Xt(t,e,r,n,a,o){var i=e.length;i<2&&_("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=e[1]!==null&&r!==null,f=!1,l=1;l<e.length;++l)if(e[l]!==null&&e[l].destructorFunction===void 0){f=!0;break}var h=e[0].name!=="void",y=i-2,m=new Array(y),C=[],A=[];return function(){arguments.length!==y&&_(`function ${t} called with ${arguments.length} arguments, expected ${y} args!`),A.length=0;var W;C.length=s?2:1,C[0]=a,s&&(W=e[1].toWireType(A,this),C[1]=W);for(var D=0;D<y;++D)m[D]=e[D+2].toWireType(A,arguments[D]),C.push(m[D]);var H=n.apply(null,C);function d(p){if(f)Ce(A);else for(var S=s?1:2;S<e.length;S++){var O=S===1?W:m[S-2];e[S].destructorFunction!==null&&e[S].destructorFunction(O)}if(h)return e[0].fromWireType(p)}return d(H)}}function xn(t,e,r,n,a,o){var i=Gt(e,r);a=X(n,a),ct([],[t],function(s){s=s[0];var f=`constructor ${s.name}`;if(s.registeredClass.constructor_body===void 0&&(s.registeredClass.constructor_body=[]),s.registeredClass.constructor_body[e-1]!==void 0)throw new pt(`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]=()=>{It(`Cannot construct ${s.name} due to unbound types`,i)},ct([],i,function(l){return l.splice(1,0,null),s.registeredClass.constructor_body[e-1]=Xt(f,l,null,a,o),[]}),[]})}function Fn(t,e,r,n,a,o,i,s,f){var l=Gt(r,n);e=k(e),o=X(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 m(){It(`Cannot call ${y} due to unbound types`,l)}var C=h.registeredClass.instancePrototype,A=C[e];return A===void 0||A.overloadTable===void 0&&A.className!==h.name&&A.argCount===r-2?(m.argCount=r-2,m.className=h.name,C[e]=m):(Fe(C,e,y),C[e].overloadTable[r-2]=m),ct([],l,function(W){var D=Xt(y,W,h,o,i);return C[e].overloadTable===void 0?(D.argCount=r-2,C[e]=D):C[e].overloadTable[r-2]=D,[]}),[]})}function On(){Object.assign(Ie.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 Ie(){this.allocated=[void 0],this.freelist=[]}var N=new Ie;function We(t){t>=N.reserved&&--N.get(t).refcount===0&&N.free(t)}function Mn(){for(var t=0,e=N.reserved;e<N.allocated.length;++e)N.allocated[e]!==void 0&&++t;return t}function jn(){N.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),N.reserved=N.allocated.length,u.count_emval_handles=Mn}var ot={toValue:t=>(t||_("Cannot use deleted val. handle = "+t),N.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 N.allocate({refcount:1,value:t})}}};function Rn(t,e){e=k(e),tt(t,{name:e,fromWireType:function(r){var n=ot.toValue(r);return We(r),n},toWireType:function(r,n){return ot.toHandle(n)},argPackAdvance:8,readValueFromPointer:gt,destructorFunction:null})}function qt(t){if(t===null)return"null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t}function In(t,e){switch(e){case 2:return function(r){return this.fromWireType(de[r>>2])};case 3:return function(r){return this.fromWireType(he[r>>3])};default:throw new TypeError("Unknown float type: "+t)}}function Wn(t,e,r){var n=Vt(r);e=k(e),tt(t,{name:e,fromWireType:function(a){return a},toWireType:function(a,o){return o},argPackAdvance:8,readValueFromPointer:In(e,n),destructorFunction:null})}function Hn(t,e,r,n,a,o,i){var s=Gt(e,r);t=k(t),a=X(n,a),Oe(t,function(){It(`Cannot call ${t} due to unbound types`,s)},e-1),ct([],s,function(f){var l=[f[0],null].concat(f.slice(1));return Me(t,Xt(t,l,null,a,o),e-1),[]})}function kn(t,e,r){switch(e){case 0:return r?function(n){return Q[n]}:function(n){return V[n]};case 1:return r?function(n){return dt[n>>1]}:function(n){return Et[n>>1]};case 2:return r?function(n){return I[n>>2]}:function(n){return x[n>>2]};default:throw new TypeError("Unknown integer type: "+t)}}function Bn(t,e,r,n,a){e=k(e);var o=Vt(r),i=y=>y;if(n===0){var s=32-8*r;i=y=>y<<s>>>s}var f=e.includes("unsigned"),l=(y,m)=>{},h;f?h=function(y,m){return l(m,this.name),m>>>0}:h=function(y,m){return l(m,this.name),m},tt(t,{name:e,fromWireType:i,toWireType:h,argPackAdvance:8,readValueFromPointer:kn(e,o,n!==0),destructorFunction:null})}function Un(t,e,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function o(i){i=i>>2;var s=x,f=s[i],l=s[i+1];return new a(s.buffer,l,f)}r=k(r),tt(t,{name:r,fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})}var He=(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 f=t.charCodeAt(++i);s=65536+((s&1023)<<10)|f&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},Vn=(t,e,r)=>He(t,V,e,r),ke=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},Be=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,zn=(t,e,r)=>{for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&Be)return Be.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 f=t[e++]&63;if((i&240)==224?i=(i&15)<<12|s<<6|f:i=(i&7)<<18|s<<12|f<<6|t[e++]&63,i<65536)o+=String.fromCharCode(i);else{var l=i-65536;o+=String.fromCharCode(55296|l>>10,56320|l&1023)}}return o},Jt=(t,e)=>t?zn(V,t,e):"";function Ln(t,e){e=k(e);var r=e==="std::string";tt(t,{name:e,fromWireType:function(n){var a=x[n>>2],o=n+4,i;if(r)for(var s=o,f=0;f<=a;++f){var l=o+f;if(f==a||V[l]==0){var h=l-s,y=Jt(s,h);i===void 0?i=y:(i+=String.fromCharCode(0),i+=y),s=l+1}}else{for(var m=new Array(a),f=0;f<a;++f)m[f]=String.fromCharCode(V[o+f]);i=m.join("")}return rt(n),i},toWireType:function(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||_("Cannot pass non-string to std::string"),r&&i?o=ke(a):o=a.length;var s=Qt(4+o+1),f=s+4;if(x[s>>2]=o,r&&i)Vn(a,f,o+1);else if(i)for(var l=0;l<o;++l){var h=a.charCodeAt(l);h>255&&(rt(f),_("String has UTF-16 code units that do not fit in 8 bits")),V[f+l]=h}else for(var l=0;l<o;++l)V[f+l]=a[l];return n!==null&&n.push(rt,s),s},argPackAdvance:8,readValueFromPointer:gt,destructorFunction:function(n){rt(n)}})}var Ue=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Yn=(t,e)=>{for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&Et[n];)++n;if(r=n<<1,r-t>32&&Ue)return Ue.decode(V.subarray(t,r));for(var o="",i=0;!(i>=e/2);++i){var s=dt[t+i*2>>1];if(s==0)break;o+=String.fromCharCode(s)}return o},Nn=(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);dt[e>>1]=i,e+=2}return dt[e>>1]=0,e-n},Gn=t=>t.length*2,Xn=(t,e)=>{for(var r=0,n="";!(r>=e/4);){var a=I[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},qn=(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(I[e>>2]=i,e+=4,e+4>a)break}return I[e>>2]=0,e-n},Jn=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},Zn=function(t,e,r){r=k(r);var n,a,o,i,s;e===2?(n=Yn,a=Nn,i=Gn,o=()=>Et,s=1):e===4&&(n=Xn,a=qn,i=Jn,o=()=>x,s=2),tt(t,{name:r,fromWireType:function(f){for(var l=x[f>>2],h=o(),y,m=f+4,C=0;C<=l;++C){var A=f+4+C*e;if(C==l||h[A>>s]==0){var W=A-m,D=n(m,W);y===void 0?y=D:(y+=String.fromCharCode(0),y+=D),m=A+e}}return rt(f),y},toWireType:function(f,l){typeof l!="string"&&_(`Cannot pass non-string to C++ string type ${r}`);var h=i(l),y=Qt(4+h+e);return x[y>>2]=h>>s,a(l,y+4,h+e),f!==null&&f.push(rt,y),y},argPackAdvance:8,readValueFromPointer:gt,destructorFunction:function(f){rt(f)}})};function Qn(t,e,r,n,a,o){Ft[t]={name:k(e),rawConstructor:X(r,n),rawDestructor:X(a,o),fields:[]}}function Kn(t,e,r,n,a,o,i,s,f,l){Ft[t].fields.push({fieldName:k(e),getterReturnType:r,getter:X(n,a),getterContext:o,setterArgumentType:i,setter:X(s,f),setterContext:l})}function ta(t,e){e=k(e),tt(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:function(){},toWireType:function(r,n){}})}var ea={};function ra(t){var e=ea[t];return e===void 0?k(t):e}function Ve(){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.")}function na(t){return t===0?ot.toHandle(Ve()):(t=ra(t),ot.toHandle(Ve()[t]))}function aa(t){t>4&&(N.get(t).refcount+=1)}function ze(t,e){var r=ut[t];return r===void 0&&_(e+" has unknown type "+Re(t)),r}function oa(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(x[n+o*4>>2],"parameter "+o);e[o+1]=i.readValueFromPointer(a),a+=i.argPackAdvance}var s=new(r.bind.apply(r,e));return ot.toHandle(s)}}var Le={};function ia(t,e,r,n){t=ot.toValue(t);var a=Le[e];return a||(a=oa(e),Le[e]=a),a(t,r,n)}function sa(t,e){t=ze(t,"_emval_take_value");var r=t.readValueFromPointer(e);return ot.toHandle(r)}var ua=()=>{At("")},ca=(t,e,r)=>V.copyWithin(t,e,e+r),fa=()=>2147483648,la=t=>{var e=Z.buffer,r=t-e.byteLength+65535>>>16;try{return Z.grow(r),pe(),1}catch{}},da=t=>{var e=V.length;t>>>=0;var r=fa();if(t>r)return!1;for(var n=(f,l)=>f+(l-f%l)%l,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=la(i);if(s)return!0}return!1},Zt={},ha=()=>j||"./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,_:ha()};for(var r in Zt)Zt[r]===void 0?delete e[r]:e[r]=Zt[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);_t.strings=n}return _t.strings},pa=(t,e)=>{for(var r=0;r<t.length;++r)Q[e++>>0]=t.charCodeAt(r);Q[e>>0]=0},ya=(t,e)=>{var r=0;return _t().forEach(function(n,a){var o=e+r;x[t+a*4>>2]=o,pa(n,o),r+=n.length+1}),0},va=(t,e)=>{var r=_t();x[t>>2]=r.length;var n=0;return r.forEach(function(a){n+=a.length+1}),x[e>>2]=n,0};function ma(t){return t}var Wt=t=>t%4===0&&(t%100!==0||t%400===0),ga=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},Ye=[31,29,31,30,31,30,31,31,30,31,30,31],Ne=[31,28,31,30,31,30,31,31,30,31,30,31],wa=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=Wt(r.getFullYear()),a=r.getMonth(),o=(n?Ye:Ne)[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 $a(t,e,r){var n=r>0?r:ke(t)+1,a=new Array(n),o=He(t,a,0,a.length);return e&&(a.length=o),a}var ba=(t,e)=>{Q.set(t,e)},Ca=(t,e,r,n)=>{var a=I[n+40>>2],o={tm_sec:I[n>>2],tm_min:I[n+4>>2],tm_hour:I[n+8>>2],tm_mday:I[n+12>>2],tm_mon:I[n+16>>2],tm_year:I[n+20>>2],tm_wday:I[n+24>>2],tm_yday:I[n+28>>2],tm_isdst:I[n+32>>2],tm_gmtoff:I[n+36>>2],tm_zone:a?Jt(a):""},i=Jt(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 f in s)i=i.replace(new RegExp(f,"g"),s[f]);var l=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h=["January","February","March","April","May","June","July","August","September","October","November","December"];function y(d,p,S){for(var O=typeof d=="number"?d.toString():d||"";O.length<p;)O=S[0]+O;return O}function m(d,p){return y(d,p,"0")}function C(d,p){function S(ft){return ft<0?-1:ft>0?1:0}var O;return(O=S(d.getFullYear()-p.getFullYear()))===0&&(O=S(d.getMonth()-p.getMonth()))===0&&(O=S(d.getDate()-p.getDate())),O}function A(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 W(d){var p=wa(new Date(d.tm_year+1900,0,1),d.tm_yday),S=new Date(p.getFullYear(),0,4),O=new Date(p.getFullYear()+1,0,4),ft=A(S),kt=A(O);return C(ft,p)<=0?C(kt,p)<=0?p.getFullYear()+1:p.getFullYear():p.getFullYear()-1}var D={"%a":d=>l[d.tm_wday].substring(0,3),"%A":d=>l[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 m(p/100|0,2)},"%d":d=>m(d.tm_mday,2),"%e":d=>y(d.tm_mday,2," "),"%g":d=>W(d).toString().substring(2),"%G":d=>W(d),"%H":d=>m(d.tm_hour,2),"%I":d=>{var p=d.tm_hour;return p==0?p=12:p>12&&(p-=12),m(p,2)},"%j":d=>m(d.tm_mday+ga(Wt(d.tm_year+1900)?Ye:Ne,d.tm_mon-1),3),"%m":d=>m(d.tm_mon+1,2),"%M":d=>m(d.tm_min,2),"%n":()=>` | ||
`,"%p":d=>d.tm_hour>=0&&d.tm_hour<12?"AM":"PM","%S":d=>m(d.tm_sec,2),"%t":()=>" ","%u":d=>d.tm_wday||7,"%U":d=>{var p=d.tm_yday+7-d.tm_wday;return m(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 S=(d.tm_wday+371-d.tm_yday)%7;S!=4&&(S!=3||!Wt(d.tm_year))&&(p=1)}}else{p=52;var O=(d.tm_wday+7-d.tm_yday-1)%7;(O==4||O==5&&Wt(d.tm_year%400-1))&&p++}return m(p,2)},"%w":d=>d.tm_wday,"%W":d=>{var p=d.tm_yday+7-(d.tm_wday+6)%7;return m(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,S=p>=0;return p=Math.abs(p)/60,p=p/60*100+p%60,(S?"+":"-")+("0000"+p).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};i=i.replace(/%%/g,"\0\0");for(var f in D)i.includes(f)&&(i=i.replace(new RegExp(f,"g"),D[f](o)));i=i.replace(/\0\0/g,"%");var H=$a(i,!1);return H.length>e?0:(ba(H,t),H.length-1)},_a=(t,e,r,n,a)=>Ca(t,e,r,n);_e=u.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},Jr(),pt=u.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},pn(),on(),Tn(),je=u.UnboundTypeError=Dn(Error,"UnboundTypeError"),On(),jn();var Ta={q:Hr,u:kr,a:Ur,h:Vr,l:zr,I:Lr,P:Yr,n:Nr,ba:Gr,d:Br,oa:Xr,Y:qr,fa:Qr,na:Sn,ma:xn,D:Fn,ea:Rn,W:Wn,J:Hn,w:Bn,s:Un,V:Ln,L:Zn,Q:Qn,pa:Kn,ga:ta,U:We,la:na,R:aa,ia,ka:sa,K:ua,da:ca,ca:da,$:ya,aa:va,H:za,T:Qa,B:Ya,p:Ba,b:Pa,C:Va,ha:Ga,c:xa,j:Oa,i:Da,x:La,O:Ua,v:Ha,G:qa,N:Ja,A:Na,F:Ka,Z:eo,X:ro,k:Fa,f:Sa,e:Aa,g:Ea,M:Za,m:Wa,o:Ma,S:ja,t:Ia,ja:ka,y:Xa,r:Ra,E:to,z:ma,_:_a};Wr();var rt=u._free=t=>(rt=u._free=E.sa)(t),Qt=u._malloc=t=>(Qt=u._malloc=E.ta)(t),Ge=t=>(Ge=E.va)(t);u.__embind_initialize_bindings=()=>(u.__embind_initialize_bindings=E.wa)();var g=(t,e)=>(g=E.xa)(t,e),Tt=t=>(Tt=E.ya)(t),$=()=>($=E.za)(),b=t=>(b=E.Aa)(t),Xe=t=>(Xe=E.Ba)(t),qe=t=>(qe=E.Ca)(t),Je=(t,e,r)=>(Je=E.Da)(t,e,r),Ze=t=>(Ze=E.Ea)(t);u.dynCall_viijii=(t,e,r,n,a,o,i)=>(u.dynCall_viijii=E.Fa)(t,e,r,n,a,o,i);var Qe=u.dynCall_jiii=(t,e,r,n)=>(Qe=u.dynCall_jiii=E.Ga)(t,e,r,n),Ke=u.dynCall_jiiii=(t,e,r,n,a)=>(Ke=u.dynCall_jiiii=E.Ha)(t,e,r,n,a);u.dynCall_iiiiij=(t,e,r,n,a,o,i)=>(u.dynCall_iiiiij=E.Ia)(t,e,r,n,a,o,i),u.dynCall_iiiiijj=(t,e,r,n,a,o,i,s,f)=>(u.dynCall_iiiiijj=E.Ja)(t,e,r,n,a,o,i,s,f),u.dynCall_iiiiiijj=(t,e,r,n,a,o,i,s,f,l)=>(u.dynCall_iiiiiijj=E.Ka)(t,e,r,n,a,o,i,s,f,l);function Pa(t,e){var r=$();try{return T(t)(e)}catch(n){if(b(r),n!==n+0)throw n;g(1,0)}}function Ea(t,e,r,n){var a=$();try{T(t)(e,r,n)}catch(o){if(b(a),o!==o+0)throw o;g(1,0)}}function Aa(t,e,r){var n=$();try{T(t)(e,r)}catch(a){if(b(n),a!==a+0)throw a;g(1,0)}}function Da(t,e,r,n,a){var o=$();try{return T(t)(e,r,n,a)}catch(i){if(b(o),i!==i+0)throw i;g(1,0)}}function Sa(t,e){var r=$();try{T(t)(e)}catch(n){if(b(r),n!==n+0)throw n;g(1,0)}}function xa(t,e,r){var n=$();try{return T(t)(e,r)}catch(a){if(b(n),a!==a+0)throw a;g(1,0)}}function Fa(t){var e=$();try{T(t)()}catch(r){if(b(e),r!==r+0)throw r;g(1,0)}}function Oa(t,e,r,n){var a=$();try{return T(t)(e,r,n)}catch(o){if(b(a),o!==o+0)throw o;g(1,0)}}function Ma(t,e,r,n,a,o){var i=$();try{T(t)(e,r,n,a,o)}catch(s){if(b(i),s!==s+0)throw s;g(1,0)}}function ja(t,e,r,n,a,o,i){var s=$();try{T(t)(e,r,n,a,o,i)}catch(f){if(b(s),f!==f+0)throw f;g(1,0)}}function Ra(t,e,r,n,a,o,i,s,f,l,h){var y=$();try{T(t)(e,r,n,a,o,i,s,f,l,h)}catch(m){if(b(y),m!==m+0)throw m;g(1,0)}}function Ia(t,e,r,n,a,o,i,s){var f=$();try{T(t)(e,r,n,a,o,i,s)}catch(l){if(b(f),l!==l+0)throw l;g(1,0)}}function Wa(t,e,r,n,a){var o=$();try{T(t)(e,r,n,a)}catch(i){if(b(o),i!==i+0)throw i;g(1,0)}}function Ha(t,e,r,n,a,o,i){var s=$();try{return T(t)(e,r,n,a,o,i)}catch(f){if(b(s),f!==f+0)throw f;g(1,0)}}function ka(t,e,r,n,a,o,i,s,f){var l=$();try{T(t)(e,r,n,a,o,i,s,f)}catch(h){if(b(l),h!==h+0)throw h;g(1,0)}}function Ba(t){var e=$();try{return T(t)()}catch(r){if(b(e),r!==r+0)throw r;g(1,0)}}function Ua(t,e,r,n,a,o,i){var s=$();try{return T(t)(e,r,n,a,o,i)}catch(f){if(b(s),f!==f+0)throw f;g(1,0)}}function Va(t,e,r,n){var a=$();try{return T(t)(e,r,n)}catch(o){if(b(a),o!==o+0)throw o;g(1,0)}}function za(t,e,r,n){var a=$();try{return T(t)(e,r,n)}catch(o){if(b(a),o!==o+0)throw o;g(1,0)}}function La(t,e,r,n,a,o){var i=$();try{return T(t)(e,r,n,a,o)}catch(s){if(b(i),s!==s+0)throw s;g(1,0)}}function Ya(t,e,r,n,a,o){var i=$();try{return T(t)(e,r,n,a,o)}catch(s){if(b(i),s!==s+0)throw s;g(1,0)}}function Na(t,e,r,n,a,o,i,s,f,l){var h=$();try{return T(t)(e,r,n,a,o,i,s,f,l)}catch(y){if(b(h),y!==y+0)throw y;g(1,0)}}function Ga(t,e,r){var n=$();try{return T(t)(e,r)}catch(a){if(b(n),a!==a+0)throw a;g(1,0)}}function Xa(t,e,r,n,a,o,i,s,f,l){var h=$();try{T(t)(e,r,n,a,o,i,s,f,l)}catch(y){if(b(h),y!==y+0)throw y;g(1,0)}}function qa(t,e,r,n,a,o,i,s){var f=$();try{return T(t)(e,r,n,a,o,i,s)}catch(l){if(b(f),l!==l+0)throw l;g(1,0)}}function Ja(t,e,r,n,a,o,i,s,f){var l=$();try{return T(t)(e,r,n,a,o,i,s,f)}catch(h){if(b(l),h!==h+0)throw h;g(1,0)}}function Za(t,e,r,n,a,o,i){var s=$();try{T(t)(e,r,n,a,o,i)}catch(f){if(b(s),f!==f+0)throw f;g(1,0)}}function Qa(t,e,r,n){var a=$();try{return T(t)(e,r,n)}catch(o){if(b(a),o!==o+0)throw o;g(1,0)}}function Ka(t,e,r,n,a,o,i,s,f,l,h,y){var m=$();try{return T(t)(e,r,n,a,o,i,s,f,l,h,y)}catch(C){if(b(m),C!==C+0)throw C;g(1,0)}}function to(t,e,r,n,a,o,i,s,f,l,h,y,m,C,A,W){var D=$();try{T(t)(e,r,n,a,o,i,s,f,l,h,y,m,C,A,W)}catch(H){if(b(D),H!==H+0)throw H;g(1,0)}}function eo(t,e,r,n){var a=$();try{return Qe(t,e,r,n)}catch(o){if(b(a),o!==o+0)throw o;g(1,0)}}function ro(t,e,r,n,a){var o=$();try{return Ke(t,e,r,n,a)}catch(i){if(b(o),i!==i+0)throw i;g(1,0)}}var Ht;mt=function t(){Ht||tr(),Ht||(mt=t)};function tr(){if(it>0||(Er(),it>0))return;function t(){Ht||(Ht=!0,u.calledRun=!0,!Pt&&(Ar(),w(u),u.onRuntimeInitialized&&u.onRuntimeInitialized(),Dr()))}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 tr(),v.ready}})();function _r(c){return ie(ce,c)}async function Tr(c,{tryHarder:v=nt.tryHarder,formats:u=nt.formats,maxSymbols:w=nt.maxSymbols}=nt){return $r(c,{tryHarder:v,formats:u,maxSymbols:w},ce)}const fe=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 Pr(c){for(const[v,u]of fe)if(c===u)return v;return"unknown"}class le{constructor(v={}){nr(this,vt,void 0);var u;try{const w=(u=v==null?void 0:v.formats)==null?void 0:u.filter(P=>P!=="unknown");if((w==null?void 0:w.length)===0)throw new TypeError("Hint option provided, but is empty.");w==null||w.forEach(P=>{if(!B.includes(P))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${P}' is not a valid enum value of type BarcodeFormat.`)}),_r().catch(()=>{}),ar(this,vt,w??[])}catch(w){throw ae(w,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return B.filter(v=>v!=="unknown")}async detect(v){try{const u=await lr(v);if(u===null)return[];let w;try{w=await Tr(u,{tryHarder:!0,formats:rr(this,vt).map(P=>fe.get(P))})}catch{throw new DOMException("Barcode detection service unavailable. Use 'setZXingModuleOverrides' in offline or strict CSP environments.","NotSupportedError")}return w.map(P=>{const{topLeft:{x:F,y:j},topRight:{x:q,y:U},bottomLeft:{x:R,y:G},bottomRight:{x:J,y:L}}=P.position,Y=Math.min(F,q,R,J),Z=Math.min(j,U,G,L),E=Math.max(F,q,R,J),Pt=Math.max(j,U,G,L);return{boundingBox:new DOMRectReadOnly(Y,Z,E-Y,Pt-Z),rawValue:new TextDecoder().decode(P.bytes),format:Pr(P.format),cornerPoints:[{x:F,y:j},{x:q,y:U},{x:J,y:L},{x:R,y:G}]}})}catch(u){throw ae(u,"Failed to execute 'detect' on 'BarcodeDetector'")}}}return vt=new WeakMap,globalThis.BarcodeDetector??(globalThis.BarcodeDetector=le),M.BarcodeDetector=le,M.setZXingModuleOverrides=wr,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"}),M}({}); |
@@ -1,3 +0,3 @@ | ||
var tr=(M,B,z)=>{if(!B.has(M))throw TypeError("Cannot "+z)};var er=(M,B,z)=>(tr(M,B,"read from private field"),z?z.call(M):B.get(M)),rr=(M,B,z)=>{if(B.has(M))throw TypeError("Cannot add the same private member more than once");B instanceof WeakSet?B.add(M):B.set(M,z)},nr=(M,B,z,yt)=>(tr(M,B,"write to private field"),yt?yt.call(M,z):B.set(M,z),z);var BarcodeDetectionAPI=function(M){var vt;"use strict";const B=["aztec","code_128","code_39","code_93","codabar","data_matrix","ean_13","ean_8","itf","pdf417","qr_code","upc_a","upc_e","unknown"];function z(c){if(yt(c))return{width:c.naturalWidth,height:c.naturalHeight};if(Kt(c))return{width:c.width.baseVal.value,height:c.height.baseVal.value};if(te(c))return{width:c.videoWidth,height:c.videoHeight};if(ar(c))return{width:c.width,height:c.height};if(ee(c))return{width:c.width,height:c.height};if(or(c))return{width:c.width,height:c.height};if(re(c))return{width:c.displayWidth,height:c.displayHeight};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 yt(c){try{return c instanceof HTMLImageElement}catch{return!1}}function Kt(c){try{return c instanceof SVGImageElement}catch{return!1}}function te(c){try{return c instanceof HTMLVideoElement}catch{return!1}}function ar(c){try{return c instanceof HTMLCanvasElement}catch{return!1}}function ee(c){try{return c instanceof ImageBitmap}catch{return!1}}function or(c){try{return c instanceof OffscreenCanvas}catch{return!1}}function re(c){try{return c instanceof VideoFrame}catch{return!1}}function ir(c){try{return c instanceof Blob}catch{return!1}}function sr(c){try{return c instanceof ImageData}catch{return!1}}function ur(c,v){try{const u=new OffscreenCanvas(c,v);if(u.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return u;throw void 0}catch{const u=document.createElement("canvas");return u.width=c,u.height=v,u}}async function ne(c){if(yt(c)&&!await lr(c))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(Kt(c)&&!await dr(c))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(re(c)&&hr(c))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(te(c)&&(c.readyState===0||c.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(ee(c)&&yr(c))throw new DOMException("The image source is detached.","InvalidStateError");const{width:v,height:u}=z(c);if(v===0||u===0)return null;const P=ur(v,u).getContext("2d");P.drawImage(c,0,0);try{return P.getImageData(0,0,v,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function cr(c){let v;try{v=await createImageBitmap(c)}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await ne(v)}async function fr(c){if(ir(c))return await cr(c);if(sr(c)){if(pr(c))throw new DOMException("The image data has been detached.","InvalidStateError");return c}return await ne(c)}async function lr(c){try{return await c.decode(),!0}catch{return!1}}async function dr(c){var v;try{return await((v=c.decode)==null?void 0:v.call(c)),!0}catch{return!1}}function hr(c){return c.format===null}function pr(c){return c.data.buffer.byteLength===0}function yr(c){return c.width===0&&c.height===0}function ae(c,v){return c instanceof DOMException?new DOMException(`${v}: ${c.message}`,c.name):c instanceof Error?new c.constructor(`${v}: ${c.message}`):new Error(`${v}: ${c}`)}const oe=c=>{let v;const u=new Set,w=(j,q)=>{const U=typeof j=="function"?j(v):j;if(!Object.is(U,v)){const R=v;v=q??typeof U!="object"?U:Object.assign({},v,U),u.forEach(G=>G(v,R))}},P=()=>v,F={setState:w,getState:P,subscribe:j=>(u.add(j),()=>u.delete(j)),destroy:()=>{u.clear()}};return v=c(w,P,F),F},vr=c=>c?oe(c):oe,mr={locateFile:(c,v)=>{var u;const w=(u=c.match(new RegExp("(?<=_).+?(?=\\.wasm$)")))==null?void 0:u[0];return w?`https://cdn.jsdelivr.net/npm/@sec-ant/zxing-wasm@2.1.2/dist/${w}/${c}`:v+c}},lt=vr()(()=>({zxingModuleWeakMap:new WeakMap,zxingModuleOverrides:mr}));function gr(c){lt.setState({zxingModuleOverrides:c})}function ie(c,v=lt.getState().zxingModuleOverrides){const{zxingModuleWeakMap:u}=lt.getState(),w=u.get(c);if(w&&Object.is(v,lt.getState().zxingModuleOverrides))return w;{lt.setState({zxingModuleOverrides:v});const P=c(v);return u.set(c,P),P}}const se=["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"],nt={tryHarder:!0,formats:[],maxSymbols:255};async function wr(c,{tryHarder:v=nt.tryHarder,formats:u=nt.formats,maxSymbols:w=nt.maxSymbols}=nt,P){const F=await ie(P,lt.getState().zxingModuleOverrides),{data:j,width:q,height:U,data:{byteLength:R}}=c,G=F._malloc(R);F.HEAP8.set(j,G);const J=F.readBarcodesFromPixmap(G,q,U,v,$r(u),w);F._free(G);const L=[];for(let Y=0;Y<J.size();++Y){const Z=J.get(Y);L.push({...Z,format:br(Z.format)})}return L}function $r(c){return c.join("|")}function br(c){const v=ue(c);let u=0,w=se.length-1;for(;u<=w;){const P=Math.floor((u+w)/2),F=se[P],j=ue(F);if(j===v)return F;j<v?u=P+1:w=P-1}return"None"}function ue(c){return c.toLowerCase().replace(/_-\[\]/g,"")}var ce=(()=>{var c=document.currentScript&&document.currentScript.src||new URL("pure.js",document.baseURI).href;return function(v={}){var u=v,w,P;u.ready=new Promise((t,e)=>{w=t,P=e});var F=Object.assign({},u),j="./this.program",q=typeof window=="object",U=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var R="";function G(t){return u.locateFile?u.locateFile(t,R):R+t}var J;(q||U)&&(U?R=self.location.href:typeof document<"u"&&document.currentScript&&(R=document.currentScript.src),c&&(R=c),R.indexOf("blob:")!==0?R=R.substr(0,R.replace(/[?#].*/,"").lastIndexOf("/")+1):R="",U&&(J=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,F),F=null,u.arguments&&u.arguments,u.thisProgram&&(j=u.thisProgram),u.quit&&u.quit;var Y;u.wasmBinary&&(Y=u.wasmBinary),u.noExitRuntime,typeof WebAssembly!="object"&&At("no native wasm support detected");var Z,E,Pt=!1,Q,V,dt,Et,I,x,le,de;function he(){var t=Z.buffer;u.HEAP8=Q=new Int8Array(t),u.HEAP16=dt=new Int16Array(t),u.HEAP32=I=new Int32Array(t),u.HEAPU8=V=new Uint8Array(t),u.HEAPU16=Et=new Uint16Array(t),u.HEAPU32=x=new Uint32Array(t),u.HEAPF32=le=new Float32Array(t),u.HEAPF64=de=new Float64Array(t)}var pe,ye=[],ve=[],me=[];function Er(){if(u.preRun)for(typeof u.preRun=="function"&&(u.preRun=[u.preRun]);u.preRun.length;)Sr(u.preRun.shift());Bt(ye)}function Ar(){Bt(ve)}function Dr(){if(u.postRun)for(typeof u.postRun=="function"&&(u.postRun=[u.postRun]);u.postRun.length;)Fr(u.postRun.shift());Bt(me)}function Sr(t){ye.unshift(t)}function xr(t){ve.unshift(t)}function Fr(t){me.unshift(t)}var it=0,mt=null;function Or(t){it++,u.monitorRunDependencies&&u.monitorRunDependencies(it)}function Mr(t){if(it--,u.monitorRunDependencies&&u.monitorRunDependencies(it),it==0&&mt){var e=mt;mt=null,e()}}function At(t){u.onAbort&&u.onAbort(t),t="Aborted("+t+")",L(t),Pt=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw P(e),e}var jr="data:application/octet-stream;base64,";function ge(t){return t.startsWith(jr)}var st;u.locateFile?(st="zxing_reader.wasm",ge(st)||(st=G(st))):st=new URL("/reader/zxing_reader.wasm",self.location).href;function we(t){if(t==st&&Y)return new Uint8Array(Y);if(J)return J(t);throw"both async and sync fetching of the wasm failed"}function Rr(t){return!Y&&(q||U)&&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(()=>we(t)):Promise.resolve().then(()=>we(t))}function $e(t,e,r){return Rr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{L("failed to asynchronously prepare wasm: "+n),At(n)})}function Ir(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!ge(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"),$e(e,r,n)})}):$e(e,r,n)}function Wr(){var t={a:Ta};function e(n,a){var o=n.exports;return E=o,Z=E.qa,he(),pe=E.ua,xr(E.ra),Mr(),o}Or();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),P(n)}return Ir(Y,st,t,r).catch(P),{}}var Bt=t=>{for(;t.length>0;)t.shift()(u)},Dt=[],St=0;function Hr(t){var e=new xt(t);return e.get_caught()||(e.set_caught(!0),St--),e.set_rethrown(!1),Dt.push(e),Xe(e.excPtr),e.get_exception_ptr()}var K=0;function kr(){g(0,0);var t=Dt.pop();Ge(t.excPtr),K=0}function xt(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(e){x[this.ptr+4>>2]=e},this.get_type=function(){return x[this.ptr+4>>2]},this.set_destructor=function(e){x[this.ptr+8>>2]=e},this.get_destructor=function(){return x[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,Q[this.ptr+12>>0]=e},this.get_caught=function(){return Q[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,Q[this.ptr+13>>0]=e},this.get_rethrown=function(){return Q[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){x[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return x[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=Je(this.get_type());if(e)return x[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}function Br(t){throw K||(K=t),K}var Ut=t=>{var e=K;if(!e)return Tt(0),0;var r=new xt(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(qe(o,n,i))return Tt(o),e}return Tt(n),e},Ur=()=>Ut([]),Vr=t=>Ut([t]),zr=(t,e)=>Ut([t,e]);function Lr(t){var e=new xt(t).get_exception_ptr();return e}function Yr(){var t=Dt.pop();t||At("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(Dt.push(t),t.set_rethrown(!0),t.set_caught(!1),St++),K=e,K}function Nr(t,e,r){var n=new xt(t);throw n.init(e,r),K=t,St++,K}function Gr(){return St}var Ft={};function be(t){for(;t.length;){var e=t.pop(),r=t.pop();r(e)}}function gt(t){return this.fromWireType(I[t>>2])}var ht={},ut={},Ot={},Ce=void 0;function Mt(t){throw new Ce(t)}function ct(t,e,r){t.forEach(function(s){Ot[s]=e});function n(s){var f=r(s);f.length!==t.length&&Mt("Mismatched type converter count");for(var l=0;l<t.length;++l)tt(t[l],f[l])}var a=new Array(e.length),o=[],i=0;e.forEach((s,f)=>{ut.hasOwnProperty(s)?a[f]=ut[s]:(o.push(s),ht.hasOwnProperty(s)||(ht[s]=[]),ht[s].push(()=>{a[f]=ut[s],++i,i===o.length&&n(a)}))}),o.length===0&&n(a)}var Xr=function(t){var e=Ft[t];delete Ft[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((f,l)=>{var h=f.fieldName,y=i[l],m=f.getter,C=f.getterContext,A=i[l+a.length],W=f.setter,D=f.setterContext;s[h]={read:H=>y.fromWireType(m(C,H)),write:(H,d)=>{var p=[];W(D,H,A.toWireType(p,d)),be(p)}}}),[{name:e.name,fromWireType:function(f){var l={};for(var h in s)l[h]=s[h].read(f);return n(f),l},toWireType:function(f,l){for(var h in s)if(!(h in l))throw new TypeError(`Missing field: "${h}"`);var y=r();for(h in s)s[h].write(y,l[h]);return f!==null&&f.push(n,y),y},argPackAdvance:8,readValueFromPointer:gt,destructorFunction:n}]})};function qr(t,e,r,n,a){}function Vt(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError(`Unknown type size: ${t}`)}}function Jr(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);_e=t}var _e=void 0;function k(t){for(var e="",r=t;V[r];)e+=_e[V[r++]];return e}var pt=void 0;function _(t){throw new pt(t)}function Zr(t,e,r={}){var n=e.name;if(t||_(`type "${n}" must have a positive integer typeid pointer`),ut.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;_(`Cannot register type '${n}' twice`)}if(ut[t]=e,delete Ot[t],ht.hasOwnProperty(t)){var a=ht[t];delete ht[t],a.forEach(o=>o())}}function tt(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Zr(t,e,r)}function Qr(t,e,r,n,a){var o=Vt(r);e=k(e),tt(t,{name:e,fromWireType:function(i){return!!i},toWireType:function(i,s){return s?n:a},argPackAdvance:8,readValueFromPointer:function(i){var s;if(r===1)s=Q;else if(r===2)s=dt;else if(r===4)s=I;else throw new TypeError("Unknown boolean type size: "+e);return this.fromWireType(s[i>>o])},destructorFunction:null})}function Kr(t){if(!(this instanceof at)||!(t instanceof at))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,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}function tn(t){return{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}}function zt(t){function e(r){return r.$$.ptrType.registeredClass.name}_(e(t)+" instance already deleted")}var Lt=!1;function Te(t){}function en(t){t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)}function Pe(t){t.count.value-=1;var e=t.count.value===0;e&&en(t)}function Ee(t,e,r){if(e===r)return t;if(r.baseClass===void 0)return null;var n=Ee(t,e,r.baseClass);return n===null?null:r.downcast(n)}var Ae={};function rn(){return Object.keys(bt).length}function nn(){var t=[];for(var e in bt)bt.hasOwnProperty(e)&&t.push(bt[e]);return t}var wt=[];function Yt(){for(;wt.length;){var t=wt.pop();t.$$.deleteScheduled=!1,t.delete()}}var $t=void 0;function an(t){$t=t,wt.length&&$t&&$t(Yt)}function on(){u.getInheritedInstanceCount=rn,u.getLiveInheritedInstances=nn,u.flushPendingDeletes=Yt,u.setDelayFunction=an}var bt={};function sn(t,e){for(e===void 0&&_("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}function un(t,e){return e=sn(t,e),bt[e]}function jt(t,e){(!e.ptrType||!e.ptr)&&Mt("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&Mt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Ct(Object.create(t,{$$:{value:e}}))}function cn(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=un(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?jt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):jt(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var o=this.registeredClass.getActualType(e),i=Ae[o];if(!i)return a.call(this);var s;this.isConst?s=i.constPointerType:s=i.pointerType;var f=Ee(e,this.registeredClass,s.registeredClass);return f===null?a.call(this):this.isSmartPointer?jt(s.registeredClass.instancePrototype,{ptrType:s,ptr:f,smartPtrType:this,smartPtr:t}):jt(s.registeredClass.instancePrototype,{ptrType:s,ptr:f})}var Ct=function(t){return typeof FinalizationRegistry>"u"?(Ct=e=>e,t):(Lt=new FinalizationRegistry(e=>{Pe(e.$$)}),Ct=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Lt.register(e,a,e)}return e},Te=e=>Lt.unregister(e),Ct(t))};function fn(){if(this.$$.ptr||zt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=Ct(Object.create(Object.getPrototypeOf(this),{$$:{value:tn(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t}function ln(){this.$$.ptr||zt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&_("Object already scheduled for deletion"),Te(this),Pe(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function dn(){return!this.$$.ptr}function hn(){return this.$$.ptr||zt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&_("Object already scheduled for deletion"),wt.push(this),wt.length===1&&$t&&$t(Yt),this.$$.deleteScheduled=!0,this}function pn(){at.prototype.isAliasOf=Kr,at.prototype.clone=fn,at.prototype.delete=ln,at.prototype.isDeleted=dn,at.prototype.deleteLater=hn}function at(){}var yn=48,vn=57;function De(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 Se(t,e){return t=De(t),{[t]:function(){return e.apply(this,arguments)}}[t]}function xe(t,e,r){if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||_(`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}}function Fe(t,e,r){u.hasOwnProperty(t)?((r===void 0||u[t].overloadTable!==void 0&&u[t].overloadTable[r]!==void 0)&&_(`Cannot register public name '${t}' twice`),xe(u,t,t),u.hasOwnProperty(r)&&_(`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 mn(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=[]}function Nt(t,e,r){for(;e!==r;)e.upcast||_(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t}function gn(t,e){if(e===null)return this.isReference&&_(`null is not a valid ${this.name}`),0;e.$$||_(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||_(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Nt(e.$$.ptr,r,this.registeredClass);return n}function wn(t,e){var r;if(e===null)return this.isReference&&_(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;e.$$||_(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||_(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&_(`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=Nt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&_("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:_(`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,ot.toHandle(function(){a.delete()})),t!==null&&t.push(this.rawDestructor,r)}break;default:_("Unsupporting sharing policy")}return r}function $n(t,e){if(e===null)return this.isReference&&_(`null is not a valid ${this.name}`),0;e.$$||_(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||_(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&_(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Nt(e.$$.ptr,r,this.registeredClass);return n}function bn(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function Cn(t){this.rawDestructor&&this.rawDestructor(t)}function _n(t){t!==null&&t.delete()}function Tn(){et.prototype.getPointee=bn,et.prototype.destructor=Cn,et.prototype.argPackAdvance=8,et.prototype.readValueFromPointer=gt,et.prototype.deleteObject=_n,et.prototype.fromWireType=cn}function et(t,e,r,n,a,o,i,s,f,l,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=f,this.rawShare=l,this.rawDestructor=h,!a&&e.baseClass===void 0?n?(this.toWireType=gn,this.destructorFunction=null):(this.toWireType=$n,this.destructorFunction=null):this.toWireType=wn}function Oe(t,e,r){u.hasOwnProperty(t)||Mt("Replacing nonexistant public symbol"),u[t].overloadTable!==void 0&&r!==void 0?u[t].overloadTable[r]=e:(u[t]=e,u[t].argCount=r)}var Pn=(t,e,r)=>{var n=u["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},Rt=[],T=t=>{var e=Rt[t];return e||(t>=Rt.length&&(Rt.length=t+1),Rt[t]=e=pe.get(t)),e},En=(t,e,r)=>{if(t.includes("j"))return Pn(t,e,r);var n=T(e).apply(null,r);return n},An=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),En(t,e,r)}};function X(t,e){t=k(t);function r(){return t.includes("j")?An(t,e):T(e)}var n=r();return typeof n!="function"&&_(`unknown function pointer with signature ${t}: ${e}`),n}function Dn(t,e){var r=Se(e,function(n){this.name=e,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+` | ||
var tr=(M,B,z)=>{if(!B.has(M))throw TypeError("Cannot "+z)};var er=(M,B,z)=>(tr(M,B,"read from private field"),z?z.call(M):B.get(M)),rr=(M,B,z)=>{if(B.has(M))throw TypeError("Cannot add the same private member more than once");B instanceof WeakSet?B.add(M):B.set(M,z)},nr=(M,B,z,yt)=>(tr(M,B,"write to private field"),yt?yt.call(M,z):B.set(M,z),z);var BarcodeDetectionAPI=function(M){var vt;"use strict";const B=["aztec","code_128","code_39","code_93","codabar","data_matrix","ean_13","ean_8","itf","pdf417","qr_code","upc_a","upc_e","unknown"];function z(c){if(yt(c))return{width:c.naturalWidth,height:c.naturalHeight};if(Kt(c))return{width:c.width.baseVal.value,height:c.height.baseVal.value};if(te(c))return{width:c.videoWidth,height:c.videoHeight};if(ar(c))return{width:c.width,height:c.height};if(ee(c))return{width:c.width,height:c.height};if(or(c))return{width:c.width,height:c.height};if(re(c))return{width:c.displayWidth,height:c.displayHeight};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 yt(c){try{return c instanceof HTMLImageElement}catch{return!1}}function Kt(c){try{return c instanceof SVGImageElement}catch{return!1}}function te(c){try{return c instanceof HTMLVideoElement}catch{return!1}}function ar(c){try{return c instanceof HTMLCanvasElement}catch{return!1}}function ee(c){try{return c instanceof ImageBitmap}catch{return!1}}function or(c){try{return c instanceof OffscreenCanvas}catch{return!1}}function re(c){try{return c instanceof VideoFrame}catch{return!1}}function ir(c){try{return c instanceof Blob}catch{return!1}}function sr(c){try{return c instanceof ImageData}catch{return!1}}function ur(c,v){try{const u=new OffscreenCanvas(c,v);if(u.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return u;throw void 0}catch{const u=document.createElement("canvas");return u.width=c,u.height=v,u}}async function ne(c){if(yt(c)&&!await lr(c))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(Kt(c)&&!await dr(c))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(re(c)&&hr(c))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(te(c)&&(c.readyState===0||c.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(ee(c)&&yr(c))throw new DOMException("The image source is detached.","InvalidStateError");const{width:v,height:u}=z(c);if(v===0||u===0)return null;const P=ur(v,u).getContext("2d");P.drawImage(c,0,0);try{return P.getImageData(0,0,v,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function cr(c){let v;try{v=await createImageBitmap(c)}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await ne(v)}async function fr(c){if(ir(c))return await cr(c);if(sr(c)){if(pr(c))throw new DOMException("The image data has been detached.","InvalidStateError");return c}return await ne(c)}async function lr(c){try{return await c.decode(),!0}catch{return!1}}async function dr(c){var v;try{return await((v=c.decode)==null?void 0:v.call(c)),!0}catch{return!1}}function hr(c){return c.format===null}function pr(c){return c.data.buffer.byteLength===0}function yr(c){return c.width===0&&c.height===0}function ae(c,v){return c instanceof DOMException?new DOMException(`${v}: ${c.message}`,c.name):c instanceof Error?new c.constructor(`${v}: ${c.message}`):new Error(`${v}: ${c}`)}const oe=c=>{let v;const u=new Set,w=(j,q)=>{const U=typeof j=="function"?j(v):j;if(!Object.is(U,v)){const R=v;v=q??typeof U!="object"?U:Object.assign({},v,U),u.forEach(G=>G(v,R))}},P=()=>v,F={setState:w,getState:P,subscribe:j=>(u.add(j),()=>u.delete(j)),destroy:()=>{u.clear()}};return v=c(w,P,F),F},vr=c=>c?oe(c):oe,mr={locateFile:(c,v)=>{var u;const w=(u=c.match(/_(.+?)\.wasm$/))==null?void 0:u[1];return w?`https://cdn.jsdelivr.net/npm/@sec-ant/zxing-wasm@2.1.3/dist/${w}/${c}`:v+c}},lt=vr()(()=>({zxingModuleWeakMap:new WeakMap,zxingModuleOverrides:mr}));function gr(c){lt.setState({zxingModuleOverrides:c})}function ie(c,v=lt.getState().zxingModuleOverrides){const{zxingModuleWeakMap:u}=lt.getState(),w=u.get(c);if(w&&Object.is(v,lt.getState().zxingModuleOverrides))return w;{lt.setState({zxingModuleOverrides:v});const P=c(v);return u.set(c,P),P}}const se=["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"],nt={tryHarder:!0,formats:[],maxSymbols:255};async function wr(c,{tryHarder:v=nt.tryHarder,formats:u=nt.formats,maxSymbols:w=nt.maxSymbols}=nt,P){const F=await ie(P,lt.getState().zxingModuleOverrides),{data:j,width:q,height:U,data:{byteLength:R}}=c,G=F._malloc(R);F.HEAP8.set(j,G);const J=F.readBarcodesFromPixmap(G,q,U,v,$r(u),w);F._free(G);const L=[];for(let Y=0;Y<J.size();++Y){const Z=J.get(Y);L.push({...Z,format:br(Z.format)})}return L}function $r(c){return c.join("|")}function br(c){const v=ue(c);let u=0,w=se.length-1;for(;u<=w;){const P=Math.floor((u+w)/2),F=se[P],j=ue(F);if(j===v)return F;j<v?u=P+1:w=P-1}return"None"}function ue(c){return c.toLowerCase().replace(/_-\[\]/g,"")}var ce=(()=>{var c=document.currentScript&&document.currentScript.src||new URL("pure.js",document.baseURI).href;return function(v={}){var u=v,w,P;u.ready=new Promise((t,e)=>{w=t,P=e});var F=Object.assign({},u),j="./this.program",q=typeof window=="object",U=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var R="";function G(t){return u.locateFile?u.locateFile(t,R):R+t}var J;(q||U)&&(U?R=self.location.href:typeof document<"u"&&document.currentScript&&(R=document.currentScript.src),c&&(R=c),R.indexOf("blob:")!==0?R=R.substr(0,R.replace(/[?#].*/,"").lastIndexOf("/")+1):R="",U&&(J=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,F),F=null,u.arguments&&u.arguments,u.thisProgram&&(j=u.thisProgram),u.quit&&u.quit;var Y;u.wasmBinary&&(Y=u.wasmBinary),u.noExitRuntime,typeof WebAssembly!="object"&&At("no native wasm support detected");var Z,E,Pt=!1,Q,V,dt,Et,I,x,le,de;function he(){var t=Z.buffer;u.HEAP8=Q=new Int8Array(t),u.HEAP16=dt=new Int16Array(t),u.HEAP32=I=new Int32Array(t),u.HEAPU8=V=new Uint8Array(t),u.HEAPU16=Et=new Uint16Array(t),u.HEAPU32=x=new Uint32Array(t),u.HEAPF32=le=new Float32Array(t),u.HEAPF64=de=new Float64Array(t)}var pe,ye=[],ve=[],me=[];function Er(){if(u.preRun)for(typeof u.preRun=="function"&&(u.preRun=[u.preRun]);u.preRun.length;)Sr(u.preRun.shift());Bt(ye)}function Ar(){Bt(ve)}function Dr(){if(u.postRun)for(typeof u.postRun=="function"&&(u.postRun=[u.postRun]);u.postRun.length;)Fr(u.postRun.shift());Bt(me)}function Sr(t){ye.unshift(t)}function xr(t){ve.unshift(t)}function Fr(t){me.unshift(t)}var it=0,mt=null;function Or(t){it++,u.monitorRunDependencies&&u.monitorRunDependencies(it)}function Mr(t){if(it--,u.monitorRunDependencies&&u.monitorRunDependencies(it),it==0&&mt){var e=mt;mt=null,e()}}function At(t){u.onAbort&&u.onAbort(t),t="Aborted("+t+")",L(t),Pt=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw P(e),e}var jr="data:application/octet-stream;base64,";function ge(t){return t.startsWith(jr)}var st;u.locateFile?(st="zxing_reader.wasm",ge(st)||(st=G(st))):st=new URL("/reader/zxing_reader.wasm",self.location).href;function we(t){if(t==st&&Y)return new Uint8Array(Y);if(J)return J(t);throw"both async and sync fetching of the wasm failed"}function Rr(t){return!Y&&(q||U)&&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(()=>we(t)):Promise.resolve().then(()=>we(t))}function $e(t,e,r){return Rr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{L("failed to asynchronously prepare wasm: "+n),At(n)})}function Ir(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!ge(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"),$e(e,r,n)})}):$e(e,r,n)}function Wr(){var t={a:Ta};function e(n,a){var o=n.exports;return E=o,Z=E.qa,he(),pe=E.ua,xr(E.ra),Mr(),o}Or();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),P(n)}return Ir(Y,st,t,r).catch(P),{}}var Bt=t=>{for(;t.length>0;)t.shift()(u)},Dt=[],St=0;function Hr(t){var e=new xt(t);return e.get_caught()||(e.set_caught(!0),St--),e.set_rethrown(!1),Dt.push(e),Xe(e.excPtr),e.get_exception_ptr()}var K=0;function kr(){g(0,0);var t=Dt.pop();Ge(t.excPtr),K=0}function xt(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(e){x[this.ptr+4>>2]=e},this.get_type=function(){return x[this.ptr+4>>2]},this.set_destructor=function(e){x[this.ptr+8>>2]=e},this.get_destructor=function(){return x[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,Q[this.ptr+12>>0]=e},this.get_caught=function(){return Q[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,Q[this.ptr+13>>0]=e},this.get_rethrown=function(){return Q[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){x[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return x[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=Je(this.get_type());if(e)return x[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}function Br(t){throw K||(K=t),K}var Ut=t=>{var e=K;if(!e)return Tt(0),0;var r=new xt(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(qe(o,n,i))return Tt(o),e}return Tt(n),e},Ur=()=>Ut([]),Vr=t=>Ut([t]),zr=(t,e)=>Ut([t,e]);function Lr(t){var e=new xt(t).get_exception_ptr();return e}function Yr(){var t=Dt.pop();t||At("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(Dt.push(t),t.set_rethrown(!0),t.set_caught(!1),St++),K=e,K}function Nr(t,e,r){var n=new xt(t);throw n.init(e,r),K=t,St++,K}function Gr(){return St}var Ft={};function be(t){for(;t.length;){var e=t.pop(),r=t.pop();r(e)}}function gt(t){return this.fromWireType(I[t>>2])}var ht={},ut={},Ot={},Ce=void 0;function Mt(t){throw new Ce(t)}function ct(t,e,r){t.forEach(function(s){Ot[s]=e});function n(s){var f=r(s);f.length!==t.length&&Mt("Mismatched type converter count");for(var l=0;l<t.length;++l)tt(t[l],f[l])}var a=new Array(e.length),o=[],i=0;e.forEach((s,f)=>{ut.hasOwnProperty(s)?a[f]=ut[s]:(o.push(s),ht.hasOwnProperty(s)||(ht[s]=[]),ht[s].push(()=>{a[f]=ut[s],++i,i===o.length&&n(a)}))}),o.length===0&&n(a)}var Xr=function(t){var e=Ft[t];delete Ft[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((f,l)=>{var h=f.fieldName,y=i[l],m=f.getter,C=f.getterContext,A=i[l+a.length],W=f.setter,D=f.setterContext;s[h]={read:H=>y.fromWireType(m(C,H)),write:(H,d)=>{var p=[];W(D,H,A.toWireType(p,d)),be(p)}}}),[{name:e.name,fromWireType:function(f){var l={};for(var h in s)l[h]=s[h].read(f);return n(f),l},toWireType:function(f,l){for(var h in s)if(!(h in l))throw new TypeError(`Missing field: "${h}"`);var y=r();for(h in s)s[h].write(y,l[h]);return f!==null&&f.push(n,y),y},argPackAdvance:8,readValueFromPointer:gt,destructorFunction:n}]})};function qr(t,e,r,n,a){}function Vt(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError(`Unknown type size: ${t}`)}}function Jr(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);_e=t}var _e=void 0;function k(t){for(var e="",r=t;V[r];)e+=_e[V[r++]];return e}var pt=void 0;function _(t){throw new pt(t)}function Zr(t,e,r={}){var n=e.name;if(t||_(`type "${n}" must have a positive integer typeid pointer`),ut.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;_(`Cannot register type '${n}' twice`)}if(ut[t]=e,delete Ot[t],ht.hasOwnProperty(t)){var a=ht[t];delete ht[t],a.forEach(o=>o())}}function tt(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Zr(t,e,r)}function Qr(t,e,r,n,a){var o=Vt(r);e=k(e),tt(t,{name:e,fromWireType:function(i){return!!i},toWireType:function(i,s){return s?n:a},argPackAdvance:8,readValueFromPointer:function(i){var s;if(r===1)s=Q;else if(r===2)s=dt;else if(r===4)s=I;else throw new TypeError("Unknown boolean type size: "+e);return this.fromWireType(s[i>>o])},destructorFunction:null})}function Kr(t){if(!(this instanceof at)||!(t instanceof at))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,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}function tn(t){return{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}}function zt(t){function e(r){return r.$$.ptrType.registeredClass.name}_(e(t)+" instance already deleted")}var Lt=!1;function Te(t){}function en(t){t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)}function Pe(t){t.count.value-=1;var e=t.count.value===0;e&&en(t)}function Ee(t,e,r){if(e===r)return t;if(r.baseClass===void 0)return null;var n=Ee(t,e,r.baseClass);return n===null?null:r.downcast(n)}var Ae={};function rn(){return Object.keys(bt).length}function nn(){var t=[];for(var e in bt)bt.hasOwnProperty(e)&&t.push(bt[e]);return t}var wt=[];function Yt(){for(;wt.length;){var t=wt.pop();t.$$.deleteScheduled=!1,t.delete()}}var $t=void 0;function an(t){$t=t,wt.length&&$t&&$t(Yt)}function on(){u.getInheritedInstanceCount=rn,u.getLiveInheritedInstances=nn,u.flushPendingDeletes=Yt,u.setDelayFunction=an}var bt={};function sn(t,e){for(e===void 0&&_("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}function un(t,e){return e=sn(t,e),bt[e]}function jt(t,e){(!e.ptrType||!e.ptr)&&Mt("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&Mt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Ct(Object.create(t,{$$:{value:e}}))}function cn(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=un(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?jt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):jt(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var o=this.registeredClass.getActualType(e),i=Ae[o];if(!i)return a.call(this);var s;this.isConst?s=i.constPointerType:s=i.pointerType;var f=Ee(e,this.registeredClass,s.registeredClass);return f===null?a.call(this):this.isSmartPointer?jt(s.registeredClass.instancePrototype,{ptrType:s,ptr:f,smartPtrType:this,smartPtr:t}):jt(s.registeredClass.instancePrototype,{ptrType:s,ptr:f})}var Ct=function(t){return typeof FinalizationRegistry>"u"?(Ct=e=>e,t):(Lt=new FinalizationRegistry(e=>{Pe(e.$$)}),Ct=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Lt.register(e,a,e)}return e},Te=e=>Lt.unregister(e),Ct(t))};function fn(){if(this.$$.ptr||zt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=Ct(Object.create(Object.getPrototypeOf(this),{$$:{value:tn(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t}function ln(){this.$$.ptr||zt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&_("Object already scheduled for deletion"),Te(this),Pe(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function dn(){return!this.$$.ptr}function hn(){return this.$$.ptr||zt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&_("Object already scheduled for deletion"),wt.push(this),wt.length===1&&$t&&$t(Yt),this.$$.deleteScheduled=!0,this}function pn(){at.prototype.isAliasOf=Kr,at.prototype.clone=fn,at.prototype.delete=ln,at.prototype.isDeleted=dn,at.prototype.deleteLater=hn}function at(){}var yn=48,vn=57;function De(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 Se(t,e){return t=De(t),{[t]:function(){return e.apply(this,arguments)}}[t]}function xe(t,e,r){if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||_(`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}}function Fe(t,e,r){u.hasOwnProperty(t)?((r===void 0||u[t].overloadTable!==void 0&&u[t].overloadTable[r]!==void 0)&&_(`Cannot register public name '${t}' twice`),xe(u,t,t),u.hasOwnProperty(r)&&_(`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 mn(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=[]}function Nt(t,e,r){for(;e!==r;)e.upcast||_(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t}function gn(t,e){if(e===null)return this.isReference&&_(`null is not a valid ${this.name}`),0;e.$$||_(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||_(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Nt(e.$$.ptr,r,this.registeredClass);return n}function wn(t,e){var r;if(e===null)return this.isReference&&_(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;e.$$||_(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||_(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&_(`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=Nt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&_("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:_(`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,ot.toHandle(function(){a.delete()})),t!==null&&t.push(this.rawDestructor,r)}break;default:_("Unsupporting sharing policy")}return r}function $n(t,e){if(e===null)return this.isReference&&_(`null is not a valid ${this.name}`),0;e.$$||_(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||_(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&_(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Nt(e.$$.ptr,r,this.registeredClass);return n}function bn(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function Cn(t){this.rawDestructor&&this.rawDestructor(t)}function _n(t){t!==null&&t.delete()}function Tn(){et.prototype.getPointee=bn,et.prototype.destructor=Cn,et.prototype.argPackAdvance=8,et.prototype.readValueFromPointer=gt,et.prototype.deleteObject=_n,et.prototype.fromWireType=cn}function et(t,e,r,n,a,o,i,s,f,l,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=f,this.rawShare=l,this.rawDestructor=h,!a&&e.baseClass===void 0?n?(this.toWireType=gn,this.destructorFunction=null):(this.toWireType=$n,this.destructorFunction=null):this.toWireType=wn}function Oe(t,e,r){u.hasOwnProperty(t)||Mt("Replacing nonexistant public symbol"),u[t].overloadTable!==void 0&&r!==void 0?u[t].overloadTable[r]=e:(u[t]=e,u[t].argCount=r)}var Pn=(t,e,r)=>{var n=u["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},Rt=[],T=t=>{var e=Rt[t];return e||(t>=Rt.length&&(Rt.length=t+1),Rt[t]=e=pe.get(t)),e},En=(t,e,r)=>{if(t.includes("j"))return Pn(t,e,r);var n=T(e).apply(null,r);return n},An=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),En(t,e,r)}};function X(t,e){t=k(t);function r(){return t.includes("j")?An(t,e):T(e)}var n=r();return typeof n!="function"&&_(`unknown function pointer with signature ${t}: ${e}`),n}function Dn(t,e){var r=Se(e,function(n){this.name=e,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+` | ||
`+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}var Me=void 0;function je(t){var e=Ne(t),r=k(e);return rt(e),r}function It(t,e){var r=[],n={};function a(o){if(!n[o]&&!ut[o]){if(Ot[o]){Ot[o].forEach(a);return}r.push(o),n[o]=!0}}throw e.forEach(a),new Me(`${t}: `+r.map(je).join([", "]))}function Sn(t,e,r,n,a,o,i,s,f,l,h,y,m){h=k(h),o=X(a,o),s&&(s=X(i,s)),l&&(l=X(f,l)),m=X(y,m);var C=De(h);Fe(C,function(){It(`Cannot construct ${h} due to unbound types`,[n])}),ct([t,e,r],n?[n]:[],function(A){A=A[0];var W,D;n?(W=A.registeredClass,D=W.instancePrototype):D=at.prototype;var H=Se(C,function(){if(Object.getPrototypeOf(this)!==d)throw new pt("Use 'new' to construct "+h);if(p.constructor_body===void 0)throw new pt(h+" has no accessible constructor");var kt=p.constructor_body[arguments.length];if(kt===void 0)throw new pt(`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(D,{constructor:{value:H}});H.prototype=d;var p=new mn(h,H,d,m,W,o,s,l);p.baseClass&&(p.baseClass.__derivedClasses===void 0&&(p.baseClass.__derivedClasses=[]),p.baseClass.__derivedClasses.push(p));var S=new et(h,p,!0,!1,!1),O=new et(h+"*",p,!1,!1,!1),ft=new et(h+" const*",p,!1,!0,!1);return Ae[t]={pointerType:O,constPointerType:ft},Oe(C,H),[S,O,ft]})}function Gt(t,e){for(var r=[],n=0;n<t;n++)r.push(x[e+n*4>>2]);return r}function Xt(t,e,r,n,a,o){var i=e.length;i<2&&_("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=e[1]!==null&&r!==null,f=!1,l=1;l<e.length;++l)if(e[l]!==null&&e[l].destructorFunction===void 0){f=!0;break}var h=e[0].name!=="void",y=i-2,m=new Array(y),C=[],A=[];return function(){arguments.length!==y&&_(`function ${t} called with ${arguments.length} arguments, expected ${y} args!`),A.length=0;var W;C.length=s?2:1,C[0]=a,s&&(W=e[1].toWireType(A,this),C[1]=W);for(var D=0;D<y;++D)m[D]=e[D+2].toWireType(A,arguments[D]),C.push(m[D]);var H=n.apply(null,C);function d(p){if(f)be(A);else for(var S=s?1:2;S<e.length;S++){var O=S===1?W:m[S-2];e[S].destructorFunction!==null&&e[S].destructorFunction(O)}if(h)return e[0].fromWireType(p)}return d(H)}}function xn(t,e,r,n,a,o){var i=Gt(e,r);a=X(n,a),ct([],[t],function(s){s=s[0];var f=`constructor ${s.name}`;if(s.registeredClass.constructor_body===void 0&&(s.registeredClass.constructor_body=[]),s.registeredClass.constructor_body[e-1]!==void 0)throw new pt(`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]=()=>{It(`Cannot construct ${s.name} due to unbound types`,i)},ct([],i,function(l){return l.splice(1,0,null),s.registeredClass.constructor_body[e-1]=Xt(f,l,null,a,o),[]}),[]})}function Fn(t,e,r,n,a,o,i,s,f){var l=Gt(r,n);e=k(e),o=X(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 m(){It(`Cannot call ${y} due to unbound types`,l)}var C=h.registeredClass.instancePrototype,A=C[e];return A===void 0||A.overloadTable===void 0&&A.className!==h.name&&A.argCount===r-2?(m.argCount=r-2,m.className=h.name,C[e]=m):(xe(C,e,y),C[e].overloadTable[r-2]=m),ct([],l,function(W){var D=Xt(y,W,h,o,i);return C[e].overloadTable===void 0?(D.argCount=r-2,C[e]=D):C[e].overloadTable[r-2]=D,[]}),[]})}function On(){Object.assign(Re.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 Re(){this.allocated=[void 0],this.freelist=[]}var N=new Re;function Ie(t){t>=N.reserved&&--N.get(t).refcount===0&&N.free(t)}function Mn(){for(var t=0,e=N.reserved;e<N.allocated.length;++e)N.allocated[e]!==void 0&&++t;return t}function jn(){N.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),N.reserved=N.allocated.length,u.count_emval_handles=Mn}var ot={toValue:t=>(t||_("Cannot use deleted val. handle = "+t),N.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 N.allocate({refcount:1,value:t})}}};function Rn(t,e){e=k(e),tt(t,{name:e,fromWireType:function(r){var n=ot.toValue(r);return Ie(r),n},toWireType:function(r,n){return ot.toHandle(n)},argPackAdvance:8,readValueFromPointer:gt,destructorFunction:null})}function qt(t){if(t===null)return"null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t}function In(t,e){switch(e){case 2:return function(r){return this.fromWireType(le[r>>2])};case 3:return function(r){return this.fromWireType(de[r>>3])};default:throw new TypeError("Unknown float type: "+t)}}function Wn(t,e,r){var n=Vt(r);e=k(e),tt(t,{name:e,fromWireType:function(a){return a},toWireType:function(a,o){return o},argPackAdvance:8,readValueFromPointer:In(e,n),destructorFunction:null})}function Hn(t,e,r,n,a,o,i){var s=Gt(e,r);t=k(t),a=X(n,a),Fe(t,function(){It(`Cannot call ${t} due to unbound types`,s)},e-1),ct([],s,function(f){var l=[f[0],null].concat(f.slice(1));return Oe(t,Xt(t,l,null,a,o),e-1),[]})}function kn(t,e,r){switch(e){case 0:return r?function(n){return Q[n]}:function(n){return V[n]};case 1:return r?function(n){return dt[n>>1]}:function(n){return Et[n>>1]};case 2:return r?function(n){return I[n>>2]}:function(n){return x[n>>2]};default:throw new TypeError("Unknown integer type: "+t)}}function Bn(t,e,r,n,a){e=k(e);var o=Vt(r),i=y=>y;if(n===0){var s=32-8*r;i=y=>y<<s>>>s}var f=e.includes("unsigned"),l=(y,m)=>{},h;f?h=function(y,m){return l(m,this.name),m>>>0}:h=function(y,m){return l(m,this.name),m},tt(t,{name:e,fromWireType:i,toWireType:h,argPackAdvance:8,readValueFromPointer:kn(e,o,n!==0),destructorFunction:null})}function Un(t,e,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function o(i){i=i>>2;var s=x,f=s[i],l=s[i+1];return new a(s.buffer,l,f)}r=k(r),tt(t,{name:r,fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})}var We=(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 f=t.charCodeAt(++i);s=65536+((s&1023)<<10)|f&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},Vn=(t,e,r)=>We(t,V,e,r),He=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},ke=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,zn=(t,e,r)=>{for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&ke)return ke.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 f=t[e++]&63;if((i&240)==224?i=(i&15)<<12|s<<6|f:i=(i&7)<<18|s<<12|f<<6|t[e++]&63,i<65536)o+=String.fromCharCode(i);else{var l=i-65536;o+=String.fromCharCode(55296|l>>10,56320|l&1023)}}return o},Jt=(t,e)=>t?zn(V,t,e):"";function Ln(t,e){e=k(e);var r=e==="std::string";tt(t,{name:e,fromWireType:function(n){var a=x[n>>2],o=n+4,i;if(r)for(var s=o,f=0;f<=a;++f){var l=o+f;if(f==a||V[l]==0){var h=l-s,y=Jt(s,h);i===void 0?i=y:(i+=String.fromCharCode(0),i+=y),s=l+1}}else{for(var m=new Array(a),f=0;f<a;++f)m[f]=String.fromCharCode(V[o+f]);i=m.join("")}return rt(n),i},toWireType:function(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||_("Cannot pass non-string to std::string"),r&&i?o=He(a):o=a.length;var s=Qt(4+o+1),f=s+4;if(x[s>>2]=o,r&&i)Vn(a,f,o+1);else if(i)for(var l=0;l<o;++l){var h=a.charCodeAt(l);h>255&&(rt(f),_("String has UTF-16 code units that do not fit in 8 bits")),V[f+l]=h}else for(var l=0;l<o;++l)V[f+l]=a[l];return n!==null&&n.push(rt,s),s},argPackAdvance:8,readValueFromPointer:gt,destructorFunction:function(n){rt(n)}})}var Be=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Yn=(t,e)=>{for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&Et[n];)++n;if(r=n<<1,r-t>32&&Be)return Be.decode(V.subarray(t,r));for(var o="",i=0;!(i>=e/2);++i){var s=dt[t+i*2>>1];if(s==0)break;o+=String.fromCharCode(s)}return o},Nn=(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);dt[e>>1]=i,e+=2}return dt[e>>1]=0,e-n},Gn=t=>t.length*2,Xn=(t,e)=>{for(var r=0,n="";!(r>=e/4);){var a=I[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},qn=(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(I[e>>2]=i,e+=4,e+4>a)break}return I[e>>2]=0,e-n},Jn=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},Zn=function(t,e,r){r=k(r);var n,a,o,i,s;e===2?(n=Yn,a=Nn,i=Gn,o=()=>Et,s=1):e===4&&(n=Xn,a=qn,i=Jn,o=()=>x,s=2),tt(t,{name:r,fromWireType:function(f){for(var l=x[f>>2],h=o(),y,m=f+4,C=0;C<=l;++C){var A=f+4+C*e;if(C==l||h[A>>s]==0){var W=A-m,D=n(m,W);y===void 0?y=D:(y+=String.fromCharCode(0),y+=D),m=A+e}}return rt(f),y},toWireType:function(f,l){typeof l!="string"&&_(`Cannot pass non-string to C++ string type ${r}`);var h=i(l),y=Qt(4+h+e);return x[y>>2]=h>>s,a(l,y+4,h+e),f!==null&&f.push(rt,y),y},argPackAdvance:8,readValueFromPointer:gt,destructorFunction:function(f){rt(f)}})};function Qn(t,e,r,n,a,o){Ft[t]={name:k(e),rawConstructor:X(r,n),rawDestructor:X(a,o),fields:[]}}function Kn(t,e,r,n,a,o,i,s,f,l){Ft[t].fields.push({fieldName:k(e),getterReturnType:r,getter:X(n,a),getterContext:o,setterArgumentType:i,setter:X(s,f),setterContext:l})}function ta(t,e){e=k(e),tt(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:function(){},toWireType:function(r,n){}})}var ea={};function ra(t){var e=ea[t];return e===void 0?k(t):e}function Ue(){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.")}function na(t){return t===0?ot.toHandle(Ue()):(t=ra(t),ot.toHandle(Ue()[t]))}function aa(t){t>4&&(N.get(t).refcount+=1)}function Ve(t,e){var r=ut[t];return r===void 0&&_(e+" has unknown type "+je(t)),r}function oa(t){var e=new Array(t+1);return function(r,n,a){e[0]=r;for(var o=0;o<t;++o){var i=Ve(x[n+o*4>>2],"parameter "+o);e[o+1]=i.readValueFromPointer(a),a+=i.argPackAdvance}var s=new(r.bind.apply(r,e));return ot.toHandle(s)}}var ze={};function ia(t,e,r,n){t=ot.toValue(t);var a=ze[e];return a||(a=oa(e),ze[e]=a),a(t,r,n)}function sa(t,e){t=Ve(t,"_emval_take_value");var r=t.readValueFromPointer(e);return ot.toHandle(r)}var ua=()=>{At("")},ca=(t,e,r)=>V.copyWithin(t,e,e+r),fa=()=>2147483648,la=t=>{var e=Z.buffer,r=t-e.byteLength+65535>>>16;try{return Z.grow(r),he(),1}catch{}},da=t=>{var e=V.length;t>>>=0;var r=fa();if(t>r)return!1;for(var n=(f,l)=>f+(l-f%l)%l,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=la(i);if(s)return!0}return!1},Zt={},ha=()=>j||"./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,_:ha()};for(var r in Zt)Zt[r]===void 0?delete e[r]:e[r]=Zt[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);_t.strings=n}return _t.strings},pa=(t,e)=>{for(var r=0;r<t.length;++r)Q[e++>>0]=t.charCodeAt(r);Q[e>>0]=0},ya=(t,e)=>{var r=0;return _t().forEach(function(n,a){var o=e+r;x[t+a*4>>2]=o,pa(n,o),r+=n.length+1}),0},va=(t,e)=>{var r=_t();x[t>>2]=r.length;var n=0;return r.forEach(function(a){n+=a.length+1}),x[e>>2]=n,0};function ma(t){return t}var Wt=t=>t%4===0&&(t%100!==0||t%400===0),ga=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},Le=[31,29,31,30,31,30,31,31,30,31,30,31],Ye=[31,28,31,30,31,30,31,31,30,31,30,31],wa=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=Wt(r.getFullYear()),a=r.getMonth(),o=(n?Le:Ye)[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 $a(t,e,r){var n=r>0?r:He(t)+1,a=new Array(n),o=We(t,a,0,a.length);return e&&(a.length=o),a}var ba=(t,e)=>{Q.set(t,e)},Ca=(t,e,r,n)=>{var a=I[n+40>>2],o={tm_sec:I[n>>2],tm_min:I[n+4>>2],tm_hour:I[n+8>>2],tm_mday:I[n+12>>2],tm_mon:I[n+16>>2],tm_year:I[n+20>>2],tm_wday:I[n+24>>2],tm_yday:I[n+28>>2],tm_isdst:I[n+32>>2],tm_gmtoff:I[n+36>>2],tm_zone:a?Jt(a):""},i=Jt(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 f in s)i=i.replace(new RegExp(f,"g"),s[f]);var l=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h=["January","February","March","April","May","June","July","August","September","October","November","December"];function y(d,p,S){for(var O=typeof d=="number"?d.toString():d||"";O.length<p;)O=S[0]+O;return O}function m(d,p){return y(d,p,"0")}function C(d,p){function S(ft){return ft<0?-1:ft>0?1:0}var O;return(O=S(d.getFullYear()-p.getFullYear()))===0&&(O=S(d.getMonth()-p.getMonth()))===0&&(O=S(d.getDate()-p.getDate())),O}function A(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 W(d){var p=wa(new Date(d.tm_year+1900,0,1),d.tm_yday),S=new Date(p.getFullYear(),0,4),O=new Date(p.getFullYear()+1,0,4),ft=A(S),kt=A(O);return C(ft,p)<=0?C(kt,p)<=0?p.getFullYear()+1:p.getFullYear():p.getFullYear()-1}var D={"%a":d=>l[d.tm_wday].substring(0,3),"%A":d=>l[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 m(p/100|0,2)},"%d":d=>m(d.tm_mday,2),"%e":d=>y(d.tm_mday,2," "),"%g":d=>W(d).toString().substring(2),"%G":d=>W(d),"%H":d=>m(d.tm_hour,2),"%I":d=>{var p=d.tm_hour;return p==0?p=12:p>12&&(p-=12),m(p,2)},"%j":d=>m(d.tm_mday+ga(Wt(d.tm_year+1900)?Le:Ye,d.tm_mon-1),3),"%m":d=>m(d.tm_mon+1,2),"%M":d=>m(d.tm_min,2),"%n":()=>` | ||
`,"%p":d=>d.tm_hour>=0&&d.tm_hour<12?"AM":"PM","%S":d=>m(d.tm_sec,2),"%t":()=>" ","%u":d=>d.tm_wday||7,"%U":d=>{var p=d.tm_yday+7-d.tm_wday;return m(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 S=(d.tm_wday+371-d.tm_yday)%7;S!=4&&(S!=3||!Wt(d.tm_year))&&(p=1)}}else{p=52;var O=(d.tm_wday+7-d.tm_yday-1)%7;(O==4||O==5&&Wt(d.tm_year%400-1))&&p++}return m(p,2)},"%w":d=>d.tm_wday,"%W":d=>{var p=d.tm_yday+7-(d.tm_wday+6)%7;return m(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,S=p>=0;return p=Math.abs(p)/60,p=p/60*100+p%60,(S?"+":"-")+("0000"+p).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};i=i.replace(/%%/g,"\0\0");for(var f in D)i.includes(f)&&(i=i.replace(new RegExp(f,"g"),D[f](o)));i=i.replace(/\0\0/g,"%");var H=$a(i,!1);return H.length>e?0:(ba(H,t),H.length-1)},_a=(t,e,r,n,a)=>Ca(t,e,r,n);Ce=u.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},Jr(),pt=u.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},pn(),on(),Tn(),Me=u.UnboundTypeError=Dn(Error,"UnboundTypeError"),On(),jn();var Ta={q:Hr,u:kr,a:Ur,h:Vr,l:zr,I:Lr,P:Yr,n:Nr,ba:Gr,d:Br,oa:Xr,Y:qr,fa:Qr,na:Sn,ma:xn,D:Fn,ea:Rn,W:Wn,J:Hn,w:Bn,s:Un,V:Ln,L:Zn,Q:Qn,pa:Kn,ga:ta,U:Ie,la:na,R:aa,ia,ka:sa,K:ua,da:ca,ca:da,$:ya,aa:va,H:za,T:Qa,B:Ya,p:Ba,b:Pa,C:Va,ha:Ga,c:xa,j:Oa,i:Da,x:La,O:Ua,v:Ha,G:qa,N:Ja,A:Na,F:Ka,Z:eo,X:ro,k:Fa,f:Sa,e:Aa,g:Ea,M:Za,m:Wa,o:Ma,S:ja,t:Ia,ja:ka,y:Xa,r:Ra,E:to,z:ma,_:_a};Wr();var rt=u._free=t=>(rt=u._free=E.sa)(t),Qt=u._malloc=t=>(Qt=u._malloc=E.ta)(t),Ne=t=>(Ne=E.va)(t);u.__embind_initialize_bindings=()=>(u.__embind_initialize_bindings=E.wa)();var g=(t,e)=>(g=E.xa)(t,e),Tt=t=>(Tt=E.ya)(t),$=()=>($=E.za)(),b=t=>(b=E.Aa)(t),Ge=t=>(Ge=E.Ba)(t),Xe=t=>(Xe=E.Ca)(t),qe=(t,e,r)=>(qe=E.Da)(t,e,r),Je=t=>(Je=E.Ea)(t);u.dynCall_viijii=(t,e,r,n,a,o,i)=>(u.dynCall_viijii=E.Fa)(t,e,r,n,a,o,i);var Ze=u.dynCall_jiii=(t,e,r,n)=>(Ze=u.dynCall_jiii=E.Ga)(t,e,r,n),Qe=u.dynCall_jiiii=(t,e,r,n,a)=>(Qe=u.dynCall_jiiii=E.Ha)(t,e,r,n,a);u.dynCall_iiiiij=(t,e,r,n,a,o,i)=>(u.dynCall_iiiiij=E.Ia)(t,e,r,n,a,o,i),u.dynCall_iiiiijj=(t,e,r,n,a,o,i,s,f)=>(u.dynCall_iiiiijj=E.Ja)(t,e,r,n,a,o,i,s,f),u.dynCall_iiiiiijj=(t,e,r,n,a,o,i,s,f,l)=>(u.dynCall_iiiiiijj=E.Ka)(t,e,r,n,a,o,i,s,f,l);function Pa(t,e){var r=$();try{return T(t)(e)}catch(n){if(b(r),n!==n+0)throw n;g(1,0)}}function Ea(t,e,r,n){var a=$();try{T(t)(e,r,n)}catch(o){if(b(a),o!==o+0)throw o;g(1,0)}}function Aa(t,e,r){var n=$();try{T(t)(e,r)}catch(a){if(b(n),a!==a+0)throw a;g(1,0)}}function Da(t,e,r,n,a){var o=$();try{return T(t)(e,r,n,a)}catch(i){if(b(o),i!==i+0)throw i;g(1,0)}}function Sa(t,e){var r=$();try{T(t)(e)}catch(n){if(b(r),n!==n+0)throw n;g(1,0)}}function xa(t,e,r){var n=$();try{return T(t)(e,r)}catch(a){if(b(n),a!==a+0)throw a;g(1,0)}}function Fa(t){var e=$();try{T(t)()}catch(r){if(b(e),r!==r+0)throw r;g(1,0)}}function Oa(t,e,r,n){var a=$();try{return T(t)(e,r,n)}catch(o){if(b(a),o!==o+0)throw o;g(1,0)}}function Ma(t,e,r,n,a,o){var i=$();try{T(t)(e,r,n,a,o)}catch(s){if(b(i),s!==s+0)throw s;g(1,0)}}function ja(t,e,r,n,a,o,i){var s=$();try{T(t)(e,r,n,a,o,i)}catch(f){if(b(s),f!==f+0)throw f;g(1,0)}}function Ra(t,e,r,n,a,o,i,s,f,l,h){var y=$();try{T(t)(e,r,n,a,o,i,s,f,l,h)}catch(m){if(b(y),m!==m+0)throw m;g(1,0)}}function Ia(t,e,r,n,a,o,i,s){var f=$();try{T(t)(e,r,n,a,o,i,s)}catch(l){if(b(f),l!==l+0)throw l;g(1,0)}}function Wa(t,e,r,n,a){var o=$();try{T(t)(e,r,n,a)}catch(i){if(b(o),i!==i+0)throw i;g(1,0)}}function Ha(t,e,r,n,a,o,i){var s=$();try{return T(t)(e,r,n,a,o,i)}catch(f){if(b(s),f!==f+0)throw f;g(1,0)}}function ka(t,e,r,n,a,o,i,s,f){var l=$();try{T(t)(e,r,n,a,o,i,s,f)}catch(h){if(b(l),h!==h+0)throw h;g(1,0)}}function Ba(t){var e=$();try{return T(t)()}catch(r){if(b(e),r!==r+0)throw r;g(1,0)}}function Ua(t,e,r,n,a,o,i){var s=$();try{return T(t)(e,r,n,a,o,i)}catch(f){if(b(s),f!==f+0)throw f;g(1,0)}}function Va(t,e,r,n){var a=$();try{return T(t)(e,r,n)}catch(o){if(b(a),o!==o+0)throw o;g(1,0)}}function za(t,e,r,n){var a=$();try{return T(t)(e,r,n)}catch(o){if(b(a),o!==o+0)throw o;g(1,0)}}function La(t,e,r,n,a,o){var i=$();try{return T(t)(e,r,n,a,o)}catch(s){if(b(i),s!==s+0)throw s;g(1,0)}}function Ya(t,e,r,n,a,o){var i=$();try{return T(t)(e,r,n,a,o)}catch(s){if(b(i),s!==s+0)throw s;g(1,0)}}function Na(t,e,r,n,a,o,i,s,f,l){var h=$();try{return T(t)(e,r,n,a,o,i,s,f,l)}catch(y){if(b(h),y!==y+0)throw y;g(1,0)}}function Ga(t,e,r){var n=$();try{return T(t)(e,r)}catch(a){if(b(n),a!==a+0)throw a;g(1,0)}}function Xa(t,e,r,n,a,o,i,s,f,l){var h=$();try{T(t)(e,r,n,a,o,i,s,f,l)}catch(y){if(b(h),y!==y+0)throw y;g(1,0)}}function qa(t,e,r,n,a,o,i,s){var f=$();try{return T(t)(e,r,n,a,o,i,s)}catch(l){if(b(f),l!==l+0)throw l;g(1,0)}}function Ja(t,e,r,n,a,o,i,s,f){var l=$();try{return T(t)(e,r,n,a,o,i,s,f)}catch(h){if(b(l),h!==h+0)throw h;g(1,0)}}function Za(t,e,r,n,a,o,i){var s=$();try{T(t)(e,r,n,a,o,i)}catch(f){if(b(s),f!==f+0)throw f;g(1,0)}}function Qa(t,e,r,n){var a=$();try{return T(t)(e,r,n)}catch(o){if(b(a),o!==o+0)throw o;g(1,0)}}function Ka(t,e,r,n,a,o,i,s,f,l,h,y){var m=$();try{return T(t)(e,r,n,a,o,i,s,f,l,h,y)}catch(C){if(b(m),C!==C+0)throw C;g(1,0)}}function to(t,e,r,n,a,o,i,s,f,l,h,y,m,C,A,W){var D=$();try{T(t)(e,r,n,a,o,i,s,f,l,h,y,m,C,A,W)}catch(H){if(b(D),H!==H+0)throw H;g(1,0)}}function eo(t,e,r,n){var a=$();try{return Ze(t,e,r,n)}catch(o){if(b(a),o!==o+0)throw o;g(1,0)}}function ro(t,e,r,n,a){var o=$();try{return Qe(t,e,r,n,a)}catch(i){if(b(o),i!==i+0)throw i;g(1,0)}}var Ht;mt=function t(){Ht||Ke(),Ht||(mt=t)};function Ke(){if(it>0||(Er(),it>0))return;function t(){Ht||(Ht=!0,u.calledRun=!0,!Pt&&(Ar(),w(u),u.onRuntimeInitialized&&u.onRuntimeInitialized(),Dr()))}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 Ke(),v.ready}})();function Cr(c){return ie(ce,c)}async function _r(c,{tryHarder:v=nt.tryHarder,formats:u=nt.formats,maxSymbols:w=nt.maxSymbols}=nt){return wr(c,{tryHarder:v,formats:u,maxSymbols:w},ce)}const fe=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 Tr(c){for(const[v,u]of fe)if(c===u)return v;return"unknown"}class Pr{constructor(v={}){rr(this,vt,void 0);var u;try{const w=(u=v==null?void 0:v.formats)==null?void 0:u.filter(P=>P!=="unknown");if((w==null?void 0:w.length)===0)throw new TypeError("Hint option provided, but is empty.");w==null||w.forEach(P=>{if(!B.includes(P))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${P}' is not a valid enum value of type BarcodeFormat.`)}),Cr().catch(()=>{}),nr(this,vt,w??[])}catch(w){throw ae(w,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return B.filter(v=>v!=="unknown")}async detect(v){try{const u=await fr(v);if(u===null)return[];let w;try{w=await _r(u,{tryHarder:!0,formats:er(this,vt).map(P=>fe.get(P))})}catch{throw new DOMException("Barcode detection service unavailable. Use 'setZXingModuleOverrides' in offline or strict CSP environments.","NotSupportedError")}return w.map(P=>{const{topLeft:{x:F,y:j},topRight:{x:q,y:U},bottomLeft:{x:R,y:G},bottomRight:{x:J,y:L}}=P.position,Y=Math.min(F,q,R,J),Z=Math.min(j,U,G,L),E=Math.max(F,q,R,J),Pt=Math.max(j,U,G,L);return{boundingBox:new DOMRectReadOnly(Y,Z,E-Y,Pt-Z),rawValue:new TextDecoder().decode(P.bytes),format:Tr(P.format),cornerPoints:[{x:F,y:j},{x:q,y:U},{x:J,y:L},{x:R,y:G}]}})}catch(u){throw ae(u,"Failed to execute 'detect' on 'BarcodeDetector'")}}}return vt=new WeakMap,M.BarcodeDetector=Pr,M.setZXingModuleOverrides=gr,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"}),M}({}); |
@@ -1,3 +0,3 @@ | ||
var tr=(H,B,z)=>{if(!B.has(H))throw TypeError("Cannot "+z)};var er=(H,B,z)=>(tr(H,B,"read from private field"),z?z.call(H):B.get(H)),rr=(H,B,z)=>{if(B.has(H))throw TypeError("Cannot add the same private member more than once");B instanceof WeakSet?B.add(H):B.set(H,z)},nr=(H,B,z,yt)=>(tr(H,B,"write to private field"),yt?yt.call(H,z):B.set(H,z),z);var BarcodeDetectionAPI=function(H){var vt;"use strict";const B=["aztec","code_128","code_39","code_93","codabar","data_matrix","ean_13","ean_8","itf","pdf417","qr_code","upc_a","upc_e","unknown"];function z(c){if(yt(c))return{width:c.naturalWidth,height:c.naturalHeight};if(Kt(c))return{width:c.width.baseVal.value,height:c.height.baseVal.value};if(te(c))return{width:c.videoWidth,height:c.videoHeight};if(ar(c))return{width:c.width,height:c.height};if(ee(c))return{width:c.width,height:c.height};if(or(c))return{width:c.width,height:c.height};if(re(c))return{width:c.displayWidth,height:c.displayHeight};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 yt(c){try{return c instanceof HTMLImageElement}catch{return!1}}function Kt(c){try{return c instanceof SVGImageElement}catch{return!1}}function te(c){try{return c instanceof HTMLVideoElement}catch{return!1}}function ar(c){try{return c instanceof HTMLCanvasElement}catch{return!1}}function ee(c){try{return c instanceof ImageBitmap}catch{return!1}}function or(c){try{return c instanceof OffscreenCanvas}catch{return!1}}function re(c){try{return c instanceof VideoFrame}catch{return!1}}function ir(c){try{return c instanceof Blob}catch{return!1}}function sr(c){try{return c instanceof ImageData}catch{return!1}}function ur(c,v){try{const u=new OffscreenCanvas(c,v);if(u.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return u;throw void 0}catch{const u=document.createElement("canvas");return u.width=c,u.height=v,u}}async function ne(c){if(yt(c)&&!await lr(c))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(Kt(c)&&!await dr(c))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(re(c)&&hr(c))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(te(c)&&(c.readyState===0||c.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(ee(c)&&yr(c))throw new DOMException("The image source is detached.","InvalidStateError");const{width:v,height:u}=z(c);if(v===0||u===0)return null;const P=ur(v,u).getContext("2d");P.drawImage(c,0,0);try{return P.getImageData(0,0,v,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function cr(c){let v;try{v=await createImageBitmap(c)}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await ne(v)}async function fr(c){if(ir(c))return await cr(c);if(sr(c)){if(pr(c))throw new DOMException("The image data has been detached.","InvalidStateError");return c}return await ne(c)}async function lr(c){try{return await c.decode(),!0}catch{return!1}}async function dr(c){var v;try{return await((v=c.decode)==null?void 0:v.call(c)),!0}catch{return!1}}function hr(c){return c.format===null}function pr(c){return c.data.buffer.byteLength===0}function yr(c){return c.width===0&&c.height===0}function ae(c,v){return c instanceof DOMException?new DOMException(`${v}: ${c.message}`,c.name):c instanceof Error?new c.constructor(`${v}: ${c.message}`):new Error(`${v}: ${c}`)}const oe=c=>{let v;const u=new Set,w=(M,q)=>{const U=typeof M=="function"?M(v):M;if(!Object.is(U,v)){const j=v;v=q??typeof U!="object"?U:Object.assign({},v,U),u.forEach(G=>G(v,j))}},P=()=>v,F={setState:w,getState:P,subscribe:M=>(u.add(M),()=>u.delete(M)),destroy:()=>{u.clear()}};return v=c(w,P,F),F},vr=c=>c?oe(c):oe,mr={locateFile:(c,v)=>{var u;const w=(u=c.match(new RegExp("(?<=_).+?(?=\\.wasm$)")))==null?void 0:u[0];return w?`https://cdn.jsdelivr.net/npm/@sec-ant/zxing-wasm@2.1.2/dist/${w}/${c}`:v+c}},lt=vr()(()=>({zxingModuleWeakMap:new WeakMap,zxingModuleOverrides:mr}));function gr(c){lt.setState({zxingModuleOverrides:c})}function ie(c,v=lt.getState().zxingModuleOverrides){const{zxingModuleWeakMap:u}=lt.getState(),w=u.get(c);if(w&&Object.is(v,lt.getState().zxingModuleOverrides))return w;{lt.setState({zxingModuleOverrides:v});const P=c(v);return u.set(c,P),P}}const se=["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"],nt={tryHarder:!0,formats:[],maxSymbols:255};async function wr(c,{tryHarder:v=nt.tryHarder,formats:u=nt.formats,maxSymbols:w=nt.maxSymbols}=nt,P){const F=await ie(P,lt.getState().zxingModuleOverrides),{data:M,width:q,height:U,data:{byteLength:j}}=c,G=F._malloc(j);F.HEAP8.set(M,G);const J=F.readBarcodesFromPixmap(G,q,U,v,$r(u),w);F._free(G);const L=[];for(let Y=0;Y<J.size();++Y){const Z=J.get(Y);L.push({...Z,format:br(Z.format)})}return L}function $r(c){return c.join("|")}function br(c){const v=ue(c);let u=0,w=se.length-1;for(;u<=w;){const P=Math.floor((u+w)/2),F=se[P],M=ue(F);if(M===v)return F;M<v?u=P+1:w=P-1}return"None"}function ue(c){return c.toLowerCase().replace(/_-\[\]/g,"")}var ce=(()=>{var c=document.currentScript&&document.currentScript.src||new URL("side-effects.js",document.baseURI).href;return function(v={}){var u=v,w,P;u.ready=new Promise((t,e)=>{w=t,P=e});var F=Object.assign({},u),M="./this.program",q=typeof window=="object",U=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var j="";function G(t){return u.locateFile?u.locateFile(t,j):j+t}var J;(q||U)&&(U?j=self.location.href:typeof document<"u"&&document.currentScript&&(j=document.currentScript.src),c&&(j=c),j.indexOf("blob:")!==0?j=j.substr(0,j.replace(/[?#].*/,"").lastIndexOf("/")+1):j="",U&&(J=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,F),F=null,u.arguments&&u.arguments,u.thisProgram&&(M=u.thisProgram),u.quit&&u.quit;var Y;u.wasmBinary&&(Y=u.wasmBinary),u.noExitRuntime,typeof WebAssembly!="object"&&At("no native wasm support detected");var Z,E,Pt=!1,Q,V,dt,Et,R,S,le,de;function he(){var t=Z.buffer;u.HEAP8=Q=new Int8Array(t),u.HEAP16=dt=new Int16Array(t),u.HEAP32=R=new Int32Array(t),u.HEAPU8=V=new Uint8Array(t),u.HEAPU16=Et=new Uint16Array(t),u.HEAPU32=S=new Uint32Array(t),u.HEAPF32=le=new Float32Array(t),u.HEAPF64=de=new Float64Array(t)}var pe,ye=[],ve=[],me=[];function Er(){if(u.preRun)for(typeof u.preRun=="function"&&(u.preRun=[u.preRun]);u.preRun.length;)xr(u.preRun.shift());Bt(ye)}function Ar(){Bt(ve)}function Dr(){if(u.postRun)for(typeof u.postRun=="function"&&(u.postRun=[u.postRun]);u.postRun.length;)Fr(u.postRun.shift());Bt(me)}function xr(t){ye.unshift(t)}function Sr(t){ve.unshift(t)}function Fr(t){me.unshift(t)}var it=0,mt=null;function Or(t){it++,u.monitorRunDependencies&&u.monitorRunDependencies(it)}function Mr(t){if(it--,u.monitorRunDependencies&&u.monitorRunDependencies(it),it==0&&mt){var e=mt;mt=null,e()}}function At(t){u.onAbort&&u.onAbort(t),t="Aborted("+t+")",L(t),Pt=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw P(e),e}var jr="data:application/octet-stream;base64,";function ge(t){return t.startsWith(jr)}var st;u.locateFile?(st="zxing_reader.wasm",ge(st)||(st=G(st))):st=new URL("/reader/zxing_reader.wasm",self.location).href;function we(t){if(t==st&&Y)return new Uint8Array(Y);if(J)return J(t);throw"both async and sync fetching of the wasm failed"}function Rr(t){return!Y&&(q||U)&&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(()=>we(t)):Promise.resolve().then(()=>we(t))}function $e(t,e,r){return Rr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{L("failed to asynchronously prepare wasm: "+n),At(n)})}function Ir(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!ge(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"),$e(e,r,n)})}):$e(e,r,n)}function Wr(){var t={a:Ta};function e(n,a){var o=n.exports;return E=o,Z=E.qa,he(),pe=E.ua,Sr(E.ra),Mr(),o}Or();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),P(n)}return Ir(Y,st,t,r).catch(P),{}}var Bt=t=>{for(;t.length>0;)t.shift()(u)},Dt=[],xt=0;function Hr(t){var e=new St(t);return e.get_caught()||(e.set_caught(!0),xt--),e.set_rethrown(!1),Dt.push(e),Xe(e.excPtr),e.get_exception_ptr()}var K=0;function kr(){g(0,0);var t=Dt.pop();Ge(t.excPtr),K=0}function St(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,Q[this.ptr+12>>0]=e},this.get_caught=function(){return Q[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,Q[this.ptr+13>>0]=e},this.get_rethrown=function(){return Q[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=Je(this.get_type());if(e)return S[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}function Br(t){throw K||(K=t),K}var Ut=t=>{var e=K;if(!e)return Tt(0),0;var r=new St(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(qe(o,n,i))return Tt(o),e}return Tt(n),e},Ur=()=>Ut([]),Vr=t=>Ut([t]),zr=(t,e)=>Ut([t,e]);function Lr(t){var e=new St(t).get_exception_ptr();return e}function Yr(){var t=Dt.pop();t||At("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(Dt.push(t),t.set_rethrown(!0),t.set_caught(!1),xt++),K=e,K}function Nr(t,e,r){var n=new St(t);throw n.init(e,r),K=t,xt++,K}function Gr(){return xt}var Ft={};function be(t){for(;t.length;){var e=t.pop(),r=t.pop();r(e)}}function gt(t){return this.fromWireType(R[t>>2])}var ht={},ut={},Ot={},Ce=void 0;function Mt(t){throw new Ce(t)}function ct(t,e,r){t.forEach(function(s){Ot[s]=e});function n(s){var f=r(s);f.length!==t.length&&Mt("Mismatched type converter count");for(var l=0;l<t.length;++l)tt(t[l],f[l])}var a=new Array(e.length),o=[],i=0;e.forEach((s,f)=>{ut.hasOwnProperty(s)?a[f]=ut[s]:(o.push(s),ht.hasOwnProperty(s)||(ht[s]=[]),ht[s].push(()=>{a[f]=ut[s],++i,i===o.length&&n(a)}))}),o.length===0&&n(a)}var Xr=function(t){var e=Ft[t];delete Ft[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((f,l)=>{var h=f.fieldName,y=i[l],m=f.getter,C=f.getterContext,A=i[l+a.length],I=f.setter,D=f.setterContext;s[h]={read:W=>y.fromWireType(m(C,W)),write:(W,d)=>{var p=[];I(D,W,A.toWireType(p,d)),be(p)}}}),[{name:e.name,fromWireType:function(f){var l={};for(var h in s)l[h]=s[h].read(f);return n(f),l},toWireType:function(f,l){for(var h in s)if(!(h in l))throw new TypeError(`Missing field: "${h}"`);var y=r();for(h in s)s[h].write(y,l[h]);return f!==null&&f.push(n,y),y},argPackAdvance:8,readValueFromPointer:gt,destructorFunction:n}]})};function qr(t,e,r,n,a){}function Vt(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError(`Unknown type size: ${t}`)}}function Jr(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);_e=t}var _e=void 0;function k(t){for(var e="",r=t;V[r];)e+=_e[V[r++]];return e}var pt=void 0;function _(t){throw new pt(t)}function Zr(t,e,r={}){var n=e.name;if(t||_(`type "${n}" must have a positive integer typeid pointer`),ut.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;_(`Cannot register type '${n}' twice`)}if(ut[t]=e,delete Ot[t],ht.hasOwnProperty(t)){var a=ht[t];delete ht[t],a.forEach(o=>o())}}function tt(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Zr(t,e,r)}function Qr(t,e,r,n,a){var o=Vt(r);e=k(e),tt(t,{name:e,fromWireType:function(i){return!!i},toWireType:function(i,s){return s?n:a},argPackAdvance:8,readValueFromPointer:function(i){var s;if(r===1)s=Q;else if(r===2)s=dt;else if(r===4)s=R;else throw new TypeError("Unknown boolean type size: "+e);return this.fromWireType(s[i>>o])},destructorFunction:null})}function Kr(t){if(!(this instanceof at)||!(t instanceof at))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,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}function tn(t){return{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}}function zt(t){function e(r){return r.$$.ptrType.registeredClass.name}_(e(t)+" instance already deleted")}var Lt=!1;function Te(t){}function en(t){t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)}function Pe(t){t.count.value-=1;var e=t.count.value===0;e&&en(t)}function Ee(t,e,r){if(e===r)return t;if(r.baseClass===void 0)return null;var n=Ee(t,e,r.baseClass);return n===null?null:r.downcast(n)}var Ae={};function rn(){return Object.keys(bt).length}function nn(){var t=[];for(var e in bt)bt.hasOwnProperty(e)&&t.push(bt[e]);return t}var wt=[];function Yt(){for(;wt.length;){var t=wt.pop();t.$$.deleteScheduled=!1,t.delete()}}var $t=void 0;function an(t){$t=t,wt.length&&$t&&$t(Yt)}function on(){u.getInheritedInstanceCount=rn,u.getLiveInheritedInstances=nn,u.flushPendingDeletes=Yt,u.setDelayFunction=an}var bt={};function sn(t,e){for(e===void 0&&_("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}function un(t,e){return e=sn(t,e),bt[e]}function jt(t,e){(!e.ptrType||!e.ptr)&&Mt("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&Mt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Ct(Object.create(t,{$$:{value:e}}))}function cn(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=un(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?jt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):jt(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var o=this.registeredClass.getActualType(e),i=Ae[o];if(!i)return a.call(this);var s;this.isConst?s=i.constPointerType:s=i.pointerType;var f=Ee(e,this.registeredClass,s.registeredClass);return f===null?a.call(this):this.isSmartPointer?jt(s.registeredClass.instancePrototype,{ptrType:s,ptr:f,smartPtrType:this,smartPtr:t}):jt(s.registeredClass.instancePrototype,{ptrType:s,ptr:f})}var Ct=function(t){return typeof FinalizationRegistry>"u"?(Ct=e=>e,t):(Lt=new FinalizationRegistry(e=>{Pe(e.$$)}),Ct=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Lt.register(e,a,e)}return e},Te=e=>Lt.unregister(e),Ct(t))};function fn(){if(this.$$.ptr||zt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=Ct(Object.create(Object.getPrototypeOf(this),{$$:{value:tn(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t}function ln(){this.$$.ptr||zt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&_("Object already scheduled for deletion"),Te(this),Pe(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function dn(){return!this.$$.ptr}function hn(){return this.$$.ptr||zt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&_("Object already scheduled for deletion"),wt.push(this),wt.length===1&&$t&&$t(Yt),this.$$.deleteScheduled=!0,this}function pn(){at.prototype.isAliasOf=Kr,at.prototype.clone=fn,at.prototype.delete=ln,at.prototype.isDeleted=dn,at.prototype.deleteLater=hn}function at(){}var yn=48,vn=57;function De(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 xe(t,e){return t=De(t),{[t]:function(){return e.apply(this,arguments)}}[t]}function Se(t,e,r){if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||_(`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}}function Fe(t,e,r){u.hasOwnProperty(t)?((r===void 0||u[t].overloadTable!==void 0&&u[t].overloadTable[r]!==void 0)&&_(`Cannot register public name '${t}' twice`),Se(u,t,t),u.hasOwnProperty(r)&&_(`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 mn(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=[]}function Nt(t,e,r){for(;e!==r;)e.upcast||_(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t}function gn(t,e){if(e===null)return this.isReference&&_(`null is not a valid ${this.name}`),0;e.$$||_(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||_(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Nt(e.$$.ptr,r,this.registeredClass);return n}function wn(t,e){var r;if(e===null)return this.isReference&&_(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;e.$$||_(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||_(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&_(`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=Nt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&_("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:_(`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,ot.toHandle(function(){a.delete()})),t!==null&&t.push(this.rawDestructor,r)}break;default:_("Unsupporting sharing policy")}return r}function $n(t,e){if(e===null)return this.isReference&&_(`null is not a valid ${this.name}`),0;e.$$||_(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||_(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&_(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Nt(e.$$.ptr,r,this.registeredClass);return n}function bn(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function Cn(t){this.rawDestructor&&this.rawDestructor(t)}function _n(t){t!==null&&t.delete()}function Tn(){et.prototype.getPointee=bn,et.prototype.destructor=Cn,et.prototype.argPackAdvance=8,et.prototype.readValueFromPointer=gt,et.prototype.deleteObject=_n,et.prototype.fromWireType=cn}function et(t,e,r,n,a,o,i,s,f,l,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=f,this.rawShare=l,this.rawDestructor=h,!a&&e.baseClass===void 0?n?(this.toWireType=gn,this.destructorFunction=null):(this.toWireType=$n,this.destructorFunction=null):this.toWireType=wn}function Oe(t,e,r){u.hasOwnProperty(t)||Mt("Replacing nonexistant public symbol"),u[t].overloadTable!==void 0&&r!==void 0?u[t].overloadTable[r]=e:(u[t]=e,u[t].argCount=r)}var Pn=(t,e,r)=>{var n=u["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},Rt=[],T=t=>{var e=Rt[t];return e||(t>=Rt.length&&(Rt.length=t+1),Rt[t]=e=pe.get(t)),e},En=(t,e,r)=>{if(t.includes("j"))return Pn(t,e,r);var n=T(e).apply(null,r);return n},An=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),En(t,e,r)}};function X(t,e){t=k(t);function r(){return t.includes("j")?An(t,e):T(e)}var n=r();return typeof n!="function"&&_(`unknown function pointer with signature ${t}: ${e}`),n}function Dn(t,e){var r=xe(e,function(n){this.name=e,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+` | ||
`+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}var Me=void 0;function je(t){var e=Ne(t),r=k(e);return rt(e),r}function It(t,e){var r=[],n={};function a(o){if(!n[o]&&!ut[o]){if(Ot[o]){Ot[o].forEach(a);return}r.push(o),n[o]=!0}}throw e.forEach(a),new Me(`${t}: `+r.map(je).join([", "]))}function xn(t,e,r,n,a,o,i,s,f,l,h,y,m){h=k(h),o=X(a,o),s&&(s=X(i,s)),l&&(l=X(f,l)),m=X(y,m);var C=De(h);Fe(C,function(){It(`Cannot construct ${h} due to unbound types`,[n])}),ct([t,e,r],n?[n]:[],function(A){A=A[0];var I,D;n?(I=A.registeredClass,D=I.instancePrototype):D=at.prototype;var W=xe(C,function(){if(Object.getPrototypeOf(this)!==d)throw new pt("Use 'new' to construct "+h);if(p.constructor_body===void 0)throw new pt(h+" has no accessible constructor");var kt=p.constructor_body[arguments.length];if(kt===void 0)throw new pt(`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(D,{constructor:{value:W}});W.prototype=d;var p=new mn(h,W,d,m,I,o,s,l);p.baseClass&&(p.baseClass.__derivedClasses===void 0&&(p.baseClass.__derivedClasses=[]),p.baseClass.__derivedClasses.push(p));var x=new et(h,p,!0,!1,!1),O=new et(h+"*",p,!1,!1,!1),ft=new et(h+" const*",p,!1,!0,!1);return Ae[t]={pointerType:O,constPointerType:ft},Oe(C,W),[x,O,ft]})}function Gt(t,e){for(var r=[],n=0;n<t;n++)r.push(S[e+n*4>>2]);return r}function Xt(t,e,r,n,a,o){var i=e.length;i<2&&_("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=e[1]!==null&&r!==null,f=!1,l=1;l<e.length;++l)if(e[l]!==null&&e[l].destructorFunction===void 0){f=!0;break}var h=e[0].name!=="void",y=i-2,m=new Array(y),C=[],A=[];return function(){arguments.length!==y&&_(`function ${t} called with ${arguments.length} arguments, expected ${y} args!`),A.length=0;var I;C.length=s?2:1,C[0]=a,s&&(I=e[1].toWireType(A,this),C[1]=I);for(var D=0;D<y;++D)m[D]=e[D+2].toWireType(A,arguments[D]),C.push(m[D]);var W=n.apply(null,C);function d(p){if(f)be(A);else for(var x=s?1:2;x<e.length;x++){var O=x===1?I:m[x-2];e[x].destructorFunction!==null&&e[x].destructorFunction(O)}if(h)return e[0].fromWireType(p)}return d(W)}}function Sn(t,e,r,n,a,o){var i=Gt(e,r);a=X(n,a),ct([],[t],function(s){s=s[0];var f=`constructor ${s.name}`;if(s.registeredClass.constructor_body===void 0&&(s.registeredClass.constructor_body=[]),s.registeredClass.constructor_body[e-1]!==void 0)throw new pt(`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]=()=>{It(`Cannot construct ${s.name} due to unbound types`,i)},ct([],i,function(l){return l.splice(1,0,null),s.registeredClass.constructor_body[e-1]=Xt(f,l,null,a,o),[]}),[]})}function Fn(t,e,r,n,a,o,i,s,f){var l=Gt(r,n);e=k(e),o=X(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 m(){It(`Cannot call ${y} due to unbound types`,l)}var C=h.registeredClass.instancePrototype,A=C[e];return A===void 0||A.overloadTable===void 0&&A.className!==h.name&&A.argCount===r-2?(m.argCount=r-2,m.className=h.name,C[e]=m):(Se(C,e,y),C[e].overloadTable[r-2]=m),ct([],l,function(I){var D=Xt(y,I,h,o,i);return C[e].overloadTable===void 0?(D.argCount=r-2,C[e]=D):C[e].overloadTable[r-2]=D,[]}),[]})}function On(){Object.assign(Re.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 Re(){this.allocated=[void 0],this.freelist=[]}var N=new Re;function Ie(t){t>=N.reserved&&--N.get(t).refcount===0&&N.free(t)}function Mn(){for(var t=0,e=N.reserved;e<N.allocated.length;++e)N.allocated[e]!==void 0&&++t;return t}function jn(){N.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),N.reserved=N.allocated.length,u.count_emval_handles=Mn}var ot={toValue:t=>(t||_("Cannot use deleted val. handle = "+t),N.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 N.allocate({refcount:1,value:t})}}};function Rn(t,e){e=k(e),tt(t,{name:e,fromWireType:function(r){var n=ot.toValue(r);return Ie(r),n},toWireType:function(r,n){return ot.toHandle(n)},argPackAdvance:8,readValueFromPointer:gt,destructorFunction:null})}function qt(t){if(t===null)return"null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t}function In(t,e){switch(e){case 2:return function(r){return this.fromWireType(le[r>>2])};case 3:return function(r){return this.fromWireType(de[r>>3])};default:throw new TypeError("Unknown float type: "+t)}}function Wn(t,e,r){var n=Vt(r);e=k(e),tt(t,{name:e,fromWireType:function(a){return a},toWireType:function(a,o){return o},argPackAdvance:8,readValueFromPointer:In(e,n),destructorFunction:null})}function Hn(t,e,r,n,a,o,i){var s=Gt(e,r);t=k(t),a=X(n,a),Fe(t,function(){It(`Cannot call ${t} due to unbound types`,s)},e-1),ct([],s,function(f){var l=[f[0],null].concat(f.slice(1));return Oe(t,Xt(t,l,null,a,o),e-1),[]})}function kn(t,e,r){switch(e){case 0:return r?function(n){return Q[n]}:function(n){return V[n]};case 1:return r?function(n){return dt[n>>1]}:function(n){return Et[n>>1]};case 2:return r?function(n){return R[n>>2]}:function(n){return S[n>>2]};default:throw new TypeError("Unknown integer type: "+t)}}function Bn(t,e,r,n,a){e=k(e);var o=Vt(r),i=y=>y;if(n===0){var s=32-8*r;i=y=>y<<s>>>s}var f=e.includes("unsigned"),l=(y,m)=>{},h;f?h=function(y,m){return l(m,this.name),m>>>0}:h=function(y,m){return l(m,this.name),m},tt(t,{name:e,fromWireType:i,toWireType:h,argPackAdvance:8,readValueFromPointer:kn(e,o,n!==0),destructorFunction:null})}function Un(t,e,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function o(i){i=i>>2;var s=S,f=s[i],l=s[i+1];return new a(s.buffer,l,f)}r=k(r),tt(t,{name:r,fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})}var We=(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 f=t.charCodeAt(++i);s=65536+((s&1023)<<10)|f&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},Vn=(t,e,r)=>We(t,V,e,r),He=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},ke=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,zn=(t,e,r)=>{for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&ke)return ke.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 f=t[e++]&63;if((i&240)==224?i=(i&15)<<12|s<<6|f:i=(i&7)<<18|s<<12|f<<6|t[e++]&63,i<65536)o+=String.fromCharCode(i);else{var l=i-65536;o+=String.fromCharCode(55296|l>>10,56320|l&1023)}}return o},Jt=(t,e)=>t?zn(V,t,e):"";function Ln(t,e){e=k(e);var r=e==="std::string";tt(t,{name:e,fromWireType:function(n){var a=S[n>>2],o=n+4,i;if(r)for(var s=o,f=0;f<=a;++f){var l=o+f;if(f==a||V[l]==0){var h=l-s,y=Jt(s,h);i===void 0?i=y:(i+=String.fromCharCode(0),i+=y),s=l+1}}else{for(var m=new Array(a),f=0;f<a;++f)m[f]=String.fromCharCode(V[o+f]);i=m.join("")}return rt(n),i},toWireType:function(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||_("Cannot pass non-string to std::string"),r&&i?o=He(a):o=a.length;var s=Qt(4+o+1),f=s+4;if(S[s>>2]=o,r&&i)Vn(a,f,o+1);else if(i)for(var l=0;l<o;++l){var h=a.charCodeAt(l);h>255&&(rt(f),_("String has UTF-16 code units that do not fit in 8 bits")),V[f+l]=h}else for(var l=0;l<o;++l)V[f+l]=a[l];return n!==null&&n.push(rt,s),s},argPackAdvance:8,readValueFromPointer:gt,destructorFunction:function(n){rt(n)}})}var Be=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Yn=(t,e)=>{for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&Et[n];)++n;if(r=n<<1,r-t>32&&Be)return Be.decode(V.subarray(t,r));for(var o="",i=0;!(i>=e/2);++i){var s=dt[t+i*2>>1];if(s==0)break;o+=String.fromCharCode(s)}return o},Nn=(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);dt[e>>1]=i,e+=2}return dt[e>>1]=0,e-n},Gn=t=>t.length*2,Xn=(t,e)=>{for(var r=0,n="";!(r>=e/4);){var a=R[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},qn=(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(R[e>>2]=i,e+=4,e+4>a)break}return R[e>>2]=0,e-n},Jn=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},Zn=function(t,e,r){r=k(r);var n,a,o,i,s;e===2?(n=Yn,a=Nn,i=Gn,o=()=>Et,s=1):e===4&&(n=Xn,a=qn,i=Jn,o=()=>S,s=2),tt(t,{name:r,fromWireType:function(f){for(var l=S[f>>2],h=o(),y,m=f+4,C=0;C<=l;++C){var A=f+4+C*e;if(C==l||h[A>>s]==0){var I=A-m,D=n(m,I);y===void 0?y=D:(y+=String.fromCharCode(0),y+=D),m=A+e}}return rt(f),y},toWireType:function(f,l){typeof l!="string"&&_(`Cannot pass non-string to C++ string type ${r}`);var h=i(l),y=Qt(4+h+e);return S[y>>2]=h>>s,a(l,y+4,h+e),f!==null&&f.push(rt,y),y},argPackAdvance:8,readValueFromPointer:gt,destructorFunction:function(f){rt(f)}})};function Qn(t,e,r,n,a,o){Ft[t]={name:k(e),rawConstructor:X(r,n),rawDestructor:X(a,o),fields:[]}}function Kn(t,e,r,n,a,o,i,s,f,l){Ft[t].fields.push({fieldName:k(e),getterReturnType:r,getter:X(n,a),getterContext:o,setterArgumentType:i,setter:X(s,f),setterContext:l})}function ta(t,e){e=k(e),tt(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:function(){},toWireType:function(r,n){}})}var ea={};function ra(t){var e=ea[t];return e===void 0?k(t):e}function Ue(){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.")}function na(t){return t===0?ot.toHandle(Ue()):(t=ra(t),ot.toHandle(Ue()[t]))}function aa(t){t>4&&(N.get(t).refcount+=1)}function Ve(t,e){var r=ut[t];return r===void 0&&_(e+" has unknown type "+je(t)),r}function oa(t){var e=new Array(t+1);return function(r,n,a){e[0]=r;for(var o=0;o<t;++o){var i=Ve(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 ot.toHandle(s)}}var ze={};function ia(t,e,r,n){t=ot.toValue(t);var a=ze[e];return a||(a=oa(e),ze[e]=a),a(t,r,n)}function sa(t,e){t=Ve(t,"_emval_take_value");var r=t.readValueFromPointer(e);return ot.toHandle(r)}var ua=()=>{At("")},ca=(t,e,r)=>V.copyWithin(t,e,e+r),fa=()=>2147483648,la=t=>{var e=Z.buffer,r=t-e.byteLength+65535>>>16;try{return Z.grow(r),he(),1}catch{}},da=t=>{var e=V.length;t>>>=0;var r=fa();if(t>r)return!1;for(var n=(f,l)=>f+(l-f%l)%l,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=la(i);if(s)return!0}return!1},Zt={},ha=()=>M||"./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,_:ha()};for(var r in Zt)Zt[r]===void 0?delete e[r]:e[r]=Zt[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);_t.strings=n}return _t.strings},pa=(t,e)=>{for(var r=0;r<t.length;++r)Q[e++>>0]=t.charCodeAt(r);Q[e>>0]=0},ya=(t,e)=>{var r=0;return _t().forEach(function(n,a){var o=e+r;S[t+a*4>>2]=o,pa(n,o),r+=n.length+1}),0},va=(t,e)=>{var r=_t();S[t>>2]=r.length;var n=0;return r.forEach(function(a){n+=a.length+1}),S[e>>2]=n,0};function ma(t){return t}var Wt=t=>t%4===0&&(t%100!==0||t%400===0),ga=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},Le=[31,29,31,30,31,30,31,31,30,31,30,31],Ye=[31,28,31,30,31,30,31,31,30,31,30,31],wa=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=Wt(r.getFullYear()),a=r.getMonth(),o=(n?Le:Ye)[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 $a(t,e,r){var n=r>0?r:He(t)+1,a=new Array(n),o=We(t,a,0,a.length);return e&&(a.length=o),a}var ba=(t,e)=>{Q.set(t,e)},Ca=(t,e,r,n)=>{var a=R[n+40>>2],o={tm_sec:R[n>>2],tm_min:R[n+4>>2],tm_hour:R[n+8>>2],tm_mday:R[n+12>>2],tm_mon:R[n+16>>2],tm_year:R[n+20>>2],tm_wday:R[n+24>>2],tm_yday:R[n+28>>2],tm_isdst:R[n+32>>2],tm_gmtoff:R[n+36>>2],tm_zone:a?Jt(a):""},i=Jt(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 f in s)i=i.replace(new RegExp(f,"g"),s[f]);var l=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h=["January","February","March","April","May","June","July","August","September","October","November","December"];function y(d,p,x){for(var O=typeof d=="number"?d.toString():d||"";O.length<p;)O=x[0]+O;return O}function m(d,p){return y(d,p,"0")}function C(d,p){function x(ft){return ft<0?-1:ft>0?1:0}var O;return(O=x(d.getFullYear()-p.getFullYear()))===0&&(O=x(d.getMonth()-p.getMonth()))===0&&(O=x(d.getDate()-p.getDate())),O}function A(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 I(d){var p=wa(new Date(d.tm_year+1900,0,1),d.tm_yday),x=new Date(p.getFullYear(),0,4),O=new Date(p.getFullYear()+1,0,4),ft=A(x),kt=A(O);return C(ft,p)<=0?C(kt,p)<=0?p.getFullYear()+1:p.getFullYear():p.getFullYear()-1}var D={"%a":d=>l[d.tm_wday].substring(0,3),"%A":d=>l[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 m(p/100|0,2)},"%d":d=>m(d.tm_mday,2),"%e":d=>y(d.tm_mday,2," "),"%g":d=>I(d).toString().substring(2),"%G":d=>I(d),"%H":d=>m(d.tm_hour,2),"%I":d=>{var p=d.tm_hour;return p==0?p=12:p>12&&(p-=12),m(p,2)},"%j":d=>m(d.tm_mday+ga(Wt(d.tm_year+1900)?Le:Ye,d.tm_mon-1),3),"%m":d=>m(d.tm_mon+1,2),"%M":d=>m(d.tm_min,2),"%n":()=>` | ||
`,"%p":d=>d.tm_hour>=0&&d.tm_hour<12?"AM":"PM","%S":d=>m(d.tm_sec,2),"%t":()=>" ","%u":d=>d.tm_wday||7,"%U":d=>{var p=d.tm_yday+7-d.tm_wday;return m(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 x=(d.tm_wday+371-d.tm_yday)%7;x!=4&&(x!=3||!Wt(d.tm_year))&&(p=1)}}else{p=52;var O=(d.tm_wday+7-d.tm_yday-1)%7;(O==4||O==5&&Wt(d.tm_year%400-1))&&p++}return m(p,2)},"%w":d=>d.tm_wday,"%W":d=>{var p=d.tm_yday+7-(d.tm_wday+6)%7;return m(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,x=p>=0;return p=Math.abs(p)/60,p=p/60*100+p%60,(x?"+":"-")+("0000"+p).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};i=i.replace(/%%/g,"\0\0");for(var f in D)i.includes(f)&&(i=i.replace(new RegExp(f,"g"),D[f](o)));i=i.replace(/\0\0/g,"%");var W=$a(i,!1);return W.length>e?0:(ba(W,t),W.length-1)},_a=(t,e,r,n,a)=>Ca(t,e,r,n);Ce=u.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},Jr(),pt=u.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},pn(),on(),Tn(),Me=u.UnboundTypeError=Dn(Error,"UnboundTypeError"),On(),jn();var Ta={q:Hr,u:kr,a:Ur,h:Vr,l:zr,I:Lr,P:Yr,n:Nr,ba:Gr,d:Br,oa:Xr,Y:qr,fa:Qr,na:xn,ma:Sn,D:Fn,ea:Rn,W:Wn,J:Hn,w:Bn,s:Un,V:Ln,L:Zn,Q:Qn,pa:Kn,ga:ta,U:Ie,la:na,R:aa,ia,ka:sa,K:ua,da:ca,ca:da,$:ya,aa:va,H:za,T:Qa,B:Ya,p:Ba,b:Pa,C:Va,ha:Ga,c:Sa,j:Oa,i:Da,x:La,O:Ua,v:Ha,G:qa,N:Ja,A:Na,F:Ka,Z:eo,X:ro,k:Fa,f:xa,e:Aa,g:Ea,M:Za,m:Wa,o:Ma,S:ja,t:Ia,ja:ka,y:Xa,r:Ra,E:to,z:ma,_:_a};Wr();var rt=u._free=t=>(rt=u._free=E.sa)(t),Qt=u._malloc=t=>(Qt=u._malloc=E.ta)(t),Ne=t=>(Ne=E.va)(t);u.__embind_initialize_bindings=()=>(u.__embind_initialize_bindings=E.wa)();var g=(t,e)=>(g=E.xa)(t,e),Tt=t=>(Tt=E.ya)(t),$=()=>($=E.za)(),b=t=>(b=E.Aa)(t),Ge=t=>(Ge=E.Ba)(t),Xe=t=>(Xe=E.Ca)(t),qe=(t,e,r)=>(qe=E.Da)(t,e,r),Je=t=>(Je=E.Ea)(t);u.dynCall_viijii=(t,e,r,n,a,o,i)=>(u.dynCall_viijii=E.Fa)(t,e,r,n,a,o,i);var Ze=u.dynCall_jiii=(t,e,r,n)=>(Ze=u.dynCall_jiii=E.Ga)(t,e,r,n),Qe=u.dynCall_jiiii=(t,e,r,n,a)=>(Qe=u.dynCall_jiiii=E.Ha)(t,e,r,n,a);u.dynCall_iiiiij=(t,e,r,n,a,o,i)=>(u.dynCall_iiiiij=E.Ia)(t,e,r,n,a,o,i),u.dynCall_iiiiijj=(t,e,r,n,a,o,i,s,f)=>(u.dynCall_iiiiijj=E.Ja)(t,e,r,n,a,o,i,s,f),u.dynCall_iiiiiijj=(t,e,r,n,a,o,i,s,f,l)=>(u.dynCall_iiiiiijj=E.Ka)(t,e,r,n,a,o,i,s,f,l);function Pa(t,e){var r=$();try{return T(t)(e)}catch(n){if(b(r),n!==n+0)throw n;g(1,0)}}function Ea(t,e,r,n){var a=$();try{T(t)(e,r,n)}catch(o){if(b(a),o!==o+0)throw o;g(1,0)}}function Aa(t,e,r){var n=$();try{T(t)(e,r)}catch(a){if(b(n),a!==a+0)throw a;g(1,0)}}function Da(t,e,r,n,a){var o=$();try{return T(t)(e,r,n,a)}catch(i){if(b(o),i!==i+0)throw i;g(1,0)}}function xa(t,e){var r=$();try{T(t)(e)}catch(n){if(b(r),n!==n+0)throw n;g(1,0)}}function Sa(t,e,r){var n=$();try{return T(t)(e,r)}catch(a){if(b(n),a!==a+0)throw a;g(1,0)}}function Fa(t){var e=$();try{T(t)()}catch(r){if(b(e),r!==r+0)throw r;g(1,0)}}function Oa(t,e,r,n){var a=$();try{return T(t)(e,r,n)}catch(o){if(b(a),o!==o+0)throw o;g(1,0)}}function Ma(t,e,r,n,a,o){var i=$();try{T(t)(e,r,n,a,o)}catch(s){if(b(i),s!==s+0)throw s;g(1,0)}}function ja(t,e,r,n,a,o,i){var s=$();try{T(t)(e,r,n,a,o,i)}catch(f){if(b(s),f!==f+0)throw f;g(1,0)}}function Ra(t,e,r,n,a,o,i,s,f,l,h){var y=$();try{T(t)(e,r,n,a,o,i,s,f,l,h)}catch(m){if(b(y),m!==m+0)throw m;g(1,0)}}function Ia(t,e,r,n,a,o,i,s){var f=$();try{T(t)(e,r,n,a,o,i,s)}catch(l){if(b(f),l!==l+0)throw l;g(1,0)}}function Wa(t,e,r,n,a){var o=$();try{T(t)(e,r,n,a)}catch(i){if(b(o),i!==i+0)throw i;g(1,0)}}function Ha(t,e,r,n,a,o,i){var s=$();try{return T(t)(e,r,n,a,o,i)}catch(f){if(b(s),f!==f+0)throw f;g(1,0)}}function ka(t,e,r,n,a,o,i,s,f){var l=$();try{T(t)(e,r,n,a,o,i,s,f)}catch(h){if(b(l),h!==h+0)throw h;g(1,0)}}function Ba(t){var e=$();try{return T(t)()}catch(r){if(b(e),r!==r+0)throw r;g(1,0)}}function Ua(t,e,r,n,a,o,i){var s=$();try{return T(t)(e,r,n,a,o,i)}catch(f){if(b(s),f!==f+0)throw f;g(1,0)}}function Va(t,e,r,n){var a=$();try{return T(t)(e,r,n)}catch(o){if(b(a),o!==o+0)throw o;g(1,0)}}function za(t,e,r,n){var a=$();try{return T(t)(e,r,n)}catch(o){if(b(a),o!==o+0)throw o;g(1,0)}}function La(t,e,r,n,a,o){var i=$();try{return T(t)(e,r,n,a,o)}catch(s){if(b(i),s!==s+0)throw s;g(1,0)}}function Ya(t,e,r,n,a,o){var i=$();try{return T(t)(e,r,n,a,o)}catch(s){if(b(i),s!==s+0)throw s;g(1,0)}}function Na(t,e,r,n,a,o,i,s,f,l){var h=$();try{return T(t)(e,r,n,a,o,i,s,f,l)}catch(y){if(b(h),y!==y+0)throw y;g(1,0)}}function Ga(t,e,r){var n=$();try{return T(t)(e,r)}catch(a){if(b(n),a!==a+0)throw a;g(1,0)}}function Xa(t,e,r,n,a,o,i,s,f,l){var h=$();try{T(t)(e,r,n,a,o,i,s,f,l)}catch(y){if(b(h),y!==y+0)throw y;g(1,0)}}function qa(t,e,r,n,a,o,i,s){var f=$();try{return T(t)(e,r,n,a,o,i,s)}catch(l){if(b(f),l!==l+0)throw l;g(1,0)}}function Ja(t,e,r,n,a,o,i,s,f){var l=$();try{return T(t)(e,r,n,a,o,i,s,f)}catch(h){if(b(l),h!==h+0)throw h;g(1,0)}}function Za(t,e,r,n,a,o,i){var s=$();try{T(t)(e,r,n,a,o,i)}catch(f){if(b(s),f!==f+0)throw f;g(1,0)}}function Qa(t,e,r,n){var a=$();try{return T(t)(e,r,n)}catch(o){if(b(a),o!==o+0)throw o;g(1,0)}}function Ka(t,e,r,n,a,o,i,s,f,l,h,y){var m=$();try{return T(t)(e,r,n,a,o,i,s,f,l,h,y)}catch(C){if(b(m),C!==C+0)throw C;g(1,0)}}function to(t,e,r,n,a,o,i,s,f,l,h,y,m,C,A,I){var D=$();try{T(t)(e,r,n,a,o,i,s,f,l,h,y,m,C,A,I)}catch(W){if(b(D),W!==W+0)throw W;g(1,0)}}function eo(t,e,r,n){var a=$();try{return Ze(t,e,r,n)}catch(o){if(b(a),o!==o+0)throw o;g(1,0)}}function ro(t,e,r,n,a){var o=$();try{return Qe(t,e,r,n,a)}catch(i){if(b(o),i!==i+0)throw i;g(1,0)}}var Ht;mt=function t(){Ht||Ke(),Ht||(mt=t)};function Ke(){if(it>0||(Er(),it>0))return;function t(){Ht||(Ht=!0,u.calledRun=!0,!Pt&&(Ar(),w(u),u.onRuntimeInitialized&&u.onRuntimeInitialized(),Dr()))}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 Ke(),v.ready}})();function Cr(c){return ie(ce,c)}async function _r(c,{tryHarder:v=nt.tryHarder,formats:u=nt.formats,maxSymbols:w=nt.maxSymbols}=nt){return wr(c,{tryHarder:v,formats:u,maxSymbols:w},ce)}const fe=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 Tr(c){for(const[v,u]of fe)if(c===u)return v;return"unknown"}class Pr{constructor(v={}){rr(this,vt,void 0);var u;try{const w=(u=v==null?void 0:v.formats)==null?void 0:u.filter(P=>P!=="unknown");if((w==null?void 0:w.length)===0)throw new TypeError("Hint option provided, but is empty.");w==null||w.forEach(P=>{if(!B.includes(P))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${P}' is not a valid enum value of type BarcodeFormat.`)}),Cr().catch(()=>{}),nr(this,vt,w??[])}catch(w){throw ae(w,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return B.filter(v=>v!=="unknown")}async detect(v){try{const u=await fr(v);if(u===null)return[];let w;try{w=await _r(u,{tryHarder:!0,formats:er(this,vt).map(P=>fe.get(P))})}catch{throw new DOMException("Barcode detection service unavailable. Use 'setZXingModuleOverrides' in offline or strict CSP environments.","NotSupportedError")}return w.map(P=>{const{topLeft:{x:F,y:M},topRight:{x:q,y:U},bottomLeft:{x:j,y:G},bottomRight:{x:J,y:L}}=P.position,Y=Math.min(F,q,j,J),Z=Math.min(M,U,G,L),E=Math.max(F,q,j,J),Pt=Math.max(M,U,G,L);return{boundingBox:new DOMRectReadOnly(Y,Z,E-Y,Pt-Z),rawValue:new TextDecoder().decode(P.bytes),format:Tr(P.format),cornerPoints:[{x:F,y:M},{x:q,y:U},{x:J,y:L},{x:j,y:G}]}})}catch(u){throw ae(u,"Failed to execute 'detect' on 'BarcodeDetector'")}}}return vt=new WeakMap,globalThis.BarcodeDetector??(globalThis.BarcodeDetector=Pr),H.setZXingModuleOverrides=gr,Object.defineProperty(H,Symbol.toStringTag,{value:"Module"}),H}({}); | ||
var tr=(H,B,z)=>{if(!B.has(H))throw TypeError("Cannot "+z)};var er=(H,B,z)=>(tr(H,B,"read from private field"),z?z.call(H):B.get(H)),rr=(H,B,z)=>{if(B.has(H))throw TypeError("Cannot add the same private member more than once");B instanceof WeakSet?B.add(H):B.set(H,z)},nr=(H,B,z,yt)=>(tr(H,B,"write to private field"),yt?yt.call(H,z):B.set(H,z),z);var BarcodeDetectionAPI=function(H){var vt;"use strict";const B=["aztec","code_128","code_39","code_93","codabar","data_matrix","ean_13","ean_8","itf","pdf417","qr_code","upc_a","upc_e","unknown"];function z(c){if(yt(c))return{width:c.naturalWidth,height:c.naturalHeight};if(Kt(c))return{width:c.width.baseVal.value,height:c.height.baseVal.value};if(te(c))return{width:c.videoWidth,height:c.videoHeight};if(ar(c))return{width:c.width,height:c.height};if(ee(c))return{width:c.width,height:c.height};if(or(c))return{width:c.width,height:c.height};if(re(c))return{width:c.displayWidth,height:c.displayHeight};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 yt(c){try{return c instanceof HTMLImageElement}catch{return!1}}function Kt(c){try{return c instanceof SVGImageElement}catch{return!1}}function te(c){try{return c instanceof HTMLVideoElement}catch{return!1}}function ar(c){try{return c instanceof HTMLCanvasElement}catch{return!1}}function ee(c){try{return c instanceof ImageBitmap}catch{return!1}}function or(c){try{return c instanceof OffscreenCanvas}catch{return!1}}function re(c){try{return c instanceof VideoFrame}catch{return!1}}function ir(c){try{return c instanceof Blob}catch{return!1}}function sr(c){try{return c instanceof ImageData}catch{return!1}}function ur(c,v){try{const u=new OffscreenCanvas(c,v);if(u.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return u;throw void 0}catch{const u=document.createElement("canvas");return u.width=c,u.height=v,u}}async function ne(c){if(yt(c)&&!await lr(c))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(Kt(c)&&!await dr(c))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(re(c)&&hr(c))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(te(c)&&(c.readyState===0||c.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(ee(c)&&yr(c))throw new DOMException("The image source is detached.","InvalidStateError");const{width:v,height:u}=z(c);if(v===0||u===0)return null;const P=ur(v,u).getContext("2d");P.drawImage(c,0,0);try{return P.getImageData(0,0,v,u)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function cr(c){let v;try{v=await createImageBitmap(c)}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await ne(v)}async function fr(c){if(ir(c))return await cr(c);if(sr(c)){if(pr(c))throw new DOMException("The image data has been detached.","InvalidStateError");return c}return await ne(c)}async function lr(c){try{return await c.decode(),!0}catch{return!1}}async function dr(c){var v;try{return await((v=c.decode)==null?void 0:v.call(c)),!0}catch{return!1}}function hr(c){return c.format===null}function pr(c){return c.data.buffer.byteLength===0}function yr(c){return c.width===0&&c.height===0}function ae(c,v){return c instanceof DOMException?new DOMException(`${v}: ${c.message}`,c.name):c instanceof Error?new c.constructor(`${v}: ${c.message}`):new Error(`${v}: ${c}`)}const oe=c=>{let v;const u=new Set,w=(M,q)=>{const U=typeof M=="function"?M(v):M;if(!Object.is(U,v)){const j=v;v=q??typeof U!="object"?U:Object.assign({},v,U),u.forEach(G=>G(v,j))}},P=()=>v,F={setState:w,getState:P,subscribe:M=>(u.add(M),()=>u.delete(M)),destroy:()=>{u.clear()}};return v=c(w,P,F),F},vr=c=>c?oe(c):oe,mr={locateFile:(c,v)=>{var u;const w=(u=c.match(/_(.+?)\.wasm$/))==null?void 0:u[1];return w?`https://cdn.jsdelivr.net/npm/@sec-ant/zxing-wasm@2.1.3/dist/${w}/${c}`:v+c}},lt=vr()(()=>({zxingModuleWeakMap:new WeakMap,zxingModuleOverrides:mr}));function gr(c){lt.setState({zxingModuleOverrides:c})}function ie(c,v=lt.getState().zxingModuleOverrides){const{zxingModuleWeakMap:u}=lt.getState(),w=u.get(c);if(w&&Object.is(v,lt.getState().zxingModuleOverrides))return w;{lt.setState({zxingModuleOverrides:v});const P=c(v);return u.set(c,P),P}}const se=["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"],nt={tryHarder:!0,formats:[],maxSymbols:255};async function wr(c,{tryHarder:v=nt.tryHarder,formats:u=nt.formats,maxSymbols:w=nt.maxSymbols}=nt,P){const F=await ie(P,lt.getState().zxingModuleOverrides),{data:M,width:q,height:U,data:{byteLength:j}}=c,G=F._malloc(j);F.HEAP8.set(M,G);const J=F.readBarcodesFromPixmap(G,q,U,v,$r(u),w);F._free(G);const L=[];for(let Y=0;Y<J.size();++Y){const Z=J.get(Y);L.push({...Z,format:br(Z.format)})}return L}function $r(c){return c.join("|")}function br(c){const v=ue(c);let u=0,w=se.length-1;for(;u<=w;){const P=Math.floor((u+w)/2),F=se[P],M=ue(F);if(M===v)return F;M<v?u=P+1:w=P-1}return"None"}function ue(c){return c.toLowerCase().replace(/_-\[\]/g,"")}var ce=(()=>{var c=document.currentScript&&document.currentScript.src||new URL("side-effects.js",document.baseURI).href;return function(v={}){var u=v,w,P;u.ready=new Promise((t,e)=>{w=t,P=e});var F=Object.assign({},u),M="./this.program",q=typeof window=="object",U=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var j="";function G(t){return u.locateFile?u.locateFile(t,j):j+t}var J;(q||U)&&(U?j=self.location.href:typeof document<"u"&&document.currentScript&&(j=document.currentScript.src),c&&(j=c),j.indexOf("blob:")!==0?j=j.substr(0,j.replace(/[?#].*/,"").lastIndexOf("/")+1):j="",U&&(J=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,F),F=null,u.arguments&&u.arguments,u.thisProgram&&(M=u.thisProgram),u.quit&&u.quit;var Y;u.wasmBinary&&(Y=u.wasmBinary),u.noExitRuntime,typeof WebAssembly!="object"&&At("no native wasm support detected");var Z,E,Pt=!1,Q,V,dt,Et,R,x,le,de;function he(){var t=Z.buffer;u.HEAP8=Q=new Int8Array(t),u.HEAP16=dt=new Int16Array(t),u.HEAP32=R=new Int32Array(t),u.HEAPU8=V=new Uint8Array(t),u.HEAPU16=Et=new Uint16Array(t),u.HEAPU32=x=new Uint32Array(t),u.HEAPF32=le=new Float32Array(t),u.HEAPF64=de=new Float64Array(t)}var pe,ye=[],ve=[],me=[];function Er(){if(u.preRun)for(typeof u.preRun=="function"&&(u.preRun=[u.preRun]);u.preRun.length;)Sr(u.preRun.shift());Bt(ye)}function Ar(){Bt(ve)}function Dr(){if(u.postRun)for(typeof u.postRun=="function"&&(u.postRun=[u.postRun]);u.postRun.length;)Fr(u.postRun.shift());Bt(me)}function Sr(t){ye.unshift(t)}function xr(t){ve.unshift(t)}function Fr(t){me.unshift(t)}var it=0,mt=null;function Or(t){it++,u.monitorRunDependencies&&u.monitorRunDependencies(it)}function Mr(t){if(it--,u.monitorRunDependencies&&u.monitorRunDependencies(it),it==0&&mt){var e=mt;mt=null,e()}}function At(t){u.onAbort&&u.onAbort(t),t="Aborted("+t+")",L(t),Pt=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw P(e),e}var jr="data:application/octet-stream;base64,";function ge(t){return t.startsWith(jr)}var st;u.locateFile?(st="zxing_reader.wasm",ge(st)||(st=G(st))):st=new URL("/reader/zxing_reader.wasm",self.location).href;function we(t){if(t==st&&Y)return new Uint8Array(Y);if(J)return J(t);throw"both async and sync fetching of the wasm failed"}function Rr(t){return!Y&&(q||U)&&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(()=>we(t)):Promise.resolve().then(()=>we(t))}function $e(t,e,r){return Rr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{L("failed to asynchronously prepare wasm: "+n),At(n)})}function Ir(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!ge(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"),$e(e,r,n)})}):$e(e,r,n)}function Wr(){var t={a:Ta};function e(n,a){var o=n.exports;return E=o,Z=E.qa,he(),pe=E.ua,xr(E.ra),Mr(),o}Or();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),P(n)}return Ir(Y,st,t,r).catch(P),{}}var Bt=t=>{for(;t.length>0;)t.shift()(u)},Dt=[],St=0;function Hr(t){var e=new xt(t);return e.get_caught()||(e.set_caught(!0),St--),e.set_rethrown(!1),Dt.push(e),Xe(e.excPtr),e.get_exception_ptr()}var K=0;function kr(){g(0,0);var t=Dt.pop();Ge(t.excPtr),K=0}function xt(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(e){x[this.ptr+4>>2]=e},this.get_type=function(){return x[this.ptr+4>>2]},this.set_destructor=function(e){x[this.ptr+8>>2]=e},this.get_destructor=function(){return x[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,Q[this.ptr+12>>0]=e},this.get_caught=function(){return Q[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,Q[this.ptr+13>>0]=e},this.get_rethrown=function(){return Q[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){x[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return x[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=Je(this.get_type());if(e)return x[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}function Br(t){throw K||(K=t),K}var Ut=t=>{var e=K;if(!e)return Tt(0),0;var r=new xt(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(qe(o,n,i))return Tt(o),e}return Tt(n),e},Ur=()=>Ut([]),Vr=t=>Ut([t]),zr=(t,e)=>Ut([t,e]);function Lr(t){var e=new xt(t).get_exception_ptr();return e}function Yr(){var t=Dt.pop();t||At("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(Dt.push(t),t.set_rethrown(!0),t.set_caught(!1),St++),K=e,K}function Nr(t,e,r){var n=new xt(t);throw n.init(e,r),K=t,St++,K}function Gr(){return St}var Ft={};function be(t){for(;t.length;){var e=t.pop(),r=t.pop();r(e)}}function gt(t){return this.fromWireType(R[t>>2])}var ht={},ut={},Ot={},Ce=void 0;function Mt(t){throw new Ce(t)}function ct(t,e,r){t.forEach(function(s){Ot[s]=e});function n(s){var f=r(s);f.length!==t.length&&Mt("Mismatched type converter count");for(var l=0;l<t.length;++l)tt(t[l],f[l])}var a=new Array(e.length),o=[],i=0;e.forEach((s,f)=>{ut.hasOwnProperty(s)?a[f]=ut[s]:(o.push(s),ht.hasOwnProperty(s)||(ht[s]=[]),ht[s].push(()=>{a[f]=ut[s],++i,i===o.length&&n(a)}))}),o.length===0&&n(a)}var Xr=function(t){var e=Ft[t];delete Ft[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((f,l)=>{var h=f.fieldName,y=i[l],m=f.getter,C=f.getterContext,A=i[l+a.length],I=f.setter,D=f.setterContext;s[h]={read:W=>y.fromWireType(m(C,W)),write:(W,d)=>{var p=[];I(D,W,A.toWireType(p,d)),be(p)}}}),[{name:e.name,fromWireType:function(f){var l={};for(var h in s)l[h]=s[h].read(f);return n(f),l},toWireType:function(f,l){for(var h in s)if(!(h in l))throw new TypeError(`Missing field: "${h}"`);var y=r();for(h in s)s[h].write(y,l[h]);return f!==null&&f.push(n,y),y},argPackAdvance:8,readValueFromPointer:gt,destructorFunction:n}]})};function qr(t,e,r,n,a){}function Vt(t){switch(t){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError(`Unknown type size: ${t}`)}}function Jr(){for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);_e=t}var _e=void 0;function k(t){for(var e="",r=t;V[r];)e+=_e[V[r++]];return e}var pt=void 0;function _(t){throw new pt(t)}function Zr(t,e,r={}){var n=e.name;if(t||_(`type "${n}" must have a positive integer typeid pointer`),ut.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;_(`Cannot register type '${n}' twice`)}if(ut[t]=e,delete Ot[t],ht.hasOwnProperty(t)){var a=ht[t];delete ht[t],a.forEach(o=>o())}}function tt(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Zr(t,e,r)}function Qr(t,e,r,n,a){var o=Vt(r);e=k(e),tt(t,{name:e,fromWireType:function(i){return!!i},toWireType:function(i,s){return s?n:a},argPackAdvance:8,readValueFromPointer:function(i){var s;if(r===1)s=Q;else if(r===2)s=dt;else if(r===4)s=R;else throw new TypeError("Unknown boolean type size: "+e);return this.fromWireType(s[i>>o])},destructorFunction:null})}function Kr(t){if(!(this instanceof at)||!(t instanceof at))return!1;for(var e=this.$$.ptrType.registeredClass,r=this.$$.ptr,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}function tn(t){return{count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}}function zt(t){function e(r){return r.$$.ptrType.registeredClass.name}_(e(t)+" instance already deleted")}var Lt=!1;function Te(t){}function en(t){t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)}function Pe(t){t.count.value-=1;var e=t.count.value===0;e&&en(t)}function Ee(t,e,r){if(e===r)return t;if(r.baseClass===void 0)return null;var n=Ee(t,e,r.baseClass);return n===null?null:r.downcast(n)}var Ae={};function rn(){return Object.keys(bt).length}function nn(){var t=[];for(var e in bt)bt.hasOwnProperty(e)&&t.push(bt[e]);return t}var wt=[];function Yt(){for(;wt.length;){var t=wt.pop();t.$$.deleteScheduled=!1,t.delete()}}var $t=void 0;function an(t){$t=t,wt.length&&$t&&$t(Yt)}function on(){u.getInheritedInstanceCount=rn,u.getLiveInheritedInstances=nn,u.flushPendingDeletes=Yt,u.setDelayFunction=an}var bt={};function sn(t,e){for(e===void 0&&_("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e}function un(t,e){return e=sn(t,e),bt[e]}function jt(t,e){(!e.ptrType||!e.ptr)&&Mt("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&Mt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},Ct(Object.create(t,{$$:{value:e}}))}function cn(t){var e=this.getPointee(t);if(!e)return this.destructor(t),null;var r=un(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?jt(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):jt(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var o=this.registeredClass.getActualType(e),i=Ae[o];if(!i)return a.call(this);var s;this.isConst?s=i.constPointerType:s=i.pointerType;var f=Ee(e,this.registeredClass,s.registeredClass);return f===null?a.call(this):this.isSmartPointer?jt(s.registeredClass.instancePrototype,{ptrType:s,ptr:f,smartPtrType:this,smartPtr:t}):jt(s.registeredClass.instancePrototype,{ptrType:s,ptr:f})}var Ct=function(t){return typeof FinalizationRegistry>"u"?(Ct=e=>e,t):(Lt=new FinalizationRegistry(e=>{Pe(e.$$)}),Ct=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Lt.register(e,a,e)}return e},Te=e=>Lt.unregister(e),Ct(t))};function fn(){if(this.$$.ptr||zt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=Ct(Object.create(Object.getPrototypeOf(this),{$$:{value:tn(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t}function ln(){this.$$.ptr||zt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&_("Object already scheduled for deletion"),Te(this),Pe(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)}function dn(){return!this.$$.ptr}function hn(){return this.$$.ptr||zt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&_("Object already scheduled for deletion"),wt.push(this),wt.length===1&&$t&&$t(Yt),this.$$.deleteScheduled=!0,this}function pn(){at.prototype.isAliasOf=Kr,at.prototype.clone=fn,at.prototype.delete=ln,at.prototype.isDeleted=dn,at.prototype.deleteLater=hn}function at(){}var yn=48,vn=57;function De(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 Se(t,e){return t=De(t),{[t]:function(){return e.apply(this,arguments)}}[t]}function xe(t,e,r){if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||_(`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}}function Fe(t,e,r){u.hasOwnProperty(t)?((r===void 0||u[t].overloadTable!==void 0&&u[t].overloadTable[r]!==void 0)&&_(`Cannot register public name '${t}' twice`),xe(u,t,t),u.hasOwnProperty(r)&&_(`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 mn(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=[]}function Nt(t,e,r){for(;e!==r;)e.upcast||_(`Expected null or instance of ${r.name}, got an instance of ${e.name}`),t=e.upcast(t),e=e.baseClass;return t}function gn(t,e){if(e===null)return this.isReference&&_(`null is not a valid ${this.name}`),0;e.$$||_(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||_(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Nt(e.$$.ptr,r,this.registeredClass);return n}function wn(t,e){var r;if(e===null)return this.isReference&&_(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;e.$$||_(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||_(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&_(`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=Nt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&_("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:_(`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,ot.toHandle(function(){a.delete()})),t!==null&&t.push(this.rawDestructor,r)}break;default:_("Unsupporting sharing policy")}return r}function $n(t,e){if(e===null)return this.isReference&&_(`null is not a valid ${this.name}`),0;e.$$||_(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||_(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&_(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=Nt(e.$$.ptr,r,this.registeredClass);return n}function bn(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t}function Cn(t){this.rawDestructor&&this.rawDestructor(t)}function _n(t){t!==null&&t.delete()}function Tn(){et.prototype.getPointee=bn,et.prototype.destructor=Cn,et.prototype.argPackAdvance=8,et.prototype.readValueFromPointer=gt,et.prototype.deleteObject=_n,et.prototype.fromWireType=cn}function et(t,e,r,n,a,o,i,s,f,l,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=f,this.rawShare=l,this.rawDestructor=h,!a&&e.baseClass===void 0?n?(this.toWireType=gn,this.destructorFunction=null):(this.toWireType=$n,this.destructorFunction=null):this.toWireType=wn}function Oe(t,e,r){u.hasOwnProperty(t)||Mt("Replacing nonexistant public symbol"),u[t].overloadTable!==void 0&&r!==void 0?u[t].overloadTable[r]=e:(u[t]=e,u[t].argCount=r)}var Pn=(t,e,r)=>{var n=u["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},Rt=[],T=t=>{var e=Rt[t];return e||(t>=Rt.length&&(Rt.length=t+1),Rt[t]=e=pe.get(t)),e},En=(t,e,r)=>{if(t.includes("j"))return Pn(t,e,r);var n=T(e).apply(null,r);return n},An=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),En(t,e,r)}};function X(t,e){t=k(t);function r(){return t.includes("j")?An(t,e):T(e)}var n=r();return typeof n!="function"&&_(`unknown function pointer with signature ${t}: ${e}`),n}function Dn(t,e){var r=Se(e,function(n){this.name=e,this.message=n;var a=new Error(n).stack;a!==void 0&&(this.stack=this.toString()+` | ||
`+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}var Me=void 0;function je(t){var e=Ne(t),r=k(e);return rt(e),r}function It(t,e){var r=[],n={};function a(o){if(!n[o]&&!ut[o]){if(Ot[o]){Ot[o].forEach(a);return}r.push(o),n[o]=!0}}throw e.forEach(a),new Me(`${t}: `+r.map(je).join([", "]))}function Sn(t,e,r,n,a,o,i,s,f,l,h,y,m){h=k(h),o=X(a,o),s&&(s=X(i,s)),l&&(l=X(f,l)),m=X(y,m);var C=De(h);Fe(C,function(){It(`Cannot construct ${h} due to unbound types`,[n])}),ct([t,e,r],n?[n]:[],function(A){A=A[0];var I,D;n?(I=A.registeredClass,D=I.instancePrototype):D=at.prototype;var W=Se(C,function(){if(Object.getPrototypeOf(this)!==d)throw new pt("Use 'new' to construct "+h);if(p.constructor_body===void 0)throw new pt(h+" has no accessible constructor");var kt=p.constructor_body[arguments.length];if(kt===void 0)throw new pt(`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(D,{constructor:{value:W}});W.prototype=d;var p=new mn(h,W,d,m,I,o,s,l);p.baseClass&&(p.baseClass.__derivedClasses===void 0&&(p.baseClass.__derivedClasses=[]),p.baseClass.__derivedClasses.push(p));var S=new et(h,p,!0,!1,!1),O=new et(h+"*",p,!1,!1,!1),ft=new et(h+" const*",p,!1,!0,!1);return Ae[t]={pointerType:O,constPointerType:ft},Oe(C,W),[S,O,ft]})}function Gt(t,e){for(var r=[],n=0;n<t;n++)r.push(x[e+n*4>>2]);return r}function Xt(t,e,r,n,a,o){var i=e.length;i<2&&_("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=e[1]!==null&&r!==null,f=!1,l=1;l<e.length;++l)if(e[l]!==null&&e[l].destructorFunction===void 0){f=!0;break}var h=e[0].name!=="void",y=i-2,m=new Array(y),C=[],A=[];return function(){arguments.length!==y&&_(`function ${t} called with ${arguments.length} arguments, expected ${y} args!`),A.length=0;var I;C.length=s?2:1,C[0]=a,s&&(I=e[1].toWireType(A,this),C[1]=I);for(var D=0;D<y;++D)m[D]=e[D+2].toWireType(A,arguments[D]),C.push(m[D]);var W=n.apply(null,C);function d(p){if(f)be(A);else for(var S=s?1:2;S<e.length;S++){var O=S===1?I:m[S-2];e[S].destructorFunction!==null&&e[S].destructorFunction(O)}if(h)return e[0].fromWireType(p)}return d(W)}}function xn(t,e,r,n,a,o){var i=Gt(e,r);a=X(n,a),ct([],[t],function(s){s=s[0];var f=`constructor ${s.name}`;if(s.registeredClass.constructor_body===void 0&&(s.registeredClass.constructor_body=[]),s.registeredClass.constructor_body[e-1]!==void 0)throw new pt(`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]=()=>{It(`Cannot construct ${s.name} due to unbound types`,i)},ct([],i,function(l){return l.splice(1,0,null),s.registeredClass.constructor_body[e-1]=Xt(f,l,null,a,o),[]}),[]})}function Fn(t,e,r,n,a,o,i,s,f){var l=Gt(r,n);e=k(e),o=X(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 m(){It(`Cannot call ${y} due to unbound types`,l)}var C=h.registeredClass.instancePrototype,A=C[e];return A===void 0||A.overloadTable===void 0&&A.className!==h.name&&A.argCount===r-2?(m.argCount=r-2,m.className=h.name,C[e]=m):(xe(C,e,y),C[e].overloadTable[r-2]=m),ct([],l,function(I){var D=Xt(y,I,h,o,i);return C[e].overloadTable===void 0?(D.argCount=r-2,C[e]=D):C[e].overloadTable[r-2]=D,[]}),[]})}function On(){Object.assign(Re.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 Re(){this.allocated=[void 0],this.freelist=[]}var N=new Re;function Ie(t){t>=N.reserved&&--N.get(t).refcount===0&&N.free(t)}function Mn(){for(var t=0,e=N.reserved;e<N.allocated.length;++e)N.allocated[e]!==void 0&&++t;return t}function jn(){N.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),N.reserved=N.allocated.length,u.count_emval_handles=Mn}var ot={toValue:t=>(t||_("Cannot use deleted val. handle = "+t),N.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 N.allocate({refcount:1,value:t})}}};function Rn(t,e){e=k(e),tt(t,{name:e,fromWireType:function(r){var n=ot.toValue(r);return Ie(r),n},toWireType:function(r,n){return ot.toHandle(n)},argPackAdvance:8,readValueFromPointer:gt,destructorFunction:null})}function qt(t){if(t===null)return"null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t}function In(t,e){switch(e){case 2:return function(r){return this.fromWireType(le[r>>2])};case 3:return function(r){return this.fromWireType(de[r>>3])};default:throw new TypeError("Unknown float type: "+t)}}function Wn(t,e,r){var n=Vt(r);e=k(e),tt(t,{name:e,fromWireType:function(a){return a},toWireType:function(a,o){return o},argPackAdvance:8,readValueFromPointer:In(e,n),destructorFunction:null})}function Hn(t,e,r,n,a,o,i){var s=Gt(e,r);t=k(t),a=X(n,a),Fe(t,function(){It(`Cannot call ${t} due to unbound types`,s)},e-1),ct([],s,function(f){var l=[f[0],null].concat(f.slice(1));return Oe(t,Xt(t,l,null,a,o),e-1),[]})}function kn(t,e,r){switch(e){case 0:return r?function(n){return Q[n]}:function(n){return V[n]};case 1:return r?function(n){return dt[n>>1]}:function(n){return Et[n>>1]};case 2:return r?function(n){return R[n>>2]}:function(n){return x[n>>2]};default:throw new TypeError("Unknown integer type: "+t)}}function Bn(t,e,r,n,a){e=k(e);var o=Vt(r),i=y=>y;if(n===0){var s=32-8*r;i=y=>y<<s>>>s}var f=e.includes("unsigned"),l=(y,m)=>{},h;f?h=function(y,m){return l(m,this.name),m>>>0}:h=function(y,m){return l(m,this.name),m},tt(t,{name:e,fromWireType:i,toWireType:h,argPackAdvance:8,readValueFromPointer:kn(e,o,n!==0),destructorFunction:null})}function Un(t,e,r){var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function o(i){i=i>>2;var s=x,f=s[i],l=s[i+1];return new a(s.buffer,l,f)}r=k(r),tt(t,{name:r,fromWireType:o,argPackAdvance:8,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})}var We=(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 f=t.charCodeAt(++i);s=65536+((s&1023)<<10)|f&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},Vn=(t,e,r)=>We(t,V,e,r),He=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},ke=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,zn=(t,e,r)=>{for(var n=e+r,a=e;t[a]&&!(a>=n);)++a;if(a-e>16&&t.buffer&&ke)return ke.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 f=t[e++]&63;if((i&240)==224?i=(i&15)<<12|s<<6|f:i=(i&7)<<18|s<<12|f<<6|t[e++]&63,i<65536)o+=String.fromCharCode(i);else{var l=i-65536;o+=String.fromCharCode(55296|l>>10,56320|l&1023)}}return o},Jt=(t,e)=>t?zn(V,t,e):"";function Ln(t,e){e=k(e);var r=e==="std::string";tt(t,{name:e,fromWireType:function(n){var a=x[n>>2],o=n+4,i;if(r)for(var s=o,f=0;f<=a;++f){var l=o+f;if(f==a||V[l]==0){var h=l-s,y=Jt(s,h);i===void 0?i=y:(i+=String.fromCharCode(0),i+=y),s=l+1}}else{for(var m=new Array(a),f=0;f<a;++f)m[f]=String.fromCharCode(V[o+f]);i=m.join("")}return rt(n),i},toWireType:function(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||_("Cannot pass non-string to std::string"),r&&i?o=He(a):o=a.length;var s=Qt(4+o+1),f=s+4;if(x[s>>2]=o,r&&i)Vn(a,f,o+1);else if(i)for(var l=0;l<o;++l){var h=a.charCodeAt(l);h>255&&(rt(f),_("String has UTF-16 code units that do not fit in 8 bits")),V[f+l]=h}else for(var l=0;l<o;++l)V[f+l]=a[l];return n!==null&&n.push(rt,s),s},argPackAdvance:8,readValueFromPointer:gt,destructorFunction:function(n){rt(n)}})}var Be=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Yn=(t,e)=>{for(var r=t,n=r>>1,a=n+e/2;!(n>=a)&&Et[n];)++n;if(r=n<<1,r-t>32&&Be)return Be.decode(V.subarray(t,r));for(var o="",i=0;!(i>=e/2);++i){var s=dt[t+i*2>>1];if(s==0)break;o+=String.fromCharCode(s)}return o},Nn=(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);dt[e>>1]=i,e+=2}return dt[e>>1]=0,e-n},Gn=t=>t.length*2,Xn=(t,e)=>{for(var r=0,n="";!(r>=e/4);){var a=R[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},qn=(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(R[e>>2]=i,e+=4,e+4>a)break}return R[e>>2]=0,e-n},Jn=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},Zn=function(t,e,r){r=k(r);var n,a,o,i,s;e===2?(n=Yn,a=Nn,i=Gn,o=()=>Et,s=1):e===4&&(n=Xn,a=qn,i=Jn,o=()=>x,s=2),tt(t,{name:r,fromWireType:function(f){for(var l=x[f>>2],h=o(),y,m=f+4,C=0;C<=l;++C){var A=f+4+C*e;if(C==l||h[A>>s]==0){var I=A-m,D=n(m,I);y===void 0?y=D:(y+=String.fromCharCode(0),y+=D),m=A+e}}return rt(f),y},toWireType:function(f,l){typeof l!="string"&&_(`Cannot pass non-string to C++ string type ${r}`);var h=i(l),y=Qt(4+h+e);return x[y>>2]=h>>s,a(l,y+4,h+e),f!==null&&f.push(rt,y),y},argPackAdvance:8,readValueFromPointer:gt,destructorFunction:function(f){rt(f)}})};function Qn(t,e,r,n,a,o){Ft[t]={name:k(e),rawConstructor:X(r,n),rawDestructor:X(a,o),fields:[]}}function Kn(t,e,r,n,a,o,i,s,f,l){Ft[t].fields.push({fieldName:k(e),getterReturnType:r,getter:X(n,a),getterContext:o,setterArgumentType:i,setter:X(s,f),setterContext:l})}function ta(t,e){e=k(e),tt(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:function(){},toWireType:function(r,n){}})}var ea={};function ra(t){var e=ea[t];return e===void 0?k(t):e}function Ue(){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.")}function na(t){return t===0?ot.toHandle(Ue()):(t=ra(t),ot.toHandle(Ue()[t]))}function aa(t){t>4&&(N.get(t).refcount+=1)}function Ve(t,e){var r=ut[t];return r===void 0&&_(e+" has unknown type "+je(t)),r}function oa(t){var e=new Array(t+1);return function(r,n,a){e[0]=r;for(var o=0;o<t;++o){var i=Ve(x[n+o*4>>2],"parameter "+o);e[o+1]=i.readValueFromPointer(a),a+=i.argPackAdvance}var s=new(r.bind.apply(r,e));return ot.toHandle(s)}}var ze={};function ia(t,e,r,n){t=ot.toValue(t);var a=ze[e];return a||(a=oa(e),ze[e]=a),a(t,r,n)}function sa(t,e){t=Ve(t,"_emval_take_value");var r=t.readValueFromPointer(e);return ot.toHandle(r)}var ua=()=>{At("")},ca=(t,e,r)=>V.copyWithin(t,e,e+r),fa=()=>2147483648,la=t=>{var e=Z.buffer,r=t-e.byteLength+65535>>>16;try{return Z.grow(r),he(),1}catch{}},da=t=>{var e=V.length;t>>>=0;var r=fa();if(t>r)return!1;for(var n=(f,l)=>f+(l-f%l)%l,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=la(i);if(s)return!0}return!1},Zt={},ha=()=>M||"./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,_:ha()};for(var r in Zt)Zt[r]===void 0?delete e[r]:e[r]=Zt[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);_t.strings=n}return _t.strings},pa=(t,e)=>{for(var r=0;r<t.length;++r)Q[e++>>0]=t.charCodeAt(r);Q[e>>0]=0},ya=(t,e)=>{var r=0;return _t().forEach(function(n,a){var o=e+r;x[t+a*4>>2]=o,pa(n,o),r+=n.length+1}),0},va=(t,e)=>{var r=_t();x[t>>2]=r.length;var n=0;return r.forEach(function(a){n+=a.length+1}),x[e>>2]=n,0};function ma(t){return t}var Wt=t=>t%4===0&&(t%100!==0||t%400===0),ga=(t,e)=>{for(var r=0,n=0;n<=e;r+=t[n++]);return r},Le=[31,29,31,30,31,30,31,31,30,31,30,31],Ye=[31,28,31,30,31,30,31,31,30,31,30,31],wa=(t,e)=>{for(var r=new Date(t.getTime());e>0;){var n=Wt(r.getFullYear()),a=r.getMonth(),o=(n?Le:Ye)[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 $a(t,e,r){var n=r>0?r:He(t)+1,a=new Array(n),o=We(t,a,0,a.length);return e&&(a.length=o),a}var ba=(t,e)=>{Q.set(t,e)},Ca=(t,e,r,n)=>{var a=R[n+40>>2],o={tm_sec:R[n>>2],tm_min:R[n+4>>2],tm_hour:R[n+8>>2],tm_mday:R[n+12>>2],tm_mon:R[n+16>>2],tm_year:R[n+20>>2],tm_wday:R[n+24>>2],tm_yday:R[n+28>>2],tm_isdst:R[n+32>>2],tm_gmtoff:R[n+36>>2],tm_zone:a?Jt(a):""},i=Jt(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 f in s)i=i.replace(new RegExp(f,"g"),s[f]);var l=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],h=["January","February","March","April","May","June","July","August","September","October","November","December"];function y(d,p,S){for(var O=typeof d=="number"?d.toString():d||"";O.length<p;)O=S[0]+O;return O}function m(d,p){return y(d,p,"0")}function C(d,p){function S(ft){return ft<0?-1:ft>0?1:0}var O;return(O=S(d.getFullYear()-p.getFullYear()))===0&&(O=S(d.getMonth()-p.getMonth()))===0&&(O=S(d.getDate()-p.getDate())),O}function A(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 I(d){var p=wa(new Date(d.tm_year+1900,0,1),d.tm_yday),S=new Date(p.getFullYear(),0,4),O=new Date(p.getFullYear()+1,0,4),ft=A(S),kt=A(O);return C(ft,p)<=0?C(kt,p)<=0?p.getFullYear()+1:p.getFullYear():p.getFullYear()-1}var D={"%a":d=>l[d.tm_wday].substring(0,3),"%A":d=>l[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 m(p/100|0,2)},"%d":d=>m(d.tm_mday,2),"%e":d=>y(d.tm_mday,2," "),"%g":d=>I(d).toString().substring(2),"%G":d=>I(d),"%H":d=>m(d.tm_hour,2),"%I":d=>{var p=d.tm_hour;return p==0?p=12:p>12&&(p-=12),m(p,2)},"%j":d=>m(d.tm_mday+ga(Wt(d.tm_year+1900)?Le:Ye,d.tm_mon-1),3),"%m":d=>m(d.tm_mon+1,2),"%M":d=>m(d.tm_min,2),"%n":()=>` | ||
`,"%p":d=>d.tm_hour>=0&&d.tm_hour<12?"AM":"PM","%S":d=>m(d.tm_sec,2),"%t":()=>" ","%u":d=>d.tm_wday||7,"%U":d=>{var p=d.tm_yday+7-d.tm_wday;return m(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 S=(d.tm_wday+371-d.tm_yday)%7;S!=4&&(S!=3||!Wt(d.tm_year))&&(p=1)}}else{p=52;var O=(d.tm_wday+7-d.tm_yday-1)%7;(O==4||O==5&&Wt(d.tm_year%400-1))&&p++}return m(p,2)},"%w":d=>d.tm_wday,"%W":d=>{var p=d.tm_yday+7-(d.tm_wday+6)%7;return m(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,S=p>=0;return p=Math.abs(p)/60,p=p/60*100+p%60,(S?"+":"-")+("0000"+p).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};i=i.replace(/%%/g,"\0\0");for(var f in D)i.includes(f)&&(i=i.replace(new RegExp(f,"g"),D[f](o)));i=i.replace(/\0\0/g,"%");var W=$a(i,!1);return W.length>e?0:(ba(W,t),W.length-1)},_a=(t,e,r,n,a)=>Ca(t,e,r,n);Ce=u.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},Jr(),pt=u.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},pn(),on(),Tn(),Me=u.UnboundTypeError=Dn(Error,"UnboundTypeError"),On(),jn();var Ta={q:Hr,u:kr,a:Ur,h:Vr,l:zr,I:Lr,P:Yr,n:Nr,ba:Gr,d:Br,oa:Xr,Y:qr,fa:Qr,na:Sn,ma:xn,D:Fn,ea:Rn,W:Wn,J:Hn,w:Bn,s:Un,V:Ln,L:Zn,Q:Qn,pa:Kn,ga:ta,U:Ie,la:na,R:aa,ia,ka:sa,K:ua,da:ca,ca:da,$:ya,aa:va,H:za,T:Qa,B:Ya,p:Ba,b:Pa,C:Va,ha:Ga,c:xa,j:Oa,i:Da,x:La,O:Ua,v:Ha,G:qa,N:Ja,A:Na,F:Ka,Z:eo,X:ro,k:Fa,f:Sa,e:Aa,g:Ea,M:Za,m:Wa,o:Ma,S:ja,t:Ia,ja:ka,y:Xa,r:Ra,E:to,z:ma,_:_a};Wr();var rt=u._free=t=>(rt=u._free=E.sa)(t),Qt=u._malloc=t=>(Qt=u._malloc=E.ta)(t),Ne=t=>(Ne=E.va)(t);u.__embind_initialize_bindings=()=>(u.__embind_initialize_bindings=E.wa)();var g=(t,e)=>(g=E.xa)(t,e),Tt=t=>(Tt=E.ya)(t),$=()=>($=E.za)(),b=t=>(b=E.Aa)(t),Ge=t=>(Ge=E.Ba)(t),Xe=t=>(Xe=E.Ca)(t),qe=(t,e,r)=>(qe=E.Da)(t,e,r),Je=t=>(Je=E.Ea)(t);u.dynCall_viijii=(t,e,r,n,a,o,i)=>(u.dynCall_viijii=E.Fa)(t,e,r,n,a,o,i);var Ze=u.dynCall_jiii=(t,e,r,n)=>(Ze=u.dynCall_jiii=E.Ga)(t,e,r,n),Qe=u.dynCall_jiiii=(t,e,r,n,a)=>(Qe=u.dynCall_jiiii=E.Ha)(t,e,r,n,a);u.dynCall_iiiiij=(t,e,r,n,a,o,i)=>(u.dynCall_iiiiij=E.Ia)(t,e,r,n,a,o,i),u.dynCall_iiiiijj=(t,e,r,n,a,o,i,s,f)=>(u.dynCall_iiiiijj=E.Ja)(t,e,r,n,a,o,i,s,f),u.dynCall_iiiiiijj=(t,e,r,n,a,o,i,s,f,l)=>(u.dynCall_iiiiiijj=E.Ka)(t,e,r,n,a,o,i,s,f,l);function Pa(t,e){var r=$();try{return T(t)(e)}catch(n){if(b(r),n!==n+0)throw n;g(1,0)}}function Ea(t,e,r,n){var a=$();try{T(t)(e,r,n)}catch(o){if(b(a),o!==o+0)throw o;g(1,0)}}function Aa(t,e,r){var n=$();try{T(t)(e,r)}catch(a){if(b(n),a!==a+0)throw a;g(1,0)}}function Da(t,e,r,n,a){var o=$();try{return T(t)(e,r,n,a)}catch(i){if(b(o),i!==i+0)throw i;g(1,0)}}function Sa(t,e){var r=$();try{T(t)(e)}catch(n){if(b(r),n!==n+0)throw n;g(1,0)}}function xa(t,e,r){var n=$();try{return T(t)(e,r)}catch(a){if(b(n),a!==a+0)throw a;g(1,0)}}function Fa(t){var e=$();try{T(t)()}catch(r){if(b(e),r!==r+0)throw r;g(1,0)}}function Oa(t,e,r,n){var a=$();try{return T(t)(e,r,n)}catch(o){if(b(a),o!==o+0)throw o;g(1,0)}}function Ma(t,e,r,n,a,o){var i=$();try{T(t)(e,r,n,a,o)}catch(s){if(b(i),s!==s+0)throw s;g(1,0)}}function ja(t,e,r,n,a,o,i){var s=$();try{T(t)(e,r,n,a,o,i)}catch(f){if(b(s),f!==f+0)throw f;g(1,0)}}function Ra(t,e,r,n,a,o,i,s,f,l,h){var y=$();try{T(t)(e,r,n,a,o,i,s,f,l,h)}catch(m){if(b(y),m!==m+0)throw m;g(1,0)}}function Ia(t,e,r,n,a,o,i,s){var f=$();try{T(t)(e,r,n,a,o,i,s)}catch(l){if(b(f),l!==l+0)throw l;g(1,0)}}function Wa(t,e,r,n,a){var o=$();try{T(t)(e,r,n,a)}catch(i){if(b(o),i!==i+0)throw i;g(1,0)}}function Ha(t,e,r,n,a,o,i){var s=$();try{return T(t)(e,r,n,a,o,i)}catch(f){if(b(s),f!==f+0)throw f;g(1,0)}}function ka(t,e,r,n,a,o,i,s,f){var l=$();try{T(t)(e,r,n,a,o,i,s,f)}catch(h){if(b(l),h!==h+0)throw h;g(1,0)}}function Ba(t){var e=$();try{return T(t)()}catch(r){if(b(e),r!==r+0)throw r;g(1,0)}}function Ua(t,e,r,n,a,o,i){var s=$();try{return T(t)(e,r,n,a,o,i)}catch(f){if(b(s),f!==f+0)throw f;g(1,0)}}function Va(t,e,r,n){var a=$();try{return T(t)(e,r,n)}catch(o){if(b(a),o!==o+0)throw o;g(1,0)}}function za(t,e,r,n){var a=$();try{return T(t)(e,r,n)}catch(o){if(b(a),o!==o+0)throw o;g(1,0)}}function La(t,e,r,n,a,o){var i=$();try{return T(t)(e,r,n,a,o)}catch(s){if(b(i),s!==s+0)throw s;g(1,0)}}function Ya(t,e,r,n,a,o){var i=$();try{return T(t)(e,r,n,a,o)}catch(s){if(b(i),s!==s+0)throw s;g(1,0)}}function Na(t,e,r,n,a,o,i,s,f,l){var h=$();try{return T(t)(e,r,n,a,o,i,s,f,l)}catch(y){if(b(h),y!==y+0)throw y;g(1,0)}}function Ga(t,e,r){var n=$();try{return T(t)(e,r)}catch(a){if(b(n),a!==a+0)throw a;g(1,0)}}function Xa(t,e,r,n,a,o,i,s,f,l){var h=$();try{T(t)(e,r,n,a,o,i,s,f,l)}catch(y){if(b(h),y!==y+0)throw y;g(1,0)}}function qa(t,e,r,n,a,o,i,s){var f=$();try{return T(t)(e,r,n,a,o,i,s)}catch(l){if(b(f),l!==l+0)throw l;g(1,0)}}function Ja(t,e,r,n,a,o,i,s,f){var l=$();try{return T(t)(e,r,n,a,o,i,s,f)}catch(h){if(b(l),h!==h+0)throw h;g(1,0)}}function Za(t,e,r,n,a,o,i){var s=$();try{T(t)(e,r,n,a,o,i)}catch(f){if(b(s),f!==f+0)throw f;g(1,0)}}function Qa(t,e,r,n){var a=$();try{return T(t)(e,r,n)}catch(o){if(b(a),o!==o+0)throw o;g(1,0)}}function Ka(t,e,r,n,a,o,i,s,f,l,h,y){var m=$();try{return T(t)(e,r,n,a,o,i,s,f,l,h,y)}catch(C){if(b(m),C!==C+0)throw C;g(1,0)}}function to(t,e,r,n,a,o,i,s,f,l,h,y,m,C,A,I){var D=$();try{T(t)(e,r,n,a,o,i,s,f,l,h,y,m,C,A,I)}catch(W){if(b(D),W!==W+0)throw W;g(1,0)}}function eo(t,e,r,n){var a=$();try{return Ze(t,e,r,n)}catch(o){if(b(a),o!==o+0)throw o;g(1,0)}}function ro(t,e,r,n,a){var o=$();try{return Qe(t,e,r,n,a)}catch(i){if(b(o),i!==i+0)throw i;g(1,0)}}var Ht;mt=function t(){Ht||Ke(),Ht||(mt=t)};function Ke(){if(it>0||(Er(),it>0))return;function t(){Ht||(Ht=!0,u.calledRun=!0,!Pt&&(Ar(),w(u),u.onRuntimeInitialized&&u.onRuntimeInitialized(),Dr()))}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 Ke(),v.ready}})();function Cr(c){return ie(ce,c)}async function _r(c,{tryHarder:v=nt.tryHarder,formats:u=nt.formats,maxSymbols:w=nt.maxSymbols}=nt){return wr(c,{tryHarder:v,formats:u,maxSymbols:w},ce)}const fe=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 Tr(c){for(const[v,u]of fe)if(c===u)return v;return"unknown"}class Pr{constructor(v={}){rr(this,vt,void 0);var u;try{const w=(u=v==null?void 0:v.formats)==null?void 0:u.filter(P=>P!=="unknown");if((w==null?void 0:w.length)===0)throw new TypeError("Hint option provided, but is empty.");w==null||w.forEach(P=>{if(!B.includes(P))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${P}' is not a valid enum value of type BarcodeFormat.`)}),Cr().catch(()=>{}),nr(this,vt,w??[])}catch(w){throw ae(w,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return B.filter(v=>v!=="unknown")}async detect(v){try{const u=await fr(v);if(u===null)return[];let w;try{w=await _r(u,{tryHarder:!0,formats:er(this,vt).map(P=>fe.get(P))})}catch{throw new DOMException("Barcode detection service unavailable. Use 'setZXingModuleOverrides' in offline or strict CSP environments.","NotSupportedError")}return w.map(P=>{const{topLeft:{x:F,y:M},topRight:{x:q,y:U},bottomLeft:{x:j,y:G},bottomRight:{x:J,y:L}}=P.position,Y=Math.min(F,q,j,J),Z=Math.min(M,U,G,L),E=Math.max(F,q,j,J),Pt=Math.max(M,U,G,L);return{boundingBox:new DOMRectReadOnly(Y,Z,E-Y,Pt-Z),rawValue:new TextDecoder().decode(P.bytes),format:Tr(P.format),cornerPoints:[{x:F,y:M},{x:q,y:U},{x:J,y:L},{x:j,y:G}]}})}catch(u){throw ae(u,"Failed to execute 'detect' on 'BarcodeDetector'")}}}return vt=new WeakMap,globalThis.BarcodeDetector??(globalThis.BarcodeDetector=Pr),H.setZXingModuleOverrides=gr,Object.defineProperty(H,Symbol.toStringTag,{value:"Module"}),H}({}); |
@@ -5,3 +5,3 @@ { | ||
"private": false, | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"type": "module", | ||
@@ -82,8 +82,8 @@ "files": [ | ||
"@typescript-eslint/parser": "^6.4.1", | ||
"@vitest/browser": "^0.34.2", | ||
"@vitest/coverage-istanbul": "^0.34.2", | ||
"@vitest/ui": "^0.34.2", | ||
"eslint": "^8.47.0", | ||
"@vitest/browser": "^0.34.3", | ||
"@vitest/coverage-istanbul": "^0.34.3", | ||
"@vitest/ui": "^0.34.3", | ||
"eslint": "^8.48.0", | ||
"http-server": "^14.1.1", | ||
"npm-check-updates": "^16.13.0", | ||
"npm-check-updates": "^16.13.1", | ||
"playwright": "^1.37.1", | ||
@@ -93,10 +93,10 @@ "prettier": "^3.0.2", | ||
"start-server-and-test": "^2.0.0", | ||
"typescript": "^5.1.6", | ||
"typescript": "^5.2.2", | ||
"vite": "^4.4.9", | ||
"vitest": "^0.34.2" | ||
"vitest": "^0.34.3" | ||
}, | ||
"dependencies": { | ||
"@sec-ant/zxing-wasm": "^2.1.2", | ||
"@sec-ant/zxing-wasm": "^2.1.3", | ||
"@types/dom-webcodecs": "^0.1.8" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
269041
Updated@sec-ant/zxing-wasm@^2.1.3