diff --git a/Cargo.lock b/Cargo.lock index 84bee04..060f54e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -757,6 +757,7 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8d5564e570a38b43d78bdc063374a0c3098c4f0d64005b12f9bbe87e869b6d7" dependencies = [ + "futures-channel", "gloo-events", "js-sys", "wasm-bindgen", @@ -794,6 +795,8 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5fb7d06c1c8cc2a29bee7ec961009a0b2caa0793ee4900c2ffb348734ba1c8f9" dependencies = [ + "futures-channel", + "futures-core", "js-sys", "wasm-bindgen", ] @@ -1099,7 +1102,15 @@ dependencies = [ name = "lan_party_web" version = "0.1.0" dependencies = [ + "lan_party_core", + "serde", + "serde_json", + "thiserror", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", "yew", + "yew-router", ] [[package]] @@ -1861,6 +1872,12 @@ dependencies = [ "syn", ] +[[package]] +name = "route-recognizer" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afab94fb28594581f62d981211a9a4d53cc8130bbcbbb89a0440d9b8e81a7746" + [[package]] name = "rustc_version" version = "0.2.3" @@ -2013,6 +2030,18 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "serde-wasm-bindgen" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "618365e8e586c22123d692b72a7d791d5ee697817b65a218cdf12a98870af0f7" +dependencies = [ + "fnv", + "js-sys", + "serde", + "wasm-bindgen", +] + [[package]] name = "serde_bytes" version = "0.11.7" @@ -2056,6 +2085,18 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + [[package]] name = "serde_with" version = "1.14.0" @@ -2809,6 +2850,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc7652e3f6c4706c8d9cd54832c4a4ccb9b5336e2c3bd154d5cccfbf1c1f5f7d" dependencies = [ "cfg-if", + "serde", + "serde_json", "wasm-bindgen-macro", ] @@ -3077,3 +3120,34 @@ dependencies = [ "quote", "syn", ] + +[[package]] +name = "yew-router" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "155804f6f3aa309f596d5c3fa14486a94e7756f1edd7634569949e401d5099f2" +dependencies = [ + "gloo", + "gloo-utils", + "js-sys", + "route-recognizer", + "serde", + "serde-wasm-bindgen", + "serde_urlencoded", + "thiserror", + "wasm-bindgen", + "web-sys", + "yew", + "yew-router-macro", +] + +[[package]] +name = "yew-router-macro" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39049d193b52eaad4ffc80916bf08806d142c90b5edcebd527644de438a7e19a" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] diff --git a/backend/src/main.rs b/backend/src/main.rs index fc220d2..0f8c2d8 100644 --- a/backend/src/main.rs +++ b/backend/src/main.rs @@ -1,5 +1,6 @@ mod api; +use rocket::fs::FileServer; use rocket_cors::CorsOptions; use rocket_db_pools::{mongodb, Database}; use rocket_okapi::{ @@ -32,7 +33,7 @@ fn rocket() -> _ { let building_rocket = rocket::build() .attach(Db::init()) .attach(cors) - .mount("/", routes![index]) + .mount("/", FileServer::from("./web/dist")) .mount( "/swagger", make_swagger_ui(&SwaggerUIConfig { diff --git a/core/src/util.rs b/core/src/util.rs index bda1980..0ada2ec 100644 --- a/core/src/util.rs +++ b/core/src/util.rs @@ -27,9 +27,9 @@ pub enum PartyError { #[cfg_attr(feature = "rocket", derive(FromFormField))] #[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))] pub enum Ordering { - #[cfg_attr(feature = "serde", field(value = "desc"))] + #[cfg_attr(feature = "rocket", field(value = "desc"))] Desc, - #[cfg_attr(feature = "serde", field(value = "asc"))] + #[cfg_attr(feature = "rocket", field(value = "asc"))] Asc, } diff --git a/web/Cargo.toml b/web/Cargo.toml index 4699c86..7f3a270 100644 --- a/web/Cargo.toml +++ b/web/Cargo.toml @@ -7,3 +7,11 @@ edition = "2021" [dependencies] yew = "0.19" +yew-router = "0.16" +web-sys = { version = "0.3", features = ["Request", "RequestInit", "RequestMode", "Response", "Headers"] } +lan_party_core = { path = "../core", features = ["serde"] } +wasm-bindgen = { version = "0.2", features = ["serde-serialize"] } +wasm-bindgen-futures = "0.4" +serde = "1" +serde_json = "1" +thiserror = "1" diff --git a/web/dist/index-1257202110ca2b53_bg.wasm b/web/dist/index-1257202110ca2b53_bg.wasm deleted file mode 100644 index 289d945..0000000 Binary files a/web/dist/index-1257202110ca2b53_bg.wasm and /dev/null differ diff --git a/web/dist/index-1257202110ca2b53.js b/web/dist/index-8b6dadb5b2545aea.js similarity index 70% rename from web/dist/index-1257202110ca2b53.js rename to web/dist/index-8b6dadb5b2545aea.js index e299763..ce79a6b 100644 --- a/web/dist/index-1257202110ca2b53.js +++ b/web/dist/index-8b6dadb5b2545aea.js @@ -1,45 +1,6 @@ let wasm; -const heap = new Array(32).fill(undefined); - -heap.push(undefined, null, true, false); - -function getObject(idx) { return heap[idx]; } - -let heap_next = heap.length; - -function addHeapObject(obj) { - if (heap_next === heap.length) heap.push(heap.length + 1); - const idx = heap_next; - heap_next = heap[idx]; - - heap[idx] = obj; - return idx; -} - -function isLikeNone(x) { - return x === undefined || x === null; -} - -let cachedFloat64Memory0 = new Float64Array(); - -function getFloat64Memory0() { - if (cachedFloat64Memory0.byteLength === 0) { - cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer); - } - return cachedFloat64Memory0; -} - -let cachedInt32Memory0 = new Int32Array(); - -function getInt32Memory0() { - if (cachedInt32Memory0.byteLength === 0) { - cachedInt32Memory0 = new Int32Array(wasm.memory.buffer); - } - return cachedInt32Memory0; -} - const cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }); cachedTextDecoder.decode(); @@ -57,6 +18,100 @@ function getStringFromWasm0(ptr, len) { return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len)); } +const heap = new Array(32).fill(undefined); + +heap.push(undefined, null, true, false); + +let heap_next = heap.length; + +function addHeapObject(obj) { + if (heap_next === heap.length) heap.push(heap.length + 1); + const idx = heap_next; + heap_next = heap[idx]; + + heap[idx] = obj; + return idx; +} + +function getObject(idx) { return heap[idx]; } + +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 (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); + + offset += ret.written; + } + + WASM_VECTOR_LEN = offset; + return ptr; +} + +let cachedInt32Memory0 = new Int32Array(); + +function getInt32Memory0() { + if (cachedInt32Memory0.byteLength === 0) { + cachedInt32Memory0 = new Int32Array(wasm.memory.buffer); + } + return cachedInt32Memory0; +} + +function isLikeNone(x) { + return x === undefined || x === null; +} + +let cachedFloat64Memory0 = new Float64Array(); + +function getFloat64Memory0() { + if (cachedFloat64Memory0.byteLength === 0) { + cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer); + } + return cachedFloat64Memory0; +} + function dropObject(idx) { if (idx < 36) return; heap[idx] = heap_next; @@ -134,61 +189,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 (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); - - offset += ret.written; - } - - WASM_VECTOR_LEN = offset; - return ptr; -} - function makeClosure(arg0, arg1, dtor, f) { const state = { a: arg0, b: arg1, cnt: 1, dtor }; const real = (...args) => { @@ -210,8 +210,52 @@ function makeClosure(arg0, arg1, dtor, f) { return real; } -function __wbg_adapter_18(arg0, arg1, arg2) { - wasm._dyn_core__ops__function__Fn__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hdd7f308d47caeab7(arg0, arg1, addHeapObject(arg2)); +function __wbg_adapter_24(arg0, arg1, arg2) { + wasm._dyn_core__ops__function__Fn__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hf2a95eaa6a1fe8eb(arg0, arg1, addHeapObject(arg2)); +} + +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; +} + +let stack_pointer = 32; + +function addBorrowedObject(obj) { + if (stack_pointer == 1) throw new Error('out of js stack'); + heap[--stack_pointer] = obj; + return stack_pointer; +} +function __wbg_adapter_27(arg0, arg1, arg2) { + try { + wasm._dyn_core__ops__function__FnMut___A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h3700fed383a0f072(arg0, arg1, addBorrowedObject(arg2)); + } finally { + heap[stack_pointer++] = undefined; + } +} + +function __wbg_adapter_30(arg0, arg1, arg2) { + wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h0ff5f5f93b8ace87(arg0, arg1, addHeapObject(arg2)); } let cachedUint32Memory0 = new Uint32Array(); @@ -275,10 +319,30 @@ async function load(module, imports) { function getImports() { const imports = {}; imports.wbg = {}; + 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_json_parse = function(arg0, arg1) { + const ret = JSON.parse(getStringFromWasm0(arg0, arg1)); + return addHeapObject(ret); + }; + imports.wbg.__wbindgen_json_serialize = function(arg0, arg1) { + const obj = getObject(arg1); + const ret = JSON.stringify(obj === undefined ? null : obj); + 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.__wbindgen_is_undefined = function(arg0) { + const ret = getObject(arg0) === undefined; + return ret; + }; imports.wbg.__wbindgen_number_get = function(arg0, arg1) { const obj = getObject(arg1); const ret = typeof(obj) === 'number' ? obj : undefined; @@ -289,13 +353,6 @@ function getImports() { const ret = arg0; return addHeapObject(ret); }; - imports.wbg.__wbindgen_string_new = function(arg0, arg1) { - const ret = getStringFromWasm0(arg0, arg1); - return addHeapObject(ret); - }; - imports.wbg.__wbindgen_object_drop_ref = function(arg0) { - takeObject(arg0); - }; imports.wbg.__wbg_error_09919627ac0992f5 = function(arg0, arg1) { try { console.error(getStringFromWasm0(arg0, arg1)); @@ -314,6 +371,18 @@ function getImports() { getInt32Memory0()[arg0 / 4 + 1] = len0; getInt32Memory0()[arg0 / 4 + 0] = ptr0; }; + 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; + return ret; + }; imports.wbg.__wbg_warn_921059440157e870 = function(arg0, arg1) { var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice(); wasm.__wbindgen_free(arg0, arg1 * 4); @@ -327,6 +396,18 @@ function getImports() { const ret = getObject(arg0).document; return isLikeNone(ret) ? 0 : addHeapObject(ret); }; + imports.wbg.__wbg_location_312161fbd0cf64f0 = function(arg0) { + const ret = getObject(arg0).location; + return addHeapObject(ret); + }; + imports.wbg.__wbg_history_cb2cdfbe20fef7ad = function() { return handleError(function (arg0) { + const ret = getObject(arg0).history; + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_fetch_9a5cb9d8a96004d0 = function(arg0, arg1) { + const ret = getObject(arg0).fetch(getObject(arg1)); + return addHeapObject(ret); + }; imports.wbg.__wbg_body_5e6efc7a3c1b65f3 = function(arg0) { const ret = getObject(arg0).body; return isLikeNone(ret) ? 0 : addHeapObject(ret); @@ -343,6 +424,36 @@ function getImports() { const ret = getObject(arg0).createTextNode(getStringFromWasm0(arg1, arg2)); return addHeapObject(ret); }; + imports.wbg.__wbg_querySelector_73feab41810011dc = function() { return handleError(function (arg0, arg1, arg2) { + const ret = getObject(arg0).querySelector(getStringFromWasm0(arg1, arg2)); + return isLikeNone(ret) ? 0 : addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_instanceof_HtmlInputElement_3fad42774bc62388 = function(arg0) { + const ret = getObject(arg0) instanceof HTMLInputElement; + return ret; + }; + imports.wbg.__wbg_setchecked_a450b330df6b3fa5 = function(arg0, arg1) { + getObject(arg0).checked = arg1 !== 0; + }; + imports.wbg.__wbg_value_30770021ca38e0db = 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_setvalue_7b7950dacc5eb607 = function(arg0, arg1, arg2) { + getObject(arg0).value = getStringFromWasm0(arg1, arg2); + }; + imports.wbg.__wbg_addEventListener_ec92ea1297eefdfc = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { + getObject(arg0).addEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3), getObject(arg4)); + }, arguments) }; + imports.wbg.__wbg_removeEventListener_bfe676215a590711 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { + getObject(arg0).removeEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3), arg4 !== 0); + }, arguments) }; + imports.wbg.__wbg_pushState_65b5fb0f30ca9d61 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) { + getObject(arg0).pushState(getObject(arg1), getStringFromWasm0(arg2, arg3), arg4 === 0 ? undefined : getStringFromWasm0(arg4, arg5)); + }, arguments) }; imports.wbg.__wbg_parentElement_14138ef2ff0b9c88 = function(arg0) { const ret = getObject(arg0).parentElement; return isLikeNone(ret) ? 0 : addHeapObject(ret); @@ -366,6 +477,20 @@ function getImports() { const ret = getObject(arg0).removeChild(getObject(arg1)); return addHeapObject(ret); }, arguments) }; + imports.wbg.__wbg_new_4cba26249c1686cd = function() { return handleError(function () { + const ret = new Headers(); + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_append_9c6d4d7f71076e48 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { + getObject(arg0).append(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4)); + }, arguments) }; + imports.wbg.__wbg_pathname_c08f1ef51f6ebba9 = function() { return handleError(function (arg0, arg1) { + const ret = getObject(arg1).pathname; + 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_Element_1714e50f9bda1d15 = function(arg0) { const ret = getObject(arg0) instanceof Element; return ret; @@ -383,6 +508,28 @@ function getImports() { imports.wbg.__wbg_setAttribute_8cfc462c0dedd03b = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { getObject(arg0).setAttribute(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4)); }, arguments) }; + imports.wbg.__wbg_log_17733ab6fa45831d = function(arg0) { + console.log(getObject(arg0)); + }; + imports.wbg.__wbg_instanceof_Response_240e67e5796c3c6b = function(arg0) { + const ret = getObject(arg0) instanceof Response; + return ret; + }; + imports.wbg.__wbg_json_30d916f3f34485ab = function() { return handleError(function (arg0) { + const ret = getObject(arg0).json(); + return addHeapObject(ret); + }, arguments) }; + imports.wbg.__wbg_pathname_8ed2fc02f98aeaaf = function(arg0, arg1) { + const ret = getObject(arg1).pathname; + 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_new_d1d1300265e34170 = function() { return handleError(function (arg0, arg1) { + const ret = new URL(getStringFromWasm0(arg0, arg1)); + return addHeapObject(ret); + }, arguments) }; imports.wbg.__wbg_value_eb32f706ae6bfab2 = function(arg0, arg1) { const ret = getObject(arg1).value; const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); @@ -393,18 +540,9 @@ function getImports() { imports.wbg.__wbg_setvalue_3dd349be116107ce = function(arg0, arg1, arg2) { getObject(arg0).value = getStringFromWasm0(arg1, arg2); }; - imports.wbg.__wbg_setchecked_a450b330df6b3fa5 = function(arg0, arg1) { - getObject(arg0).checked = arg1 !== 0; - }; - imports.wbg.__wbg_value_30770021ca38e0db = 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_setvalue_7b7950dacc5eb607 = function(arg0, arg1, arg2) { - getObject(arg0).value = getStringFromWasm0(arg1, arg2); + imports.wbg.__wbg_instanceof_Event_8c74064684d03e14 = function(arg0) { + const ret = getObject(arg0) instanceof Event; + return ret; }; imports.wbg.__wbg_target_68a5c10e2732a79e = function(arg0) { const ret = getObject(arg0).target; @@ -414,8 +552,16 @@ function getImports() { const ret = getObject(arg0).cancelBubble; return ret; }; - imports.wbg.__wbg_addEventListener_ec92ea1297eefdfc = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { - getObject(arg0).addEventListener(getStringFromWasm0(arg1, arg2), getObject(arg3), getObject(arg4)); + imports.wbg.__wbg_href_cae04ee9562fc683 = function(arg0, arg1) { + const ret = getObject(arg1).href; + 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_newwithstrandinit_de7c409ec8538105 = function() { return handleError(function (arg0, arg1, arg2) { + const ret = new Request(getStringFromWasm0(arg0, arg1), getObject(arg2)); + return addHeapObject(ret); }, arguments) }; imports.wbg.__wbg_newnoargs_971e9a5abe185139 = function(arg0, arg1) { const ret = new Function(getStringFromWasm0(arg0, arg1)); @@ -437,6 +583,18 @@ function getImports() { const ret = new Object(); return addHeapObject(ret); }; + imports.wbg.__wbg_resolve_0107b3a501450ba0 = function(arg0) { + const ret = Promise.resolve(getObject(arg0)); + return addHeapObject(ret); + }; + imports.wbg.__wbg_then_18da6e5453572fc8 = function(arg0, arg1) { + const ret = getObject(arg0).then(getObject(arg1)); + return addHeapObject(ret); + }; + imports.wbg.__wbg_then_e5489f796341454b = function(arg0, arg1, arg2) { + const ret = getObject(arg0).then(getObject(arg1), getObject(arg2)); + return addHeapObject(ret); + }; imports.wbg.__wbg_globalThis_3348936ac49df00a = function() { return handleError(function () { const ret = globalThis.globalThis; return addHeapObject(ret); @@ -461,10 +619,6 @@ function getImports() { const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2)); return ret; }, arguments) }; - imports.wbg.__wbindgen_is_undefined = function(arg0) { - const ret = getObject(arg0) === undefined; - return ret; - }; imports.wbg.__wbindgen_debug_string = function(arg0, arg1) { const ret = debugString(getObject(arg1)); const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); @@ -475,8 +629,16 @@ function getImports() { imports.wbg.__wbindgen_throw = function(arg0, arg1) { throw new Error(getStringFromWasm0(arg0, arg1)); }; - imports.wbg.__wbindgen_closure_wrapper1877 = function(arg0, arg1, arg2) { - const ret = makeClosure(arg0, arg1, 97, __wbg_adapter_18); + imports.wbg.__wbindgen_closure_wrapper7414 = function(arg0, arg1, arg2) { + const ret = makeClosure(arg0, arg1, 466, __wbg_adapter_24); + return addHeapObject(ret); + }; + imports.wbg.__wbindgen_closure_wrapper8075 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 520, __wbg_adapter_27); + return addHeapObject(ret); + }; + imports.wbg.__wbindgen_closure_wrapper8354 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 525, __wbg_adapter_30); return addHeapObject(ret); }; @@ -512,7 +674,7 @@ function initSync(bytes) { async function init(input) { if (typeof input === 'undefined') { - input = new URL('index-1257202110ca2b53_bg.wasm', import.meta.url); + input = new URL('index-8b6dadb5b2545aea_bg.wasm', import.meta.url); } const imports = getImports(); diff --git a/web/dist/index-8b6dadb5b2545aea_bg.wasm b/web/dist/index-8b6dadb5b2545aea_bg.wasm new file mode 100644 index 0000000..4c3f993 Binary files /dev/null and b/web/dist/index-8b6dadb5b2545aea_bg.wasm differ diff --git a/web/dist/index.html b/web/dist/index.html index cc40969..8feba5e 100644 --- a/web/dist/index.html +++ b/web/dist/index.html @@ -1,34 +1,12 @@
+ +