diff --git a/assets/dioxus/dioxus-starter.js b/assets/dioxus/dioxus-starter.js index 157ce58..1538cc2 100644 --- a/assets/dioxus/dioxus-starter.js +++ b/assets/dioxus/dioxus-starter.js @@ -1,5 +1,8 @@ -import { create, update_memory, save_template, initilize } from './snippets/dioxus-interpreter-js-1676574062e4c953/inline0.js'; -import * as __wbg_star0 from './snippets/dioxus-interpreter-js-1676574062e4c953/inline0.js'; +import { create, update_memory, save_template, get_node, initilize } from './snippets/dioxus-interpreter-js-85a0a2f8acce2e86/inline0.js'; +import { setAttributeInner } from './snippets/dioxus-interpreter-js-85a0a2f8acce2e86/src/common.js'; +import { get_form_data } from './snippets/dioxus-web-a95d8cc6c91ff8eb/inline0.js'; +import { Dioxus } from './snippets/dioxus-web-a95d8cc6c91ff8eb/src/eval.js'; +import * as __wbg_star0 from './snippets/dioxus-interpreter-js-85a0a2f8acce2e86/inline0.js'; let wasm; @@ -23,6 +26,30 @@ function takeObject(idx) { return ret; } +function _assertBoolean(n) { + if (typeof(n) !== 'boolean') { + throw new Error('expected a boolean argument'); + } +} + +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 cachedUint8Memory0 = null; + +function getUint8Memory0() { + if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) { + cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer); + } + return cachedUint8Memory0; +} + +function getStringFromWasm0(ptr, len) { + ptr = ptr >>> 0; + return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len)); +} + function addHeapObject(obj) { if (heap_next === heap.length) heap.push(heap.length + 1); const idx = heap_next; @@ -34,27 +61,100 @@ function addHeapObject(obj) { return idx; } -function _assertBoolean(n) { - if (typeof(n) !== 'boolean') { - throw new Error('expected a boolean argument'); +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 (typeof(arg) !== 'string') throw new Error('expected a string argument'); + + if (realloc === undefined) { + const buf = cachedTextEncoder.encode(arg); + const ptr = malloc(buf.length, 1) >>> 0; + getUint8Memory0().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 = getUint8Memory0(); + + 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 = getUint8Memory0().subarray(ptr + offset, ptr + len); + const ret = encodeString(arg, view); + if (ret.read !== arg.length) throw new Error('failed to pass whole string'); + offset += ret.written; } + + WASM_VECTOR_LEN = offset; + return ptr; } -const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); +function isLikeNone(x) { + return x === undefined || x === null; +} -cachedTextDecoder.decode(); +let cachedInt32Memory0 = null; -let cachedUint8Memory0 = null; +function getInt32Memory0() { + if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) { + cachedInt32Memory0 = new Int32Array(wasm.memory.buffer); + } + return cachedInt32Memory0; +} -function getUint8Memory0() { - if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) { - cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer); +function _assertNum(n) { + if (typeof(n) !== 'number') throw new Error('expected a number argument'); +} + +let cachedFloat64Memory0 = null; + +function getFloat64Memory0() { + if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) { + cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer); } - return cachedUint8Memory0; + return cachedFloat64Memory0; } -function getStringFromWasm0(ptr, len) { - return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len)); +function _assertBigInt(n) { + if (typeof(n) !== 'bigint') throw new Error('expected a bigint argument'); +} + +let cachedBigInt64Memory0 = null; + +function getBigInt64Memory0() { + if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.byteLength === 0) { + cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer); + } + return cachedBigInt64Memory0; } function debugString(val) { @@ -122,72 +222,6 @@ function debugString(val) { return className; } -let WASM_VECTOR_LEN = 0; - -const cachedTextEncoder = new TextEncoder('utf-8'); - -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 (typeof(arg) !== 'string') throw new Error('expected a string argument'); - - if (realloc === undefined) { - const buf = cachedTextEncoder.encode(arg); - const ptr = malloc(buf.length); - getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf); - WASM_VECTOR_LEN = buf.length; - return ptr; - } - - let len = arg.length; - let ptr = malloc(len); - - const mem = getUint8Memory0(); - - 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); - const view = getUint8Memory0().subarray(ptr + offset, ptr + len); - const ret = encodeString(arg, view); - if (ret.read !== arg.length) throw new Error('failed to pass whole string'); - offset += ret.written; - } - - WASM_VECTOR_LEN = offset; - return ptr; -} - -let cachedInt32Memory0 = null; - -function getInt32Memory0() { - if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) { - cachedInt32Memory0 = new Int32Array(wasm.memory.buffer); - } - return cachedInt32Memory0; -} - function makeMutClosure(arg0, arg1, dtor, f) { const state = { a: arg0, b: arg1, cnt: 1, dtor }; const real = (...args) => { @@ -229,10 +263,6 @@ function logError(f, args) { } } -function _assertNum(n) { - if (typeof(n) !== 'number') throw new Error('expected a number argument'); -} - let stack_pointer = 128; function addBorrowedObject(obj) { @@ -240,36 +270,85 @@ function addBorrowedObject(obj) { heap[--stack_pointer] = obj; return stack_pointer; } -function __wbg_adapter_18(arg0, arg1, arg2) { +function __wbg_adapter_48(arg0, arg1, arg2) { try { _assertNum(arg0); _assertNum(arg1); - wasm._dyn_core__ops__function__FnMut___A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hf43039171eef72f1(arg0, arg1, addBorrowedObject(arg2)); + wasm.wasm_bindgen__convert__closures__invoke1_mut_ref__h3dd75841791f27c4(arg0, arg1, addBorrowedObject(arg2)); } finally { heap[stack_pointer++] = undefined; } } -function __wbg_adapter_21(arg0, arg1, arg2) { +function __wbg_adapter_51(arg0, arg1) { + _assertNum(arg0); + _assertNum(arg1); + wasm.wasm_bindgen__convert__closures__invoke0_mut__h6f97e74416fb9db0(arg0, arg1); +} + +function __wbg_adapter_54(arg0, arg1, arg2) { _assertNum(arg0); _assertNum(arg1); - wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1ef501c594eea9ae(arg0, arg1, addHeapObject(arg2)); + wasm.wasm_bindgen__convert__closures__invoke1_mut__hd7865fa9651cb9ed(arg0, arg1, addHeapObject(arg2)); +} + +function __wbg_adapter_57(arg0, arg1, arg2) { + try { + _assertNum(arg0); + _assertNum(arg1); + wasm.wasm_bindgen__convert__closures__invoke1_mut_ref__hbc369e5f36ed62a8(arg0, arg1, addBorrowedObject(arg2)); + } finally { + heap[stack_pointer++] = undefined; + } } -function __wbg_adapter_24(arg0, arg1, arg2) { +function __wbg_adapter_60(arg0, arg1, arg2) { try { _assertNum(arg0); _assertNum(arg1); - wasm._dyn_core__ops__function__FnMut___A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hea0ef2b4590d257a(arg0, arg1, addBorrowedObject(arg2)); + wasm._dyn_core__ops__function__FnMut___A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h66cad350af9cd478(arg0, arg1, addBorrowedObject(arg2)); } finally { heap[stack_pointer++] = undefined; } } -function __wbg_adapter_27(arg0, arg1) { +function __wbg_adapter_63(arg0, arg1) { + _assertNum(arg0); + _assertNum(arg1); + wasm.wasm_bindgen__convert__closures__invoke0_mut__h614c2948447a2f9a(arg0, arg1); +} + +function makeClosure(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++; + try { + return f(state.a, state.b, ...args); + } finally { + if (--state.cnt === 0) { + wasm.__wbindgen_export_2.get(state.dtor)(state.a, state.b); + state.a = 0; + + } + } + }; + real.original = state; + + return real; +} +function __wbg_adapter_66(arg0, arg1, arg2) { + _assertNum(arg0); + _assertNum(arg1); + wasm._dyn_core__ops__function__Fn__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h69aeab2b60b9f484(arg0, arg1, addHeapObject(arg2)); +} + +function __wbg_adapter_69(arg0, arg1, arg2) { _assertNum(arg0); _assertNum(arg1); - wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h37bfbf6481eb014a(arg0, arg1); + wasm.wasm_bindgen__convert__closures__invoke1_mut__h87b88523df6e9bd8(arg0, arg1, addHeapObject(arg2)); } function getCachedStringFromWasm0(ptr, len) { @@ -290,6 +369,7 @@ function getUint32Memory0() { } function getArrayJsValueFromWasm0(ptr, len) { + ptr = ptr >>> 0; const mem = getUint32Memory0(); const slice = mem.subarray(ptr / 4, ptr / 4 + len); const result = []; @@ -307,11 +387,7 @@ function handleError(f, args) { } } -function isLikeNone(x) { - return x === undefined || x === null; -} - -async function load(module, imports) { +async function __wbg_load(module, imports) { if (typeof Response === 'function' && module instanceof Response) { if (typeof WebAssembly.instantiateStreaming === 'function') { try { @@ -342,667 +418,1031 @@ async function load(module, imports) { } } -function getImports() { +function __wbg_get_imports() { const imports = {}; imports.wbg = {}; imports.wbg.__wbindgen_object_drop_ref = function(arg0) { takeObject(arg0); }; + imports.wbg.__wbindgen_cb_drop = function(arg0) { + const obj = takeObject(arg0).original; + if (obj.cnt-- == 1) { + obj.a = 0; + return true; + } + const ret = false; + _assertBoolean(ret); + return ret; + }; + imports.wbg.__wbindgen_string_new = function(arg0, arg1) { + const ret = getStringFromWasm0(arg0, arg1); + return addHeapObject(ret); + }; imports.wbg.__wbindgen_object_clone_ref = function(arg0) { const ret = getObject(arg0); 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; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; + }; + imports.wbg.__wbg_new_abd8a48ffd951779 = function() { return logError(function (arg0) { + const ret = new Dioxus(getObject(arg0)); + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbindgen_is_undefined = function(arg0) { + const ret = getObject(arg0) === undefined; + _assertBoolean(ret); + return ret; + }; + imports.wbg.__wbg_rustSend_6175a678357f46b1 = function() { return logError(function (arg0, arg1) { + getObject(arg0).rustSend(takeObject(arg1)); + }, arguments) }; + imports.wbg.__wbg_getformdata_7206b99ef44b788e = function() { return logError(function (arg0) { + const ret = get_form_data(getObject(arg0)); + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbindgen_error_new = function(arg0, arg1) { + const ret = new Error(getStringFromWasm0(arg0, arg1)); + return addHeapObject(ret); + }; + imports.wbg.__wbindgen_boolean_get = function(arg0) { + const v = getObject(arg0); + const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2; + _assertNum(ret); + return ret; + }; + imports.wbg.__wbindgen_is_bigint = function(arg0) { + const ret = typeof(getObject(arg0)) === 'bigint'; + _assertBoolean(ret); + return ret; + }; + imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) { + const ret = arg0; + return addHeapObject(ret); + }; + imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) { + const ret = getObject(arg0) === getObject(arg1); + _assertBoolean(ret); + return ret; + }; + imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) { + const ret = BigInt.asUintN(64, arg0); + return addHeapObject(ret); + }; + imports.wbg.__wbindgen_number_get = function(arg0, arg1) { + const obj = getObject(arg1); + const ret = typeof(obj) === 'number' ? obj : undefined; + if (!isLikeNone(ret)) { + _assertNum(ret); + } + getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret; + getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret); + }; + imports.wbg.__wbindgen_is_object = function(arg0) { + const val = getObject(arg0); + const ret = typeof(val) === 'object' && val !== null; + _assertBoolean(ret); + return ret; + }; + imports.wbg.__wbindgen_in = function(arg0, arg1) { + const ret = getObject(arg0) in getObject(arg1); + _assertBoolean(ret); + return ret; + }; + imports.wbg.__wbindgen_is_string = function(arg0) { + const ret = typeof(getObject(arg0)) === 'string'; + _assertBoolean(ret); + return ret; + }; imports.wbg.__wbg_new_abda76e883ba8a5f = function() { return logError(function () { const ret = new Error(); return addHeapObject(ret); }, arguments) }; imports.wbg.__wbg_stack_658279fe44541cf6 = function() { return logError(function (arg0, arg1) { const ret = getObject(arg1).stack; - const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; }, arguments) }; imports.wbg.__wbg_error_f851667af71bcfc6 = function() { return logError(function (arg0, arg1) { var v0 = getCachedStringFromWasm0(arg0, arg1); - if (arg0 !== 0) { wasm.__wbindgen_free(arg0, arg1); } + if (arg0 !== 0) { wasm.__wbindgen_free(arg0, arg1, 1); } console.error(v0); }, arguments) }; -imports.wbg.__wbindgen_cb_drop = function(arg0) { - const obj = takeObject(arg0).original; - if (obj.cnt-- == 1) { - obj.a = 0; - return true; - } - const ret = false; - _assertBoolean(ret); - return ret; -}; -imports.wbg.__wbg_create_84d0fe69433b2b4d = function() { return logError(function (arg0) { +imports.wbg.__wbg_create_e7a4871bd307ada9 = function() { return logError(function (arg0) { create(arg0 >>> 0); }, arguments) }; -imports.wbg.__wbg_updatememory_f8282a316a44bc6c = function() { return logError(function (arg0) { +imports.wbg.__wbg_updatememory_acd4e8342aa8de4a = function() { return logError(function (arg0) { update_memory(takeObject(arg0)); }, arguments) }; -imports.wbg.__wbg_savetemplate_66c28e397e4ac81d = function() { return logError(function (arg0, arg1, arg2) { +imports.wbg.__wbg_savetemplate_c4cab19a5b168471 = function() { return logError(function (arg0, arg1, arg2) { var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice(); - wasm.__wbindgen_free(arg0, arg1 * 4); + wasm.__wbindgen_free(arg0, arg1 * 4, 4); save_template(v0, arg2 >>> 0); }, arguments) }; -imports.wbg.__wbg_initilize_b869c4536d6c8ce7 = function() { return logError(function (arg0, arg1) { +imports.wbg.__wbg_getnode_f20ae005be1aee22 = function() { return logError(function (arg0) { + const ret = get_node(arg0 >>> 0); + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_initilize_bfb3db58295295dd = function() { return logError(function (arg0, arg1) { initilize(takeObject(arg0), getObject(arg1)); }, arguments) }; -imports.wbg.__wbindgen_string_new = function(arg0, arg1) { - const ret = getStringFromWasm0(arg0, arg1); - return addHeapObject(ret); -}; -imports.wbg.__wbg_clearTimeout_76877dbc010e786d = function() { return logError(function (arg0) { +imports.wbg.__wbg_setAttributeInner_605314ec1c8cafdf = function() { return logError(function (arg0, arg1, arg2, arg3, arg4, arg5) { + var v0 = getCachedStringFromWasm0(arg1, arg2); + var v1 = getCachedStringFromWasm0(arg4, arg5); + setAttributeInner(takeObject(arg0), v0, takeObject(arg3), v1); +}, arguments) }; +imports.wbg.__wbg_clearTimeout_541ac0980ffcef74 = function() { return logError(function (arg0) { const ret = clearTimeout(takeObject(arg0)); return addHeapObject(ret); }, arguments) }; -imports.wbg.__wbg_setTimeout_75cb9b6991a4031d = function() { return handleError(function (arg0, arg1) { +imports.wbg.__wbg_setTimeout_7d81d052875b0f4f = function() { return handleError(function (arg0, arg1) { const ret = setTimeout(getObject(arg0), arg1); return addHeapObject(ret); }, arguments) }; -imports.wbg.__wbg_instanceof_Window_e266f02eee43b570 = function() { return logError(function (arg0) { - let result; - try { - result = getObject(arg0) instanceof Window; - } catch { - result = false; - } - const ret = result; - _assertBoolean(ret); - return ret; +imports.wbg.__wbindgen_number_new = function(arg0) { + const ret = arg0; + return addHeapObject(ret); +}; +imports.wbg.__wbg_queueMicrotask_4d890031a6a5a50c = function() { return logError(function (arg0) { + queueMicrotask(getObject(arg0)); }, arguments) }; -imports.wbg.__wbg_document_950215a728589a2d = function() { return logError(function (arg0) { - const ret = getObject(arg0).document; - return isLikeNone(ret) ? 0 : addHeapObject(ret); +imports.wbg.__wbg_queueMicrotask_adae4bc085237231 = function() { return logError(function (arg0) { + const ret = getObject(arg0).queueMicrotask; + return addHeapObject(ret); }, arguments) }; -imports.wbg.__wbg_sessionStorage_71f0ec1cb0950b17 = function() { return handleError(function (arg0) { - const ret = getObject(arg0).sessionStorage; - return isLikeNone(ret) ? 0 : addHeapObject(ret); +imports.wbg.__wbindgen_is_function = function(arg0) { + const ret = typeof(getObject(arg0)) === 'function'; + _assertBoolean(ret); + return ret; +}; +imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) { + const ret = getObject(arg0) == getObject(arg1); + _assertBoolean(ret); + return ret; +}; +imports.wbg.__wbg_String_88810dfeb4021902 = function() { return logError(function (arg0, arg1) { + const ret = String(getObject(arg1)); + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; +}, arguments) }; +imports.wbg.__wbg_set_841ac57cff3d672b = function() { return logError(function (arg0, arg1, arg2) { + getObject(arg0)[takeObject(arg1)] = takeObject(arg2); +}, arguments) }; +imports.wbg.__wbg_error_71d6845bf00a930f = function() { return logError(function (arg0, arg1) { + var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice(); + wasm.__wbindgen_free(arg0, arg1 * 4, 4); + console.error(...v0); +}, arguments) }; +imports.wbg.__wbg_instanceof_Window_3e5cd1f48c152d01 = function() { return logError(function (arg0) { + let result; + try { + result = getObject(arg0) instanceof Window; + } catch (_) { + result = false; + } + const ret = result; + _assertBoolean(ret); + return ret; +}, arguments) }; +imports.wbg.__wbg_document_d609202d16c38224 = function() { return logError(function (arg0) { + const ret = getObject(arg0).document; + return isLikeNone(ret) ? 0 : addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_location_176c34e89c2c9d80 = function() { return logError(function (arg0) { + const ret = getObject(arg0).location; + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_history_80998b7456bf367e = function() { return handleError(function (arg0) { + const ret = getObject(arg0).history; + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_scrollX_1482aa4311540216 = function() { return handleError(function (arg0) { + const ret = getObject(arg0).scrollX; + return ret; }, arguments) }; -imports.wbg.__wbg_createElement_e2a0e21263eb5416 = function() { return handleError(function (arg0, arg1, arg2) { +imports.wbg.__wbg_scrollY_17b39930ce15afc3 = function() { return handleError(function (arg0) { + const ret = getObject(arg0).scrollY; + return ret; +}, arguments) }; +imports.wbg.__wbg_localStorage_8c507fd281456944 = function() { return handleError(function (arg0) { + const ret = getObject(arg0).localStorage; + return isLikeNone(ret) ? 0 : addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_scrollTo_eb21c4452d7b3cd6 = function() { return logError(function (arg0, arg1, arg2) { + getObject(arg0).scrollTo(arg1, arg2); +}, arguments) }; +imports.wbg.__wbg_cancelAnimationFrame_cb9c6f65eaa83d76 = function() { return handleError(function (arg0, arg1) { + getObject(arg0).cancelAnimationFrame(arg1); +}, arguments) }; +imports.wbg.__wbg_requestAnimationFrame_74309aadebde12fa = function() { return handleError(function (arg0, arg1) { + const ret = getObject(arg0).requestAnimationFrame(getObject(arg1)); + _assertNum(ret); + return ret; +}, arguments) }; +imports.wbg.__wbg_createElement_fdd5c113cb84539e = function() { return handleError(function (arg0, arg1, arg2) { var v0 = getCachedStringFromWasm0(arg1, arg2); const ret = getObject(arg0).createElement(v0); return addHeapObject(ret); }, arguments) }; -imports.wbg.__wbg_createElementNS_0047de728927ea00 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { +imports.wbg.__wbg_createElementNS_524b05a6070757b6 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { var v0 = getCachedStringFromWasm0(arg1, arg2); var v1 = getCachedStringFromWasm0(arg3, arg4); const ret = getObject(arg0).createElementNS(v0, v1); return addHeapObject(ret); }, arguments) }; -imports.wbg.__wbg_createTextNode_866e33a51b47f04c = function() { return logError(function (arg0, arg1, arg2) { +imports.wbg.__wbg_createTextNode_7ff0c034b2855f66 = function() { return logError(function (arg0, arg1, arg2) { var v0 = getCachedStringFromWasm0(arg1, arg2); const ret = getObject(arg0).createTextNode(v0); return addHeapObject(ret); }, arguments) }; -imports.wbg.__wbg_getElementById_eb93a47327bb5585 = function() { return logError(function (arg0, arg1, arg2) { +imports.wbg.__wbg_getElementById_65b9547a428b5eb4 = function() { return logError(function (arg0, arg1, arg2) { var v0 = getCachedStringFromWasm0(arg1, arg2); const ret = getObject(arg0).getElementById(v0); return isLikeNone(ret) ? 0 : addHeapObject(ret); }, arguments) }; -imports.wbg.__wbg_pageX_fa6e927410d8f9a8 = function() { return logError(function (arg0) { - const ret = getObject(arg0).pageX; - _assertNum(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_pageY_fcdd161e44399498 = function() { return logError(function (arg0) { - const ret = getObject(arg0).pageY; - _assertNum(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_instanceof_HtmlFormElement_04e7484e36bd99d6 = function() { return logError(function (arg0) { +imports.wbg.__wbg_instanceof_Element_3f326a19cc457941 = function() { return logError(function (arg0) { let result; try { - result = getObject(arg0) instanceof HTMLFormElement; - } catch { + result = getObject(arg0) instanceof Element; + } catch (_) { result = false; } const ret = result; _assertBoolean(ret); return ret; }, arguments) }; -imports.wbg.__wbg_elements_ce4445b6cda59af6 = function() { return logError(function (arg0) { - const ret = getObject(arg0).elements; +imports.wbg.__wbg_getAttribute_bff489553dd803cc = function() { return logError(function (arg0, arg1, arg2, arg3) { + var v0 = getCachedStringFromWasm0(arg2, arg3); + const ret = getObject(arg1).getAttribute(v0); + var ptr2 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len2 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len2; + getInt32Memory0()[arg0 / 4 + 0] = ptr2; +}, arguments) }; +imports.wbg.__wbg_getBoundingClientRect_4167ccfa40cf88fc = function() { return logError(function (arg0) { + const ret = getObject(arg0).getBoundingClientRect(); return addHeapObject(ret); }, arguments) }; -imports.wbg.__wbg_instanceof_HtmlTextAreaElement_4bc39f9d861a6832 = function() { return logError(function (arg0) { - let result; - try { - result = getObject(arg0) instanceof HTMLTextAreaElement; - } catch { - result = false; - } - const ret = result; +imports.wbg.__wbg_scrollIntoView_d55385b7b1c1b7af = function() { return logError(function (arg0, arg1) { + getObject(arg0).scrollIntoView(getObject(arg1)); +}, arguments) }; +imports.wbg.__wbg_toggleAttribute_9013602d6b410309 = function() { return handleError(function (arg0, arg1, arg2) { + var v0 = getCachedStringFromWasm0(arg1, arg2); + const ret = getObject(arg0).toggleAttribute(v0); _assertBoolean(ret); return ret; }, arguments) }; -imports.wbg.__wbg_value_00fb0fdc46959169 = function() { return logError(function (arg0, arg1) { - const ret = getObject(arg1).value; - const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; -}, arguments) }; -imports.wbg.__wbg_instanceof_CompositionEvent_57e2f1c0e7330ddc = function() { return logError(function (arg0) { +imports.wbg.__wbg_instanceof_HtmlElement_55a0f0f0f0f0118e = function() { return logError(function (arg0) { let result; try { - result = getObject(arg0) instanceof CompositionEvent; - } catch { + result = getObject(arg0) instanceof HTMLElement; + } catch (_) { result = false; } const ret = result; _assertBoolean(ret); return ret; }, arguments) }; -imports.wbg.__wbg_data_70b505c651722930 = function() { return logError(function (arg0, arg1) { - const ret = getObject(arg1).data; - var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; -}, arguments) }; -imports.wbg.__wbg_setProperty_21e2e7868b86a93e = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { - var v0 = getCachedStringFromWasm0(arg1, arg2); - var v1 = getCachedStringFromWasm0(arg3, arg4); - getObject(arg0).setProperty(v0, v1); -}, arguments) }; -imports.wbg.__wbg_getItem_f0d43fc4e780b652 = function() { return handleError(function (arg0, arg1, arg2, arg3) { - var v0 = getCachedStringFromWasm0(arg2, arg3); - const ret = getObject(arg1).getItem(v0); - var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len1 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len1; - getInt32Memory0()[arg0 / 4 + 0] = ptr1; +imports.wbg.__wbg_blur_0f6854a1635dce70 = function() { return handleError(function (arg0) { + getObject(arg0).blur(); }, arguments) }; -imports.wbg.__wbg_setItem_f645824d6eface62 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { - var v0 = getCachedStringFromWasm0(arg1, arg2); - var v1 = getCachedStringFromWasm0(arg3, arg4); - getObject(arg0).setItem(v0, v1); +imports.wbg.__wbg_focus_6d3d2b6776d06f7f = function() { return handleError(function (arg0) { + getObject(arg0).focus(); }, arguments) }; -imports.wbg.__wbg_instanceof_HtmlInputElement_5c9d54338207f061 = function() { return logError(function (arg0) { - let result; - try { - result = getObject(arg0) instanceof HTMLInputElement; - } catch { - result = false; - } - const ret = result; +imports.wbg.__wbg_altKey_bf16cace6fb79198 = function() { return logError(function (arg0) { + const ret = getObject(arg0).altKey; _assertBoolean(ret); return ret; }, arguments) }; -imports.wbg.__wbg_checked_44c09d0c819e33ad = function() { return logError(function (arg0) { - const ret = getObject(arg0).checked; +imports.wbg.__wbg_ctrlKey_977280484bcead08 = function() { return logError(function (arg0) { + const ret = getObject(arg0).ctrlKey; _assertBoolean(ret); return ret; }, arguments) }; -imports.wbg.__wbg_type_6bd11acdabd07813 = function() { return logError(function (arg0, arg1) { - const ret = getObject(arg1).type; - const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; -}, arguments) }; -imports.wbg.__wbg_value_1f2c9e357d18d3ea = function() { return logError(function (arg0, arg1) { - const ret = getObject(arg1).value; - const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; +imports.wbg.__wbg_shiftKey_55894418ec38c771 = function() { return logError(function (arg0) { + const ret = getObject(arg0).shiftKey; + _assertBoolean(ret); + return ret; }, arguments) }; -imports.wbg.__wbg_pointerId_d2caae4465ba386f = function() { return logError(function (arg0) { - const ret = getObject(arg0).pointerId; - _assertNum(ret); +imports.wbg.__wbg_metaKey_16606958d932a374 = function() { return logError(function (arg0) { + const ret = getObject(arg0).metaKey; + _assertBoolean(ret); return ret; }, arguments) }; -imports.wbg.__wbg_width_a1d5efe9db3fb17a = function() { return logError(function (arg0) { - const ret = getObject(arg0).width; +imports.wbg.__wbg_location_6b0f1184627d67d8 = function() { return logError(function (arg0) { + const ret = getObject(arg0).location; _assertNum(ret); return ret; }, arguments) }; -imports.wbg.__wbg_height_7a964b61a7a42a7d = function() { return logError(function (arg0) { - const ret = getObject(arg0).height; - _assertNum(ret); +imports.wbg.__wbg_repeat_2ffa2628836d8009 = function() { return logError(function (arg0) { + const ret = getObject(arg0).repeat; + _assertBoolean(ret); return ret; }, arguments) }; -imports.wbg.__wbg_pressure_352c13794490720b = function() { return logError(function (arg0) { - const ret = getObject(arg0).pressure; +imports.wbg.__wbg_key_cf8022c18f47869e = function() { return logError(function (arg0, arg1) { + const ret = getObject(arg1).key; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; +}, arguments) }; +imports.wbg.__wbg_code_878e76a4ddb70157 = function() { return logError(function (arg0, arg1) { + const ret = getObject(arg1).code; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; +}, arguments) }; +imports.wbg.__wbg_altKey_aed9fd1b4e7c811a = function() { return logError(function (arg0) { + const ret = getObject(arg0).altKey; + _assertBoolean(ret); return ret; }, arguments) }; -imports.wbg.__wbg_tangentialPressure_1dfc978ca995fe64 = function() { return logError(function (arg0) { - const ret = getObject(arg0).tangentialPressure; +imports.wbg.__wbg_metaKey_cff45cd01eb1e457 = function() { return logError(function (arg0) { + const ret = getObject(arg0).metaKey; + _assertBoolean(ret); return ret; }, arguments) }; -imports.wbg.__wbg_tiltX_5e065070f9907bab = function() { return logError(function (arg0) { - const ret = getObject(arg0).tiltX; - _assertNum(ret); +imports.wbg.__wbg_ctrlKey_3429fc09f6022470 = function() { return logError(function (arg0) { + const ret = getObject(arg0).ctrlKey; + _assertBoolean(ret); return ret; }, arguments) }; -imports.wbg.__wbg_tiltY_88a95794fa24061b = function() { return logError(function (arg0) { - const ret = getObject(arg0).tiltY; - _assertNum(ret); +imports.wbg.__wbg_shiftKey_d1fad7fd5ce30d9f = function() { return logError(function (arg0) { + const ret = getObject(arg0).shiftKey; + _assertBoolean(ret); return ret; }, arguments) }; -imports.wbg.__wbg_twist_1ac0d3bf085b9fa5 = function() { return logError(function (arg0) { - const ret = getObject(arg0).twist; +imports.wbg.__wbg_pageX_58e43d6529844f55 = function() { return logError(function (arg0) { + const ret = getObject(arg0).pageX; _assertNum(ret); return ret; }, arguments) }; -imports.wbg.__wbg_pointerType_df759fa0bd6634ed = function() { return logError(function (arg0, arg1) { - const ret = getObject(arg1).pointerType; - const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; -}, arguments) }; -imports.wbg.__wbg_isPrimary_31079f1bab7f6665 = function() { return logError(function (arg0) { - const ret = getObject(arg0).isPrimary; - _assertBoolean(ret); +imports.wbg.__wbg_pageY_f3752d96ecd2a291 = function() { return logError(function (arg0) { + const ret = getObject(arg0).pageY; + _assertNum(ret); return ret; }, arguments) }; -imports.wbg.__wbg_instanceof_Element_cb847a3fc7b1b1a4 = function() { return logError(function (arg0) { +imports.wbg.__wbg_instanceof_CompositionEvent_bdeef8fdaebace4e = function() { return logError(function (arg0) { let result; try { - result = getObject(arg0) instanceof Element; - } catch { + result = getObject(arg0) instanceof CompositionEvent; + } catch (_) { result = false; } const ret = result; _assertBoolean(ret); return ret; }, arguments) }; -imports.wbg.__wbg_getAttribute_2c20e00a5cd314af = function() { return logError(function (arg0, arg1, arg2, arg3) { - var v0 = getCachedStringFromWasm0(arg2, arg3); - const ret = getObject(arg1).getAttribute(v0); +imports.wbg.__wbg_data_5d89389455680c67 = function() { return logError(function (arg0, arg1) { + const ret = getObject(arg1).data; var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len1 = WASM_VECTOR_LEN; getInt32Memory0()[arg0 / 4 + 1] = len1; getInt32Memory0()[arg0 / 4 + 0] = ptr1; }, arguments) }; -imports.wbg.__wbg_setAttribute_79c9562d32d05e66 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { - var v0 = getCachedStringFromWasm0(arg1, arg2); - var v1 = getCachedStringFromWasm0(arg3, arg4); - getObject(arg0).setAttribute(v0, v1); -}, arguments) }; -imports.wbg.__wbg_setAttributeNS_6226a35b93f5c79c = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6) { - var v0 = getCachedStringFromWasm0(arg1, arg2); - var v1 = getCachedStringFromWasm0(arg3, arg4); - var v2 = getCachedStringFromWasm0(arg5, arg6); - getObject(arg0).setAttributeNS(v0, v1, v2); -}, arguments) }; -imports.wbg.__wbg_toggleAttribute_0d026e5820a28711 = function() { return handleError(function (arg0, arg1, arg2) { - var v0 = getCachedStringFromWasm0(arg1, arg2); - const ret = getObject(arg0).toggleAttribute(v0); - _assertBoolean(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_instanceof_HtmlElement_9e442d53bb553421 = function() { return logError(function (arg0) { - let result; - try { - result = getObject(arg0) instanceof HTMLElement; - } catch { - result = false; - } - const ret = result; - _assertBoolean(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_style_2141664e428fef46 = function() { return logError(function (arg0) { - const ret = getObject(arg0).style; - return addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_animationName_8b08b6b55e2871c3 = function() { return logError(function (arg0, arg1) { - const ret = getObject(arg1).animationName; - const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; -}, arguments) }; -imports.wbg.__wbg_elapsedTime_b9b2848f0ce69c4d = function() { return logError(function (arg0) { - const ret = getObject(arg0).elapsedTime; - return ret; -}, arguments) }; -imports.wbg.__wbg_pseudoElement_489395cbb841b9a8 = function() { return logError(function (arg0, arg1) { - const ret = getObject(arg1).pseudoElement; - const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; -}, arguments) }; -imports.wbg.__wbg_length_5ce97df09b61b986 = function() { return logError(function (arg0) { - const ret = getObject(arg0).length; - _assertNum(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_item_2ab86c1e3cb70ed3 = function() { return logError(function (arg0, arg1) { - const ret = getObject(arg0).item(arg1 >>> 0); - return isLikeNone(ret) ? 0 : addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_screenX_efa7b61dc7fa2efd = function() { return logError(function (arg0) { +imports.wbg.__wbg_screenX_89d33e900365d853 = function() { return logError(function (arg0) { const ret = getObject(arg0).screenX; _assertNum(ret); return ret; }, arguments) }; -imports.wbg.__wbg_screenY_c5e6449919709a69 = function() { return logError(function (arg0) { +imports.wbg.__wbg_screenY_92594aac0d2666d8 = function() { return logError(function (arg0) { const ret = getObject(arg0).screenY; _assertNum(ret); return ret; }, arguments) }; -imports.wbg.__wbg_clientX_35f23f953e04ec0e = function() { return logError(function (arg0) { +imports.wbg.__wbg_clientX_1a01963cb1caa614 = function() { return logError(function (arg0) { const ret = getObject(arg0).clientX; _assertNum(ret); return ret; }, arguments) }; -imports.wbg.__wbg_clientY_8104e462abc0b3ec = function() { return logError(function (arg0) { +imports.wbg.__wbg_clientY_c370190d4150fba9 = function() { return logError(function (arg0) { const ret = getObject(arg0).clientY; _assertNum(ret); return ret; }, arguments) }; -imports.wbg.__wbg_offsetX_413d9f02022e72ad = function() { return logError(function (arg0) { +imports.wbg.__wbg_offsetX_e8c2e5379a90ae29 = function() { return logError(function (arg0) { const ret = getObject(arg0).offsetX; _assertNum(ret); return ret; }, arguments) }; -imports.wbg.__wbg_offsetY_488f80a0a9666028 = function() { return logError(function (arg0) { +imports.wbg.__wbg_offsetY_b8587366f6d36a25 = function() { return logError(function (arg0) { const ret = getObject(arg0).offsetY; _assertNum(ret); return ret; }, arguments) }; -imports.wbg.__wbg_ctrlKey_e1b8f1de1eb24d5d = function() { return logError(function (arg0) { +imports.wbg.__wbg_ctrlKey_643b17aaac67db50 = function() { return logError(function (arg0) { const ret = getObject(arg0).ctrlKey; _assertBoolean(ret); return ret; }, arguments) }; -imports.wbg.__wbg_shiftKey_fdd99b6df96e25c5 = function() { return logError(function (arg0) { +imports.wbg.__wbg_shiftKey_8fb7301f56e7e01c = function() { return logError(function (arg0) { const ret = getObject(arg0).shiftKey; _assertBoolean(ret); return ret; }, arguments) }; -imports.wbg.__wbg_altKey_d531a4d3704557cb = function() { return logError(function (arg0) { +imports.wbg.__wbg_altKey_c6c2a7e797d9a669 = function() { return logError(function (arg0) { const ret = getObject(arg0).altKey; _assertBoolean(ret); return ret; }, arguments) }; -imports.wbg.__wbg_metaKey_934772989e28020c = function() { return logError(function (arg0) { +imports.wbg.__wbg_metaKey_2a8dbd51a3f59e9c = function() { return logError(function (arg0) { const ret = getObject(arg0).metaKey; _assertBoolean(ret); return ret; }, arguments) }; -imports.wbg.__wbg_button_a1c470d5e4c997f2 = function() { return logError(function (arg0) { +imports.wbg.__wbg_button_cd87b6dabbde9631 = function() { return logError(function (arg0) { const ret = getObject(arg0).button; _assertNum(ret); return ret; }, arguments) }; -imports.wbg.__wbg_buttons_42a7b7de33d8e572 = function() { return logError(function (arg0) { +imports.wbg.__wbg_buttons_45faa2de9fb9d23b = function() { return logError(function (arg0) { const ret = getObject(arg0).buttons; _assertNum(ret); return ret; }, arguments) }; -imports.wbg.__wbg_propertyName_e41c6239ffb77f2a = function() { return logError(function (arg0, arg1) { - const ret = getObject(arg1).propertyName; - const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; +imports.wbg.__wbg_getItem_5395a7e200c31e89 = function() { return handleError(function (arg0, arg1, arg2, arg3) { + var v0 = getCachedStringFromWasm0(arg2, arg3); + const ret = getObject(arg1).getItem(v0); + var ptr2 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len2 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len2; + getInt32Memory0()[arg0 / 4 + 0] = ptr2; }, arguments) }; -imports.wbg.__wbg_elapsedTime_6bbd8686761d767f = function() { return logError(function (arg0) { - const ret = getObject(arg0).elapsedTime; +imports.wbg.__wbg_setItem_3786c4c8dd0c9bd0 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { + var v0 = getCachedStringFromWasm0(arg1, arg2); + var v1 = getCachedStringFromWasm0(arg3, arg4); + getObject(arg0).setItem(v0, v1); +}, arguments) }; +imports.wbg.__wbg_top_da9f6cf2fb5b9968 = function() { return logError(function (arg0) { + const ret = getObject(arg0).top; return ret; }, arguments) }; -imports.wbg.__wbg_pseudoElement_589db5e026c64890 = function() { return logError(function (arg0, arg1) { - const ret = getObject(arg1).pseudoElement; - const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; +imports.wbg.__wbg_left_253905e6c5050382 = function() { return logError(function (arg0) { + const ret = getObject(arg0).left; + return ret; +}, arguments) }; +imports.wbg.__wbg_name_bbf9c43b9611377a = function() { return logError(function (arg0, arg1) { + const ret = getObject(arg1).name; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; +}, arguments) }; +imports.wbg.__wbg_sethref_90b000c8b01f96b1 = function() { return handleError(function (arg0, arg1, arg2) { + var v0 = getCachedStringFromWasm0(arg1, arg2); + getObject(arg0).href = v0; +}, arguments) }; +imports.wbg.__wbg_pathname_1ab7e82aaa4511ff = function() { return handleError(function (arg0, arg1) { + const ret = getObject(arg1).pathname; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; +}, arguments) }; +imports.wbg.__wbg_search_9f7ca8896c2d0804 = function() { return handleError(function (arg0, arg1) { + const ret = getObject(arg1).search; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; +}, arguments) }; +imports.wbg.__wbg_width_1ccae8ab185a4192 = function() { return logError(function (arg0) { + const ret = getObject(arg0).width; + return ret; +}, arguments) }; +imports.wbg.__wbg_height_415b4e67932f43c9 = function() { return logError(function (arg0) { + const ret = getObject(arg0).height; + return ret; +}, arguments) }; +imports.wbg.__wbg_result_d1e1134585be8336 = function() { return handleError(function (arg0) { + const ret = getObject(arg0).result; + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_setonload_7edf3cf67d18c0a2 = function() { return logError(function (arg0, arg1) { + getObject(arg0).onload = getObject(arg1); +}, arguments) }; +imports.wbg.__wbg_new_d881a9e329b0c6bb = function() { return handleError(function () { + const ret = new FileReader(); + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_readAsArrayBuffer_a3d6ef46725fe135 = function() { return handleError(function (arg0, arg1) { + getObject(arg0).readAsArrayBuffer(getObject(arg1)); +}, arguments) }; +imports.wbg.__wbg_readAsText_612cb8cf6ffd9437 = function() { return handleError(function (arg0, arg1) { + getObject(arg0).readAsText(getObject(arg1)); +}, arguments) }; +imports.wbg.__wbg_debug_678fc976919895d2 = function() { return logError(function (arg0, arg1, arg2, arg3) { + console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3)); +}, arguments) }; +imports.wbg.__wbg_error_e60eff06f24ab7a4 = function() { return logError(function (arg0) { + console.error(getObject(arg0)); +}, arguments) }; +imports.wbg.__wbg_error_ce00188b70015ed4 = function() { return logError(function (arg0, arg1, arg2, arg3) { + console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3)); +}, arguments) }; +imports.wbg.__wbg_info_7904cb81904ea2ec = function() { return logError(function (arg0, arg1, arg2, arg3) { + console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3)); +}, arguments) }; +imports.wbg.__wbg_log_aaedbaa276606939 = function() { return logError(function (arg0, arg1, arg2, arg3) { + console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3)); +}, arguments) }; +imports.wbg.__wbg_warn_0345511f899411e2 = function() { return logError(function (arg0, arg1, arg2, arg3) { + console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3)); +}, arguments) }; +imports.wbg.__wbg_addEventListener_374cbfd2bbc19ccf = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { + var v0 = getCachedStringFromWasm0(arg1, arg2); + getObject(arg0).addEventListener(v0, getObject(arg3), getObject(arg4)); +}, arguments) }; +imports.wbg.__wbg_removeEventListener_9ece7e86d1135657 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { + var v0 = getCachedStringFromWasm0(arg1, arg2); + getObject(arg0).removeEventListener(v0, getObject(arg3), arg4 !== 0); +}, arguments) }; +imports.wbg.__wbg_setscrollRestoration_3eca3c20ba28871f = function() { return handleError(function (arg0, arg1) { + getObject(arg0).scrollRestoration = takeObject(arg1); +}, arguments) }; +imports.wbg.__wbg_state_ba77b2c3ee29c912 = function() { return handleError(function (arg0) { + const ret = getObject(arg0).state; + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_back_92ad07db64643cad = function() { return handleError(function (arg0) { + getObject(arg0).back(); +}, arguments) }; +imports.wbg.__wbg_forward_c1eec635a1c6af19 = function() { return handleError(function (arg0) { + getObject(arg0).forward(); +}, arguments) }; +imports.wbg.__wbg_pushState_e159043fce8f87bc = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) { + var v0 = getCachedStringFromWasm0(arg2, arg3); + var v1 = getCachedStringFromWasm0(arg4, arg5); + getObject(arg0).pushState(getObject(arg1), v0, v1); +}, arguments) }; +imports.wbg.__wbg_replaceState_b51dd62c7235b1ac = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) { + var v0 = getCachedStringFromWasm0(arg2, arg3); + var v1 = getCachedStringFromWasm0(arg4, arg5); + getObject(arg0).replaceState(getObject(arg1), v0, v1); +}, arguments) }; +imports.wbg.__wbg_pointerId_32f8345c9e0f0ed8 = function() { return logError(function (arg0) { + const ret = getObject(arg0).pointerId; + _assertNum(ret); + return ret; }, arguments) }; -imports.wbg.__wbg_deltaX_b7d127c94d6265c0 = function() { return logError(function (arg0) { +imports.wbg.__wbg_width_d81f90f418b10094 = function() { return logError(function (arg0) { + const ret = getObject(arg0).width; + _assertNum(ret); + return ret; +}, arguments) }; +imports.wbg.__wbg_height_1f0aec13040a28d6 = function() { return logError(function (arg0) { + const ret = getObject(arg0).height; + _assertNum(ret); + return ret; +}, arguments) }; +imports.wbg.__wbg_pressure_b9f7c7decc59eb11 = function() { return logError(function (arg0) { + const ret = getObject(arg0).pressure; + return ret; +}, arguments) }; +imports.wbg.__wbg_tangentialPressure_75648627b43ce0cb = function() { return logError(function (arg0) { + const ret = getObject(arg0).tangentialPressure; + return ret; +}, arguments) }; +imports.wbg.__wbg_tiltX_eaf660d62564dce8 = function() { return logError(function (arg0) { + const ret = getObject(arg0).tiltX; + _assertNum(ret); + return ret; +}, arguments) }; +imports.wbg.__wbg_tiltY_dc18659a75a06a1f = function() { return logError(function (arg0) { + const ret = getObject(arg0).tiltY; + _assertNum(ret); + return ret; +}, arguments) }; +imports.wbg.__wbg_twist_2e3841b5ebc7e59f = function() { return logError(function (arg0) { + const ret = getObject(arg0).twist; + _assertNum(ret); + return ret; +}, arguments) }; +imports.wbg.__wbg_pointerType_07ad77393049c448 = function() { return logError(function (arg0, arg1) { + const ret = getObject(arg1).pointerType; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; +}, arguments) }; +imports.wbg.__wbg_isPrimary_19f3516f3a2a6fa0 = function() { return logError(function (arg0) { + const ret = getObject(arg0).isPrimary; + _assertBoolean(ret); + return ret; +}, arguments) }; +imports.wbg.__wbg_deltaX_03d8f6dcd2e14b63 = function() { return logError(function (arg0) { const ret = getObject(arg0).deltaX; return ret; }, arguments) }; -imports.wbg.__wbg_deltaY_b32fa858e16edcc0 = function() { return logError(function (arg0) { +imports.wbg.__wbg_deltaY_7d9a7eb25f83e193 = function() { return logError(function (arg0) { const ret = getObject(arg0).deltaY; return ret; }, arguments) }; -imports.wbg.__wbg_deltaZ_f74840dd94a2e4c0 = function() { return logError(function (arg0) { +imports.wbg.__wbg_deltaZ_3556e726737898b1 = function() { return logError(function (arg0) { const ret = getObject(arg0).deltaZ; return ret; }, arguments) }; -imports.wbg.__wbg_deltaMode_11f7b19e64d9a515 = function() { return logError(function (arg0) { +imports.wbg.__wbg_deltaMode_5f43eb63f3077df7 = function() { return logError(function (arg0) { const ret = getObject(arg0).deltaMode; _assertNum(ret); return ret; }, arguments) }; -imports.wbg.__wbg_instanceof_HtmlSelectElement_d22585b1943c6b08 = function() { return logError(function (arg0) { +imports.wbg.__wbg_instanceof_HtmlInputElement_e7869aaef9cbb0e6 = function() { return logError(function (arg0) { let result; try { - result = getObject(arg0) instanceof HTMLSelectElement; - } catch { + result = getObject(arg0) instanceof HTMLInputElement; + } catch (_) { result = false; } const ret = result; _assertBoolean(ret); return ret; }, arguments) }; -imports.wbg.__wbg_value_1b15c45090422f7f = function() { return logError(function (arg0, arg1) { - const ret = getObject(arg1).value; - const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; +imports.wbg.__wbg_checked_f46acdc11342a4bd = function() { return logError(function (arg0) { + const ret = getObject(arg0).checked; + _assertBoolean(ret); + return ret; }, arguments) }; -imports.wbg.__wbg_storageArea_e29e7d87c1cd60e8 = function() { return logError(function (arg0) { - const ret = getObject(arg0).storageArea; +imports.wbg.__wbg_files_84acf164900adf19 = function() { return logError(function (arg0) { + const ret = getObject(arg0).files; return isLikeNone(ret) ? 0 : addHeapObject(ret); }, arguments) }; -imports.wbg.__wbg_altKey_088afaf4c4a6fe7c = function() { return logError(function (arg0) { - const ret = getObject(arg0).altKey; - _assertBoolean(ret); - return ret; +imports.wbg.__wbg_type_2a81047eef6840e7 = function() { return logError(function (arg0, arg1) { + const ret = getObject(arg1).type; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; }, arguments) }; -imports.wbg.__wbg_metaKey_69f3ca388ab2c6b2 = function() { return logError(function (arg0) { - const ret = getObject(arg0).metaKey; - _assertBoolean(ret); - return ret; +imports.wbg.__wbg_value_e024243a9dae20bc = function() { return logError(function (arg0, arg1) { + const ret = getObject(arg1).value; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; }, arguments) }; -imports.wbg.__wbg_ctrlKey_011662ff21669501 = function() { return logError(function (arg0) { - const ret = getObject(arg0).ctrlKey; - _assertBoolean(ret); - return ret; +imports.wbg.__wbg_animationName_c19e2ad610c32d6d = function() { return logError(function (arg0, arg1) { + const ret = getObject(arg1).animationName; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; }, arguments) }; -imports.wbg.__wbg_shiftKey_5472f6ec6b0da088 = function() { return logError(function (arg0) { - const ret = getObject(arg0).shiftKey; - _assertBoolean(ret); +imports.wbg.__wbg_elapsedTime_9063a1f5267069fd = function() { return logError(function (arg0) { + const ret = getObject(arg0).elapsedTime; return ret; }, arguments) }; -imports.wbg.__wbg_type_1dff9d19be2750ce = function() { return logError(function (arg0, arg1) { +imports.wbg.__wbg_pseudoElement_5940ef718db987d8 = function() { return logError(function (arg0, arg1) { + const ret = getObject(arg1).pseudoElement; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; +}, arguments) }; +imports.wbg.__wbg_type_7728453479ee70f4 = function() { return logError(function (arg0, arg1) { const ret = getObject(arg1).type; - const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; }, arguments) }; -imports.wbg.__wbg_target_b629c177f9bee3da = function() { return logError(function (arg0) { +imports.wbg.__wbg_target_52ddf6955f636bf5 = function() { return logError(function (arg0) { const ret = getObject(arg0).target; return isLikeNone(ret) ? 0 : addHeapObject(ret); }, arguments) }; -imports.wbg.__wbg_preventDefault_16b2170b12f56317 = function() { return logError(function (arg0) { +imports.wbg.__wbg_preventDefault_7f821f72e7c6b5d4 = function() { return logError(function (arg0) { getObject(arg0).preventDefault(); }, arguments) }; -imports.wbg.__wbg_addEventListener_cf5b03cd29763277 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { - var v0 = getCachedStringFromWasm0(arg1, arg2); - getObject(arg0).addEventListener(v0, getObject(arg3), getObject(arg4)); +imports.wbg.__wbg_length_c8f895dad5ec94df = function() { return logError(function (arg0) { + const ret = getObject(arg0).length; + _assertNum(ret); + return ret; }, arguments) }; -imports.wbg.__wbg_removeEventListener_b25f5db74f767386 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { - var v0 = getCachedStringFromWasm0(arg1, arg2); - getObject(arg0).removeEventListener(v0, getObject(arg3), arg4 !== 0); +imports.wbg.__wbg_item_312a88e5ba8832a5 = function() { return logError(function (arg0, arg1) { + const ret = getObject(arg0).item(arg1 >>> 0); + return isLikeNone(ret) ? 0 : addHeapObject(ret); }, arguments) }; -imports.wbg.__wbg_altKey_dff2a075455ac01b = function() { return logError(function (arg0) { - const ret = getObject(arg0).altKey; +imports.wbg.__wbg_instanceof_Node_b3f418be312abe25 = function() { return logError(function (arg0) { + let result; + try { + result = getObject(arg0) instanceof Node; + } catch (_) { + result = false; + } + const ret = result; _assertBoolean(ret); return ret; }, arguments) }; -imports.wbg.__wbg_ctrlKey_993b558f853d64ce = function() { return logError(function (arg0) { - const ret = getObject(arg0).ctrlKey; - _assertBoolean(ret); - return ret; +imports.wbg.__wbg_parentElement_72e144c2e8d9e0b5 = function() { return logError(function (arg0) { + const ret = getObject(arg0).parentElement; + return isLikeNone(ret) ? 0 : addHeapObject(ret); }, arguments) }; -imports.wbg.__wbg_shiftKey_31e62e9d172b26f0 = function() { return logError(function (arg0) { - const ret = getObject(arg0).shiftKey; - _assertBoolean(ret); - return ret; +imports.wbg.__wbg_textContent_2f37235e13f8484b = function() { return logError(function (arg0, arg1) { + const ret = getObject(arg1).textContent; + var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; }, arguments) }; -imports.wbg.__wbg_metaKey_9f0f19692d0498bd = function() { return logError(function (arg0) { - const ret = getObject(arg0).metaKey; - _assertBoolean(ret); - return ret; +imports.wbg.__wbg_appendChild_d30e6b83791d04c0 = function() { return handleError(function (arg0, arg1) { + const ret = getObject(arg0).appendChild(getObject(arg1)); + return addHeapObject(ret); }, arguments) }; -imports.wbg.__wbg_location_e0f6bf3e5e23180a = function() { return logError(function (arg0) { - const ret = getObject(arg0).location; - _assertNum(ret); +imports.wbg.__wbg_storageArea_d7d735a70823f1ab = function() { return logError(function (arg0) { + const ret = getObject(arg0).storageArea; + return isLikeNone(ret) ? 0 : addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_propertyName_77de8558dcc64081 = function() { return logError(function (arg0, arg1) { + const ret = getObject(arg1).propertyName; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; +}, arguments) }; +imports.wbg.__wbg_elapsedTime_882bd08fe9dac23e = function() { return logError(function (arg0) { + const ret = getObject(arg0).elapsedTime; return ret; }, arguments) }; -imports.wbg.__wbg_repeat_7ef48474c78e74bd = function() { return logError(function (arg0) { - const ret = getObject(arg0).repeat; +imports.wbg.__wbg_pseudoElement_a7506243b6b8f12a = function() { return logError(function (arg0, arg1) { + const ret = getObject(arg1).pseudoElement; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; +}, arguments) }; +imports.wbg.__wbg_instanceof_HtmlTextAreaElement_ce81e455dc21bc93 = function() { return logError(function (arg0) { + let result; + try { + result = getObject(arg0) instanceof HTMLTextAreaElement; + } catch (_) { + result = false; + } + const ret = result; _assertBoolean(ret); return ret; }, arguments) }; -imports.wbg.__wbg_key_f0decac219aa904b = function() { return logError(function (arg0, arg1) { - const ret = getObject(arg1).key; - const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; +imports.wbg.__wbg_value_57e57170f6952449 = function() { return logError(function (arg0, arg1) { + const ret = getObject(arg1).value; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; }, arguments) }; -imports.wbg.__wbg_code_aed21120de275a12 = function() { return logError(function (arg0, arg1) { - const ret = getObject(arg1).code; - const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; +imports.wbg.__wbg_instanceof_HtmlFormElement_7d89e65c39841f5c = function() { return logError(function (arg0) { + let result; + try { + result = getObject(arg0) instanceof HTMLFormElement; + } catch (_) { + result = false; + } + const ret = result; + _assertBoolean(ret); + return ret; }, arguments) }; -imports.wbg.__wbg_instanceof_Node_abf5312af68f179e = function() { return logError(function (arg0) { +imports.wbg.__wbg_instanceof_HtmlSelectElement_2d43d9e14dd8e866 = function() { return logError(function (arg0) { let result; try { - result = getObject(arg0) instanceof Node; - } catch { + result = getObject(arg0) instanceof HTMLSelectElement; + } catch (_) { result = false; } const ret = result; _assertBoolean(ret); return ret; }, arguments) }; -imports.wbg.__wbg_parentElement_0e8c9afce5cb9d6e = function() { return logError(function (arg0) { - const ret = getObject(arg0).parentElement; - return isLikeNone(ret) ? 0 : addHeapObject(ret); +imports.wbg.__wbg_value_30ed7fed7e3a14ba = function() { return logError(function (arg0, arg1) { + const ret = getObject(arg1).value; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; }, arguments) }; -imports.wbg.__wbg_textContent_dff59ad5e030bb86 = function() { return logError(function (arg0, arg1) { - const ret = getObject(arg1).textContent; - var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; +imports.wbg.__wbg_charCodeAt_ae37a5e09da14dab = function() { return logError(function (arg0, arg1) { + const ret = getObject(arg0).charCodeAt(arg1 >>> 0); + return ret; }, arguments) }; -imports.wbg.__wbg_appendChild_b8199dc1655c852d = function() { return handleError(function (arg0, arg1) { - const ret = getObject(arg0).appendChild(getObject(arg1)); +imports.wbg.__wbg_get_f01601b5a68d10e3 = function() { return logError(function (arg0, arg1) { + const ret = getObject(arg0)[arg1 >>> 0]; return addHeapObject(ret); }, arguments) }; -imports.wbg.__wbg_debug_7960d327fd96f71a = function() { return logError(function (arg0, arg1, arg2, arg3) { - console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3)); +imports.wbg.__wbg_length_1009b1af0c481d7b = function() { return logError(function (arg0) { + const ret = getObject(arg0).length; + _assertNum(ret); + return ret; }, arguments) }; -imports.wbg.__wbg_error_fe807da27c4a4ced = function() { return logError(function (arg0) { - console.error(getObject(arg0)); +imports.wbg.__wbg_new_ffc6d4d085022169 = function() { return logError(function () { + const ret = new Array(); + return addHeapObject(ret); }, arguments) }; -imports.wbg.__wbg_error_fd84ca2a8a977774 = function() { return logError(function (arg0, arg1, arg2, arg3) { - console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3)); +imports.wbg.__wbg_newnoargs_c62ea9419c21fbac = function() { return logError(function (arg0, arg1) { + var v0 = getCachedStringFromWasm0(arg0, arg1); + const ret = new Function(v0); + return addHeapObject(ret); }, arguments) }; -imports.wbg.__wbg_info_5566be377f5b52ae = function() { return logError(function (arg0, arg1, arg2, arg3) { - console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3)); +imports.wbg.__wbg_new_bfd4534b584a9593 = function() { return logError(function () { + const ret = new Map(); + return addHeapObject(ret); }, arguments) }; -imports.wbg.__wbg_log_7b690f184ae4519b = function() { return logError(function (arg0, arg1, arg2, arg3) { - console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3)); +imports.wbg.__wbg_next_9b877f231f476d01 = function() { return logError(function (arg0) { + const ret = getObject(arg0).next; + return addHeapObject(ret); }, arguments) }; -imports.wbg.__wbg_warn_48cbddced45e5414 = function() { return logError(function (arg0, arg1, arg2, arg3) { - console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3)); +imports.wbg.__wbg_next_6529ee0cca8d57ed = function() { return handleError(function (arg0) { + const ret = getObject(arg0).next(); + return addHeapObject(ret); }, arguments) }; -imports.wbg.__wbg_newnoargs_2b8b6bd7753c76ba = function() { return logError(function (arg0, arg1) { - var v0 = getCachedStringFromWasm0(arg0, arg1); - const ret = new Function(v0); +imports.wbg.__wbg_done_5fe336b092d60cf2 = function() { return logError(function (arg0) { + const ret = getObject(arg0).done; + _assertBoolean(ret); + return ret; +}, arguments) }; +imports.wbg.__wbg_value_0c248a78fdc8e19f = function() { return logError(function (arg0) { + const ret = getObject(arg0).value; + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_iterator_db7ca081358d4fb2 = function() { return logError(function () { + const ret = Symbol.iterator; return addHeapObject(ret); }, arguments) }; -imports.wbg.__wbg_call_95d1ea488d03e4e8 = function() { return handleError(function (arg0, arg1) { +imports.wbg.__wbg_get_7b48513de5dc5ea4 = function() { return handleError(function (arg0, arg1) { + const ret = Reflect.get(getObject(arg0), getObject(arg1)); + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_call_90c26b09837aba1c = function() { return handleError(function (arg0, arg1) { const ret = getObject(arg0).call(getObject(arg1)); return addHeapObject(ret); }, arguments) }; -imports.wbg.__wbg_new_f9876326328f45ed = function() { return logError(function () { +imports.wbg.__wbg_new_9fb8d994e1c0aaac = function() { return logError(function () { const ret = new Object(); return addHeapObject(ret); }, arguments) }; -imports.wbg.__wbg_self_e7c1f827057f6584 = function() { return handleError(function () { +imports.wbg.__wbg_length_36658cb09b6ec34a = function() { return logError(function (arg0) { + const ret = getObject(arg0).length; + _assertNum(ret); + return ret; +}, arguments) }; +imports.wbg.__wbg_self_f0e34d89f33b99fd = function() { return handleError(function () { const ret = self.self; return addHeapObject(ret); }, arguments) }; -imports.wbg.__wbg_window_a09ec664e14b1b81 = function() { return handleError(function () { +imports.wbg.__wbg_window_d3b084224f4774d7 = function() { return handleError(function () { const ret = window.window; return addHeapObject(ret); }, arguments) }; -imports.wbg.__wbg_globalThis_87cbb8506fecf3a9 = function() { return handleError(function () { +imports.wbg.__wbg_globalThis_9caa27ff917c6860 = function() { return handleError(function () { const ret = globalThis.globalThis; return addHeapObject(ret); }, arguments) }; -imports.wbg.__wbg_global_c85a9259e621f3db = function() { return handleError(function () { +imports.wbg.__wbg_global_35dfdd59a4da3e74 = function() { return handleError(function () { const ret = global.global; return addHeapObject(ret); }, arguments) }; -imports.wbg.__wbindgen_is_undefined = function(arg0) { - const ret = getObject(arg0) === undefined; +imports.wbg.__wbg_eval_0b93354704a20351 = function() { return handleError(function (arg0, arg1) { + var v0 = getCachedStringFromWasm0(arg0, arg1); + const ret = eval(v0); + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_set_f2740edb12e318cd = function() { return logError(function (arg0, arg1, arg2) { + getObject(arg0)[arg1 >>> 0] = takeObject(arg2); +}, arguments) }; +imports.wbg.__wbg_isArray_74fb723e24f76012 = function() { return logError(function (arg0) { + const ret = Array.isArray(getObject(arg0)); _assertBoolean(ret); return ret; -}; -imports.wbg.__wbg_eval_be0434aab6074e1e = function() { return handleError(function (arg0, arg1) { +}, arguments) }; +imports.wbg.__wbg_push_901f3914205d44de = function() { return logError(function (arg0, arg1) { + const ret = getObject(arg0).push(getObject(arg1)); + _assertNum(ret); + return ret; +}, arguments) }; +imports.wbg.__wbg_instanceof_ArrayBuffer_e7d53d51371448e2 = function() { return logError(function (arg0) { + let result; + try { + result = getObject(arg0) instanceof ArrayBuffer; + } catch (_) { + result = false; + } + const ret = result; + _assertBoolean(ret); + return ret; +}, arguments) }; +imports.wbg.__wbg_newwithargs_7224eea6ed10c1a3 = function() { return logError(function (arg0, arg1, arg2, arg3) { var v0 = getCachedStringFromWasm0(arg0, arg1); - const ret = eval(v0); + var v1 = getCachedStringFromWasm0(arg2, arg3); + const ret = new Function(v0, v1); + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_call_5da1969d7cd31ccd = function() { return handleError(function (arg0, arg1, arg2) { + const ret = getObject(arg0).call(getObject(arg1), getObject(arg2)); + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_set_d257c6f2da008627 = function() { return logError(function (arg0, arg1, arg2) { + const ret = getObject(arg0).set(getObject(arg1), getObject(arg2)); + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_entries_eae7e542df1a4316 = function() { return logError(function (arg0) { + const ret = getObject(arg0).entries(); return addHeapObject(ret); }, arguments) }; -imports.wbg.__wbg_getTime_7c59072d1651a3cf = function() { return logError(function (arg0) { +imports.wbg.__wbg_isSafeInteger_f93fde0dca9820f8 = function() { return logError(function (arg0) { + const ret = Number.isSafeInteger(getObject(arg0)); + _assertBoolean(ret); + return ret; +}, arguments) }; +imports.wbg.__wbg_getTime_9272be78826033e1 = function() { return logError(function (arg0) { const ret = getObject(arg0).getTime(); return ret; }, arguments) }; -imports.wbg.__wbg_getTimezoneOffset_2a6b27fb18493a56 = function() { return logError(function (arg0) { +imports.wbg.__wbg_getTimezoneOffset_e742a5098e2c04d3 = function() { return logError(function (arg0) { const ret = getObject(arg0).getTimezoneOffset(); return ret; }, arguments) }; -imports.wbg.__wbg_new0_25059e40b1c02766 = function() { return logError(function () { +imports.wbg.__wbg_new_d77fabdc03b9edd6 = function() { return logError(function (arg0) { + const ret = new Date(getObject(arg0)); + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_new0_622c21a64f3d83ea = function() { return logError(function () { const ret = new Date(); return addHeapObject(ret); }, arguments) }; -imports.wbg.__wbg_is_8f1618fe9a4fd388 = function() { return logError(function (arg0, arg1) { +imports.wbg.__wbg_entries_9e2e2aa45aa5094a = function() { return logError(function (arg0) { + const ret = Object.entries(getObject(arg0)); + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_is_ff7acd231c75c0e4 = function() { return logError(function (arg0, arg1) { const ret = Object.is(getObject(arg0), getObject(arg1)); _assertBoolean(ret); return ret; }, arguments) }; -imports.wbg.__wbg_resolve_fd40f858d9db1a04 = function() { return logError(function (arg0) { +imports.wbg.__wbg_resolve_6e1c6553a82f85b7 = function() { return logError(function (arg0) { const ret = Promise.resolve(getObject(arg0)); return addHeapObject(ret); }, arguments) }; -imports.wbg.__wbg_then_ec5db6d509eb475f = function() { return logError(function (arg0, arg1) { +imports.wbg.__wbg_then_3ab08cd4fbb91ae9 = function() { return logError(function (arg0, arg1) { const ret = getObject(arg0).then(getObject(arg1)); return addHeapObject(ret); }, arguments) }; -imports.wbg.__wbg_set_6aa458a4ebdb65cb = function() { return handleError(function (arg0, arg1, arg2) { +imports.wbg.__wbg_buffer_a448f833075b71ba = function() { return logError(function (arg0) { + const ret = getObject(arg0).buffer; + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_new_8f67e318f15d7254 = function() { return logError(function (arg0) { + const ret = new Uint8Array(getObject(arg0)); + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbg_set_2357bf09366ee480 = function() { return logError(function (arg0, arg1, arg2) { + getObject(arg0).set(getObject(arg1), arg2 >>> 0); +}, arguments) }; +imports.wbg.__wbg_length_1d25fa9e4ac21ce7 = function() { return logError(function (arg0) { + const ret = getObject(arg0).length; + _assertNum(ret); + return ret; +}, arguments) }; +imports.wbg.__wbg_instanceof_Uint8Array_bced6f43aed8c1aa = function() { return logError(function (arg0) { + let result; + try { + result = getObject(arg0) instanceof Uint8Array; + } catch (_) { + result = false; + } + const ret = result; + _assertBoolean(ret); + return ret; +}, arguments) }; +imports.wbg.__wbg_set_759f75cd92b612d2 = function() { return handleError(function (arg0, arg1, arg2) { const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2)); _assertBoolean(ret); return ret; }, arguments) }; +imports.wbg.__wbg_stringify_e1b19966d964d242 = function() { return handleError(function (arg0) { + const ret = JSON.stringify(getObject(arg0)); + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) { + const v = getObject(arg1); + const ret = typeof(v) === 'bigint' ? v : undefined; + if (!isLikeNone(ret)) { + _assertBigInt(ret); + } + getBigInt64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? BigInt(0) : ret; + getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret); +}; imports.wbg.__wbindgen_debug_string = function(arg0, arg1) { const ret = debugString(getObject(arg1)); - const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - getInt32Memory0()[arg0 / 4 + 1] = len0; - getInt32Memory0()[arg0 / 4 + 0] = ptr0; + const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + getInt32Memory0()[arg0 / 4 + 1] = len1; + getInt32Memory0()[arg0 / 4 + 0] = ptr1; }; imports.wbg.__wbindgen_throw = function(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); @@ -1011,34 +1451,52 @@ imports.wbg.__wbindgen_memory = function() { const ret = wasm.memory; return addHeapObject(ret); }; -imports.wbg.__wbindgen_closure_wrapper349 = function() { return logError(function (arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 162, __wbg_adapter_18); +imports.wbg.__wbindgen_closure_wrapper340 = function() { return logError(function (arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 152, __wbg_adapter_48); + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbindgen_closure_wrapper618 = function() { return logError(function (arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 296, __wbg_adapter_51); return addHeapObject(ret); }, arguments) }; -imports.wbg.__wbindgen_closure_wrapper461 = function() { return logError(function (arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 224, __wbg_adapter_21); +imports.wbg.__wbindgen_closure_wrapper619 = function() { return logError(function (arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 296, __wbg_adapter_54); return addHeapObject(ret); }, arguments) }; -imports.wbg.__wbindgen_closure_wrapper663 = function() { return logError(function (arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 282, __wbg_adapter_24); +imports.wbg.__wbindgen_closure_wrapper620 = function() { return logError(function (arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 296, __wbg_adapter_57); return addHeapObject(ret); }, arguments) }; -imports.wbg.__wbindgen_closure_wrapper774 = function() { return logError(function (arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 333, __wbg_adapter_27); +imports.wbg.__wbindgen_closure_wrapper924 = function() { return logError(function (arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 391, __wbg_adapter_60); return addHeapObject(ret); }, arguments) }; -imports['./snippets/dioxus-interpreter-js-1676574062e4c953/inline0.js'] = __wbg_star0; +imports.wbg.__wbindgen_closure_wrapper1062 = function() { return logError(function (arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 456, __wbg_adapter_63); + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbindgen_closure_wrapper1152 = function() { return logError(function (arg0, arg1, arg2) { + const ret = makeClosure(arg0, arg1, 490, __wbg_adapter_66); + return addHeapObject(ret); +}, arguments) }; +imports.wbg.__wbindgen_closure_wrapper1208 = function() { return logError(function (arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 523, __wbg_adapter_69); + return addHeapObject(ret); +}, arguments) }; +imports['./snippets/dioxus-interpreter-js-85a0a2f8acce2e86/inline0.js'] = __wbg_star0; return imports; } -function initMemory(imports, maybe_memory) { +function __wbg_init_memory(imports, maybe_memory) { } -function finalizeInit(instance, module) { +function __wbg_finalize_init(instance, module) { wasm = instance.exports; - init.__wbindgen_wasm_module = module; + __wbg_init.__wbindgen_wasm_module = module; + cachedBigInt64Memory0 = null; + cachedFloat64Memory0 = null; cachedInt32Memory0 = null; cachedUint32Memory0 = null; cachedUint8Memory0 = null; @@ -1048,9 +1506,11 @@ function finalizeInit(instance, module) { } function initSync(module) { - const imports = getImports(); + if (wasm !== undefined) return wasm; + + const imports = __wbg_get_imports(); - initMemory(imports); + __wbg_init_memory(imports); if (!(module instanceof WebAssembly.Module)) { module = new WebAssembly.Module(module); @@ -1058,23 +1518,25 @@ function initSync(module) { const instance = new WebAssembly.Instance(module, imports); - return finalizeInit(instance, module); + return __wbg_finalize_init(instance, module); } -async function init(input) { +async function __wbg_init(input) { + if (wasm !== undefined) return wasm; + - const imports = getImports(); + const imports = __wbg_get_imports(); if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) { input = fetch(input); } - initMemory(imports); + __wbg_init_memory(imports); - const { instance, module } = await load(await input, imports); + const { instance, module } = await __wbg_load(await input, imports); - return finalizeInit(instance, module); + return __wbg_finalize_init(instance, module); } export { initSync } -export default init; +export default __wbg_init; diff --git a/assets/dioxus/dioxus-starter_bg.wasm b/assets/dioxus/dioxus-starter_bg.wasm index 439caba..2c08e04 100644 Binary files a/assets/dioxus/dioxus-starter_bg.wasm and b/assets/dioxus/dioxus-starter_bg.wasm differ diff --git a/assets/dioxus/snippets/dioxus-interpreter-js-85a0a2f8acce2e86/inline0.js b/assets/dioxus/snippets/dioxus-interpreter-js-85a0a2f8acce2e86/inline0.js new file mode 100644 index 0000000..ab27e2d --- /dev/null +++ b/assets/dioxus/snippets/dioxus-interpreter-js-85a0a2f8acce2e86/inline0.js @@ -0,0 +1,301 @@ +let m,p,ls,d,t,op,i,e,z,metaflags; + + class ListenerMap { + constructor(root) { + // bubbling events can listen at the root element + this.global = {}; + // non bubbling events listen at the element the listener was created at + this.local = {}; + this.root = null; + this.handler = null; + } + + create(event_name, element, bubbles) { + if (bubbles) { + if (this.global[event_name] === undefined) { + this.global[event_name] = {}; + this.global[event_name].active = 1; + this.root.addEventListener(event_name, this.handler); + } else { + this.global[event_name].active++; + } + } + else { + const id = element.getAttribute("data-dioxus-id"); + if (!this.local[id]) { + this.local[id] = {}; + } + element.addEventListener(event_name, this.handler); + } + } + + remove(element, event_name, bubbles) { + if (bubbles) { + this.global[event_name].active--; + if (this.global[event_name].active === 0) { + this.root.removeEventListener(event_name, this.global[event_name].callback); + delete this.global[event_name]; + } + } + else { + const id = element.getAttribute("data-dioxus-id"); + delete this.local[id][event_name]; + if (this.local[id].length === 0) { + delete this.local[id]; + } + element.removeEventListener(event_name, this.handler); + } + } + + removeAllNonBubbling(element) { + const id = element.getAttribute("data-dioxus-id"); + delete this.local[id]; + } + } + function SetAttributeInner(node, field, value, ns) { + const name = field; + if (ns === "style") { + // ????? why do we need to do this + if (node.style === undefined) { + node.style = {}; + } + node.style[name] = value; + } else if (ns !== null && ns !== undefined && ns !== "") { + node.setAttributeNS(ns, name, value); + } else { + switch (name) { + case "value": + if (value !== node.value) { + node.value = value; + } + break; + case "initial_value": + node.defaultValue = value; + break; + case "checked": + node.checked = truthy(value); + break; + case "initial_checked": + node.defaultChecked = truthy(value); + break; + case "selected": + node.selected = truthy(value); + break; + case "initial_selected": + node.defaultSelected = truthy(value); + break; + case "dangerous_inner_html": + node.innerHTML = value; + break; + default: + // https://github.com/facebook/react/blob/8b88ac2592c5f555f315f9440cbb665dd1e7457a/packages/react-dom/src/shared/DOMProperty.js#L352-L364 + if (!truthy(value) && bool_attrs.hasOwnProperty(name)) { + node.removeAttribute(name); + } else { + node.setAttribute(name, value); + } + } + } + } + function LoadChild(ptr, len) { + // iterate through each number and get that child + node = stack[stack.length - 1]; + ptr_end = ptr + len; + for (; ptr < ptr_end; ptr++) { + end = m.getUint8(ptr); + for (node = node.firstChild; end > 0; end--) { + node = node.nextSibling; + } + } + return node; + } + const listeners = new ListenerMap(); + let nodes = []; + let stack = []; + let root; + const templates = {}; + let node, els, end, ptr_end, k; + export function save_template(nodes, tmpl_id) { + templates[tmpl_id] = nodes; + } + export function set_node(id, node) { + nodes[id] = node; + } + export function get_node(id) { + return nodes[id]; + } + export function initilize(root, handler) { + listeners.handler = handler; + nodes = [root]; + stack = [root]; + listeners.root = root; + } + function AppendChildren(id, many){ + root = nodes[id]; + els = stack.splice(stack.length-many); + for (k = 0; k < many; k++) { + root.appendChild(els[k]); + } + } + const bool_attrs = { + allowfullscreen: true, + allowpaymentrequest: true, + async: true, + autofocus: true, + autoplay: true, + checked: true, + controls: true, + default: true, + defer: true, + disabled: true, + formnovalidate: true, + hidden: true, + ismap: true, + itemscope: true, + loop: true, + multiple: true, + muted: true, + nomodule: true, + novalidate: true, + open: true, + playsinline: true, + readonly: true, + required: true, + reversed: true, + selected: true, + truespeed: true, + webkitdirectory: true, + }; + function truthy(val) { + return val === "true" || val === true; + } + const evt = []; + let evt_tmp1, evt_tmp2; + function get_evt() { + evt_tmp2 = u8buf[u8bufp++]; + if(evt_tmp2 & 128){ + evt_tmp1=s.substring(sp,sp+=u8buf[u8bufp++]); + evt[evt_tmp2&4294967167]=evt_tmp1; + return evt_tmp1; + } + else{ + return evt[evt_tmp2&4294967167]; + } + }const attr = []; + let attr_tmp1, attr_tmp2; + function get_attr() { + attr_tmp2 = u8buf[u8bufp++]; + if(attr_tmp2 & 128){ + attr_tmp1=s.substring(sp,sp+=u8buf[u8bufp++]); + attr[attr_tmp2&4294967167]=attr_tmp1; + return attr_tmp1; + } + else{ + return attr[attr_tmp2&4294967167]; + } + }const ns_cache = []; + let ns_cache_tmp1, ns_cache_tmp2; + function get_ns_cache() { + ns_cache_tmp2 = u8buf[u8bufp++]; + if(ns_cache_tmp2 & 128){ + ns_cache_tmp1=s.substring(sp,sp+=u8buf[u8bufp++]); + ns_cache[ns_cache_tmp2&4294967167]=ns_cache_tmp1; + return ns_cache_tmp1; + } + else{ + return ns_cache[ns_cache_tmp2&4294967167]; + } + }let u32buf,u32bufp;let s = "";let lsp,sp,sl; let c = new TextDecoder();let u8buf,u8bufp; + let event_name,field,len,ns,bubbles,ptr,id,value; + export function create(r){ + d=r; + } + export function update_memory(b){ + m=new DataView(b.buffer) + } + export function run(){ + metaflags=m.getUint32(d,true); + if((metaflags>>>12)&1){ + ls=m.getUint32(d+12*4,true); + } + p=ls; + if ((metaflags>>>3)&1){ + u32buf=new Uint32Array(m.buffer,m.getUint32(d+3*4,true)) + } + u32bufp=0;if (metaflags&1){ + lsp = m.getUint32(d+1*4,true); + } + if ((metaflags>>>2)&1) { + sl = m.getUint32(d+2*4,true); + if ((metaflags>>>1)&1) { + sp = lsp; + s = ""; + e = sp + ((sl / 4) | 0) * 4; + while (sp < e) { + t = m.getUint32(sp, true); + s += String.fromCharCode( + t & 255, + (t & 65280) >> 8, + (t & 16711680) >> 16, + t >> 24 + ); + sp += 4; + } + while (sp < lsp + sl) { + s += String.fromCharCode(m.getUint8(sp++)); + } + } else { + s = c.decode(new DataView(m.buffer, lsp, sl)); + } + } + sp=0;if ((metaflags>>>5)&1){ + u8buf=new Uint8Array(m.buffer,m.getUint32(d+5*4,true)) + } + u8bufp=0; + for(;;){ + op=m.getUint32(p,true); + p+=4; + z=0; + while(z++<4){ + switch(op&255){ + case 0:{AppendChildren(root, stack.length-1);}break;case 1:{stack.push(nodes[u32buf[u32bufp++]]);}break;case 2:{AppendChildren(u32buf[u32bufp++], u32buf[u32bufp++]);}break;case 3:{stack.pop();}break;case 4:{root = nodes[u32buf[u32bufp++]]; els = stack.splice(stack.length-u32buf[u32bufp++]); if (root.listening) { listeners.removeAllNonBubbling(root); } root.replaceWith(...els);}break;case 5:{nodes[u32buf[u32bufp++]].after(...stack.splice(stack.length-u32buf[u32bufp++]));}break;case 6:{nodes[u32buf[u32bufp++]].before(...stack.splice(stack.length-u32buf[u32bufp++]));}break;case 7:{node = nodes[u32buf[u32bufp++]]; if (node !== undefined) { if (node.listening) { listeners.removeAllNonBubbling(node); } node.remove(); }}break;case 8:{stack.push(document.createTextNode(s.substring(sp,sp+=u32buf[u32bufp++])));}break;case 9:{node = document.createTextNode(s.substring(sp,sp+=u32buf[u32bufp++])); nodes[u32buf[u32bufp++]] = node; stack.push(node);}break;case 10:{node = document.createElement('pre'); node.hidden = true; stack.push(node); nodes[u32buf[u32bufp++]] = node;}break;case 11:event_name=get_evt();id=u32buf[u32bufp++];bubbles=u8buf[u8bufp++];node = nodes[id]; if(node.listening){node.listening += 1;}else{node.listening = 1;} node.setAttribute('data-dioxus-id', `${id}`); listeners.create(event_name, node, bubbles);break;case 12:{node = nodes[u32buf[u32bufp++]]; node.listening -= 1; node.removeAttribute('data-dioxus-id'); listeners.remove(node, get_evt(), u8buf[u8bufp++]);}break;case 13:{nodes[u32buf[u32bufp++]].textContent = s.substring(sp,sp+=u32buf[u32bufp++]);}break;case 14:{node = nodes[u32buf[u32bufp++]]; SetAttributeInner(node, get_attr(), s.substring(sp,sp+=u32buf[u32bufp++]), get_ns_cache());}break;case 15:id=u32buf[u32bufp++];field=get_attr();ns=get_ns_cache();{ + node = nodes[id]; + if (!ns) { + switch (field) { + case "value": + node.value = ""; + break; + case "checked": + node.checked = false; + break; + case "selected": + node.selected = false; + break; + case "dangerous_inner_html": + node.innerHTML = ""; + break; + default: + node.removeAttribute(field); + break; + } + } else if (ns == "style") { + node.style.removeProperty(name); + } else { + node.removeAttributeNS(ns, field); + } + }break;case 16:{nodes[u32buf[u32bufp++]] = LoadChild(u32buf[u32bufp++], u8buf[u8bufp++]);}break;case 17:ptr=u32buf[u32bufp++];len=u8buf[u8bufp++];value=s.substring(sp,sp+=u32buf[u32bufp++]);id=u32buf[u32bufp++];{ + node = LoadChild(ptr, len); + if (node.nodeType == Node.TEXT_NODE) { + node.textContent = value; + } else { + let text = document.createTextNode(value); + node.replaceWith(text); + node = text; + } + nodes[id] = node; + }break;case 18:{els = stack.splice(stack.length - u32buf[u32bufp++]); node = LoadChild(u32buf[u32bufp++], u8buf[u8bufp++]); node.replaceWith(...els);}break;case 19:{node = templates[u32buf[u32bufp++]][u32buf[u32bufp++]].cloneNode(true); nodes[u32buf[u32bufp++]] = node; stack.push(node);}break;case 20:return true; + } + op>>>=8; + } + } + } \ No newline at end of file diff --git a/assets/dioxus/snippets/dioxus-interpreter-js-85a0a2f8acce2e86/src/common.js b/assets/dioxus/snippets/dioxus-interpreter-js-85a0a2f8acce2e86/src/common.js new file mode 100644 index 0000000..3745e8c --- /dev/null +++ b/assets/dioxus/snippets/dioxus-interpreter-js-85a0a2f8acce2e86/src/common.js @@ -0,0 +1,79 @@ +const bool_attrs = { + allowfullscreen: true, + allowpaymentrequest: true, + async: true, + autofocus: true, + autoplay: true, + checked: true, + controls: true, + default: true, + defer: true, + disabled: true, + formnovalidate: true, + hidden: true, + ismap: true, + itemscope: true, + loop: true, + multiple: true, + muted: true, + nomodule: true, + novalidate: true, + open: true, + playsinline: true, + readonly: true, + required: true, + reversed: true, + selected: true, + truespeed: true, + webkitdirectory: true, +}; + +export function setAttributeInner(node, field, value, ns) { + const name = field; + if (ns === "style") { + // ????? why do we need to do this + if (node.style === undefined) { + node.style = {}; + } + node.style[name] = value; + } else if (ns != null && ns != undefined) { + node.setAttributeNS(ns, name, value); + } else { + switch (name) { + case "value": + if (value !== node.value) { + node.value = value; + } + break; + case "initial_value": + node.defaultValue = value; + break; + case "checked": + node.checked = truthy(value); + break; + case "initial_checked": + node.defaultChecked = truthy(value); + break; + case "selected": + node.selected = truthy(value); + break; + case "initial_selected": + node.defaultSelected = truthy(value); + break; + case "dangerous_inner_html": + node.innerHTML = value; + break; + default: + // https://github.com/facebook/react/blob/8b88ac2592c5f555f315f9440cbb665dd1e7457a/packages/react-dom/src/shared/DOMProperty.js#L352-L364 + if (!truthy(value) && bool_attrs.hasOwnProperty(name)) { + node.removeAttribute(name); + } else { + node.setAttribute(name, value); + } + } + } +} + +function truthy(val) { + return val === "true" || val === true; +} diff --git a/assets/dioxus/snippets/dioxus-web-a95d8cc6c91ff8eb/inline0.js b/assets/dioxus/snippets/dioxus-web-a95d8cc6c91ff8eb/inline0.js new file mode 100644 index 0000000..8ab2e58 --- /dev/null +++ b/assets/dioxus/snippets/dioxus-web-a95d8cc6c91ff8eb/inline0.js @@ -0,0 +1,11 @@ + + export function get_form_data(form) { + let values = new Map(); + const formData = new FormData(form); + + for (let name of formData.keys()) { + values.set(name, formData.getAll(name)); + } + + return values; + } diff --git a/assets/dioxus/snippets/dioxus-web-a95d8cc6c91ff8eb/src/eval.js b/assets/dioxus/snippets/dioxus-web-a95d8cc6c91ff8eb/src/eval.js new file mode 100644 index 0000000..959d422 --- /dev/null +++ b/assets/dioxus/snippets/dioxus-web-a95d8cc6c91ff8eb/src/eval.js @@ -0,0 +1,41 @@ +export class Dioxus { + constructor(sendCallback, returnCallback) { + this.sendCallback = sendCallback; + this.returnCallback = returnCallback; + this.promiseResolve = null; + this.received = []; + } + + // Receive message from Rust + recv() { + return new Promise((resolve, _reject) => { + // If data already exists, resolve immediately + let data = this.received.shift(); + if (data) { + resolve(data); + return; + } + + // Otherwise set a resolve callback + this.promiseResolve = resolve; + }); + } + + // Send message to rust. + send(data) { + this.sendCallback(data); + } + + // Internal rust send + rustSend(data) { + // If a promise is waiting for data, resolve it, and clear the resolve callback + if (this.promiseResolve) { + this.promiseResolve(data); + this.promiseResolve = null; + return; + } + + // Otherwise add the data to a queue + this.received.push(data); + } +} \ No newline at end of file