2024-08-21 21:55:26 +02:00
let wasm ;
const heap = new Array ( 128 ) . fill ( undefined ) ;
heap . push ( undefined , null , true , false ) ;
function getObject ( idx ) { return heap [ idx ] ; }
let heap _next = heap . length ;
function dropObject ( idx ) {
if ( idx < 132 ) return ;
heap [ idx ] = heap _next ;
heap _next = idx ;
}
function takeObject ( idx ) {
const ret = getObject ( idx ) ;
dropObject ( idx ) ;
return ret ;
}
function addHeapObject ( obj ) {
if ( heap _next === heap . length ) heap . push ( heap . length + 1 ) ;
const idx = heap _next ;
heap _next = heap [ idx ] ;
heap [ idx ] = obj ;
return idx ;
}
const cachedTextDecoder = ( typeof TextDecoder !== 'undefined' ? new TextDecoder ( 'utf-8' , { ignoreBOM : true , fatal : true } ) : { decode : ( ) => { throw Error ( 'TextDecoder not available' ) } } ) ;
if ( typeof TextDecoder !== 'undefined' ) { cachedTextDecoder . decode ( ) ; } ;
let cachedUint8ArrayMemory0 = null ;
function getUint8ArrayMemory0 ( ) {
if ( cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0 . byteLength === 0 ) {
cachedUint8ArrayMemory0 = new Uint8Array ( wasm . memory . buffer ) ;
}
return cachedUint8ArrayMemory0 ;
}
function getStringFromWasm0 ( ptr , len ) {
ptr = ptr >>> 0 ;
return cachedTextDecoder . decode ( getUint8ArrayMemory0 ( ) . subarray ( ptr , ptr + len ) ) ;
}
let WASM _VECTOR _LEN = 0 ;
const cachedTextEncoder = ( typeof TextEncoder !== 'undefined' ? new TextEncoder ( 'utf-8' ) : { encode : ( ) => { throw Error ( 'TextEncoder not available' ) } } ) ;
const encodeString = ( typeof cachedTextEncoder . encodeInto === 'function'
? function ( arg , view ) {
return cachedTextEncoder . encodeInto ( arg , view ) ;
}
: function ( arg , view ) {
const buf = cachedTextEncoder . encode ( arg ) ;
view . set ( buf ) ;
return {
read : arg . length ,
written : buf . length
} ;
} ) ;
function passStringToWasm0 ( arg , malloc , realloc ) {
if ( realloc === undefined ) {
const buf = cachedTextEncoder . encode ( arg ) ;
const ptr = malloc ( buf . length , 1 ) >>> 0 ;
getUint8ArrayMemory0 ( ) . subarray ( ptr , ptr + buf . length ) . set ( buf ) ;
WASM _VECTOR _LEN = buf . length ;
return ptr ;
}
let len = arg . length ;
let ptr = malloc ( len , 1 ) >>> 0 ;
const mem = getUint8ArrayMemory0 ( ) ;
let offset = 0 ;
for ( ; offset < len ; offset ++ ) {
const code = arg . charCodeAt ( offset ) ;
if ( code > 0x7F ) break ;
mem [ ptr + offset ] = code ;
}
if ( offset !== len ) {
if ( offset !== 0 ) {
arg = arg . slice ( offset ) ;
}
ptr = realloc ( ptr , len , len = offset + arg . length * 3 , 1 ) >>> 0 ;
const view = getUint8ArrayMemory0 ( ) . subarray ( ptr + offset , ptr + len ) ;
const ret = encodeString ( arg , view ) ;
offset += ret . written ;
ptr = realloc ( ptr , len , offset , 1 ) >>> 0 ;
}
WASM _VECTOR _LEN = offset ;
return ptr ;
}
function isLikeNone ( x ) {
return x === undefined || x === null ;
}
let cachedDataViewMemory0 = null ;
function getDataViewMemory0 ( ) {
if ( cachedDataViewMemory0 === null || cachedDataViewMemory0 . buffer . detached === true || ( cachedDataViewMemory0 . buffer . detached === undefined && cachedDataViewMemory0 . buffer !== wasm . memory . buffer ) ) {
cachedDataViewMemory0 = new DataView ( wasm . memory . buffer ) ;
}
return cachedDataViewMemory0 ;
}
function debugString ( val ) {
// primitive types
const type = typeof val ;
if ( type == 'number' || type == 'boolean' || val == null ) {
return ` ${ val } ` ;
}
if ( type == 'string' ) {
return ` " ${ val } " ` ;
}
if ( type == 'symbol' ) {
const description = val . description ;
if ( description == null ) {
return 'Symbol' ;
} else {
return ` Symbol( ${ description } ) ` ;
}
}
if ( type == 'function' ) {
const name = val . name ;
if ( typeof name == 'string' && name . length > 0 ) {
return ` Function( ${ name } ) ` ;
} else {
return 'Function' ;
}
}
// objects
if ( Array . isArray ( val ) ) {
const length = val . length ;
let debug = '[' ;
if ( length > 0 ) {
debug += debugString ( val [ 0 ] ) ;
}
for ( let i = 1 ; i < length ; i ++ ) {
debug += ', ' + debugString ( val [ i ] ) ;
}
debug += ']' ;
return debug ;
}
// Test for built-in
const builtInMatches = /\[object ([^\]]+)\]/ . exec ( toString . call ( val ) ) ;
let className ;
if ( builtInMatches . length > 1 ) {
className = builtInMatches [ 1 ] ;
} else {
// Failed to match the standard '[object ClassName]'
return toString . call ( val ) ;
}
if ( className == 'Object' ) {
// we're a user defined class or Object
// JSON.stringify avoids problems with cycles, and is generally much
// easier than looping through ownProperties of `val`.
try {
return 'Object(' + JSON . stringify ( val ) + ')' ;
} catch ( _ ) {
return 'Object' ;
}
}
// errors
if ( val instanceof Error ) {
return ` ${ val . name } : ${ val . message } \n ${ val . stack } ` ;
}
// TODO we could test for more things here, like `Set`s and `Map`s.
return className ;
}
const CLOSURE _DTORS = ( typeof FinalizationRegistry === 'undefined' )
? { register : ( ) => { } , unregister : ( ) => { } }
: new FinalizationRegistry ( state => {
wasm . _ _wbindgen _export _2 . get ( state . dtor ) ( state . a , state . b )
} ) ;
function makeMutClosure ( arg0 , arg1 , dtor , f ) {
const state = { a : arg0 , b : arg1 , cnt : 1 , dtor } ;
const real = ( ... args ) => {
// First up with a closure we increment the internal reference
// count. This ensures that the Rust closure environment won't
// be deallocated while we're invoking it.
state . cnt ++ ;
const a = state . a ;
state . a = 0 ;
try {
return f ( a , state . b , ... args ) ;
} finally {
if ( -- state . cnt === 0 ) {
wasm . _ _wbindgen _export _2 . get ( state . dtor ) ( a , state . b ) ;
CLOSURE _DTORS . unregister ( state ) ;
} else {
state . a = a ;
}
}
} ;
real . original = state ;
CLOSURE _DTORS . register ( real , state , state ) ;
return real ;
}
function _ _wbg _adapter _36 ( arg0 , arg1 , arg2 ) {
2024-09-17 18:40:12 +02:00
wasm . _dyn _core _ _ops _ _function _ _FnMut _ _A _ _ _ _Output _ _ _R _as _wasm _bindgen _ _closure _ _WasmClosure _ _ _describe _ _invoke _ _h3ee002e21c3855c9 ( arg0 , arg1 , addHeapObject ( arg2 ) ) ;
2024-08-21 21:55:26 +02:00
}
function _ _wbg _adapter _39 ( arg0 , arg1 ) {
2024-09-17 18:40:12 +02:00
wasm . _dyn _core _ _ops _ _function _ _FnMut _ _ _ _ _Output _ _ _R _as _wasm _bindgen _ _closure _ _WasmClosure _ _ _describe _ _invoke _ _hda38a12a2a1c09dc ( arg0 , arg1 ) ;
2024-08-21 21:55:26 +02:00
}
function _ _wbg _adapter _42 ( arg0 , arg1 , arg2 ) {
wasm . _dyn _core _ _ops _ _function _ _FnMut _ _A _ _ _ _Output _ _ _R _as _wasm _bindgen _ _closure _ _WasmClosure _ _ _describe _ _invoke _ _ha7dc131e1b42f45e ( arg0 , arg1 , addHeapObject ( arg2 ) ) ;
}
/ * *
* /
export function enable _panic _debug ( ) {
wasm . enable _panic _debug ( ) ;
}
/ * *
* @ param { any } product _options _js
* /
export function init _camera _feed ( product _options _js ) {
try {
const retptr = wasm . _ _wbindgen _add _to _stack _pointer ( - 16 ) ;
wasm . init _camera _feed ( retptr , addHeapObject ( product _options _js ) ) ;
var r0 = getDataViewMemory0 ( ) . getInt32 ( retptr + 4 * 0 , true ) ;
var r1 = getDataViewMemory0 ( ) . getInt32 ( retptr + 4 * 1 , true ) ;
if ( r1 ) {
throw takeObject ( r0 ) ;
}
} finally {
wasm . _ _wbindgen _add _to _stack _pointer ( 16 ) ;
}
}
/ * *
* @ returns { Promise < any > }
* /
export function get _product _options ( ) {
const ret = wasm . get _product _options ( ) ;
return takeObject ( ret ) ;
}
/ * *
* @ param { any } product _options _js
* /
export function fill _search _options ( product _options _js ) {
wasm . fill _search _options ( addHeapObject ( product _options _js ) ) ;
}
function handleError ( f , args ) {
try {
return f . apply ( this , args ) ;
} catch ( e ) {
wasm . _ _wbindgen _exn _store ( addHeapObject ( e ) ) ;
}
}
function passArray8ToWasm0 ( arg , malloc ) {
const ptr = malloc ( arg . length * 1 , 1 ) >>> 0 ;
getUint8ArrayMemory0 ( ) . set ( arg , ptr / 1 ) ;
WASM _VECTOR _LEN = arg . length ;
return ptr ;
}
2024-09-17 18:40:12 +02:00
function _ _wbg _adapter _205 ( arg0 , arg1 , arg2 , arg3 ) {
2024-08-21 21:55:26 +02:00
wasm . wasm _bindgen _ _convert _ _closures _ _invoke2 _mut _ _h101e073056d1eef9 ( arg0 , arg1 , addHeapObject ( arg2 ) , addHeapObject ( arg3 ) ) ;
}
async function _ _wbg _load ( module , imports ) {
if ( typeof Response === 'function' && module instanceof Response ) {
if ( typeof WebAssembly . instantiateStreaming === 'function' ) {
try {
return await WebAssembly . instantiateStreaming ( module , imports ) ;
} catch ( e ) {
if ( module . headers . get ( 'Content-Type' ) != 'application/wasm' ) {
console . warn ( "`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n" , e ) ;
} else {
throw e ;
}
}
}
const bytes = await module . arrayBuffer ( ) ;
return await WebAssembly . instantiate ( bytes , imports ) ;
} else {
const instance = await WebAssembly . instantiate ( module , imports ) ;
if ( instance instanceof WebAssembly . Instance ) {
return { instance , module } ;
} else {
return instance ;
}
}
}
function _ _wbg _get _imports ( ) {
const imports = { } ;
imports . wbg = { } ;
imports . wbg . _ _wbindgen _object _drop _ref = function ( arg0 ) {
takeObject ( arg0 ) ;
} ;
imports . wbg . _ _wbg _log _3c2bec585506baf0 = function ( arg0 , arg1 ) {
console . log ( getStringFromWasm0 ( arg0 , arg1 ) ) ;
} ;
imports . wbg . _ _wbindgen _object _clone _ref = function ( arg0 ) {
const ret = getObject ( arg0 ) ;
return addHeapObject ( ret ) ;
} ;
imports . wbg . _ _wbg _error _64f019b1663f78f9 = function ( arg0 , arg1 ) {
console . error ( getStringFromWasm0 ( arg0 , arg1 ) ) ;
} ;
imports . wbg . _ _wbindgen _string _new = function ( arg0 , arg1 ) {
const ret = getStringFromWasm0 ( arg0 , arg1 ) ;
return addHeapObject ( ret ) ;
} ;
imports . wbg . _ _wbindgen _string _get = function ( arg0 , arg1 ) {
const obj = getObject ( arg1 ) ;
const ret = typeof ( obj ) === 'string' ? obj : undefined ;
var ptr1 = isLikeNone ( ret ) ? 0 : passStringToWasm0 ( ret , wasm . _ _wbindgen _malloc , wasm . _ _wbindgen _realloc ) ;
var len1 = WASM _VECTOR _LEN ;
getDataViewMemory0 ( ) . setInt32 ( arg0 + 4 * 1 , len1 , true ) ;
getDataViewMemory0 ( ) . setInt32 ( arg0 + 4 * 0 , ptr1 , true ) ;
} ;
imports . wbg . _ _wbindgen _is _object = function ( arg0 ) {
const val = getObject ( arg0 ) ;
const ret = typeof ( val ) === 'object' && val !== null ;
return ret ;
} ;
imports . wbg . _ _wbindgen _is _undefined = function ( arg0 ) {
const ret = getObject ( arg0 ) === undefined ;
return ret ;
} ;
imports . wbg . _ _wbindgen _in = function ( arg0 , arg1 ) {
const ret = getObject ( arg0 ) in getObject ( arg1 ) ;
return ret ;
} ;
imports . wbg . _ _wbindgen _number _get = function ( arg0 , arg1 ) {
const obj = getObject ( arg1 ) ;
const ret = typeof ( obj ) === 'number' ? obj : undefined ;
getDataViewMemory0 ( ) . setFloat64 ( arg0 + 8 * 1 , isLikeNone ( ret ) ? 0 : ret , true ) ;
getDataViewMemory0 ( ) . setInt32 ( arg0 + 4 * 0 , ! isLikeNone ( ret ) , true ) ;
} ;
imports . wbg . _ _wbindgen _cb _drop = function ( arg0 ) {
const obj = takeObject ( arg0 ) . original ;
if ( obj . cnt -- == 1 ) {
obj . a = 0 ;
return true ;
}
const ret = false ;
return ret ;
} ;
imports . wbg . _ _wbindgen _error _new = function ( arg0 , arg1 ) {
const ret = new Error ( getStringFromWasm0 ( arg0 , arg1 ) ) ;
return addHeapObject ( ret ) ;
} ;
imports . wbg . _ _wbindgen _is _function = function ( arg0 ) {
const ret = typeof ( getObject ( arg0 ) ) === 'function' ;
return ret ;
} ;
imports . wbg . _ _wbindgen _jsval _loose _eq = function ( arg0 , arg1 ) {
const ret = getObject ( arg0 ) == getObject ( arg1 ) ;
return ret ;
} ;
imports . wbg . _ _wbindgen _boolean _get = function ( arg0 ) {
const v = getObject ( arg0 ) ;
const ret = typeof ( v ) === 'boolean' ? ( v ? 1 : 0 ) : 2 ;
return ret ;
} ;
imports . wbg . _ _wbindgen _as _number = function ( arg0 ) {
const ret = + getObject ( arg0 ) ;
return ret ;
} ;
imports . wbg . _ _wbg _getwithrefkey _edc2c8960f0f1191 = function ( arg0 , arg1 ) {
const ret = getObject ( arg0 ) [ getObject ( arg1 ) ] ;
return addHeapObject ( ret ) ;
} ;
imports . wbg . _ _wbg _new _abda76e883ba8a5f = function ( ) {
const ret = new Error ( ) ;
return addHeapObject ( ret ) ;
} ;
imports . wbg . _ _wbg _stack _658279fe44541cf6 = function ( arg0 , arg1 ) {
const ret = getObject ( arg1 ) . stack ;
const ptr1 = passStringToWasm0 ( ret , wasm . _ _wbindgen _malloc , wasm . _ _wbindgen _realloc ) ;
const len1 = WASM _VECTOR _LEN ;
getDataViewMemory0 ( ) . setInt32 ( arg0 + 4 * 1 , len1 , true ) ;
getDataViewMemory0 ( ) . setInt32 ( arg0 + 4 * 0 , ptr1 , true ) ;
} ;
imports . wbg . _ _wbg _error _f851667af71bcfc6 = function ( arg0 , arg1 ) {
let deferred0 _0 ;
let deferred0 _1 ;
try {
deferred0 _0 = arg0 ;
deferred0 _1 = arg1 ;
console . error ( getStringFromWasm0 ( arg0 , arg1 ) ) ;
} finally {
wasm . _ _wbindgen _free ( deferred0 _0 , deferred0 _1 , 1 ) ;
}
} ;
imports . wbg . _ _wbg _instanceof _Window _5012736c80a01584 = function ( arg0 ) {
let result ;
try {
result = getObject ( arg0 ) instanceof Window ;
} catch ( _ ) {
result = false ;
}
const ret = result ;
return ret ;
} ;
imports . wbg . _ _wbg _document _8554450897a855b9 = function ( arg0 ) {
const ret = getObject ( arg0 ) . document ;
return isLikeNone ( ret ) ? 0 : addHeapObject ( ret ) ;
} ;
imports . wbg . _ _wbg _navigator _6210380287bf8581 = function ( arg0 ) {
const ret = getObject ( arg0 ) . navigator ;
return addHeapObject ( ret ) ;
} ;
imports . wbg . _ _wbg _fetch _f3adf866d8944b41 = function ( arg0 , arg1 ) {
const ret = getObject ( arg0 ) . fetch ( getObject ( arg1 ) ) ;
return addHeapObject ( ret ) ;
} ;
imports . wbg . _ _wbg _getElementById _f56c8e6a15a6926d = function ( arg0 , arg1 , arg2 ) {
const ret = getObject ( arg0 ) . getElementById ( getStringFromWasm0 ( arg1 , arg2 ) ) ;
return isLikeNone ( ret ) ? 0 : addHeapObject ( ret ) ;
} ;
imports . wbg . _ _wbg _querySelectorAll _52447cbab6df8bae = function ( ) { return handleError ( function ( arg0 , arg1 , arg2 ) {
const ret = getObject ( arg0 ) . querySelectorAll ( getStringFromWasm0 ( arg1 , arg2 ) ) ;
return addHeapObject ( ret ) ;
} , arguments ) } ;
imports . wbg . _ _wbg _classList _d725bcb3b32c27b5 = function ( arg0 ) {
const ret = getObject ( arg0 ) . classList ;
return addHeapObject ( ret ) ;
} ;
2024-09-17 18:40:12 +02:00
imports . wbg . _ _wbg _attributes _ea6d5144381d1a6b = function ( arg0 ) {
const ret = getObject ( arg0 ) . attributes ;
return addHeapObject ( ret ) ;
} ;
2024-08-21 21:55:26 +02:00
imports . wbg . _ _wbg _setinnerHTML _ea7e3c6a3c4790c6 = function ( arg0 , arg1 , arg2 ) {
getObject ( arg0 ) . innerHTML = getStringFromWasm0 ( arg1 , arg2 ) ;
} ;
imports . wbg . _ _wbg _previousElementSibling _6e83d5d71c3339a9 = function ( arg0 ) {
const ret = getObject ( arg0 ) . previousElementSibling ;
return isLikeNone ( ret ) ? 0 : addHeapObject ( ret ) ;
} ;
imports . wbg . _ _wbg _replaceChildren _340fbcc8da2ebc7c = function ( arg0 , arg1 ) {
getObject ( arg0 ) . replaceChildren ( ... getObject ( arg1 ) ) ;
} ;
imports . wbg . _ _wbg _instanceof _HtmlElement _ee6cb55e6b90ae79 = function ( arg0 ) {
let result ;
try {
result = getObject ( arg0 ) instanceof HTMLElement ;
} catch ( _ ) {
result = false ;
}
const ret = result ;
return ret ;
} ;
imports . wbg . _ _wbg _innerText _e4587d87df60f7c0 = function ( arg0 , arg1 ) {
const ret = getObject ( arg1 ) . innerText ;
const ptr1 = passStringToWasm0 ( ret , wasm . _ _wbindgen _malloc , wasm . _ _wbindgen _realloc ) ;
const len1 = WASM _VECTOR _LEN ;
getDataViewMemory0 ( ) . setInt32 ( arg0 + 4 * 1 , len1 , true ) ;
getDataViewMemory0 ( ) . setInt32 ( arg0 + 4 * 0 , ptr1 , true ) ;
} ;
imports . wbg . _ _wbg _click _025eb185eb16f006 = function ( arg0 ) {
getObject ( arg0 ) . click ( ) ;
} ;
2024-09-17 18:40:12 +02:00
imports . wbg . _ _wbg _addEventListener _e167f012cbedfa4e = function ( ) { return handleError ( function ( arg0 , arg1 , arg2 , arg3 ) {
getObject ( arg0 ) . addEventListener ( getStringFromWasm0 ( arg1 , arg2 ) , getObject ( arg3 ) ) ;
} , arguments ) } ;
2024-08-21 21:55:26 +02:00
imports . wbg . _ _wbg _instanceof _HtmlButtonElement _998267b26d794a1e = function ( arg0 ) {
let result ;
try {
result = getObject ( arg0 ) instanceof HTMLButtonElement ;
} catch ( _ ) {
result = false ;
}
const ret = result ;
return ret ;
} ;
imports . wbg . _ _wbg _getUserMedia _2f9c80e86991353a = function ( ) { return handleError ( function ( arg0 , arg1 ) {
const ret = getObject ( arg0 ) . getUserMedia ( getObject ( arg1 ) ) ;
return addHeapObject ( ret ) ;
} , arguments ) } ;
2024-09-17 18:40:12 +02:00
imports . wbg . _ _wbg _removeNamedItem _e56eae3d2c3fd505 = function ( ) { return handleError ( function ( arg0 , arg1 , arg2 ) {
const ret = getObject ( arg0 ) . removeNamedItem ( getStringFromWasm0 ( arg1 , arg2 ) ) ;
return addHeapObject ( ret ) ;
} , arguments ) } ;
2024-08-21 21:55:26 +02:00
imports . wbg . _ _wbg _headers _7d46f181de2aa1dd = function ( arg0 ) {
const ret = getObject ( arg0 ) . headers ;
return addHeapObject ( ret ) ;
} ;
imports . wbg . _ _wbg _newwithstrandinit _a31c69e4cc337183 = function ( ) { return handleError ( function ( arg0 , arg1 , arg2 ) {
const ret = new Request ( getStringFromWasm0 ( arg0 , arg1 ) , getObject ( arg2 ) ) ;
return addHeapObject ( ret ) ;
} , arguments ) } ;
2024-09-17 18:40:12 +02:00
imports . wbg . _ _wbg _setmethod _dc68a742c2db5c6a = function ( arg0 , arg1 , arg2 ) {
getObject ( arg0 ) . method = getStringFromWasm0 ( arg1 , arg2 ) ;
2024-08-21 21:55:26 +02:00
} ;
2024-09-17 18:40:12 +02:00
imports . wbg . _ _wbg _setmode _a781aae2bd3df202 = function ( arg0 , arg1 ) {
getObject ( arg0 ) . mode = [ "same-origin" , "no-cors" , "cors" , "navigate" , ] [ arg1 ] ;
2024-08-21 21:55:26 +02:00
} ;
2024-09-17 18:40:12 +02:00
imports . wbg . _ _wbg _target _b7cb1739bee70928 = function ( arg0 ) {
const ret = getObject ( arg0 ) . target ;
return isLikeNone ( ret ) ? 0 : addHeapObject ( ret ) ;
} ;
imports . wbg . _ _wbg _instanceof _FocusEvent _2a2e8a4ad51f12b2 = function ( arg0 ) {
2024-08-21 21:55:26 +02:00
let result ;
try {
2024-09-17 18:40:12 +02:00
result = getObject ( arg0 ) instanceof FocusEvent ;
2024-08-21 21:55:26 +02:00
} catch ( _ ) {
result = false ;
}
const ret = result ;
return ret ;
} ;
2024-09-17 18:40:12 +02:00
imports . wbg . _ _wbg _relatedTarget _aec4e56dd3af2726 = function ( arg0 ) {
const ret = getObject ( arg0 ) . relatedTarget ;
return isLikeNone ( ret ) ? 0 : addHeapObject ( ret ) ;
2024-08-21 21:55:26 +02:00
} ;
2024-09-17 18:40:12 +02:00
imports . wbg . _ _wbg _setsrcObject _8df760f949eb64ae = function ( arg0 , arg1 ) {
getObject ( arg0 ) . srcObject = getObject ( arg1 ) ;
2024-08-21 21:55:26 +02:00
} ;
2024-09-17 18:40:12 +02:00
imports . wbg . _ _wbg _play _69733added0ad2db = function ( ) { return handleError ( function ( arg0 ) {
const ret = getObject ( arg0 ) . play ( ) ;
return addHeapObject ( ret ) ;
2024-08-21 21:55:26 +02:00
} , arguments ) } ;
imports . wbg . _ _wbg _instanceof _HtmlVideoElement _cb7446c5ced3aafa = function ( arg0 ) {
let result ;
try {
result = getObject ( arg0 ) instanceof HTMLVideoElement ;
} catch ( _ ) {
result = false ;
}
const ret = result ;
return ret ;
} ;
imports . wbg . _ _wbg _setwidth _7aa91c44601eed4e = function ( arg0 , arg1 ) {
getObject ( arg0 ) . width = arg1 >>> 0 ;
} ;
imports . wbg . _ _wbg _setheight _e6f800ffbc3ea28e = function ( arg0 , arg1 ) {
getObject ( arg0 ) . height = arg1 >>> 0 ;
} ;
imports . wbg . _ _wbg _videoWidth _5f4190ae93af0dd6 = function ( arg0 ) {
const ret = getObject ( arg0 ) . videoWidth ;
return ret ;
} ;
imports . wbg . _ _wbg _videoHeight _4fb4bdd27e02263a = function ( arg0 ) {
const ret = getObject ( arg0 ) . videoHeight ;
return ret ;
} ;
2024-09-17 18:40:12 +02:00
imports . wbg . _ _wbg _set _b3c7c6d2e5e783d6 = function ( ) { return handleError ( function ( arg0 , arg1 , arg2 , arg3 , arg4 ) {
getObject ( arg0 ) . set ( getStringFromWasm0 ( arg1 , arg2 ) , getStringFromWasm0 ( arg3 , arg4 ) ) ;
} , arguments ) } ;
imports . wbg . _ _wbg _instanceof _HtmlCanvasElement _1a96a01603ec2d8b = function ( arg0 ) {
2024-08-21 21:55:26 +02:00
let result ;
try {
2024-09-17 18:40:12 +02:00
result = getObject ( arg0 ) instanceof HTMLCanvasElement ;
2024-08-21 21:55:26 +02:00
} catch ( _ ) {
result = false ;
}
const ret = result ;
return ret ;
} ;
2024-09-17 18:40:12 +02:00
imports . wbg . _ _wbg _setwidth _e371a8d6b16ebe84 = function ( arg0 , arg1 ) {
getObject ( arg0 ) . width = arg1 >>> 0 ;
} ;
imports . wbg . _ _wbg _setheight _ba99ad2df4295e89 = function ( arg0 , arg1 ) {
getObject ( arg0 ) . height = arg1 >>> 0 ;
} ;
imports . wbg . _ _wbg _getContext _69ec873410cbba3c = function ( ) { return handleError ( function ( arg0 , arg1 , arg2 ) {
const ret = getObject ( arg0 ) . getContext ( getStringFromWasm0 ( arg1 , arg2 ) ) ;
return isLikeNone ( ret ) ? 0 : addHeapObject ( ret ) ;
} , arguments ) } ;
imports . wbg . _ _wbg _data _3748d6414e549999 = function ( arg0 , arg1 ) {
const ret = getObject ( arg1 ) . data ;
const ptr1 = passArray8ToWasm0 ( ret , wasm . _ _wbindgen _malloc ) ;
const len1 = WASM _VECTOR _LEN ;
getDataViewMemory0 ( ) . setInt32 ( arg0 + 4 * 1 , len1 , true ) ;
getDataViewMemory0 ( ) . setInt32 ( arg0 + 4 * 0 , ptr1 , true ) ;
} ;
imports . wbg . _ _wbg _mediaDevices _faa6b252480b6169 = function ( ) { return handleError ( function ( arg0 ) {
const ret = getObject ( arg0 ) . mediaDevices ;
2024-08-21 21:55:26 +02:00
return addHeapObject ( ret ) ;
} , arguments ) } ;
2024-09-17 18:40:12 +02:00
imports . wbg . _ _wbg _setaudio _4463de95ab3f5403 = function ( arg0 , arg1 ) {
getObject ( arg0 ) . audio = getObject ( arg1 ) ;
} ;
imports . wbg . _ _wbg _setvideo _595a02280294c105 = function ( arg0 , arg1 ) {
getObject ( arg0 ) . video = getObject ( arg1 ) ;
} ;
2024-08-21 21:55:26 +02:00
imports . wbg . _ _wbg _parentElement _fbf8d048e797326d = function ( arg0 ) {
const ret = getObject ( arg0 ) . parentElement ;
return isLikeNone ( ret ) ? 0 : addHeapObject ( ret ) ;
} ;
imports . wbg . _ _wbg _values _0b652fbd880b650d = function ( arg0 ) {
const ret = getObject ( arg0 ) . values ( ) ;
return addHeapObject ( ret ) ;
} ;
2024-09-17 18:40:12 +02:00
imports . wbg . _ _wbg _instanceof _Response _e91b7eb7c611a9ae = function ( arg0 ) {
let result ;
try {
result = getObject ( arg0 ) instanceof Response ;
} catch ( _ ) {
result = false ;
}
const ret = result ;
return ret ;
2024-08-21 21:55:26 +02:00
} ;
2024-09-17 18:40:12 +02:00
imports . wbg . _ _wbg _json _3555ed3b0ef0dcad = function ( ) { return handleError ( function ( arg0 ) {
const ret = getObject ( arg0 ) . json ( ) ;
2024-08-21 21:55:26 +02:00
return addHeapObject ( ret ) ;
} , arguments ) } ;
imports . wbg . _ _wbg _instanceof _HtmlInputElement _88bf515ab1d9511d = function ( arg0 ) {
let result ;
try {
result = getObject ( arg0 ) instanceof HTMLInputElement ;
} catch ( _ ) {
result = false ;
}
const ret = result ;
return ret ;
} ;
imports . wbg . _ _wbg _value _d4a95e7a0d390578 = function ( arg0 , arg1 ) {
const ret = getObject ( arg1 ) . value ;
const ptr1 = passStringToWasm0 ( ret , wasm . _ _wbindgen _malloc , wasm . _ _wbindgen _realloc ) ;
const len1 = WASM _VECTOR _LEN ;
getDataViewMemory0 ( ) . setInt32 ( arg0 + 4 * 1 , len1 , true ) ;
getDataViewMemory0 ( ) . setInt32 ( arg0 + 4 * 0 , ptr1 , true ) ;
} ;
imports . wbg . _ _wbg _instanceof _CanvasRenderingContext2d _a0c4f0da6392b8ca = function ( arg0 ) {
let result ;
try {
result = getObject ( arg0 ) instanceof CanvasRenderingContext2D ;
} catch ( _ ) {
result = false ;
}
const ret = result ;
return ret ;
} ;
imports . wbg . _ _wbg _drawImage _536b6fb0e134e214 = function ( ) { return handleError ( function ( arg0 , arg1 , arg2 , arg3 ) {
getObject ( arg0 ) . drawImage ( getObject ( arg1 ) , arg2 , arg3 ) ;
} , arguments ) } ;
imports . wbg . _ _wbg _getImageData _dafed2a124c5f03f = function ( ) { return handleError ( function ( arg0 , arg1 , arg2 , arg3 , arg4 ) {
const ret = getObject ( arg0 ) . getImageData ( arg1 , arg2 , arg3 , arg4 ) ;
return addHeapObject ( ret ) ;
} , arguments ) } ;
imports . wbg . _ _wbg _add _e210e3b838bff57f = function ( ) { return handleError ( function ( arg0 , arg1 , arg2 ) {
getObject ( arg0 ) . add ( getStringFromWasm0 ( arg1 , arg2 ) ) ;
} , arguments ) } ;
imports . wbg . _ _wbg _remove _0dd2beafdaa4d9ba = function ( ) { return handleError ( function ( arg0 , arg1 , arg2 ) {
getObject ( arg0 ) . remove ( getStringFromWasm0 ( arg1 , arg2 ) ) ;
} , arguments ) } ;
imports . wbg . _ _wbg _queueMicrotask _48421b3cc9052b68 = function ( arg0 ) {
const ret = getObject ( arg0 ) . queueMicrotask ;
return addHeapObject ( ret ) ;
} ;
imports . wbg . _ _wbg _queueMicrotask _12a30234db4045d3 = function ( arg0 ) {
queueMicrotask ( getObject ( arg0 ) ) ;
} ;
imports . wbg . _ _wbg _get _3baa728f9d58d3f6 = function ( arg0 , arg1 ) {
const ret = getObject ( arg0 ) [ arg1 >>> 0 ] ;
return addHeapObject ( ret ) ;
} ;
imports . wbg . _ _wbg _length _ae22078168b726f5 = function ( arg0 ) {
const ret = getObject ( arg0 ) . length ;
return ret ;
} ;
imports . wbg . _ _wbg _new _a220cf903aa02ca2 = function ( ) {
const ret = new Array ( ) ;
return addHeapObject ( ret ) ;
} ;
imports . wbg . _ _wbg _newnoargs _76313bd6ff35d0f2 = function ( arg0 , arg1 ) {
const ret = new Function ( getStringFromWasm0 ( arg0 , arg1 ) ) ;
return addHeapObject ( ret ) ;
} ;
imports . wbg . _ _wbg _next _de3e9db4440638b2 = function ( arg0 ) {
const ret = getObject ( arg0 ) . next ;
return addHeapObject ( ret ) ;
} ;
imports . wbg . _ _wbg _next _f9cb570345655b9a = function ( ) { return handleError ( function ( arg0 ) {
const ret = getObject ( arg0 ) . next ( ) ;
return addHeapObject ( ret ) ;
} , arguments ) } ;
imports . wbg . _ _wbg _done _bfda7aa8f252b39f = function ( arg0 ) {
const ret = getObject ( arg0 ) . done ;
return ret ;
} ;
imports . wbg . _ _wbg _value _6d39332ab4788d86 = function ( arg0 ) {
const ret = getObject ( arg0 ) . value ;
return addHeapObject ( ret ) ;
} ;
imports . wbg . _ _wbg _iterator _888179a48810a9fe = function ( ) {
const ret = Symbol . iterator ;
return addHeapObject ( ret ) ;
} ;
imports . wbg . _ _wbg _get _224d16597dbbfd96 = function ( ) { return handleError ( function ( arg0 , arg1 ) {
const ret = Reflect . get ( getObject ( arg0 ) , getObject ( arg1 ) ) ;
return addHeapObject ( ret ) ;
} , arguments ) } ;
imports . wbg . _ _wbg _call _1084a111329e68ce = function ( ) { return handleError ( function ( arg0 , arg1 ) {
const ret = getObject ( arg0 ) . call ( getObject ( arg1 ) ) ;
return addHeapObject ( ret ) ;
} , arguments ) } ;
imports . wbg . _ _wbg _new _525245e2b9901204 = function ( ) {
const ret = new Object ( ) ;
return addHeapObject ( ret ) ;
} ;
imports . wbg . _ _wbg _self _3093d5d1f7bcb682 = function ( ) { return handleError ( function ( ) {
const ret = self . self ;
return addHeapObject ( ret ) ;
} , arguments ) } ;
imports . wbg . _ _wbg _window _3bcfc4d31bc012f8 = function ( ) { return handleError ( function ( ) {
const ret = window . window ;
return addHeapObject ( ret ) ;
} , arguments ) } ;
imports . wbg . _ _wbg _globalThis _86b222e13bdf32ed = function ( ) { return handleError ( function ( ) {
const ret = globalThis . globalThis ;
return addHeapObject ( ret ) ;
} , arguments ) } ;
imports . wbg . _ _wbg _global _e5a3fe56f8be9485 = function ( ) { return handleError ( function ( ) {
const ret = global . global ;
return addHeapObject ( ret ) ;
} , arguments ) } ;
imports . wbg . _ _wbg _isArray _8364a5371e9737d8 = function ( arg0 ) {
const ret = Array . isArray ( getObject ( arg0 ) ) ;
return ret ;
} ;
imports . wbg . _ _wbg _push _37c89022f34c01ca = function ( arg0 , arg1 ) {
const ret = getObject ( arg0 ) . push ( getObject ( arg1 ) ) ;
return ret ;
} ;
imports . wbg . _ _wbg _instanceof _ArrayBuffer _61dfc3198373c902 = function ( arg0 ) {
let result ;
try {
result = getObject ( arg0 ) instanceof ArrayBuffer ;
} catch ( _ ) {
result = false ;
}
const ret = result ;
return ret ;
} ;
imports . wbg . _ _wbg _call _89af060b4e1523f2 = function ( ) { return handleError ( function ( arg0 , arg1 , arg2 ) {
const ret = getObject ( arg0 ) . call ( getObject ( arg1 ) , getObject ( arg2 ) ) ;
return addHeapObject ( ret ) ;
} , arguments ) } ;
imports . wbg . _ _wbg _isSafeInteger _7f1ed56200d90674 = function ( arg0 ) {
const ret = Number . isSafeInteger ( getObject ( arg0 ) ) ;
return ret ;
} ;
imports . wbg . _ _wbg _getTime _91058879093a1589 = function ( arg0 ) {
const ret = getObject ( arg0 ) . getTime ( ) ;
return ret ;
} ;
imports . wbg . _ _wbg _new0 _65387337a95cf44d = function ( ) {
const ret = new Date ( ) ;
return addHeapObject ( ret ) ;
} ;
imports . wbg . _ _wbg _is _009b1ef508712fda = function ( arg0 , arg1 ) {
const ret = Object . is ( getObject ( arg0 ) , getObject ( arg1 ) ) ;
return ret ;
} ;
imports . wbg . _ _wbg _new _b85e72ed1bfd57f9 = function ( arg0 , arg1 ) {
try {
var state0 = { a : arg0 , b : arg1 } ;
var cb0 = ( arg0 , arg1 ) => {
const a = state0 . a ;
state0 . a = 0 ;
try {
2024-09-17 18:40:12 +02:00
return _ _wbg _adapter _205 ( a , state0 . b , arg0 , arg1 ) ;
2024-08-21 21:55:26 +02:00
} finally {
state0 . a = a ;
}
} ;
const ret = new Promise ( cb0 ) ;
return addHeapObject ( ret ) ;
} finally {
state0 . a = state0 . b = 0 ;
}
} ;
imports . wbg . _ _wbg _resolve _570458cb99d56a43 = function ( arg0 ) {
const ret = Promise . resolve ( getObject ( arg0 ) ) ;
return addHeapObject ( ret ) ;
} ;
imports . wbg . _ _wbg _catch _a279b1da46d132d8 = function ( arg0 , arg1 ) {
const ret = getObject ( arg0 ) . catch ( getObject ( arg1 ) ) ;
return addHeapObject ( ret ) ;
} ;
imports . wbg . _ _wbg _then _95e6edc0f89b73b1 = function ( arg0 , arg1 ) {
const ret = getObject ( arg0 ) . then ( getObject ( arg1 ) ) ;
return addHeapObject ( ret ) ;
} ;
imports . wbg . _ _wbg _then _876bb3c633745cc6 = function ( arg0 , arg1 , arg2 ) {
const ret = getObject ( arg0 ) . then ( getObject ( arg1 ) , getObject ( arg2 ) ) ;
return addHeapObject ( ret ) ;
} ;
imports . wbg . _ _wbg _buffer _b7b08af79b0b0974 = function ( arg0 ) {
const ret = getObject ( arg0 ) . buffer ;
return addHeapObject ( ret ) ;
} ;
imports . wbg . _ _wbg _new _ea1883e1e5e86686 = function ( arg0 ) {
const ret = new Uint8Array ( getObject ( arg0 ) ) ;
return addHeapObject ( ret ) ;
} ;
imports . wbg . _ _wbg _set _d1e79e2388520f18 = function ( arg0 , arg1 , arg2 ) {
getObject ( arg0 ) . set ( getObject ( arg1 ) , arg2 >>> 0 ) ;
} ;
imports . wbg . _ _wbg _length _8339fcf5d8ecd12e = function ( arg0 ) {
const ret = getObject ( arg0 ) . length ;
return ret ;
} ;
imports . wbg . _ _wbg _instanceof _Uint8Array _247a91427532499e = function ( arg0 ) {
let result ;
try {
result = getObject ( arg0 ) instanceof Uint8Array ;
} catch ( _ ) {
result = false ;
}
const ret = result ;
return ret ;
} ;
2024-08-21 23:00:06 +02:00
imports . wbg . _ _wbg _set _eacc7d73fefaafdf = function ( ) { return handleError ( function ( arg0 , arg1 , arg2 ) {
const ret = Reflect . set ( getObject ( arg0 ) , getObject ( arg1 ) , getObject ( arg2 ) ) ;
return ret ;
} , arguments ) } ;
2024-08-21 21:55:26 +02:00
imports . wbg . _ _wbindgen _debug _string = function ( arg0 , arg1 ) {
const ret = debugString ( getObject ( arg1 ) ) ;
const ptr1 = passStringToWasm0 ( ret , wasm . _ _wbindgen _malloc , wasm . _ _wbindgen _realloc ) ;
const len1 = WASM _VECTOR _LEN ;
getDataViewMemory0 ( ) . setInt32 ( arg0 + 4 * 1 , len1 , true ) ;
getDataViewMemory0 ( ) . setInt32 ( arg0 + 4 * 0 , ptr1 , true ) ;
} ;
imports . wbg . _ _wbindgen _throw = function ( arg0 , arg1 ) {
throw new Error ( getStringFromWasm0 ( arg0 , arg1 ) ) ;
} ;
imports . wbg . _ _wbindgen _memory = function ( ) {
const ret = wasm . memory ;
return addHeapObject ( ret ) ;
} ;
2024-09-17 18:40:12 +02:00
imports . wbg . _ _wbindgen _closure _wrapper201 = function ( arg0 , arg1 , arg2 ) {
const ret = makeMutClosure ( arg0 , arg1 , 43 , _ _wbg _adapter _36 ) ;
2024-08-21 21:55:26 +02:00
return addHeapObject ( ret ) ;
} ;
2024-09-17 18:40:12 +02:00
imports . wbg . _ _wbindgen _closure _wrapper202 = function ( arg0 , arg1 , arg2 ) {
const ret = makeMutClosure ( arg0 , arg1 , 43 , _ _wbg _adapter _39 ) ;
2024-08-21 21:55:26 +02:00
return addHeapObject ( ret ) ;
} ;
2024-09-17 18:40:12 +02:00
imports . wbg . _ _wbindgen _closure _wrapper1797 = function ( arg0 , arg1 , arg2 ) {
const ret = makeMutClosure ( arg0 , arg1 , 498 , _ _wbg _adapter _42 ) ;
2024-08-21 21:55:26 +02:00
return addHeapObject ( ret ) ;
} ;
return imports ;
}
function _ _wbg _init _memory ( imports , memory ) {
}
function _ _wbg _finalize _init ( instance , module ) {
wasm = instance . exports ;
_ _wbg _init . _ _wbindgen _wasm _module = module ;
cachedDataViewMemory0 = null ;
cachedUint8ArrayMemory0 = null ;
return wasm ;
}
function initSync ( module ) {
if ( wasm !== undefined ) return wasm ;
if ( typeof module !== 'undefined' && Object . getPrototypeOf ( module ) === Object . prototype )
( { module } = module )
else
console . warn ( 'using deprecated parameters for `initSync()`; pass a single object instead' )
const imports = _ _wbg _get _imports ( ) ;
_ _wbg _init _memory ( imports ) ;
if ( ! ( module instanceof WebAssembly . Module ) ) {
module = new WebAssembly . Module ( module ) ;
}
const instance = new WebAssembly . Instance ( module , imports ) ;
return _ _wbg _finalize _init ( instance , module ) ;
}
async function _ _wbg _init ( module _or _path ) {
if ( wasm !== undefined ) return wasm ;
if ( typeof module _or _path !== 'undefined' && Object . getPrototypeOf ( module _or _path ) === Object . prototype )
( { module _or _path } = module _or _path )
else
console . warn ( 'using deprecated parameters for the initialization function; pass a single object instead' )
if ( typeof module _or _path === 'undefined' ) {
module _or _path = new URL ( 'calories_browser_bg.wasm' , import . meta . url ) ;
}
const imports = _ _wbg _get _imports ( ) ;
if ( typeof module _or _path === 'string' || ( typeof Request === 'function' && module _or _path instanceof Request ) || ( typeof URL === 'function' && module _or _path instanceof URL ) ) {
module _or _path = fetch ( module _or _path ) ;
}
_ _wbg _init _memory ( imports ) ;
const { instance , module } = await _ _wbg _load ( await module _or _path , imports ) ;
return _ _wbg _finalize _init ( instance , module ) ;
}
export { initSync } ;
export default _ _wbg _init ;