diff --git a/.github/workflows/deploy_web_demo.yml b/.github/workflows/deploy_web_demo.yml index 58fb851..e360ae1 100644 --- a/.github/workflows/deploy_web_demo.yml +++ b/.github/workflows/deploy_web_demo.yml @@ -1,51 +1,54 @@ -name: Deploy web demo +name: Github Pages +# By default, runs if you push to main. keeps your deployed app in sync with main branch. on: + # push: + # branches: + # - main +# to only run when you do a new github release, comment out above part and uncomment the below trigger. release: types: ["published"] - +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: - contents: write # for committing to gh-pages branch + contents: read + pages: write + id-token: write +# Allow one concurrent deployment concurrency: group: "pages" - cancel-in-progress: false - -env: - RUSTFLAGS: --cfg=web_sys_unstable_apis -D warnings - RUSTDOCFLAGS: -D warnings + cancel-in-progress: true jobs: - # Single deploy job since we're just deploying deploy: - name: Deploy web demo - runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v3 - - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - target: wasm32-unknown-unknown - toolchain: 1.76.0 - override: true - - - uses: Swatinem/rust-cache@v2 - with: - prefix-key: "web-demo-" - - - name: "Install wasmopt / binaryen" + - uses: actions/checkout@v4 # repo checkout + - name: Setup toolchain for wasm run: | - sudo apt-get update && sudo apt-get install binaryen - - - run: | - scripts/build_web.sh - - - name: Deploy - uses: JamesIves/github-pages-deploy-action@v4 + rustup update stable + rustup default stable + rustup set profile minimal + rustup target add wasm32-unknown-unknown + - name: Rust Cache # cache the rust build artefacts + uses: Swatinem/rust-cache@v2 + - name: Download and install Trunk binary + run: wget -qO- https://github.com/thedodd/trunk/releases/latest/download/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf- + - name: Build # build + # Environment $public_url resolves to the github project page. + # If using a user/organization page, remove the `${{ github.event.repository.name }}` part. + # using --public-url something will allow trunk to modify all the href paths like from favicon.ico to repo_name/favicon.ico . + # this is necessary for github pages where the site is deployed to username.github.io/repo_name and all files must be requested + # relatively as eframe_template/favicon.ico. if we skip public-url option, the href paths will instead request username.github.io/favicon.ico which + # will obviously return error 404 not found. + run: ./trunk build --release --public-url $public_url + env: + public_url: "https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}" + #public_url: "./" + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 with: - folder: web_demo - single-commit: true + path: "dist" + - name: Deploy to GitHub Pages + uses: actions/deploy-pages@v4 \ No newline at end of file diff --git a/.gitignore b/.gitignore index 2a0038a..f161260 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /target -.idea \ No newline at end of file +.idea +dist/ diff --git a/Cargo.lock b/Cargo.lock index cb1b744..a71727b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "ab_glyph" @@ -1618,6 +1618,7 @@ dependencies = [ "ehttp", "indexmap", "json-flat-parser", + "log", "nohash-hasher", "parking_lot_mpsc", "rayon", @@ -1723,9 +1724,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.22" +version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" [[package]] name = "malloc_buf" diff --git a/Cargo.toml b/Cargo.toml index 63b4d3e..6f8bd0e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,6 +26,7 @@ serde_json = "1.0.120" regex-lite = "0.1.6" parking_lot_mpsc = { version = "0.1.5" } ehttp = "0.5.0" +log = "0.4.27" #[patch."https://github.com/nmeylan/json-parser-flat-format.git"] #json-flat-parser = {path = "C:\\dev\\ragnarok\\json-flat-parser"} @@ -42,4 +43,4 @@ web-sys = { version = "0.3.70", features = ["console"], default-features = false opt-level = 2 [features] -dist = [] \ No newline at end of file +dist = [] diff --git a/README.md b/README.md index b369d6d..357e460 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Important **Memory usage**: While this tool allow to edit large json file smoothly, it consumes a lot of memory due to technical decision which tradeoff memory in favor of better performance for navigation, edition and serialization. Read below section "Performance and Memory usage" for more details -[Web demo](https://nmeylan.github.io/json-table-editor/web/) +[Web demo](https://nmeylan.github.io/json-table-editor/) or launch it with [trunk](https://trunkrs.dev/) using `trunk serve` # Genesis I wanted to edit a [small json file](https://github.com/nmeylan/rust-ro/blob/master/config/skill.json) of 1.5mb, using a table view, javascript based tools like http://json2table.com/# and https://jsongrid.com/json-grid were too slow to edit this file and barely usable, so I decided to attempt to do it myself diff --git a/Trunk.toml b/Trunk.toml new file mode 100644 index 0000000..e015195 --- /dev/null +++ b/Trunk.toml @@ -0,0 +1,3 @@ +[build] +target = "app.html" +html_output = "app.html" diff --git a/app.html b/app.html new file mode 100644 index 0000000..1a1546a --- /dev/null +++ b/app.html @@ -0,0 +1,209 @@ + + + + + + + + + JSON viewer and JSON editor online + + + + + + + + + +
+

Loading…

+
+
+ + + + + + + + + + + + diff --git a/web/alternative.html b/public/alternative.html similarity index 100% rename from web/alternative.html rename to public/alternative.html diff --git a/web/index.html b/public/index.html similarity index 100% rename from web/index.html rename to public/index.html diff --git a/web/json-editor.png b/public/json-editor.png similarity index 100% rename from web/json-editor.png rename to public/json-editor.png diff --git a/web/robots.txt b/public/robots.txt similarity index 100% rename from web/robots.txt rename to public/robots.txt diff --git a/web/skill.json b/public/skill.json similarity index 100% rename from web/skill.json rename to public/skill.json diff --git a/rust-toolchain b/rust-toolchain new file mode 100644 index 0000000..4bc0fd0 --- /dev/null +++ b/rust-toolchain @@ -0,0 +1,10 @@ +# If you see this, run "rustup self update" to get rustup 1.23 or newer. + +# NOTE: above comment is for older `rustup` (before TOML support was added), +# which will treat the first line as the toolchain name, and therefore show it +# to the user in the error, instead of "error: invalid channel name '[toolchain]'". + +[toolchain] +channel = "1.81" # Avoid specifying a patch version here; see https://github.com/emilk/eframe_template/issues/145 +components = [ "rustfmt", "clippy" ] +targets = [ "wasm32-unknown-unknown" ] \ No newline at end of file diff --git a/scripts/build_web.sh b/scripts/build_web.sh deleted file mode 100755 index 91f0389..0000000 --- a/scripts/build_web.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env bash -set -eu -script_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) -cd "$script_path/.." - -./scripts/setup_web.sh - -# This is required to enable the web_sys clipboard API which eframe web uses -# https://rustwasm.github.io/wasm-bindgen/api/web_sys/struct.Clipboard.html -# https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html -export RUSTFLAGS=--cfg=web_sys_unstable_apis - -CRATE_NAME="json-editor" - -FEATURES="all-features" - -OPEN=false -OPTIMIZE=true -BUILD=release -BUILD_FLAGS="--release" -WGPU=true -WASM_OPT_FLAGS="-O2 --fast-math -g" - -OUT_FILE_NAME="json-editor" - -FINAL_WASM_PATH=web/${OUT_FILE_NAME}_bg.wasm - -# Clear output from old stuff: -rm -f "${FINAL_WASM_PATH}" - -echo "Building rust…" -echo "cargo build ${BUILD_FLAGS}" -cargo build \ - ${BUILD_FLAGS} \ - --bin ${OUT_FILE_NAME} \ - --target wasm32-unknown-unknown - -# Get the output directory (in the workspace it is in another location) -# TARGET=`cargo metadata --format-version=1 | jq --raw-output .target_directory` -TARGET="target" - -echo "Generating JS bindings for wasm…" -TARGET_NAME="${CRATE_NAME}.wasm" -WASM_PATH="${TARGET}/wasm32-unknown-unknown/$BUILD/$TARGET_NAME" -wasm-bindgen "${WASM_PATH}" --out-dir web --out-name ${OUT_FILE_NAME} --no-modules --no-typescript - -if [[ "${OPTIMIZE}" = true ]]; then - echo "Optimizing wasm…" - # to get wasm-opt: apt/brew/dnf install binaryen - wasm-opt "${FINAL_WASM_PATH}" $WASM_OPT_FLAGS -o "${FINAL_WASM_PATH}" -fi - -echo "Finished ${FINAL_WASM_PATH}" \ No newline at end of file diff --git a/scripts/setup_web.sh b/scripts/setup_web.sh deleted file mode 100755 index 1c5c143..0000000 --- a/scripts/setup_web.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -set -eu -script_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) -cd "$script_path/.." - -# Pre-requisites: -rustup target add wasm32-unknown-unknown - -# For generating JS bindings: -cargo install --quiet wasm-bindgen-cli --version 0.2.99 diff --git a/src/array_table.rs b/src/array_table.rs index d90e56a..54c73ad 100644 --- a/src/array_table.rs +++ b/src/array_table.rs @@ -17,7 +17,6 @@ use eframe::egui::{ Align, Context, CursorIcon, Id, Key, Label, Sense, Style, TextEdit, Ui, Vec2, Widget, WidgetText, }; -use eframe::epaint::text::TextWrapMode; use egui::{EventFilter, InputState, Modifiers, Rangef, TextBuffer}; use indexmap::IndexSet; use json_flat_parser::serializer::serialize_to_json_with_option; @@ -629,7 +628,12 @@ impl<'array> ArrayTable<'array> { if pinned_column_table && i == 0 { table = table.column(Column::initial(40.0).clip(true).resizable(true)); } else if i == columns_count - 1 { - table = table.column(Column::remainder().clip(false).resizable(true).range(Rangef::new(240.0, f32::INFINITY))); + table = table.column( + Column::remainder() + .clip(false) + .resizable(true) + .range(Rangef::new(240.0, f32::INFINITY)), + ); } else { table = table.column( Column::initial((columns[i].name.len() + 3).max(10) as f32 * text_width) @@ -638,7 +642,6 @@ impl<'array> ArrayTable<'array> { ); } // table = table.column(Column::initial(10.0).clip(true).resizable(true)); - } } @@ -1523,7 +1526,9 @@ impl<'array> ArrayTable<'array> { self.scroll_to_row_number = focused_cell.row_index; self.changed_arrow_vertical_scroll = true; } - if i.consume_key(Modifiers::NONE, Key::ArrowDown) && focused_cell.row_index < self.filtered_nodes.len() - 1 { + if i.consume_key(Modifiers::NONE, Key::ArrowDown) + && focused_cell.row_index < self.filtered_nodes.len() - 1 + { focused_cell.row_index += 1; self.scroll_to_row_number = focused_cell.row_index; self.changed_arrow_vertical_scroll = true; diff --git a/src/compatibility.rs b/src/compatibility.rs index a7045cd..365e2c7 100644 --- a/src/compatibility.rs +++ b/src/compatibility.rs @@ -1,4 +1,9 @@ +#[cfg(not(target_arch = "wasm32"))] use std::time::Instant; + +#[cfg(target_arch = "wasm32")] +use std::time::Duration; + #[macro_export] macro_rules! log { () => { diff --git a/src/main.rs b/src/main.rs index 41bf766..6ffccb5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,7 @@ -#![cfg_attr(all(target_os = "windows", feature = "dist"), windows_subsystem = "windows")] +#![cfg_attr( + all(target_os = "windows", feature = "dist"), + windows_subsystem = "windows" +)] extern crate core; @@ -11,7 +14,6 @@ mod panels; pub mod parser; mod replace_panel; mod subtable_window; -mod web; use std::collections::BTreeSet; use std::fmt::Write; @@ -29,7 +31,7 @@ use crate::components::icon; use crate::components::table::HoverData; use crate::fonts::{CHEVRON_DOWN, CHEVRON_UP}; use crate::panels::{AboutPanel, PANEL_ABOUT}; -use crate::parser::{save_to_buffer, save_to_file}; +use crate::parser::save_to_file; use eframe::egui::Context; use eframe::egui::{ Align, Align2, Button, Color32, ComboBox, CursorIcon, Id, Key, KeyboardShortcut, Label, @@ -42,6 +44,9 @@ use egui::style::ScrollStyle; use egui::ScrollArea; use json_flat_parser::{FlatJsonValue, JSONParser, ParseOptions, PointerKey, ValueType}; +#[cfg(target_arch = "wasm32")] +use crate::parser::save_to_buffer; + pub const ACTIVE_COLOR: Color32 = Color32::from_rgb(63, 142, 252); pub const SHORTCUT_SAVE: KeyboardShortcut = KeyboardShortcut::new(Modifiers::COMMAND, Key::S); @@ -90,50 +95,48 @@ impl ArrayResponse { } } +#[cfg(not(target_arch = "wasm32"))] fn main() { - #[cfg(not(target_arch = "wasm32"))] - { - let options = eframe::NativeOptions { - persist_window: false, - renderer: Renderer::Glow, - viewport: eframe::egui::ViewportBuilder::default() - .with_inner_size(Vec2 { - x: 1200.0, - y: 900.0, - }) - .with_maximized(true) - .with_icon(Arc::new( - eframe::icon_data::from_png_bytes(include_bytes!("../icons/logo.png")).unwrap(), - )), - // viewport: egui::ViewportBuilder::default().with_inner_size(Vec2 { x: 1900.0, y: 1200.0 }).with_maximized(true), - ..eframe::NativeOptions::default() - }; - eframe::run_native( - "JSON table editor", - options, - Box::new(|cc| { - egui_extras::install_image_loaders(&cc.egui_ctx); - let mut style = (*cc.egui_ctx.style()).clone(); - style.spacing.scroll.floating = false; - style.spacing.scroll.bar_width = 4.0; - style.spacing.scroll.bar_inner_margin = 6.0; - cc.egui_ctx.set_style(style); - let mut app = MyApp::new(cc); - - let args: Vec<_> = env::args().collect(); - if args.len() >= 2 { - println!("Opening {}", args[1].as_str()); - app.selected_file = Some(PathBuf::from(args[1].as_str())); - app.should_parse_again = true; - } - if args.len() >= 3 { - app.selected_pointer = Some(args[2].clone()); - } - Ok(Box::new(app)) - }), - ) - .unwrap(); - } + let options = eframe::NativeOptions { + persist_window: false, + renderer: Renderer::Glow, + viewport: eframe::egui::ViewportBuilder::default() + .with_inner_size(Vec2 { + x: 1200.0, + y: 900.0, + }) + .with_maximized(true) + .with_icon(Arc::new( + eframe::icon_data::from_png_bytes(include_bytes!("../icons/logo.png")).unwrap(), + )), + // viewport: egui::ViewportBuilder::default().with_inner_size(Vec2 { x: 1900.0, y: 1200.0 }).with_maximized(true), + ..eframe::NativeOptions::default() + }; + eframe::run_native( + "JSON table editor", + options, + Box::new(|cc| { + egui_extras::install_image_loaders(&cc.egui_ctx); + let mut style = (*cc.egui_ctx.style()).clone(); + style.spacing.scroll.floating = false; + style.spacing.scroll.bar_width = 4.0; + style.spacing.scroll.bar_inner_margin = 6.0; + cc.egui_ctx.set_style(style); + let mut app = MyApp::new(cc); + + let args: Vec<_> = env::args().collect(); + if args.len() >= 2 { + println!("Opening {}", args[1].as_str()); + app.selected_file = Some(PathBuf::from(args[1].as_str())); + app.should_parse_again = true; + } + if args.len() >= 3 { + app.selected_pointer = Some(args[2].clone()); + } + Ok(Box::new(app)) + }), + ) + .unwrap(); } struct MyApp<'array> { @@ -204,33 +207,32 @@ impl MyApp<'_> { set_open(open, self.about_panel.name(), is_open); } + #[cfg(not(target_arch = "wasm32"))] pub fn open_json(&mut self) { - #[cfg(not(target_arch = "wasm32"))] - { - let mut file = File::open(self.selected_file.as_ref().unwrap()).unwrap(); - let metadata1 = file.metadata().unwrap(); + let mut file = File::open(self.selected_file.as_ref().unwrap()).unwrap(); + let metadata1 = file.metadata().unwrap(); - let size = (metadata1.len() / 1024 / 1024) as usize; - let max_depth = if size < 100 { - // 1 - u8::MAX - } else { - 1 // should start after prefix - }; - let mut content = String::with_capacity(metadata1.len() as usize); - // let mut reader = LfToCrlfReader::new(file); - // reader.read_to_string(&mut content); - file.read_to_string(&mut content).unwrap(); + let size = (metadata1.len() / 1024 / 1024) as usize; + let max_depth = if size < 100 { + // 1 + u8::MAX + } else { + 1 // should start after prefix + }; + let mut content = String::with_capacity(metadata1.len() as usize); + // let mut reader = LfToCrlfReader::new(file); + // reader.read_to_string(&mut content); + file.read_to_string(&mut content).unwrap(); - self.open_json_content(max_depth, content.as_bytes()); - } - #[cfg(target_arch = "wasm32")] - { - if self.web_loaded_json.is_some() { - let json = mem::take(&mut self.web_loaded_json); - self.open_json_content(u8::MAX, json.unwrap().as_slice()); - self.selected_file = Some(PathBuf::default()); - } + self.open_json_content(max_depth, content.as_bytes()); + } + + #[cfg(target_arch = "wasm32")] + pub fn open_json(&mut self) { + if self.web_loaded_json.is_some() { + let json = mem::take(&mut self.web_loaded_json); + self.open_json_content(u8::MAX, json.unwrap().as_slice()); + self.selected_file = Some(PathBuf::default()); } } @@ -331,27 +333,25 @@ impl MyApp<'_> { } } + #[cfg(not(target_arch = "wasm32"))] fn file_picker(&mut self) { - #[cfg(not(target_arch = "wasm32"))] - { - if let Some(path) = rfd::FileDialog::new().pick_file() { - self.selected_file = Some(path); - self.should_parse_again = true; - self.table = None; - } + if let Some(path) = rfd::FileDialog::new().pick_file() { + self.selected_file = Some(path); + self.should_parse_again = true; + self.table = None; } + } - #[cfg(target_arch = "wasm32")] - { - let sender = self.async_events_channel.0.clone(); - self.force_repaint = true; - let future = async move { - if let Some(file_handle) = rfd::AsyncFileDialog::new().pick_file().await { - sender.send(AsyncEvent::LoadJson(file_handle.read().await)); - } - }; - wasm_bindgen_futures::spawn_local(future); - } + #[cfg(target_arch = "wasm32")] + fn file_picker(&mut self) { + let sender = self.async_events_channel.0.clone(); + self.force_repaint = true; + let future = async move { + if let Some(file_handle) = rfd::AsyncFileDialog::new().pick_file().await { + sender.send(AsyncEvent::LoadJson(file_handle.read().await)); + } + }; + wasm_bindgen_futures::spawn_local(future); } fn goto_next_matching_row_occurrence(table: &mut ArrayTable) -> bool { @@ -460,17 +460,16 @@ impl eframe::App for MyApp<'_> { if let Ok(event) = self.async_events_channel.1.try_recv() { self.force_repaint = false; match event { - AsyncEvent::LoadJson(_json_bytes) => { - #[cfg(target_arch = "wasm32")] - { - self.web_loaded_json = Some(json_bytes); - self.open_json(); - } + #[cfg(target_arch = "wasm32")] + AsyncEvent::LoadJson(json_bytes) => { + self.web_loaded_json = Some(json_bytes); + self.open_json(); } AsyncEvent::LoadSampleErr(err) => { self.failed_to_load_sample_json = Some(err); ctx.request_repaint(); } + _ => {} } } #[cfg(not(target_arch = "wasm32"))] @@ -738,7 +737,7 @@ impl eframe::App for MyApp<'_> { let max_rect = ui.max_rect(); let mut rect = ui.max_rect(); rect.min.y = rect.max.y / 2.0 - 20.0; - let already_interact = false; + let mut already_interact = false; if !already_interact { let response = ui.interact(max_rect, Id::new("select_file"), Sense::click()); @@ -755,7 +754,7 @@ impl eframe::App for MyApp<'_> { if ui.button("Or load sample json file of 1mb").clicked() { self.failed_to_load_sample_json = None; already_interact = true; - let request = ehttp::Request::get("https://raw.githubusercontent.com/nmeylan/json-table-editor/master/web/skill.json"); + let request = ehttp::Request::get("https://raw.githubusercontent.com/nmeylan/json-table-editor/master/public/skill.json"); self.force_repaint = true; let sender = self.async_events_channel.0.clone(); ehttp::fetch(request, move |result: ehttp::Result| { @@ -775,7 +774,7 @@ impl eframe::App for MyApp<'_> { if let Some(ref failed_to_load_sample_json) = self.failed_to_load_sample_json { ui.colored_label(Color32::RED, failed_to_load_sample_json); } - if ui.hyperlink_to("Sample source available here", "https://raw.githubusercontent.com/nmeylan/json-table-editor/master/web/skill.json").clicked() { + if ui.hyperlink_to("Sample source available here", "https://raw.githubusercontent.com/nmeylan/json-table-editor/master/public/skill.json").clicked() { already_interact = true; } } @@ -844,3 +843,12 @@ impl eframe::App for MyApp<'_> { } } } + +#[cfg(target_arch = "wasm32")] +mod web; + +// When compiling to web using trunk +#[cfg(target_arch = "wasm32")] +fn main() { + web::run_on_web(); +} diff --git a/src/web.rs b/src/web.rs index 43eca1d..bd224f9 100644 --- a/src/web.rs +++ b/src/web.rs @@ -1,15 +1,14 @@ -#[cfg(target_arch = "wasm32")] +#![cfg(target_arch = "wasm32")] + use wasm_bindgen::prelude::*; /// Our handle to the web app from JavaScript. #[derive(Clone)] -#[cfg(target_arch = "wasm32")] #[wasm_bindgen] pub struct WebHandle { runner: eframe::WebRunner, } -#[cfg(target_arch = "wasm32")] #[wasm_bindgen] impl WebHandle { /// Installs a panic hook, then returns. @@ -21,7 +20,6 @@ impl WebHandle { } } - #[cfg(target_arch = "wasm32")] #[wasm_bindgen] pub async fn start( &self, @@ -36,13 +34,11 @@ impl WebHandle { .await } - #[cfg(target_arch = "wasm32")] #[wasm_bindgen] pub fn destroy(&self) { self.runner.destroy(); } - #[cfg(target_arch = "wasm32")] #[wasm_bindgen] pub fn example(&self) { if let Some(_app) = self.runner.app_mut::() { @@ -50,21 +46,63 @@ impl WebHandle { } } - #[cfg(target_arch = "wasm32")] #[wasm_bindgen] pub fn has_panicked(&self) -> bool { self.runner.has_panicked() } - #[cfg(target_arch = "wasm32")] #[wasm_bindgen] pub fn panic_message(&self) -> Option { self.runner.panic_summary().map(|s| s.message()) } - #[cfg(target_arch = "wasm32")] #[wasm_bindgen] pub fn panic_callstack(&self) -> Option { self.runner.panic_summary().map(|s| s.callstack()) } } + +pub fn run_on_web() { + use eframe::wasm_bindgen::JsCast as _; + + // Redirect `log` message to `console.log` and friends: + eframe::WebLogger::init(log::LevelFilter::Debug).ok(); + + let web_options = eframe::WebOptions::default(); + + wasm_bindgen_futures::spawn_local(async { + let document = web_sys::window() + .expect("No window") + .document() + .expect("No document"); + + let canvas = document + .get_element_by_id("the_canvas_id") + .expect("Failed to find the_canvas_id") + .dyn_into::() + .expect("the_canvas_id was not a HtmlCanvasElement"); + + let start_result = eframe::WebRunner::new() + .start( + canvas, + web_options, + Box::new(|cc| Ok(Box::new(crate::MyApp::new(cc)))), + ) + .await; + + // Remove the loading text and spinner: + if let Some(loading_text) = document.get_element_by_id("center_text") { + match start_result { + Ok(_) => { + loading_text.remove(); + } + Err(e) => { + loading_text.set_inner_html( + "

The app has crashed. See the developer console for details.

", + ); + panic!("Failed to start eframe: {e:?}"); + } + } + } + }); +} diff --git a/web/app.html b/web/app.html deleted file mode 100644 index e3d7b80..0000000 --- a/web/app.html +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - - - JSON viewer and JSON editor online - - - - - - - - - -
-

- Loading… -

-
-
- - - - - - - - - - - - - diff --git a/web/json-editor.js b/web/json-editor.js deleted file mode 100644 index 0d70b2c..0000000 --- a/web/json-editor.js +++ /dev/null @@ -1,1801 +0,0 @@ -let wasm_bindgen; -(function() { - const __exports = {}; - let script_src; - if (typeof document !== 'undefined' && document.currentScript !== null) { - script_src = new URL(document.currentScript.src, location.href).toString(); - } - let wasm = undefined; - - function isLikeNone(x) { - return x === undefined || x === null; - } - - function addToExternrefTable0(obj) { - const idx = wasm.__externref_table_alloc(); - wasm.__wbindgen_export_1.set(idx, obj); - return idx; - } - - const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } ); - - if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); }; - - let cachedUint8ArrayMemory0 = null; - - function getUint8ArrayMemory0() { - if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { - cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); - } - return cachedUint8ArrayMemory0; - } - - function getStringFromWasm0(ptr, len) { - ptr = ptr >>> 0; - return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); - } - - function handleError(f, args) { - try { - return f.apply(this, args); - } catch (e) { - const idx = addToExternrefTable0(e); - wasm.__wbindgen_exn_store(idx); - } - } - - let WASM_VECTOR_LEN = 0; - - const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } ); - - const encodeString = (typeof cachedTextEncoder.encodeInto === 'function' - ? function (arg, view) { - return cachedTextEncoder.encodeInto(arg, view); - } - : function (arg, view) { - const buf = cachedTextEncoder.encode(arg); - view.set(buf); - return { - read: arg.length, - written: buf.length - }; - }); - - function passStringToWasm0(arg, malloc, realloc) { - - if (realloc === undefined) { - const buf = cachedTextEncoder.encode(arg); - const ptr = malloc(buf.length, 1) >>> 0; - getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf); - WASM_VECTOR_LEN = buf.length; - return ptr; - } - - let len = arg.length; - let ptr = malloc(len, 1) >>> 0; - - const mem = getUint8ArrayMemory0(); - - let offset = 0; - - for (; offset < len; offset++) { - const code = arg.charCodeAt(offset); - if (code > 0x7F) break; - mem[ptr + offset] = code; - } - - if (offset !== len) { - if (offset !== 0) { - arg = arg.slice(offset); - } - ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0; - const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len); - const ret = encodeString(arg, view); - - offset += ret.written; - ptr = realloc(ptr, len, offset, 1) >>> 0; - } - - WASM_VECTOR_LEN = offset; - return ptr; - } - - let cachedDataViewMemory0 = null; - - function getDataViewMemory0() { - if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) { - cachedDataViewMemory0 = new DataView(wasm.memory.buffer); - } - return cachedDataViewMemory0; - } - - const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined') - ? { register: () => {}, unregister: () => {} } - : new FinalizationRegistry(state => { - wasm.__wbindgen_export_6.get(state.dtor)(state.a, state.b) - }); - - function makeMutClosure(arg0, arg1, dtor, f) { - const state = { a: arg0, b: arg1, cnt: 1, dtor }; - const real = (...args) => { - // First up with a closure we increment the internal reference - // count. This ensures that the Rust closure environment won't - // be deallocated while we're invoking it. - state.cnt++; - const a = state.a; - state.a = 0; - try { - return f(a, state.b, ...args); - } finally { - if (--state.cnt === 0) { - wasm.__wbindgen_export_6.get(state.dtor)(a, state.b); - CLOSURE_DTORS.unregister(state); - } else { - state.a = a; - } - } - }; - real.original = state; - CLOSURE_DTORS.register(real, state, state); - return real; - } - - function 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 && 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 __wbg_adapter_32(arg0, arg1) { - wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h6121eaac70501347(arg0, arg1); - } - - function __wbg_adapter_35(arg0, arg1, arg2) { - wasm.closure392_externref_shim(arg0, arg1, arg2); - } - - function takeFromExternrefTable0(idx) { - const value = wasm.__wbindgen_export_1.get(idx); - wasm.__externref_table_dealloc(idx); - return value; - } - function __wbg_adapter_40(arg0, arg1) { - const ret = wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__haf6a60aa232bb39a_multivalue_shim(arg0, arg1); - if (ret[1]) { - throw takeFromExternrefTable0(ret[0]); - } - } - - function __wbg_adapter_43(arg0, arg1, arg2) { - wasm.closure440_externref_shim(arg0, arg1, arg2); - } - - function __wbg_adapter_621(arg0, arg1, arg2, arg3) { - wasm.closure482_externref_shim(arg0, arg1, arg2, arg3); - } - - const __wbindgen_enum_RequestMode = ["same-origin", "no-cors", "cors", "navigate"]; - - const __wbindgen_enum_ResizeObserverBoxOptions = ["border-box", "content-box", "device-pixel-content-box"]; - - const WebHandleFinalization = (typeof FinalizationRegistry === 'undefined') - ? { register: () => {}, unregister: () => {} } - : new FinalizationRegistry(ptr => wasm.__wbg_webhandle_free(ptr >>> 0, 1)); - /** - * Our handle to the web app from JavaScript. - */ - class WebHandle { - - __destroy_into_raw() { - const ptr = this.__wbg_ptr; - this.__wbg_ptr = 0; - WebHandleFinalization.unregister(this); - return ptr; - } - - free() { - const ptr = this.__destroy_into_raw(); - wasm.__wbg_webhandle_free(ptr, 0); - } - /** - * Installs a panic hook, then returns. - */ - constructor() { - const ret = wasm.webhandle_new(); - this.__wbg_ptr = ret >>> 0; - WebHandleFinalization.register(this, this.__wbg_ptr, this); - return this; - } - /** - * @param {HTMLCanvasElement} canvas - * @returns {Promise} - */ - start(canvas) { - const ret = wasm.webhandle_start(this.__wbg_ptr, canvas); - return ret; - } - destroy() { - wasm.webhandle_destroy(this.__wbg_ptr); - } - example() { - wasm.webhandle_example(this.__wbg_ptr); - } - /** - * @returns {boolean} - */ - has_panicked() { - const ret = wasm.webhandle_has_panicked(this.__wbg_ptr); - return ret !== 0; - } - /** - * @returns {string | undefined} - */ - panic_message() { - const ret = wasm.webhandle_panic_message(this.__wbg_ptr); - let v1; - if (ret[0] !== 0) { - v1 = getStringFromWasm0(ret[0], ret[1]).slice(); - wasm.__wbindgen_free(ret[0], ret[1] * 1, 1); - } - return v1; - } - /** - * @returns {string | undefined} - */ - panic_callstack() { - const ret = wasm.webhandle_panic_callstack(this.__wbg_ptr); - let v1; - if (ret[0] !== 0) { - v1 = getStringFromWasm0(ret[0], ret[1]).slice(); - wasm.__wbindgen_free(ret[0], ret[1] * 1, 1); - } - return v1; - } - } - __exports.WebHandle = WebHandle; - - 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.__wbg_activeElement_ea31ecc5423c6046 = function(arg0) { - const ret = arg0.activeElement; - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_activeTexture_446c979476d36a40 = function(arg0, arg1) { - arg0.activeTexture(arg1 >>> 0); - }; - imports.wbg.__wbg_activeTexture_aec8c249ceb838d2 = function(arg0, arg1) { - arg0.activeTexture(arg1 >>> 0); - }; - imports.wbg.__wbg_addEventListener_b9481c2c2cab6047 = function() { return handleError(function (arg0, arg1, arg2, arg3) { - arg0.addEventListener(getStringFromWasm0(arg1, arg2), arg3); - }, arguments) }; - imports.wbg.__wbg_altKey_d5409f5ddaa29593 = function(arg0) { - const ret = arg0.altKey; - return ret; - }; - imports.wbg.__wbg_altKey_d54599b3b6b6cf22 = function(arg0) { - const ret = arg0.altKey; - return ret; - }; - imports.wbg.__wbg_appendChild_d22bc7af6b96b3f1 = function() { return handleError(function (arg0, arg1) { - const ret = arg0.appendChild(arg1); - return ret; - }, arguments) }; - imports.wbg.__wbg_arrayBuffer_1be504e3eb62daa4 = function(arg0) { - const ret = arg0.arrayBuffer(); - return ret; - }; - imports.wbg.__wbg_arrayBuffer_d0ca2ad8bda0039b = function() { return handleError(function (arg0) { - const ret = arg0.arrayBuffer(); - return ret; - }, arguments) }; - imports.wbg.__wbg_at_479807bfddde3a33 = function(arg0, arg1) { - const ret = arg0.at(arg1); - return ret; - }; - imports.wbg.__wbg_attachShader_4dc5977795b5d865 = function(arg0, arg1, arg2) { - arg0.attachShader(arg1, arg2); - }; - imports.wbg.__wbg_attachShader_9b79a4896fee779d = function(arg0, arg1, arg2) { - arg0.attachShader(arg1, arg2); - }; - imports.wbg.__wbg_bindBuffer_e9412cc77f8130d6 = function(arg0, arg1, arg2) { - arg0.bindBuffer(arg1 >>> 0, arg2); - }; - imports.wbg.__wbg_bindBuffer_ff7c55f1062014bc = function(arg0, arg1, arg2) { - arg0.bindBuffer(arg1 >>> 0, arg2); - }; - imports.wbg.__wbg_bindTexture_8b97cf7511a725d0 = function(arg0, arg1, arg2) { - arg0.bindTexture(arg1 >>> 0, arg2); - }; - imports.wbg.__wbg_bindTexture_f65d2e377e3de352 = function(arg0, arg1, arg2) { - arg0.bindTexture(arg1 >>> 0, arg2); - }; - imports.wbg.__wbg_bindVertexArrayOES_19ed43bbe1241f7a = function(arg0, arg1) { - arg0.bindVertexArrayOES(arg1); - }; - imports.wbg.__wbg_bindVertexArray_67a807a1cd64976a = function(arg0, arg1) { - arg0.bindVertexArray(arg1); - }; - imports.wbg.__wbg_blendEquationSeparate_26681d98390d0057 = function(arg0, arg1, arg2) { - arg0.blendEquationSeparate(arg1 >>> 0, arg2 >>> 0); - }; - imports.wbg.__wbg_blendEquationSeparate_e81d45aebb0a6f22 = function(arg0, arg1, arg2) { - arg0.blendEquationSeparate(arg1 >>> 0, arg2 >>> 0); - }; - imports.wbg.__wbg_blendFuncSeparate_0031130a17fd5eb8 = function(arg0, arg1, arg2, arg3, arg4) { - arg0.blendFuncSeparate(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4 >>> 0); - }; - imports.wbg.__wbg_blendFuncSeparate_4d5cc402dcf7389f = function(arg0, arg1, arg2, arg3, arg4) { - arg0.blendFuncSeparate(arg1 >>> 0, arg2 >>> 0, arg3 >>> 0, arg4 >>> 0); - }; - imports.wbg.__wbg_blockSize_6464e214800294a9 = function(arg0) { - const ret = arg0.blockSize; - return ret; - }; - imports.wbg.__wbg_blur_51f415004ecbe327 = function() { return handleError(function (arg0) { - arg0.blur(); - }, arguments) }; - imports.wbg.__wbg_body_8d7d8c4aa91dcad8 = function(arg0) { - const ret = arg0.body; - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_bottom_72e7516e4f4e156a = function(arg0) { - const ret = arg0.bottom; - return ret; - }; - imports.wbg.__wbg_bufferData_0643498950a2292f = function(arg0, arg1, arg2, arg3) { - arg0.bufferData(arg1 >>> 0, arg2, arg3 >>> 0); - }; - imports.wbg.__wbg_bufferData_7e2b6059c35c9291 = function(arg0, arg1, arg2, arg3) { - arg0.bufferData(arg1 >>> 0, arg2, arg3 >>> 0); - }; - imports.wbg.__wbg_buffer_61b7ce01341d7f88 = function(arg0) { - const ret = arg0.buffer; - return ret; - }; - imports.wbg.__wbg_buffer_dc5dbfa8d5fb28cf = function(arg0) { - const ret = arg0.buffer; - return ret; - }; - imports.wbg.__wbg_button_12b22015f2d5993d = function(arg0) { - const ret = arg0.button; - return ret; - }; - imports.wbg.__wbg_call_500db948e69c7330 = function() { return handleError(function (arg0, arg1, arg2) { - const ret = arg0.call(arg1, arg2); - return ret; - }, arguments) }; - imports.wbg.__wbg_call_b0d8e36992d9900d = function() { return handleError(function (arg0, arg1) { - const ret = arg0.call(arg1); - return ret; - }, arguments) }; - imports.wbg.__wbg_cancelAnimationFrame_5f7904867f6ab804 = function() { return handleError(function (arg0, arg1) { - arg0.cancelAnimationFrame(arg1); - }, arguments) }; - imports.wbg.__wbg_changedTouches_86448a1d3a872098 = function(arg0) { - const ret = arg0.changedTouches; - return ret; - }; - imports.wbg.__wbg_clearColor_7e5806f100e4cd7a = function(arg0, arg1, arg2, arg3, arg4) { - arg0.clearColor(arg1, arg2, arg3, arg4); - }; - imports.wbg.__wbg_clearColor_d58166c97d5eef07 = function(arg0, arg1, arg2, arg3, arg4) { - arg0.clearColor(arg1, arg2, arg3, arg4); - }; - imports.wbg.__wbg_clearInterval_998151d924a72ab2 = function(arg0, arg1) { - arg0.clearInterval(arg1); - }; - imports.wbg.__wbg_clear_16ffdcc1a1d6f0c9 = function(arg0, arg1) { - arg0.clear(arg1 >>> 0); - }; - imports.wbg.__wbg_clear_c182acb53176ea8b = function(arg0, arg1) { - arg0.clear(arg1 >>> 0); - }; - imports.wbg.__wbg_click_075a28967f9a936c = function(arg0) { - arg0.click(); - }; - imports.wbg.__wbg_clientX_18c5fbacc6398ad8 = function(arg0) { - const ret = arg0.clientX; - return ret; - }; - imports.wbg.__wbg_clientX_f73b86b8aba3591d = function(arg0) { - const ret = arg0.clientX; - return ret; - }; - imports.wbg.__wbg_clientY_0974153484cf0d09 = function(arg0) { - const ret = arg0.clientY; - return ret; - }; - imports.wbg.__wbg_clientY_af033356579f2b9c = function(arg0) { - const ret = arg0.clientY; - return ret; - }; - imports.wbg.__wbg_clipboardData_d188aa1b339f8637 = function(arg0) { - const ret = arg0.clipboardData; - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_clipboard_b634c08b310bca2e = function(arg0) { - const ret = arg0.clipboard; - return ret; - }; - imports.wbg.__wbg_colorMask_04bc7392c9d1b568 = function(arg0, arg1, arg2, arg3, arg4) { - arg0.colorMask(arg1 !== 0, arg2 !== 0, arg3 !== 0, arg4 !== 0); - }; - imports.wbg.__wbg_colorMask_401f99e62155b996 = function(arg0, arg1, arg2, arg3, arg4) { - arg0.colorMask(arg1 !== 0, arg2 !== 0, arg3 !== 0, arg4 !== 0); - }; - imports.wbg.__wbg_compileShader_afcc43901f14a922 = function(arg0, arg1) { - arg0.compileShader(arg1); - }; - imports.wbg.__wbg_compileShader_fab2df50ae89c5e1 = function(arg0, arg1) { - arg0.compileShader(arg1); - }; - imports.wbg.__wbg_contentBoxSize_c8dcd6b272f821ba = function(arg0) { - const ret = arg0.contentBoxSize; - return ret; - }; - imports.wbg.__wbg_contentRect_6fadfee6731ac5df = function(arg0) { - const ret = arg0.contentRect; - return ret; - }; - imports.wbg.__wbg_createBuffer_567b536a03db30d2 = function(arg0) { - const ret = arg0.createBuffer(); - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_createBuffer_8692729b8ac9caaf = function(arg0) { - const ret = arg0.createBuffer(); - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_createElement_89923fcb809656b7 = function() { return handleError(function (arg0, arg1, arg2) { - const ret = arg0.createElement(getStringFromWasm0(arg1, arg2)); - return ret; - }, arguments) }; - imports.wbg.__wbg_createObjectURL_296ad2113ed20fe0 = function() { return handleError(function (arg0, arg1) { - const ret = URL.createObjectURL(arg1); - const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }, arguments) }; - imports.wbg.__wbg_createProgram_b8f69529220fb50b = function(arg0) { - const ret = arg0.createProgram(); - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_createProgram_e2141127012594b0 = function(arg0) { - const ret = arg0.createProgram(); - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_createShader_442f69b8f536a786 = function(arg0, arg1) { - const ret = arg0.createShader(arg1 >>> 0); - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_createShader_809bd3abe629ad7a = function(arg0, arg1) { - const ret = arg0.createShader(arg1 >>> 0); - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_createTexture_3c9e731e954515fa = function(arg0) { - const ret = arg0.createTexture(); - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_createTexture_677a150f3f985ce0 = function(arg0) { - const ret = arg0.createTexture(); - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_createVertexArrayOES_950dd712f273bb06 = function(arg0) { - const ret = arg0.createVertexArrayOES(); - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_createVertexArray_68ae270682fc14aa = function(arg0) { - const ret = arg0.createVertexArray(); - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_ctrlKey_5a324c8556fbce1c = function(arg0) { - const ret = arg0.ctrlKey; - return ret; - }; - imports.wbg.__wbg_ctrlKey_5c308955b0d5492d = function(arg0) { - const ret = arg0.ctrlKey; - return ret; - }; - imports.wbg.__wbg_dataTransfer_c29d7d69c9576def = function(arg0) { - const ret = arg0.dataTransfer; - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_data_8980cafa6731c6b5 = function(arg0, arg1) { - const ret = arg1.data; - var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }; - imports.wbg.__wbg_deleteBuffer_783d60e842697847 = function(arg0, arg1) { - arg0.deleteBuffer(arg1); - }; - imports.wbg.__wbg_deleteBuffer_bf5a34580654a42a = function(arg0, arg1) { - arg0.deleteBuffer(arg1); - }; - imports.wbg.__wbg_deleteProgram_3ca13ed49ca24a48 = function(arg0, arg1) { - arg0.deleteProgram(arg1); - }; - imports.wbg.__wbg_deleteProgram_47e8c8c7f0923d3d = function(arg0, arg1) { - arg0.deleteProgram(arg1); - }; - imports.wbg.__wbg_deleteShader_e1f71043508b6951 = function(arg0, arg1) { - arg0.deleteShader(arg1); - }; - imports.wbg.__wbg_deleteShader_e4fe2574d9c3afab = function(arg0, arg1) { - arg0.deleteShader(arg1); - }; - imports.wbg.__wbg_deleteTexture_36653aa53d4a29e9 = function(arg0, arg1) { - arg0.deleteTexture(arg1); - }; - imports.wbg.__wbg_deleteTexture_eaf729f97b59aaf4 = function(arg0, arg1) { - arg0.deleteTexture(arg1); - }; - imports.wbg.__wbg_deltaMode_b2e9bb0dca5cf196 = function(arg0) { - const ret = arg0.deltaMode; - return ret; - }; - imports.wbg.__wbg_deltaX_5c26d3b55d406732 = function(arg0) { - const ret = arg0.deltaX; - return ret; - }; - imports.wbg.__wbg_deltaY_1683a859ce933add = function(arg0) { - const ret = arg0.deltaY; - return ret; - }; - imports.wbg.__wbg_detachShader_17ec388351e24b61 = function(arg0, arg1, arg2) { - arg0.detachShader(arg1, arg2); - }; - imports.wbg.__wbg_detachShader_444b29fa4e93147e = function(arg0, arg1, arg2) { - arg0.detachShader(arg1, arg2); - }; - imports.wbg.__wbg_devicePixelContentBoxSize_f91b326c21f7e3d5 = function(arg0) { - const ret = arg0.devicePixelContentBoxSize; - return ret; - }; - imports.wbg.__wbg_devicePixelRatio_973abafaa5e8254b = function(arg0) { - const ret = arg0.devicePixelRatio; - return ret; - }; - imports.wbg.__wbg_disableVertexAttribArray_1bf5b473f133c8ab = function(arg0, arg1) { - arg0.disableVertexAttribArray(arg1 >>> 0); - }; - imports.wbg.__wbg_disableVertexAttribArray_f49780d5b42e6b0d = function(arg0, arg1) { - arg0.disableVertexAttribArray(arg1 >>> 0); - }; - imports.wbg.__wbg_disable_2f09f593bf0f5573 = function(arg0, arg1) { - arg0.disable(arg1 >>> 0); - }; - imports.wbg.__wbg_disable_302597eacd491d44 = function(arg0, arg1) { - arg0.disable(arg1 >>> 0); - }; - imports.wbg.__wbg_disconnect_6e7f07912b7a73c6 = function(arg0) { - arg0.disconnect(); - }; - imports.wbg.__wbg_document_f11bc4f7c03e1745 = function(arg0) { - const ret = arg0.document; - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_done_f22c1561fa919baa = function(arg0) { - const ret = arg0.done; - return ret; - }; - imports.wbg.__wbg_drawElements_28e4f5037fe8c665 = function(arg0, arg1, arg2, arg3, arg4) { - arg0.drawElements(arg1 >>> 0, arg2, arg3 >>> 0, arg4); - }; - imports.wbg.__wbg_drawElements_3d61ffb17b84bc9d = function(arg0, arg1, arg2, arg3, arg4) { - arg0.drawElements(arg1 >>> 0, arg2, arg3 >>> 0, arg4); - }; - imports.wbg.__wbg_elementFromPoint_4d710989dedbb0f3 = function(arg0, arg1, arg2) { - const ret = arg0.elementFromPoint(arg1, arg2); - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_enableVertexAttribArray_211547224fc25327 = function(arg0, arg1) { - arg0.enableVertexAttribArray(arg1 >>> 0); - }; - imports.wbg.__wbg_enableVertexAttribArray_60827f2a43782639 = function(arg0, arg1) { - arg0.enableVertexAttribArray(arg1 >>> 0); - }; - imports.wbg.__wbg_enable_2bacfac56e802b11 = function(arg0, arg1) { - arg0.enable(arg1 >>> 0); - }; - imports.wbg.__wbg_enable_a7767e03f7973ca8 = function(arg0, arg1) { - arg0.enable(arg1 >>> 0); - }; - imports.wbg.__wbg_error_a252c810ff5d4f45 = function(arg0, arg1) { - let deferred0_0; - let deferred0_1; - try { - deferred0_0 = arg0; - deferred0_1 = arg1; - console.error(getStringFromWasm0(arg0, arg1)); - } finally { - wasm.__wbindgen_free(deferred0_0, deferred0_1, 1); - } - }; - imports.wbg.__wbg_error_fab41a42d22bf2bc = function(arg0) { - console.error(arg0); - }; - imports.wbg.__wbg_fetch_e26fdd92ea39f634 = function(arg0, arg1) { - const ret = arg0.fetch(arg1); - return ret; - }; - imports.wbg.__wbg_files_576e546a364f9971 = function(arg0) { - const ret = arg0.files; - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_files_95d9491da88a54b5 = function(arg0) { - const ret = arg0.files; - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_focus_35fe945f7268dd62 = function() { return handleError(function (arg0) { - arg0.focus(); - }, arguments) }; - imports.wbg.__wbg_force_82b5a32305812290 = function(arg0) { - const ret = arg0.force; - return ret; - }; - imports.wbg.__wbg_generateMipmap_82e271fcb6f70fdc = function(arg0, arg1) { - arg0.generateMipmap(arg1 >>> 0); - }; - imports.wbg.__wbg_generateMipmap_b78fb575f19cb920 = function(arg0, arg1) { - arg0.generateMipmap(arg1 >>> 0); - }; - imports.wbg.__wbg_getAttribLocation_a3fffeb134874426 = function(arg0, arg1, arg2, arg3) { - const ret = arg0.getAttribLocation(arg1, getStringFromWasm0(arg2, arg3)); - return ret; - }; - imports.wbg.__wbg_getAttribLocation_e104a96119fd0bbd = function(arg0, arg1, arg2, arg3) { - const ret = arg0.getAttribLocation(arg1, getStringFromWasm0(arg2, arg3)); - return ret; - }; - imports.wbg.__wbg_getBoundingClientRect_05c4b9e3701bb372 = function(arg0) { - const ret = arg0.getBoundingClientRect(); - return ret; - }; - imports.wbg.__wbg_getComputedStyle_8e58bbd76370e2b1 = function() { return handleError(function (arg0, arg1) { - const ret = arg0.getComputedStyle(arg1); - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }, arguments) }; - imports.wbg.__wbg_getContext_5eaf5645cd6acb46 = function() { return handleError(function (arg0, arg1, arg2) { - const ret = arg0.getContext(getStringFromWasm0(arg1, arg2)); - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }, arguments) }; - imports.wbg.__wbg_getData_a7e2258d0a97ce17 = function() { return handleError(function (arg0, arg1, arg2, arg3) { - const ret = arg1.getData(getStringFromWasm0(arg2, arg3)); - const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }, arguments) }; - imports.wbg.__wbg_getError_440987efeb6b80e1 = function(arg0) { - const ret = arg0.getError(); - return ret; - }; - imports.wbg.__wbg_getError_74cd1cb3c131ece0 = function(arg0) { - const ret = arg0.getError(); - return ret; - }; - imports.wbg.__wbg_getExtension_b96fdd5b9c1f7271 = function() { return handleError(function (arg0, arg1, arg2) { - const ret = arg0.getExtension(getStringFromWasm0(arg1, arg2)); - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }, arguments) }; - imports.wbg.__wbg_getExtension_f31653ddc3f1cef9 = function() { return handleError(function (arg0, arg1, arg2) { - const ret = arg0.getExtension(getStringFromWasm0(arg1, arg2)); - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }, arguments) }; - imports.wbg.__wbg_getItem_badd23d1a06e7b19 = function() { return handleError(function (arg0, arg1, arg2, arg3) { - const ret = arg1.getItem(getStringFromWasm0(arg2, arg3)); - var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }, arguments) }; - imports.wbg.__wbg_getParameter_6f7bc820485dbae4 = function() { return handleError(function (arg0, arg1) { - const ret = arg0.getParameter(arg1 >>> 0); - return ret; - }, arguments) }; - imports.wbg.__wbg_getParameter_fc177c1d22da930b = function() { return handleError(function (arg0, arg1) { - const ret = arg0.getParameter(arg1 >>> 0); - return ret; - }, arguments) }; - imports.wbg.__wbg_getProgramInfoLog_70d114345e15d2c1 = function(arg0, arg1, arg2) { - const ret = arg1.getProgramInfoLog(arg2); - var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }; - imports.wbg.__wbg_getProgramInfoLog_760af7d6753bc699 = function(arg0, arg1, arg2) { - const ret = arg1.getProgramInfoLog(arg2); - var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }; - imports.wbg.__wbg_getProgramParameter_8a6b724d42d813b3 = function(arg0, arg1, arg2) { - const ret = arg0.getProgramParameter(arg1, arg2 >>> 0); - return ret; - }; - imports.wbg.__wbg_getProgramParameter_d328869400b82698 = function(arg0, arg1, arg2) { - const ret = arg0.getProgramParameter(arg1, arg2 >>> 0); - return ret; - }; - imports.wbg.__wbg_getPropertyValue_66c16bac362c6d90 = function() { return handleError(function (arg0, arg1, arg2, arg3) { - const ret = arg1.getPropertyValue(getStringFromWasm0(arg2, arg3)); - const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }, arguments) }; - imports.wbg.__wbg_getShaderInfoLog_23dd787b504d5f4e = function(arg0, arg1, arg2) { - const ret = arg1.getShaderInfoLog(arg2); - var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }; - imports.wbg.__wbg_getShaderInfoLog_da62e75d61fbf8a8 = function(arg0, arg1, arg2) { - const ret = arg1.getShaderInfoLog(arg2); - var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }; - imports.wbg.__wbg_getShaderParameter_e9098a633e6cf618 = function(arg0, arg1, arg2) { - const ret = arg0.getShaderParameter(arg1, arg2 >>> 0); - return ret; - }; - imports.wbg.__wbg_getShaderParameter_f9c66f7ac8114c69 = function(arg0, arg1, arg2) { - const ret = arg0.getShaderParameter(arg1, arg2 >>> 0); - return ret; - }; - imports.wbg.__wbg_getSupportedExtensions_3ce4548166177471 = function(arg0) { - const ret = arg0.getSupportedExtensions(); - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_getSupportedExtensions_6f069a552bc69ef2 = function(arg0) { - const ret = arg0.getSupportedExtensions(); - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_getUniformLocation_95f3933486db473c = function(arg0, arg1, arg2, arg3) { - const ret = arg0.getUniformLocation(arg1, getStringFromWasm0(arg2, arg3)); - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_getUniformLocation_b9be4fbca76ab9a4 = function(arg0, arg1, arg2, arg3) { - const ret = arg0.getUniformLocation(arg1, getStringFromWasm0(arg2, arg3)); - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_get_014bbb75e258e645 = function(arg0, arg1) { - const ret = arg0[arg1 >>> 0]; - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_get_198bfcfce5b3a38f = function(arg0, arg1) { - const ret = arg0[arg1 >>> 0]; - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_get_9aa3dff3f0266054 = function(arg0, arg1) { - const ret = arg0[arg1 >>> 0]; - return ret; - }; - imports.wbg.__wbg_get_bbccf8970793c087 = function() { return handleError(function (arg0, arg1) { - const ret = Reflect.get(arg0, arg1); - return ret; - }, arguments) }; - imports.wbg.__wbg_get_dfac72a5ffb577cc = function(arg0, arg1) { - const ret = arg0[arg1 >>> 0]; - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_hash_4227a319264c4ca1 = function() { return handleError(function (arg0, arg1) { - const ret = arg1.hash; - const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }, arguments) }; - imports.wbg.__wbg_headers_24e3e19fe3f187c0 = function(arg0) { - const ret = arg0.headers; - return ret; - }; - imports.wbg.__wbg_headers_786276f5fbbdb28a = function(arg0) { - const ret = arg0.headers; - return ret; - }; - imports.wbg.__wbg_height_08fd44318e18021d = function(arg0) { - const ret = arg0.height; - return ret; - }; - imports.wbg.__wbg_height_f36c36e27347cf38 = function(arg0) { - const ret = arg0.height; - return ret; - }; - imports.wbg.__wbg_hidden_2f28ae7f1a034fbc = function(arg0) { - const ret = arg0.hidden; - return ret; - }; - imports.wbg.__wbg_host_7131cd3aac9f8fd5 = function() { return handleError(function (arg0, arg1) { - const ret = arg1.host; - const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }, arguments) }; - imports.wbg.__wbg_hostname_b4908a01df1be9f2 = function() { return handleError(function (arg0, arg1) { - const ret = arg1.hostname; - const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }, arguments) }; - imports.wbg.__wbg_href_d04a5d3c2e6b361a = function() { return handleError(function (arg0, arg1) { - const ret = arg1.href; - const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }, arguments) }; - imports.wbg.__wbg_id_87f2e8c82a04a251 = function(arg0, arg1) { - const ret = arg1.id; - const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }; - imports.wbg.__wbg_identifier_14d5888db18610bb = function(arg0) { - const ret = arg0.identifier; - return ret; - }; - imports.wbg.__wbg_inlineSize_60da5bea0a6275d2 = function(arg0) { - const ret = arg0.inlineSize; - return ret; - }; - imports.wbg.__wbg_instanceof_Element_0f1680908791f190 = function(arg0) { - let result; - try { - result = arg0 instanceof Element; - } catch (_) { - result = false; - } - const ret = result; - return ret; - }; - imports.wbg.__wbg_instanceof_HtmlAnchorElement_250f3d35203bbf6c = function(arg0) { - let result; - try { - result = arg0 instanceof HTMLAnchorElement; - } catch (_) { - result = false; - } - const ret = result; - return ret; - }; - imports.wbg.__wbg_instanceof_HtmlButtonElement_44ea79d0fd2116a3 = function(arg0) { - let result; - try { - result = arg0 instanceof HTMLButtonElement; - } catch (_) { - result = false; - } - const ret = result; - return ret; - }; - imports.wbg.__wbg_instanceof_HtmlElement_d94ed69c6883a691 = function(arg0) { - let result; - try { - result = arg0 instanceof HTMLElement; - } catch (_) { - result = false; - } - const ret = result; - return ret; - }; - imports.wbg.__wbg_instanceof_HtmlInputElement_47b3e827f364773c = function(arg0) { - let result; - try { - result = arg0 instanceof HTMLInputElement; - } catch (_) { - result = false; - } - const ret = result; - return ret; - }; - imports.wbg.__wbg_instanceof_ResizeObserverEntry_145c533d0e7cf2f4 = function(arg0) { - let result; - try { - result = arg0 instanceof ResizeObserverEntry; - } catch (_) { - result = false; - } - const ret = result; - return ret; - }; - imports.wbg.__wbg_instanceof_ResizeObserverSize_8c7b496ccb6db38e = function(arg0) { - let result; - try { - result = arg0 instanceof ResizeObserverSize; - } catch (_) { - result = false; - } - const ret = result; - return ret; - }; - imports.wbg.__wbg_instanceof_Response_d3453657e10c4300 = function(arg0) { - let result; - try { - result = arg0 instanceof Response; - } catch (_) { - result = false; - } - const ret = result; - return ret; - }; - imports.wbg.__wbg_instanceof_TypeError_cbba6ac46ad5e2bb = function(arg0) { - let result; - try { - result = arg0 instanceof TypeError; - } catch (_) { - result = false; - } - const ret = result; - return ret; - }; - imports.wbg.__wbg_instanceof_WebGl2RenderingContext_ed03a40cd6d9a6c5 = function(arg0) { - let result; - try { - result = arg0 instanceof WebGL2RenderingContext; - } catch (_) { - result = false; - } - const ret = result; - return ret; - }; - imports.wbg.__wbg_instanceof_WebGlRenderingContext_934db43ae44dbdac = function(arg0) { - let result; - try { - result = arg0 instanceof WebGLRenderingContext; - } catch (_) { - result = false; - } - const ret = result; - return ret; - }; - imports.wbg.__wbg_instanceof_Window_d2514c6a7ee7ba60 = function(arg0) { - let result; - try { - result = arg0 instanceof Window; - } catch (_) { - result = false; - } - const ret = result; - return ret; - }; - imports.wbg.__wbg_isComposing_34930e03980aa623 = function(arg0) { - const ret = arg0.isComposing; - return ret; - }; - imports.wbg.__wbg_isComposing_e6c0e75812df1d39 = function(arg0) { - const ret = arg0.isComposing; - return ret; - }; - imports.wbg.__wbg_is_e442492d1fb7967b = function(arg0, arg1) { - const ret = Object.is(arg0, arg1); - return ret; - }; - imports.wbg.__wbg_item_7c8b01a4bd9230d3 = function(arg0, arg1) { - const ret = arg0.item(arg1 >>> 0); - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_items_9e6108f345463d2c = function(arg0) { - const ret = arg0.items; - return ret; - }; - imports.wbg.__wbg_iterator_23604bb983791576 = function() { - const ret = Symbol.iterator; - return ret; - }; - imports.wbg.__wbg_keyCode_e673401ed53dfc2c = function(arg0) { - const ret = arg0.keyCode; - return ret; - }; - imports.wbg.__wbg_key_9a40d4f6defa675b = function(arg0, arg1) { - const ret = arg1.key; - const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }; - imports.wbg.__wbg_lastModified_0094dc85b1157ef5 = function(arg0) { - const ret = arg0.lastModified; - return ret; - }; - imports.wbg.__wbg_left_d79d7167a89a5169 = function(arg0) { - const ret = arg0.left; - return ret; - }; - imports.wbg.__wbg_length_65d1cd11729ced11 = function(arg0) { - const ret = arg0.length; - return ret; - }; - imports.wbg.__wbg_length_86e2f100fef1fecc = function(arg0) { - const ret = arg0.length; - return ret; - }; - imports.wbg.__wbg_length_a2ea1b46bcec2b5e = function(arg0) { - const ret = arg0.length; - return ret; - }; - imports.wbg.__wbg_length_c4528fc455e58194 = function(arg0) { - const ret = arg0.length; - return ret; - }; - imports.wbg.__wbg_length_d65cf0786bfc5739 = function(arg0) { - const ret = arg0.length; - return ret; - }; - imports.wbg.__wbg_linkProgram_9b1029885a37b70d = function(arg0, arg1) { - arg0.linkProgram(arg1); - }; - imports.wbg.__wbg_linkProgram_bcf6286423b25b5c = function(arg0, arg1) { - arg0.linkProgram(arg1); - }; - imports.wbg.__wbg_localStorage_9ca2da984fd56239 = function() { return handleError(function (arg0) { - const ret = arg0.localStorage; - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }, arguments) }; - imports.wbg.__wbg_location_b2ec7e36fec8a8ff = function(arg0) { - const ret = arg0.location; - return ret; - }; - imports.wbg.__wbg_log_464d1b2190ca1e04 = function(arg0) { - console.log(arg0); - }; - imports.wbg.__wbg_matchMedia_4adca948756a5784 = function() { return handleError(function (arg0, arg1, arg2) { - const ret = arg0.matchMedia(getStringFromWasm0(arg1, arg2)); - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }, arguments) }; - imports.wbg.__wbg_matches_a69a36077c4f07ad = function(arg0) { - const ret = arg0.matches; - return ret; - }; - imports.wbg.__wbg_matches_f7ab6204c1d7b30d = function(arg0) { - const ret = arg0.matches; - return ret; - }; - imports.wbg.__wbg_metaKey_90fbd812345a7e0c = function(arg0) { - const ret = arg0.metaKey; - return ret; - }; - imports.wbg.__wbg_metaKey_de1f08a4d1e84bd1 = function(arg0) { - const ret = arg0.metaKey; - return ret; - }; - imports.wbg.__wbg_name_37e12d7b980bc5bd = function(arg0, arg1) { - const ret = arg1.name; - const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }; - imports.wbg.__wbg_navigator_0fe968937104eaa7 = function(arg0) { - const ret = arg0.navigator; - return ret; - }; - imports.wbg.__wbg_new_0565c3001775c60a = function() { return handleError(function (arg0) { - const ret = new ResizeObserver(arg0); - return ret; - }, arguments) }; - imports.wbg.__wbg_new_254fa9eac11932ae = function() { - const ret = new Array(); - return ret; - }; - imports.wbg.__wbg_new_3d446df9155128ef = function(arg0, arg1) { - try { - var state0 = {a: arg0, b: arg1}; - var cb0 = (arg0, arg1) => { - const a = state0.a; - state0.a = 0; - try { - return __wbg_adapter_621(a, state0.b, arg0, arg1); - } finally { - state0.a = a; - } - }; - const ret = new Promise(cb0); - return ret; - } finally { - state0.a = state0.b = 0; - } - }; - imports.wbg.__wbg_new_3ff5b33b1ce712df = function(arg0) { - const ret = new Uint8Array(arg0); - return ret; - }; - imports.wbg.__wbg_new_688846f374351c92 = function() { - const ret = new Object(); - return ret; - }; - imports.wbg.__wbg_new_a01d9d610b795c1f = function() { return handleError(function () { - const ret = new FileReader(); - return ret; - }, arguments) }; - imports.wbg.__wbg_new_c8fc2c35bff0c270 = function() { - const ret = new Error(); - return ret; - }; - imports.wbg.__wbg_newnoargs_fd9e4bf8be2bc16d = function(arg0, arg1) { - const ret = new Function(getStringFromWasm0(arg0, arg1)); - return ret; - }; - imports.wbg.__wbg_newwithbyteoffsetandlength_4b01f207bed23fc0 = function(arg0, arg1, arg2) { - const ret = new Int8Array(arg0, arg1 >>> 0, arg2 >>> 0); - return ret; - }; - imports.wbg.__wbg_newwithbyteoffsetandlength_5910bdf845a168eb = function(arg0, arg1, arg2) { - const ret = new Uint32Array(arg0, arg1 >>> 0, arg2 >>> 0); - return ret; - }; - imports.wbg.__wbg_newwithbyteoffsetandlength_6991ab0478cc4a43 = function(arg0, arg1, arg2) { - const ret = new Int32Array(arg0, arg1 >>> 0, arg2 >>> 0); - return ret; - }; - imports.wbg.__wbg_newwithbyteoffsetandlength_69ec77b20853ae02 = function(arg0, arg1, arg2) { - const ret = new Uint16Array(arg0, arg1 >>> 0, arg2 >>> 0); - return ret; - }; - imports.wbg.__wbg_newwithbyteoffsetandlength_b0192e1adfca2df1 = function(arg0, arg1, arg2) { - const ret = new Int16Array(arg0, arg1 >>> 0, arg2 >>> 0); - return ret; - }; - imports.wbg.__wbg_newwithbyteoffsetandlength_ba35896968751d91 = function(arg0, arg1, arg2) { - const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0); - return ret; - }; - imports.wbg.__wbg_newwithbyteoffsetandlength_f113a96374814bb2 = function(arg0, arg1, arg2) { - const ret = new Float32Array(arg0, arg1 >>> 0, arg2 >>> 0); - return ret; - }; - imports.wbg.__wbg_newwithstrandinit_a1f6583f20e4faff = function() { return handleError(function (arg0, arg1, arg2) { - const ret = new Request(getStringFromWasm0(arg0, arg1), arg2); - return ret; - }, arguments) }; - imports.wbg.__wbg_newwithu8arraysequence_2ee52236602d5ef2 = function() { return handleError(function (arg0) { - const ret = new Blob(arg0); - return ret; - }, arguments) }; - imports.wbg.__wbg_newwithu8arraysequenceandoptions_75a3b40c32d6c988 = function() { return handleError(function (arg0, arg1) { - const ret = new Blob(arg0, arg1); - return ret; - }, arguments) }; - imports.wbg.__wbg_next_01dd9234a5bf6d05 = function() { return handleError(function (arg0) { - const ret = arg0.next(); - return ret; - }, arguments) }; - imports.wbg.__wbg_next_137428deb98342b0 = function(arg0) { - const ret = arg0.next; - return ret; - }; - imports.wbg.__wbg_now_2c95c9de01293173 = function(arg0) { - const ret = arg0.now(); - return ret; - }; - imports.wbg.__wbg_now_62a101fe35b60230 = function(arg0) { - const ret = arg0.now(); - return ret; - }; - imports.wbg.__wbg_observe_71a44d88a2880088 = function(arg0, arg1, arg2) { - arg0.observe(arg1, arg2); - }; - imports.wbg.__wbg_offsetTop_eb7c481e74c6fa50 = function(arg0) { - const ret = arg0.offsetTop; - return ret; - }; - imports.wbg.__wbg_ok_4cacdb33ce54895f = function(arg0) { - const ret = arg0.ok; - return ret; - }; - imports.wbg.__wbg_open_94e1e54493f5c069 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { - const ret = arg0.open(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4)); - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }, arguments) }; - imports.wbg.__wbg_origin_8c23d49bc1f609e9 = function() { return handleError(function (arg0, arg1) { - const ret = arg1.origin; - const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }, arguments) }; - imports.wbg.__wbg_performance_2e69ce813a883f21 = function(arg0) { - const ret = arg0.performance; - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_performance_7a3ffd0b17f663ad = function(arg0) { - const ret = arg0.performance; - return ret; - }; - imports.wbg.__wbg_pixelStorei_7c93ee0ad7bf0763 = function(arg0, arg1, arg2) { - arg0.pixelStorei(arg1 >>> 0, arg2); - }; - imports.wbg.__wbg_pixelStorei_7dc331e4d85de1a3 = function(arg0, arg1, arg2) { - arg0.pixelStorei(arg1 >>> 0, arg2); - }; - imports.wbg.__wbg_port_14b0bf6b72b06565 = function() { return handleError(function (arg0, arg1) { - const ret = arg1.port; - const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }, arguments) }; - imports.wbg.__wbg_preventDefault_3c86e59772d015e6 = function(arg0) { - arg0.preventDefault(); - }; - imports.wbg.__wbg_protocol_ceaedd334dc7dbaf = function() { return handleError(function (arg0, arg1) { - const ret = arg1.protocol; - const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }, arguments) }; - imports.wbg.__wbg_push_6edad0df4b546b2c = function(arg0, arg1) { - const ret = arg0.push(arg1); - return ret; - }; - imports.wbg.__wbg_queueMicrotask_2181040e064c0dc8 = function(arg0) { - queueMicrotask(arg0); - }; - imports.wbg.__wbg_queueMicrotask_ef9ac43769cbcc4f = function(arg0) { - const ret = arg0.queueMicrotask; - return ret; - }; - imports.wbg.__wbg_readAsArrayBuffer_db7f197b5b6b34cf = function() { return handleError(function (arg0, arg1) { - arg0.readAsArrayBuffer(arg1); - }, arguments) }; - imports.wbg.__wbg_removeEventListener_a9ca9f05245321f0 = function() { return handleError(function (arg0, arg1, arg2, arg3) { - arg0.removeEventListener(getStringFromWasm0(arg1, arg2), arg3); - }, arguments) }; - imports.wbg.__wbg_remove_530b4f3163f72a83 = function(arg0) { - arg0.remove(); - }; - imports.wbg.__wbg_requestAnimationFrame_169cbbda5861d9ca = function() { return handleError(function (arg0, arg1) { - const ret = arg0.requestAnimationFrame(arg1); - return ret; - }, arguments) }; - imports.wbg.__wbg_resolve_0bf7c44d641804f9 = function(arg0) { - const ret = Promise.resolve(arg0); - return ret; - }; - imports.wbg.__wbg_result_b7f693658f393a91 = function() { return handleError(function (arg0) { - const ret = arg0.result; - return ret; - }, arguments) }; - imports.wbg.__wbg_revokeObjectURL_efa90403a85af243 = function() { return handleError(function (arg0, arg1) { - URL.revokeObjectURL(getStringFromWasm0(arg0, arg1)); - }, arguments) }; - imports.wbg.__wbg_right_74bde7fc03836700 = function(arg0) { - const ret = arg0.right; - return ret; - }; - imports.wbg.__wbg_scissor_63c22bd552b53b16 = function(arg0, arg1, arg2, arg3, arg4) { - arg0.scissor(arg1, arg2, arg3, arg4); - }; - imports.wbg.__wbg_scissor_eebb3b755c95ca32 = function(arg0, arg1, arg2, arg3, arg4) { - arg0.scissor(arg1, arg2, arg3, arg4); - }; - imports.wbg.__wbg_search_feca3869d55ecd5c = function() { return handleError(function (arg0, arg1) { - const ret = arg1.search; - const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }, arguments) }; - imports.wbg.__wbg_setAttribute_148e0e65e20e5f27 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { - arg0.setAttribute(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4)); - }, arguments) }; - imports.wbg.__wbg_setItem_37bd15ddee3594af = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { - arg0.setItem(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4)); - }, arguments) }; - imports.wbg.__wbg_setProperty_0eb9705cf1b05650 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { - arg0.setProperty(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4)); - }, arguments) }; - imports.wbg.__wbg_set_23d69db4e5c66a6e = function(arg0, arg1, arg2) { - arg0.set(arg1, arg2 >>> 0); - }; - imports.wbg.__wbg_set_aa8f7a765a0a2e5f = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { - arg0.set(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4)); - }, arguments) }; - imports.wbg.__wbg_setaccept_52df39868582bd90 = function(arg0, arg1, arg2) { - arg0.accept = getStringFromWasm0(arg1, arg2); - }; - imports.wbg.__wbg_setautofocus_8b7469c890d65742 = function(arg0, arg1) { - arg0.autofocus = arg1 !== 0; - }; - imports.wbg.__wbg_setbody_64920df008e48adc = function(arg0, arg1) { - arg0.body = arg1; - }; - imports.wbg.__wbg_setbox_2c55cd020a2888a8 = function(arg0, arg1) { - arg0.box = __wbindgen_enum_ResizeObserverBoxOptions[arg1]; - }; - imports.wbg.__wbg_setdownload_6f17b767672b31f5 = function(arg0, arg1, arg2) { - arg0.download = getStringFromWasm0(arg1, arg2); - }; - imports.wbg.__wbg_setheight_16d76e7fa9d506ea = function(arg0, arg1) { - arg0.height = arg1 >>> 0; - }; - imports.wbg.__wbg_sethref_272aef65ff8abb6e = function(arg0, arg1, arg2) { - arg0.href = getStringFromWasm0(arg1, arg2); - }; - imports.wbg.__wbg_setid_b6aa394f9a8400f5 = function(arg0, arg1, arg2) { - arg0.id = getStringFromWasm0(arg1, arg2); - }; - imports.wbg.__wbg_setinnerHTML_2d75307ba8832258 = function(arg0, arg1, arg2) { - arg0.innerHTML = getStringFromWasm0(arg1, arg2); - }; - imports.wbg.__wbg_setinnerText_a9690b82c4cb9063 = function(arg0, arg1, arg2) { - arg0.innerText = getStringFromWasm0(arg1, arg2); - }; - imports.wbg.__wbg_setmethod_cfc7f688ba46a6be = function(arg0, arg1, arg2) { - arg0.method = getStringFromWasm0(arg1, arg2); - }; - imports.wbg.__wbg_setmode_cd03637eb7da01e0 = function(arg0, arg1) { - arg0.mode = __wbindgen_enum_RequestMode[arg1]; - }; - imports.wbg.__wbg_setmultiple_811c4c7d8b43520b = function(arg0, arg1) { - arg0.multiple = arg1 !== 0; - }; - imports.wbg.__wbg_setonclick_096859d6b1b46a82 = function(arg0, arg1) { - arg0.onclick = arg1; - }; - imports.wbg.__wbg_setonload_36cf7239551d2544 = function(arg0, arg1) { - arg0.onload = arg1; - }; - imports.wbg.__wbg_settabIndex_52ec33536f016c41 = function(arg0, arg1) { - arg0.tabIndex = arg1; - }; - imports.wbg.__wbg_settype_e19ab551722d5681 = function(arg0, arg1, arg2) { - arg0.type = getStringFromWasm0(arg1, arg2); - }; - imports.wbg.__wbg_settype_fd39465d237c2f36 = function(arg0, arg1, arg2) { - arg0.type = getStringFromWasm0(arg1, arg2); - }; - imports.wbg.__wbg_setvalue_44c59c360ad57cf0 = function(arg0, arg1, arg2) { - arg0.value = getStringFromWasm0(arg1, arg2); - }; - imports.wbg.__wbg_setwidth_c588fe07a7982aca = function(arg0, arg1) { - arg0.width = arg1 >>> 0; - }; - imports.wbg.__wbg_shaderSource_3bbf44221529c149 = function(arg0, arg1, arg2, arg3) { - arg0.shaderSource(arg1, getStringFromWasm0(arg2, arg3)); - }; - imports.wbg.__wbg_shaderSource_6a657afd48edb05a = function(arg0, arg1, arg2, arg3) { - arg0.shaderSource(arg1, getStringFromWasm0(arg2, arg3)); - }; - imports.wbg.__wbg_shiftKey_0d6625838238aee8 = function(arg0) { - const ret = arg0.shiftKey; - return ret; - }; - imports.wbg.__wbg_shiftKey_4b30f68655b97001 = function(arg0) { - const ret = arg0.shiftKey; - return ret; - }; - imports.wbg.__wbg_size_5ead5cc358246113 = function(arg0) { - const ret = arg0.size; - return ret; - }; - imports.wbg.__wbg_stack_f328dd5815220aeb = function(arg0, arg1) { - const ret = arg1.stack; - const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }; - imports.wbg.__wbg_static_accessor_GLOBAL_0be7472e492ad3e3 = function() { - const ret = typeof global === 'undefined' ? null : global; - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_static_accessor_GLOBAL_THIS_1a6eb482d12c9bfb = function() { - const ret = typeof globalThis === 'undefined' ? null : globalThis; - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_static_accessor_SELF_1dc398a895c82351 = function() { - const ret = typeof self === 'undefined' ? null : self; - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_static_accessor_WINDOW_ae1c80c7eea8d64a = function() { - const ret = typeof window === 'undefined' ? null : window; - return isLikeNone(ret) ? 0 : addToExternrefTable0(ret); - }; - imports.wbg.__wbg_statusText_613aac5c001080c1 = function(arg0, arg1) { - const ret = arg1.statusText; - const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }; - imports.wbg.__wbg_status_317f53bc4c7638df = function(arg0) { - const ret = arg0.status; - return ret; - }; - imports.wbg.__wbg_stopPropagation_da43a41fec77962c = function(arg0) { - arg0.stopPropagation(); - }; - imports.wbg.__wbg_style_53bb2d762dd1c030 = function(arg0) { - const ret = arg0.style; - return ret; - }; - imports.wbg.__wbg_texImage2D_488bd0838560f2fd = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { - arg0.texImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, arg9); - }, arguments) }; - imports.wbg.__wbg_texImage2D_d83566263a20c144 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { - arg0.texImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, arg9); - }, arguments) }; - imports.wbg.__wbg_texParameteri_45603287be57d25e = function(arg0, arg1, arg2, arg3) { - arg0.texParameteri(arg1 >>> 0, arg2 >>> 0, arg3); - }; - imports.wbg.__wbg_texParameteri_d550886a76f21258 = function(arg0, arg1, arg2, arg3) { - arg0.texParameteri(arg1 >>> 0, arg2 >>> 0, arg3); - }; - imports.wbg.__wbg_texSubImage2D_0eeb9856a37cc769 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { - arg0.texSubImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, arg9); - }, arguments) }; - imports.wbg.__wbg_texSubImage2D_355ed8d7c2b07c22 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { - arg0.texSubImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, arg9); - }, arguments) }; - imports.wbg.__wbg_texSubImage2D_7af37da149ecfb8e = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) { - arg0.texSubImage2D(arg1 >>> 0, arg2, arg3, arg4, arg5, arg6, arg7 >>> 0, arg8 >>> 0, arg9); - }, arguments) }; - imports.wbg.__wbg_then_0438fad860fe38e1 = function(arg0, arg1) { - const ret = arg0.then(arg1); - return ret; - }; - imports.wbg.__wbg_then_0ffafeddf0e182a4 = function(arg0, arg1, arg2) { - const ret = arg0.then(arg1, arg2); - return ret; - }; - imports.wbg.__wbg_top_640e0509d882f0ee = function(arg0) { - const ret = arg0.top; - return ret; - }; - imports.wbg.__wbg_touches_464d67ccc79e7632 = function(arg0) { - const ret = arg0.touches; - return ret; - }; - imports.wbg.__wbg_type_1cad8117b64accc6 = function(arg0, arg1) { - const ret = arg1.type; - const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }; - imports.wbg.__wbg_type_394bc3bf9b919d18 = function(arg0, arg1) { - const ret = arg1.type; - const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }; - imports.wbg.__wbg_uniform1i_33a6ced29e8c7297 = function(arg0, arg1, arg2) { - arg0.uniform1i(arg1, arg2); - }; - imports.wbg.__wbg_uniform1i_fd66f39a37e6a753 = function(arg0, arg1, arg2) { - arg0.uniform1i(arg1, arg2); - }; - imports.wbg.__wbg_uniform2f_78492045e002e4eb = function(arg0, arg1, arg2, arg3) { - arg0.uniform2f(arg1, arg2, arg3); - }; - imports.wbg.__wbg_uniform2f_8174f619e86c3ba2 = function(arg0, arg1, arg2, arg3) { - arg0.uniform2f(arg1, arg2, arg3); - }; - imports.wbg.__wbg_url_5327bc0a41a9b085 = function(arg0, arg1) { - const ret = arg1.url; - const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }; - imports.wbg.__wbg_useProgram_1a5a4be134db012a = function(arg0, arg1) { - arg0.useProgram(arg1); - }; - imports.wbg.__wbg_useProgram_88e7787408765ccf = function(arg0, arg1) { - arg0.useProgram(arg1); - }; - imports.wbg.__wbg_userAgent_918b064b4cd32842 = function() { return handleError(function (arg0, arg1) { - const ret = arg1.userAgent; - const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }, arguments) }; - imports.wbg.__wbg_value_47fde8ea2d9fdcd5 = function(arg0, arg1) { - const ret = arg1.value; - const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }; - imports.wbg.__wbg_value_4c32fd138a88eee2 = function(arg0) { - const ret = arg0.value; - return ret; - }; - imports.wbg.__wbg_vertexAttribPointer_1f280ac2d8994592 = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) { - arg0.vertexAttribPointer(arg1 >>> 0, arg2, arg3 >>> 0, arg4 !== 0, arg5, arg6); - }; - imports.wbg.__wbg_vertexAttribPointer_c6b1ccfa43bbca96 = function(arg0, arg1, arg2, arg3, arg4, arg5, arg6) { - arg0.vertexAttribPointer(arg1 >>> 0, arg2, arg3 >>> 0, arg4 !== 0, arg5, arg6); - }; - imports.wbg.__wbg_viewport_1ca83fff581a8f22 = function(arg0, arg1, arg2, arg3, arg4) { - arg0.viewport(arg1, arg2, arg3, arg4); - }; - imports.wbg.__wbg_viewport_770469a07e2d9772 = function(arg0, arg1, arg2, arg3, arg4) { - arg0.viewport(arg1, arg2, arg3, arg4); - }; - imports.wbg.__wbg_width_0d7b0b5ad3c2009f = function(arg0) { - const ret = arg0.width; - return ret; - }; - imports.wbg.__wbg_width_9927e6a7adb23d6d = function(arg0) { - const ret = arg0.width; - return ret; - }; - imports.wbg.__wbg_writeText_e65e98e75a2a92b8 = function(arg0, arg1, arg2) { - const ret = arg0.writeText(getStringFromWasm0(arg1, arg2)); - return ret; - }; - imports.wbg.__wbindgen_boolean_get = function(arg0) { - const v = arg0; - const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2; - return ret; - }; - imports.wbg.__wbindgen_cb_drop = function(arg0) { - const obj = arg0.original; - if (obj.cnt-- == 1) { - obj.a = 0; - return true; - } - const ret = false; - return ret; - }; - imports.wbg.__wbindgen_closure_wrapper1017 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 210, __wbg_adapter_32); - return ret; - }; - imports.wbg.__wbindgen_closure_wrapper1516 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 393, __wbg_adapter_35); - return ret; - }; - imports.wbg.__wbindgen_closure_wrapper1518 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 393, __wbg_adapter_35); - return ret; - }; - imports.wbg.__wbindgen_closure_wrapper1520 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 393, __wbg_adapter_40); - return ret; - }; - imports.wbg.__wbindgen_closure_wrapper1932 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 441, __wbg_adapter_43); - return ret; - }; - imports.wbg.__wbindgen_debug_string = function(arg0, arg1) { - const ret = debugString(arg1); - const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }; - imports.wbg.__wbindgen_in = function(arg0, arg1) { - const ret = arg0 in arg1; - return ret; - }; - imports.wbg.__wbindgen_init_externref_table = function() { - const table = wasm.__wbindgen_export_1; - const offset = table.grow(4); - table.set(0, undefined); - table.set(offset + 0, undefined); - table.set(offset + 1, null); - table.set(offset + 2, true); - table.set(offset + 3, false); - ; - }; - imports.wbg.__wbindgen_is_function = function(arg0) { - const ret = typeof(arg0) === 'function'; - return ret; - }; - imports.wbg.__wbindgen_is_object = function(arg0) { - const val = arg0; - const ret = typeof(val) === 'object' && val !== null; - return ret; - }; - imports.wbg.__wbindgen_is_undefined = function(arg0) { - const ret = arg0 === undefined; - return ret; - }; - imports.wbg.__wbindgen_memory = function() { - const ret = wasm.memory; - return ret; - }; - imports.wbg.__wbindgen_number_get = function(arg0, arg1) { - const obj = arg1; - const ret = typeof(obj) === 'number' ? obj : undefined; - getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true); - }; - imports.wbg.__wbindgen_string_get = function(arg0, arg1) { - const obj = arg1; - const ret = typeof(obj) === 'string' ? obj : undefined; - var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len1 = WASM_VECTOR_LEN; - getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); - getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); - }; - imports.wbg.__wbindgen_string_new = function(arg0, arg1) { - const ret = getStringFromWasm0(arg0, arg1); - return ret; - }; - imports.wbg.__wbindgen_throw = function(arg0, arg1) { - throw new Error(getStringFromWasm0(arg0, arg1)); - }; - - return imports; - } - - function __wbg_init_memory(imports, memory) { - - } - - function __wbg_finalize_init(instance, module) { - wasm = instance.exports; - __wbg_init.__wbindgen_wasm_module = module; - cachedDataViewMemory0 = null; - cachedUint8ArrayMemory0 = null; - - - wasm.__wbindgen_start(); - return wasm; - } - - function initSync(module) { - if (wasm !== undefined) return wasm; - - - if (typeof module !== 'undefined') { - if (Object.getPrototypeOf(module) === Object.prototype) { - ({module} = module) - } else { - console.warn('using deprecated parameters for `initSync()`; pass a single object instead') - } - } - - const imports = __wbg_get_imports(); - - __wbg_init_memory(imports); - - if (!(module instanceof WebAssembly.Module)) { - module = new WebAssembly.Module(module); - } - - const instance = new WebAssembly.Instance(module, imports); - - return __wbg_finalize_init(instance, module); - } - - async function __wbg_init(module_or_path) { - if (wasm !== undefined) return wasm; - - - if (typeof module_or_path !== 'undefined') { - if (Object.getPrototypeOf(module_or_path) === Object.prototype) { - ({module_or_path} = module_or_path) - } else { - console.warn('using deprecated parameters for the initialization function; pass a single object instead') - } - } - - if (typeof module_or_path === 'undefined' && typeof script_src !== 'undefined') { - module_or_path = script_src.replace(/\.js$/, '_bg.wasm'); - } - const imports = __wbg_get_imports(); - - if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) { - module_or_path = fetch(module_or_path); - } - - __wbg_init_memory(imports); - - const { instance, module } = await __wbg_load(await module_or_path, imports); - - return __wbg_finalize_init(instance, module); - } - - wasm_bindgen = Object.assign(__wbg_init, { initSync }, __exports); - -})(); diff --git a/web/json-editor_bg.wasm b/web/json-editor_bg.wasm deleted file mode 100644 index acbcc9d..0000000 Binary files a/web/json-editor_bg.wasm and /dev/null differ