|
| 1 | +let wasm; |
| 2 | +export function __wbg_set_wasm(val) { |
| 3 | + wasm = val; |
| 4 | +} |
| 5 | + |
| 6 | + |
| 7 | +const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder; |
| 8 | + |
| 9 | +let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true }); |
| 10 | + |
| 11 | +cachedTextDecoder.decode(); |
| 12 | + |
| 13 | +let cachedUint8ArrayMemory0 = null; |
| 14 | + |
| 15 | +function getUint8ArrayMemory0() { |
| 16 | + if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { |
| 17 | + cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); |
| 18 | + } |
| 19 | + return cachedUint8ArrayMemory0; |
| 20 | +} |
| 21 | + |
| 22 | +function getStringFromWasm0(ptr, len) { |
| 23 | + ptr = ptr >>> 0; |
| 24 | + return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); |
| 25 | +} |
| 26 | + |
| 27 | +function takeFromExternrefTable0(idx) { |
| 28 | + const value = wasm.__wbindgen_export_0.get(idx); |
| 29 | + wasm.__externref_table_dealloc(idx); |
| 30 | + return value; |
| 31 | +} |
| 32 | +/** |
| 33 | + * @returns {number} |
| 34 | + */ |
| 35 | +export function causes_error() { |
| 36 | + const ret = wasm.causes_error(); |
| 37 | + if (ret[2]) { |
| 38 | + throw takeFromExternrefTable0(ret[1]); |
| 39 | + } |
| 40 | + return ret[0]; |
| 41 | +} |
| 42 | + |
| 43 | +export function __wbindgen_init_externref_table() { |
| 44 | + const table = wasm.__wbindgen_export_0; |
| 45 | + const offset = table.grow(4); |
| 46 | + table.set(0, undefined); |
| 47 | + table.set(offset + 0, undefined); |
| 48 | + table.set(offset + 1, null); |
| 49 | + table.set(offset + 2, true); |
| 50 | + table.set(offset + 3, false); |
| 51 | + ; |
| 52 | +}; |
| 53 | + |
| 54 | +export function __wbindgen_throw(arg0, arg1) { |
| 55 | + throw new Error(getStringFromWasm0(arg0, arg1)); |
| 56 | +}; |
| 57 | + |
0 commit comments