diff --git a/.gitignore b/.gitignore index ea8c4bf..75b7b01 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /target +web diff --git a/dioxus/assets/dioxus/name.js b/dioxus/assets/dioxus/name.js deleted file mode 100644 index 572e683..0000000 --- a/dioxus/assets/dioxus/name.js +++ /dev/null @@ -1,1331 +0,0 @@ -import { create, update_memory, save_template, set_node, 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; - -const heap = new Array(128).fill(undefined); - -heap.push(undefined, null, true, false); - -function getObject(idx) { return heap[idx]; } - -let heap_next = heap.length; - -function dropObject(idx) { - if (idx < 132) return; - heap[idx] = heap_next; - heap_next = idx; -} - -function takeObject(idx) { - const ret = getObject(idx); - dropObject(idx); - return ret; -} - -let WASM_VECTOR_LEN = 0; - -let cachedUint8Memory0 = null; - -function getUint8Memory0() { - if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) { - cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer); - } - return cachedUint8Memory0; -} - -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; -} - -function isLikeNone(x) { - return x === undefined || x === null; -} - -let cachedInt32Memory0 = null; - -function getInt32Memory0() { - if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) { - cachedInt32Memory0 = new Int32Array(wasm.memory.buffer); - } - return cachedInt32Memory0; -} - -function addHeapObject(obj) { - if (heap_next === heap.length) heap.push(heap.length + 1); - const idx = heap_next; - heap_next = heap[idx]; - - if (typeof(heap_next) !== 'number') throw new Error('corrupt heap'); - - heap[idx] = obj; - return idx; -} - -const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } ); - -if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); }; - -function getStringFromWasm0(ptr, len) { - ptr = ptr >>> 0; - return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len)); -} - -function _assertBoolean(n) { - if (typeof(n) !== 'boolean') { - throw new Error('expected a boolean argument'); - } -} - -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 cachedFloat64Memory0; -} - -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) { - // primitive types - const type = typeof val; - if (type == 'number' || type == 'boolean' || val == null) { - return `${val}`; - } - if (type == 'string') { - return `"${val}"`; - } - if (type == 'symbol') { - const description = val.description; - if (description == null) { - return 'Symbol'; - } else { - return `Symbol(${description})`; - } - } - if (type == 'function') { - const name = val.name; - if (typeof name == 'string' && name.length > 0) { - return `Function(${name})`; - } else { - return 'Function'; - } - } - // objects - if (Array.isArray(val)) { - const length = val.length; - let debug = '['; - if (length > 0) { - debug += debugString(val[0]); - } - for(let i = 1; i < length; i++) { - debug += ', ' + debugString(val[i]); - } - debug += ']'; - return debug; - } - // Test for built-in - const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val)); - let className; - if (builtInMatches.length > 1) { - className = builtInMatches[1]; - } else { - // Failed to match the standard '[object ClassName]' - return toString.call(val); - } - if (className == 'Object') { - // we're a user defined class or Object - // JSON.stringify avoids problems with cycles, and is generally much - // easier than looping through ownProperties of `val`. - try { - return 'Object(' + JSON.stringify(val) + ')'; - } catch (_) { - return 'Object'; - } - } - // errors - if (val instanceof Error) { - return `${val.name}: ${val.message}\n${val.stack}`; - } - // TODO we could test for more things here, like `Set`s and `Map`s. - return className; -} - -function makeMutClosure(arg0, arg1, dtor, f) { - const state = { a: arg0, b: arg1, cnt: 1, dtor }; - const real = (...args) => { - // First up with a closure we increment the internal reference - // count. This ensures that the Rust closure environment won't - // be deallocated while we're invoking it. - state.cnt++; - const a = state.a; - state.a = 0; - try { - return f(a, state.b, ...args); - } finally { - if (--state.cnt === 0) { - wasm.__wbindgen_export_2.get(state.dtor)(a, state.b); - - } else { - state.a = a; - } - } - }; - real.original = state; - - return real; -} - -function logError(f, args) { - try { - return f.apply(this, args); - } catch (e) { - let error = (function () { - try { - return e instanceof Error ? `${e.message}\n\nStack:\n${e.stack}` : e.toString(); - } catch(_) { - return ""; - } - }()); - console.error("wasm-bindgen: imported JS function that was not marked as `catch` threw an error:", error); - throw e; - } -} -function __wbg_adapter_48(arg0, arg1) { - _assertNum(arg0); - _assertNum(arg1); - wasm.wasm_bindgen__convert__closures__invoke0_mut__ha679e1ff9e67e15d(arg0, arg1); -} - -function __wbg_adapter_51(arg0, arg1, arg2) { - _assertNum(arg0); - _assertNum(arg1); - wasm.wasm_bindgen__convert__closures__invoke1_mut__h9d3c0bb7faeb43ca(arg0, arg1, addHeapObject(arg2)); -} - -let stack_pointer = 128; - -function addBorrowedObject(obj) { - if (stack_pointer == 1) throw new Error('out of js stack'); - heap[--stack_pointer] = obj; - return stack_pointer; -} -function __wbg_adapter_54(arg0, arg1, arg2) { - try { - _assertNum(arg0); - _assertNum(arg1); - wasm.wasm_bindgen__convert__closures__invoke1_mut_ref__he3e8576036571a8e(arg0, arg1, addBorrowedObject(arg2)); - } finally { - heap[stack_pointer++] = undefined; - } -} - -function __wbg_adapter_57(arg0, arg1, arg2) { - _assertNum(arg0); - _assertNum(arg1); - wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h84eb0d0b2ee743d6(arg0, arg1, addHeapObject(arg2)); -} - -function getCachedStringFromWasm0(ptr, len) { - if (ptr === 0) { - return getObject(len); - } else { - return getStringFromWasm0(ptr, len); - } -} - -let cachedUint32Memory0 = null; - -function getUint32Memory0() { - if (cachedUint32Memory0 === null || cachedUint32Memory0.byteLength === 0) { - cachedUint32Memory0 = new Uint32Array(wasm.memory.buffer); - } - return cachedUint32Memory0; -} - -function getArrayJsValueFromWasm0(ptr, len) { - ptr = ptr >>> 0; - const mem = getUint32Memory0(); - const slice = mem.subarray(ptr / 4, ptr / 4 + len); - const result = []; - for (let i = 0; i < slice.length; i++) { - result.push(takeObject(slice[i])); - } - return result; -} - -function handleError(f, args) { - try { - return f.apply(this, args); - } catch (e) { - wasm.__wbindgen_exn_store(addHeapObject(e)); - } -} - -async function __wbg_load(module, imports) { - if (typeof Response === 'function' && module instanceof Response) { - if (typeof WebAssembly.instantiateStreaming === 'function') { - try { - return await WebAssembly.instantiateStreaming(module, imports); - - } catch (e) { - if (module.headers.get('Content-Type') != 'application/wasm') { - console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e); - - } else { - throw e; - } - } - } - - const bytes = await module.arrayBuffer(); - return await WebAssembly.instantiate(bytes, imports); - - } else { - const instance = await WebAssembly.instantiate(module, imports); - - if (instance instanceof WebAssembly.Instance) { - return { instance, module }; - - } else { - return instance; - } - } -} - -function __wbg_get_imports() { - const imports = {}; - imports.wbg = {}; - imports.wbg.__wbindgen_object_drop_ref = function(arg0) { - takeObject(arg0); - }; - imports.wbg.__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.__wbindgen_object_clone_ref = function(arg0) { - const ret = getObject(arg0); - return addHeapObject(ret); - }; - imports.wbg.__wbindgen_string_new = function(arg0, arg1) { - const ret = getStringFromWasm0(arg0, arg1); - return addHeapObject(ret); - }; - imports.wbg.__wbg_getformdata_7206b99ef44b788e = function() { return logError(function (arg0) { - const ret = get_form_data(getObject(arg0)); - return addHeapObject(ret); - }, arguments) }; - 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.__wbindgen_is_string = function(arg0) { - const ret = typeof(getObject(arg0)) === 'string'; - _assertBoolean(ret); - return 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_error_new = function(arg0, arg1) { - const ret = new Error(getStringFromWasm0(arg0, arg1)); - 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.__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 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, 1); } - console.error(v0); -}, arguments) }; -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.__wbindgen_number_new = function(arg0) { - const ret = arg0; - return addHeapObject(ret); -}; -imports.wbg.__wbg_set_841ac57cff3d672b = function() { return logError(function (arg0, arg1, arg2) { - getObject(arg0)[takeObject(arg1)] = takeObject(arg2); -}, arguments) }; -imports.wbg.__wbg_create_e7a4871bd307ada9 = function() { return logError(function (arg0) { - create(arg0 >>> 0); -}, arguments) }; -imports.wbg.__wbg_updatememory_acd4e8342aa8de4a = function() { return logError(function (arg0) { - update_memory(takeObject(arg0)); -}, arguments) }; -imports.wbg.__wbg_savetemplate_c4cab19a5b168471 = function() { return logError(function (arg0, arg1, arg2) { - var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice(); - wasm.__wbindgen_free(arg0, arg1 * 4, 4); - save_template(v0, arg2 >>> 0); -}, arguments) }; -imports.wbg.__wbg_setnode_b21f709d95451227 = function() { return logError(function (arg0, arg1) { - set_node(arg0 >>> 0, takeObject(arg1)); -}, arguments) }; -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.__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.__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_queueMicrotask_118eeb525d584d9a = function() { return logError(function (arg0) { - queueMicrotask(getObject(arg0)); -}, arguments) }; -imports.wbg.__wbg_queueMicrotask_26a89c14c53809c0 = function() { return logError(function (arg0) { - const ret = getObject(arg0).queueMicrotask; - return addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbindgen_is_function = function(arg0) { - const ret = typeof(getObject(arg0)) === 'function'; - _assertBoolean(ret); - return ret; -}; -imports.wbg.__wbg_instanceof_Window_99dc9805eaa2614b = 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_5257b70811e953c0 = function() { return logError(function (arg0) { - const ret = getObject(arg0).document; - return isLikeNone(ret) ? 0 : addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_createElement_1a136faad4101f43 = 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_d47e0c50fa2904e0 = 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_dbdd908f92bae1b1 = 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_00904c7c4a32c23b = 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_instanceof_Element_f614cf57d4316979 = function() { return logError(function (arg0) { - let result; - try { - result = getObject(arg0) instanceof Element; - } catch (_) { - result = false; - } - const ret = result; - _assertBoolean(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_getAttribute_14ccdc738c4f7d95 = 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_f3f6eb39f24c1bb0 = function() { return logError(function (arg0) { - const ret = getObject(arg0).getBoundingClientRect(); - return addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_scrollIntoView_95326c8d586471cd = function() { return logError(function (arg0, arg1) { - getObject(arg0).scrollIntoView(getObject(arg1)); -}, arguments) }; -imports.wbg.__wbg_toggleAttribute_c7aec34c6d72e2ac = 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_430cfa09315574cc = 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_blur_3de7a3848d6d481c = function() { return handleError(function (arg0) { - getObject(arg0).blur(); -}, arguments) }; -imports.wbg.__wbg_focus_623326ec4eefd224 = function() { return handleError(function (arg0) { - getObject(arg0).focus(); -}, arguments) }; -imports.wbg.__wbg_width_164c11c1f72aa632 = function() { return logError(function (arg0) { - const ret = getObject(arg0).width; - return ret; -}, arguments) }; -imports.wbg.__wbg_height_ac60120008caa50b = function() { return logError(function (arg0) { - const ret = getObject(arg0).height; - return ret; -}, arguments) }; -imports.wbg.__wbg_instanceof_HtmlSelectElement_4b8295cd01d28f3b = function() { return logError(function (arg0) { - let result; - try { - result = getObject(arg0) instanceof HTMLSelectElement; - } catch (_) { - result = false; - } - const ret = result; - _assertBoolean(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_value_b09297aa8ae40daa = 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_instanceof_Node_21fd40436f5d5572 = 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_parentElement_86a7612dde875ba9 = function() { return logError(function (arg0) { - const ret = getObject(arg0).parentElement; - return isLikeNone(ret) ? 0 : addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_firstChild_c3dac19eb85cc526 = function() { return logError(function (arg0) { - const ret = getObject(arg0).firstChild; - return isLikeNone(ret) ? 0 : addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_nextSibling_13e9454ef5323f1a = function() { return logError(function (arg0) { - const ret = getObject(arg0).nextSibling; - return isLikeNone(ret) ? 0 : addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_textContent_efe8338af53ddf62 = 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_settextContent_1fec240f77aa3dc4 = function() { return logError(function (arg0, arg1, arg2) { - var v0 = getCachedStringFromWasm0(arg1, arg2); - getObject(arg0).textContent = v0; -}, arguments) }; -imports.wbg.__wbg_appendChild_bd383ec5356c0bdb = function() { return handleError(function (arg0, arg1) { - const ret = getObject(arg0).appendChild(getObject(arg1)); - return addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_pageX_f7c8aa35c141fb7a = function() { return logError(function (arg0) { - const ret = getObject(arg0).pageX; - _assertNum(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_pageY_8127359697fdfaab = function() { return logError(function (arg0) { - const ret = getObject(arg0).pageY; - _assertNum(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_instanceof_HtmlTextAreaElement_c007f5b2d8b9733f = 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_value_ab23a75318ea828f = 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_deltaX_de18e6f358ab88cf = function() { return logError(function (arg0) { - const ret = getObject(arg0).deltaX; - return ret; -}, arguments) }; -imports.wbg.__wbg_deltaY_50a026b7421f883d = function() { return logError(function (arg0) { - const ret = getObject(arg0).deltaY; - return ret; -}, arguments) }; -imports.wbg.__wbg_deltaZ_14a401c7efcede27 = function() { return logError(function (arg0) { - const ret = getObject(arg0).deltaZ; - return ret; -}, arguments) }; -imports.wbg.__wbg_deltaMode_b8290e36698673d0 = function() { return logError(function (arg0) { - const ret = getObject(arg0).deltaMode; - _assertNum(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_animationName_397a9e500289f0a8 = 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_elapsedTime_cd98e48d7bc31d44 = function() { return logError(function (arg0) { - const ret = getObject(arg0).elapsedTime; - return ret; -}, arguments) }; -imports.wbg.__wbg_pseudoElement_0fdc088cf4f516e6 = 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_CompositionEvent_e37900e310564e88 = function() { return logError(function (arg0) { - let result; - try { - result = getObject(arg0) instanceof CompositionEvent; - } catch (_) { - result = false; - } - const ret = result; - _assertBoolean(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_data_03b517344e75fca6 = 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_altKey_c3c61dc3af936846 = function() { return logError(function (arg0) { - const ret = getObject(arg0).altKey; - _assertBoolean(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_ctrlKey_e7fc1575581bc431 = function() { return logError(function (arg0) { - const ret = getObject(arg0).ctrlKey; - _assertBoolean(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_shiftKey_0a061aeba25dbd63 = function() { return logError(function (arg0) { - const ret = getObject(arg0).shiftKey; - _assertBoolean(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_metaKey_b879a69fa9f3f7af = function() { return logError(function (arg0) { - const ret = getObject(arg0).metaKey; - _assertBoolean(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_location_3d1aba6d141f01fb = function() { return logError(function (arg0) { - const ret = getObject(arg0).location; - _assertNum(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_repeat_8514eb33e8553b6b = function() { return logError(function (arg0) { - const ret = getObject(arg0).repeat; - _assertBoolean(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_key_9a2550983fbad1d0 = 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_3b51bddc7419ef7d = 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_f2e08b75ff9738ad = function() { return logError(function (arg0) { - const ret = getObject(arg0).altKey; - _assertBoolean(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_metaKey_595730ba80e4d7c1 = function() { return logError(function (arg0) { - const ret = getObject(arg0).metaKey; - _assertBoolean(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_ctrlKey_3827be1d37980583 = function() { return logError(function (arg0) { - const ret = getObject(arg0).ctrlKey; - _assertBoolean(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_shiftKey_6c629c6eeebec633 = function() { return logError(function (arg0) { - const ret = getObject(arg0).shiftKey; - _assertBoolean(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_top_d39cc7e325e1f687 = function() { return logError(function (arg0) { - const ret = getObject(arg0).top; - return ret; -}, arguments) }; -imports.wbg.__wbg_left_064e5e69a7d7c925 = function() { return logError(function (arg0) { - const ret = getObject(arg0).left; - return ret; -}, arguments) }; -imports.wbg.__wbg_instanceof_HtmlInputElement_d53941bc0aaa6ae9 = function() { return logError(function (arg0) { - let result; - try { - result = getObject(arg0) instanceof HTMLInputElement; - } catch (_) { - result = false; - } - const ret = result; - _assertBoolean(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_checked_fae75426dd38619c = function() { return logError(function (arg0) { - const ret = getObject(arg0).checked; - _assertBoolean(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_files_0fe2affb0f600765 = function() { return logError(function (arg0) { - const ret = getObject(arg0).files; - return isLikeNone(ret) ? 0 : addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_type_e80b2d01180893be = 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_value_c93cb4b4d352228e = 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_instanceof_HtmlFormElement_8749f5c84a610e79 = 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_length_5f3530f0f1af8661 = function() { return logError(function (arg0) { - const ret = getObject(arg0).length; - _assertNum(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_item_e09547f67fe7cfab = function() { return logError(function (arg0, arg1) { - const ret = getObject(arg0).item(arg1 >>> 0); - return isLikeNone(ret) ? 0 : addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_pointerId_288a7753a42433eb = function() { return logError(function (arg0) { - const ret = getObject(arg0).pointerId; - _assertNum(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_width_21076e4164087cea = function() { return logError(function (arg0) { - const ret = getObject(arg0).width; - _assertNum(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_height_a061c64466deacc7 = function() { return logError(function (arg0) { - const ret = getObject(arg0).height; - _assertNum(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_pressure_ef807a4027b5b179 = function() { return logError(function (arg0) { - const ret = getObject(arg0).pressure; - return ret; -}, arguments) }; -imports.wbg.__wbg_tangentialPressure_fda9db7c4da0541e = function() { return logError(function (arg0) { - const ret = getObject(arg0).tangentialPressure; - return ret; -}, arguments) }; -imports.wbg.__wbg_tiltX_5181db020060badb = function() { return logError(function (arg0) { - const ret = getObject(arg0).tiltX; - _assertNum(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_tiltY_1ae0a32f30fedf61 = function() { return logError(function (arg0) { - const ret = getObject(arg0).tiltY; - _assertNum(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_twist_cc1a637d138ffd08 = function() { return logError(function (arg0) { - const ret = getObject(arg0).twist; - _assertNum(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_pointerType_6421ba54876364b9 = 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_e63caa1da923366d = function() { return logError(function (arg0) { - const ret = getObject(arg0).isPrimary; - _assertBoolean(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_result_e515a9bf8390ef47 = function() { return handleError(function (arg0) { - const ret = getObject(arg0).result; - return addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_setonload_427d4e894b2d55b4 = function() { return logError(function (arg0, arg1) { - getObject(arg0).onload = getObject(arg1); -}, arguments) }; -imports.wbg.__wbg_new_b07bacad2380fbb9 = function() { return handleError(function () { - const ret = new FileReader(); - return addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_readAsArrayBuffer_84f69d5bca819f0a = function() { return handleError(function (arg0, arg1) { - getObject(arg0).readAsArrayBuffer(getObject(arg1)); -}, arguments) }; -imports.wbg.__wbg_readAsText_9f9d76c73fffd2d6 = function() { return handleError(function (arg0, arg1) { - getObject(arg0).readAsText(getObject(arg1)); -}, arguments) }; -imports.wbg.__wbg_log_9dfb3879776dd797 = function() { return logError(function (arg0) { - console.log(getObject(arg0)); -}, arguments) }; -imports.wbg.__wbg_type_9a745aff5dd31aae = 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_target_791826e938c3e308 = function() { return logError(function (arg0) { - const ret = getObject(arg0).target; - return isLikeNone(ret) ? 0 : addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_preventDefault_d2c7416966cb0632 = function() { return logError(function (arg0) { - getObject(arg0).preventDefault(); -}, arguments) }; -imports.wbg.__wbg_name_6c808ccae465f9e1 = 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_screenX_efa5456b8e51b0f0 = function() { return logError(function (arg0) { - const ret = getObject(arg0).screenX; - _assertNum(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_screenY_f97fbd34568961e4 = function() { return logError(function (arg0) { - const ret = getObject(arg0).screenY; - _assertNum(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_clientX_4d37584813a1790a = function() { return logError(function (arg0) { - const ret = getObject(arg0).clientX; - _assertNum(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_clientY_ea543e0b8dc1490d = function() { return logError(function (arg0) { - const ret = getObject(arg0).clientY; - _assertNum(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_offsetX_72778aba0c4b5674 = function() { return logError(function (arg0) { - const ret = getObject(arg0).offsetX; - _assertNum(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_offsetY_a8d9605d7c28379d = function() { return logError(function (arg0) { - const ret = getObject(arg0).offsetY; - _assertNum(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_ctrlKey_0d75e0e9028bd999 = function() { return logError(function (arg0) { - const ret = getObject(arg0).ctrlKey; - _assertBoolean(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_shiftKey_12353f0e19b21d6a = function() { return logError(function (arg0) { - const ret = getObject(arg0).shiftKey; - _assertBoolean(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_altKey_a076f8612103d7e8 = function() { return logError(function (arg0) { - const ret = getObject(arg0).altKey; - _assertBoolean(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_metaKey_4e3f6e986f2802b1 = function() { return logError(function (arg0) { - const ret = getObject(arg0).metaKey; - _assertBoolean(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_button_8a97c55db17c7314 = function() { return logError(function (arg0) { - const ret = getObject(arg0).button; - _assertNum(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_buttons_d516d4a6ffb63df2 = function() { return logError(function (arg0) { - const ret = getObject(arg0).buttons; - _assertNum(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_propertyName_40a7cebcc0662ba0 = 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_dc3d932b80ee64c8 = function() { return logError(function (arg0) { - const ret = getObject(arg0).elapsedTime; - return ret; -}, arguments) }; -imports.wbg.__wbg_pseudoElement_15d1695905b15e82 = 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_charCodeAt_6843ba97463f94af = function() { return logError(function (arg0, arg1) { - const ret = getObject(arg0).charCodeAt(arg1 >>> 0); - return ret; -}, arguments) }; -imports.wbg.__wbg_get_c43534c00f382c8a = function() { return logError(function (arg0, arg1) { - const ret = getObject(arg0)[arg1 >>> 0]; - return addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_length_d99b680fd68bf71b = function() { return logError(function (arg0) { - const ret = getObject(arg0).length; - _assertNum(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_new_34c624469fb1d4fd = function() { return logError(function () { - const ret = new Array(); - return addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_newnoargs_5859b6d41c6fe9f7 = function() { return logError(function (arg0, arg1) { - var v0 = getCachedStringFromWasm0(arg0, arg1); - const ret = new Function(v0); - return addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_new_ad4df4628315a892 = function() { return logError(function () { - const ret = new Map(); - return addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_next_1938cf110c9491d4 = function() { return logError(function (arg0) { - const ret = getObject(arg0).next; - return addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_next_267398d0e0761bf9 = function() { return handleError(function (arg0) { - const ret = getObject(arg0).next(); - return addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_done_506b44765ba84b9c = function() { return logError(function (arg0) { - const ret = getObject(arg0).done; - _assertBoolean(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_value_31485d8770eb06ab = function() { return logError(function (arg0) { - const ret = getObject(arg0).value; - return addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_iterator_364187e1ee96b750 = function() { return logError(function () { - const ret = Symbol.iterator; - return addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_get_5027b32da70f39b1 = function() { return handleError(function (arg0, arg1) { - const ret = Reflect.get(getObject(arg0), getObject(arg1)); - return addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_call_a79f1973a4f07d5e = function() { return handleError(function (arg0, arg1) { - const ret = getObject(arg0).call(getObject(arg1)); - return addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_new_87d841e70661f6e9 = function() { return logError(function () { - const ret = new Object(); - return addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_length_8e7b7dfba1267498 = function() { return logError(function (arg0) { - const ret = getObject(arg0).length; - _assertNum(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_self_086b5302bcafb962 = function() { return handleError(function () { - const ret = self.self; - return addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_window_132fa5d7546f1de5 = function() { return handleError(function () { - const ret = window.window; - return addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_globalThis_e5f801a37ad7d07b = function() { return handleError(function () { - const ret = globalThis.globalThis; - return addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_global_f9a61fce4af6b7c1 = function() { return handleError(function () { - const ret = global.global; - return addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_set_379b27f1d5f1bf9c = function() { return logError(function (arg0, arg1, arg2) { - getObject(arg0)[arg1 >>> 0] = takeObject(arg2); -}, arguments) }; -imports.wbg.__wbg_isArray_fbd24d447869b527 = function() { return logError(function (arg0) { - const ret = Array.isArray(getObject(arg0)); - _assertBoolean(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_instanceof_ArrayBuffer_f4521cec1b99ee35 = 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_c04822e6d72bbf9e = function() { return logError(function (arg0, arg1, arg2, arg3) { - var v0 = getCachedStringFromWasm0(arg0, arg1); - var v1 = getCachedStringFromWasm0(arg2, arg3); - const ret = new Function(v0, v1); - return addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_call_f6a2bc58c19c53c6 = function() { return handleError(function (arg0, arg1, arg2) { - const ret = getObject(arg0).call(getObject(arg1), getObject(arg2)); - return addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_set_83e83bc2428e50ab = function() { return logError(function (arg0, arg1, arg2) { - const ret = getObject(arg0).set(getObject(arg1), getObject(arg2)); - return addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_entries_03b01870becd195d = function() { return logError(function (arg0) { - const ret = getObject(arg0).entries(); - return addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_isSafeInteger_d8c89788832a17bf = function() { return logError(function (arg0) { - const ret = Number.isSafeInteger(getObject(arg0)); - _assertBoolean(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_entries_7a47f5716366056b = function() { return logError(function (arg0) { - const ret = Object.entries(getObject(arg0)); - return addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_resolve_97ecd55ee839391b = function() { return logError(function (arg0) { - const ret = Promise.resolve(getObject(arg0)); - return addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_then_7aeb7c5f1536640f = function() { return logError(function (arg0, arg1) { - const ret = getObject(arg0).then(getObject(arg1)); - return addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_buffer_5d1b598a01b41a42 = function() { return logError(function (arg0) { - const ret = getObject(arg0).buffer; - return addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_new_ace717933ad7117f = function() { return logError(function (arg0) { - const ret = new Uint8Array(getObject(arg0)); - return addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_set_74906aa30864df5a = function() { return logError(function (arg0, arg1, arg2) { - getObject(arg0).set(getObject(arg1), arg2 >>> 0); -}, arguments) }; -imports.wbg.__wbg_length_f0764416ba5bb237 = function() { return logError(function (arg0) { - const ret = getObject(arg0).length; - _assertNum(ret); - return ret; -}, arguments) }; -imports.wbg.__wbg_instanceof_Uint8Array_4f5cffed7df34b2f = 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_stringify_daa6661e90c04140 = function() { return handleError(function (arg0) { - const ret = JSON.stringify(getObject(arg0)); - return addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbg_set_37a50e901587b477 = function() { return handleError(function (arg0, arg1, arg2) { - const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2)); - _assertBoolean(ret); - return 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 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)); -}; -imports.wbg.__wbindgen_memory = function() { - const ret = wasm.memory; - return addHeapObject(ret); -}; -imports.wbg.__wbindgen_closure_wrapper458 = function() { return logError(function (arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 192, __wbg_adapter_48); - return addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbindgen_closure_wrapper459 = function() { return logError(function (arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 192, __wbg_adapter_51); - return addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbindgen_closure_wrapper462 = function() { return logError(function (arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 192, __wbg_adapter_54); - return addHeapObject(ret); -}, arguments) }; -imports.wbg.__wbindgen_closure_wrapper597 = function() { return logError(function (arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 230, __wbg_adapter_57); - return addHeapObject(ret); -}, arguments) }; -imports['./snippets/dioxus-interpreter-js-85a0a2f8acce2e86/inline0.js'] = __wbg_star0; - -return imports; -} - -function __wbg_init_memory(imports, maybe_memory) { - -} - -function __wbg_finalize_init(instance, module) { - wasm = instance.exports; - __wbg_init.__wbindgen_wasm_module = module; - cachedBigInt64Memory0 = null; - cachedFloat64Memory0 = null; - cachedInt32Memory0 = null; - cachedUint32Memory0 = null; - cachedUint8Memory0 = null; - - wasm.__wbindgen_start(); - return wasm; -} - -function initSync(module) { - if (wasm !== undefined) return wasm; - - const imports = __wbg_get_imports(); - - __wbg_init_memory(imports); - - if (!(module instanceof WebAssembly.Module)) { - module = new WebAssembly.Module(module); - } - - const instance = new WebAssembly.Instance(module, imports); - - return __wbg_finalize_init(instance, module); -} - -async function __wbg_init(input) { - if (wasm !== undefined) return wasm; - - - const imports = __wbg_get_imports(); - - if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) { - input = fetch(input); - } - - __wbg_init_memory(imports); - - const { instance, module } = await __wbg_load(await input, imports); - - return __wbg_finalize_init(instance, module); -} - -export { initSync } -export default __wbg_init; diff --git a/dioxus/assets/dioxus/name_bg.wasm b/dioxus/assets/dioxus/name_bg.wasm deleted file mode 100644 index 9e93801..0000000 Binary files a/dioxus/assets/dioxus/name_bg.wasm and /dev/null differ diff --git a/dioxus/assets/dioxus/snippets/dioxus-interpreter-js-85a0a2f8acce2e86/inline0.js b/dioxus/assets/dioxus/snippets/dioxus-interpreter-js-85a0a2f8acce2e86/inline0.js deleted file mode 100644 index 653098d..0000000 --- a/dioxus/assets/dioxus/snippets/dioxus-interpreter-js-85a0a2f8acce2e86/inline0.js +++ /dev/null @@ -1,301 +0,0 @@ -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 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;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]; - } - }let s = "";let lsp,sp,sl; let c = new TextDecoder();let u8buf,u8bufp; - let ns,field,value,id,bubbles,ptr,len,event_name; - 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/dioxus/assets/dioxus/snippets/dioxus-interpreter-js-85a0a2f8acce2e86/src/common.js b/dioxus/assets/dioxus/snippets/dioxus-interpreter-js-85a0a2f8acce2e86/src/common.js deleted file mode 100644 index 3745e8c..0000000 --- a/dioxus/assets/dioxus/snippets/dioxus-interpreter-js-85a0a2f8acce2e86/src/common.js +++ /dev/null @@ -1,79 +0,0 @@ -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/dioxus/assets/dioxus/snippets/dioxus-web-a95d8cc6c91ff8eb/inline0.js b/dioxus/assets/dioxus/snippets/dioxus-web-a95d8cc6c91ff8eb/inline0.js deleted file mode 100644 index 8ab2e58..0000000 --- a/dioxus/assets/dioxus/snippets/dioxus-web-a95d8cc6c91ff8eb/inline0.js +++ /dev/null @@ -1,11 +0,0 @@ - - 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/dioxus/assets/dioxus/snippets/dioxus-web-a95d8cc6c91ff8eb/src/eval.js b/dioxus/assets/dioxus/snippets/dioxus-web-a95d8cc6c91ff8eb/src/eval.js deleted file mode 100644 index 959d422..0000000 --- a/dioxus/assets/dioxus/snippets/dioxus-web-a95d8cc6c91ff8eb/src/eval.js +++ /dev/null @@ -1,41 +0,0 @@ -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 diff --git a/dioxus/index.html b/dioxus/index.html deleted file mode 100644 index 8272015..0000000 --- a/dioxus/index.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - dioxus | ⛺ - - - - - - - -
- - - - \ No newline at end of file diff --git a/dioxus/style.css b/dioxus/style.css deleted file mode 100644 index 4d45e6d..0000000 --- a/dioxus/style.css +++ /dev/null @@ -1,576 +0,0 @@ -/* -1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) -2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116) -*/ - -*, -::before, -::after { - box-sizing: border-box; - /* 1 */ - border-width: 0; - /* 2 */ - border-style: solid; - /* 2 */ - border-color: theme('borderColor.DEFAULT', currentColor); - /* 2 */ -} - -::before, -::after { - --tw-content: ''; -} - -/* -1. Use a consistent sensible line-height in all browsers. -2. Prevent adjustments of font size after orientation changes in iOS. -3. Use a more readable tab size. -4. Use the user's configured `sans` font-family by default. -*/ - -html { - line-height: 1.5; - /* 1 */ - -webkit-text-size-adjust: 100%; - /* 2 */ - -moz-tab-size: 4; - /* 3 */ - tab-size: 4; - /* 3 */ - font-family: theme('fontFamily.sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"); - /* 4 */ -} - -/* -1. Remove the margin in all browsers. -2. Inherit line-height from `html` so users can set them as a class directly on the `html` element. -*/ - -body { - margin: 0; - /* 1 */ - line-height: inherit; - /* 2 */ -} - -/* -1. Add the correct height in Firefox. -2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655) -3. Ensure horizontal rules are visible by default. -*/ - -hr { - height: 0; - /* 1 */ - color: inherit; - /* 2 */ - border-top-width: 1px; - /* 3 */ -} - -/* -Add the correct text decoration in Chrome, Edge, and Safari. -*/ - -abbr:where([title]) { - text-decoration: underline dotted; -} - -/* -Remove the default font size and weight for headings. -*/ - -h1, -h2, -h3, -h4, -h5, -h6 { - font-size: inherit; - font-weight: inherit; -} - -/* -Reset links to optimize for opt-in styling instead of opt-out. -*/ - -a { - color: inherit; - text-decoration: inherit; -} - -/* -Add the correct font weight in Edge and Safari. -*/ - -b, -strong { - font-weight: bolder; -} - -/* -1. Use the user's configured `mono` font family by default. -2. Correct the odd `em` font sizing in all browsers. -*/ - -code, -kbd, -samp, -pre { - font-family: theme('fontFamily.mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace); - /* 1 */ - font-size: 1em; - /* 2 */ -} - -/* -Add the correct font size in all browsers. -*/ - -small { - font-size: 80%; -} - -/* -Prevent `sub` and `sup` elements from affecting the line height in all browsers. -*/ - -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sub { - bottom: -0.25em; -} - -sup { - top: -0.5em; -} - -/* -1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297) -2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) -3. Remove gaps between table borders by default. -*/ - -table { - text-indent: 0; - /* 1 */ - border-color: inherit; - /* 2 */ - border-collapse: collapse; - /* 3 */ -} - -/* -1. Change the font styles in all browsers. -2. Remove the margin in Firefox and Safari. -3. Remove default padding in all browsers. -*/ - -button, -input, -optgroup, -select, -textarea { - font-family: inherit; - /* 1 */ - font-size: 100%; - /* 1 */ - font-weight: inherit; - /* 1 */ - line-height: inherit; - /* 1 */ - color: inherit; - /* 1 */ - margin: 0; - /* 2 */ - padding: 0; - /* 3 */ -} - -/* -Remove the inheritance of text transform in Edge and Firefox. -*/ - -button, -select { - text-transform: none; -} - -/* -1. Correct the inability to style clickable types in iOS and Safari. -2. Remove default button styles. -*/ - -button, -[type='button'], -[type='reset'], -[type='submit'] { - -webkit-appearance: button; - /* 1 */ - background-color: transparent; - /* 2 */ - background-image: none; - /* 2 */ -} - -/* -Use the modern Firefox focus style for all focusable elements. -*/ - -:-moz-focusring { - outline: auto; -} - -/* -Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737) -*/ - -:-moz-ui-invalid { - box-shadow: none; -} - -/* -Add the correct vertical alignment in Chrome and Firefox. -*/ - -progress { - vertical-align: baseline; -} - -/* -Correct the cursor style of increment and decrement buttons in Safari. -*/ - -::-webkit-inner-spin-button, -::-webkit-outer-spin-button { - height: auto; -} - -/* -1. Correct the odd appearance in Chrome and Safari. -2. Correct the outline style in Safari. -*/ - -[type='search'] { - -webkit-appearance: textfield; - /* 1 */ - outline-offset: -2px; - /* 2 */ -} - -/* -Remove the inner padding in Chrome and Safari on macOS. -*/ - -::-webkit-search-decoration { - -webkit-appearance: none; -} - -/* -1. Correct the inability to style clickable types in iOS and Safari. -2. Change font properties to `inherit` in Safari. -*/ - -::-webkit-file-upload-button { - -webkit-appearance: button; - /* 1 */ - font: inherit; - /* 2 */ -} - -/* -Add the correct display in Chrome and Safari. -*/ - -summary { - display: list-item; -} - -/* -Removes the default spacing and border for appropriate elements. -*/ - -blockquote, -dl, -dd, -h1, -h2, -h3, -h4, -h5, -h6, -hr, -figure, -p, -pre { - margin: 0; -} - -fieldset { - margin: 0; - padding: 0; -} - -legend { - padding: 0; -} - -ol, -ul, -menu { - list-style: none; - margin: 0; - padding: 0; -} - -/* -Prevent resizing textareas horizontally by default. -*/ - -textarea { - resize: vertical; -} - -/* -1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300) -2. Set the default placeholder color to the user's configured gray 400 color. -*/ - -input::placeholder, -textarea::placeholder { - opacity: 1; - /* 1 */ - color: theme('colors.gray.400', #9ca3af); - /* 2 */ -} - -/* -Set the default cursor for buttons. -*/ - -button, -[role="button"] { - cursor: pointer; -} - -/* -Make sure disabled buttons don't get the pointer cursor. -*/ -:disabled { - cursor: default; -} - -/* -1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14) -2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210) - This can trigger a poorly considered lint error in some tools but is included by design. -*/ - -img, -svg, -video, -canvas, -audio, -iframe, -embed, -object { - display: block; - /* 1 */ - vertical-align: middle; - /* 2 */ -} - -/* -Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14) -*/ - -img, -video { - max-width: 100%; - height: auto; -} - -/* Make elements with the HTML hidden attribute stay hidden by default */ -[hidden] { - display: none; -} - -*, ::before, ::after { - --tw-border-spacing-x: 0; - --tw-border-spacing-y: 0; - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - --tw-pan-x: ; - --tw-pan-y: ; - --tw-pinch-zoom: ; - --tw-scroll-snap-strictness: proximity; - --tw-ordinal: ; - --tw-slashed-zero: ; - --tw-numeric-figure: ; - --tw-numeric-spacing: ; - --tw-numeric-fraction: ; - --tw-ring-inset: ; - --tw-ring-offset-width: 0px; - --tw-ring-offset-color: #fff; - --tw-ring-color: rgb(59 130 246 / 0.5); - --tw-ring-offset-shadow: 0 0 #0000; - --tw-ring-shadow: 0 0 #0000; - --tw-shadow: 0 0 #0000; - --tw-shadow-colored: 0 0 #0000; - --tw-blur: ; - --tw-brightness: ; - --tw-contrast: ; - --tw-grayscale: ; - --tw-hue-rotate: ; - --tw-invert: ; - --tw-saturate: ; - --tw-sepia: ; - --tw-drop-shadow: ; - --tw-backdrop-blur: ; - --tw-backdrop-brightness: ; - --tw-backdrop-contrast: ; - --tw-backdrop-grayscale: ; - --tw-backdrop-hue-rotate: ; - --tw-backdrop-invert: ; - --tw-backdrop-opacity: ; - --tw-backdrop-saturate: ; - --tw-backdrop-sepia: ; -} - -::-webkit-backdrop { - --tw-border-spacing-x: 0; - --tw-border-spacing-y: 0; - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - --tw-pan-x: ; - --tw-pan-y: ; - --tw-pinch-zoom: ; - --tw-scroll-snap-strictness: proximity; - --tw-ordinal: ; - --tw-slashed-zero: ; - --tw-numeric-figure: ; - --tw-numeric-spacing: ; - --tw-numeric-fraction: ; - --tw-ring-inset: ; - --tw-ring-offset-width: 0px; - --tw-ring-offset-color: #fff; - --tw-ring-color: rgb(59 130 246 / 0.5); - --tw-ring-offset-shadow: 0 0 #0000; - --tw-ring-shadow: 0 0 #0000; - --tw-shadow: 0 0 #0000; - --tw-shadow-colored: 0 0 #0000; - --tw-blur: ; - --tw-brightness: ; - --tw-contrast: ; - --tw-grayscale: ; - --tw-hue-rotate: ; - --tw-invert: ; - --tw-saturate: ; - --tw-sepia: ; - --tw-drop-shadow: ; - --tw-backdrop-blur: ; - --tw-backdrop-brightness: ; - --tw-backdrop-contrast: ; - --tw-backdrop-grayscale: ; - --tw-backdrop-hue-rotate: ; - --tw-backdrop-invert: ; - --tw-backdrop-opacity: ; - --tw-backdrop-saturate: ; - --tw-backdrop-sepia: ; -} - -::backdrop { - --tw-border-spacing-x: 0; - --tw-border-spacing-y: 0; - --tw-translate-x: 0; - --tw-translate-y: 0; - --tw-rotate: 0; - --tw-skew-x: 0; - --tw-skew-y: 0; - --tw-scale-x: 1; - --tw-scale-y: 1; - --tw-pan-x: ; - --tw-pan-y: ; - --tw-pinch-zoom: ; - --tw-scroll-snap-strictness: proximity; - --tw-ordinal: ; - --tw-slashed-zero: ; - --tw-numeric-figure: ; - --tw-numeric-spacing: ; - --tw-numeric-fraction: ; - --tw-ring-inset: ; - --tw-ring-offset-width: 0px; - --tw-ring-offset-color: #fff; - --tw-ring-color: rgb(59 130 246 / 0.5); - --tw-ring-offset-shadow: 0 0 #0000; - --tw-ring-shadow: 0 0 #0000; - --tw-shadow: 0 0 #0000; - --tw-shadow-colored: 0 0 #0000; - --tw-blur: ; - --tw-brightness: ; - --tw-contrast: ; - --tw-grayscale: ; - --tw-hue-rotate: ; - --tw-invert: ; - --tw-saturate: ; - --tw-sepia: ; - --tw-drop-shadow: ; - --tw-backdrop-blur: ; - --tw-backdrop-brightness: ; - --tw-backdrop-contrast: ; - --tw-backdrop-grayscale: ; - --tw-backdrop-hue-rotate: ; - --tw-backdrop-invert: ; - --tw-backdrop-opacity: ; - --tw-backdrop-saturate: ; - --tw-backdrop-sepia: ; -} - -.bg-blue-500 { - --tw-bg-opacity: 1; - background-color: rgb(59 130 246 / var(--tw-bg-opacity)); -} - -.hover\:bg-blue-700:hover { - --tw-bg-opacity: 1; - background-color: rgb(29 78 216 / var(--tw-bg-opacity)); -} - -.text-white { - --tw-text-opacity: 1; - color: rgb(255 255 255 / var(--tw-text-opacity)); -} - -.font-bold { - font-weight: 700; -} - -.py-4 { - padding-top: 1rem; - padding-bottom: 1rem; -} - -.px-4 { - padding-left: 1rem; - padding-right: 1rem; -} - -.rounded { - border-radius: 0.25rem; -} diff --git a/src/lib.rs b/src/lib.rs index 002dc06..224ee59 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -11,7 +11,7 @@ fn build_wasm() { use walkdir::WalkDir; let project_folder = Path::new(env!("CARGO_MANIFEST_DIR")); - let output_folder = project_folder.join("dioxus"); + let output_folder = project_folder.join("web"); // Build WASM let mut config = CrateConfig::new(None).unwrap(); @@ -59,8 +59,8 @@ pub fn launch< #[cfg(all(not(target_arch = "wasm32"), feature = "auto-build"))] { let config = ServeConfigBuilder::new(component, Props::default()) - .index_path(concat!(env!("CARGO_MANIFEST_DIR"), "/dioxus/index.html")) - .assets_path(concat!(env!("CARGO_MANIFEST_DIR"), "/dioxus")); + .index_path(concat!(env!("CARGO_MANIFEST_DIR"), "/web/index.html")) + .assets_path(concat!(env!("CARGO_MANIFEST_DIR"), "/web")); LaunchBuilder::new(|cx| render!("Hello World")) .server_cfg(config) .launch(); diff --git a/src/main.rs b/src/main.rs index f41ba87..21e6753 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,7 +3,7 @@ use tioxus::*; fn main() { - tioxus::launch(App) + launch(App) } fn App(cx: Scope) -> Element {