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