├── input.css ├── docs ├── logo.png ├── vazir.ttf ├── favicon.ico ├── assets │ └── dioxus │ │ ├── persian-tools-web_bg.wasm │ │ ├── snippets │ │ ├── dioxus-web-84af743b887ebc54 │ │ │ ├── inline0.js │ │ │ ├── inline1.js │ │ │ └── src │ │ │ │ └── eval.js │ │ └── dioxus-interpreter-js-7c1300c6684e1811 │ │ │ ├── src │ │ │ └── js │ │ │ │ └── common.js │ │ │ └── inline0.js │ │ └── persian-tools-web.js ├── main.css ├── 404.html ├── index.html ├── tailwind.css └── header.svg ├── assets ├── logo.png ├── vazir.ttf ├── favicon.ico ├── main.css └── header.svg ├── screenshot1.jpg ├── screenshot2.jpg ├── screenshot3.jpg ├── src ├── ui │ ├── mod.rs │ ├── home.rs │ ├── top_bar.rs │ ├── tool_list_item.rs │ ├── search_tool.rs │ └── tool.rs ├── main.rs ├── router.rs └── core │ ├── tool.rs │ ├── mod.rs │ └── wrapper.rs ├── tailwind.config.js ├── Makefile ├── README.md ├── .gitignore ├── Cargo.toml ├── Dioxus.toml └── LICENSE /input.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; -------------------------------------------------------------------------------- /docs/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ali77gh/PersianToolsWeb/HEAD/docs/logo.png -------------------------------------------------------------------------------- /docs/vazir.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ali77gh/PersianToolsWeb/HEAD/docs/vazir.ttf -------------------------------------------------------------------------------- /assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ali77gh/PersianToolsWeb/HEAD/assets/logo.png -------------------------------------------------------------------------------- /assets/vazir.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ali77gh/PersianToolsWeb/HEAD/assets/vazir.ttf -------------------------------------------------------------------------------- /docs/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ali77gh/PersianToolsWeb/HEAD/docs/favicon.ico -------------------------------------------------------------------------------- /screenshot1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ali77gh/PersianToolsWeb/HEAD/screenshot1.jpg -------------------------------------------------------------------------------- /screenshot2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ali77gh/PersianToolsWeb/HEAD/screenshot2.jpg -------------------------------------------------------------------------------- /screenshot3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ali77gh/PersianToolsWeb/HEAD/screenshot3.jpg -------------------------------------------------------------------------------- /assets/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ali77gh/PersianToolsWeb/HEAD/assets/favicon.ico -------------------------------------------------------------------------------- /src/ui/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod home; 2 | pub mod search_tool; 3 | pub mod tool; 4 | pub mod tool_list_item; 5 | pub mod top_bar; 6 | -------------------------------------------------------------------------------- /docs/assets/dioxus/persian-tools-web_bg.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ali77gh/PersianToolsWeb/HEAD/docs/assets/dioxus/persian-tools-web_bg.wasm -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | mode: "all", 4 | content: ["./src/**/*.{rs,html,css}", "./dist/**/*.html"], 5 | theme: { 6 | extend: {}, 7 | }, 8 | plugins: [], 9 | }; 10 | -------------------------------------------------------------------------------- /docs/assets/dioxus/snippets/dioxus-web-84af743b887ebc54/inline0.js: -------------------------------------------------------------------------------- 1 | 2 | export function get_form_data(form) { 3 | let values = new Map(); 4 | const formData = new FormData(form); 5 | 6 | for (let name of formData.keys()) { 7 | values.set(name, formData.getAll(name)); 8 | } 9 | 10 | return values; 11 | } 12 | -------------------------------------------------------------------------------- /src/ui/home.rs: -------------------------------------------------------------------------------- 1 | use crate::ui::{search_tool::SearchTool, top_bar::TopBar}; 2 | use dioxus::prelude::*; 3 | 4 | #[component] 5 | pub fn Home() -> Element { 6 | rsx! { 7 | div { class: "rust-gradient h-screen w-full flex flex-col", 8 | TopBar {} 9 | SearchTool {} 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | 2 | tailwind-watch: 3 | npx tailwindcss -i ./input.css -o ./assets/tailwind.css --watch 4 | 5 | dioxus-watch: 6 | dx serve 7 | 8 | build: 9 | rm -rf ./docs 10 | dx build --release 11 | cp ./docs/index.html ./docs/404.html 12 | # wasm-opt docs/assets/dioxus/persian-tools-web_bg.wasm -o docs/assets/dioxus/persian-tools-web_bg.wasm -Oz -------------------------------------------------------------------------------- /docs/assets/dioxus/snippets/dioxus-web-84af743b887ebc54/inline1.js: -------------------------------------------------------------------------------- 1 | 2 | export function get_select_data(select) { 3 | let values = []; 4 | for (let i = 0; i < select.options.length; i++) { 5 | let option = select.options[i]; 6 | if (option.selected) { 7 | values.push(option.value.toString()); 8 | } 9 | } 10 | 11 | return values; 12 | } 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Persian Tools Web 2 | 3 | Web interface for [rust-persian-tools](https://github.com/persian-tools/rust-persian-tools) library. 4 | 5 | [
Open Web App
](https://ali77gh.github.io/PersianToolsWeb/) 6 | 7 | Powered by WASM and Dioxus and hosted on Github pages. 8 | 9 | ## Screenshots 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | #![allow(non_snake_case)] 2 | 3 | mod core; 4 | mod router; 5 | mod ui; 6 | 7 | use dioxus::prelude::*; 8 | use log::LevelFilter; 9 | use router::MyRouter; 10 | 11 | fn main() { 12 | // Init debug 13 | dioxus_logger::init(LevelFilter::Info).expect("failed to init logger"); 14 | console_error_panic_hook::set_once(); 15 | 16 | launch(App); 17 | } 18 | 19 | fn App() -> Element { 20 | rsx! { 21 | MyRouter {} 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | /target/ 4 | /dist/ 5 | /static/ 6 | /.dioxus/ 7 | 8 | # this file will generate by tailwind: 9 | /assets/tailwind.css 10 | 11 | # Remove Cargo.lock from gitignore if creating an executable, leave it for libraries 12 | # More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html 13 | Cargo.lock 14 | 15 | # These are backup files generated by rustfmt 16 | **/*.rs.bk 17 | -------------------------------------------------------------------------------- /docs/main.css: -------------------------------------------------------------------------------- 1 | *{ 2 | margin: 0px; 3 | padding: 0px; 4 | font-family: 'vazir'; 5 | } 6 | 7 | .rust-gradient{ 8 | background: linear-gradient(-30deg, rgba(205,55,0,1) 0%, rgba(244,146,0,1) 35%); 9 | } 10 | 11 | .top-bar-grad{ 12 | background: linear-gradient(-45deg, rgb(28, 43, 125) 0%, rgb(15, 22, 66) 50%); 13 | } 14 | 15 | .debug-color{ 16 | background: rgb(255, 8, 207); 17 | } 18 | 19 | @font-face { 20 | font-family: 'vazir'; 21 | src: url('vazir.ttf'); 22 | } -------------------------------------------------------------------------------- /assets/main.css: -------------------------------------------------------------------------------- 1 | *{ 2 | margin: 0px; 3 | padding: 0px; 4 | font-family: 'vazir'; 5 | } 6 | 7 | .rust-gradient{ 8 | background: linear-gradient(-30deg, rgba(205,55,0,1) 0%, rgba(244,146,0,1) 35%); 9 | } 10 | 11 | .top-bar-grad{ 12 | background: linear-gradient(-45deg, rgb(28, 43, 125) 0%, rgb(15, 22, 66) 50%); 13 | } 14 | 15 | .debug-color{ 16 | background: rgb(255, 8, 207); 17 | } 18 | 19 | @font-face { 20 | font-family: 'vazir'; 21 | src: url('vazir.ttf'); 22 | } -------------------------------------------------------------------------------- /src/router.rs: -------------------------------------------------------------------------------- 1 | use dioxus::prelude::*; 2 | 3 | use crate::core::find_by_route; 4 | use crate::ui::home::Home; 5 | use crate::ui::tool::ToolPage; 6 | 7 | #[component] 8 | pub fn MyRouter() -> Element { 9 | let href = get_href(); 10 | let sp: Vec<&str> = href.split('/').collect(); 11 | let last = sp.last(); 12 | if let Some(last) = last { 13 | if let Some(tool) = find_by_route(last) { 14 | rsx!(ToolPage { tool }) 15 | } else { 16 | rsx!(Home {}) 17 | } 18 | } else { 19 | rsx!(Home {}) 20 | } 21 | } 22 | 23 | fn get_href() -> String { 24 | web_sys::window().unwrap().location().href().unwrap() 25 | } 26 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "persian-tools-web" 3 | version = "1.1.0" 4 | authors = ["Ali Ghahremani "] 5 | edition = "2021" 6 | 7 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 8 | 9 | [dependencies] 10 | 11 | dioxus = { version = "0.5", features = ["web"] } 12 | rust-persian-tools = { version = "1.1.2", features = ["full"] } 13 | lazy_static = "1.4.0" 14 | 15 | # Debug 16 | log = "0.4.19" 17 | dioxus-logger = "0.4.1" 18 | console_error_panic_hook = "0.1.7" 19 | web-sys = "0.3.69" 20 | 21 | [profile.release] 22 | opt-level = "z" 23 | debug = false 24 | lto = true 25 | codegen-units = 1 26 | panic = "abort" 27 | strip = true 28 | incremental = false -------------------------------------------------------------------------------- /docs/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | persian-tools-web 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | persian-tools-web 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/ui/top_bar.rs: -------------------------------------------------------------------------------- 1 | use dioxus::prelude::*; 2 | 3 | use crate::core::TOOLS; 4 | use rust_persian_tools::digits::en_to_fa; 5 | 6 | #[component] 7 | pub fn TopBar() -> Element { 8 | let top_bar_text = format!( 9 | "مجموعه {} ابزار آفلاین فارسی ایرانی", 10 | en_to_fa(TOOLS.len().to_string()) 11 | ); 12 | 13 | rsx! { 14 | div { dir: "rtl", class: "flex flex-row p-2 items-center top-bar-grad", 15 | img { src: "/PersianToolsWeb/logo.png", width: "60px" } 16 | div { class: "text-white text-xl p-2", {top_bar_text} } 17 | div { class: "grow", "" } 18 | a { 19 | class: "text-white text-xl p-2", 20 | href: "https://github.com/ali77gh/PersianToolsWeb", 21 | "گیت هاب" 22 | } 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Dioxus.toml: -------------------------------------------------------------------------------- 1 | [application] 2 | 3 | # App (Project) Name 4 | name = "persian-tools-web" 5 | 6 | # Dioxus App Default Platform 7 | # desktop, web 8 | default_platform = "web" 9 | 10 | # `build` & `serve` dist path 11 | out_dir = "docs" 12 | 13 | # resource (assets) file folder 14 | asset_dir = "assets" 15 | 16 | [web.app] 17 | 18 | # HTML title tag content 19 | title = "persian-tools-web" 20 | 21 | # github path is https://ali77gh.github.io/PersianToolsWeb/ so: 22 | base_path = "PersianToolsWeb" 23 | 24 | [web.watcher] 25 | 26 | # when watcher trigger, regenerate the `index.html` 27 | reload_html = true 28 | 29 | # which files or dirs will be watcher monitoring 30 | watch_path = ["src", "assets"] 31 | 32 | # include `assets` in web platform 33 | [web.resource] 34 | 35 | # CSS style file 36 | 37 | style = ["/PersianToolsWeb/tailwind.css","/PersianToolsWeb/main.css"] 38 | 39 | # Javascript code file 40 | script = [] 41 | 42 | [web.resource.dev] 43 | 44 | # Javascript code file 45 | # serve: [dev-server] only 46 | script = [] 47 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Ali Ghahremani 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /docs/assets/dioxus/snippets/dioxus-web-84af743b887ebc54/src/eval.js: -------------------------------------------------------------------------------- 1 | export class Dioxus { 2 | constructor(sendCallback, returnCallback) { 3 | this.sendCallback = sendCallback; 4 | this.returnCallback = returnCallback; 5 | this.promiseResolve = null; 6 | this.received = []; 7 | } 8 | 9 | // Receive message from Rust 10 | recv() { 11 | return new Promise((resolve, _reject) => { 12 | // If data already exists, resolve immediately 13 | let data = this.received.shift(); 14 | if (data) { 15 | resolve(data); 16 | return; 17 | } 18 | 19 | // Otherwise set a resolve callback 20 | this.promiseResolve = resolve; 21 | }); 22 | } 23 | 24 | // Send message to rust. 25 | send(data) { 26 | this.sendCallback(data); 27 | } 28 | 29 | // Internal rust send 30 | rustSend(data) { 31 | // If a promise is waiting for data, resolve it, and clear the resolve callback 32 | if (this.promiseResolve) { 33 | this.promiseResolve(data); 34 | this.promiseResolve = null; 35 | return; 36 | } 37 | 38 | // Otherwise add the data to a queue 39 | this.received.push(data); 40 | } 41 | } -------------------------------------------------------------------------------- /src/ui/tool_list_item.rs: -------------------------------------------------------------------------------- 1 | use dioxus::prelude::*; 2 | 3 | use crate::core::tool::Tool; 4 | 5 | #[derive(PartialEq, Props, Clone)] 6 | pub struct ToolWrapper { 7 | pub tool: Tool, 8 | } 9 | 10 | #[component] 11 | pub fn ToolListItem(props: ToolWrapper) -> Element { 12 | let tool = props.tool; 13 | 14 | let tags = tool.tags.iter().map(|tag| { 15 | rsx! { 16 | div { class: "inline-block bg-gray-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2 mt-1", 17 | "#{tag}" 18 | } 19 | } 20 | }); 21 | 22 | rsx! { 23 | div { 24 | dir: "rtl", 25 | class: "max-w-2xl rounded shadow-lg bg-white m-5 p-5 grid justify-items-stretch", 26 | div { class: "font-bold text-xl mb-2", "{tool.name}" } 27 | div { class: "text-gray-700 text-base mb-4 mt-2", "{tool.description}" } 28 | div { {tags} } 29 | a { 30 | href: "/PersianToolsWeb/tool/{tool.route}", 31 | target: "_blank", 32 | class: "bg-blue-500 hover:bg-blue-700 text-white font-bold py-1 px-3 rounded justify-self-end", 33 | "شروع" 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/core/tool.rs: -------------------------------------------------------------------------------- 1 | type Exe = fn(inp: &str) -> Result; 2 | 3 | #[derive(Clone, PartialEq)] 4 | pub struct Tool { 5 | pub name: &'static str, // seeable on list and search 6 | pub description: &'static str, // expand to see 7 | pub tags: Vec<&'static str>, // used for search 8 | pub exe: Exe, 9 | 10 | pub doc_path: &'static str, // expand to see 11 | pub route: &'static str, 12 | pub doc_link: String, 13 | pub sample_input: &'static str, 14 | } 15 | 16 | // route, doc_path, exe, name, tags, description 17 | impl Tool { 18 | pub fn new( 19 | route: &'static str, 20 | doc_path: &'static str, 21 | exe: Exe, 22 | sample_input: &'static str, 23 | name: &'static str, 24 | tags: Vec<&'static str>, 25 | description: &'static str, 26 | ) -> Self { 27 | let doc_link = format!( 28 | "{}/{}/{}", 29 | "https://docs.rs/rust-persian-tools/latest/rust_persian_tools", doc_path, "index.html" 30 | ); 31 | Self { 32 | name, 33 | description, 34 | tags, 35 | exe, 36 | doc_path, 37 | route, 38 | doc_link, 39 | sample_input, 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/ui/search_tool.rs: -------------------------------------------------------------------------------- 1 | use dioxus::prelude::*; 2 | 3 | // use crate::core::get_all_tools; 4 | use crate::{ 5 | core::{tool::Tool, TOOLS}, 6 | ui::tool_list_item::ToolListItem, 7 | }; 8 | 9 | #[component] 10 | pub fn SearchTool() -> Element { 11 | let mut input_search = use_signal(|| "".to_string()); 12 | 13 | let tools_list = TOOLS.iter().map(|tool| { 14 | rsx! { 15 | if check_match(&input_search.read(), tool) { 16 | ToolListItem { tool: tool.clone() } 17 | } 18 | } 19 | }); 20 | 21 | rsx! { 22 | div { 23 | dir: "rtl", 24 | class: "grow flex flex-col items-center rust-gradient", 25 | input { 26 | dir: "rtl", 27 | class: "rounded shadow-lg bg-white m-5 p-3", 28 | placeholder: "جستجو", 29 | value: "{input_search}", 30 | oninput: move |event| input_search.set(event.value()) 31 | } 32 | div { class: "items-center", {tools_list} } 33 | } 34 | } 35 | } 36 | 37 | fn check_match(query: &str, tool: &Tool) -> bool { 38 | let tool_str = format!( 39 | "{} {} {} {}", 40 | &tool.name, 41 | &tool.description, 42 | &tool.tags.join(" "), 43 | &tool.doc_path 44 | ); 45 | 46 | !query 47 | .split(' ') 48 | .filter(|word| !word.is_empty()) 49 | .any(|w| !tool_str.contains(w)) 50 | } 51 | -------------------------------------------------------------------------------- /docs/assets/dioxus/snippets/dioxus-interpreter-js-7c1300c6684e1811/src/js/common.js: -------------------------------------------------------------------------------- 1 | function setAttributeInner(node,field,value,ns){if(ns==="style"){node.style.setProperty(field,value);return}if(ns){node.setAttributeNS(ns,field,value);return}switch(field){case"value":if(node.value!==value)node.value=value;break;case"initial_value":node.defaultValue=value;break;case"checked":node.checked=truthy(value);break;case"initial_checked":node.defaultChecked=truthy(value);break;case"selected":node.selected=truthy(value);break;case"initial_selected":node.defaultSelected=truthy(value);break;case"dangerous_inner_html":node.innerHTML=value;break;default:if(!truthy(value)&&isBoolAttr(field))node.removeAttribute(field);else node.setAttribute(field,value)}}var truthy=function(val){return val==="true"||val===!0},isBoolAttr=function(field){switch(field){case"allowfullscreen":case"allowpaymentrequest":case"async":case"autofocus":case"autoplay":case"checked":case"controls":case"default":case"defer":case"disabled":case"formnovalidate":case"hidden":case"ismap":case"itemscope":case"loop":case"multiple":case"muted":case"nomodule":case"novalidate":case"open":case"playsinline":case"readonly":case"required":case"reversed":case"selected":case"truespeed":case"webkitdirectory":return!0;default:return!1}};function retrieveFormValues(form){const formData=new FormData(form),contents={};return formData.forEach((value,key)=>{if(contents[key])contents[key].push(value);else contents[key]=[value]}),{valid:form.checkValidity(),values:contents}}export{setAttributeInner,retrieveFormValues}; 2 | -------------------------------------------------------------------------------- /src/ui/tool.rs: -------------------------------------------------------------------------------- 1 | use dioxus::prelude::*; 2 | 3 | use crate::core::tool::Tool; 4 | use crate::ui::top_bar::TopBar; 5 | 6 | #[component] 7 | pub fn ToolPage(tool: Tool) -> Element { 8 | rsx! { 9 | div { class: "rust-gradient h-screen w-screen flex flex-col", 10 | TopBar {} 11 | ToolUse { tool } 12 | } 13 | } 14 | } 15 | 16 | #[component] 17 | pub fn ToolUse(tool: Tool) -> Element { 18 | let mut input = use_signal(|| tool.sample_input.to_string()); 19 | 20 | let tags = tool.tags.iter().map(|tag| { 21 | rsx! { 22 | div { class: "inline-block bg-gray-200 rounded-full px-3 py-1 text-sm font-semibold text-gray-700 mr-2 mt-1", 23 | "#{tag}" 24 | } 25 | } 26 | }); 27 | 28 | let mut out = "".to_string(); 29 | let mut err = "".to_string(); 30 | match (tool.exe)(&input.read()) { 31 | Ok(s) => { 32 | out = s; 33 | } 34 | Err(e) => { 35 | err = e; 36 | } 37 | } 38 | 39 | let out_lines = out.split('\n').map(|e| { 40 | rsx! { 41 | div { "{e}" } 42 | } 43 | }); 44 | 45 | rsx! { 46 | div { class: "grow flex flex-col items-center", 47 | div { 48 | dir: "rtl", 49 | class: "max-w-2xl rounded shadow-lg bg-white m-5 p-5 grid justify-items-stretch items-center justify-self-center", 50 | div { class: "font-bold text-xl mb-2", "{tool.name}" } 51 | div { class: "text-gray-700 text-base mb-4 mt-2", "{tool.description}" } 52 | div { {tags} } 53 | input { 54 | dir: "rtl", 55 | class: "rounded m-2 p-3 border-2 border-black mt-4 mb-4", 56 | placeholder: "ورودی", 57 | value: "{input}", 58 | oninput: move |event| input.set(event.value()) 59 | } 60 | div { class: "flex flex-row text-red-600", "{err}" } 61 | div { {out_lines} } 62 | a { 63 | href: "{tool.doc_link}", 64 | target: "_blank", 65 | class: "bg-blue-500 hover:bg-blue-700 text-white font-bold py-1 px-3 rounded justify-self-end", 66 | "مستندات" 67 | } 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/core/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod tool; 2 | pub mod wrapper; 3 | 4 | use wrapper::*; 5 | 6 | use lazy_static::lazy_static; 7 | 8 | use crate::core::tool::Tool; 9 | 10 | lazy_static! { 11 | pub static ref TOOLS: [Tool; 21] = { 12 | [ 13 | Tool::new( 14 | "fa_to_en","digits", digit_converter_fa_en, "۱۲۳۴", 15 | "تبدیل عدد فارسی به انگلیسی و برعکس", vec!["عدد","اعداد","تبدیل"],"۵۴۱ -> 541" 16 | ), 17 | Tool::new( 18 | "number_to_words","number_to_words", number_to_words, "300123987", 19 | "عدد به حروف و برعکس", vec!["حروف","عدد"],"عدد رو به حروف تبدیل میکند" 20 | ), 21 | Tool::new( 22 | "extract_card_number","extract_card_number", extract_card_number, "شماره کارتم رو برات نوشتم: ۵۰۲۲-2910-7۰۸۷-۳۴۶۶", 23 | "شماره کارت بانکی", vec!["بانک","مالی"],"استخراج, اعتبارسنجی و نام بانک شماره کارت بانکی را نمایش می دهد" 24 | ), 25 | Tool::new( 26 | "is_sheba_valid","sheba", sheba, "IR790610000000700796858044", 27 | "شماره شبا", vec!["بانک","مالی"],"اعتبار سنجی و نام بانک مربوط به شماره شبا" 28 | ), 29 | Tool::new( 30 | "get_city_by_iran_national_id", "get_city_by_iran_national_id", national_id, "0021000000", 31 | "کد ملی", vec![], "اعتبار سنجی کد ملی و شهر و استان مربوط به آن" 32 | ), 33 | Tool::new( 34 | "get_car_plate_province","get_plate_type",get_car_plate_province, "68", 35 | "استان - پلاک ماشین", vec!["وسیله ی نقلیه","ماشین" ,"خودرو"],"دو رقم سمت راست پلاک ماشین را میگیرد و استان مربوط به آن را نمایش میدهد" 36 | ), 37 | Tool::new( 38 | "get_car_plate_category","get_plate_type",get_car_plate_category, "ش", 39 | "دسته بندی - پلاک ماشین", vec!["وسیله ی نقلیه","ماشین" ,"خودرو"],"حرف روی پلاک ماشین را میگیرد و دسته بندی مربوط به آن را نمایش میدهد" 40 | ), 41 | Tool::new( 42 | "get_motorcycle_plate_province","get_plate_type",get_motorcycle_plate_province, "442", 43 | "استان - پلاک موتور", vec!["وسیله ی نقلیه","موتور"],"سه رقم بالای پلاک موتور را میگیرد و استان مربوط به آن را نمایش میدهد" 44 | ), 45 | Tool::new( 46 | "is_phone_valid","phone_number",phone_number, "09121111111", 47 | "شماره موبایل", vec!["موبایل","تلفن"],"اعتبار سنجی و نمایش اپراتور و استان مربوط به شماره تلفن همراه" 48 | ), 49 | Tool::new( 50 | "add_commas","commas/add_commas",add_commas,"80000000", 51 | "اضافه کردن کاما", vec![ "عدد", "خوانایی"],"این ابزار هر سه تا رقم سه تا رقم کاما اضافه میکنه و برای راحت تر خونده شدن عدد ها کاربرد داره" 52 | ), 53 | Tool::new( 54 | "to_persian","persian_chars",to_persian_chars, "ملك", 55 | "تبدیل به حروف ویژه فارسی", vec!["فارسی","حروف ویژه"],"حروف ویژه ی عربی (ك یا ي یا ی) \nحروف ویژه ی عربی را به عنوان حروف غیر فارسی در نظر میگیرد" 56 | ), 57 | Tool::new( 58 | "verify_iranian_legal_id","verify_iranian_legal_id",verify_iranian_legal_id, "10380284790", 59 | "شناسه حقوقی", vec!["اعتبار سنجی"],"شناسه حقوقی را اعتبار سنجی میکند" 60 | ), 61 | Tool::new( 62 | "find_capital_by_province","find_capital_by_province",find_capital_by_province, "البرز", 63 | "مرکز استان", vec!["شهر"],"استان را به عنوان ورودی گرفته و مرکز استان را نمایش میدهد" 64 | ), 65 | Tool::new( 66 | "get_bill_info","bill",get_bill_info, "77483178001420000001770160", 67 | "اطلاعات قبض", vec!["قبض"],"نوع و مبلغ قبض رو نمایش میدهد" 68 | ), 69 | Tool::new( 70 | "url_fix","url_fix",url_fix, "https://fa.wikipedia.org/wiki/%D9%85%D8%AF%DB%8C%D8%A7%D9%88%DB%8C%DA%A9%DB%8C:Gadget-Extra-Editbuttons-botworks.js", 71 | "خوانایی url", vec!["خوانایی"],"url های فارسی ناخونا رو به فرمتی خوانا تبدیل میکند" 72 | ), 73 | Tool::new( 74 | "remove_half_space","remove_half_space",remove_half_space, "نمی‌خواهی درخت‌ها را ببینیم؟", 75 | "حذف نیم فاصله", vec!["فرمت"],"نیم فاصله ها را با فاصله جایگزین میکند" 76 | ), 77 | Tool::new( 78 | "add_half_space","add_half_space",add_half_space, "نمی خواهی درخت ها را ببینیم؟", 79 | "نیم فاصله", vec!["تصحیح"],"در صورت نیاز فاصله ها را با نیم فاصله جایگزین میکند" 80 | ), 81 | Tool::new( 82 | "to_arabic","arabic_chars",to_arabic_chars, "ملک", 83 | "تبدیل به حروف عربی", vec!["عربی","حروف ویژه"],"حروف ویژه ی عربی (ك یا ي یا ی)" 84 | ), 85 | Tool::new( 86 | "remove_commas","commas/remove_commas",remove_commas,"80,000,000", 87 | "حذف کردن کاما", vec![ "عدد", "خوانایی"],"این ابزار کاما های یک متن را حذف میکند" 88 | ), 89 | Tool::new( 90 | "add_ordinal_suffix","add_ordinal_suffix",add_ordinal_suffix,"پنج", 91 | "اضافه کردن پسوند ترتیبی", vec![ "عدد", "ترتیب","فارسی", "حروف"],"پنج را به پنجم تبدیل میکند" 92 | ), 93 | Tool::new( 94 | "remove_ordinal_suffix","remove_ordinal_suffix",remove_ordinal_suffix,"پنجم", 95 | "حذف کردن پسوند ترتیبی", vec![ "عدد", "ترتیب","فارسی", "حروف"],"پنجم را به پنج تبدیل میکند" 96 | ), 97 | // Tool::new( 98 | // "time_diff","time_diff",time_diff, "?", 99 | // "اختلاف زمان", vec!["زمان", "تاریخ"],"?" 100 | // ), 101 | ] 102 | }; 103 | } 104 | 105 | pub fn find_by_route(route: &str) -> Option { 106 | TOOLS.iter().find(|tool| tool.route == route).cloned() 107 | } 108 | -------------------------------------------------------------------------------- /src/core/wrapper.rs: -------------------------------------------------------------------------------- 1 | use std::str::FromStr; 2 | 3 | use phone_number::operators::Operator; 4 | use rust_persian_tools::*; 5 | 6 | pub fn add_commas(s: &str) -> Result { 7 | Ok(commas::add_commas::add_commas(s)) 8 | } 9 | 10 | pub fn remove_commas(s: &str) -> Result { 11 | Ok(commas::remove_commas::remove_commas(s)) 12 | } 13 | 14 | pub fn add_ordinal_suffix(s: &str) -> Result { 15 | Ok(add_ordinal_suffix::add_ordinal_suffix(s)) 16 | } 17 | pub fn remove_ordinal_suffix(s: &str) -> Result { 18 | Ok(remove_ordinal_suffix::remove_ordinal_suffix(s)) 19 | } 20 | pub fn to_arabic_chars(s: &str) -> Result { 21 | let has_arabic = bool_to_persian_string(arabic_chars::has_arabic(s)); 22 | let is_arabic = bool_to_persian_string(arabic_chars::is_arabic(s)); 23 | let to_arabic = arabic_chars::to_arabic_chars(s); 24 | Ok(format!( 25 | "عربی دارد: {}\n عربی است: {}\n تبدیل به عربی: \n{}", 26 | has_arabic, is_arabic, to_arabic 27 | )) 28 | } 29 | pub fn get_bill_info(s: &str) -> Result { 30 | let b = match bill::Bill::from_str(s) { 31 | Ok(x) => x, 32 | Err(e) => return Err(e.to_string()), 33 | }; 34 | 35 | Ok(format!( 36 | "نوع:{:?},\n مبلغ:{}", 37 | b.bill_id.r#type, 38 | b.amount(bill::CurrencyType::Rials) 39 | )) 40 | } 41 | 42 | pub fn digit_converter_fa_en(s: &str) -> Result { 43 | if persian_chars::is_persian(s, false) { 44 | Ok(digits::fa_to_en(s)) 45 | } else { 46 | Ok(digits::en_to_fa(s)) 47 | } 48 | } 49 | 50 | pub fn extract_card_number(s: &str) -> Result { 51 | let r = extract_card_number::extract_card_number(s) 52 | .iter() 53 | .map(|x| x.get_base().to_string()) 54 | .map(|x| { 55 | let is_valid = match verity_card_number::verify_card_number(&x) { 56 | Ok(_) => "معتبر".to_string(), 57 | Err(_) => "نامعتبر".to_string(), 58 | }; 59 | let bank_name = match get_bank_name_by_card_number::get_bank_name_by_card_number(&x) { 60 | Ok(x) => x.to_string(), 61 | Err(_) => "نامشخص".to_string(), 62 | }; 63 | 64 | format!("{}, {}, {}", &x, is_valid, bank_name) 65 | }) 66 | .collect::>(); 67 | 68 | if r.is_empty() { 69 | Err("یافت نشد".to_string()) 70 | } else { 71 | Ok(r.join("\n")) 72 | } 73 | } 74 | 75 | pub fn find_capital_by_province(s: &str) -> Result { 76 | r_to_r(find_capital_by_province::find_capital_by_province(s).ok_or("یافت نشد")) 77 | } 78 | 79 | pub fn national_id(s: &str) -> Result { 80 | let is_valid = match national_id::verify_iranian_national_id(s) { 81 | Ok(_) => "معتبر", 82 | Err(_) => "نامعتبر", 83 | }; 84 | let (city, province) = match get_place_by_iran_national_id::get_place_by_iran_national_id(s) { 85 | Ok(x) => ((x).get_city(), (x).get_province()), 86 | Err(_) => ("شهر نامشخص", "استان نامشخص"), 87 | }; 88 | Ok(format!("{}\n{}\n{}", is_valid, city, province)) 89 | } 90 | 91 | pub fn remove_half_space(s: &str) -> Result { 92 | Ok(half_space::remove_half_space(s)) 93 | } 94 | pub fn add_half_space(s: &str) -> Result { 95 | Ok(half_space::add_half_space(s)) 96 | } 97 | pub fn verify_iranian_legal_id(s: &str) -> Result { 98 | r_to_v(legal_id::verify_iranian_legal_id(s)) 99 | } 100 | 101 | pub fn get_car_plate_province(s: &str) -> Result { 102 | let s = digits::fa_to_en(s); 103 | let ds = number_plate::codes::car_dataset(); 104 | let result = u32::from_str(&s).map_err(|_| "عدد وارد کنید".to_string())?; 105 | if s.len() != 2 { 106 | return Err("دو رقم وارد کنید".to_string()); 107 | } 108 | let result = ds.get(&result).ok_or("یافت نشد".to_string())?; 109 | Ok(result.to_string()) 110 | } 111 | pub fn get_car_plate_category(s: &str) -> Result { 112 | let car_ds = number_plate::codes::category_dataset(); 113 | let result = car_ds.get(&s).ok_or("یافت نشد".to_string())?; 114 | Ok(result.to_string()) 115 | } 116 | pub fn get_motorcycle_plate_province(s: &str) -> Result { 117 | let s = digits::fa_to_en(s); 118 | let car_ds = number_plate::codes::motorcycle_dataset(); 119 | let result = u32::from_str(&s).map_err(|_| "عدد وارد کنید".to_string())?; 120 | if s.len() != 3 { 121 | return Err("سه رقم وارد کنید".to_string()); 122 | } 123 | let result = car_ds.get(&result).ok_or("یافت نشد".to_string())?; 124 | Ok(result.to_string()) 125 | } 126 | 127 | pub fn number_to_words(s: &str) -> Result { 128 | let n = digits::fa_to_en(digits::ar_to_en(s)); 129 | if n.parse::().is_ok() { 130 | r_to_r(number_to_words::number_to_words_str(n)) 131 | } else { 132 | r_to_r(words_to_number::words_to_number_str( 133 | s, 134 | &words_to_number::Options::default(), 135 | )) 136 | } 137 | } 138 | 139 | pub fn to_persian_chars(s: &str) -> Result { 140 | let has_persian = bool_to_persian_string(persian_chars::has_persian(s, false)); 141 | let is_persian = bool_to_persian_string(persian_chars::is_persian(s, false)); 142 | let to_persian = persian_chars::to_persian_chars(s); 143 | Ok(format!( 144 | "فارسی دارد: {}\n فارسی است: {}\n تبدیل به فارسی: \n{}", 145 | has_persian, is_persian, to_persian 146 | )) 147 | } 148 | 149 | pub fn phone_number(s: &str) -> Result { 150 | let is_valid = match phone_number::is_phone_valid(s) { 151 | Ok(_) => "معتبر", 152 | Err(_) => return Err("نامعتبر".to_string()), // TODO do same thing (return error on other functions (merged ones)) 153 | }; 154 | let (operator, province) = match phone_number::operators::get_phone_details(s) { 155 | Ok(x) => ((x).operator(), x.base()), 156 | Err(_) => return Ok(is_valid.to_string()), 157 | }; 158 | Ok(format!( 159 | "{}\n{}\n{}", 160 | is_valid, 161 | get_operator_persian_name(&operator), 162 | province 163 | )) 164 | } 165 | 166 | //TODO move this to rust persian tools 167 | fn get_operator_persian_name(op: &Operator) -> &'static str { 168 | match op { 169 | Operator::ShatelMobile => "شاتل", 170 | Operator::MCI => "همراه اول", 171 | Operator::Irancell => "ایرانسل", 172 | Operator::Taliya => "تالیا", 173 | Operator::RightTel => "رایتل", 174 | } 175 | } 176 | 177 | pub fn sheba(s: &str) -> Result { 178 | let is_valid = match sheba::is_sheba_valid(s) { 179 | Ok(()) => "معتبر".to_string(), 180 | Err(_) => "نامعتبر".to_string(), 181 | }; 182 | let (name, persian_name) = match sheba::get_sheba_info(s) { 183 | Ok(info) => (info.get_name(), info.get_persian_name()), 184 | Err(_) => ("بانک نا مشخص", ""), 185 | }; 186 | Ok(format!("{}\n{}\n{}", is_valid, name, persian_name)) 187 | } 188 | 189 | // pub fn time_diff(s: &str) -> Result { 190 | // match rust_persian_tools::time_diff::time_diff_now(s) { 191 | // Ok(time_diff) => Ok(time_diff.long_form()), 192 | // Err(e) => Err(e.to_string()), 193 | // } 194 | // } 195 | pub fn url_fix(s: &str) -> Result { 196 | r_to_r(url_fix::url_fix(s, None)) 197 | } 198 | // --- 199 | 200 | fn r_to_r(i: Result) -> Result 201 | where 202 | T: ToString, 203 | E: ToString, 204 | { 205 | match i { 206 | Ok(x) => Ok(x.to_string()), 207 | Err(e) => Err(e.to_string()), 208 | } 209 | } 210 | fn r_to_v(i: Result<(), E>) -> Result 211 | where 212 | E: ToString, 213 | { 214 | match i { 215 | Ok(_) => Ok("Ok".to_string()), 216 | Err(e) => Err(e.to_string()), 217 | } 218 | } 219 | 220 | fn bool_to_persian_string(b: bool) -> &'static str { 221 | if b { 222 | "بله" 223 | } else { 224 | "خیر" 225 | } 226 | } 227 | -------------------------------------------------------------------------------- /docs/tailwind.css: -------------------------------------------------------------------------------- 1 | /* 2 | ! tailwindcss v3.4.3 | MIT License | https://tailwindcss.com 3 | */ 4 | 5 | /* 6 | 1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4) 7 | 2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116) 8 | */ 9 | 10 | *, 11 | ::before, 12 | ::after { 13 | box-sizing: border-box; 14 | /* 1 */ 15 | border-width: 0; 16 | /* 2 */ 17 | border-style: solid; 18 | /* 2 */ 19 | border-color: #e5e7eb; 20 | /* 2 */ 21 | } 22 | 23 | ::before, 24 | ::after { 25 | --tw-content: ''; 26 | } 27 | 28 | /* 29 | 1. Use a consistent sensible line-height in all browsers. 30 | 2. Prevent adjustments of font size after orientation changes in iOS. 31 | 3. Use a more readable tab size. 32 | 4. Use the user's configured `sans` font-family by default. 33 | 5. Use the user's configured `sans` font-feature-settings by default. 34 | 6. Use the user's configured `sans` font-variation-settings by default. 35 | 7. Disable tap highlights on iOS 36 | */ 37 | 38 | html, 39 | :host { 40 | line-height: 1.5; 41 | /* 1 */ 42 | -webkit-text-size-adjust: 100%; 43 | /* 2 */ 44 | -moz-tab-size: 4; 45 | /* 3 */ 46 | -o-tab-size: 4; 47 | tab-size: 4; 48 | /* 3 */ 49 | font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; 50 | /* 4 */ 51 | font-feature-settings: normal; 52 | /* 5 */ 53 | font-variation-settings: normal; 54 | /* 6 */ 55 | -webkit-tap-highlight-color: transparent; 56 | /* 7 */ 57 | } 58 | 59 | /* 60 | 1. Remove the margin in all browsers. 61 | 2. Inherit line-height from `html` so users can set them as a class directly on the `html` element. 62 | */ 63 | 64 | body { 65 | margin: 0; 66 | /* 1 */ 67 | line-height: inherit; 68 | /* 2 */ 69 | } 70 | 71 | /* 72 | 1. Add the correct height in Firefox. 73 | 2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655) 74 | 3. Ensure horizontal rules are visible by default. 75 | */ 76 | 77 | hr { 78 | height: 0; 79 | /* 1 */ 80 | color: inherit; 81 | /* 2 */ 82 | border-top-width: 1px; 83 | /* 3 */ 84 | } 85 | 86 | /* 87 | Add the correct text decoration in Chrome, Edge, and Safari. 88 | */ 89 | 90 | abbr:where([title]) { 91 | -webkit-text-decoration: underline dotted; 92 | text-decoration: underline dotted; 93 | } 94 | 95 | /* 96 | Remove the default font size and weight for headings. 97 | */ 98 | 99 | h1, 100 | h2, 101 | h3, 102 | h4, 103 | h5, 104 | h6 { 105 | font-size: inherit; 106 | font-weight: inherit; 107 | } 108 | 109 | /* 110 | Reset links to optimize for opt-in styling instead of opt-out. 111 | */ 112 | 113 | a { 114 | color: inherit; 115 | text-decoration: inherit; 116 | } 117 | 118 | /* 119 | Add the correct font weight in Edge and Safari. 120 | */ 121 | 122 | b, 123 | strong { 124 | font-weight: bolder; 125 | } 126 | 127 | /* 128 | 1. Use the user's configured `mono` font-family by default. 129 | 2. Use the user's configured `mono` font-feature-settings by default. 130 | 3. Use the user's configured `mono` font-variation-settings by default. 131 | 4. Correct the odd `em` font sizing in all browsers. 132 | */ 133 | 134 | code, 135 | kbd, 136 | samp, 137 | pre { 138 | font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; 139 | /* 1 */ 140 | font-feature-settings: normal; 141 | /* 2 */ 142 | font-variation-settings: normal; 143 | /* 3 */ 144 | font-size: 1em; 145 | /* 4 */ 146 | } 147 | 148 | /* 149 | Add the correct font size in all browsers. 150 | */ 151 | 152 | small { 153 | font-size: 80%; 154 | } 155 | 156 | /* 157 | Prevent `sub` and `sup` elements from affecting the line height in all browsers. 158 | */ 159 | 160 | sub, 161 | sup { 162 | font-size: 75%; 163 | line-height: 0; 164 | position: relative; 165 | vertical-align: baseline; 166 | } 167 | 168 | sub { 169 | bottom: -0.25em; 170 | } 171 | 172 | sup { 173 | top: -0.5em; 174 | } 175 | 176 | /* 177 | 1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297) 178 | 2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016) 179 | 3. Remove gaps between table borders by default. 180 | */ 181 | 182 | table { 183 | text-indent: 0; 184 | /* 1 */ 185 | border-color: inherit; 186 | /* 2 */ 187 | border-collapse: collapse; 188 | /* 3 */ 189 | } 190 | 191 | /* 192 | 1. Change the font styles in all browsers. 193 | 2. Remove the margin in Firefox and Safari. 194 | 3. Remove default padding in all browsers. 195 | */ 196 | 197 | button, 198 | input, 199 | optgroup, 200 | select, 201 | textarea { 202 | font-family: inherit; 203 | /* 1 */ 204 | font-feature-settings: inherit; 205 | /* 1 */ 206 | font-variation-settings: inherit; 207 | /* 1 */ 208 | font-size: 100%; 209 | /* 1 */ 210 | font-weight: inherit; 211 | /* 1 */ 212 | line-height: inherit; 213 | /* 1 */ 214 | letter-spacing: inherit; 215 | /* 1 */ 216 | color: inherit; 217 | /* 1 */ 218 | margin: 0; 219 | /* 2 */ 220 | padding: 0; 221 | /* 3 */ 222 | } 223 | 224 | /* 225 | Remove the inheritance of text transform in Edge and Firefox. 226 | */ 227 | 228 | button, 229 | select { 230 | text-transform: none; 231 | } 232 | 233 | /* 234 | 1. Correct the inability to style clickable types in iOS and Safari. 235 | 2. Remove default button styles. 236 | */ 237 | 238 | button, 239 | input:where([type='button']), 240 | input:where([type='reset']), 241 | input:where([type='submit']) { 242 | -webkit-appearance: button; 243 | /* 1 */ 244 | background-color: transparent; 245 | /* 2 */ 246 | background-image: none; 247 | /* 2 */ 248 | } 249 | 250 | /* 251 | Use the modern Firefox focus style for all focusable elements. 252 | */ 253 | 254 | :-moz-focusring { 255 | outline: auto; 256 | } 257 | 258 | /* 259 | Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737) 260 | */ 261 | 262 | :-moz-ui-invalid { 263 | box-shadow: none; 264 | } 265 | 266 | /* 267 | Add the correct vertical alignment in Chrome and Firefox. 268 | */ 269 | 270 | progress { 271 | vertical-align: baseline; 272 | } 273 | 274 | /* 275 | Correct the cursor style of increment and decrement buttons in Safari. 276 | */ 277 | 278 | ::-webkit-inner-spin-button, 279 | ::-webkit-outer-spin-button { 280 | height: auto; 281 | } 282 | 283 | /* 284 | 1. Correct the odd appearance in Chrome and Safari. 285 | 2. Correct the outline style in Safari. 286 | */ 287 | 288 | [type='search'] { 289 | -webkit-appearance: textfield; 290 | /* 1 */ 291 | outline-offset: -2px; 292 | /* 2 */ 293 | } 294 | 295 | /* 296 | Remove the inner padding in Chrome and Safari on macOS. 297 | */ 298 | 299 | ::-webkit-search-decoration { 300 | -webkit-appearance: none; 301 | } 302 | 303 | /* 304 | 1. Correct the inability to style clickable types in iOS and Safari. 305 | 2. Change font properties to `inherit` in Safari. 306 | */ 307 | 308 | ::-webkit-file-upload-button { 309 | -webkit-appearance: button; 310 | /* 1 */ 311 | font: inherit; 312 | /* 2 */ 313 | } 314 | 315 | /* 316 | Add the correct display in Chrome and Safari. 317 | */ 318 | 319 | summary { 320 | display: list-item; 321 | } 322 | 323 | /* 324 | Removes the default spacing and border for appropriate elements. 325 | */ 326 | 327 | blockquote, 328 | dl, 329 | dd, 330 | h1, 331 | h2, 332 | h3, 333 | h4, 334 | h5, 335 | h6, 336 | hr, 337 | figure, 338 | p, 339 | pre { 340 | margin: 0; 341 | } 342 | 343 | fieldset { 344 | margin: 0; 345 | padding: 0; 346 | } 347 | 348 | legend { 349 | padding: 0; 350 | } 351 | 352 | ol, 353 | ul, 354 | menu { 355 | list-style: none; 356 | margin: 0; 357 | padding: 0; 358 | } 359 | 360 | /* 361 | Reset default styling for dialogs. 362 | */ 363 | 364 | dialog { 365 | padding: 0; 366 | } 367 | 368 | /* 369 | Prevent resizing textareas horizontally by default. 370 | */ 371 | 372 | textarea { 373 | resize: vertical; 374 | } 375 | 376 | /* 377 | 1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300) 378 | 2. Set the default placeholder color to the user's configured gray 400 color. 379 | */ 380 | 381 | input::-moz-placeholder, textarea::-moz-placeholder { 382 | opacity: 1; 383 | /* 1 */ 384 | color: #9ca3af; 385 | /* 2 */ 386 | } 387 | 388 | input::placeholder, 389 | textarea::placeholder { 390 | opacity: 1; 391 | /* 1 */ 392 | color: #9ca3af; 393 | /* 2 */ 394 | } 395 | 396 | /* 397 | Set the default cursor for buttons. 398 | */ 399 | 400 | button, 401 | [role="button"] { 402 | cursor: pointer; 403 | } 404 | 405 | /* 406 | Make sure disabled buttons don't get the pointer cursor. 407 | */ 408 | 409 | :disabled { 410 | cursor: default; 411 | } 412 | 413 | /* 414 | 1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14) 415 | 2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210) 416 | This can trigger a poorly considered lint error in some tools but is included by design. 417 | */ 418 | 419 | img, 420 | svg, 421 | video, 422 | canvas, 423 | audio, 424 | iframe, 425 | embed, 426 | object { 427 | display: block; 428 | /* 1 */ 429 | vertical-align: middle; 430 | /* 2 */ 431 | } 432 | 433 | /* 434 | Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14) 435 | */ 436 | 437 | img, 438 | video { 439 | max-width: 100%; 440 | height: auto; 441 | } 442 | 443 | /* Make elements with the HTML hidden attribute stay hidden by default */ 444 | 445 | [hidden] { 446 | display: none; 447 | } 448 | 449 | *, ::before, ::after { 450 | --tw-border-spacing-x: 0; 451 | --tw-border-spacing-y: 0; 452 | --tw-translate-x: 0; 453 | --tw-translate-y: 0; 454 | --tw-rotate: 0; 455 | --tw-skew-x: 0; 456 | --tw-skew-y: 0; 457 | --tw-scale-x: 1; 458 | --tw-scale-y: 1; 459 | --tw-pan-x: ; 460 | --tw-pan-y: ; 461 | --tw-pinch-zoom: ; 462 | --tw-scroll-snap-strictness: proximity; 463 | --tw-gradient-from-position: ; 464 | --tw-gradient-via-position: ; 465 | --tw-gradient-to-position: ; 466 | --tw-ordinal: ; 467 | --tw-slashed-zero: ; 468 | --tw-numeric-figure: ; 469 | --tw-numeric-spacing: ; 470 | --tw-numeric-fraction: ; 471 | --tw-ring-inset: ; 472 | --tw-ring-offset-width: 0px; 473 | --tw-ring-offset-color: #fff; 474 | --tw-ring-color: rgb(59 130 246 / 0.5); 475 | --tw-ring-offset-shadow: 0 0 #0000; 476 | --tw-ring-shadow: 0 0 #0000; 477 | --tw-shadow: 0 0 #0000; 478 | --tw-shadow-colored: 0 0 #0000; 479 | --tw-blur: ; 480 | --tw-brightness: ; 481 | --tw-contrast: ; 482 | --tw-grayscale: ; 483 | --tw-hue-rotate: ; 484 | --tw-invert: ; 485 | --tw-saturate: ; 486 | --tw-sepia: ; 487 | --tw-drop-shadow: ; 488 | --tw-backdrop-blur: ; 489 | --tw-backdrop-brightness: ; 490 | --tw-backdrop-contrast: ; 491 | --tw-backdrop-grayscale: ; 492 | --tw-backdrop-hue-rotate: ; 493 | --tw-backdrop-invert: ; 494 | --tw-backdrop-opacity: ; 495 | --tw-backdrop-saturate: ; 496 | --tw-backdrop-sepia: ; 497 | --tw-contain-size: ; 498 | --tw-contain-layout: ; 499 | --tw-contain-paint: ; 500 | --tw-contain-style: ; 501 | } 502 | 503 | ::backdrop { 504 | --tw-border-spacing-x: 0; 505 | --tw-border-spacing-y: 0; 506 | --tw-translate-x: 0; 507 | --tw-translate-y: 0; 508 | --tw-rotate: 0; 509 | --tw-skew-x: 0; 510 | --tw-skew-y: 0; 511 | --tw-scale-x: 1; 512 | --tw-scale-y: 1; 513 | --tw-pan-x: ; 514 | --tw-pan-y: ; 515 | --tw-pinch-zoom: ; 516 | --tw-scroll-snap-strictness: proximity; 517 | --tw-gradient-from-position: ; 518 | --tw-gradient-via-position: ; 519 | --tw-gradient-to-position: ; 520 | --tw-ordinal: ; 521 | --tw-slashed-zero: ; 522 | --tw-numeric-figure: ; 523 | --tw-numeric-spacing: ; 524 | --tw-numeric-fraction: ; 525 | --tw-ring-inset: ; 526 | --tw-ring-offset-width: 0px; 527 | --tw-ring-offset-color: #fff; 528 | --tw-ring-color: rgb(59 130 246 / 0.5); 529 | --tw-ring-offset-shadow: 0 0 #0000; 530 | --tw-ring-shadow: 0 0 #0000; 531 | --tw-shadow: 0 0 #0000; 532 | --tw-shadow-colored: 0 0 #0000; 533 | --tw-blur: ; 534 | --tw-brightness: ; 535 | --tw-contrast: ; 536 | --tw-grayscale: ; 537 | --tw-hue-rotate: ; 538 | --tw-invert: ; 539 | --tw-saturate: ; 540 | --tw-sepia: ; 541 | --tw-drop-shadow: ; 542 | --tw-backdrop-blur: ; 543 | --tw-backdrop-brightness: ; 544 | --tw-backdrop-contrast: ; 545 | --tw-backdrop-grayscale: ; 546 | --tw-backdrop-hue-rotate: ; 547 | --tw-backdrop-invert: ; 548 | --tw-backdrop-opacity: ; 549 | --tw-backdrop-saturate: ; 550 | --tw-backdrop-sepia: ; 551 | --tw-contain-size: ; 552 | --tw-contain-layout: ; 553 | --tw-contain-paint: ; 554 | --tw-contain-style: ; 555 | } 556 | 557 | .static { 558 | position: static; 559 | } 560 | 561 | .m-2 { 562 | margin: 0.5rem; 563 | } 564 | 565 | .m-5 { 566 | margin: 1.25rem; 567 | } 568 | 569 | .mb-2 { 570 | margin-bottom: 0.5rem; 571 | } 572 | 573 | .mb-4 { 574 | margin-bottom: 1rem; 575 | } 576 | 577 | .mr-2 { 578 | margin-right: 0.5rem; 579 | } 580 | 581 | .mt-1 { 582 | margin-top: 0.25rem; 583 | } 584 | 585 | .mt-2 { 586 | margin-top: 0.5rem; 587 | } 588 | 589 | .mt-4 { 590 | margin-top: 1rem; 591 | } 592 | 593 | .inline-block { 594 | display: inline-block; 595 | } 596 | 597 | .flex { 598 | display: flex; 599 | } 600 | 601 | .grid { 602 | display: grid; 603 | } 604 | 605 | .h-screen { 606 | height: 100vh; 607 | } 608 | 609 | .w-full { 610 | width: 100%; 611 | } 612 | 613 | .w-screen { 614 | width: 100vw; 615 | } 616 | 617 | .max-w-2xl { 618 | max-width: 42rem; 619 | } 620 | 621 | .grow { 622 | flex-grow: 1; 623 | } 624 | 625 | .flex-row { 626 | flex-direction: row; 627 | } 628 | 629 | .flex-col { 630 | flex-direction: column; 631 | } 632 | 633 | .items-center { 634 | align-items: center; 635 | } 636 | 637 | .justify-items-stretch { 638 | justify-items: stretch; 639 | } 640 | 641 | .justify-self-end { 642 | justify-self: end; 643 | } 644 | 645 | .justify-self-center { 646 | justify-self: center; 647 | } 648 | 649 | .rounded { 650 | border-radius: 0.25rem; 651 | } 652 | 653 | .rounded-full { 654 | border-radius: 9999px; 655 | } 656 | 657 | .border-2 { 658 | border-width: 2px; 659 | } 660 | 661 | .border-black { 662 | --tw-border-opacity: 1; 663 | border-color: rgb(0 0 0 / var(--tw-border-opacity)); 664 | } 665 | 666 | .bg-blue-500 { 667 | --tw-bg-opacity: 1; 668 | background-color: rgb(59 130 246 / var(--tw-bg-opacity)); 669 | } 670 | 671 | .bg-gray-200 { 672 | --tw-bg-opacity: 1; 673 | background-color: rgb(229 231 235 / var(--tw-bg-opacity)); 674 | } 675 | 676 | .bg-white { 677 | --tw-bg-opacity: 1; 678 | background-color: rgb(255 255 255 / var(--tw-bg-opacity)); 679 | } 680 | 681 | .p-2 { 682 | padding: 0.5rem; 683 | } 684 | 685 | .p-3 { 686 | padding: 0.75rem; 687 | } 688 | 689 | .p-5 { 690 | padding: 1.25rem; 691 | } 692 | 693 | .px-3 { 694 | padding-left: 0.75rem; 695 | padding-right: 0.75rem; 696 | } 697 | 698 | .py-1 { 699 | padding-top: 0.25rem; 700 | padding-bottom: 0.25rem; 701 | } 702 | 703 | .text-base { 704 | font-size: 1rem; 705 | line-height: 1.5rem; 706 | } 707 | 708 | .text-sm { 709 | font-size: 0.875rem; 710 | line-height: 1.25rem; 711 | } 712 | 713 | .text-xl { 714 | font-size: 1.25rem; 715 | line-height: 1.75rem; 716 | } 717 | 718 | .font-bold { 719 | font-weight: 700; 720 | } 721 | 722 | .font-semibold { 723 | font-weight: 600; 724 | } 725 | 726 | .text-gray-700 { 727 | --tw-text-opacity: 1; 728 | color: rgb(55 65 81 / var(--tw-text-opacity)); 729 | } 730 | 731 | .text-red-600 { 732 | --tw-text-opacity: 1; 733 | color: rgb(220 38 38 / var(--tw-text-opacity)); 734 | } 735 | 736 | .text-white { 737 | --tw-text-opacity: 1; 738 | color: rgb(255 255 255 / var(--tw-text-opacity)); 739 | } 740 | 741 | .shadow-lg { 742 | --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); 743 | --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color); 744 | box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); 745 | } 746 | 747 | .filter { 748 | filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); 749 | } 750 | 751 | .hover\:bg-blue-700:hover { 752 | --tw-bg-opacity: 1; 753 | background-color: rgb(29 78 216 / var(--tw-bg-opacity)); 754 | } -------------------------------------------------------------------------------- /docs/assets/dioxus/snippets/dioxus-interpreter-js-7c1300c6684e1811/inline0.js: -------------------------------------------------------------------------------- 1 | 2 | function setAttributeInner(node,field,value,ns){if(ns==="style"){node.style.setProperty(field,value);return}if(ns){node.setAttributeNS(ns,field,value);return}switch(field){case"value":if(node.value!==value)node.value=value;break;case"initial_value":node.defaultValue=value;break;case"checked":node.checked=truthy(value);break;case"initial_checked":node.defaultChecked=truthy(value);break;case"selected":node.selected=truthy(value);break;case"initial_selected":node.defaultSelected=truthy(value);break;case"dangerous_inner_html":node.innerHTML=value;break;default:if(!truthy(value)&&isBoolAttr(field))node.removeAttribute(field);else node.setAttribute(field,value)}}var truthy=function(val){return val==="true"||val===!0},isBoolAttr=function(field){switch(field){case"allowfullscreen":case"allowpaymentrequest":case"async":case"autofocus":case"autoplay":case"checked":case"controls":case"default":case"defer":case"disabled":case"formnovalidate":case"hidden":case"ismap":case"itemscope":case"loop":case"multiple":case"muted":case"nomodule":case"novalidate":case"open":case"playsinline":case"readonly":case"required":case"reversed":case"selected":case"truespeed":case"webkitdirectory":return!0;default:return!1}};class BaseInterpreter{global;local;root;handler;nodes;stack;templates;m;constructor(){}initialize(root,handler=null){if(this.global={},this.local={},this.root=root,this.nodes=[root],this.stack=[root],this.templates={},handler)this.handler=handler}createListener(event_name,element,bubbles){if(bubbles)if(this.global[event_name]===void 0)this.global[event_name]={active:1,callback:this.handler},this.root.addEventListener(event_name,this.handler);else this.global[event_name].active++;else{const id=element.getAttribute("data-dioxus-id");if(!this.local[id])this.local[id]={};element.addEventListener(event_name,this.handler)}}removeListener(element,event_name,bubbles){if(bubbles)this.removeBubblingListener(event_name);else this.removeNonBubblingListener(element,event_name)}removeBubblingListener(event_name){if(this.global[event_name].active--,this.global[event_name].active===0)this.root.removeEventListener(event_name,this.global[event_name].callback),delete this.global[event_name]}removeNonBubblingListener(element,event_name){const id=element.getAttribute("data-dioxus-id");if(delete this.local[id][event_name],Object.keys(this.local[id]).length===0)delete this.local[id];element.removeEventListener(event_name,this.handler)}removeAllNonBubblingListeners(element){const id=element.getAttribute("data-dioxus-id");delete this.local[id]}getNode(id){return this.nodes[id]}appendChildren(id,many){const root=this.nodes[id],els=this.stack.splice(this.stack.length-many);for(let k=0;k0;end--)node=node.nextSibling}return node}saveTemplate(nodes,tmpl_id){this.templates[tmpl_id]=nodes}hydrate(ids){const hydrateNodes=document.querySelectorAll("[data-node-hydration]");for(let i=0;i1){hydrateNode.listening=split.length-1,hydrateNode.setAttribute("data-dioxus-id",id.toString());for(let j=1;j1)this.nodes[ids[parseInt(split[1])]]=currentNode.nextSibling;currentNode=treeWalker.nextNode()}}setAttributeInner(node,field,value,ns){setAttributeInner(node,field,value,ns)}}export{BaseInterpreter}; 3 | 4 | let value,id,field,ns,many,bubbles; 5 | export class RawInterpreter extends BaseInterpreter { 6 | constructor(r) { 7 | super(); 8 | this.d=r; 9 | this.m = null; 10 | this.p = null; 11 | this.ls = null; 12 | this.t = null; 13 | this.op = null; 14 | this.e = null; 15 | this.z = null; 16 | this.metaflags = null; 17 | this.u8buf=null;this.u8bufp=null;this.s = "";this.lsp = null;this.sp = null;this.sl = null;this.c = new TextDecoder();this.attr = []; 18 | this.attr_cache_hit = null; 19 | this.attr_cache_idx; 20 | this.get_attr = function() { 21 | this.attr_cache_idx = this.u8buf[this.u8bufp++]; 22 | if(this.attr_cache_idx & 128){ 23 | this.attr_cache_hit=this.s.substring(this.sp,this.sp+=this.u8buf[this.u8bufp++]); 24 | this.attr[this.attr_cache_idx&4294967167]=this.attr_cache_hit; 25 | return this.attr_cache_hit; 26 | } 27 | else{ 28 | return this.attr[this.attr_cache_idx&4294967167]; 29 | } 30 | };this.u32buf=null;this.u32bufp=null;this.el = []; 31 | this.el_cache_hit = null; 32 | this.el_cache_idx; 33 | this.get_el = function() { 34 | this.el_cache_idx = this.u8buf[this.u8bufp++]; 35 | if(this.el_cache_idx & 128){ 36 | this.el_cache_hit=this.s.substring(this.sp,this.sp+=this.u8buf[this.u8bufp++]); 37 | this.el[this.el_cache_idx&4294967167]=this.el_cache_hit; 38 | return this.el_cache_hit; 39 | } 40 | else{ 41 | return this.el[this.el_cache_idx&4294967167]; 42 | } 43 | };this.ns_cache = []; 44 | this.ns_cache_cache_hit = null; 45 | this.ns_cache_cache_idx; 46 | this.get_ns_cache = function() { 47 | this.ns_cache_cache_idx = this.u8buf[this.u8bufp++]; 48 | if(this.ns_cache_cache_idx & 128){ 49 | this.ns_cache_cache_hit=this.s.substring(this.sp,this.sp+=this.u8buf[this.u8bufp++]); 50 | this.ns_cache[this.ns_cache_cache_idx&4294967167]=this.ns_cache_cache_hit; 51 | return this.ns_cache_cache_hit; 52 | } 53 | else{ 54 | return this.ns_cache[this.ns_cache_cache_idx&4294967167]; 55 | } 56 | };this.u16buf=null;this.u16bufp=null;this.namespace = []; 57 | this.namespace_cache_hit = null; 58 | this.namespace_cache_idx; 59 | this.get_namespace = function() { 60 | this.namespace_cache_idx = this.u8buf[this.u8bufp++]; 61 | if(this.namespace_cache_idx & 128){ 62 | this.namespace_cache_hit=this.s.substring(this.sp,this.sp+=this.u8buf[this.u8bufp++]); 63 | this.namespace[this.namespace_cache_idx&4294967167]=this.namespace_cache_hit; 64 | return this.namespace_cache_hit; 65 | } 66 | else{ 67 | return this.namespace[this.namespace_cache_idx&4294967167]; 68 | } 69 | };this.evt = []; 70 | this.evt_cache_hit = null; 71 | this.evt_cache_idx; 72 | this.get_evt = function() { 73 | this.evt_cache_idx = this.u8buf[this.u8bufp++]; 74 | if(this.evt_cache_idx & 128){ 75 | this.evt_cache_hit=this.s.substring(this.sp,this.sp+=this.u8buf[this.u8bufp++]); 76 | this.evt[this.evt_cache_idx&4294967167]=this.evt_cache_hit; 77 | return this.evt_cache_hit; 78 | } 79 | else{ 80 | return this.evt[this.evt_cache_idx&4294967167]; 81 | } 82 | }; 83 | } 84 | 85 | update_memory(b){ 86 | this.m=new DataView(b.buffer) 87 | } 88 | 89 | run(){ 90 | this.metaflags=this.m.getUint32(this.d,true); 91 | if((this.metaflags>>>6)&1){ 92 | this.ls=this.m.getUint32(this.d+6*4,true); 93 | } 94 | this.p=this.ls; 95 | if ((this.metaflags>>>5)&1){ 96 | this.t = this.m.getUint32(this.d+5*4,true); 97 | this.u8buf=new Uint8Array(this.m.buffer,this.t,((this.m.buffer.byteLength-this.t)-(this.m.buffer.byteLength-this.t)%1)/1); 98 | } 99 | this.u8bufp=0;if (this.metaflags&1){ 100 | this.lsp = this.m.getUint32(this.d+1*4,true); 101 | } 102 | if ((this.metaflags>>>2)&1) { 103 | this.sl = this.m.getUint32(this.d+2*4,true); 104 | if ((this.metaflags>>>1)&1) { 105 | this.sp = this.lsp; 106 | this.s = ""; 107 | this.e = this.sp + ((this.sl / 4) | 0) * 4; 108 | while (this.sp < this.e) { 109 | this.t = this.m.getUint32(this.sp, true); 110 | this.s += String.fromCharCode( 111 | this.t & 255, 112 | (this.t & 65280) >> 8, 113 | (this.t & 16711680) >> 16, 114 | this.t >> 24 115 | ); 116 | this.sp += 4; 117 | } 118 | while (this.sp < this.lsp + this.sl) { 119 | this.s += String.fromCharCode(this.m.getUint8(this.sp++)); 120 | } 121 | } else { 122 | this.s = this.c.decode(new DataView(this.m.buffer, this.lsp, this.sl)); 123 | } 124 | } 125 | this.sp=0;if ((this.metaflags>>>3)&1){ 126 | this.t = this.m.getUint32(this.d+3*4,true); 127 | this.u32buf=new Uint32Array(this.m.buffer,this.t,((this.m.buffer.byteLength-this.t)-(this.m.buffer.byteLength-this.t)%4)/4); 128 | } 129 | this.u32bufp=0;if ((this.metaflags>>>4)&1){ 130 | this.t = this.m.getUint32(this.d+4*4,true); 131 | this.u16buf=new Uint16Array(this.m.buffer,this.t,((this.m.buffer.byteLength-this.t)-(this.m.buffer.byteLength-this.t)%2)/2); 132 | } 133 | this.u16bufp=0; 134 | for(;;){ 135 | this.op=this.m.getUint32(this.p,true); 136 | this.p+=4; 137 | this.z=0; 138 | while(this.z++<4){ 139 | switch(this.op&255){ 140 | case 0:{this.appendChildren(this.root, this.stack.length-1);}break;case 1:{this.stack.push(this.nodes[this.u32buf[this.u32bufp++]]);}break;case 2:{this.appendChildren(this.u32buf[this.u32bufp++], this.u16buf[this.u16bufp++]);}break;case 3:{this.stack.pop();}break;case 4:{const root = this.nodes[this.u32buf[this.u32bufp++]]; let els = this.stack.splice(this.stack.length-this.u16buf[this.u16bufp++]); if (root.listening) { this.removeAllNonBubblingListeners(root); } root.replaceWith(...els);}break;case 5:{this.nodes[this.u32buf[this.u32bufp++]].after(...this.stack.splice(this.stack.length-this.u16buf[this.u16bufp++]));}break;case 6:{this.nodes[this.u32buf[this.u32bufp++]].before(...this.stack.splice(this.stack.length-this.u16buf[this.u16bufp++]));}break;case 7:{let node = this.nodes[this.u32buf[this.u32bufp++]]; if (node !== undefined) { if (node.listening) { this.removeAllNonBubblingListeners(node); } node.remove(); }}break;case 8:{this.stack.push(document.createTextNode(this.s.substring(this.sp,this.sp+=this.u32buf[this.u32bufp++])));}break;case 9:{let node = document.createTextNode(this.s.substring(this.sp,this.sp+=this.u32buf[this.u32bufp++])); this.nodes[this.u32buf[this.u32bufp++]] = node; this.stack.push(node);}break;case 10:{let node = document.createElement('pre'); node.hidden = true; this.stack.push(node); this.nodes[this.u32buf[this.u32bufp++]] = node;}break;case 11:id=this.u32buf[this.u32bufp++]; 141 | let node = this.nodes[id]; 142 | if(node.listening){node.listening += 1;}else{node.listening = 1;} 143 | node.setAttribute('data-dioxus-id', `${id}`); 144 | this.createListener(this.get_evt(), node, this.u8buf[this.u8bufp++]); 145 | break;case 12:{let node = this.nodes[this.u32buf[this.u32bufp++]]; node.listening -= 1; node.removeAttribute('data-dioxus-id'); this.removeListener(node, this.get_evt(), this.u8buf[this.u8bufp++]);}break;case 13:{this.nodes[this.u32buf[this.u32bufp++]].textContent = this.s.substring(this.sp,this.sp+=this.u32buf[this.u32bufp++]);}break;case 14:{let node = this.nodes[this.u32buf[this.u32bufp++]]; this.setAttributeInner(node, this.get_attr(), this.s.substring(this.sp,this.sp+=this.u32buf[this.u32bufp++]), this.get_ns_cache());}break;case 15:field=this.get_attr();ns=this.get_ns_cache();{ 146 | let node = this.nodes[this.u32buf[this.u32bufp++]]; 147 | if (!ns) { 148 | switch (field) { 149 | case "value": 150 | node.value = ""; 151 | break; 152 | case "checked": 153 | node.checked = false; 154 | break; 155 | case "selected": 156 | node.selected = false; 157 | break; 158 | case "dangerous_inner_html": 159 | node.innerHTML = ""; 160 | break; 161 | default: 162 | node.removeAttribute(field); 163 | break; 164 | } 165 | } else if (ns == "style") { 166 | node.style.removeProperty(field); 167 | } else { 168 | node.removeAttributeNS(ns, field); 169 | } 170 | }break;case 16:{this.nodes[this.u32buf[this.u32bufp++]] = this.loadChild(this.u32buf[this.u32bufp++], this.u8buf[this.u8bufp++]);}break;case 17:value=this.s.substring(this.sp,this.sp+=this.u32buf[this.u32bufp++]);{ 171 | let node = this.loadChild(this.u32buf[this.u32bufp++], this.u8buf[this.u8bufp++]); 172 | if (node.nodeType == node.TEXT_NODE) { 173 | node.textContent = value; 174 | } else { 175 | let text = document.createTextNode(value); 176 | node.replaceWith(text); 177 | node = text; 178 | } 179 | this.nodes[this.u32buf[this.u32bufp++]] = node; 180 | }break;case 18:{let els = this.stack.splice(this.stack.length - this.u16buf[this.u16bufp++]); let node = this.loadChild(this.u32buf[this.u32bufp++], this.u8buf[this.u8bufp++]); node.replaceWith(...els);}break;case 19:{let node = this.templates[this.u16buf[this.u16bufp++]][this.u16buf[this.u16bufp++]].cloneNode(true); this.nodes[this.u32buf[this.u32bufp++]] = node; this.stack.push(node);}break;case 20:many=this.u16buf[this.u16bufp++];{ 181 | let root = this.stack[this.stack.length-many-1]; 182 | let els = this.stack.splice(this.stack.length-many); 183 | for (let k = 0; k < many; k++) { 184 | root.appendChild(els[k]); 185 | } 186 | }break;case 21:{this.setAttributeInner(this.stack[this.stack.length-1], this.get_attr(), this.s.substring(this.sp,this.sp+=this.u32buf[this.u32bufp++]), this.get_ns_cache());}break;case 22:{let node = document.createElement('pre'); node.hidden = true; this.stack.push(node);}break;case 23:{this.stack.push(document.createElement(this.get_el()))}break;case 24:{this.stack.push(document.createElementNS(this.get_namespace(), this.get_el()))}break;case 25:{this.templates[this.u16buf[this.u16bufp++]] = this.stack.splice(this.stack.length-this.u16buf[this.u16bufp++]);}break;case 26:id=this.u32buf[this.u32bufp++];bubbles=this.u8buf[this.u8bufp++]; 187 | bubbles = bubbles == 1; 188 | let this_node = this.nodes[id]; 189 | if(this_node.listening){ 190 | this_node.listening += 1; 191 | } else { 192 | this_node.listening = 1; 193 | } 194 | this_node.setAttribute('data-dioxus-id', `${id}`); 195 | const event_name = this.get_evt(); 196 | 197 | // if this is a mounted listener, we send the event immediately 198 | if (event_name === "mounted") { 199 | window.ipc.postMessage( 200 | this.serializeIpcMessage("user_event", { 201 | name: event_name, 202 | element: id, 203 | data: null, 204 | bubbles, 205 | }) 206 | ); 207 | } else { 208 | this.createListener(event_name, this_node, bubbles, (event) => { 209 | this.handler(event, event_name, bubbles); 210 | }); 211 | }break;case 27:{this.nodes[this.u32buf[this.u32bufp++]] = this.loadChild((()=>{this.e=this.u8bufp+this.u32buf[this.u32bufp++];const final_array = this.u8buf.slice(this.u8bufp,this.e);this.u8bufp=this.e;return final_array;})());}break;case 28:value=this.s.substring(this.sp,this.sp+=this.u32buf[this.u32bufp++]);{ 212 | let node = this.loadChild((()=>{this.e=this.u8bufp+this.u32buf[this.u32bufp++];const final_array = this.u8buf.slice(this.u8bufp,this.e);this.u8bufp=this.e;return final_array;})()); 213 | if (node.nodeType == node.TEXT_NODE) { 214 | node.textContent = value; 215 | } else { 216 | let text = document.createTextNode(value); 217 | node.replaceWith(text); 218 | node = text; 219 | } 220 | this.nodes[this.u32buf[this.u32bufp++]] = node; 221 | }break;case 29:{let els = this.stack.splice(this.stack.length - this.u16buf[this.u16bufp++]); let node = this.loadChild((()=>{this.e=this.u8bufp+this.u32buf[this.u32bufp++];const final_array = this.u8buf.slice(this.u8bufp,this.e);this.u8bufp=this.e;return final_array;})()); node.replaceWith(...els);}break;case 30:return true; 222 | } 223 | this.op>>>=8; 224 | } 225 | } 226 | } 227 | 228 | run_from_bytes(bytes){ 229 | this.d = 0; 230 | this.update_memory(new Uint8Array(bytes)) 231 | this.run() 232 | } 233 | } -------------------------------------------------------------------------------- /assets/header.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/header.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/assets/dioxus/persian-tools-web.js: -------------------------------------------------------------------------------- 1 | import { RawInterpreter } from './snippets/dioxus-interpreter-js-7c1300c6684e1811/inline0.js'; 2 | import { setAttributeInner } from './snippets/dioxus-interpreter-js-7c1300c6684e1811/src/js/common.js'; 3 | import { get_form_data } from './snippets/dioxus-web-84af743b887ebc54/inline0.js'; 4 | import { get_select_data } from './snippets/dioxus-web-84af743b887ebc54/inline1.js'; 5 | import { Dioxus } from './snippets/dioxus-web-84af743b887ebc54/src/eval.js'; 6 | 7 | let wasm; 8 | 9 | const heap = new Array(128).fill(undefined); 10 | 11 | heap.push(undefined, null, true, false); 12 | 13 | function getObject(idx) { return heap[idx]; } 14 | 15 | let heap_next = heap.length; 16 | 17 | function dropObject(idx) { 18 | if (idx < 132) return; 19 | heap[idx] = heap_next; 20 | heap_next = idx; 21 | } 22 | 23 | function takeObject(idx) { 24 | const ret = getObject(idx); 25 | dropObject(idx); 26 | return ret; 27 | } 28 | 29 | function addHeapObject(obj) { 30 | if (heap_next === heap.length) heap.push(heap.length + 1); 31 | const idx = heap_next; 32 | heap_next = heap[idx]; 33 | 34 | if (typeof(heap_next) !== 'number') throw new Error('corrupt heap'); 35 | 36 | heap[idx] = obj; 37 | return idx; 38 | } 39 | 40 | const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } ); 41 | 42 | if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); }; 43 | 44 | let cachedUint8Memory0 = null; 45 | 46 | function getUint8Memory0() { 47 | if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) { 48 | cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer); 49 | } 50 | return cachedUint8Memory0; 51 | } 52 | 53 | function getStringFromWasm0(ptr, len) { 54 | ptr = ptr >>> 0; 55 | return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len)); 56 | } 57 | 58 | function _assertBoolean(n) { 59 | if (typeof(n) !== 'boolean') { 60 | throw new Error(`expected a boolean argument, found ${typeof(n)}`); 61 | } 62 | } 63 | 64 | let WASM_VECTOR_LEN = 0; 65 | 66 | const cachedTextEncoder = (typeof TextEncoder !== 'undefined' ? new TextEncoder('utf-8') : { encode: () => { throw Error('TextEncoder not available') } } ); 67 | 68 | const encodeString = (typeof cachedTextEncoder.encodeInto === 'function' 69 | ? function (arg, view) { 70 | return cachedTextEncoder.encodeInto(arg, view); 71 | } 72 | : function (arg, view) { 73 | const buf = cachedTextEncoder.encode(arg); 74 | view.set(buf); 75 | return { 76 | read: arg.length, 77 | written: buf.length 78 | }; 79 | }); 80 | 81 | function passStringToWasm0(arg, malloc, realloc) { 82 | 83 | if (typeof(arg) !== 'string') throw new Error(`expected a string argument, found ${typeof(arg)}`); 84 | 85 | if (realloc === undefined) { 86 | const buf = cachedTextEncoder.encode(arg); 87 | const ptr = malloc(buf.length, 1) >>> 0; 88 | getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf); 89 | WASM_VECTOR_LEN = buf.length; 90 | return ptr; 91 | } 92 | 93 | let len = arg.length; 94 | let ptr = malloc(len, 1) >>> 0; 95 | 96 | const mem = getUint8Memory0(); 97 | 98 | let offset = 0; 99 | 100 | for (; offset < len; offset++) { 101 | const code = arg.charCodeAt(offset); 102 | if (code > 0x7F) break; 103 | mem[ptr + offset] = code; 104 | } 105 | 106 | if (offset !== len) { 107 | if (offset !== 0) { 108 | arg = arg.slice(offset); 109 | } 110 | ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0; 111 | const view = getUint8Memory0().subarray(ptr + offset, ptr + len); 112 | const ret = encodeString(arg, view); 113 | if (ret.read !== arg.length) throw new Error('failed to pass whole string'); 114 | offset += ret.written; 115 | ptr = realloc(ptr, len, offset, 1) >>> 0; 116 | } 117 | 118 | WASM_VECTOR_LEN = offset; 119 | return ptr; 120 | } 121 | 122 | function isLikeNone(x) { 123 | return x === undefined || x === null; 124 | } 125 | 126 | let cachedInt32Memory0 = null; 127 | 128 | function getInt32Memory0() { 129 | if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) { 130 | cachedInt32Memory0 = new Int32Array(wasm.memory.buffer); 131 | } 132 | return cachedInt32Memory0; 133 | } 134 | 135 | function _assertNum(n) { 136 | if (typeof(n) !== 'number') throw new Error(`expected a number argument, found ${typeof(n)}`); 137 | } 138 | 139 | let cachedFloat64Memory0 = null; 140 | 141 | function getFloat64Memory0() { 142 | if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) { 143 | cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer); 144 | } 145 | return cachedFloat64Memory0; 146 | } 147 | 148 | function _assertBigInt(n) { 149 | if (typeof(n) !== 'bigint') throw new Error(`expected a bigint argument, found ${typeof(n)}`); 150 | } 151 | 152 | let cachedBigInt64Memory0 = null; 153 | 154 | function getBigInt64Memory0() { 155 | if (cachedBigInt64Memory0 === null || cachedBigInt64Memory0.byteLength === 0) { 156 | cachedBigInt64Memory0 = new BigInt64Array(wasm.memory.buffer); 157 | } 158 | return cachedBigInt64Memory0; 159 | } 160 | 161 | function debugString(val) { 162 | // primitive types 163 | const type = typeof val; 164 | if (type == 'number' || type == 'boolean' || val == null) { 165 | return `${val}`; 166 | } 167 | if (type == 'string') { 168 | return `"${val}"`; 169 | } 170 | if (type == 'symbol') { 171 | const description = val.description; 172 | if (description == null) { 173 | return 'Symbol'; 174 | } else { 175 | return `Symbol(${description})`; 176 | } 177 | } 178 | if (type == 'function') { 179 | const name = val.name; 180 | if (typeof name == 'string' && name.length > 0) { 181 | return `Function(${name})`; 182 | } else { 183 | return 'Function'; 184 | } 185 | } 186 | // objects 187 | if (Array.isArray(val)) { 188 | const length = val.length; 189 | let debug = '['; 190 | if (length > 0) { 191 | debug += debugString(val[0]); 192 | } 193 | for(let i = 1; i < length; i++) { 194 | debug += ', ' + debugString(val[i]); 195 | } 196 | debug += ']'; 197 | return debug; 198 | } 199 | // Test for built-in 200 | const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val)); 201 | let className; 202 | if (builtInMatches.length > 1) { 203 | className = builtInMatches[1]; 204 | } else { 205 | // Failed to match the standard '[object ClassName]' 206 | return toString.call(val); 207 | } 208 | if (className == 'Object') { 209 | // we're a user defined class or Object 210 | // JSON.stringify avoids problems with cycles, and is generally much 211 | // easier than looping through ownProperties of `val`. 212 | try { 213 | return 'Object(' + JSON.stringify(val) + ')'; 214 | } catch (_) { 215 | return 'Object'; 216 | } 217 | } 218 | // errors 219 | if (val instanceof Error) { 220 | return `${val.name}: ${val.message}\n${val.stack}`; 221 | } 222 | // TODO we could test for more things here, like `Set`s and `Map`s. 223 | return className; 224 | } 225 | 226 | const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined') 227 | ? { register: () => {}, unregister: () => {} } 228 | : new FinalizationRegistry(state => { 229 | wasm.__wbindgen_export_2.get(state.dtor)(state.a, state.b) 230 | }); 231 | 232 | function makeMutClosure(arg0, arg1, dtor, f) { 233 | const state = { a: arg0, b: arg1, cnt: 1, dtor }; 234 | const real = (...args) => { 235 | // First up with a closure we increment the internal reference 236 | // count. This ensures that the Rust closure environment won't 237 | // be deallocated while we're invoking it. 238 | state.cnt++; 239 | const a = state.a; 240 | state.a = 0; 241 | try { 242 | return f(a, state.b, ...args); 243 | } finally { 244 | if (--state.cnt === 0) { 245 | wasm.__wbindgen_export_2.get(state.dtor)(a, state.b); 246 | CLOSURE_DTORS.unregister(state); 247 | } else { 248 | state.a = a; 249 | } 250 | } 251 | }; 252 | real.original = state; 253 | CLOSURE_DTORS.register(real, state, state); 254 | return real; 255 | } 256 | 257 | function logError(f, args) { 258 | try { 259 | return f.apply(this, args); 260 | } catch (e) { 261 | let error = (function () { 262 | try { 263 | return e instanceof Error ? `${e.message}\n\nStack:\n${e.stack}` : e.toString(); 264 | } catch(_) { 265 | return ""; 266 | } 267 | }()); 268 | console.error("wasm-bindgen: imported JS function that was not marked as `catch` threw an error:", error); 269 | throw e; 270 | } 271 | } 272 | function __wbg_adapter_48(arg0, arg1, arg2) { 273 | _assertNum(arg0); 274 | _assertNum(arg1); 275 | wasm.__wbindgen_export_3(arg0, arg1, addHeapObject(arg2)); 276 | } 277 | 278 | function __wbg_adapter_51(arg0, arg1) { 279 | _assertNum(arg0); 280 | _assertNum(arg1); 281 | wasm.__wbindgen_export_4(arg0, arg1); 282 | } 283 | 284 | let stack_pointer = 128; 285 | 286 | function addBorrowedObject(obj) { 287 | if (stack_pointer == 1) throw new Error('out of js stack'); 288 | heap[--stack_pointer] = obj; 289 | return stack_pointer; 290 | } 291 | function __wbg_adapter_54(arg0, arg1, arg2) { 292 | try { 293 | _assertNum(arg0); 294 | _assertNum(arg1); 295 | wasm.__wbindgen_export_5(arg0, arg1, addBorrowedObject(arg2)); 296 | } finally { 297 | heap[stack_pointer++] = undefined; 298 | } 299 | } 300 | 301 | let cachedUint32Memory0 = null; 302 | 303 | function getUint32Memory0() { 304 | if (cachedUint32Memory0 === null || cachedUint32Memory0.byteLength === 0) { 305 | cachedUint32Memory0 = new Uint32Array(wasm.memory.buffer); 306 | } 307 | return cachedUint32Memory0; 308 | } 309 | 310 | function getArrayJsValueFromWasm0(ptr, len) { 311 | ptr = ptr >>> 0; 312 | const mem = getUint32Memory0(); 313 | const slice = mem.subarray(ptr / 4, ptr / 4 + len); 314 | const result = []; 315 | for (let i = 0; i < slice.length; i++) { 316 | result.push(takeObject(slice[i])); 317 | } 318 | return result; 319 | } 320 | 321 | function passArrayJsValueToWasm0(array, malloc) { 322 | const ptr = malloc(array.length * 4, 4) >>> 0; 323 | const mem = getUint32Memory0(); 324 | for (let i = 0; i < array.length; i++) { 325 | mem[ptr / 4 + i] = addHeapObject(array[i]); 326 | } 327 | WASM_VECTOR_LEN = array.length; 328 | return ptr; 329 | } 330 | 331 | function handleError(f, args) { 332 | try { 333 | return f.apply(this, args); 334 | } catch (e) { 335 | wasm.__wbindgen_export_7(addHeapObject(e)); 336 | } 337 | } 338 | 339 | async function __wbg_load(module, imports) { 340 | if (typeof Response === 'function' && module instanceof Response) { 341 | if (typeof WebAssembly.instantiateStreaming === 'function') { 342 | try { 343 | return await WebAssembly.instantiateStreaming(module, imports); 344 | 345 | } catch (e) { 346 | if (module.headers.get('Content-Type') != 'application/wasm') { 347 | 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); 348 | 349 | } else { 350 | throw e; 351 | } 352 | } 353 | } 354 | 355 | const bytes = await module.arrayBuffer(); 356 | return await WebAssembly.instantiate(bytes, imports); 357 | 358 | } else { 359 | const instance = await WebAssembly.instantiate(module, imports); 360 | 361 | if (instance instanceof WebAssembly.Instance) { 362 | return { instance, module }; 363 | 364 | } else { 365 | return instance; 366 | } 367 | } 368 | } 369 | 370 | function __wbg_get_imports() { 371 | const imports = {}; 372 | imports.wbg = {}; 373 | imports.wbg.__wbg_location_2951b5ee34f19221 = function() { return logError(function (arg0) { 374 | const ret = getObject(arg0).location; 375 | return addHeapObject(ret); 376 | }, arguments) }; 377 | imports.wbg.__wbg_href_706b235ecfe6848c = function() { return handleError(function (arg0, arg1) { 378 | const ret = getObject(arg1).href; 379 | const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); 380 | const len1 = WASM_VECTOR_LEN; 381 | getInt32Memory0()[arg0 / 4 + 1] = len1; 382 | getInt32Memory0()[arg0 / 4 + 0] = ptr1; 383 | }, arguments) }; 384 | imports.wbg.__wbg_new_abda76e883ba8a5f = function() { return logError(function () { 385 | const ret = new Error(); 386 | return addHeapObject(ret); 387 | }, arguments) }; 388 | imports.wbg.__wbg_stack_658279fe44541cf6 = function() { return logError(function (arg0, arg1) { 389 | const ret = getObject(arg1).stack; 390 | const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); 391 | const len1 = WASM_VECTOR_LEN; 392 | getInt32Memory0()[arg0 / 4 + 1] = len1; 393 | getInt32Memory0()[arg0 / 4 + 0] = ptr1; 394 | }, arguments) }; 395 | imports.wbg.__wbg_error_f851667af71bcfc6 = function() { return logError(function (arg0, arg1) { 396 | let deferred0_0; 397 | let deferred0_1; 398 | try { 399 | deferred0_0 = arg0; 400 | deferred0_1 = arg1; 401 | console.error(getStringFromWasm0(arg0, arg1)); 402 | } finally { 403 | wasm.__wbindgen_export_6(deferred0_0, deferred0_1, 1); 404 | } 405 | }, arguments) }; 406 | imports.wbg.__wbindgen_object_drop_ref = function(arg0) { 407 | takeObject(arg0); 408 | }; 409 | imports.wbg.__wbg_instanceof_HtmlElement_3bcc4ff70cfdcba5 = function() { return logError(function (arg0) { 410 | let result; 411 | try { 412 | result = getObject(arg0) instanceof HTMLElement; 413 | } catch (_) { 414 | result = false; 415 | } 416 | const ret = result; 417 | _assertBoolean(ret); 418 | return ret; 419 | }, arguments) }; 420 | imports.wbg.__wbg_getBoundingClientRect_91e6d57c4e65f745 = function() { return logError(function (arg0) { 421 | const ret = getObject(arg0).getBoundingClientRect(); 422 | return addHeapObject(ret); 423 | }, arguments) }; 424 | imports.wbg.__wbg_left_fe0a839abdd508f4 = function() { return logError(function (arg0) { 425 | const ret = getObject(arg0).left; 426 | return ret; 427 | }, arguments) }; 428 | imports.wbg.__wbg_top_c4e2234a035a3d25 = function() { return logError(function (arg0) { 429 | const ret = getObject(arg0).top; 430 | return ret; 431 | }, arguments) }; 432 | imports.wbg.__wbg_width_b455dec2a8f76e45 = function() { return logError(function (arg0) { 433 | const ret = getObject(arg0).width; 434 | return ret; 435 | }, arguments) }; 436 | imports.wbg.__wbg_height_424ebb12c15f2691 = function() { return logError(function (arg0) { 437 | const ret = getObject(arg0).height; 438 | return ret; 439 | }, arguments) }; 440 | imports.wbg.__wbg_new_72fb9a18b5ae2624 = function() { return logError(function () { 441 | const ret = new Object(); 442 | return addHeapObject(ret); 443 | }, arguments) }; 444 | imports.wbg.__wbg_blur_51f7b635f18a0eec = function() { return handleError(function (arg0) { 445 | getObject(arg0).blur(); 446 | }, arguments) }; 447 | imports.wbg.__wbg_focus_39d4b8ba8ff9df14 = function() { return handleError(function (arg0) { 448 | getObject(arg0).focus(); 449 | }, arguments) }; 450 | imports.wbg.__wbg_clientX_32cdd4a59d3eff3f = function() { return logError(function (arg0) { 451 | const ret = getObject(arg0).clientX; 452 | _assertNum(ret); 453 | return ret; 454 | }, arguments) }; 455 | imports.wbg.__wbg_clientY_155c09997817066a = function() { return logError(function (arg0) { 456 | const ret = getObject(arg0).clientY; 457 | _assertNum(ret); 458 | return ret; 459 | }, arguments) }; 460 | imports.wbg.__wbg_screenX_2cfd631f114f20a6 = function() { return logError(function (arg0) { 461 | const ret = getObject(arg0).screenX; 462 | _assertNum(ret); 463 | return ret; 464 | }, arguments) }; 465 | imports.wbg.__wbg_screenY_b1152d8a9e6d9730 = function() { return logError(function (arg0) { 466 | const ret = getObject(arg0).screenY; 467 | _assertNum(ret); 468 | return ret; 469 | }, arguments) }; 470 | imports.wbg.__wbg_pageX_fa02f6046f16d09a = function() { return logError(function (arg0) { 471 | const ret = getObject(arg0).pageX; 472 | _assertNum(ret); 473 | return ret; 474 | }, arguments) }; 475 | imports.wbg.__wbg_pageY_d1a7e78ba5b4cc5c = function() { return logError(function (arg0) { 476 | const ret = getObject(arg0).pageY; 477 | _assertNum(ret); 478 | return ret; 479 | }, arguments) }; 480 | imports.wbg.__wbg_identifier_02d52b63cc6ddc4d = function() { return logError(function (arg0) { 481 | const ret = getObject(arg0).identifier; 482 | _assertNum(ret); 483 | return ret; 484 | }, arguments) }; 485 | imports.wbg.__wbg_force_139077aa422a42a5 = function() { return logError(function (arg0) { 486 | const ret = getObject(arg0).force; 487 | return ret; 488 | }, arguments) }; 489 | imports.wbg.__wbg_radiusX_dc01e55acd40fd6a = function() { return logError(function (arg0) { 490 | const ret = getObject(arg0).radiusX; 491 | _assertNum(ret); 492 | return ret; 493 | }, arguments) }; 494 | imports.wbg.__wbg_radiusY_c60f80073028f80e = function() { return logError(function (arg0) { 495 | const ret = getObject(arg0).radiusY; 496 | _assertNum(ret); 497 | return ret; 498 | }, arguments) }; 499 | imports.wbg.__wbg_rotationAngle_99c4da350e2fbc0b = function() { return logError(function (arg0) { 500 | const ret = getObject(arg0).rotationAngle; 501 | return ret; 502 | }, arguments) }; 503 | imports.wbg.__wbg_data_1d8005e6d66d881b = function() { return logError(function (arg0, arg1) { 504 | const ret = getObject(arg1).data; 505 | var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); 506 | var len1 = WASM_VECTOR_LEN; 507 | getInt32Memory0()[arg0 / 4 + 1] = len1; 508 | getInt32Memory0()[arg0 / 4 + 0] = ptr1; 509 | }, arguments) }; 510 | imports.wbg.__wbg_key_dccf9e8aa1315a8e = function() { return logError(function (arg0, arg1) { 511 | const ret = getObject(arg1).key; 512 | const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); 513 | const len1 = WASM_VECTOR_LEN; 514 | getInt32Memory0()[arg0 / 4 + 1] = len1; 515 | getInt32Memory0()[arg0 / 4 + 0] = ptr1; 516 | }, arguments) }; 517 | imports.wbg.__wbg_code_3b0c3912a2351163 = function() { return logError(function (arg0, arg1) { 518 | const ret = getObject(arg1).code; 519 | const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); 520 | const len1 = WASM_VECTOR_LEN; 521 | getInt32Memory0()[arg0 / 4 + 1] = len1; 522 | getInt32Memory0()[arg0 / 4 + 0] = ptr1; 523 | }, arguments) }; 524 | imports.wbg.__wbg_location_f7b033ddfc516739 = function() { return logError(function (arg0) { 525 | const ret = getObject(arg0).location; 526 | _assertNum(ret); 527 | return ret; 528 | }, arguments) }; 529 | imports.wbg.__wbg_repeat_f64b916c6eed0685 = function() { return logError(function (arg0) { 530 | const ret = getObject(arg0).repeat; 531 | _assertBoolean(ret); 532 | return ret; 533 | }, arguments) }; 534 | imports.wbg.__wbg_isComposing_a0b97b7ba6491ed6 = function() { return logError(function (arg0) { 535 | const ret = getObject(arg0).isComposing; 536 | _assertBoolean(ret); 537 | return ret; 538 | }, arguments) }; 539 | imports.wbg.__wbg_altKey_2e6c34c37088d8b1 = function() { return logError(function (arg0) { 540 | const ret = getObject(arg0).altKey; 541 | _assertBoolean(ret); 542 | return ret; 543 | }, arguments) }; 544 | imports.wbg.__wbg_ctrlKey_bb5b6fef87339703 = function() { return logError(function (arg0) { 545 | const ret = getObject(arg0).ctrlKey; 546 | _assertBoolean(ret); 547 | return ret; 548 | }, arguments) }; 549 | imports.wbg.__wbg_metaKey_6bf4ae4e83a11278 = function() { return logError(function (arg0) { 550 | const ret = getObject(arg0).metaKey; 551 | _assertBoolean(ret); 552 | return ret; 553 | }, arguments) }; 554 | imports.wbg.__wbg_shiftKey_5911baf439ab232b = function() { return logError(function (arg0) { 555 | const ret = getObject(arg0).shiftKey; 556 | _assertBoolean(ret); 557 | return ret; 558 | }, arguments) }; 559 | imports.wbg.__wbg_altKey_c5d3bae8fdb559b7 = function() { return logError(function (arg0) { 560 | const ret = getObject(arg0).altKey; 561 | _assertBoolean(ret); 562 | return ret; 563 | }, arguments) }; 564 | imports.wbg.__wbg_ctrlKey_02edd6fb9dbc84cd = function() { return logError(function (arg0) { 565 | const ret = getObject(arg0).ctrlKey; 566 | _assertBoolean(ret); 567 | return ret; 568 | }, arguments) }; 569 | imports.wbg.__wbg_metaKey_1b09e179e3cbc983 = function() { return logError(function (arg0) { 570 | const ret = getObject(arg0).metaKey; 571 | _assertBoolean(ret); 572 | return ret; 573 | }, arguments) }; 574 | imports.wbg.__wbg_shiftKey_e7faa1993dbdf8f7 = function() { return logError(function (arg0) { 575 | const ret = getObject(arg0).shiftKey; 576 | _assertBoolean(ret); 577 | return ret; 578 | }, arguments) }; 579 | imports.wbg.__wbg_touches_c0f077e3c2429577 = function() { return logError(function (arg0) { 580 | const ret = getObject(arg0).touches; 581 | return addHeapObject(ret); 582 | }, arguments) }; 583 | imports.wbg.__wbg_length_679e0f1f9f0744bd = function() { return logError(function (arg0) { 584 | const ret = getObject(arg0).length; 585 | _assertNum(ret); 586 | return ret; 587 | }, arguments) }; 588 | imports.wbg.__wbg_changedTouches_d044c818dbcb83b1 = function() { return logError(function (arg0) { 589 | const ret = getObject(arg0).changedTouches; 590 | return addHeapObject(ret); 591 | }, arguments) }; 592 | imports.wbg.__wbg_targetTouches_384f47fad6286ff3 = function() { return logError(function (arg0) { 593 | const ret = getObject(arg0).targetTouches; 594 | return addHeapObject(ret); 595 | }, arguments) }; 596 | imports.wbg.__wbg_pointerId_e030fa156647fedd = function() { return logError(function (arg0) { 597 | const ret = getObject(arg0).pointerId; 598 | _assertNum(ret); 599 | return ret; 600 | }, arguments) }; 601 | imports.wbg.__wbg_width_d958d6a2a78fb698 = function() { return logError(function (arg0) { 602 | const ret = getObject(arg0).width; 603 | _assertNum(ret); 604 | return ret; 605 | }, arguments) }; 606 | imports.wbg.__wbg_height_56cbcc76af0c788c = function() { return logError(function (arg0) { 607 | const ret = getObject(arg0).height; 608 | _assertNum(ret); 609 | return ret; 610 | }, arguments) }; 611 | imports.wbg.__wbg_pressure_99cd07399f942a7c = function() { return logError(function (arg0) { 612 | const ret = getObject(arg0).pressure; 613 | return ret; 614 | }, arguments) }; 615 | imports.wbg.__wbg_tangentialPressure_b6312f1836d65d5d = function() { return logError(function (arg0) { 616 | const ret = getObject(arg0).tangentialPressure; 617 | return ret; 618 | }, arguments) }; 619 | imports.wbg.__wbg_tiltX_baf43517babb41bc = function() { return logError(function (arg0) { 620 | const ret = getObject(arg0).tiltX; 621 | _assertNum(ret); 622 | return ret; 623 | }, arguments) }; 624 | imports.wbg.__wbg_tiltY_2f272b32098157d0 = function() { return logError(function (arg0) { 625 | const ret = getObject(arg0).tiltY; 626 | _assertNum(ret); 627 | return ret; 628 | }, arguments) }; 629 | imports.wbg.__wbg_twist_64860f49ddf37a43 = function() { return logError(function (arg0) { 630 | const ret = getObject(arg0).twist; 631 | _assertNum(ret); 632 | return ret; 633 | }, arguments) }; 634 | imports.wbg.__wbg_pointerType_0f2f0383406aa7fa = function() { return logError(function (arg0, arg1) { 635 | const ret = getObject(arg1).pointerType; 636 | const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); 637 | const len1 = WASM_VECTOR_LEN; 638 | getInt32Memory0()[arg0 / 4 + 1] = len1; 639 | getInt32Memory0()[arg0 / 4 + 0] = ptr1; 640 | }, arguments) }; 641 | imports.wbg.__wbg_isPrimary_6e8e807f17a489ea = function() { return logError(function (arg0) { 642 | const ret = getObject(arg0).isPrimary; 643 | _assertBoolean(ret); 644 | return ret; 645 | }, arguments) }; 646 | imports.wbg.__wbg_deltaMode_294b2eaf54047265 = function() { return logError(function (arg0) { 647 | const ret = getObject(arg0).deltaMode; 648 | _assertNum(ret); 649 | return ret; 650 | }, arguments) }; 651 | imports.wbg.__wbg_deltaX_206576827ededbe5 = function() { return logError(function (arg0) { 652 | const ret = getObject(arg0).deltaX; 653 | return ret; 654 | }, arguments) }; 655 | imports.wbg.__wbg_deltaY_032e327e216f2b2b = function() { return logError(function (arg0) { 656 | const ret = getObject(arg0).deltaY; 657 | return ret; 658 | }, arguments) }; 659 | imports.wbg.__wbg_deltaZ_b97571bdbd5b1f94 = function() { return logError(function (arg0) { 660 | const ret = getObject(arg0).deltaZ; 661 | return ret; 662 | }, arguments) }; 663 | imports.wbg.__wbg_animationName_373ee5279a38d6c4 = function() { return logError(function (arg0, arg1) { 664 | const ret = getObject(arg1).animationName; 665 | const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); 666 | const len1 = WASM_VECTOR_LEN; 667 | getInt32Memory0()[arg0 / 4 + 1] = len1; 668 | getInt32Memory0()[arg0 / 4 + 0] = ptr1; 669 | }, arguments) }; 670 | imports.wbg.__wbg_pseudoElement_a43e92ba10798dbb = function() { return logError(function (arg0, arg1) { 671 | const ret = getObject(arg1).pseudoElement; 672 | const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); 673 | const len1 = WASM_VECTOR_LEN; 674 | getInt32Memory0()[arg0 / 4 + 1] = len1; 675 | getInt32Memory0()[arg0 / 4 + 0] = ptr1; 676 | }, arguments) }; 677 | imports.wbg.__wbg_elapsedTime_ce9cbdedf8c8d25c = function() { return logError(function (arg0) { 678 | const ret = getObject(arg0).elapsedTime; 679 | return ret; 680 | }, arguments) }; 681 | imports.wbg.__wbg_elapsedTime_01d0d0725a5f7dc5 = function() { return logError(function (arg0) { 682 | const ret = getObject(arg0).elapsedTime; 683 | return ret; 684 | }, arguments) }; 685 | imports.wbg.__wbg_propertyName_bb3e139b76cd9e44 = function() { return logError(function (arg0, arg1) { 686 | const ret = getObject(arg1).propertyName; 687 | const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); 688 | const len1 = WASM_VECTOR_LEN; 689 | getInt32Memory0()[arg0 / 4 + 1] = len1; 690 | getInt32Memory0()[arg0 / 4 + 0] = ptr1; 691 | }, arguments) }; 692 | imports.wbg.__wbg_pseudoElement_d84b88790938481a = function() { return logError(function (arg0, arg1) { 693 | const ret = getObject(arg1).pseudoElement; 694 | const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); 695 | const len1 = WASM_VECTOR_LEN; 696 | getInt32Memory0()[arg0 / 4 + 1] = len1; 697 | getInt32Memory0()[arg0 / 4 + 0] = ptr1; 698 | }, arguments) }; 699 | imports.wbg.__wbg_saveTemplate_3bccb09a29f77eac = function() { return logError(function (arg0, arg1, arg2, arg3) { 700 | var v0 = getArrayJsValueFromWasm0(arg1, arg2).slice(); 701 | wasm.__wbindgen_export_6(arg1, arg2 * 4, 4); 702 | getObject(arg0).saveTemplate(v0, arg3); 703 | }, arguments) }; 704 | imports.wbg.__wbg_toggleAttribute_a88edae8f3db7837 = function() { return handleError(function (arg0, arg1, arg2) { 705 | const ret = getObject(arg0).toggleAttribute(getStringFromWasm0(arg1, arg2)); 706 | _assertBoolean(ret); 707 | return ret; 708 | }, arguments) }; 709 | imports.wbg.__wbg_createElementNS_556a62fb298be5a2 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) { 710 | const ret = getObject(arg0).createElementNS(arg1 === 0 ? undefined : getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4)); 711 | return addHeapObject(ret); 712 | }, arguments) }; 713 | imports.wbg.__wbg_appendChild_580ccb11a660db68 = function() { return handleError(function (arg0, arg1) { 714 | const ret = getObject(arg0).appendChild(getObject(arg1)); 715 | return addHeapObject(ret); 716 | }, arguments) }; 717 | imports.wbg.__wbindgen_object_clone_ref = function(arg0) { 718 | const ret = getObject(arg0); 719 | return addHeapObject(ret); 720 | }; 721 | imports.wbg.__wbindgen_string_new = function(arg0, arg1) { 722 | const ret = getStringFromWasm0(arg0, arg1); 723 | return addHeapObject(ret); 724 | }; 725 | imports.wbg.__wbg_setAttributeInner_a1b57805dd76f804 = function() { return logError(function (arg0, arg1, arg2, arg3, arg4, arg5) { 726 | setAttributeInner(takeObject(arg0), getStringFromWasm0(arg1, arg2), takeObject(arg3), arg4 === 0 ? undefined : getStringFromWasm0(arg4, arg5)); 727 | }, arguments) }; 728 | imports.wbg.__wbg_new_68898f316876d8dd = function() { return logError(function (arg0) { 729 | const ret = new Dioxus(getObject(arg0)); 730 | return addHeapObject(ret); 731 | }, arguments) }; 732 | imports.wbg.__wbg_newwithargs_33d0ffcb48344669 = function() { return logError(function (arg0, arg1, arg2, arg3) { 733 | const ret = new Function(getStringFromWasm0(arg0, arg1), getStringFromWasm0(arg2, arg3)); 734 | return addHeapObject(ret); 735 | }, arguments) }; 736 | imports.wbg.__wbg_call_b3ca7c6051f9bec1 = function() { return handleError(function (arg0, arg1, arg2) { 737 | const ret = getObject(arg0).call(getObject(arg1), getObject(arg2)); 738 | return addHeapObject(ret); 739 | }, arguments) }; 740 | imports.wbg.__wbg_stringify_8887fe74e1c50d81 = function() { return handleError(function (arg0) { 741 | const ret = JSON.stringify(getObject(arg0)); 742 | return addHeapObject(ret); 743 | }, arguments) }; 744 | imports.wbg.__wbindgen_is_undefined = function(arg0) { 745 | const ret = getObject(arg0) === undefined; 746 | _assertBoolean(ret); 747 | return ret; 748 | }; 749 | imports.wbg.__wbg_length_dee433d4c85c9387 = function() { return logError(function (arg0) { 750 | const ret = getObject(arg0).length; 751 | _assertNum(ret); 752 | return ret; 753 | }, arguments) }; 754 | imports.wbg.__wbindgen_string_get = function(arg0, arg1) { 755 | const obj = getObject(arg1); 756 | const ret = typeof(obj) === 'string' ? obj : undefined; 757 | var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); 758 | var len1 = WASM_VECTOR_LEN; 759 | getInt32Memory0()[arg0 / 4 + 1] = len1; 760 | getInt32Memory0()[arg0 / 4 + 0] = ptr1; 761 | }; 762 | imports.wbg.__wbg_rustSend_7f485a6ce7db15a3 = function() { return logError(function (arg0, arg1) { 763 | getObject(arg0).rustSend(takeObject(arg1)); 764 | }, arguments) }; 765 | imports.wbg.__wbg_String_88810dfeb4021902 = function() { return logError(function (arg0, arg1) { 766 | const ret = String(getObject(arg1)); 767 | const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); 768 | const len1 = WASM_VECTOR_LEN; 769 | getInt32Memory0()[arg0 / 4 + 1] = len1; 770 | getInt32Memory0()[arg0 / 4 + 0] = ptr1; 771 | }, arguments) }; 772 | imports.wbg.__wbindgen_number_new = function(arg0) { 773 | const ret = arg0; 774 | return addHeapObject(ret); 775 | }; 776 | imports.wbg.__wbg_new_16b304a2cfa7ff4a = function() { return logError(function () { 777 | const ret = new Array(); 778 | return addHeapObject(ret); 779 | }, arguments) }; 780 | imports.wbg.__wbg_set_d4638f722068f043 = function() { return logError(function (arg0, arg1, arg2) { 781 | getObject(arg0)[arg1 >>> 0] = takeObject(arg2); 782 | }, arguments) }; 783 | imports.wbg.__wbg_new_d9bc3a0147634640 = function() { return logError(function () { 784 | const ret = new Map(); 785 | return addHeapObject(ret); 786 | }, arguments) }; 787 | imports.wbg.__wbg_set_8417257aaedc936b = function() { return logError(function (arg0, arg1, arg2) { 788 | const ret = getObject(arg0).set(getObject(arg1), getObject(arg2)); 789 | return addHeapObject(ret); 790 | }, arguments) }; 791 | imports.wbg.__wbindgen_is_string = function(arg0) { 792 | const ret = typeof(getObject(arg0)) === 'string'; 793 | _assertBoolean(ret); 794 | return ret; 795 | }; 796 | imports.wbg.__wbg_set_841ac57cff3d672b = function() { return logError(function (arg0, arg1, arg2) { 797 | getObject(arg0)[takeObject(arg1)] = takeObject(arg2); 798 | }, arguments) }; 799 | imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) { 800 | const ret = arg0; 801 | return addHeapObject(ret); 802 | }; 803 | imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) { 804 | const ret = BigInt.asUintN(64, arg0); 805 | return addHeapObject(ret); 806 | }; 807 | imports.wbg.__wbindgen_error_new = function(arg0, arg1) { 808 | const ret = new Error(getStringFromWasm0(arg0, arg1)); 809 | return addHeapObject(ret); 810 | }; 811 | imports.wbg.__wbindgen_boolean_get = function(arg0) { 812 | const v = getObject(arg0); 813 | const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2; 814 | _assertNum(ret); 815 | return ret; 816 | }; 817 | imports.wbg.__wbindgen_is_bigint = function(arg0) { 818 | const ret = typeof(getObject(arg0)) === 'bigint'; 819 | _assertBoolean(ret); 820 | return ret; 821 | }; 822 | imports.wbg.__wbindgen_number_get = function(arg0, arg1) { 823 | const obj = getObject(arg1); 824 | const ret = typeof(obj) === 'number' ? obj : undefined; 825 | if (!isLikeNone(ret)) { 826 | _assertNum(ret); 827 | } 828 | getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret; 829 | getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret); 830 | }; 831 | imports.wbg.__wbg_isSafeInteger_f7b04ef02296c4d2 = function() { return logError(function (arg0) { 832 | const ret = Number.isSafeInteger(getObject(arg0)); 833 | _assertBoolean(ret); 834 | return ret; 835 | }, arguments) }; 836 | imports.wbg.__wbindgen_is_object = function(arg0) { 837 | const val = getObject(arg0); 838 | const ret = typeof(val) === 'object' && val !== null; 839 | _assertBoolean(ret); 840 | return ret; 841 | }; 842 | imports.wbg.__wbg_length_cd7af8117672b8b8 = function() { return logError(function (arg0) { 843 | const ret = getObject(arg0).length; 844 | _assertNum(ret); 845 | return ret; 846 | }, arguments) }; 847 | imports.wbg.__wbg_iterator_2cee6dadfd956dfa = function() { return logError(function () { 848 | const ret = Symbol.iterator; 849 | return addHeapObject(ret); 850 | }, arguments) }; 851 | imports.wbg.__wbindgen_in = function(arg0, arg1) { 852 | const ret = getObject(arg0) in getObject(arg1); 853 | _assertBoolean(ret); 854 | return ret; 855 | }; 856 | imports.wbg.__wbg_entries_95cc2c823b285a09 = function() { return logError(function (arg0) { 857 | const ret = Object.entries(getObject(arg0)); 858 | return addHeapObject(ret); 859 | }, arguments) }; 860 | imports.wbg.__wbindgen_jsval_eq = function(arg0, arg1) { 861 | const ret = getObject(arg0) === getObject(arg1); 862 | _assertBoolean(ret); 863 | return ret; 864 | }; 865 | imports.wbg.__wbg_instanceof_DragEvent_329fd02ae838527e = function() { return logError(function (arg0) { 866 | let result; 867 | try { 868 | result = getObject(arg0) instanceof DragEvent; 869 | } catch (_) { 870 | result = false; 871 | } 872 | const ret = result; 873 | _assertBoolean(ret); 874 | return ret; 875 | }, arguments) }; 876 | imports.wbg.__wbg_dataTransfer_cef7816623bd8478 = function() { return logError(function (arg0) { 877 | const ret = getObject(arg0).dataTransfer; 878 | return isLikeNone(ret) ? 0 : addHeapObject(ret); 879 | }, arguments) }; 880 | imports.wbg.__wbg_files_a2848a7a7424820f = function() { return logError(function (arg0) { 881 | const ret = getObject(arg0).files; 882 | return isLikeNone(ret) ? 0 : addHeapObject(ret); 883 | }, arguments) }; 884 | imports.wbg.__wbg_new_c1e4a76f0b5c28b8 = function() { return handleError(function () { 885 | const ret = new FileReader(); 886 | return addHeapObject(ret); 887 | }, arguments) }; 888 | imports.wbg.__wbg_readAsText_ac9afc9ae3f40e0a = function() { return handleError(function (arg0, arg1) { 889 | getObject(arg0).readAsText(getObject(arg1)); 890 | }, arguments) }; 891 | imports.wbg.__wbg_readAsArrayBuffer_4f4ed73c7dc0ce42 = function() { return handleError(function (arg0, arg1) { 892 | getObject(arg0).readAsArrayBuffer(getObject(arg1)); 893 | }, arguments) }; 894 | imports.wbg.__wbg_new_63b92bc8671ed464 = function() { return logError(function (arg0) { 895 | const ret = new Uint8Array(getObject(arg0)); 896 | return addHeapObject(ret); 897 | }, arguments) }; 898 | imports.wbg.__wbg_files_8b6e6eff43af0f6d = function() { return logError(function (arg0) { 899 | const ret = getObject(arg0).files; 900 | return isLikeNone(ret) ? 0 : addHeapObject(ret); 901 | }, arguments) }; 902 | imports.wbg.__wbg_type_4a48b5df975de6b2 = function() { return logError(function (arg0, arg1) { 903 | const ret = getObject(arg1).type; 904 | const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); 905 | const len1 = WASM_VECTOR_LEN; 906 | getInt32Memory0()[arg0 / 4 + 1] = len1; 907 | getInt32Memory0()[arg0 / 4 + 0] = ptr1; 908 | }, arguments) }; 909 | imports.wbg.__wbg_value_47fe6384562f52ab = function() { return logError(function (arg0, arg1) { 910 | const ret = getObject(arg1).value; 911 | const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); 912 | const len1 = WASM_VECTOR_LEN; 913 | getInt32Memory0()[arg0 / 4 + 1] = len1; 914 | getInt32Memory0()[arg0 / 4 + 0] = ptr1; 915 | }, arguments) }; 916 | imports.wbg.__wbg_checked_749a34774f2df2e3 = function() { return logError(function (arg0) { 917 | const ret = getObject(arg0).checked; 918 | _assertBoolean(ret); 919 | return ret; 920 | }, arguments) }; 921 | imports.wbg.__wbg_instanceof_HtmlTextAreaElement_7963188e191245be = function() { return logError(function (arg0) { 922 | let result; 923 | try { 924 | result = getObject(arg0) instanceof HTMLTextAreaElement; 925 | } catch (_) { 926 | result = false; 927 | } 928 | const ret = result; 929 | _assertBoolean(ret); 930 | return ret; 931 | }, arguments) }; 932 | imports.wbg.__wbg_value_d7f5bfbd9302c14b = function() { return logError(function (arg0, arg1) { 933 | const ret = getObject(arg1).value; 934 | const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); 935 | const len1 = WASM_VECTOR_LEN; 936 | getInt32Memory0()[arg0 / 4 + 1] = len1; 937 | getInt32Memory0()[arg0 / 4 + 0] = ptr1; 938 | }, arguments) }; 939 | imports.wbg.__wbg_value_47c64189244491be = function() { return logError(function (arg0, arg1) { 940 | const ret = getObject(arg1).value; 941 | const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); 942 | const len1 = WASM_VECTOR_LEN; 943 | getInt32Memory0()[arg0 / 4 + 1] = len1; 944 | getInt32Memory0()[arg0 / 4 + 0] = ptr1; 945 | }, arguments) }; 946 | imports.wbg.__wbg_textContent_8e392d624539e731 = function() { return logError(function (arg0, arg1) { 947 | const ret = getObject(arg1).textContent; 948 | var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); 949 | var len1 = WASM_VECTOR_LEN; 950 | getInt32Memory0()[arg0 / 4 + 1] = len1; 951 | getInt32Memory0()[arg0 / 4 + 0] = ptr1; 952 | }, arguments) }; 953 | imports.wbg.__wbg_instanceof_HtmlFormElement_ec8cd1ecba7bc422 = function() { return logError(function (arg0) { 954 | let result; 955 | try { 956 | result = getObject(arg0) instanceof HTMLFormElement; 957 | } catch (_) { 958 | result = false; 959 | } 960 | const ret = result; 961 | _assertBoolean(ret); 962 | return ret; 963 | }, arguments) }; 964 | imports.wbg.__wbg_getformdata_519e43ce8d4a34b2 = function() { return logError(function (arg0) { 965 | const ret = get_form_data(getObject(arg0)); 966 | return addHeapObject(ret); 967 | }, arguments) }; 968 | imports.wbg.__wbg_entries_ce844941d0c51880 = function() { return logError(function (arg0) { 969 | const ret = getObject(arg0).entries(); 970 | return addHeapObject(ret); 971 | }, arguments) }; 972 | imports.wbg.__wbg_get_bd8e338fbd5f5cc8 = function() { return logError(function (arg0, arg1) { 973 | const ret = getObject(arg0)[arg1 >>> 0]; 974 | return addHeapObject(ret); 975 | }, arguments) }; 976 | imports.wbg.__wbg_getselectdata_e13f9431eb1ce925 = function() { return logError(function (arg0, arg1) { 977 | const ret = get_select_data(getObject(arg1)); 978 | const ptr1 = passArrayJsValueToWasm0(ret, wasm.__wbindgen_export_0); 979 | const len1 = WASM_VECTOR_LEN; 980 | getInt32Memory0()[arg0 / 4 + 1] = len1; 981 | getInt32Memory0()[arg0 / 4 + 0] = ptr1; 982 | }, arguments) }; 983 | imports.wbg.__wbg_instanceof_HtmlSelectElement_f0e1b0ac7b371ac0 = function() { return logError(function (arg0) { 984 | let result; 985 | try { 986 | result = getObject(arg0) instanceof HTMLSelectElement; 987 | } catch (_) { 988 | result = false; 989 | } 990 | const ret = result; 991 | _assertBoolean(ret); 992 | return ret; 993 | }, arguments) }; 994 | imports.wbg.__wbg_instanceof_HtmlInputElement_307512fe1252c849 = function() { return logError(function (arg0) { 995 | let result; 996 | try { 997 | result = getObject(arg0) instanceof HTMLInputElement; 998 | } catch (_) { 999 | result = false; 1000 | } 1001 | const ret = result; 1002 | _assertBoolean(ret); 1003 | return ret; 1004 | }, arguments) }; 1005 | imports.wbg.__wbg_instanceof_Element_6945fc210db80ea9 = function() { return logError(function (arg0) { 1006 | let result; 1007 | try { 1008 | result = getObject(arg0) instanceof Element; 1009 | } catch (_) { 1010 | result = false; 1011 | } 1012 | const ret = result; 1013 | _assertBoolean(ret); 1014 | return ret; 1015 | }, arguments) }; 1016 | imports.wbg.__wbg_document_5100775d18896c16 = function() { return logError(function (arg0) { 1017 | const ret = getObject(arg0).document; 1018 | return isLikeNone(ret) ? 0 : addHeapObject(ret); 1019 | }, arguments) }; 1020 | imports.wbg.__wbg_target_2fc177e386c8b7b0 = function() { return logError(function (arg0) { 1021 | const ret = getObject(arg0).target; 1022 | return isLikeNone(ret) ? 0 : addHeapObject(ret); 1023 | }, arguments) }; 1024 | imports.wbg.__wbg_parentElement_347524db59fc2976 = function() { return logError(function (arg0) { 1025 | const ret = getObject(arg0).parentElement; 1026 | return isLikeNone(ret) ? 0 : addHeapObject(ret); 1027 | }, arguments) }; 1028 | imports.wbg.__wbg_bubbles_abce839854481bc6 = function() { return logError(function (arg0) { 1029 | const ret = getObject(arg0).bubbles; 1030 | _assertBoolean(ret); 1031 | return ret; 1032 | }, arguments) }; 1033 | imports.wbg.__wbg_preventDefault_b1a4aafc79409429 = function() { return logError(function (arg0) { 1034 | getObject(arg0).preventDefault(); 1035 | }, arguments) }; 1036 | imports.wbg.__wbg_getElementById_c369ff43f0db99cf = function() { return logError(function (arg0, arg1, arg2) { 1037 | const ret = getObject(arg0).getElementById(getStringFromWasm0(arg1, arg2)); 1038 | return isLikeNone(ret) ? 0 : addHeapObject(ret); 1039 | }, arguments) }; 1040 | imports.wbg.__wbg_error_8e3928cfb8a43e2b = function() { return logError(function (arg0) { 1041 | console.error(getObject(arg0)); 1042 | }, arguments) }; 1043 | imports.wbg.__wbg_ownerDocument_a93c92720a050068 = function() { return logError(function (arg0) { 1044 | const ret = getObject(arg0).ownerDocument; 1045 | return isLikeNone(ret) ? 0 : addHeapObject(ret); 1046 | }, arguments) }; 1047 | imports.wbg.__wbg_new_6b043ef87187e9c9 = function() { return logError(function (arg0) { 1048 | const ret = new RawInterpreter(arg0 >>> 0); 1049 | return addHeapObject(ret); 1050 | }, arguments) }; 1051 | imports.wbg.__wbg_initialize_5fe7c8d0a15ac42d = function() { return logError(function (arg0, arg1, arg2) { 1052 | getObject(arg0).initialize(takeObject(arg1), getObject(arg2)); 1053 | }, arguments) }; 1054 | imports.wbg.__wbindgen_memory = function() { 1055 | const ret = wasm.memory; 1056 | return addHeapObject(ret); 1057 | }; 1058 | imports.wbg.__wbg_updatememory_fe690016704d84f6 = function() { return logError(function (arg0, arg1) { 1059 | getObject(arg0).update_memory(takeObject(arg1)); 1060 | }, arguments) }; 1061 | imports.wbg.__wbg_run_2ca7d9c27d6a5eb6 = function() { return logError(function (arg0) { 1062 | getObject(arg0).run(); 1063 | }, arguments) }; 1064 | imports.wbg.__wbg_getNode_9faf781a3d48b043 = function() { return logError(function (arg0, arg1) { 1065 | const ret = getObject(arg0).getNode(arg1 >>> 0); 1066 | return addHeapObject(ret); 1067 | }, arguments) }; 1068 | imports.wbg.__wbindgen_is_function = function(arg0) { 1069 | const ret = typeof(getObject(arg0)) === 'function'; 1070 | _assertBoolean(ret); 1071 | return ret; 1072 | }; 1073 | imports.wbg.__wbg_call_27c0f87801dedf93 = function() { return handleError(function (arg0, arg1) { 1074 | const ret = getObject(arg0).call(getObject(arg1)); 1075 | return addHeapObject(ret); 1076 | }, arguments) }; 1077 | imports.wbg.__wbg_charCodeAt_f25c9f5afada5ccc = function() { return logError(function (arg0, arg1) { 1078 | const ret = getObject(arg0).charCodeAt(arg1 >>> 0); 1079 | return ret; 1080 | }, arguments) }; 1081 | imports.wbg.__wbg_next_196c84450b364254 = function() { return handleError(function (arg0) { 1082 | const ret = getObject(arg0).next(); 1083 | return addHeapObject(ret); 1084 | }, arguments) }; 1085 | imports.wbg.__wbg_done_298b57d23c0fc80c = function() { return logError(function (arg0) { 1086 | const ret = getObject(arg0).done; 1087 | _assertBoolean(ret); 1088 | return ret; 1089 | }, arguments) }; 1090 | imports.wbg.__wbg_value_d93c65011f51a456 = function() { return logError(function (arg0) { 1091 | const ret = getObject(arg0).value; 1092 | return addHeapObject(ret); 1093 | }, arguments) }; 1094 | imports.wbg.__wbg_get_e3c254076557e348 = function() { return handleError(function (arg0, arg1) { 1095 | const ret = Reflect.get(getObject(arg0), getObject(arg1)); 1096 | return addHeapObject(ret); 1097 | }, arguments) }; 1098 | imports.wbg.__wbg_next_40fc327bfc8770e6 = function() { return logError(function (arg0) { 1099 | const ret = getObject(arg0).next; 1100 | return addHeapObject(ret); 1101 | }, arguments) }; 1102 | imports.wbg.__wbg_self_ce0dbfc45cf2f5be = function() { return handleError(function () { 1103 | const ret = self.self; 1104 | return addHeapObject(ret); 1105 | }, arguments) }; 1106 | imports.wbg.__wbg_window_c6fb939a7f436783 = function() { return handleError(function () { 1107 | const ret = window.window; 1108 | return addHeapObject(ret); 1109 | }, arguments) }; 1110 | imports.wbg.__wbg_globalThis_d1e6af4856ba331b = function() { return handleError(function () { 1111 | const ret = globalThis.globalThis; 1112 | return addHeapObject(ret); 1113 | }, arguments) }; 1114 | imports.wbg.__wbg_global_207b558942527489 = function() { return handleError(function () { 1115 | const ret = global.global; 1116 | return addHeapObject(ret); 1117 | }, arguments) }; 1118 | imports.wbg.__wbg_newnoargs_e258087cd0daa0ea = function() { return logError(function (arg0, arg1) { 1119 | const ret = new Function(getStringFromWasm0(arg0, arg1)); 1120 | return addHeapObject(ret); 1121 | }, arguments) }; 1122 | imports.wbg.__wbg_isArray_2ab64d95e09ea0ae = function() { return logError(function (arg0) { 1123 | const ret = Array.isArray(getObject(arg0)); 1124 | _assertBoolean(ret); 1125 | return ret; 1126 | }, arguments) }; 1127 | imports.wbg.__wbg_length_c20a40f15020d68a = function() { return logError(function (arg0) { 1128 | const ret = getObject(arg0).length; 1129 | _assertNum(ret); 1130 | return ret; 1131 | }, arguments) }; 1132 | imports.wbg.__wbg_buffer_12d079cc21e14bdb = function() { return logError(function (arg0) { 1133 | const ret = getObject(arg0).buffer; 1134 | return addHeapObject(ret); 1135 | }, arguments) }; 1136 | imports.wbg.__wbg_set_a47bac70306a19a7 = function() { return logError(function (arg0, arg1, arg2) { 1137 | getObject(arg0).set(getObject(arg1), arg2 >>> 0); 1138 | }, arguments) }; 1139 | imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) { 1140 | const ret = getObject(arg0) == getObject(arg1); 1141 | _assertBoolean(ret); 1142 | return ret; 1143 | }; 1144 | imports.wbg.__wbg_instanceof_Uint8Array_2b3bbecd033d19f6 = function() { return logError(function (arg0) { 1145 | let result; 1146 | try { 1147 | result = getObject(arg0) instanceof Uint8Array; 1148 | } catch (_) { 1149 | result = false; 1150 | } 1151 | const ret = result; 1152 | _assertBoolean(ret); 1153 | return ret; 1154 | }, arguments) }; 1155 | imports.wbg.__wbg_instanceof_ArrayBuffer_836825be07d4c9d2 = function() { return logError(function (arg0) { 1156 | let result; 1157 | try { 1158 | result = getObject(arg0) instanceof ArrayBuffer; 1159 | } catch (_) { 1160 | result = false; 1161 | } 1162 | const ret = result; 1163 | _assertBoolean(ret); 1164 | return ret; 1165 | }, arguments) }; 1166 | imports.wbg.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) { 1167 | const v = getObject(arg1); 1168 | const ret = typeof(v) === 'bigint' ? v : undefined; 1169 | if (!isLikeNone(ret)) { 1170 | _assertBigInt(ret); 1171 | } 1172 | getBigInt64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? BigInt(0) : ret; 1173 | getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret); 1174 | }; 1175 | imports.wbg.__wbindgen_debug_string = function(arg0, arg1) { 1176 | const ret = debugString(getObject(arg1)); 1177 | const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); 1178 | const len1 = WASM_VECTOR_LEN; 1179 | getInt32Memory0()[arg0 / 4 + 1] = len1; 1180 | getInt32Memory0()[arg0 / 4 + 0] = ptr1; 1181 | }; 1182 | imports.wbg.__wbindgen_throw = function(arg0, arg1) { 1183 | throw new Error(getStringFromWasm0(arg0, arg1)); 1184 | }; 1185 | imports.wbg.__wbindgen_cb_drop = function(arg0) { 1186 | const obj = takeObject(arg0).original; 1187 | if (obj.cnt-- == 1) { 1188 | obj.a = 0; 1189 | return true; 1190 | } 1191 | const ret = false; 1192 | _assertBoolean(ret); 1193 | return ret; 1194 | }; 1195 | imports.wbg.__wbg_then_0c86a60e8fcfe9f6 = function() { return logError(function (arg0, arg1) { 1196 | const ret = getObject(arg0).then(getObject(arg1)); 1197 | return addHeapObject(ret); 1198 | }, arguments) }; 1199 | imports.wbg.__wbg_queueMicrotask_481971b0d87f3dd4 = function() { return logError(function (arg0) { 1200 | queueMicrotask(getObject(arg0)); 1201 | }, arguments) }; 1202 | imports.wbg.__wbg_queueMicrotask_3cbae2ec6b6cd3d6 = function() { return logError(function (arg0) { 1203 | const ret = getObject(arg0).queueMicrotask; 1204 | return addHeapObject(ret); 1205 | }, arguments) }; 1206 | imports.wbg.__wbg_resolve_b0083a7967828ec8 = function() { return logError(function (arg0) { 1207 | const ret = Promise.resolve(getObject(arg0)); 1208 | return addHeapObject(ret); 1209 | }, arguments) }; 1210 | imports.wbg.__wbg_set_1f9b04f170055d33 = function() { return handleError(function (arg0, arg1, arg2) { 1211 | const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2)); 1212 | _assertBoolean(ret); 1213 | return ret; 1214 | }, arguments) }; 1215 | imports.wbg.__wbg_instanceof_Window_f401953a2cf86220 = function() { return logError(function (arg0) { 1216 | let result; 1217 | try { 1218 | result = getObject(arg0) instanceof Window; 1219 | } catch (_) { 1220 | result = false; 1221 | } 1222 | const ret = result; 1223 | _assertBoolean(ret); 1224 | return ret; 1225 | }, arguments) }; 1226 | imports.wbg.__wbg_createElement_8bae7856a4bb7411 = function() { return handleError(function (arg0, arg1, arg2) { 1227 | const ret = getObject(arg0).createElement(getStringFromWasm0(arg1, arg2)); 1228 | return addHeapObject(ret); 1229 | }, arguments) }; 1230 | imports.wbg.__wbg_createTextNode_0c38fd80a5b2284d = function() { return logError(function (arg0, arg1, arg2) { 1231 | const ret = getObject(arg0).createTextNode(getStringFromWasm0(arg1, arg2)); 1232 | return addHeapObject(ret); 1233 | }, arguments) }; 1234 | imports.wbg.__wbg_getAttribute_99bddb29274b29b9 = function() { return logError(function (arg0, arg1, arg2, arg3) { 1235 | const ret = getObject(arg1).getAttribute(getStringFromWasm0(arg2, arg3)); 1236 | var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); 1237 | var len1 = WASM_VECTOR_LEN; 1238 | getInt32Memory0()[arg0 / 4 + 1] = len1; 1239 | getInt32Memory0()[arg0 / 4 + 0] = ptr1; 1240 | }, arguments) }; 1241 | imports.wbg.__wbg_scrollIntoView_eec424449e6c23da = function() { return logError(function (arg0, arg1) { 1242 | getObject(arg0).scrollIntoView(getObject(arg1)); 1243 | }, arguments) }; 1244 | imports.wbg.__wbg_type_c7f33162571befe7 = function() { return logError(function (arg0, arg1) { 1245 | const ret = getObject(arg1).type; 1246 | const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); 1247 | const len1 = WASM_VECTOR_LEN; 1248 | getInt32Memory0()[arg0 / 4 + 1] = len1; 1249 | getInt32Memory0()[arg0 / 4 + 0] = ptr1; 1250 | }, arguments) }; 1251 | imports.wbg.__wbg_name_f35eb93a73d94973 = function() { return logError(function (arg0, arg1) { 1252 | const ret = getObject(arg1).name; 1253 | const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1); 1254 | const len1 = WASM_VECTOR_LEN; 1255 | getInt32Memory0()[arg0 / 4 + 1] = len1; 1256 | getInt32Memory0()[arg0 / 4 + 0] = ptr1; 1257 | }, arguments) }; 1258 | imports.wbg.__wbg_length_4db38705d5c8ba2f = function() { return logError(function (arg0) { 1259 | const ret = getObject(arg0).length; 1260 | _assertNum(ret); 1261 | return ret; 1262 | }, arguments) }; 1263 | imports.wbg.__wbg_item_4fa6fda18a501ce4 = function() { return logError(function (arg0, arg1) { 1264 | const ret = getObject(arg0).item(arg1 >>> 0); 1265 | return isLikeNone(ret) ? 0 : addHeapObject(ret); 1266 | }, arguments) }; 1267 | imports.wbg.__wbg_result_77ceeec1e3a16df7 = function() { return handleError(function (arg0) { 1268 | const ret = getObject(arg0).result; 1269 | return addHeapObject(ret); 1270 | }, arguments) }; 1271 | imports.wbg.__wbg_setonload_0af77109dbfaa065 = function() { return logError(function (arg0, arg1) { 1272 | getObject(arg0).onload = getObject(arg1); 1273 | }, arguments) }; 1274 | imports.wbg.__wbg_screenX_71c325c2921184b8 = function() { return logError(function (arg0) { 1275 | const ret = getObject(arg0).screenX; 1276 | _assertNum(ret); 1277 | return ret; 1278 | }, arguments) }; 1279 | imports.wbg.__wbg_screenY_567b18347c9e21b9 = function() { return logError(function (arg0) { 1280 | const ret = getObject(arg0).screenY; 1281 | _assertNum(ret); 1282 | return ret; 1283 | }, arguments) }; 1284 | imports.wbg.__wbg_clientX_fef6bf7a6bcf41b8 = function() { return logError(function (arg0) { 1285 | const ret = getObject(arg0).clientX; 1286 | _assertNum(ret); 1287 | return ret; 1288 | }, arguments) }; 1289 | imports.wbg.__wbg_clientY_df42f8fceab3cef2 = function() { return logError(function (arg0) { 1290 | const ret = getObject(arg0).clientY; 1291 | _assertNum(ret); 1292 | return ret; 1293 | }, arguments) }; 1294 | imports.wbg.__wbg_offsetX_1a40c03298c0d8b6 = function() { return logError(function (arg0) { 1295 | const ret = getObject(arg0).offsetX; 1296 | _assertNum(ret); 1297 | return ret; 1298 | }, arguments) }; 1299 | imports.wbg.__wbg_offsetY_f75e8c25b9d9b679 = function() { return logError(function (arg0) { 1300 | const ret = getObject(arg0).offsetY; 1301 | _assertNum(ret); 1302 | return ret; 1303 | }, arguments) }; 1304 | imports.wbg.__wbg_ctrlKey_008695ce60a588f5 = function() { return logError(function (arg0) { 1305 | const ret = getObject(arg0).ctrlKey; 1306 | _assertBoolean(ret); 1307 | return ret; 1308 | }, arguments) }; 1309 | imports.wbg.__wbg_shiftKey_1e76dbfcdd36a4b4 = function() { return logError(function (arg0) { 1310 | const ret = getObject(arg0).shiftKey; 1311 | _assertBoolean(ret); 1312 | return ret; 1313 | }, arguments) }; 1314 | imports.wbg.__wbg_altKey_07da841b54bd3ed6 = function() { return logError(function (arg0) { 1315 | const ret = getObject(arg0).altKey; 1316 | _assertBoolean(ret); 1317 | return ret; 1318 | }, arguments) }; 1319 | imports.wbg.__wbg_metaKey_86bfd3b0d3a8083f = function() { return logError(function (arg0) { 1320 | const ret = getObject(arg0).metaKey; 1321 | _assertBoolean(ret); 1322 | return ret; 1323 | }, arguments) }; 1324 | imports.wbg.__wbg_button_367cdc7303e3cf9b = function() { return logError(function (arg0) { 1325 | const ret = getObject(arg0).button; 1326 | _assertNum(ret); 1327 | return ret; 1328 | }, arguments) }; 1329 | imports.wbg.__wbg_buttons_d004fa75ac704227 = function() { return logError(function (arg0) { 1330 | const ret = getObject(arg0).buttons; 1331 | _assertNum(ret); 1332 | return ret; 1333 | }, arguments) }; 1334 | imports.wbg.__wbg_instanceof_Node_daad148a35d38074 = function() { return logError(function (arg0) { 1335 | let result; 1336 | try { 1337 | result = getObject(arg0) instanceof Node; 1338 | } catch (_) { 1339 | result = false; 1340 | } 1341 | const ret = result; 1342 | _assertBoolean(ret); 1343 | return ret; 1344 | }, arguments) }; 1345 | imports.wbg.__wbg_get_cbca0027ab731230 = function() { return logError(function (arg0, arg1) { 1346 | const ret = getObject(arg0)[arg1 >>> 0]; 1347 | return isLikeNone(ret) ? 0 : addHeapObject(ret); 1348 | }, arguments) }; 1349 | imports.wbg.__wbg_pageX_41a880bc9f19ba9b = function() { return logError(function (arg0) { 1350 | const ret = getObject(arg0).pageX; 1351 | _assertNum(ret); 1352 | return ret; 1353 | }, arguments) }; 1354 | imports.wbg.__wbg_pageY_06396190627b7cd0 = function() { return logError(function (arg0) { 1355 | const ret = getObject(arg0).pageY; 1356 | _assertNum(ret); 1357 | return ret; 1358 | }, arguments) }; 1359 | imports.wbg.__wbindgen_closure_wrapper1031 = function() { return logError(function (arg0, arg1, arg2) { 1360 | const ret = makeMutClosure(arg0, arg1, 93, __wbg_adapter_48); 1361 | return addHeapObject(ret); 1362 | }, arguments) }; 1363 | imports.wbg.__wbindgen_closure_wrapper1141 = function() { return logError(function (arg0, arg1, arg2) { 1364 | const ret = makeMutClosure(arg0, arg1, 62, __wbg_adapter_51); 1365 | return addHeapObject(ret); 1366 | }, arguments) }; 1367 | imports.wbg.__wbindgen_closure_wrapper1187 = function() { return logError(function (arg0, arg1, arg2) { 1368 | const ret = makeMutClosure(arg0, arg1, 62, __wbg_adapter_54); 1369 | return addHeapObject(ret); 1370 | }, arguments) }; 1371 | 1372 | return imports; 1373 | } 1374 | 1375 | function __wbg_init_memory(imports, maybe_memory) { 1376 | 1377 | } 1378 | 1379 | function __wbg_finalize_init(instance, module) { 1380 | wasm = instance.exports; 1381 | __wbg_init.__wbindgen_wasm_module = module; 1382 | cachedBigInt64Memory0 = null; 1383 | cachedFloat64Memory0 = null; 1384 | cachedInt32Memory0 = null; 1385 | cachedUint32Memory0 = null; 1386 | cachedUint8Memory0 = null; 1387 | 1388 | wasm.__wbindgen_start(); 1389 | return wasm; 1390 | } 1391 | 1392 | function initSync(module) { 1393 | if (wasm !== undefined) return wasm; 1394 | 1395 | const imports = __wbg_get_imports(); 1396 | 1397 | __wbg_init_memory(imports); 1398 | 1399 | if (!(module instanceof WebAssembly.Module)) { 1400 | module = new WebAssembly.Module(module); 1401 | } 1402 | 1403 | const instance = new WebAssembly.Instance(module, imports); 1404 | 1405 | return __wbg_finalize_init(instance, module); 1406 | } 1407 | 1408 | async function __wbg_init(input) { 1409 | if (wasm !== undefined) return wasm; 1410 | 1411 | 1412 | const imports = __wbg_get_imports(); 1413 | 1414 | if (typeof input === 'string' || (typeof Request === 'function' && input instanceof Request) || (typeof URL === 'function' && input instanceof URL)) { 1415 | input = fetch(input); 1416 | } 1417 | 1418 | __wbg_init_memory(imports); 1419 | 1420 | const { instance, module } = await __wbg_load(await input, imports); 1421 | 1422 | return __wbg_finalize_init(instance, module); 1423 | } 1424 | 1425 | export { initSync } 1426 | export default __wbg_init; 1427 | --------------------------------------------------------------------------------