barcode-detector 2.1.4 → 2.1.5
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 +41 -40
- 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 +14 -14
package/dist/cjs/pure.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";var Ye=(i,f,s)=>{if(!f.has(i))throw TypeError("Cannot "+s)};var Kt=(i,f,s)=>(Ye(i,f,"read from private field"),s?s.call(i):f.get(i)),ze=(i,f,s)=>{if(f.has(i))throw TypeError("Cannot add the same private member more than once");f instanceof WeakSet?f.add(i):f.set(i,s)},Ne=(i,f,s,w)=>(Ye(i,f,"write to private field"),w?w.call(i,s):f.set(i,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ge=["aztec","code_128","code_39","code_93","codabar","data_matrix","ean_13","ean_8","itf","pdf417","qr_code","upc_a","upc_e","unknown"];function ba(i){if(Qe(i))return{width:i.naturalWidth,height:i.naturalHeight};if(Je(i))return{width:i.width.baseVal.value,height:i.height.baseVal.value};if(Ke(i))return{width:i.videoWidth,height:i.videoHeight};if(er(i))return{width:i.width,height:i.height};if(nr(i))return{width:i.displayWidth,height:i.displayHeight};if(tr(i))return{width:i.width,height:i.height};if(rr(i))return{width:i.width,height:i.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 Qe(i){try{return i instanceof HTMLImageElement}catch{return!1}}function Je(i){try{return i instanceof SVGImageElement}catch{return!1}}function Ke(i){try{return i instanceof HTMLVideoElement}catch{return!1}}function tr(i){try{return i instanceof HTMLCanvasElement}catch{return!1}}function er(i){try{return i instanceof ImageBitmap}catch{return!1}}function rr(i){try{return i instanceof OffscreenCanvas}catch{return!1}}function nr(i){try{return i instanceof VideoFrame}catch{return!1}}function ar(i){try{return i instanceof Blob}catch{return!1}}function Ca(i){try{return i instanceof ImageData}catch{return!1}}function _a(i,f){try{const s=new OffscreenCanvas(i,f);if(s.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return s;throw void 0}catch{const s=document.createElement("canvas");return s.width=i,s.height=f,s}}async function or(i){if(Qe(i)&&!await Aa(i))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(Je(i)&&!await Oa(i))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(nr(i)&&Da(i))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(Ke(i)&&(i.readyState===0||i.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(er(i)&&Fa(i))throw new DOMException("The image source is detached.","InvalidStateError");const{width:f,height:s}=ba(i);if(f===0||s===0)return null;const v=_a(f,s).getContext("2d");v.drawImage(i,0,0);try{return v.getImageData(0,0,f,s)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Ta(i){let f;try{if(globalThis.createImageBitmap)f=await createImageBitmap(i);else if(globalThis.Image){f=new Image;let w="";try{w=URL.createObjectURL(i),f.src=w,await f.decode()}finally{URL.revokeObjectURL(w)}}else return i}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await or(f)}function Pa(i){const{width:f,height:s}=i;if(f===0||s===0)return null;const w=i.getContext("2d");try{return w.getImageData(0,0,f,s)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Ea(i){if(ar(i))return await Ta(i);if(Ca(i)){if(Sa(i))throw new DOMException("The image data has been detached.","InvalidStateError");return i}return tr(i)||rr(i)?Pa(i):await or(i)}async function Aa(i){try{return await i.decode(),!0}catch{return!1}}async function Oa(i){var f;try{return await((f=i.decode)==null?void 0:f.call(i)),!0}catch{return!1}}function Da(i){return i.format===null}function Sa(i){return i.data.buffer.byteLength===0}function Fa(i){return i.width===0&&i.height===0}function Xe(i,f){return i instanceof DOMException?new DOMException(`${f}: ${i.message}`,i.name):i instanceof Error?new i.constructor(`${f}: ${i.message}`):new Error(`${f}: ${i}`)}const qe=["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"];function xa(i){return i.join("|")}function Ma(i){const f=Ze(i);let s=0,w=qe.length-1;for(;s<=w;){const v=Math.floor((s+w)/2),$=qe[v],H=Ze($);if(H===f)return $;H<f?s=v+1:w=v-1}return"None"}function Ze(i){return i.toLowerCase().replace(/_-\[\]/g,"")}function ja(i,f){return i.Binarizer[f]}function Ia(i,f){return i.CharacterSet[f]}const Ra=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function Wa(i){return Ra[i.value]}function ka(i,f){return i.EanAddOnSymbol[f]}function Ha(i,f){return i.TextMode[f]}const $t={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!1,validateCode39CheckSum:!1,validateITFCheckSum:!1,returnCodabarStartEnd:!1,returnErrors:!1,eanAddOnSymbol:"Read",textMode:"Plain",characterSet:"Unknown"};function ir(i,f){return{...f,formats:xa(f.formats),binarizer:ja(i,f.binarizer),eanAddOnSymbol:ka(i,f.eanAddOnSymbol),textMode:Ha(i,f.textMode),characterSet:Ia(i,f.characterSet)}}const Ba={width:200,height:200,format:"QRCode",characterSet:"UTF8",eccLevel:-1,margin:10};function sr(i){return{...i,format:Ma(i.format),eccLevel:i.eccLevel,contentType:Wa(i.contentType)}}const Ua={locateFile:(i,f)=>{const s=i.match(/_(.+?)\.wasm$/);return s?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.0.0-rc.10/dist/${s[1]}/${i}`:f+i}};let te=new WeakMap;function re(i,f){var s;const w=te.get(i);if(w!=null&&w.modulePromise&&(f===void 0||Object.is(f,w.moduleOverrides)))return w.modulePromise;const v=(s=f!=null?f:w==null?void 0:w.moduleOverrides)!=null?s:Ua,$=i({...v});return te.set(i,{moduleOverrides:v,modulePromise:$}),$}function Va(i,f){te.set(i,{moduleOverrides:f})}async function La(i,f,s=$t){const w={...$t,...s},v=await re(i),{size:$}=f,H=new Uint8Array(await f.arrayBuffer()),L=v._malloc($);v.HEAPU8.set(H,L);const B=v.readBarcodesFromImage(L,$,ir(v,w));v._free(L);const O=[];for(let Y=0;Y<B.size();++Y)O.push(sr(B.get(Y)));return O}async function Ya(i,f,s=$t){const w={...$t,...s},v=await re(i),{data:$,width:H,height:L,data:{byteLength:B}}=f,O=v._malloc(B);v.HEAPU8.set($,O);const Y=v.readBarcodesFromPixmap(O,H,L,ir(v,w));v._free(O);const G=[];for(let U=0;U<Y.size();++U)G.push(sr(Y.get(U)));return G}structuredClone($t);structuredClone(Ba);var jt=(()=>{var i=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(f={}){var s=f,w,v;s.ready=new Promise((t,e)=>{w=t,v=e});var $=Object.assign({},s),H="./this.program",L=typeof window=="object",B=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var O="";function Y(t){return s.locateFile?s.locateFile(t,O):O+t}var G;(L||B)&&(B?O=self.location.href:typeof document<"u"&&document.currentScript&&(O=document.currentScript.src),i&&(O=i),O.indexOf("blob:")!==0?O=O.substr(0,O.replace(/[?#].*/,"").lastIndexOf("/")+1):O="",B&&(G=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)})),s.print||console.log.bind(console);var U=s.printErr||console.error.bind(console);Object.assign(s,$),$=null,s.arguments&&s.arguments,s.thisProgram&&(H=s.thisProgram),s.quit&&s.quit;var Z;s.wasmBinary&&(Z=s.wasmBinary),typeof WebAssembly!="object"&&ft("no native wasm support detected");var tt,lt=!1;function It(t,e){t||ft(e)}var V,k,ot,dt,W,_,ne,ae;function oe(){var t=tt.buffer;s.HEAP8=V=new Int8Array(t),s.HEAP16=ot=new Int16Array(t),s.HEAPU8=k=new Uint8Array(t),s.HEAPU16=dt=new Uint16Array(t),s.HEAP32=W=new Int32Array(t),s.HEAPU32=_=new Uint32Array(t),s.HEAPF32=ne=new Float32Array(t),s.HEAPF64=ae=new Float64Array(t)}var ie=[],se=[],ue=[];function ur(){if(s.preRun)for(typeof s.preRun=="function"&&(s.preRun=[s.preRun]);s.preRun.length;)dr(s.preRun.shift());Rt(ie)}function cr(){Rt(se)}function lr(){if(s.postRun)for(typeof s.postRun=="function"&&(s.postRun=[s.postRun]);s.postRun.length;)fr(s.postRun.shift());Rt(ue)}function dr(t){ie.unshift(t)}function hr(t){se.unshift(t)}function fr(t){ue.unshift(t)}var et=0,ht=null;function pr(t){et++,s.monitorRunDependencies&&s.monitorRunDependencies(et)}function mr(t){if(et--,s.monitorRunDependencies&&s.monitorRunDependencies(et),et==0&&ht){var e=ht;ht=null,e()}}function ft(t){s.onAbort&&s.onAbort(t),t="Aborted("+t+")",U(t),lt=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw v(e),e}var yr="data:application/octet-stream;base64,",ce=t=>t.startsWith(yr),it;it="zxing_reader.wasm",ce(it)||(it=Y(it));function le(t){if(t==it&&Z)return new Uint8Array(Z);if(G)return G(t);throw"both async and sync fetching of the wasm failed"}function vr(t){return!Z&&(L||B)&&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(()=>le(t)):Promise.resolve().then(()=>le(t))}function de(t,e,r){return vr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{U(`failed to asynchronously prepare wasm: ${n}`),ft(n)})}function gr(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!ce(e)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(a=>{var o=WebAssembly.instantiateStreaming(a,r);return o.then(n,function(u){return U(`wasm streaming compile failed: ${u}`),U("falling back to ArrayBuffer instantiation"),de(e,r,n)})}):de(e,r,n)}function wr(){var t={a:ta};function e(n,a){return E=n.exports,tt=E.fa,oe(),_e=E.ja,hr(E.ga),mr(),E}pr();function r(n){e(n.instance)}if(s.instantiateWasm)try{return s.instantiateWasm(t,e)}catch(n){U(`Module.instantiateWasm callback failed with error: ${n}`),v(n)}return gr(Z,it,t,r).catch(v),{}}var Rt=t=>{for(;t.length>0;)t.shift()(s)};s.noExitRuntime;var bt=[],Ct=0,$r=t=>{var e=new Wt(t);return e.get_caught()||(e.set_caught(!0),Ct--),e.set_rethrown(!1),bt.push(e),He(e.excPtr),e.get_exception_ptr()},Q=0,br=()=>{A(0,0);var t=bt.pop();ke(t.excPtr),Q=0};function Wt(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(e){_[this.ptr+4>>2]=e},this.get_type=function(){return _[this.ptr+4>>2]},this.set_destructor=function(e){_[this.ptr+8>>2]=e},this.get_destructor=function(){return _[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,V[this.ptr+12>>0]=e},this.get_caught=function(){return V[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,V[this.ptr+13>>0]=e},this.get_rethrown=function(){return V[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){_[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return _[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=Ue(this.get_type());if(e)return _[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}var Cr=t=>{throw Q||(Q=t),Q},kt=t=>{var e=Q;if(!e)return wt(0),0;var r=new Wt(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 u=r.ptr+16;if(Be(o,n,u))return wt(o),e}return wt(n),e},_r=()=>kt([]),Tr=t=>kt([t]),Pr=(t,e)=>kt([t,e]),Er=()=>{var t=bt.pop();t||ft("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(bt.push(t),t.set_rethrown(!0),t.set_caught(!1),Ct++),Q=e,Q},Ar=(t,e,r)=>{var n=new Wt(t);throw n.init(e,r),Q=t,Ct++,Q},Or=()=>Ct,_t={},he=t=>{for(;t.length;){var e=t.pop(),r=t.pop();r(e)}};function Ht(t){return this.fromWireType(W[t>>2])}var st={},rt={},Tt={},fe,Pt=t=>{throw new fe(t)},nt=(t,e,r)=>{t.forEach(function(c){Tt[c]=e});function n(c){var l=r(c);l.length!==t.length&&Pt("Mismatched type converter count");for(var h=0;h<t.length;++h)X(t[h],l[h])}var a=new Array(e.length),o=[],u=0;e.forEach((c,l)=>{rt.hasOwnProperty(c)?a[l]=rt[c]:(o.push(c),st.hasOwnProperty(c)||(st[c]=[]),st[c].push(()=>{a[l]=rt[c],++u,u===o.length&&n(a)}))}),o.length===0&&n(a)},Dr=t=>{var e=_t[t];delete _t[t];var r=e.rawConstructor,n=e.rawDestructor,a=e.fields,o=a.map(u=>u.getterReturnType).concat(a.map(u=>u.setterArgumentType));nt([t],o,u=>{var c={};return a.forEach((l,h)=>{var p=l.fieldName,y=u[h],g=l.getter,b=l.getterContext,T=u[h+a.length],I=l.setter,P=l.setterContext;c[p]={read:R=>y.fromWireType(g(b,R)),write:(R,d)=>{var m=[];I(P,R,T.toWireType(m,d)),he(m)}}}),[{name:e.name,fromWireType:l=>{var h={};for(var p in c)h[p]=c[p].read(l);return n(l),h},toWireType:(l,h)=>{for(var p in c)if(!(p in h))throw new TypeError(`Missing field: "${p}"`);var y=r();for(p in c)c[p].write(y,h[p]);return l!==null&&l.push(n,y),y},argPackAdvance:q,readValueFromPointer:Ht,destructorFunction:n}]})},Sr=(t,e,r,n,a)=>{},Fr=()=>{for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);pe=t},pe,j=t=>{for(var e="",r=t;k[r];)e+=pe[k[r++]];return e},ut,C=t=>{throw new ut(t)};function xr(t,e,r={}){var n=e.name;if(t||C(`type "${n}" must have a positive integer typeid pointer`),rt.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;C(`Cannot register type '${n}' twice`)}if(rt[t]=e,delete Tt[t],st.hasOwnProperty(t)){var a=st[t];delete st[t],a.forEach(o=>o())}}function X(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return xr(t,e,r)}var q=8,Mr=(t,e,r,n)=>{e=j(e),X(t,{name:e,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?r:n},argPackAdvance:q,readValueFromPointer:function(a){return this.fromWireType(k[a])},destructorFunction:null})},jr=t=>({count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}),Bt=t=>{function e(r){return r.$$.ptrType.registeredClass.name}C(e(t)+" instance already deleted")},Ut=!1,me=t=>{},Ir=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},ye=t=>{t.count.value-=1;var e=t.count.value===0;e&&Ir(t)},ve=(t,e,r)=>{if(e===r)return t;if(r.baseClass===void 0)return null;var n=ve(t,e,r.baseClass);return n===null?null:r.downcast(n)},ge={},Rr=()=>Object.keys(yt).length,Wr=()=>{var t=[];for(var e in yt)yt.hasOwnProperty(e)&&t.push(yt[e]);return t},pt=[],Vt=()=>{for(;pt.length;){var t=pt.pop();t.$$.deleteScheduled=!1,t.delete()}},mt,kr=t=>{mt=t,pt.length&&mt&&mt(Vt)},Hr=()=>{s.getInheritedInstanceCount=Rr,s.getLiveInheritedInstances=Wr,s.flushPendingDeletes=Vt,s.setDelayFunction=kr},yt={},Br=(t,e)=>{for(e===void 0&&C("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},Ur=(t,e)=>(e=Br(t,e),yt[e]),Et=(t,e)=>{(!e.ptrType||!e.ptr)&&Pt("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&Pt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},vt(Object.create(t,{$$:{value:e}}))};function Vr(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?Et(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):Et(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var o=this.registeredClass.getActualType(e),u=ge[o];if(!u)return a.call(this);var c;this.isConst?c=u.constPointerType:c=u.pointerType;var l=ve(e,this.registeredClass,c.registeredClass);return l===null?a.call(this):this.isSmartPointer?Et(c.registeredClass.instancePrototype,{ptrType:c,ptr:l,smartPtrType:this,smartPtr:t}):Et(c.registeredClass.instancePrototype,{ptrType:c,ptr:l})}var vt=t=>typeof FinalizationRegistry>"u"?(vt=e=>e,t):(Ut=new FinalizationRegistry(e=>{ye(e.$$)}),vt=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Ut.register(e,a,e)}return e},me=e=>Ut.unregister(e),vt(t)),Lr=()=>{Object.assign(At.prototype,{isAliasOf(t){if(!(this instanceof At)||!(t instanceof At))return!1;var e=this.$$.ptrType.registeredClass,r=this.$$.ptr;t.$$=t.$$;for(var n=t.$$.ptrType.registeredClass,a=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)a=n.upcast(a),n=n.baseClass;return e===n&&r===a},clone(){if(this.$$.ptr||Bt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=vt(Object.create(Object.getPrototypeOf(this),{$$:{value:jr(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||Bt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),me(this),ye(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Bt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),pt.push(this),pt.length===1&&mt&&mt(Vt),this.$$.deleteScheduled=!0,this}})};function At(){}var Yr=48,zr=57,we=t=>{if(t===void 0)return"_unknown";t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=Yr&&e<=zr?`_${t}`:t};function Lt(t,e){return t=we(t),{[t]:function(){return e.apply(this,arguments)}}[t]}var $e=(t,e,r)=>{if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||C(`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}},Yt=(t,e,r)=>{s.hasOwnProperty(t)?((r===void 0||s[t].overloadTable!==void 0&&s[t].overloadTable[r]!==void 0)&&C(`Cannot register public name '${t}' twice`),$e(s,t,t),s.hasOwnProperty(r)&&C(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),s[t].overloadTable[r]=e):(s[t]=e,r!==void 0&&(s[t].numArguments=r))};function Nr(t,e,r,n,a,o,u,c){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=u,this.downcast=c,this.pureVirtualFunctions=[]}var zt=(t,e,r)=>{for(;e!==r;)e.upcast||C(`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&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=zt(e.$$.ptr,r,this.registeredClass);return n}function Xr(t,e){var r;if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;e.$$||C(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&C(`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=zt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&C("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:C(`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,K.toHandle(()=>a.delete())),t!==null&&t.push(this.rawDestructor,r)}break;default:C("Unsupporting sharing policy")}return r}function qr(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&C(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=zt(e.$$.ptr,r,this.registeredClass);return n}function be(t){return this.fromWireType(_[t>>2])}var Zr=()=>{Object.assign(Ot.prototype,{getPointee(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},destructor(t){this.rawDestructor&&this.rawDestructor(t)},argPackAdvance:q,readValueFromPointer:be,deleteObject(t){t!==null&&t.delete()},fromWireType:Vr})};function Ot(t,e,r,n,a,o,u,c,l,h,p){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=u,this.rawGetPointee=c,this.rawConstructor=l,this.rawShare=h,this.rawDestructor=p,!a&&e.baseClass===void 0?n?(this.toWireType=Gr,this.destructorFunction=null):(this.toWireType=qr,this.destructorFunction=null):this.toWireType=Xr}var Ce=(t,e,r)=>{s.hasOwnProperty(t)||Pt("Replacing nonexistant public symbol"),s[t].overloadTable!==void 0&&r!==void 0?s[t].overloadTable[r]=e:(s[t]=e,s[t].argCount=r)},Qr=(t,e,r)=>{var n=s["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},Dt=[],_e,D=t=>{var e=Dt[t];return e||(t>=Dt.length&&(Dt.length=t+1),Dt[t]=e=_e.get(t)),e},Jr=(t,e,r)=>{if(t.includes("j"))return Qr(t,e,r);var n=D(e).apply(null,r);return n},Kr=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),Jr(t,e,r)}},N=(t,e)=>{t=j(t);function r(){return t.includes("j")?Kr(t,e):D(e)}var n=r();return typeof n!="function"&&C(`unknown function pointer with signature ${t}: ${e}`),n},tn=(t,e)=>{var r=Lt(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},Te,Pe=t=>{var e=We(t),r=j(e);return J(e),r},St=(t,e)=>{var r=[],n={};function a(o){if(!n[o]&&!rt[o]){if(Tt[o]){Tt[o].forEach(a);return}r.push(o),n[o]=!0}}throw e.forEach(a),new Te(`${t}: `+r.map(Pe).join([", "]))},en=(t,e,r,n,a,o,u,c,l,h,p,y,g)=>{p=j(p),o=N(a,o),c&&(c=N(u,c)),h&&(h=N(l,h)),g=N(y,g);var b=we(p);Yt(b,function(){St(`Cannot construct ${p} due to unbound types`,[n])}),nt([t,e,r],n?[n]:[],function(T){T=T[0];var I,P;n?(I=T.registeredClass,P=I.instancePrototype):P=At.prototype;var R=Lt(b,function(){if(Object.getPrototypeOf(this)!==d)throw new ut("Use 'new' to construct "+p);if(m.constructor_body===void 0)throw new ut(p+" has no accessible constructor");var Mt=m.constructor_body[arguments.length];if(Mt===void 0)throw new ut(`Tried to invoke ctor of ${p} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(m.constructor_body).toString()}) parameters instead!`);return Mt.apply(this,arguments)}),d=Object.create(P,{constructor:{value:R}});R.prototype=d;var m=new Nr(p,R,d,g,I,o,c,h);m.baseClass&&(m.baseClass.__derivedClasses===void 0&&(m.baseClass.__derivedClasses=[]),m.baseClass.__derivedClasses.push(m));var x=new Ot(p,m,!0,!1,!1),M=new Ot(p+"*",m,!1,!1,!1),at=new Ot(p+" const*",m,!1,!0,!1);return ge[t]={pointerType:M,constPointerType:at},Ce(b,R),[x,M,at]})},Nt=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(_[e+n*4>>2]);return r};function Gt(t,e,r,n,a,o){var u=e.length;u<2&&C("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var c=e[1]!==null&&r!==null,l=!1,h=1;h<e.length;++h)if(e[h]!==null&&e[h].destructorFunction===void 0){l=!0;break}var p=e[0].name!=="void",y=u-2,g=new Array(y),b=[],T=[];return function(){arguments.length!==y&&C(`function ${t} called with ${arguments.length} arguments, expected ${y}`),T.length=0;var I;b.length=c?2:1,b[0]=a,c&&(I=e[1].toWireType(T,this),b[1]=I);for(var P=0;P<y;++P)g[P]=e[P+2].toWireType(T,arguments[P]),b.push(g[P]);var R=n.apply(null,b);function d(m){if(l)he(T);else for(var x=c?1:2;x<e.length;x++){var M=x===1?I:g[x-2];e[x].destructorFunction!==null&&e[x].destructorFunction(M)}if(p)return e[0].fromWireType(m)}return d(R)}}var rn=(t,e,r,n,a,o)=>{var u=Nt(e,r);a=N(n,a),nt([],[t],function(c){c=c[0];var l=`constructor ${c.name}`;if(c.registeredClass.constructor_body===void 0&&(c.registeredClass.constructor_body=[]),c.registeredClass.constructor_body[e-1]!==void 0)throw new ut(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${c.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return c.registeredClass.constructor_body[e-1]=()=>{St(`Cannot construct ${c.name} due to unbound types`,u)},nt([],u,h=>(h.splice(1,0,null),c.registeredClass.constructor_body[e-1]=Gt(l,h,null,a,o),[])),[]})},Ee=t=>{t=t.trim();const e=t.indexOf("(");return e!==-1?(It(t[t.length-1]==")","Parentheses for argument names should match."),t.substr(0,e)):t},nn=(t,e,r,n,a,o,u,c,l)=>{var h=Nt(r,n);e=j(e),e=Ee(e),o=N(a,o),nt([],[t],function(p){p=p[0];var y=`${p.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),c&&p.registeredClass.pureVirtualFunctions.push(e);function g(){St(`Cannot call ${y} due to unbound types`,h)}var b=p.registeredClass.instancePrototype,T=b[e];return T===void 0||T.overloadTable===void 0&&T.className!==p.name&&T.argCount===r-2?(g.argCount=r-2,g.className=p.name,b[e]=g):($e(b,e,y),b[e].overloadTable[r-2]=g),nt([],h,function(I){var P=Gt(y,I,p,o,u);return b[e].overloadTable===void 0?(P.argCount=r-2,b[e]=P):b[e].overloadTable[r-2]=P,[]}),[]})};function an(){Object.assign(Ae.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 Ae(){this.allocated=[void 0],this.freelist=[]}var z=new Ae,Oe=t=>{t>=z.reserved&&--z.get(t).refcount===0&&z.free(t)},on=()=>{for(var t=0,e=z.reserved;e<z.allocated.length;++e)z.allocated[e]!==void 0&&++t;return t},sn=()=>{z.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),z.reserved=z.allocated.length,s.count_emval_handles=on},K={toValue:t=>(t||C("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})}}},un=(t,e)=>{e=j(e),X(t,{name:e,fromWireType:r=>{var n=K.toValue(r);return Oe(r),n},toWireType:(r,n)=>K.toHandle(n),argPackAdvance:q,readValueFromPointer:Ht,destructorFunction:null})},cn=(t,e,r)=>{switch(e){case 1:return r?function(n){return this.fromWireType(V[n>>0])}:function(n){return this.fromWireType(k[n>>0])};case 2:return r?function(n){return this.fromWireType(ot[n>>1])}:function(n){return this.fromWireType(dt[n>>1])};case 4:return r?function(n){return this.fromWireType(W[n>>2])}:function(n){return this.fromWireType(_[n>>2])};default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},ln=(t,e,r,n)=>{e=j(e);function a(){}a.values={},X(t,{name:e,constructor:a,fromWireType:function(o){return this.constructor.values[o]},toWireType:(o,u)=>u.value,argPackAdvance:q,readValueFromPointer:cn(e,r,n),destructorFunction:null}),Yt(e,a)},Xt=(t,e)=>{var r=rt[t];return r===void 0&&C(e+" has unknown type "+Pe(t)),r},dn=(t,e,r)=>{var n=Xt(t,"enum");e=j(e);var a=n.constructor,o=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:Lt(`${n.name}_${e}`,function(){})}});a.values[r]=o,a[e]=o},qt=t=>{if(t===null)return"null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t},hn=(t,e)=>{switch(e){case 4:return function(r){return this.fromWireType(ne[r>>2])};case 8:return function(r){return this.fromWireType(ae[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},fn=(t,e,r)=>{e=j(e),X(t,{name:e,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:q,readValueFromPointer:hn(e,r),destructorFunction:null})},pn=(t,e,r,n,a,o,u)=>{var c=Nt(e,r);t=j(t),t=Ee(t),a=N(n,a),Yt(t,function(){St(`Cannot call ${t} due to unbound types`,c)},e-1),nt([],c,function(l){var h=[l[0],null].concat(l.slice(1));return Ce(t,Gt(t,h,null,a,o),e-1),[]})},mn=(t,e,r)=>{switch(e){case 1:return r?n=>V[n>>0]:n=>k[n>>0];case 2:return r?n=>ot[n>>1]:n=>dt[n>>1];case 4:return r?n=>W[n>>2]:n=>_[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},yn=(t,e,r,n,a)=>{e=j(e);var o=p=>p;if(n===0){var u=32-8*r;o=p=>p<<u>>>u}var c=e.includes("unsigned"),l=(p,y)=>{},h;c?h=function(p,y){return l(y,this.name),y>>>0}:h=function(p,y){return l(y,this.name),y},X(t,{name:e,fromWireType:o,toWireType:h,argPackAdvance:q,readValueFromPointer:mn(e,r,n!==0),destructorFunction:null})},vn=(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function o(u){var c=_[u>>2],l=_[u+4>>2];return new a(V.buffer,l,c)}r=j(r),X(t,{name:r,fromWireType:o,argPackAdvance:q,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},De=(t,e,r,n)=>{if(!(n>0))return 0;for(var a=r,o=r+n-1,u=0;u<t.length;++u){var c=t.charCodeAt(u);if(c>=55296&&c<=57343){var l=t.charCodeAt(++u);c=65536+((c&1023)<<10)|l&1023}if(c<=127){if(r>=o)break;e[r++]=c}else if(c<=2047){if(r+1>=o)break;e[r++]=192|c>>6,e[r++]=128|c&63}else if(c<=65535){if(r+2>=o)break;e[r++]=224|c>>12,e[r++]=128|c>>6&63,e[r++]=128|c&63}else{if(r+3>=o)break;e[r++]=240|c>>18,e[r++]=128|c>>12&63,e[r++]=128|c>>6&63,e[r++]=128|c&63}}return e[r]=0,r-a},gn=(t,e,r)=>De(t,k,e,r),Se=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},Fe=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&&Fe)return Fe.decode(t.subarray(e,a));for(var o="";e<a;){var u=t[e++];if(!(u&128)){o+=String.fromCharCode(u);continue}var c=t[e++]&63;if((u&224)==192){o+=String.fromCharCode((u&31)<<6|c);continue}var l=t[e++]&63;if((u&240)==224?u=(u&15)<<12|c<<6|l:u=(u&7)<<18|c<<12|l<<6|t[e++]&63,u<65536)o+=String.fromCharCode(u);else{var h=u-65536;o+=String.fromCharCode(55296|h>>10,56320|h&1023)}}return o},Zt=(t,e)=>t?wn(k,t,e):"",$n=(t,e)=>{e=j(e);var r=e==="std::string";X(t,{name:e,fromWireType(n){var a=_[n>>2],o=n+4,u;if(r)for(var c=o,l=0;l<=a;++l){var h=o+l;if(l==a||k[h]==0){var p=h-c,y=Zt(c,p);u===void 0?u=y:(u+="\0",u+=y),c=h+1}}else{for(var g=new Array(a),l=0;l<a;++l)g[l]=String.fromCharCode(k[o+l]);u=g.join("")}return J(n),u},toWireType(n,a){a instanceof ArrayBuffer&&(a=new Uint8Array(a));var o,u=typeof a=="string";u||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int8Array||C("Cannot pass non-string to std::string"),r&&u?o=Se(a):o=a.length;var c=Jt(4+o+1),l=c+4;if(_[c>>2]=o,r&&u)gn(a,l,o+1);else if(u)for(var h=0;h<o;++h){var p=a.charCodeAt(h);p>255&&(J(l),C("String has UTF-16 code units that do not fit in 8 bits")),k[l+h]=p}else for(var h=0;h<o;++h)k[l+h]=a[h];return n!==null&&n.push(J,c),c},argPackAdvance:q,readValueFromPointer:be,destructorFunction(n){J(n)}})},xe=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)&&dt[n];)++n;if(r=n<<1,r-t>32&&xe)return xe.decode(k.subarray(t,r));for(var o="",u=0;!(u>=e/2);++u){var c=ot[t+u*2>>1];if(c==0)break;o+=String.fromCharCode(c)}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 u=t.charCodeAt(o);ot[e>>1]=u,e+=2}return ot[e>>1]=0,e-n},_n=t=>t.length*2,Tn=(t,e)=>{for(var r=0,n="";!(r>=e/4);){var a=W[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 u=t.charCodeAt(o);if(u>=55296&&u<=57343){var c=t.charCodeAt(++o);u=65536+((u&1023)<<10)|c&1023}if(W[e>>2]=u,e+=4,e+4>a)break}return W[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=(t,e,r)=>{r=j(r);var n,a,o,u,c;e===2?(n=bn,a=Cn,u=_n,o=()=>dt,c=1):e===4&&(n=Tn,a=Pn,u=En,o=()=>_,c=2),X(t,{name:r,fromWireType:l=>{for(var h=_[l>>2],p=o(),y,g=l+4,b=0;b<=h;++b){var T=l+4+b*e;if(b==h||p[T>>c]==0){var I=T-g,P=n(g,I);y===void 0?y=P:(y+="\0",y+=P),g=T+e}}return J(l),y},toWireType:(l,h)=>{typeof h!="string"&&C(`Cannot pass non-string to C++ string type ${r}`);var p=u(h),y=Jt(4+p+e);return _[y>>2]=p>>c,a(h,y+4,p+e),l!==null&&l.push(J,y),y},argPackAdvance:q,readValueFromPointer:Ht,destructorFunction(l){J(l)}})},On=(t,e,r,n,a,o)=>{_t[t]={name:j(e),rawConstructor:N(r,n),rawDestructor:N(a,o),fields:[]}},Dn=(t,e,r,n,a,o,u,c,l,h)=>{_t[t].fields.push({fieldName:j(e),getterReturnType:r,getter:N(n,a),getterContext:o,setterArgumentType:u,setter:N(c,l),setterContext:h})},Sn=(t,e)=>{e=j(e),X(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},Fn={},xn=t=>{var e=Fn[t];return e===void 0?j(t):e},Me=()=>{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.")},Mn=t=>t===0?K.toHandle(Me()):(t=xn(t),K.toHandle(Me()[t])),jn=t=>{t>4&&(z.get(t).refcount+=1)},In=t=>{var e=new Array(t+1);return function(r,n,a){e[0]=r;for(var o=0;o<t;++o){var u=Xt(_[n+o*4>>2],"parameter "+o);e[o+1]=u.readValueFromPointer(a),a+=u.argPackAdvance}var c=new(r.bind.apply(r,e));return K.toHandle(c)}},je={},Rn=(t,e,r,n)=>{t=K.toValue(t);var a=je[e];return a||(a=In(e),je[e]=a),a(t,r,n)},Wn=(t,e)=>{t=Xt(t,"_emval_take_value");var r=t.readValueFromPointer(e);return K.toHandle(r)},kn=()=>{ft("")},Hn=(t,e,r)=>k.copyWithin(t,e,e+r),Bn=()=>2147483648,Un=t=>{var e=tt.buffer,r=(t-e.byteLength+65535)/65536;try{return tt.grow(r),oe(),1}catch{}},Vn=t=>{var e=k.length;t>>>=0;var r=Bn();if(t>r)return!1;for(var n=(l,h)=>l+(h-l%h)%h,a=1;a<=4;a*=2){var o=e*(1+.2/a);o=Math.min(o,t+100663296);var u=Math.min(r,n(Math.max(t,o),65536)),c=Un(u);if(c)return!0}return!1},Qt={},Ln=()=>H||"./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,_:Ln()};for(var r in Qt)Qt[r]===void 0?delete e[r]:e[r]=Qt[r];var n=[];for(var r in e)n.push(`${r}=${e[r]}`);gt.strings=n}return gt.strings},Yn=(t,e)=>{for(var r=0;r<t.length;++r)V[e++>>0]=t.charCodeAt(r);V[e>>0]=0},zn=(t,e)=>{var r=0;return gt().forEach((n,a)=>{var o=e+r;_[t+a*4>>2]=o,Yn(n,o),r+=n.length+1}),0},Nn=(t,e)=>{var r=gt();_[t>>2]=r.length;var n=0;return r.forEach(a=>n+=a.length+1),_[e>>2]=n,0},Gn=t=>t,Ft=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},Ie=[31,29,31,30,31,30,31,31,30,31,30,31],Re=[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=Ft(r.getFullYear()),a=r.getMonth(),o=(n?Ie:Re)[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 Zn(t,e,r){var n=r>0?r:Se(t)+1,a=new Array(n),o=De(t,a,0,a.length);return e&&(a.length=o),a}var Qn=(t,e)=>{V.set(t,e)},Jn=(t,e,r,n)=>{var a=_[n+40>>2],o={tm_sec:W[n>>2],tm_min:W[n+4>>2],tm_hour:W[n+8>>2],tm_mday:W[n+12>>2],tm_mon:W[n+16>>2],tm_year:W[n+20>>2],tm_wday:W[n+24>>2],tm_yday:W[n+28>>2],tm_isdst:W[n+32>>2],tm_gmtoff:W[n+36>>2],tm_zone:a?Zt(a):""},u=Zt(r),c={"%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 c)u=u.replace(new RegExp(l,"g"),c[l]);var h=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],p=["January","February","March","April","May","June","July","August","September","October","November","December"];function y(d,m,x){for(var M=typeof d=="number"?d.toString():d||"";M.length<m;)M=x[0]+M;return M}function g(d,m){return y(d,m,"0")}function b(d,m){function x(at){return at<0?-1:at>0?1:0}var M;return(M=x(d.getFullYear()-m.getFullYear()))===0&&(M=x(d.getMonth()-m.getMonth()))===0&&(M=x(d.getDate()-m.getDate())),M}function T(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 m=qn(new Date(d.tm_year+1900,0,1),d.tm_yday),x=new Date(m.getFullYear(),0,4),M=new Date(m.getFullYear()+1,0,4),at=T(x),Mt=T(M);return b(at,m)<=0?b(Mt,m)<=0?m.getFullYear()+1:m.getFullYear():m.getFullYear()-1}var P={"%a":d=>h[d.tm_wday].substring(0,3),"%A":d=>h[d.tm_wday],"%b":d=>p[d.tm_mon].substring(0,3),"%B":d=>p[d.tm_mon],"%C":d=>{var m=d.tm_year+1900;return g(m/100|0,2)},"%d":d=>g(d.tm_mday,2),"%e":d=>y(d.tm_mday,2," "),"%g":d=>I(d).toString().substring(2),"%G":d=>I(d),"%H":d=>g(d.tm_hour,2),"%I":d=>{var m=d.tm_hour;return m==0?m=12:m>12&&(m-=12),g(m,2)},"%j":d=>g(d.tm_mday+Xn(Ft(d.tm_year+1900)?Ie:Re,d.tm_mon-1),3),"%m":d=>g(d.tm_mon+1,2),"%M":d=>g(d.tm_min,2),"%n":()=>`
|
|
3
|
-
`,"%p":d=>d.tm_hour>=0&&d.tm_hour<12?"AM":"PM","%S":d=>g(d.tm_sec,2),"%t":()=>" ","%u":d=>d.tm_wday||7,"%U":d=>{var m=d.tm_yday+7-d.tm_wday;return g(Math.floor(m/7),2)},"%V":d=>{var m=Math.floor((d.tm_yday+7-(d.tm_wday+6)%7)/7);if((d.tm_wday+371-d.tm_yday-2)%7<=2&&m++,m){if(m==53){var x=(d.tm_wday+371-d.tm_yday)%7;x!=4&&(x!=3||!Ft(d.tm_year))&&(m=1)}}else{m=52;var M=(d.tm_wday+7-d.tm_yday-1)%7;(M==4||M==5&&Ft(d.tm_year%400-1))&&m++}return g(m,2)},"%w":d=>d.tm_wday,"%W":d=>{var m=d.tm_yday+7-(d.tm_wday+6)%7;return g(Math.floor(m/7),2)},"%y":d=>(d.tm_year+1900).toString().substring(2),"%Y":d=>d.tm_year+1900,"%z":d=>{var m=d.tm_gmtoff,x=m>=0;return m=Math.abs(m)/60,m=m/60*100+m%60,(x?"+":"-")+("0000"+m).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};u=u.replace(/%%/g,"\0\0");for(var l in P)u.includes(l)&&(u=u.replace(new RegExp(l,"g"),P[l](o)));u=u.replace(/\0\0/g,"%");var R=
|
|
1
|
+
"use strict";var Ye=(i,f,s)=>{if(!f.has(i))throw TypeError("Cannot "+s)};var Kt=(i,f,s)=>(Ye(i,f,"read from private field"),s?s.call(i):f.get(i)),ze=(i,f,s)=>{if(f.has(i))throw TypeError("Cannot add the same private member more than once");f instanceof WeakSet?f.add(i):f.set(i,s)},Ne=(i,f,s,w)=>(Ye(i,f,"write to private field"),w?w.call(i,s):f.set(i,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ge=["aztec","code_128","code_39","code_93","codabar","data_matrix","ean_13","ean_8","itf","pdf417","qr_code","upc_a","upc_e","unknown"];function ba(i){if(Ze(i))return{width:i.naturalWidth,height:i.naturalHeight};if(Je(i))return{width:i.width.baseVal.value,height:i.height.baseVal.value};if(Ke(i))return{width:i.videoWidth,height:i.videoHeight};if(er(i))return{width:i.width,height:i.height};if(nr(i))return{width:i.displayWidth,height:i.displayHeight};if(tr(i))return{width:i.width,height:i.height};if(rr(i))return{width:i.width,height:i.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 Ze(i){try{return i instanceof HTMLImageElement}catch{return!1}}function Je(i){try{return i instanceof SVGImageElement}catch{return!1}}function Ke(i){try{return i instanceof HTMLVideoElement}catch{return!1}}function tr(i){try{return i instanceof HTMLCanvasElement}catch{return!1}}function er(i){try{return i instanceof ImageBitmap}catch{return!1}}function rr(i){try{return i instanceof OffscreenCanvas}catch{return!1}}function nr(i){try{return i instanceof VideoFrame}catch{return!1}}function ar(i){try{return i instanceof Blob}catch{return!1}}function Ca(i){try{return i instanceof ImageData}catch{return!1}}function _a(i,f){try{const s=new OffscreenCanvas(i,f);if(s.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return s;throw void 0}catch{const s=document.createElement("canvas");return s.width=i,s.height=f,s}}async function or(i){if(Ze(i)&&!await Aa(i))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(Je(i)&&!await Oa(i))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(nr(i)&&Da(i))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(Ke(i)&&(i.readyState===0||i.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(er(i)&&Fa(i))throw new DOMException("The image source is detached.","InvalidStateError");const{width:f,height:s}=ba(i);if(f===0||s===0)return null;const v=_a(f,s).getContext("2d");v.drawImage(i,0,0);try{return v.getImageData(0,0,f,s)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Ta(i){let f;try{if(globalThis.createImageBitmap)f=await createImageBitmap(i);else if(globalThis.Image){f=new Image;let w="";try{w=URL.createObjectURL(i),f.src=w,await f.decode()}finally{URL.revokeObjectURL(w)}}else return i}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await or(f)}function Pa(i){const{width:f,height:s}=i;if(f===0||s===0)return null;const w=i.getContext("2d");try{return w.getImageData(0,0,f,s)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function Ea(i){if(ar(i))return await Ta(i);if(Ca(i)){if(Sa(i))throw new DOMException("The image data has been detached.","InvalidStateError");return i}return tr(i)||rr(i)?Pa(i):await or(i)}async function Aa(i){try{return await i.decode(),!0}catch{return!1}}async function Oa(i){var f;try{return await((f=i.decode)==null?void 0:f.call(i)),!0}catch{return!1}}function Da(i){return i.format===null}function Sa(i){return i.data.buffer.byteLength===0}function Fa(i){return i.width===0&&i.height===0}function Xe(i,f){return i instanceof DOMException?new DOMException(`${f}: ${i.message}`,i.name):i instanceof Error?new i.constructor(`${f}: ${i.message}`):new Error(`${f}: ${i}`)}const qe=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function xa(i){return i.join("|")}function Ma(i){const f=Qe(i);let s=0,w=qe.length-1;for(;s<=w;){const v=Math.floor((s+w)/2),$=qe[v],H=Qe($);if(H===f)return $;H<f?s=v+1:w=v-1}return"None"}function Qe(i){return i.toLowerCase().replace(/_-\[\]/g,"")}function ja(i,f){return i.Binarizer[f]}function Ia(i,f){return i.CharacterSet[f]}const Ra=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function Wa(i){return Ra[i.value]}function ka(i,f){return i.EanAddOnSymbol[f]}function Ha(i,f){return i.TextMode[f]}const $t={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!1,validateCode39CheckSum:!1,validateITFCheckSum:!1,returnCodabarStartEnd:!1,returnErrors:!1,eanAddOnSymbol:"Read",textMode:"Plain",characterSet:"Unknown"};function ir(i,f){return{...f,formats:xa(f.formats),binarizer:ja(i,f.binarizer),eanAddOnSymbol:ka(i,f.eanAddOnSymbol),textMode:Ha(i,f.textMode),characterSet:Ia(i,f.characterSet)}}const Ba={width:200,height:200,format:"QRCode",characterSet:"UTF8",eccLevel:-1,margin:10};function sr(i){return{...i,format:Ma(i.format),eccLevel:i.eccLevel,contentType:Wa(i.contentType)}}const Ua={locateFile:(i,f)=>{const s=i.match(/_(.+?)\.wasm$/);return s?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.0.0/dist/${s[1]}/${i}`:f+i}};let te=new WeakMap;function re(i,f){var s;const w=te.get(i);if(w!=null&&w.modulePromise&&(f===void 0||Object.is(f,w.moduleOverrides)))return w.modulePromise;const v=(s=f!=null?f:w==null?void 0:w.moduleOverrides)!=null?s:Ua,$=i({...v});return te.set(i,{moduleOverrides:v,modulePromise:$}),$}function Va(i,f){te.set(i,{moduleOverrides:f})}async function La(i,f,s=$t){const w={...$t,...s},v=await re(i),{size:$}=f,H=new Uint8Array(await f.arrayBuffer()),L=v._malloc($);v.HEAPU8.set(H,L);const B=v.readBarcodesFromImage(L,$,ir(v,w));v._free(L);const O=[];for(let Y=0;Y<B.size();++Y)O.push(sr(B.get(Y)));return O}async function Ya(i,f,s=$t){const w={...$t,...s},v=await re(i),{data:$,width:H,height:L,data:{byteLength:B}}=f,O=v._malloc(B);v.HEAPU8.set($,O);const Y=v.readBarcodesFromPixmap(O,H,L,ir(v,w));v._free(O);const G=[];for(let U=0;U<Y.size();++U)G.push(sr(Y.get(U)));return G}structuredClone($t);structuredClone(Ba);var jt=(()=>{var i=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(f={}){var s=f,w,v;s.ready=new Promise((t,e)=>{w=t,v=e});var $=Object.assign({},s),H="./this.program",L=typeof window=="object",B=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var O="";function Y(t){return s.locateFile?s.locateFile(t,O):O+t}var G;(L||B)&&(B?O=self.location.href:typeof document<"u"&&document.currentScript&&(O=document.currentScript.src),i&&(O=i),O.indexOf("blob:")!==0?O=O.substr(0,O.replace(/[?#].*/,"").lastIndexOf("/")+1):O="",B&&(G=t=>{var e=new XMLHttpRequest;return e.open("GET",t,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)})),s.print||console.log.bind(console);var U=s.printErr||console.error.bind(console);Object.assign(s,$),$=null,s.arguments&&s.arguments,s.thisProgram&&(H=s.thisProgram),s.quit&&s.quit;var Q;s.wasmBinary&&(Q=s.wasmBinary),typeof WebAssembly!="object"&&ft("no native wasm support detected");var tt,lt=!1;function It(t,e){t||ft(e)}var V,k,ot,dt,W,_,ne,ae;function oe(){var t=tt.buffer;s.HEAP8=V=new Int8Array(t),s.HEAP16=ot=new Int16Array(t),s.HEAPU8=k=new Uint8Array(t),s.HEAPU16=dt=new Uint16Array(t),s.HEAP32=W=new Int32Array(t),s.HEAPU32=_=new Uint32Array(t),s.HEAPF32=ne=new Float32Array(t),s.HEAPF64=ae=new Float64Array(t)}var ie=[],se=[],ue=[];function ur(){if(s.preRun)for(typeof s.preRun=="function"&&(s.preRun=[s.preRun]);s.preRun.length;)dr(s.preRun.shift());Rt(ie)}function cr(){Rt(se)}function lr(){if(s.postRun)for(typeof s.postRun=="function"&&(s.postRun=[s.postRun]);s.postRun.length;)fr(s.postRun.shift());Rt(ue)}function dr(t){ie.unshift(t)}function hr(t){se.unshift(t)}function fr(t){ue.unshift(t)}var et=0,ht=null;function pr(t){et++,s.monitorRunDependencies&&s.monitorRunDependencies(et)}function mr(t){if(et--,s.monitorRunDependencies&&s.monitorRunDependencies(et),et==0&&ht){var e=ht;ht=null,e()}}function ft(t){s.onAbort&&s.onAbort(t),t="Aborted("+t+")",U(t),lt=!0,t+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(t);throw v(e),e}var yr="data:application/octet-stream;base64,",ce=t=>t.startsWith(yr),it;it="zxing_reader.wasm",ce(it)||(it=Y(it));function le(t){if(t==it&&Q)return new Uint8Array(Q);if(G)return G(t);throw"both async and sync fetching of the wasm failed"}function vr(t){return!Q&&(L||B)&&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(()=>le(t)):Promise.resolve().then(()=>le(t))}function de(t,e,r){return vr(t).then(n=>WebAssembly.instantiate(n,e)).then(n=>n).then(r,n=>{U(`failed to asynchronously prepare wasm: ${n}`),ft(n)})}function gr(t,e,r,n){return!t&&typeof WebAssembly.instantiateStreaming=="function"&&!ce(e)&&typeof fetch=="function"?fetch(e,{credentials:"same-origin"}).then(a=>{var o=WebAssembly.instantiateStreaming(a,r);return o.then(n,function(u){return U(`wasm streaming compile failed: ${u}`),U("falling back to ArrayBuffer instantiation"),de(e,r,n)})}):de(e,r,n)}function wr(){var t={a:ta};function e(n,a){return E=n.exports,tt=E.fa,oe(),_e=E.ja,hr(E.ga),mr(),E}pr();function r(n){e(n.instance)}if(s.instantiateWasm)try{return s.instantiateWasm(t,e)}catch(n){U(`Module.instantiateWasm callback failed with error: ${n}`),v(n)}return gr(Q,it,t,r).catch(v),{}}var Rt=t=>{for(;t.length>0;)t.shift()(s)};s.noExitRuntime;var bt=[],Ct=0,$r=t=>{var e=new Wt(t);return e.get_caught()||(e.set_caught(!0),Ct--),e.set_rethrown(!1),bt.push(e),He(e.excPtr),e.get_exception_ptr()},Z=0,br=()=>{A(0,0);var t=bt.pop();ke(t.excPtr),Z=0};function Wt(t){this.excPtr=t,this.ptr=t-24,this.set_type=function(e){_[this.ptr+4>>2]=e},this.get_type=function(){return _[this.ptr+4>>2]},this.set_destructor=function(e){_[this.ptr+8>>2]=e},this.get_destructor=function(){return _[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,V[this.ptr+12>>0]=e},this.get_caught=function(){return V[this.ptr+12>>0]!=0},this.set_rethrown=function(e){e=e?1:0,V[this.ptr+13>>0]=e},this.get_rethrown=function(){return V[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){_[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return _[this.ptr+16>>2]},this.get_exception_ptr=function(){var e=Ue(this.get_type());if(e)return _[this.excPtr>>2];var r=this.get_adjusted_ptr();return r!==0?r:this.excPtr}}var Cr=t=>{throw Z||(Z=t),Z},kt=t=>{var e=Z;if(!e)return wt(0),0;var r=new Wt(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 u=r.ptr+16;if(Be(o,n,u))return wt(o),e}return wt(n),e},_r=()=>kt([]),Tr=t=>kt([t]),Pr=(t,e)=>kt([t,e]),Er=()=>{var t=bt.pop();t||ft("no exception to throw");var e=t.excPtr;throw t.get_rethrown()||(bt.push(t),t.set_rethrown(!0),t.set_caught(!1),Ct++),Z=e,Z},Ar=(t,e,r)=>{var n=new Wt(t);throw n.init(e,r),Z=t,Ct++,Z},Or=()=>Ct,_t={},he=t=>{for(;t.length;){var e=t.pop(),r=t.pop();r(e)}};function Ht(t){return this.fromWireType(W[t>>2])}var st={},rt={},Tt={},fe,Pt=t=>{throw new fe(t)},nt=(t,e,r)=>{t.forEach(function(c){Tt[c]=e});function n(c){var l=r(c);l.length!==t.length&&Pt("Mismatched type converter count");for(var h=0;h<t.length;++h)X(t[h],l[h])}var a=new Array(e.length),o=[],u=0;e.forEach((c,l)=>{rt.hasOwnProperty(c)?a[l]=rt[c]:(o.push(c),st.hasOwnProperty(c)||(st[c]=[]),st[c].push(()=>{a[l]=rt[c],++u,u===o.length&&n(a)}))}),o.length===0&&n(a)},Dr=t=>{var e=_t[t];delete _t[t];var r=e.rawConstructor,n=e.rawDestructor,a=e.fields,o=a.map(u=>u.getterReturnType).concat(a.map(u=>u.setterArgumentType));nt([t],o,u=>{var c={};return a.forEach((l,h)=>{var p=l.fieldName,y=u[h],g=l.getter,b=l.getterContext,T=u[h+a.length],I=l.setter,P=l.setterContext;c[p]={read:R=>y.fromWireType(g(b,R)),write:(R,d)=>{var m=[];I(P,R,T.toWireType(m,d)),he(m)}}}),[{name:e.name,fromWireType:l=>{var h={};for(var p in c)h[p]=c[p].read(l);return n(l),h},toWireType:(l,h)=>{for(var p in c)if(!(p in h))throw new TypeError(`Missing field: "${p}"`);var y=r();for(p in c)c[p].write(y,h[p]);return l!==null&&l.push(n,y),y},argPackAdvance:q,readValueFromPointer:Ht,destructorFunction:n}]})},Sr=(t,e,r,n,a)=>{},Fr=()=>{for(var t=new Array(256),e=0;e<256;++e)t[e]=String.fromCharCode(e);pe=t},pe,j=t=>{for(var e="",r=t;k[r];)e+=pe[k[r++]];return e},ut,C=t=>{throw new ut(t)};function xr(t,e,r={}){var n=e.name;if(t||C(`type "${n}" must have a positive integer typeid pointer`),rt.hasOwnProperty(t)){if(r.ignoreDuplicateRegistrations)return;C(`Cannot register type '${n}' twice`)}if(rt[t]=e,delete Tt[t],st.hasOwnProperty(t)){var a=st[t];delete st[t],a.forEach(o=>o())}}function X(t,e,r={}){if(!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");return xr(t,e,r)}var q=8,Mr=(t,e,r,n)=>{e=j(e),X(t,{name:e,fromWireType:function(a){return!!a},toWireType:function(a,o){return o?r:n},argPackAdvance:q,readValueFromPointer:function(a){return this.fromWireType(k[a])},destructorFunction:null})},jr=t=>({count:t.count,deleteScheduled:t.deleteScheduled,preservePointerOnDelete:t.preservePointerOnDelete,ptr:t.ptr,ptrType:t.ptrType,smartPtr:t.smartPtr,smartPtrType:t.smartPtrType}),Bt=t=>{function e(r){return r.$$.ptrType.registeredClass.name}C(e(t)+" instance already deleted")},Ut=!1,me=t=>{},Ir=t=>{t.smartPtr?t.smartPtrType.rawDestructor(t.smartPtr):t.ptrType.registeredClass.rawDestructor(t.ptr)},ye=t=>{t.count.value-=1;var e=t.count.value===0;e&&Ir(t)},ve=(t,e,r)=>{if(e===r)return t;if(r.baseClass===void 0)return null;var n=ve(t,e,r.baseClass);return n===null?null:r.downcast(n)},ge={},Rr=()=>Object.keys(yt).length,Wr=()=>{var t=[];for(var e in yt)yt.hasOwnProperty(e)&&t.push(yt[e]);return t},pt=[],Vt=()=>{for(;pt.length;){var t=pt.pop();t.$$.deleteScheduled=!1,t.delete()}},mt,kr=t=>{mt=t,pt.length&&mt&&mt(Vt)},Hr=()=>{s.getInheritedInstanceCount=Rr,s.getLiveInheritedInstances=Wr,s.flushPendingDeletes=Vt,s.setDelayFunction=kr},yt={},Br=(t,e)=>{for(e===void 0&&C("ptr should not be undefined");t.baseClass;)e=t.upcast(e),t=t.baseClass;return e},Ur=(t,e)=>(e=Br(t,e),yt[e]),Et=(t,e)=>{(!e.ptrType||!e.ptr)&&Pt("makeClassHandle requires ptr and ptrType");var r=!!e.smartPtrType,n=!!e.smartPtr;return r!==n&&Pt("Both smartPtrType and smartPtr must be specified"),e.count={value:1},vt(Object.create(t,{$$:{value:e}}))};function Vr(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?Et(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:e,smartPtrType:this,smartPtr:t}):Et(this.registeredClass.instancePrototype,{ptrType:this,ptr:t})}var o=this.registeredClass.getActualType(e),u=ge[o];if(!u)return a.call(this);var c;this.isConst?c=u.constPointerType:c=u.pointerType;var l=ve(e,this.registeredClass,c.registeredClass);return l===null?a.call(this):this.isSmartPointer?Et(c.registeredClass.instancePrototype,{ptrType:c,ptr:l,smartPtrType:this,smartPtr:t}):Et(c.registeredClass.instancePrototype,{ptrType:c,ptr:l})}var vt=t=>typeof FinalizationRegistry>"u"?(vt=e=>e,t):(Ut=new FinalizationRegistry(e=>{ye(e.$$)}),vt=e=>{var r=e.$$,n=!!r.smartPtr;if(n){var a={$$:r};Ut.register(e,a,e)}return e},me=e=>Ut.unregister(e),vt(t)),Lr=()=>{Object.assign(At.prototype,{isAliasOf(t){if(!(this instanceof At)||!(t instanceof At))return!1;var e=this.$$.ptrType.registeredClass,r=this.$$.ptr;t.$$=t.$$;for(var n=t.$$.ptrType.registeredClass,a=t.$$.ptr;e.baseClass;)r=e.upcast(r),e=e.baseClass;for(;n.baseClass;)a=n.upcast(a),n=n.baseClass;return e===n&&r===a},clone(){if(this.$$.ptr||Bt(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var t=vt(Object.create(Object.getPrototypeOf(this),{$$:{value:jr(this.$$)}}));return t.$$.count.value+=1,t.$$.deleteScheduled=!1,t},delete(){this.$$.ptr||Bt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),me(this),ye(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Bt(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&C("Object already scheduled for deletion"),pt.push(this),pt.length===1&&mt&&mt(Vt),this.$$.deleteScheduled=!0,this}})};function At(){}var Yr=48,zr=57,we=t=>{if(t===void 0)return"_unknown";t=t.replace(/[^a-zA-Z0-9_]/g,"$");var e=t.charCodeAt(0);return e>=Yr&&e<=zr?`_${t}`:t};function Lt(t,e){return t=we(t),{[t]:function(){return e.apply(this,arguments)}}[t]}var $e=(t,e,r)=>{if(t[e].overloadTable===void 0){var n=t[e];t[e]=function(){return t[e].overloadTable.hasOwnProperty(arguments.length)||C(`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}},Yt=(t,e,r)=>{s.hasOwnProperty(t)?((r===void 0||s[t].overloadTable!==void 0&&s[t].overloadTable[r]!==void 0)&&C(`Cannot register public name '${t}' twice`),$e(s,t,t),s.hasOwnProperty(r)&&C(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),s[t].overloadTable[r]=e):(s[t]=e,r!==void 0&&(s[t].numArguments=r))};function Nr(t,e,r,n,a,o,u,c){this.name=t,this.constructor=e,this.instancePrototype=r,this.rawDestructor=n,this.baseClass=a,this.getActualType=o,this.upcast=u,this.downcast=c,this.pureVirtualFunctions=[]}var zt=(t,e,r)=>{for(;e!==r;)e.upcast||C(`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&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=zt(e.$$.ptr,r,this.registeredClass);return n}function Xr(t,e){var r;if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),this.isSmartPointer?(r=this.rawConstructor(),t!==null&&t.push(this.rawDestructor,r),r):0;e.$$||C(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&e.$$.ptrType.isConst&&C(`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=zt(e.$$.ptr,n,this.registeredClass),this.isSmartPointer)switch(e.$$.smartPtr===void 0&&C("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:e.$$.smartPtrType===this?r=e.$$.smartPtr:C(`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,K.toHandle(()=>a.delete())),t!==null&&t.push(this.rawDestructor,r)}break;default:C("Unsupporting sharing policy")}return r}function qr(t,e){if(e===null)return this.isReference&&C(`null is not a valid ${this.name}`),0;e.$$||C(`Cannot pass "${qt(e)}" as a ${this.name}`),e.$$.ptr||C(`Cannot pass deleted object as a pointer of type ${this.name}`),e.$$.ptrType.isConst&&C(`Cannot convert argument of type ${e.$$.ptrType.name} to parameter type ${this.name}`);var r=e.$$.ptrType.registeredClass,n=zt(e.$$.ptr,r,this.registeredClass);return n}function be(t){return this.fromWireType(_[t>>2])}var Qr=()=>{Object.assign(Ot.prototype,{getPointee(t){return this.rawGetPointee&&(t=this.rawGetPointee(t)),t},destructor(t){this.rawDestructor&&this.rawDestructor(t)},argPackAdvance:q,readValueFromPointer:be,deleteObject(t){t!==null&&t.delete()},fromWireType:Vr})};function Ot(t,e,r,n,a,o,u,c,l,h,p){this.name=t,this.registeredClass=e,this.isReference=r,this.isConst=n,this.isSmartPointer=a,this.pointeeType=o,this.sharingPolicy=u,this.rawGetPointee=c,this.rawConstructor=l,this.rawShare=h,this.rawDestructor=p,!a&&e.baseClass===void 0?n?(this.toWireType=Gr,this.destructorFunction=null):(this.toWireType=qr,this.destructorFunction=null):this.toWireType=Xr}var Ce=(t,e,r)=>{s.hasOwnProperty(t)||Pt("Replacing nonexistant public symbol"),s[t].overloadTable!==void 0&&r!==void 0?s[t].overloadTable[r]=e:(s[t]=e,s[t].argCount=r)},Zr=(t,e,r)=>{var n=s["dynCall_"+t];return r&&r.length?n.apply(null,[e].concat(r)):n.call(null,e)},Dt=[],_e,D=t=>{var e=Dt[t];return e||(t>=Dt.length&&(Dt.length=t+1),Dt[t]=e=_e.get(t)),e},Jr=(t,e,r)=>{if(t.includes("j"))return Zr(t,e,r);var n=D(e).apply(null,r);return n},Kr=(t,e)=>{var r=[];return function(){return r.length=0,Object.assign(r,arguments),Jr(t,e,r)}},N=(t,e)=>{t=j(t);function r(){return t.includes("j")?Kr(t,e):D(e)}var n=r();return typeof n!="function"&&C(`unknown function pointer with signature ${t}: ${e}`),n},tn=(t,e)=>{var r=Lt(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},Te,Pe=t=>{var e=We(t),r=j(e);return J(e),r},St=(t,e)=>{var r=[],n={};function a(o){if(!n[o]&&!rt[o]){if(Tt[o]){Tt[o].forEach(a);return}r.push(o),n[o]=!0}}throw e.forEach(a),new Te(`${t}: `+r.map(Pe).join([", "]))},en=(t,e,r,n,a,o,u,c,l,h,p,y,g)=>{p=j(p),o=N(a,o),c&&(c=N(u,c)),h&&(h=N(l,h)),g=N(y,g);var b=we(p);Yt(b,function(){St(`Cannot construct ${p} due to unbound types`,[n])}),nt([t,e,r],n?[n]:[],function(T){T=T[0];var I,P;n?(I=T.registeredClass,P=I.instancePrototype):P=At.prototype;var R=Lt(b,function(){if(Object.getPrototypeOf(this)!==d)throw new ut("Use 'new' to construct "+p);if(m.constructor_body===void 0)throw new ut(p+" has no accessible constructor");var Mt=m.constructor_body[arguments.length];if(Mt===void 0)throw new ut(`Tried to invoke ctor of ${p} with invalid number of parameters (${arguments.length}) - expected (${Object.keys(m.constructor_body).toString()}) parameters instead!`);return Mt.apply(this,arguments)}),d=Object.create(P,{constructor:{value:R}});R.prototype=d;var m=new Nr(p,R,d,g,I,o,c,h);m.baseClass&&(m.baseClass.__derivedClasses===void 0&&(m.baseClass.__derivedClasses=[]),m.baseClass.__derivedClasses.push(m));var x=new Ot(p,m,!0,!1,!1),M=new Ot(p+"*",m,!1,!1,!1),at=new Ot(p+" const*",m,!1,!0,!1);return ge[t]={pointerType:M,constPointerType:at},Ce(b,R),[x,M,at]})},Nt=(t,e)=>{for(var r=[],n=0;n<t;n++)r.push(_[e+n*4>>2]);return r};function Gt(t,e,r,n,a,o){var u=e.length;u<2&&C("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var c=e[1]!==null&&r!==null,l=!1,h=1;h<e.length;++h)if(e[h]!==null&&e[h].destructorFunction===void 0){l=!0;break}var p=e[0].name!=="void",y=u-2,g=new Array(y),b=[],T=[];return function(){arguments.length!==y&&C(`function ${t} called with ${arguments.length} arguments, expected ${y}`),T.length=0;var I;b.length=c?2:1,b[0]=a,c&&(I=e[1].toWireType(T,this),b[1]=I);for(var P=0;P<y;++P)g[P]=e[P+2].toWireType(T,arguments[P]),b.push(g[P]);var R=n.apply(null,b);function d(m){if(l)he(T);else for(var x=c?1:2;x<e.length;x++){var M=x===1?I:g[x-2];e[x].destructorFunction!==null&&e[x].destructorFunction(M)}if(p)return e[0].fromWireType(m)}return d(R)}}var rn=(t,e,r,n,a,o)=>{var u=Nt(e,r);a=N(n,a),nt([],[t],function(c){c=c[0];var l=`constructor ${c.name}`;if(c.registeredClass.constructor_body===void 0&&(c.registeredClass.constructor_body=[]),c.registeredClass.constructor_body[e-1]!==void 0)throw new ut(`Cannot register multiple constructors with identical number of parameters (${e-1}) for class '${c.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return c.registeredClass.constructor_body[e-1]=()=>{St(`Cannot construct ${c.name} due to unbound types`,u)},nt([],u,h=>(h.splice(1,0,null),c.registeredClass.constructor_body[e-1]=Gt(l,h,null,a,o),[])),[]})},Ee=t=>{t=t.trim();const e=t.indexOf("(");return e!==-1?(It(t[t.length-1]==")","Parentheses for argument names should match."),t.substr(0,e)):t},nn=(t,e,r,n,a,o,u,c,l)=>{var h=Nt(r,n);e=j(e),e=Ee(e),o=N(a,o),nt([],[t],function(p){p=p[0];var y=`${p.name}.${e}`;e.startsWith("@@")&&(e=Symbol[e.substring(2)]),c&&p.registeredClass.pureVirtualFunctions.push(e);function g(){St(`Cannot call ${y} due to unbound types`,h)}var b=p.registeredClass.instancePrototype,T=b[e];return T===void 0||T.overloadTable===void 0&&T.className!==p.name&&T.argCount===r-2?(g.argCount=r-2,g.className=p.name,b[e]=g):($e(b,e,y),b[e].overloadTable[r-2]=g),nt([],h,function(I){var P=Gt(y,I,p,o,u);return b[e].overloadTable===void 0?(P.argCount=r-2,b[e]=P):b[e].overloadTable[r-2]=P,[]}),[]})};function an(){Object.assign(Ae.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 Ae(){this.allocated=[void 0],this.freelist=[]}var z=new Ae,Oe=t=>{t>=z.reserved&&--z.get(t).refcount===0&&z.free(t)},on=()=>{for(var t=0,e=z.reserved;e<z.allocated.length;++e)z.allocated[e]!==void 0&&++t;return t},sn=()=>{z.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),z.reserved=z.allocated.length,s.count_emval_handles=on},K={toValue:t=>(t||C("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})}}},un=(t,e)=>{e=j(e),X(t,{name:e,fromWireType:r=>{var n=K.toValue(r);return Oe(r),n},toWireType:(r,n)=>K.toHandle(n),argPackAdvance:q,readValueFromPointer:Ht,destructorFunction:null})},cn=(t,e,r)=>{switch(e){case 1:return r?function(n){return this.fromWireType(V[n>>0])}:function(n){return this.fromWireType(k[n>>0])};case 2:return r?function(n){return this.fromWireType(ot[n>>1])}:function(n){return this.fromWireType(dt[n>>1])};case 4:return r?function(n){return this.fromWireType(W[n>>2])}:function(n){return this.fromWireType(_[n>>2])};default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},ln=(t,e,r,n)=>{e=j(e);function a(){}a.values={},X(t,{name:e,constructor:a,fromWireType:function(o){return this.constructor.values[o]},toWireType:(o,u)=>u.value,argPackAdvance:q,readValueFromPointer:cn(e,r,n),destructorFunction:null}),Yt(e,a)},Xt=(t,e)=>{var r=rt[t];return r===void 0&&C(e+" has unknown type "+Pe(t)),r},dn=(t,e,r)=>{var n=Xt(t,"enum");e=j(e);var a=n.constructor,o=Object.create(n.constructor.prototype,{value:{value:r},constructor:{value:Lt(`${n.name}_${e}`,function(){})}});a.values[r]=o,a[e]=o},qt=t=>{if(t===null)return"null";var e=typeof t;return e==="object"||e==="array"||e==="function"?t.toString():""+t},hn=(t,e)=>{switch(e){case 4:return function(r){return this.fromWireType(ne[r>>2])};case 8:return function(r){return this.fromWireType(ae[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${t}`)}},fn=(t,e,r)=>{e=j(e),X(t,{name:e,fromWireType:n=>n,toWireType:(n,a)=>a,argPackAdvance:q,readValueFromPointer:hn(e,r),destructorFunction:null})},pn=(t,e,r,n,a,o,u)=>{var c=Nt(e,r);t=j(t),t=Ee(t),a=N(n,a),Yt(t,function(){St(`Cannot call ${t} due to unbound types`,c)},e-1),nt([],c,function(l){var h=[l[0],null].concat(l.slice(1));return Ce(t,Gt(t,h,null,a,o),e-1),[]})},mn=(t,e,r)=>{switch(e){case 1:return r?n=>V[n>>0]:n=>k[n>>0];case 2:return r?n=>ot[n>>1]:n=>dt[n>>1];case 4:return r?n=>W[n>>2]:n=>_[n>>2];default:throw new TypeError(`invalid integer width (${e}): ${t}`)}},yn=(t,e,r,n,a)=>{e=j(e);var o=p=>p;if(n===0){var u=32-8*r;o=p=>p<<u>>>u}var c=e.includes("unsigned"),l=(p,y)=>{},h;c?h=function(p,y){return l(y,this.name),y>>>0}:h=function(p,y){return l(y,this.name),y},X(t,{name:e,fromWireType:o,toWireType:h,argPackAdvance:q,readValueFromPointer:mn(e,r,n!==0),destructorFunction:null})},vn=(t,e,r)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],a=n[e];function o(u){var c=_[u>>2],l=_[u+4>>2];return new a(V.buffer,l,c)}r=j(r),X(t,{name:r,fromWireType:o,argPackAdvance:q,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},De=(t,e,r,n)=>{if(!(n>0))return 0;for(var a=r,o=r+n-1,u=0;u<t.length;++u){var c=t.charCodeAt(u);if(c>=55296&&c<=57343){var l=t.charCodeAt(++u);c=65536+((c&1023)<<10)|l&1023}if(c<=127){if(r>=o)break;e[r++]=c}else if(c<=2047){if(r+1>=o)break;e[r++]=192|c>>6,e[r++]=128|c&63}else if(c<=65535){if(r+2>=o)break;e[r++]=224|c>>12,e[r++]=128|c>>6&63,e[r++]=128|c&63}else{if(r+3>=o)break;e[r++]=240|c>>18,e[r++]=128|c>>12&63,e[r++]=128|c>>6&63,e[r++]=128|c&63}}return e[r]=0,r-a},gn=(t,e,r)=>De(t,k,e,r),Se=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},Fe=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&&Fe)return Fe.decode(t.subarray(e,a));for(var o="";e<a;){var u=t[e++];if(!(u&128)){o+=String.fromCharCode(u);continue}var c=t[e++]&63;if((u&224)==192){o+=String.fromCharCode((u&31)<<6|c);continue}var l=t[e++]&63;if((u&240)==224?u=(u&15)<<12|c<<6|l:u=(u&7)<<18|c<<12|l<<6|t[e++]&63,u<65536)o+=String.fromCharCode(u);else{var h=u-65536;o+=String.fromCharCode(55296|h>>10,56320|h&1023)}}return o},Qt=(t,e)=>t?wn(k,t,e):"",$n=(t,e)=>{e=j(e);var r=e==="std::string";X(t,{name:e,fromWireType(n){var a=_[n>>2],o=n+4,u;if(r)for(var c=o,l=0;l<=a;++l){var h=o+l;if(l==a||k[h]==0){var p=h-c,y=Qt(c,p);u===void 0?u=y:(u+="\0",u+=y),c=h+1}}else{for(var g=new Array(a),l=0;l<a;++l)g[l]=String.fromCharCode(k[o+l]);u=g.join("")}return J(n),u},toWireType(n,a){a instanceof ArrayBuffer&&(a=new Uint8Array(a));var o,u=typeof a=="string";u||a instanceof Uint8Array||a instanceof Uint8ClampedArray||a instanceof Int8Array||C("Cannot pass non-string to std::string"),r&&u?o=Se(a):o=a.length;var c=Jt(4+o+1),l=c+4;if(_[c>>2]=o,r&&u)gn(a,l,o+1);else if(u)for(var h=0;h<o;++h){var p=a.charCodeAt(h);p>255&&(J(l),C("String has UTF-16 code units that do not fit in 8 bits")),k[l+h]=p}else for(var h=0;h<o;++h)k[l+h]=a[h];return n!==null&&n.push(J,c),c},argPackAdvance:q,readValueFromPointer:be,destructorFunction(n){J(n)}})},xe=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)&&dt[n];)++n;if(r=n<<1,r-t>32&&xe)return xe.decode(k.subarray(t,r));for(var o="",u=0;!(u>=e/2);++u){var c=ot[t+u*2>>1];if(c==0)break;o+=String.fromCharCode(c)}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 u=t.charCodeAt(o);ot[e>>1]=u,e+=2}return ot[e>>1]=0,e-n},_n=t=>t.length*2,Tn=(t,e)=>{for(var r=0,n="";!(r>=e/4);){var a=W[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 u=t.charCodeAt(o);if(u>=55296&&u<=57343){var c=t.charCodeAt(++o);u=65536+((u&1023)<<10)|c&1023}if(W[e>>2]=u,e+=4,e+4>a)break}return W[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=(t,e,r)=>{r=j(r);var n,a,o,u,c;e===2?(n=bn,a=Cn,u=_n,o=()=>dt,c=1):e===4&&(n=Tn,a=Pn,u=En,o=()=>_,c=2),X(t,{name:r,fromWireType:l=>{for(var h=_[l>>2],p=o(),y,g=l+4,b=0;b<=h;++b){var T=l+4+b*e;if(b==h||p[T>>c]==0){var I=T-g,P=n(g,I);y===void 0?y=P:(y+="\0",y+=P),g=T+e}}return J(l),y},toWireType:(l,h)=>{typeof h!="string"&&C(`Cannot pass non-string to C++ string type ${r}`);var p=u(h),y=Jt(4+p+e);return _[y>>2]=p>>c,a(h,y+4,p+e),l!==null&&l.push(J,y),y},argPackAdvance:q,readValueFromPointer:Ht,destructorFunction(l){J(l)}})},On=(t,e,r,n,a,o)=>{_t[t]={name:j(e),rawConstructor:N(r,n),rawDestructor:N(a,o),fields:[]}},Dn=(t,e,r,n,a,o,u,c,l,h)=>{_t[t].fields.push({fieldName:j(e),getterReturnType:r,getter:N(n,a),getterContext:o,setterArgumentType:u,setter:N(c,l),setterContext:h})},Sn=(t,e)=>{e=j(e),X(t,{isVoid:!0,name:e,argPackAdvance:0,fromWireType:()=>{},toWireType:(r,n)=>{}})},Fn={},xn=t=>{var e=Fn[t];return e===void 0?j(t):e},Me=()=>{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.")},Mn=t=>t===0?K.toHandle(Me()):(t=xn(t),K.toHandle(Me()[t])),jn=t=>{t>4&&(z.get(t).refcount+=1)},In=t=>{var e=new Array(t+1);return function(r,n,a){e[0]=r;for(var o=0;o<t;++o){var u=Xt(_[n+o*4>>2],"parameter "+o);e[o+1]=u.readValueFromPointer(a),a+=u.argPackAdvance}var c=new(r.bind.apply(r,e));return K.toHandle(c)}},je={},Rn=(t,e,r,n)=>{t=K.toValue(t);var a=je[e];return a||(a=In(e),je[e]=a),a(t,r,n)},Wn=(t,e)=>{t=Xt(t,"_emval_take_value");var r=t.readValueFromPointer(e);return K.toHandle(r)},kn=()=>{ft("")},Hn=(t,e,r)=>k.copyWithin(t,e,e+r),Bn=()=>2147483648,Un=t=>{var e=tt.buffer,r=(t-e.byteLength+65535)/65536;try{return tt.grow(r),oe(),1}catch{}},Vn=t=>{var e=k.length;t>>>=0;var r=Bn();if(t>r)return!1;for(var n=(l,h)=>l+(h-l%h)%h,a=1;a<=4;a*=2){var o=e*(1+.2/a);o=Math.min(o,t+100663296);var u=Math.min(r,n(Math.max(t,o),65536)),c=Un(u);if(c)return!0}return!1},Zt={},Ln=()=>H||"./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,_:Ln()};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]}`);gt.strings=n}return gt.strings},Yn=(t,e)=>{for(var r=0;r<t.length;++r)V[e++>>0]=t.charCodeAt(r);V[e>>0]=0},zn=(t,e)=>{var r=0;return gt().forEach((n,a)=>{var o=e+r;_[t+a*4>>2]=o,Yn(n,o),r+=n.length+1}),0},Nn=(t,e)=>{var r=gt();_[t>>2]=r.length;var n=0;return r.forEach(a=>n+=a.length+1),_[e>>2]=n,0},Gn=t=>t,Ft=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},Ie=[31,29,31,30,31,30,31,31,30,31,30,31],Re=[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=Ft(r.getFullYear()),a=r.getMonth(),o=(n?Ie:Re)[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 Qn(t,e,r){var n=r>0?r:Se(t)+1,a=new Array(n),o=De(t,a,0,a.length);return e&&(a.length=o),a}var Zn=(t,e)=>{V.set(t,e)},Jn=(t,e,r,n)=>{var a=_[n+40>>2],o={tm_sec:W[n>>2],tm_min:W[n+4>>2],tm_hour:W[n+8>>2],tm_mday:W[n+12>>2],tm_mon:W[n+16>>2],tm_year:W[n+20>>2],tm_wday:W[n+24>>2],tm_yday:W[n+28>>2],tm_isdst:W[n+32>>2],tm_gmtoff:W[n+36>>2],tm_zone:a?Qt(a):""},u=Qt(r),c={"%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 c)u=u.replace(new RegExp(l,"g"),c[l]);var h=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],p=["January","February","March","April","May","June","July","August","September","October","November","December"];function y(d,m,x){for(var M=typeof d=="number"?d.toString():d||"";M.length<m;)M=x[0]+M;return M}function g(d,m){return y(d,m,"0")}function b(d,m){function x(at){return at<0?-1:at>0?1:0}var M;return(M=x(d.getFullYear()-m.getFullYear()))===0&&(M=x(d.getMonth()-m.getMonth()))===0&&(M=x(d.getDate()-m.getDate())),M}function T(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 m=qn(new Date(d.tm_year+1900,0,1),d.tm_yday),x=new Date(m.getFullYear(),0,4),M=new Date(m.getFullYear()+1,0,4),at=T(x),Mt=T(M);return b(at,m)<=0?b(Mt,m)<=0?m.getFullYear()+1:m.getFullYear():m.getFullYear()-1}var P={"%a":d=>h[d.tm_wday].substring(0,3),"%A":d=>h[d.tm_wday],"%b":d=>p[d.tm_mon].substring(0,3),"%B":d=>p[d.tm_mon],"%C":d=>{var m=d.tm_year+1900;return g(m/100|0,2)},"%d":d=>g(d.tm_mday,2),"%e":d=>y(d.tm_mday,2," "),"%g":d=>I(d).toString().substring(2),"%G":d=>I(d),"%H":d=>g(d.tm_hour,2),"%I":d=>{var m=d.tm_hour;return m==0?m=12:m>12&&(m-=12),g(m,2)},"%j":d=>g(d.tm_mday+Xn(Ft(d.tm_year+1900)?Ie:Re,d.tm_mon-1),3),"%m":d=>g(d.tm_mon+1,2),"%M":d=>g(d.tm_min,2),"%n":()=>`
|
|
3
|
+
`,"%p":d=>d.tm_hour>=0&&d.tm_hour<12?"AM":"PM","%S":d=>g(d.tm_sec,2),"%t":()=>" ","%u":d=>d.tm_wday||7,"%U":d=>{var m=d.tm_yday+7-d.tm_wday;return g(Math.floor(m/7),2)},"%V":d=>{var m=Math.floor((d.tm_yday+7-(d.tm_wday+6)%7)/7);if((d.tm_wday+371-d.tm_yday-2)%7<=2&&m++,m){if(m==53){var x=(d.tm_wday+371-d.tm_yday)%7;x!=4&&(x!=3||!Ft(d.tm_year))&&(m=1)}}else{m=52;var M=(d.tm_wday+7-d.tm_yday-1)%7;(M==4||M==5&&Ft(d.tm_year%400-1))&&m++}return g(m,2)},"%w":d=>d.tm_wday,"%W":d=>{var m=d.tm_yday+7-(d.tm_wday+6)%7;return g(Math.floor(m/7),2)},"%y":d=>(d.tm_year+1900).toString().substring(2),"%Y":d=>d.tm_year+1900,"%z":d=>{var m=d.tm_gmtoff,x=m>=0;return m=Math.abs(m)/60,m=m/60*100+m%60,(x?"+":"-")+("0000"+m).slice(-4)},"%Z":d=>d.tm_zone,"%%":()=>"%"};u=u.replace(/%%/g,"\0\0");for(var l in P)u.includes(l)&&(u=u.replace(new RegExp(l,"g"),P[l](o)));u=u.replace(/\0\0/g,"%");var R=Qn(u,!1);return R.length>e?0:(Zn(R,t),R.length-1)},Kn=(t,e,r,n,a)=>Jn(t,e,r,n);fe=s.InternalError=class extends Error{constructor(t){super(t),this.name="InternalError"}},Fr(),ut=s.BindingError=class extends Error{constructor(t){super(t),this.name="BindingError"}},Lr(),Hr(),Qr(),Te=s.UnboundTypeError=tn(Error,"UnboundTypeError"),an(),sn();var ta={s:$r,v:br,b:_r,g:Tr,q:Pr,I:Er,f:Ar,T:Or,d:Cr,ba:Dr,P:Sr,Y:Mr,aa:en,$:rn,w:nn,X:un,x:ln,h:dn,K:fn,L:pn,t:yn,n:vn,J:$n,C:An,A:On,ca:Dn,Z:Sn,ea:Oe,da:Mn,M:jn,V:Rn,_:Wn,B:kn,W:Hn,U:Vn,R:zn,S:Nn,D:ma,E:pa,m:ya,a:ea,e:oa,o:ua,k:aa,G:ha,u:la,F:fa,z:ga,O:$a,l:ia,j:sa,c:na,p:ra,H:da,r:va,i:ca,y:wa,N:Gn,Q:Kn},E=wr(),J=s._free=t=>(J=s._free=E.ha)(t),Jt=s._malloc=t=>(Jt=s._malloc=E.ia)(t),We=t=>(We=E.ka)(t);s.__embind_initialize_bindings=()=>(s.__embind_initialize_bindings=E.la)();var A=(t,e)=>(A=E.ma)(t,e),wt=t=>(wt=E.na)(t),S=()=>(S=E.oa)(),F=t=>(F=E.pa)(t),ke=t=>(ke=E.qa)(t),He=t=>(He=E.ra)(t),Be=(t,e,r)=>(Be=E.sa)(t,e,r),Ue=t=>(Ue=E.ta)(t);s.dynCall_viijii=(t,e,r,n,a,o,u)=>(s.dynCall_viijii=E.ua)(t,e,r,n,a,o,u);var Ve=s.dynCall_jiiii=(t,e,r,n,a)=>(Ve=s.dynCall_jiiii=E.va)(t,e,r,n,a);s.dynCall_iiiiij=(t,e,r,n,a,o,u)=>(s.dynCall_iiiiij=E.wa)(t,e,r,n,a,o,u),s.dynCall_iiiiijj=(t,e,r,n,a,o,u,c,l)=>(s.dynCall_iiiiijj=E.xa)(t,e,r,n,a,o,u,c,l),s.dynCall_iiiiiijj=(t,e,r,n,a,o,u,c,l,h)=>(s.dynCall_iiiiiijj=E.ya)(t,e,r,n,a,o,u,c,l,h);function ea(t,e){var r=S();try{return D(t)(e)}catch(n){if(F(r),n!==n+0)throw n;A(1,0)}}function ra(t,e,r,n){var a=S();try{D(t)(e,r,n)}catch(o){if(F(a),o!==o+0)throw o;A(1,0)}}function na(t,e,r){var n=S();try{D(t)(e,r)}catch(a){if(F(n),a!==a+0)throw a;A(1,0)}}function aa(t,e,r,n,a){var o=S();try{return D(t)(e,r,n,a)}catch(u){if(F(o),u!==u+0)throw u;A(1,0)}}function oa(t,e,r){var n=S();try{return D(t)(e,r)}catch(a){if(F(n),a!==a+0)throw a;A(1,0)}}function ia(t){var e=S();try{D(t)()}catch(r){if(F(e),r!==r+0)throw r;A(1,0)}}function sa(t,e){var r=S();try{D(t)(e)}catch(n){if(F(r),n!==n+0)throw n;A(1,0)}}function ua(t,e,r,n){var a=S();try{return D(t)(e,r,n)}catch(o){if(F(a),o!==o+0)throw o;A(1,0)}}function ca(t,e,r,n,a,o,u,c,l,h,p){var y=S();try{D(t)(e,r,n,a,o,u,c,l,h,p)}catch(g){if(F(y),g!==g+0)throw g;A(1,0)}}function la(t,e,r,n,a,o,u){var c=S();try{return D(t)(e,r,n,a,o,u)}catch(l){if(F(c),l!==l+0)throw l;A(1,0)}}function da(t,e,r,n,a){var o=S();try{D(t)(e,r,n,a)}catch(u){if(F(o),u!==u+0)throw u;A(1,0)}}function ha(t,e,r,n,a,o){var u=S();try{return D(t)(e,r,n,a,o)}catch(c){if(F(u),c!==c+0)throw c;A(1,0)}}function fa(t,e,r,n,a,o,u,c){var l=S();try{return D(t)(e,r,n,a,o,u,c)}catch(h){if(F(l),h!==h+0)throw h;A(1,0)}}function pa(t,e,r,n){var a=S();try{return D(t)(e,r,n)}catch(o){if(F(a),o!==o+0)throw o;A(1,0)}}function ma(t,e,r,n){var a=S();try{return D(t)(e,r,n)}catch(o){if(F(a),o!==o+0)throw o;A(1,0)}}function ya(t){var e=S();try{return D(t)()}catch(r){if(F(e),r!==r+0)throw r;A(1,0)}}function va(t,e,r,n,a,o,u,c){var l=S();try{D(t)(e,r,n,a,o,u,c)}catch(h){if(F(l),h!==h+0)throw h;A(1,0)}}function ga(t,e,r,n,a,o,u,c,l,h,p,y){var g=S();try{return D(t)(e,r,n,a,o,u,c,l,h,p,y)}catch(b){if(F(g),b!==b+0)throw b;A(1,0)}}function wa(t,e,r,n,a,o,u,c,l,h,p,y,g,b,T,I){var P=S();try{D(t)(e,r,n,a,o,u,c,l,h,p,y,g,b,T,I)}catch(R){if(F(P),R!==R+0)throw R;A(1,0)}}function $a(t,e,r,n,a){var o=S();try{return Ve(t,e,r,n,a)}catch(u){if(F(o),u!==u+0)throw u;A(1,0)}}var xt;ht=function t(){xt||Le(),xt||(ht=t)};function Le(){if(et>0||(ur(),et>0))return;function t(){xt||(xt=!0,s.calledRun=!0,!lt&&(cr(),w(s),s.onRuntimeInitialized&&s.onRuntimeInitialized(),lr()))}s.setStatus?(s.setStatus("Running..."),setTimeout(function(){setTimeout(function(){s.setStatus("")},1),t()},1)):t()}if(s.preInit)for(typeof s.preInit=="function"&&(s.preInit=[s.preInit]);s.preInit.length>0;)s.preInit.pop()();return Le(),f.ready}})();function za(i){return re(jt,i)}function Na(i){return Va(jt,i)}async function Ga(i,f){return La(jt,i,f)}async function Xa(i,f){return Ya(jt,i,f)}const ee=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 qa(i){for(const[f,s]of ee)if(i===s)return f;return"unknown"}var ct;class Qa extends EventTarget{constructor(s={}){var w;super();ze(this,ct,void 0);try{const v=(w=s==null?void 0:s.formats)==null?void 0:w.filter($=>$!=="unknown");if((v==null?void 0:v.length)===0)throw new TypeError("Hint option provided, but is empty.");v==null||v.forEach($=>{if(!Ge.includes($))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${$}' is not a valid enum value of type BarcodeFormat.`)}),Ne(this,ct,v!=null?v:[]),za().then($=>{this.dispatchEvent(new CustomEvent("load",{detail:$}))}).catch($=>{this.dispatchEvent(new CustomEvent("error",{detail:$}))})}catch(v){throw Xe(v,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return Ge.filter(s=>s!=="unknown")}async detect(s){try{const w=await Ea(s);if(w===null)return[];let v;try{ar(w)?v=await Ga(w,{tryHarder:!0,formats:Kt(this,ct).map($=>ee.get($))}):v=await Xa(w,{tryHarder:!0,formats:Kt(this,ct).map($=>ee.get($))})}catch($){throw console.error($),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return v.map($=>{const{topLeft:{x:H,y:L},topRight:{x:B,y:O},bottomLeft:{x:Y,y:G},bottomRight:{x:U,y:Q}}=$.position,tt=Math.min(H,B,Y,U),lt=Math.min(L,O,G,Q),It=Math.max(H,B,Y,U),V=Math.max(L,O,G,Q);return{boundingBox:new DOMRectReadOnly(tt,lt,It-tt,V-lt),rawValue:$.text,format:qa($.format),cornerPoints:[{x:H,y:L},{x:B,y:O},{x:U,y:Q},{x:Y,y:G}]}})}catch(w){throw Xe(w,"Failed to execute 'detect' on 'BarcodeDetector'")}}}ct=new WeakMap;exports.BarcodeDetector=Qa;exports.setZXingModuleOverrides=Na;
|
package/dist/es/pure.js
CHANGED
|
@@ -24,7 +24,7 @@ const Ge = [
|
|
|
24
24
|
"unknown"
|
|
25
25
|
];
|
|
26
26
|
function ba(i) {
|
|
27
|
-
if (
|
|
27
|
+
if (Ze(i))
|
|
28
28
|
return {
|
|
29
29
|
width: i.naturalWidth,
|
|
30
30
|
height: i.naturalHeight
|
|
@@ -63,7 +63,7 @@ function ba(i) {
|
|
|
63
63
|
"The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'."
|
|
64
64
|
);
|
|
65
65
|
}
|
|
66
|
-
function
|
|
66
|
+
function Ze(i) {
|
|
67
67
|
try {
|
|
68
68
|
return i instanceof HTMLImageElement;
|
|
69
69
|
} catch {
|
|
@@ -138,7 +138,7 @@ function _a(i, f) {
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
async function or(i) {
|
|
141
|
-
if (
|
|
141
|
+
if (Ze(i) && !await Aa(i))
|
|
142
142
|
throw new DOMException(
|
|
143
143
|
"Failed to load or decode HTMLImageElement.",
|
|
144
144
|
"InvalidStateError"
|
|
@@ -261,6 +261,7 @@ const qe = [
|
|
|
261
261
|
"None",
|
|
262
262
|
"PDF417",
|
|
263
263
|
"QRCode",
|
|
264
|
+
"rMQRCode",
|
|
264
265
|
"UPC-A",
|
|
265
266
|
"UPC-E"
|
|
266
267
|
];
|
|
@@ -268,17 +269,17 @@ function xa(i) {
|
|
|
268
269
|
return i.join("|");
|
|
269
270
|
}
|
|
270
271
|
function Ma(i) {
|
|
271
|
-
const f =
|
|
272
|
+
const f = Qe(i);
|
|
272
273
|
let s = 0, w = qe.length - 1;
|
|
273
274
|
for (; s <= w; ) {
|
|
274
|
-
const v = Math.floor((s + w) / 2), $ = qe[v], H =
|
|
275
|
+
const v = Math.floor((s + w) / 2), $ = qe[v], H = Qe($);
|
|
275
276
|
if (H === f)
|
|
276
277
|
return $;
|
|
277
278
|
H < f ? s = v + 1 : w = v - 1;
|
|
278
279
|
}
|
|
279
280
|
return "None";
|
|
280
281
|
}
|
|
281
|
-
function
|
|
282
|
+
function Qe(i) {
|
|
282
283
|
return i.toLowerCase().replace(/_-\[\]/g, "");
|
|
283
284
|
}
|
|
284
285
|
function Ia(i, f) {
|
|
@@ -360,7 +361,7 @@ function sr(i) {
|
|
|
360
361
|
const Ua = {
|
|
361
362
|
locateFile: (i, f) => {
|
|
362
363
|
const s = i.match(/_(.+?)\.wasm$/);
|
|
363
|
-
return s ? `https://fastly.jsdelivr.net/npm/zxing-wasm@1.0.0
|
|
364
|
+
return s ? `https://fastly.jsdelivr.net/npm/zxing-wasm@1.0.0/dist/${s[1]}/${i}` : f + i;
|
|
364
365
|
}
|
|
365
366
|
};
|
|
366
367
|
let te = /* @__PURE__ */ new WeakMap();
|
|
@@ -448,8 +449,8 @@ var It = (() => {
|
|
|
448
449
|
})), s.print || console.log.bind(console);
|
|
449
450
|
var U = s.printErr || console.error.bind(console);
|
|
450
451
|
Object.assign(s, $), $ = null, s.arguments && s.arguments, s.thisProgram && (H = s.thisProgram), s.quit && s.quit;
|
|
451
|
-
var
|
|
452
|
-
s.wasmBinary && (
|
|
452
|
+
var Q;
|
|
453
|
+
s.wasmBinary && (Q = s.wasmBinary), typeof WebAssembly != "object" && ft("no native wasm support detected");
|
|
453
454
|
var tt, lt = !1;
|
|
454
455
|
function jt(t, e) {
|
|
455
456
|
t || ft(e);
|
|
@@ -502,14 +503,14 @@ var It = (() => {
|
|
|
502
503
|
var yr = "data:application/octet-stream;base64,", ce = (t) => t.startsWith(yr), it;
|
|
503
504
|
it = "zxing_reader.wasm", ce(it) || (it = Y(it));
|
|
504
505
|
function le(t) {
|
|
505
|
-
if (t == it &&
|
|
506
|
-
return new Uint8Array(
|
|
506
|
+
if (t == it && Q)
|
|
507
|
+
return new Uint8Array(Q);
|
|
507
508
|
if (G)
|
|
508
509
|
return G(t);
|
|
509
510
|
throw "both async and sync fetching of the wasm failed";
|
|
510
511
|
}
|
|
511
512
|
function vr(t) {
|
|
512
|
-
return !
|
|
513
|
+
return !Q && (L || B) && typeof fetch == "function" ? fetch(t, { credentials: "same-origin" }).then((e) => {
|
|
513
514
|
if (!e.ok)
|
|
514
515
|
throw "failed to load wasm binary file at '" + t + "'";
|
|
515
516
|
return e.arrayBuffer();
|
|
@@ -543,7 +544,7 @@ var It = (() => {
|
|
|
543
544
|
} catch (n) {
|
|
544
545
|
U(`Module.instantiateWasm callback failed with error: ${n}`), v(n);
|
|
545
546
|
}
|
|
546
|
-
return gr(
|
|
547
|
+
return gr(Q, it, t, r).catch(v), {};
|
|
547
548
|
}
|
|
548
549
|
var Rt = (t) => {
|
|
549
550
|
for (; t.length > 0; )
|
|
@@ -553,10 +554,10 @@ var It = (() => {
|
|
|
553
554
|
var bt = [], Ct = 0, $r = (t) => {
|
|
554
555
|
var e = new Wt(t);
|
|
555
556
|
return e.get_caught() || (e.set_caught(!0), Ct--), e.set_rethrown(!1), bt.push(e), He(e.excPtr), e.get_exception_ptr();
|
|
556
|
-
},
|
|
557
|
+
}, Z = 0, br = () => {
|
|
557
558
|
A(0, 0);
|
|
558
559
|
var t = bt.pop();
|
|
559
|
-
ke(t.excPtr),
|
|
560
|
+
ke(t.excPtr), Z = 0;
|
|
560
561
|
};
|
|
561
562
|
function Wt(t) {
|
|
562
563
|
this.excPtr = t, this.ptr = t - 24, this.set_type = function(e) {
|
|
@@ -590,9 +591,9 @@ var It = (() => {
|
|
|
590
591
|
};
|
|
591
592
|
}
|
|
592
593
|
var Cr = (t) => {
|
|
593
|
-
throw
|
|
594
|
+
throw Z || (Z = t), Z;
|
|
594
595
|
}, kt = (t) => {
|
|
595
|
-
var e =
|
|
596
|
+
var e = Z;
|
|
596
597
|
if (!e)
|
|
597
598
|
return wt(0), 0;
|
|
598
599
|
var r = new Wt(e);
|
|
@@ -613,10 +614,10 @@ var It = (() => {
|
|
|
613
614
|
var t = bt.pop();
|
|
614
615
|
t || ft("no exception to throw");
|
|
615
616
|
var e = t.excPtr;
|
|
616
|
-
throw t.get_rethrown() || (bt.push(t), t.set_rethrown(!0), t.set_caught(!1), Ct++),
|
|
617
|
+
throw t.get_rethrown() || (bt.push(t), t.set_rethrown(!0), t.set_caught(!1), Ct++), Z = e, Z;
|
|
617
618
|
}, Ar = (t, e, r) => {
|
|
618
619
|
var n = new Wt(t);
|
|
619
|
-
throw n.init(e, r),
|
|
620
|
+
throw n.init(e, r), Z = t, Ct++, Z;
|
|
620
621
|
}, Or = () => Ct, _t = {}, he = (t) => {
|
|
621
622
|
for (; t.length; ) {
|
|
622
623
|
var e = t.pop(), r = t.pop();
|
|
@@ -881,7 +882,7 @@ var It = (() => {
|
|
|
881
882
|
function be(t) {
|
|
882
883
|
return this.fromWireType(_[t >> 2]);
|
|
883
884
|
}
|
|
884
|
-
var
|
|
885
|
+
var Qr = () => {
|
|
885
886
|
Object.assign(Ot.prototype, { getPointee(t) {
|
|
886
887
|
return this.rawGetPointee && (t = this.rawGetPointee(t)), t;
|
|
887
888
|
}, destructor(t) {
|
|
@@ -895,7 +896,7 @@ var It = (() => {
|
|
|
895
896
|
}
|
|
896
897
|
var Ce = (t, e, r) => {
|
|
897
898
|
s.hasOwnProperty(t) || Pt("Replacing nonexistant public symbol"), s[t].overloadTable !== void 0 && r !== void 0 ? s[t].overloadTable[r] = e : (s[t] = e, s[t].argCount = r);
|
|
898
|
-
},
|
|
899
|
+
}, Zr = (t, e, r) => {
|
|
899
900
|
var n = s["dynCall_" + t];
|
|
900
901
|
return r && r.length ? n.apply(null, [e].concat(r)) : n.call(null, e);
|
|
901
902
|
}, Dt = [], _e, D = (t) => {
|
|
@@ -903,7 +904,7 @@ var It = (() => {
|
|
|
903
904
|
return e || (t >= Dt.length && (Dt.length = t + 1), Dt[t] = e = _e.get(t)), e;
|
|
904
905
|
}, Jr = (t, e, r) => {
|
|
905
906
|
if (t.includes("j"))
|
|
906
|
-
return
|
|
907
|
+
return Zr(t, e, r);
|
|
907
908
|
var n = D(e).apply(null, r);
|
|
908
909
|
return n;
|
|
909
910
|
}, Kr = (t, e) => {
|
|
@@ -1233,7 +1234,7 @@ var It = (() => {
|
|
|
1233
1234
|
}
|
|
1234
1235
|
}
|
|
1235
1236
|
return o;
|
|
1236
|
-
},
|
|
1237
|
+
}, Qt = (t, e) => t ? wn(k, t, e) : "", $n = (t, e) => {
|
|
1237
1238
|
e = I(e);
|
|
1238
1239
|
var r = e === "std::string";
|
|
1239
1240
|
X(t, { name: e, fromWireType(n) {
|
|
@@ -1242,7 +1243,7 @@ var It = (() => {
|
|
|
1242
1243
|
for (var c = o, l = 0; l <= a; ++l) {
|
|
1243
1244
|
var h = o + l;
|
|
1244
1245
|
if (l == a || k[h] == 0) {
|
|
1245
|
-
var p = h - c, y =
|
|
1246
|
+
var p = h - c, y = Qt(c, p);
|
|
1246
1247
|
u === void 0 ? u = y : (u += "\0", u += y), c = h + 1;
|
|
1247
1248
|
}
|
|
1248
1249
|
}
|
|
@@ -1407,11 +1408,11 @@ var It = (() => {
|
|
|
1407
1408
|
return !0;
|
|
1408
1409
|
}
|
|
1409
1410
|
return !1;
|
|
1410
|
-
},
|
|
1411
|
+
}, Zt = {}, Ln = () => H || "./this.program", gt = () => {
|
|
1411
1412
|
if (!gt.strings) {
|
|
1412
1413
|
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, _: Ln() };
|
|
1413
|
-
for (var r in
|
|
1414
|
-
|
|
1414
|
+
for (var r in Zt)
|
|
1415
|
+
Zt[r] === void 0 ? delete e[r] : e[r] = Zt[r];
|
|
1415
1416
|
var n = [];
|
|
1416
1417
|
for (var r in e)
|
|
1417
1418
|
n.push(`${r}=${e[r]}`);
|
|
@@ -1447,14 +1448,14 @@ var It = (() => {
|
|
|
1447
1448
|
}
|
|
1448
1449
|
return r;
|
|
1449
1450
|
};
|
|
1450
|
-
function
|
|
1451
|
+
function Qn(t, e, r) {
|
|
1451
1452
|
var n = r > 0 ? r : Fe(t) + 1, a = new Array(n), o = De(t, a, 0, a.length);
|
|
1452
1453
|
return e && (a.length = o), a;
|
|
1453
1454
|
}
|
|
1454
|
-
var
|
|
1455
|
+
var Zn = (t, e) => {
|
|
1455
1456
|
V.set(t, e);
|
|
1456
1457
|
}, Jn = (t, e, r, n) => {
|
|
1457
|
-
var a = _[n + 40 >> 2], o = { tm_sec: W[n >> 2], tm_min: W[n + 4 >> 2], tm_hour: W[n + 8 >> 2], tm_mday: W[n + 12 >> 2], tm_mon: W[n + 16 >> 2], tm_year: W[n + 20 >> 2], tm_wday: W[n + 24 >> 2], tm_yday: W[n + 28 >> 2], tm_isdst: W[n + 32 >> 2], tm_gmtoff: W[n + 36 >> 2], tm_zone: a ?
|
|
1458
|
+
var a = _[n + 40 >> 2], o = { tm_sec: W[n >> 2], tm_min: W[n + 4 >> 2], tm_hour: W[n + 8 >> 2], tm_mday: W[n + 12 >> 2], tm_mon: W[n + 16 >> 2], tm_year: W[n + 20 >> 2], tm_wday: W[n + 24 >> 2], tm_yday: W[n + 28 >> 2], tm_isdst: W[n + 32 >> 2], tm_gmtoff: W[n + 36 >> 2], tm_zone: a ? Qt(a) : "" }, u = Qt(r), c = { "%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" };
|
|
1458
1459
|
for (var l in c)
|
|
1459
1460
|
u = u.replace(new RegExp(l, "g"), c[l]);
|
|
1460
1461
|
var h = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], p = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
|
|
@@ -1529,8 +1530,8 @@ var It = (() => {
|
|
|
1529
1530
|
for (var l in P)
|
|
1530
1531
|
u.includes(l) && (u = u.replace(new RegExp(l, "g"), P[l](o)));
|
|
1531
1532
|
u = u.replace(/\0\0/g, "%");
|
|
1532
|
-
var R =
|
|
1533
|
-
return R.length > e ? 0 : (
|
|
1533
|
+
var R = Qn(u, !1);
|
|
1534
|
+
return R.length > e ? 0 : (Zn(R, t), R.length - 1);
|
|
1534
1535
|
}, Kn = (t, e, r, n, a) => Jn(t, e, r, n);
|
|
1535
1536
|
fe = s.InternalError = class extends Error {
|
|
1536
1537
|
constructor(t) {
|
|
@@ -1540,7 +1541,7 @@ var It = (() => {
|
|
|
1540
1541
|
constructor(t) {
|
|
1541
1542
|
super(t), this.name = "BindingError";
|
|
1542
1543
|
}
|
|
1543
|
-
}, Lr(), Hr(),
|
|
1544
|
+
}, Lr(), Hr(), Qr(), Te = s.UnboundTypeError = tn(Error, "UnboundTypeError"), an(), sn();
|
|
1544
1545
|
var ta = { s: $r, v: br, b: _r, g: Tr, q: Pr, I: Er, f: Ar, T: Or, d: Cr, ba: Dr, P: Fr, Y: Mr, aa: en, $: rn, w: nn, X: un, x: ln, h: dn, K: fn, L: pn, t: yn, n: vn, J: $n, C: An, A: On, ca: Dn, Z: Fn, ea: Oe, da: Mn, M: In, V: Rn, _: Wn, B: kn, W: Hn, U: Vn, R: zn, S: Nn, D: ma, E: pa, m: ya, a: ea, e: oa, o: ua, k: aa, G: ha, u: la, F: fa, z: ga, O: $a, l: ia, j: sa, c: na, p: ra, H: da, r: va, i: ca, y: wa, N: Gn, Q: Kn }, E = wr(), J = s._free = (t) => (J = s._free = E.ha)(t), Jt = s._malloc = (t) => (Jt = s._malloc = E.ia)(t), We = (t) => (We = E.ka)(t);
|
|
1545
1546
|
s.__embind_initialize_bindings = () => (s.__embind_initialize_bindings = E.la)();
|
|
1546
1547
|
var A = (t, e) => (A = E.ma)(t, e), wt = (t) => (wt = E.na)(t), F = () => (F = E.oa)(), S = (t) => (S = E.pa)(t), ke = (t) => (ke = E.qa)(t), He = (t) => (He = E.ra)(t), Be = (t, e, r) => (Be = E.sa)(t, e, r), Ue = (t) => (Ue = E.ta)(t);
|
|
@@ -1775,7 +1776,7 @@ function za(i) {
|
|
|
1775
1776
|
i
|
|
1776
1777
|
);
|
|
1777
1778
|
}
|
|
1778
|
-
function
|
|
1779
|
+
function Qa(i) {
|
|
1779
1780
|
return Va(
|
|
1780
1781
|
It,
|
|
1781
1782
|
i
|
|
@@ -1817,7 +1818,7 @@ function Xa(i) {
|
|
|
1817
1818
|
return "unknown";
|
|
1818
1819
|
}
|
|
1819
1820
|
var ct;
|
|
1820
|
-
class
|
|
1821
|
+
class Za extends EventTarget {
|
|
1821
1822
|
constructor(s = {}) {
|
|
1822
1823
|
var w;
|
|
1823
1824
|
super();
|
|
@@ -1881,8 +1882,8 @@ class Qa extends EventTarget {
|
|
|
1881
1882
|
topLeft: { x: H, y: L },
|
|
1882
1883
|
topRight: { x: B, y: O },
|
|
1883
1884
|
bottomLeft: { x: Y, y: G },
|
|
1884
|
-
bottomRight: { x: U, y:
|
|
1885
|
-
} = $.position, tt = Math.min(H, B, Y, U), lt = Math.min(L, O, G,
|
|
1885
|
+
bottomRight: { x: U, y: Q }
|
|
1886
|
+
} = $.position, tt = Math.min(H, B, Y, U), lt = Math.min(L, O, G, Q), jt = Math.max(H, B, Y, U), V = Math.max(L, O, G, Q);
|
|
1886
1887
|
return {
|
|
1887
1888
|
boundingBox: new DOMRectReadOnly(
|
|
1888
1889
|
tt,
|
|
@@ -1903,7 +1904,7 @@ class Qa extends EventTarget {
|
|
|
1903
1904
|
},
|
|
1904
1905
|
{
|
|
1905
1906
|
x: U,
|
|
1906
|
-
y:
|
|
1907
|
+
y: Q
|
|
1907
1908
|
},
|
|
1908
1909
|
{
|
|
1909
1910
|
x: Y,
|
|
@@ -1922,6 +1923,6 @@ class Qa extends EventTarget {
|
|
|
1922
1923
|
}
|
|
1923
1924
|
ct = new WeakMap();
|
|
1924
1925
|
export {
|
|
1925
|
-
|
|
1926
|
-
|
|
1926
|
+
Za as BarcodeDetector,
|
|
1927
|
+
Qa as setZXingModuleOverrides
|
|
1927
1928
|
};
|