Compare commits

..

7 Commits

Author SHA1 Message Date
5b1646cf40 misc 2024-06-12 15:51:50 -04:00
18edf05f93 tweak server, cleanup 2024-06-12 14:48:53 -04:00
a0ec91940c server updates 2024-06-10 22:51:23 -04:00
0cc2d914e1 cleanup 2024-06-10 16:23:31 -04:00
fe33072cd5 ./ and ../ for file and http 2024-06-10 14:49:31 -04:00
023b9a6474 resolve local file paths 2024-06-08 08:09:56 -04:00
eaa0c4c328 started 2024-06-07 16:54:12 -04:00
14 changed files with 300 additions and 1080 deletions

View File

@ -1,5 +0,0 @@
import React from "react";
import * as Other from "other";
console.log(Other.default, Other.app);
React.render(React.createElement(Other.app, null), document.querySelector("#app"));

View File

@ -1,24 +0,0 @@
import * as ESBuild from "https://deno.land/x/esbuild@v0.19.2/wasm.js";
import * as Mapper from "https://esm.sh/esbuild-plugin-importmaps@1.0.0";
await ESBuild.initialize({ worker: false } as ESBuild.InitializeOptions);
const options = {
plugins: [Mapper.importmapPlugin({
"imports": {
"react": "https://esm.sh/preact@10.22.0/compat",
"react/": "https://esm.sh/preact@10.22.0/compat/",
"other": "./other.tsx",
"entry": "./app.tsx"
}
})],
entryPoints: ["entry"],
bundle: true,
minify: false,
format: "esm",
jsx: "automatic",
jsxImportSource: "react"
} as ESBuild.BuildOptions;
const result = await ESBuild.build(options);
const decode = new TextDecoder("utf-8")
await Deno.writeTextFile("./dump.js", decode.decode(result.outputFiles?.[0].contents));
ESBuild.stop();

View File

@ -1,9 +1,17 @@
{
"name": "@ttf/wasm-bundle",
"version": "0.1.0",
"exports": "./mod.ts",
"imports": {
"react": "https://esm.sh/preact@10.22.0/compat",
"react/": "https://esm.sh/preact@10.22.0/compat/",
"other": "./other.tsx",
"entry": "./app.tsx"
"entry": "./app.tsx",
"config": "./deno.json"
},
"tasks": {
"go": "deno run -A bundler-inc.tsx",
"serve": "deno run -A serve.tsx"
},
"compilerOptions": {
"jsx": "react-jsx",

177
deno.lock
View File

@ -1,180 +1,10 @@
{
"version": "3",
"packages": {
"specifiers": {
"npm:@types/node": "npm:@types/node@18.16.19"
},
"npm": {
"@types/node@18.16.19": {
"integrity": "sha512-IXl7o+R9iti9eBW4Wg2hx1xQDig183jj7YLn8F7udNceyfkbn1ZxmzZXuak20gR40D7pIkIY1kYGx5VIGbaHKA==",
"dependencies": {}
}
}
},
"redirects": {
"https://esm.sh/esbuild-plugin-importmaps": "https://esm.sh/esbuild-plugin-importmaps@1.0.0",
"https://esm.sh/v135/@types/esbuild-plugin-import-map@latest/index.d.ts": "https://esm.sh/v135/@types/esbuild-plugin-import-map@0.0.3/index.d.ts"
},
"remote": {
"https://deno.land/std@0.140.0/_util/assert.ts": "e94f2eb37cebd7f199952e242c77654e43333c1ac4c5c700e929ea3aa5489f74",
"https://deno.land/std@0.140.0/_util/os.ts": "3b4c6e27febd119d36a416d7a97bd3b0251b77c88942c8f16ee5953ea13e2e49",
"https://deno.land/std@0.140.0/bytes/bytes_list.ts": "67eb118e0b7891d2f389dad4add35856f4ad5faab46318ff99653456c23b025d",
"https://deno.land/std@0.140.0/bytes/equals.ts": "fc16dff2090cced02497f16483de123dfa91e591029f985029193dfaa9d894c9",
"https://deno.land/std@0.140.0/bytes/mod.ts": "763f97d33051cc3f28af1a688dfe2830841192a9fea0cbaa55f927b49d49d0bf",
"https://deno.land/std@0.140.0/fmt/colors.ts": "30455035d6d728394781c10755351742dd731e3db6771b1843f9b9e490104d37",
"https://deno.land/std@0.140.0/fs/_util.ts": "0fb24eb4bfebc2c194fb1afdb42b9c3dda12e368f43e8f2321f84fc77d42cb0f",
"https://deno.land/std@0.140.0/fs/ensure_dir.ts": "9dc109c27df4098b9fc12d949612ae5c9c7169507660dcf9ad90631833209d9d",
"https://deno.land/std@0.140.0/io/buffer.ts": "bd0c4bf53db4b4be916ca5963e454bddfd3fcd45039041ea161dbf826817822b",
"https://deno.land/std@0.140.0/path/_constants.ts": "df1db3ffa6dd6d1252cc9617e5d72165cd2483df90e93833e13580687b6083c3",
"https://deno.land/std@0.140.0/path/_interface.ts": "ee3b431a336b80cf445441109d089b70d87d5e248f4f90ff906820889ecf8d09",
"https://deno.land/std@0.140.0/path/_util.ts": "c1e9686d0164e29f7d880b2158971d805b6e0efc3110d0b3e24e4b8af2190d2b",
"https://deno.land/std@0.140.0/path/common.ts": "bee563630abd2d97f99d83c96c2fa0cca7cee103e8cb4e7699ec4d5db7bd2633",
"https://deno.land/std@0.140.0/path/glob.ts": "cb5255638de1048973c3e69e420c77dc04f75755524cb3b2e160fe9277d939ee",
"https://deno.land/std@0.140.0/path/mod.ts": "d3e68d0abb393fb0bf94a6d07c46ec31dc755b544b13144dee931d8d5f06a52d",
"https://deno.land/std@0.140.0/path/posix.ts": "293cdaec3ecccec0a9cc2b534302dfe308adb6f10861fa183275d6695faace44",
"https://deno.land/std@0.140.0/path/separator.ts": "fe1816cb765a8068afb3e8f13ad272351c85cbc739af56dacfc7d93d710fe0f9",
"https://deno.land/std@0.140.0/path/win32.ts": "31811536855e19ba37a999cd8d1b62078235548d67902ece4aa6b814596dd757",
"https://deno.land/std@0.140.0/streams/conversion.ts": "712585bfa0172a97fb68dd46e784ae8ad59d11b88079d6a4ab098ff42e697d21",
"https://deno.land/std@0.183.0/_util/asserts.ts": "178dfc49a464aee693a7e285567b3d0b555dc805ff490505a8aae34f9cfb1462",
"https://deno.land/std@0.183.0/_util/os.ts": "d932f56d41e4f6a6093d56044e29ce637f8dcc43c5a90af43504a889cf1775e3",
"https://deno.land/std@0.183.0/path/_constants.ts": "e49961f6f4f48039c0dfed3c3f93e963ca3d92791c9d478ac5b43183413136e0",
"https://deno.land/std@0.183.0/path/_interface.ts": "6471159dfbbc357e03882c2266d21ef9afdb1e4aa771b0545e90db58a0ba314b",
"https://deno.land/std@0.183.0/path/_util.ts": "d7abb1e0dea065f427b89156e28cdeb32b045870acdf865833ba808a73b576d0",
"https://deno.land/std@0.183.0/path/common.ts": "ee7505ab01fd22de3963b64e46cff31f40de34f9f8de1fff6a1bd2fe79380000",
"https://deno.land/std@0.183.0/path/glob.ts": "d479e0a695621c94d3fd7fe7abd4f9499caf32a8de13f25073451c6ef420a4e1",
"https://deno.land/std@0.183.0/path/mod.ts": "bf718f19a4fdd545aee1b06409ca0805bd1b68ecf876605ce632e932fe54510c",
"https://deno.land/std@0.183.0/path/posix.ts": "8b7c67ac338714b30c816079303d0285dd24af6b284f7ad63da5b27372a2c94d",
"https://deno.land/std@0.183.0/path/separator.ts": "0fb679739d0d1d7bf45b68dacfb4ec7563597a902edbaf3c59b50d5bcadd93b1",
"https://deno.land/std@0.183.0/path/win32.ts": "d186344e5583bcbf8b18af416d13d82b35a317116e6460a5a3953508c3de5bba",
"https://deno.land/std@0.213.0/assert/assert.ts": "bec068b2fccdd434c138a555b19a2c2393b71dfaada02b7d568a01541e67cdc5",
"https://deno.land/std@0.213.0/assert/assertion_error.ts": "9f689a101ee586c4ce92f52fa7ddd362e86434ffdf1f848e45987dc7689976b8",
"https://deno.land/std@0.213.0/encoding/_util.ts": "beacef316c1255da9bc8e95afb1fa56ed69baef919c88dc06ae6cb7a6103d376",
"https://deno.land/std@0.213.0/encoding/base32.ts": "6efdb3cf385d5d6c9bb1ae78cebb912d658852f504af3cda4702ffe365ac9a22",
"https://deno.land/std@0.213.0/fs/_create_walk_entry.ts": "5d9d2aaec05bcf09a06748b1684224d33eba7a4de24cf4cf5599991ca6b5b412",
"https://deno.land/std@0.213.0/fs/_get_file_info_type.ts": "da7bec18a7661dba360a1db475b826b18977582ce6fc9b25f3d4ee0403fe8cbd",
"https://deno.land/std@0.213.0/fs/_is_same_path.ts": "709c95868345fea051c58b9e96af95cff94e6ae98dfcff2b66dee0c212c4221f",
"https://deno.land/std@0.213.0/fs/_is_subdir.ts": "c68b309d46cc8568ed83c000f608a61bbdba0943b7524e7a30f9e450cf67eecd",
"https://deno.land/std@0.213.0/fs/_to_path_string.ts": "29bfc9c6c112254961d75cbf6ba814d6de5349767818eb93090cecfa9665591e",
"https://deno.land/std@0.213.0/fs/copy.ts": "dc0f68c4b6c3b090bfdb909387e309f6169b746bd713927c9507c9ef545d71f6",
"https://deno.land/std@0.213.0/fs/empty_dir.ts": "4f01e6d56e2aa8d90ad60f20bc25601f516b00f6c3044cdf6863a058791d91aa",
"https://deno.land/std@0.213.0/fs/ensure_dir.ts": "dffff68de0d10799b5aa9e39dec4e327e12bbd29e762292193684542648c4aeb",
"https://deno.land/std@0.213.0/fs/ensure_file.ts": "ac5cfde94786b0284d2c8e9f7f9425269bea1b2140612b4aea1f20b508870f59",
"https://deno.land/std@0.213.0/fs/ensure_link.ts": "d42af2edefeaa9817873ec6e46dc5d209ac4d744f8c69c5ecc2dffade78465b6",
"https://deno.land/std@0.213.0/fs/ensure_symlink.ts": "aee3f1655700f60090b4a3037f5b6c07ab37c36807cccad746ce89987719e6d2",
"https://deno.land/std@0.213.0/fs/eol.ts": "c9807291f78361d49fd986a9be04654610c615c5e2ec63d748976197d30ff206",
"https://deno.land/std@0.213.0/fs/exists.ts": "d2757ef764eaf5c6c5af7228e8447db2de42ab084a2dae540097f905723d83f5",
"https://deno.land/std@0.213.0/fs/expand_glob.ts": "a64e4ab51f62780f764789c9cdeacc862d221e35207fb81170a980ccc22868e3",
"https://deno.land/std@0.213.0/fs/mod.ts": "107f5afa4424c2d3ce2f7e9266173198da30302c69af662c720115fe504dc5ee",
"https://deno.land/std@0.213.0/fs/move.ts": "39e0d7ccb88a566d20b949712020e766b15ef1ec19159573d11f949bd677909c",
"https://deno.land/std@0.213.0/fs/walk.ts": "f04cc83ad3b27b5a5d078c831a01c7406069474bf280d5db015d937149a60128",
"https://deno.land/std@0.213.0/jsonc/mod.ts": "82722888823e1af5a8f7918bf810ea581f68081064d529218533acad6cb7c2bc",
"https://deno.land/std@0.213.0/jsonc/parse.ts": "747a0753289fdbfcb9cb86b709b56348c98abc107fbb0a7f350b87af4425a76a",
"https://deno.land/std@0.213.0/path/_common/assert_path.ts": "2ca275f36ac1788b2acb60fb2b79cb06027198bc2ba6fb7e163efaedde98c297",
"https://deno.land/std@0.213.0/path/_common/basename.ts": "569744855bc8445f3a56087fd2aed56bdad39da971a8d92b138c9913aecc5fa2",
"https://deno.land/std@0.213.0/path/_common/common.ts": "6157c7ec1f4db2b4a9a187efd6ce76dcaf1e61cfd49f87e40d4ea102818df031",
"https://deno.land/std@0.213.0/path/_common/constants.ts": "dc5f8057159f4b48cd304eb3027e42f1148cf4df1fb4240774d3492b5d12ac0c",
"https://deno.land/std@0.213.0/path/_common/dirname.ts": "684df4aa71a04bbcc346c692c8485594fc8a90b9408dfbc26ff32cf3e0c98cc8",
"https://deno.land/std@0.213.0/path/_common/format.ts": "92500e91ea5de21c97f5fe91e178bae62af524b72d5fcd246d6d60ae4bcada8b",
"https://deno.land/std@0.213.0/path/_common/from_file_url.ts": "d672bdeebc11bf80e99bf266f886c70963107bdd31134c4e249eef51133ceccf",
"https://deno.land/std@0.213.0/path/_common/glob_to_reg_exp.ts": "2007aa87bed6eb2c8ae8381adcc3125027543d9ec347713c1ad2c68427330770",
"https://deno.land/std@0.213.0/path/_common/normalize.ts": "684df4aa71a04bbcc346c692c8485594fc8a90b9408dfbc26ff32cf3e0c98cc8",
"https://deno.land/std@0.213.0/path/_common/normalize_string.ts": "dfdf657a1b1a7db7999f7c575ee7e6b0551d9c20f19486c6c3f5ff428384c965",
"https://deno.land/std@0.213.0/path/_common/relative.ts": "faa2753d9b32320ed4ada0733261e3357c186e5705678d9dd08b97527deae607",
"https://deno.land/std@0.213.0/path/_common/strip_trailing_separators.ts": "7024a93447efcdcfeaa9339a98fa63ef9d53de363f1fbe9858970f1bba02655a",
"https://deno.land/std@0.213.0/path/_common/to_file_url.ts": "7f76adbc83ece1bba173e6e98a27c647712cab773d3f8cbe0398b74afc817883",
"https://deno.land/std@0.213.0/path/_interface.ts": "a1419fcf45c0ceb8acdccc94394e3e94f99e18cfd32d509aab514c8841799600",
"https://deno.land/std@0.213.0/path/_os.ts": "8fb9b90fb6b753bd8c77cfd8a33c2ff6c5f5bc185f50de8ca4ac6a05710b2c15",
"https://deno.land/std@0.213.0/path/basename.ts": "5d341aadb7ada266e2280561692c165771d071c98746fcb66da928870cd47668",
"https://deno.land/std@0.213.0/path/common.ts": "03e52e22882402c986fe97ca3b5bb4263c2aa811c515ce84584b23bac4cc2643",
"https://deno.land/std@0.213.0/path/constants.ts": "0c206169ca104938ede9da48ac952de288f23343304a1c3cb6ec7625e7325f36",
"https://deno.land/std@0.213.0/path/dirname.ts": "85bd955bf31d62c9aafdd7ff561c4b5fb587d11a9a5a45e2b01aedffa4238a7c",
"https://deno.land/std@0.213.0/path/extname.ts": "593303db8ae8c865cbd9ceec6e55d4b9ac5410c1e276bfd3131916591b954441",
"https://deno.land/std@0.213.0/path/format.ts": "98fad25f1af7b96a48efb5b67378fcc8ed77be895df8b9c733b86411632162af",
"https://deno.land/std@0.213.0/path/from_file_url.ts": "911833ae4fd10a1c84f6271f36151ab785955849117dc48c6e43b929504ee069",
"https://deno.land/std@0.213.0/path/glob.ts": "04510962905d4b1513b44da9cb195914e0fa46c24359f6feaca20848d797dcb0",
"https://deno.land/std@0.213.0/path/glob_to_regexp.ts": "83c5fd36a8c86f5e72df9d0f45317f9546afa2ce39acaafe079d43a865aced08",
"https://deno.land/std@0.213.0/path/is_absolute.ts": "4791afc8bfd0c87f0526eaa616b0d16e7b3ab6a65b62942e50eac68de4ef67d7",
"https://deno.land/std@0.213.0/path/is_glob.ts": "a65f6195d3058c3050ab905705891b412ff942a292bcbaa1a807a74439a14141",
"https://deno.land/std@0.213.0/path/join.ts": "ae2ec5ca44c7e84a235fd532e4a0116bfb1f2368b394db1c4fb75e3c0f26a33a",
"https://deno.land/std@0.213.0/path/join_globs.ts": "e9589869a33dc3982101898ee50903db918ca00ad2614dbe3934d597d7b1fbea",
"https://deno.land/std@0.213.0/path/mod.ts": "ffeaccb713dbe6c72e015b7c767f753f8ec5fbc3b621ff5eeee486ffc2c0ddda",
"https://deno.land/std@0.213.0/path/normalize.ts": "4155743ccceeed319b350c1e62e931600272fad8ad00c417b91df093867a8352",
"https://deno.land/std@0.213.0/path/normalize_glob.ts": "98ee8268fad271193603271c203ae973280b5abfbdd2cbca1053fd2af71869ca",
"https://deno.land/std@0.213.0/path/parse.ts": "65e8e285f1a63b714e19ef24b68f56e76934c3df0b6e65fd440d3991f4f8aefb",
"https://deno.land/std@0.213.0/path/posix/_util.ts": "1e3937da30f080bfc99fe45d7ed23c47dd8585c5e473b2d771380d3a6937cf9d",
"https://deno.land/std@0.213.0/path/posix/basename.ts": "39ee27a29f1f35935d3603ccf01d53f3d6e0c5d4d0f84421e65bd1afeff42843",
"https://deno.land/std@0.213.0/path/posix/common.ts": "26f60ccc8b2cac3e1613000c23ac5a7d392715d479e5be413473a37903a2b5d4",
"https://deno.land/std@0.213.0/path/posix/constants.ts": "93481efb98cdffa4c719c22a0182b994e5a6aed3047e1962f6c2c75b7592bef1",
"https://deno.land/std@0.213.0/path/posix/dirname.ts": "6535d2bdd566118963537b9dda8867ba9e2a361015540dc91f5afbb65c0cce8b",
"https://deno.land/std@0.213.0/path/posix/extname.ts": "8d36ae0082063c5e1191639699e6f77d3acf501600a3d87b74943f0ae5327427",
"https://deno.land/std@0.213.0/path/posix/format.ts": "185e9ee2091a42dd39e2a3b8e4925370ee8407572cee1ae52838aed96310c5c1",
"https://deno.land/std@0.213.0/path/posix/from_file_url.ts": "951aee3a2c46fd0ed488899d024c6352b59154c70552e90885ed0c2ab699bc40",
"https://deno.land/std@0.213.0/path/posix/glob_to_regexp.ts": "54d3ff40f309e3732ab6e5b19d7111d2d415248bcd35b67a99defcbc1972e697",
"https://deno.land/std@0.213.0/path/posix/is_absolute.ts": "cebe561ad0ae294f0ce0365a1879dcfca8abd872821519b4fcc8d8967f888ede",
"https://deno.land/std@0.213.0/path/posix/is_glob.ts": "8a8b08c08bf731acf2c1232218f1f45a11131bc01de81e5f803450a5914434b9",
"https://deno.land/std@0.213.0/path/posix/join.ts": "aef88d5fa3650f7516730865dbb951594d1a955b785e2450dbee93b8e32694f3",
"https://deno.land/std@0.213.0/path/posix/join_globs.ts": "ee2f4676c5b8a0dfa519da58b8ade4d1c4aa8dd3fe35619edec883ae9df1f8c9",
"https://deno.land/std@0.213.0/path/posix/mod.ts": "563a18c2b3ddc62f3e4a324ff0f583e819b8602a72ad880cb98c9e2e34f8db5b",
"https://deno.land/std@0.213.0/path/posix/normalize.ts": "baeb49816a8299f90a0237d214cef46f00ba3e95c0d2ceb74205a6a584b58a91",
"https://deno.land/std@0.213.0/path/posix/normalize_glob.ts": "65f0138fa518ef9ece354f32889783fc38cdf985fb02dcf1c3b14fa47d665640",
"https://deno.land/std@0.213.0/path/posix/parse.ts": "d5bac4eb21262ab168eead7e2196cb862940c84cee572eafedd12a0d34adc8fb",
"https://deno.land/std@0.213.0/path/posix/relative.ts": "3907d6eda41f0ff723d336125a1ad4349112cd4d48f693859980314d5b9da31c",
"https://deno.land/std@0.213.0/path/posix/resolve.ts": "bac20d9921beebbbb2b73706683b518b1d0c1b1da514140cee409e90d6b2913a",
"https://deno.land/std@0.213.0/path/posix/separator.ts": "c9ecae5c843170118156ac5d12dc53e9caf6a1a4c96fc8b1a0ab02dff5c847b0",
"https://deno.land/std@0.213.0/path/posix/to_file_url.ts": "7aa752ba66a35049e0e4a4be5a0a31ac6b645257d2e031142abb1854de250aaf",
"https://deno.land/std@0.213.0/path/posix/to_namespaced_path.ts": "28b216b3c76f892a4dca9734ff1cc0045d135532bfd9c435ae4858bfa5a2ebf0",
"https://deno.land/std@0.213.0/path/relative.ts": "ab739d727180ed8727e34ed71d976912461d98e2b76de3d3de834c1066667add",
"https://deno.land/std@0.213.0/path/resolve.ts": "a6f977bdb4272e79d8d0ed4333e3d71367cc3926acf15ac271f1d059c8494d8d",
"https://deno.land/std@0.213.0/path/separator.ts": "c6c890507f944a1f5cb7d53b8d638d6ce3cf0f34609c8d84a10c1eaa400b77a9",
"https://deno.land/std@0.213.0/path/to_file_url.ts": "88f049b769bce411e2d2db5bd9e6fd9a185a5fbd6b9f5ad8f52bef517c4ece1b",
"https://deno.land/std@0.213.0/path/to_namespaced_path.ts": "b706a4103b104cfadc09600a5f838c2ba94dbcdb642344557122dda444526e40",
"https://deno.land/std@0.213.0/path/windows/_util.ts": "d5f47363e5293fced22c984550d5e70e98e266cc3f31769e1710511803d04808",
"https://deno.land/std@0.213.0/path/windows/basename.ts": "e2dbf31d1d6385bfab1ce38c333aa290b6d7ae9e0ecb8234a654e583cf22f8fe",
"https://deno.land/std@0.213.0/path/windows/common.ts": "26f60ccc8b2cac3e1613000c23ac5a7d392715d479e5be413473a37903a2b5d4",
"https://deno.land/std@0.213.0/path/windows/constants.ts": "5afaac0a1f67b68b0a380a4ef391bf59feb55856aa8c60dfc01bd3b6abb813f5",
"https://deno.land/std@0.213.0/path/windows/dirname.ts": "33e421be5a5558a1346a48e74c330b8e560be7424ed7684ea03c12c21b627bc9",
"https://deno.land/std@0.213.0/path/windows/extname.ts": "165a61b00d781257fda1e9606a48c78b06815385e7d703232548dbfc95346bef",
"https://deno.land/std@0.213.0/path/windows/format.ts": "bbb5ecf379305b472b1082cd2fdc010e44a0020030414974d6029be9ad52aeb6",
"https://deno.land/std@0.213.0/path/windows/from_file_url.ts": "ced2d587b6dff18f963f269d745c4a599cf82b0c4007356bd957cb4cb52efc01",
"https://deno.land/std@0.213.0/path/windows/glob_to_regexp.ts": "6dcd1242bd8907aa9660cbdd7c93446e6927b201112b0cba37ca5d80f81be51b",
"https://deno.land/std@0.213.0/path/windows/is_absolute.ts": "4a8f6853f8598cf91a835f41abed42112cebab09478b072e4beb00ec81f8ca8a",
"https://deno.land/std@0.213.0/path/windows/is_glob.ts": "8a8b08c08bf731acf2c1232218f1f45a11131bc01de81e5f803450a5914434b9",
"https://deno.land/std@0.213.0/path/windows/join.ts": "e0b3356615c1a75c56ebb6a7311157911659e11fd533d80d724800126b761ac3",
"https://deno.land/std@0.213.0/path/windows/join_globs.ts": "ee2f4676c5b8a0dfa519da58b8ade4d1c4aa8dd3fe35619edec883ae9df1f8c9",
"https://deno.land/std@0.213.0/path/windows/mod.ts": "7d6062927bda47c47847ffb55d8f1a37b0383840aee5c7dfc93984005819689c",
"https://deno.land/std@0.213.0/path/windows/normalize.ts": "78126170ab917f0ca355a9af9e65ad6bfa5be14d574c5fb09bb1920f52577780",
"https://deno.land/std@0.213.0/path/windows/normalize_glob.ts": "179c86ba89f4d3fe283d2addbe0607341f79ee9b1ae663abcfb3439db2e97810",
"https://deno.land/std@0.213.0/path/windows/parse.ts": "b9239edd892a06a06625c1b58425e199f018ce5649ace024d144495c984da734",
"https://deno.land/std@0.213.0/path/windows/relative.ts": "3e1abc7977ee6cc0db2730d1f9cb38be87b0ce4806759d271a70e4997fc638d7",
"https://deno.land/std@0.213.0/path/windows/resolve.ts": "75b2e3e1238d840782cee3d8864d82bfaa593c7af8b22f19c6422cf82f330ab3",
"https://deno.land/std@0.213.0/path/windows/separator.ts": "e51c5522140eff4f8402617c5c68a201fdfa3a1a8b28dc23587cff931b665e43",
"https://deno.land/std@0.213.0/path/windows/to_file_url.ts": "1cd63fd35ec8d1370feaa4752eccc4cc05ea5362a878be8dc7db733650995484",
"https://deno.land/std@0.213.0/path/windows/to_namespaced_path.ts": "4ffa4fb6fae321448d5fe810b3ca741d84df4d7897e61ee29be961a6aac89a4c",
"https://deno.land/x/deno_cache@0.6.2/auth_tokens.ts": "5d1d56474c54a9d152e44d43ea17c2e6a398dd1e9682c69811a313567c01ee1e",
"https://deno.land/x/deno_cache@0.6.2/cache.ts": "58b53c128b742757efcad10af9a3871f23b4e200674cb5b0ddf61164fb9b2fe7",
"https://deno.land/x/deno_cache@0.6.2/deno_dir.ts": "1ea355b8ba11c630d076b222b197cfc937dd81e5a4a260938997da99e8ff93a0",
"https://deno.land/x/deno_cache@0.6.2/deps.ts": "12cca94516cf2d3ed42fccd4b721ecd8060679253f077d83057511045b0081aa",
"https://deno.land/x/deno_cache@0.6.2/dirs.ts": "009c6f54e0b610914d6ce9f72f6f6ccfffd2d47a79a19061e0a9eb4253836069",
"https://deno.land/x/deno_cache@0.6.2/disk_cache.ts": "66a1e604a8d564b6dd0500326cac33d08b561d331036bf7272def80f2f7952aa",
"https://deno.land/x/deno_cache@0.6.2/file_fetcher.ts": "4f3e4a2c78a5ca1e4812099e5083f815a8525ab20d389b560b3517f6b1161dd6",
"https://deno.land/x/deno_cache@0.6.2/http_cache.ts": "407135eaf2802809ed373c230d57da7ef8dff923c4abf205410b9b99886491fd",
"https://deno.land/x/deno_cache@0.6.2/lib/deno_cache_dir.generated.js": "59f8defac32e8ebf2a30f7bc77e9d88f0e60098463fb1b75e00b9791a4bbd733",
"https://deno.land/x/deno_cache@0.6.2/lib/snippets/deno_cache_dir-a2aecaa9536c9402/fs.js": "cbe3a976ed63c72c7cb34ef845c27013033a3b11f9d8d3e2c4aa5dda2c0c7af6",
"https://deno.land/x/deno_cache@0.6.2/mod.ts": "b4004287e1c6123d7f07fe9b5b3e94ce6d990c4102949a89c527c68b19627867",
"https://deno.land/x/deno_cache@0.6.2/util.ts": "f3f5a0cfc60051f09162942fb0ee87a0e27b11a12aec4c22076e3006be4cc1e2",
"https://deno.land/x/esbuild@v0.19.11/wasm.js": "e5935e262c7b5b3ed4d842e780293d6ff7132c9ddc3077b31ae305c73c741e7b",
"https://deno.land/x/esbuild@v0.19.2/wasm.js": "5ffeb3d973e57351eb4d2d03ffafc8ce5672e946d0f0a786c4aed2ca29cec004",
"https://deno.land/x/esbuild_deno_loader@0.9.0/deps.ts": "08972bc7edd45e9e57cfc9f9a8628957c58913dcc96273806d7c228edbb7711f",
"https://deno.land/x/esbuild_deno_loader@0.9.0/mod.ts": "00decaf22c0fec5d80724f0bb48caeafe936f5f75e31bb1138a970961fac0bbd",
"https://deno.land/x/esbuild_deno_loader@0.9.0/src/deno.ts": "bd423a6d8724152e9d6187adcb46139462b1328f81f92ae803733a7c0b202812",
"https://deno.land/x/esbuild_deno_loader@0.9.0/src/loader_native.ts": "17fe4702b285597d1ffc191cc85063bbb003956c2a67c18bac5c0c23e153561e",
"https://deno.land/x/esbuild_deno_loader@0.9.0/src/loader_portable.ts": "7f116ec5a17b69317d5512c2c85e3399934fa8f49c5bb0b7a8df3eff42848aaa",
"https://deno.land/x/esbuild_deno_loader@0.9.0/src/plugin_deno_loader.ts": "cb67ecf891f300f3e30c996e0783ccae9fcdc8d640a29b460d4f8ef15d19fb2e",
"https://deno.land/x/esbuild_deno_loader@0.9.0/src/plugin_deno_resolver.ts": "3964d48a8e4ca4c29f8e5efe85817c95f1d16c62994701168f0417afb25285ff",
"https://deno.land/x/esbuild_deno_loader@0.9.0/src/shared.ts": "d717f56adafcee47834d20b77d603f646d36575273c766fcb34d6315e759392f",
"https://deno.land/x/importmap@0.2.1/_util.ts": "ada9a9618b537e6c0316c048a898352396c882b9f2de38aba18fd3f2950ede89",
"https://deno.land/x/importmap@0.2.1/mod.ts": "ae3d1cd7eabd18c01a4960d57db471126b020f23b37ef14e1359bbb949227ade",
"https://esm.sh/esbuild-plugin-import-map@2.1.0": "591fd6ee133417fba19ed9fa95fd2ddf74a43f96b840c16f2b8ff4b3d6e2da93",
"https://deno.land/x/jsonct@v0.1.0/mod.ts": "dba7e7f3529be6369f5c718e3a18b69f15ffa176006d2a7565073ce6c5bd9f3f",
"https://deno.land/x/jsonct@v0.1.0/src/_util/asserts.ts": "178dfc49a464aee693a7e285567b3d0b555dc805ff490505a8aae34f9cfb1462",
"https://deno.land/x/jsonct@v0.1.0/src/parse.ts": "a3a016822446b0584b40bae9098df480db5590a9915c9e3c623ba2801cf1b8df",
"https://esm.sh/esbuild-plugin-importmaps@1.0.0": "ab9e79660ff4d57d2ed7ef5e8516fbe0e79305267f22e1e7270d0a17ae0c2029",
"https://esm.sh/preact@10.22.0/compat/jsx-runtime": "a2f6ddc2ce374813df1c13826a9ad010e90b5a70a989f1069a367ef60dd52eb0",
"https://esm.sh/stable/preact@10.22.0/denonext/compat.js": "7c0b206984707cfef58efae492ea8d5212b8f620dd8c83294a5c832fb422c766",
@ -183,7 +13,6 @@
"https://esm.sh/stable/preact@10.22.0/denonext/jsx-runtime.js": "de60943799b1cbe6066c4f83f4ca71ef37011d7f5be7bef58ed980e8ff3f996a",
"https://esm.sh/stable/preact@10.22.0/denonext/preact.mjs": "20c9563e051dd66e053d3afb450f61b48f2fa0d0ce4f69f8f0a2f23c1ef090da",
"https://esm.sh/v135/@jspm/import-map@1.0.8/denonext/import-map.mjs": "fc291e729df6bef849df47df8893b64749785ca65fd5fe1d0e7969db5d3b63ea",
"https://esm.sh/v135/esbuild-plugin-import-map@2.1.0/denonext/esbuild-plugin-import-map.mjs": "5435d8fbf3bc22f61a1b633836cee0cef580f7e1e4127b602db4cc77099fbb48",
"https://esm.sh/v135/esbuild-plugin-importmaps@1.0.0/denonext/esbuild-plugin-importmaps.mjs": "08b603d074dd2861345f7d224c255c46d7f7213a283026552c492f465fe595ce"
}
}

869
dump.js
View File

@ -1,869 +0,0 @@
// importmap-url:https://esm.sh/stable/preact@10.22.0/denonext/preact.mjs
var M;
var d;
var Q;
var re;
var C;
var G;
var X;
var A;
var V;
var R;
var $;
var Y;
var U = {};
var Z = [];
var ie = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;
var H = Array.isArray;
function b(_, e) {
for (var t in e)
_[t] = e[t];
return _;
}
function ee(_) {
var e = _.parentNode;
e && e.removeChild(_);
}
function le(_, e, t) {
var i, n, r2, l2 = {};
for (r2 in e)
r2 == "key" ? i = e[r2] : r2 == "ref" ? n = e[r2] : l2[r2] = e[r2];
if (arguments.length > 2 && (l2.children = arguments.length > 3 ? M.call(arguments, 2) : t), typeof _ == "function" && _.defaultProps != null)
for (r2 in _.defaultProps)
l2[r2] === void 0 && (l2[r2] = _.defaultProps[r2]);
return S(_, l2, i, n, null);
}
function S(_, e, t, i, n) {
var r2 = { type: _, props: e, key: t, ref: i, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: n ?? ++Q, __i: -1, __u: 0 };
return n == null && d.vnode != null && d.vnode(r2), r2;
}
function he() {
return { current: null };
}
function I(_) {
return _.children;
}
function F(_, e) {
this.props = _, this.context = e;
}
function x(_, e) {
if (e == null)
return _.__ ? x(_.__, _.__i + 1) : null;
for (var t; e < _.__k.length; e++)
if ((t = _.__k[e]) != null && t.__e != null)
return t.__e;
return typeof _.type == "function" ? x(_) : null;
}
function _e(_) {
var e, t;
if ((_ = _.__) != null && _.__c != null) {
for (_.__e = _.__c.base = null, e = 0; e < _.__k.length; e++)
if ((t = _.__k[e]) != null && t.__e != null) {
_.__e = _.__c.base = t.__e;
break;
}
return _e(_);
}
}
function O(_) {
(!_.__d && (_.__d = true) && C.push(_) && !W.__r++ || G !== d.debounceRendering) && ((G = d.debounceRendering) || X)(W);
}
function W() {
var _, e, t, i, n, r2, l2, s;
for (C.sort(A); _ = C.shift(); )
_.__d && (e = C.length, i = void 0, r2 = (n = (t = _).__v).__e, l2 = [], s = [], t.__P && ((i = b({}, n)).__v = n.__v + 1, d.vnode && d.vnode(i), j(t.__P, i, n, t.__n, t.__P.namespaceURI, 32 & n.__u ? [r2] : null, l2, r2 ?? x(n), !!(32 & n.__u), s), i.__v = n.__v, i.__.__k[i.__i] = i, oe(l2, i, s), i.__e != r2 && _e(i)), C.length > e && C.sort(A));
W.__r = 0;
}
function te(_, e, t, i, n, r2, l2, s, f, u, p3) {
var o2, m, c2, h2, k3, v2 = i && i.__k || Z, a = e.length;
for (t.__d = f, se(t, e, v2), f = t.__d, o2 = 0; o2 < a; o2++)
(c2 = t.__k[o2]) != null && typeof c2 != "boolean" && typeof c2 != "function" && (m = c2.__i === -1 ? U : v2[c2.__i] || U, c2.__i = o2, j(_, c2, m, n, r2, l2, s, f, u, p3), h2 = c2.__e, c2.ref && m.ref != c2.ref && (m.ref && z(m.ref, null, c2), p3.push(c2.ref, c2.__c || h2, c2)), k3 == null && h2 != null && (k3 = h2), 65536 & c2.__u || m.__k === c2.__k ? (f && !f.isConnected && (f = x(m)), f = ne(c2, f, _)) : typeof c2.type == "function" && c2.__d !== void 0 ? f = c2.__d : h2 && (f = h2.nextSibling), c2.__d = void 0, c2.__u &= -196609);
t.__d = f, t.__e = k3;
}
function se(_, e, t) {
var i, n, r2, l2, s, f = e.length, u = t.length, p3 = u, o2 = 0;
for (_.__k = [], i = 0; i < f; i++)
l2 = i + o2, (n = _.__k[i] = (n = e[i]) == null || typeof n == "boolean" || typeof n == "function" ? null : typeof n == "string" || typeof n == "number" || typeof n == "bigint" || n.constructor == String ? S(null, n, null, null, null) : H(n) ? S(I, { children: n }, null, null, null) : n.constructor === void 0 && n.__b > 0 ? S(n.type, n.props, n.key, n.ref ? n.ref : null, n.__v) : n) != null ? (n.__ = _, n.__b = _.__b + 1, s = ce(n, t, l2, p3), n.__i = s, r2 = null, s !== -1 && (p3--, (r2 = t[s]) && (r2.__u |= 131072)), r2 == null || r2.__v === null ? (s == -1 && o2--, typeof n.type != "function" && (n.__u |= 65536)) : s !== l2 && (s === l2 + 1 ? o2++ : s > l2 ? p3 > f - l2 ? o2 += s - l2 : o2-- : s < l2 ? s == l2 - 1 && (o2 = s - l2) : o2 = 0, s !== i + o2 && (n.__u |= 65536))) : (r2 = t[l2]) && r2.key == null && r2.__e && !(131072 & r2.__u) && (r2.__e == _.__d && (_.__d = x(r2)), B(r2, r2, false), t[l2] = null, p3--);
if (p3)
for (i = 0; i < u; i++)
(r2 = t[i]) != null && !(131072 & r2.__u) && (r2.__e == _.__d && (_.__d = x(r2)), B(r2, r2));
}
function ne(_, e, t) {
var i, n;
if (typeof _.type == "function") {
for (i = _.__k, n = 0; i && n < i.length; n++)
i[n] && (i[n].__ = _, e = ne(i[n], e, t));
return e;
}
_.__e != e && (t.insertBefore(_.__e, e || null), e = _.__e);
do
e = e && e.nextSibling;
while (e != null && e.nodeType === 8);
return e;
}
function ue(_, e) {
return e = e || [], _ == null || typeof _ == "boolean" || (H(_) ? _.some(function(t) {
ue(t, e);
}) : e.push(_)), e;
}
function ce(_, e, t, i) {
var n = _.key, r2 = _.type, l2 = t - 1, s = t + 1, f = e[t];
if (f === null || f && n == f.key && r2 === f.type && !(131072 & f.__u))
return t;
if (i > (f != null && !(131072 & f.__u) ? 1 : 0))
for (; l2 >= 0 || s < e.length; ) {
if (l2 >= 0) {
if ((f = e[l2]) && !(131072 & f.__u) && n == f.key && r2 === f.type)
return l2;
l2--;
}
if (s < e.length) {
if ((f = e[s]) && !(131072 & f.__u) && n == f.key && r2 === f.type)
return s;
s++;
}
}
return -1;
}
function J(_, e, t) {
e[0] === "-" ? _.setProperty(e, t ?? "") : _[e] = t == null ? "" : typeof t != "number" || ie.test(e) ? t : t + "px";
}
function L(_, e, t, i, n) {
var r2;
e:
if (e === "style")
if (typeof t == "string")
_.style.cssText = t;
else {
if (typeof i == "string" && (_.style.cssText = i = ""), i)
for (e in i)
t && e in t || J(_.style, e, "");
if (t)
for (e in t)
i && t[e] === i[e] || J(_.style, e, t[e]);
}
else if (e[0] === "o" && e[1] === "n")
r2 = e !== (e = e.replace(/(PointerCapture)$|Capture$/i, "$1")), e = e.toLowerCase() in _ || e === "onFocusOut" || e === "onFocusIn" ? e.toLowerCase().slice(2) : e.slice(2), _.l || (_.l = {}), _.l[e + r2] = t, t ? i ? t.u = i.u : (t.u = V, _.addEventListener(e, r2 ? $ : R, r2)) : _.removeEventListener(e, r2 ? $ : R, r2);
else {
if (n == "http://www.w3.org/2000/svg")
e = e.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
else if (e != "width" && e != "height" && e != "href" && e != "list" && e != "form" && e != "tabIndex" && e != "download" && e != "rowSpan" && e != "colSpan" && e != "role" && e in _)
try {
_[e] = t ?? "";
break e;
} catch {
}
typeof t == "function" || (t == null || t === false && e[4] !== "-" ? _.removeAttribute(e) : _.setAttribute(e, t));
}
}
function K(_) {
return function(e) {
if (this.l) {
var t = this.l[e.type + _];
if (e.t == null)
e.t = V++;
else if (e.t < t.u)
return;
return t(d.event ? d.event(e) : e);
}
};
}
function j(_, e, t, i, n, r2, l2, s, f, u) {
var p3, o2, m, c2, h2, k3, v2, a, y3, w2, T2, P2, q3, D3, N2, g3 = e.type;
if (e.constructor !== void 0)
return null;
128 & t.__u && (f = !!(32 & t.__u), r2 = [s = e.__e = t.__e]), (p3 = d.__b) && p3(e);
e:
if (typeof g3 == "function")
try {
if (a = e.props, y3 = (p3 = g3.contextType) && i[p3.__c], w2 = p3 ? y3 ? y3.props.value : p3.__ : i, t.__c ? v2 = (o2 = e.__c = t.__c).__ = o2.__E : ("prototype" in g3 && g3.prototype.render ? e.__c = o2 = new g3(a, w2) : (e.__c = o2 = new F(a, w2), o2.constructor = g3, o2.render = pe), y3 && y3.sub(o2), o2.props = a, o2.state || (o2.state = {}), o2.context = w2, o2.__n = i, m = o2.__d = true, o2.__h = [], o2._sb = []), o2.__s == null && (o2.__s = o2.state), g3.getDerivedStateFromProps != null && (o2.__s == o2.state && (o2.__s = b({}, o2.__s)), b(o2.__s, g3.getDerivedStateFromProps(a, o2.__s))), c2 = o2.props, h2 = o2.state, o2.__v = e, m)
g3.getDerivedStateFromProps == null && o2.componentWillMount != null && o2.componentWillMount(), o2.componentDidMount != null && o2.__h.push(o2.componentDidMount);
else {
if (g3.getDerivedStateFromProps == null && a !== c2 && o2.componentWillReceiveProps != null && o2.componentWillReceiveProps(a, w2), !o2.__e && (o2.shouldComponentUpdate != null && o2.shouldComponentUpdate(a, o2.__s, w2) === false || e.__v === t.__v)) {
for (e.__v !== t.__v && (o2.props = a, o2.state = o2.__s, o2.__d = false), e.__e = t.__e, e.__k = t.__k, e.__k.forEach(function(E3) {
E3 && (E3.__ = e);
}), T2 = 0; T2 < o2._sb.length; T2++)
o2.__h.push(o2._sb[T2]);
o2._sb = [], o2.__h.length && l2.push(o2);
break e;
}
o2.componentWillUpdate != null && o2.componentWillUpdate(a, o2.__s, w2), o2.componentDidUpdate != null && o2.__h.push(function() {
o2.componentDidUpdate(c2, h2, k3);
});
}
if (o2.context = w2, o2.props = a, o2.__P = _, o2.__e = false, P2 = d.__r, q3 = 0, "prototype" in g3 && g3.prototype.render) {
for (o2.state = o2.__s, o2.__d = false, P2 && P2(e), p3 = o2.render(o2.props, o2.state, o2.context), D3 = 0; D3 < o2._sb.length; D3++)
o2.__h.push(o2._sb[D3]);
o2._sb = [];
} else
do
o2.__d = false, P2 && P2(e), p3 = o2.render(o2.props, o2.state, o2.context), o2.state = o2.__s;
while (o2.__d && ++q3 < 25);
o2.state = o2.__s, o2.getChildContext != null && (i = b(b({}, i), o2.getChildContext())), m || o2.getSnapshotBeforeUpdate == null || (k3 = o2.getSnapshotBeforeUpdate(c2, h2)), te(_, H(N2 = p3 != null && p3.type === I && p3.key == null ? p3.props.children : p3) ? N2 : [N2], e, t, i, n, r2, l2, s, f, u), o2.base = e.__e, e.__u &= -161, o2.__h.length && l2.push(o2), v2 && (o2.__E = o2.__ = null);
} catch (E3) {
e.__v = null, f || r2 != null ? (e.__e = s, e.__u |= f ? 160 : 32, r2[r2.indexOf(s)] = null) : (e.__e = t.__e, e.__k = t.__k), d.__e(E3, e, t);
}
else
r2 == null && e.__v === t.__v ? (e.__k = t.__k, e.__e = t.__e) : e.__e = fe(t.__e, e, t, i, n, r2, l2, f, u);
(p3 = d.diffed) && p3(e);
}
function oe(_, e, t) {
e.__d = void 0;
for (var i = 0; i < t.length; i++)
z(t[i], t[++i], t[++i]);
d.__c && d.__c(e, _), _.some(function(n) {
try {
_ = n.__h, n.__h = [], _.some(function(r2) {
r2.call(n);
});
} catch (r2) {
d.__e(r2, n.__v);
}
});
}
function fe(_, e, t, i, n, r2, l2, s, f) {
var u, p3, o2, m, c2, h2, k3, v2 = t.props, a = e.props, y3 = e.type;
if (y3 === "svg" ? n = "http://www.w3.org/2000/svg" : y3 === "math" ? n = "http://www.w3.org/1998/Math/MathML" : n || (n = "http://www.w3.org/1999/xhtml"), r2 != null) {
for (u = 0; u < r2.length; u++)
if ((c2 = r2[u]) && "setAttribute" in c2 == !!y3 && (y3 ? c2.localName === y3 : c2.nodeType === 3)) {
_ = c2, r2[u] = null;
break;
}
}
if (_ == null) {
if (y3 === null)
return document.createTextNode(a);
_ = document.createElementNS(n, y3, a.is && a), r2 = null, s = false;
}
if (y3 === null)
v2 === a || s && _.data === a || (_.data = a);
else {
if (r2 = r2 && M.call(_.childNodes), v2 = t.props || U, !s && r2 != null)
for (v2 = {}, u = 0; u < _.attributes.length; u++)
v2[(c2 = _.attributes[u]).name] = c2.value;
for (u in v2)
if (c2 = v2[u], u != "children") {
if (u == "dangerouslySetInnerHTML")
o2 = c2;
else if (u !== "key" && !(u in a)) {
if (u == "value" && "defaultValue" in a || u == "checked" && "defaultChecked" in a)
continue;
L(_, u, null, c2, n);
}
}
for (u in a)
c2 = a[u], u == "children" ? m = c2 : u == "dangerouslySetInnerHTML" ? p3 = c2 : u == "value" ? h2 = c2 : u == "checked" ? k3 = c2 : u === "key" || s && typeof c2 != "function" || v2[u] === c2 || L(_, u, c2, v2[u], n);
if (p3)
s || o2 && (p3.__html === o2.__html || p3.__html === _.innerHTML) || (_.innerHTML = p3.__html), e.__k = [];
else if (o2 && (_.innerHTML = ""), te(_, H(m) ? m : [m], e, t, i, y3 === "foreignObject" ? "http://www.w3.org/1999/xhtml" : n, r2, l2, r2 ? r2[0] : t.__k && x(t, 0), s, f), r2 != null)
for (u = r2.length; u--; )
r2[u] != null && ee(r2[u]);
s || (u = "value", h2 !== void 0 && (h2 !== _[u] || y3 === "progress" && !h2 || y3 === "option" && h2 !== v2[u]) && L(_, u, h2, v2[u], n), u = "checked", k3 !== void 0 && k3 !== _[u] && L(_, u, k3, v2[u], n));
}
return _;
}
function z(_, e, t) {
try {
typeof _ == "function" ? _(e) : _.current = e;
} catch (i) {
d.__e(i, t);
}
}
function B(_, e, t) {
var i, n;
if (d.unmount && d.unmount(_), (i = _.ref) && (i.current && i.current !== _.__e || z(i, null, e)), (i = _.__c) != null) {
if (i.componentWillUnmount)
try {
i.componentWillUnmount();
} catch (r2) {
d.__e(r2, e);
}
i.base = i.__P = null;
}
if (i = _.__k)
for (n = 0; n < i.length; n++)
i[n] && B(i[n], e, t || typeof _.type != "function");
t || _.__e == null || ee(_.__e), _.__c = _.__ = _.__e = _.__d = void 0;
}
function pe(_, e, t) {
return this.constructor(_, t);
}
function ae(_, e, t) {
var i, n, r2, l2;
d.__ && d.__(_, e), n = (i = typeof t == "function") ? null : t && t.__k || e.__k, r2 = [], l2 = [], j(e, _ = (!i && t || e).__k = le(I, null, [_]), n || U, U, e.namespaceURI, !i && t ? [t] : n ? null : e.firstChild ? M.call(e.childNodes) : null, r2, !i && t ? t : n ? n.__e : e.firstChild, i, l2), oe(r2, _, l2);
}
function de(_, e) {
ae(_, e, de);
}
function ve(_, e, t) {
var i, n, r2, l2, s = b({}, _.props);
for (r2 in _.type && _.type.defaultProps && (l2 = _.type.defaultProps), e)
r2 == "key" ? i = e[r2] : r2 == "ref" ? n = e[r2] : s[r2] = e[r2] === void 0 && l2 !== void 0 ? l2[r2] : e[r2];
return arguments.length > 2 && (s.children = arguments.length > 3 ? M.call(arguments, 2) : t), S(_.type, s, i || _.key, n || _.ref, null);
}
function ye(_, e) {
var t = { __c: e = "__cC" + Y++, __: _, Consumer: function(i, n) {
return i.children(n);
}, Provider: function(i) {
var n, r2;
return this.getChildContext || (n = [], (r2 = {})[e] = this, this.getChildContext = function() {
return r2;
}, this.shouldComponentUpdate = function(l2) {
this.props.value !== l2.value && n.some(function(s) {
s.__e = true, O(s);
});
}, this.sub = function(l2) {
n.push(l2);
var s = l2.componentWillUnmount;
l2.componentWillUnmount = function() {
n.splice(n.indexOf(l2), 1), s && s.call(l2);
};
}), i.children;
} };
return t.Provider.__ = t.Consumer.contextType = t;
}
M = Z.slice, d = { __e: function(_, e, t, i) {
for (var n, r2, l2; e = e.__; )
if ((n = e.__c) && !n.__)
try {
if ((r2 = n.constructor) && r2.getDerivedStateFromError != null && (n.setState(r2.getDerivedStateFromError(_)), l2 = n.__d), n.componentDidCatch != null && (n.componentDidCatch(_, i || {}), l2 = n.__d), l2)
return n.__E = n;
} catch (s) {
_ = s;
}
throw _;
} }, Q = 0, re = function(_) {
return _ != null && _.constructor == null;
}, F.prototype.setState = function(_, e) {
var t;
t = this.__s != null && this.__s !== this.state ? this.__s : this.__s = b({}, this.state), typeof _ == "function" && (_ = _(b({}, t), this.props)), _ && b(t, _), _ != null && this.__v && (e && this._sb.push(e), O(this));
}, F.prototype.forceUpdate = function(_) {
this.__v && (this.__e = true, _ && this.__h.push(_), O(this));
}, F.prototype.render = I, C = [], X = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, A = function(_, e) {
return _.__v.__b - e.__v.__b;
}, W.__r = 0, V = 0, R = K(false), $ = K(true), Y = 0;
// importmap-url:https://esm.sh/stable/preact@10.22.0/denonext/hooks.js
var c;
var r;
var H2;
var b2;
var v = 0;
var x2 = [];
var p = [];
var o = d;
var g = o.__b;
var C2 = o.__r;
var A2 = o.diffed;
var D = o.__c;
var F2 = o.unmount;
var k = o.__;
function l(t, _) {
o.__h && o.__h(r, t, v || _), v = 0;
var u = r.__H || (r.__H = { __: [], __h: [] });
return t >= u.__.length && u.__.push({ __V: p }), u.__[t];
}
function I2(t) {
return v = 1, R2(U2, t);
}
function R2(t, _, u) {
var n = l(c++, 2);
if (n.t = t, !n.__c && (n.__ = [u ? u(_) : U2(void 0, _), function(a) {
var f = n.__N ? n.__N[0] : n.__[0], s = n.t(f, a);
f !== s && (n.__N = [s, n.__[1]], n.__c.setState({}));
}], n.__c = r, !r.u)) {
var i = function(a, f, s) {
if (!n.__c.__H)
return true;
var m = n.__c.__H.__.filter(function(e) {
return !!e.__c;
});
if (m.every(function(e) {
return !e.__N;
}))
return !h2 || h2.call(this, a, f, s);
var V2 = false;
return m.forEach(function(e) {
if (e.__N) {
var P2 = e.__[0];
e.__ = e.__N, e.__N = void 0, P2 !== e.__[0] && (V2 = true);
}
}), !(!V2 && n.__c.props === a) && (!h2 || h2.call(this, a, f, s));
};
r.u = true;
var h2 = r.shouldComponentUpdate, N2 = r.componentWillUpdate;
r.componentWillUpdate = function(a, f, s) {
if (this.__e) {
var m = h2;
h2 = void 0, i(a, f, s), h2 = m;
}
N2 && N2.call(this, a, f, s);
}, r.shouldComponentUpdate = i;
}
return n.__N || n.__;
}
function z2(t, _) {
var u = l(c++, 3);
!o.__s && y(u.__H, _) && (u.__ = t, u.i = _, r.__H.__h.push(u));
}
function S2(t, _) {
var u = l(c++, 4);
!o.__s && y(u.__H, _) && (u.__ = t, u.i = _, r.__h.push(u));
}
function L2(t) {
return v = 5, T(function() {
return { current: t };
}, []);
}
function M2(t, _, u) {
v = 6, S2(function() {
return typeof t == "function" ? (t(_()), function() {
return t(null);
}) : t ? (t.current = _(), function() {
return t.current = null;
}) : void 0;
}, u == null ? u : u.concat(t));
}
function T(t, _) {
var u = l(c++, 7);
return y(u.__H, _) ? (u.__V = t(), u.i = _, u.__h = t, u.__V) : u.__;
}
function G2(t, _) {
return v = 8, T(function() {
return t;
}, _);
}
function J2(t) {
var _ = r.context[t.__c], u = l(c++, 9);
return u.c = t, _ ? (u.__ == null && (u.__ = true, _.sub(r)), _.props.value) : t.__;
}
function K2(t, _) {
o.useDebugValue && o.useDebugValue(_ ? _(t) : t);
}
function Q2() {
var t = l(c++, 11);
if (!t.__) {
for (var _ = r.__v; _ !== null && !_.__m && _.__ !== null; )
_ = _.__;
var u = _.__m || (_.__m = [0, 0]);
t.__ = "P" + u[0] + "-" + u[1]++;
}
return t.__;
}
function W2() {
for (var t; t = x2.shift(); )
if (t.__P && t.__H)
try {
t.__H.__h.forEach(d2), t.__H.__h.forEach(E), t.__H.__h = [];
} catch (_) {
t.__H.__h = [], o.__e(_, t.__v);
}
}
o.__b = function(t) {
r = null, g && g(t);
}, o.__ = function(t, _) {
t && _.__k && _.__k.__m && (t.__m = _.__k.__m), k && k(t, _);
}, o.__r = function(t) {
C2 && C2(t), c = 0;
var _ = (r = t.__c).__H;
_ && (H2 === r ? (_.__h = [], r.__h = [], _.__.forEach(function(u) {
u.__N && (u.__ = u.__N), u.__V = p, u.__N = u.i = void 0;
})) : (_.__h.forEach(d2), _.__h.forEach(E), _.__h = [], c = 0)), H2 = r;
}, o.diffed = function(t) {
A2 && A2(t);
var _ = t.__c;
_ && _.__H && (_.__H.__h.length && (x2.push(_) !== 1 && b2 === o.requestAnimationFrame || ((b2 = o.requestAnimationFrame) || j2)(W2)), _.__H.__.forEach(function(u) {
u.i && (u.__H = u.i), u.__V !== p && (u.__ = u.__V), u.i = void 0, u.__V = p;
})), H2 = r = null;
}, o.__c = function(t, _) {
_.some(function(u) {
try {
u.__h.forEach(d2), u.__h = u.__h.filter(function(n) {
return !n.__ || E(n);
});
} catch (n) {
_.some(function(i) {
i.__h && (i.__h = []);
}), _ = [], o.__e(n, u.__v);
}
}), D && D(t, _);
}, o.unmount = function(t) {
F2 && F2(t);
var _, u = t.__c;
u && u.__H && (u.__H.__.forEach(function(n) {
try {
d2(n);
} catch (i) {
_ = i;
}
}), u.__H = void 0, _ && o.__e(_, u.__v));
};
var q = typeof requestAnimationFrame == "function";
function j2(t) {
var _, u = function() {
clearTimeout(n), q && cancelAnimationFrame(_), setTimeout(t);
}, n = setTimeout(u, 100);
q && (_ = requestAnimationFrame(u));
}
function d2(t) {
var _ = r, u = t.__c;
typeof u == "function" && (t.__c = void 0, u()), r = _;
}
function E(t) {
var _ = r;
t.__c = t.__(), r = _;
}
function y(t, _) {
return !t || t.length !== _.length || _.some(function(u, n) {
return u !== t[n];
});
}
function U2(t, _) {
return typeof _ == "function" ? _(t) : _;
}
// importmap-url:https://esm.sh/stable/preact@10.22.0/denonext/compat.js
function $2(e, t) {
for (var n in t)
e[n] = t[n];
return e;
}
function C3(e, t) {
for (var n in e)
if (n !== "__source" && !(n in t))
return true;
for (var r2 in t)
if (r2 !== "__source" && e[r2] !== t[r2])
return true;
return false;
}
function E2(e, t) {
this.props = e, this.context = t;
}
function ne2(e, t) {
function n(o2) {
var u = this.props.ref, a = u == o2.ref;
return !a && u && (u.call ? u(null) : u.current = null), t ? !t(this.props, o2) || !a : C3(this.props, o2);
}
function r2(o2) {
return this.shouldComponentUpdate = n, le(e, o2);
}
return r2.displayName = "Memo(" + (e.displayName || e.name) + ")", r2.prototype.isReactComponent = true, r2.__f = true, r2;
}
(E2.prototype = new F()).isPureReactComponent = true, E2.prototype.shouldComponentUpdate = function(e, t) {
return C3(this.props, e) || C3(this.state, t);
};
var x3 = d.__b;
d.__b = function(e) {
e.type && e.type.__f && e.ref && (e.props.ref = e.ref, e.ref = null), x3 && x3(e);
};
var re2 = typeof Symbol < "u" && Symbol.for && Symbol.for("react.forward_ref") || 3911;
function oe2(e) {
function t(n) {
var r2 = $2({}, n);
return delete r2.ref, e(r2, n.ref || null);
}
return t.$$typeof = re2, t.render = t, t.prototype.isReactComponent = t.__f = true, t.displayName = "ForwardRef(" + (e.displayName || e.name) + ")", t;
}
var k2 = function(e, t) {
return e == null ? null : ue(ue(e).map(t));
};
var ue2 = { map: k2, forEach: k2, count: function(e) {
return e ? ue(e).length : 0;
}, only: function(e) {
var t = ue(e);
if (t.length !== 1)
throw "Children.only";
return t[0];
}, toArray: ue };
var ae2 = d.__e;
d.__e = function(e, t, n, r2) {
if (e.then) {
for (var o2, u = t; u = u.__; )
if ((o2 = u.__c) && o2.__c)
return t.__e == null && (t.__e = n.__e, t.__k = n.__k), o2.__c(e, t);
}
ae2(e, t, n, r2);
};
var O2 = d.unmount;
function z3(e, t, n) {
return e && (e.__c && e.__c.__H && (e.__c.__H.__.forEach(function(r2) {
typeof r2.__c == "function" && r2.__c();
}), e.__c.__H = null), (e = $2({}, e)).__c != null && (e.__c.__P === n && (e.__c.__P = t), e.__c = null), e.__k = e.__k && e.__k.map(function(r2) {
return z3(r2, t, n);
})), e;
}
function B2(e, t, n) {
return e && n && (e.__v = null, e.__k = e.__k && e.__k.map(function(r2) {
return B2(r2, t, n);
}), e.__c && e.__c.__P === t && (e.__e && n.appendChild(e.__e), e.__c.__e = true, e.__c.__P = n)), e;
}
function h() {
this.__u = 0, this.t = null, this.__b = null;
}
function j3(e) {
var t = e.__.__c;
return t && t.__a && t.__a(e);
}
function ie2(e) {
var t, n, r2;
function o2(u) {
if (t || (t = e()).then(function(a) {
n = a.default || a;
}, function(a) {
r2 = a;
}), r2)
throw r2;
if (!n)
throw t;
return le(n, u);
}
return o2.displayName = "Lazy", o2.__f = true, o2;
}
function p2() {
this.u = null, this.o = null;
}
d.unmount = function(e) {
var t = e.__c;
t && t.__R && t.__R(), t && 32 & e.__u && (e.type = null), O2 && O2(e);
}, (h.prototype = new F()).__c = function(e, t) {
var n = t.__c, r2 = this;
r2.t == null && (r2.t = []), r2.t.push(n);
var o2 = j3(r2.__v), u = false, a = function() {
u || (u = true, n.__R = null, o2 ? o2(s) : s());
};
n.__R = a;
var s = function() {
if (!--r2.__u) {
if (r2.state.__a) {
var l2 = r2.state.__a;
r2.__v.__k[0] = B2(l2, l2.__c.__P, l2.__c.__O);
}
var R3;
for (r2.setState({ __a: r2.__b = null }); R3 = r2.t.pop(); )
R3.forceUpdate();
}
};
r2.__u++ || 32 & t.__u || r2.setState({ __a: r2.__b = r2.__v.__k[0] }), e.then(a, a);
}, h.prototype.componentWillUnmount = function() {
this.t = [];
}, h.prototype.render = function(e, t) {
if (this.__b) {
if (this.__v.__k) {
var n = document.createElement("div"), r2 = this.__v.__k[0].__c;
this.__v.__k[0] = z3(this.__b, n, r2.__O = r2.__P);
}
this.__b = null;
}
var o2 = t.__a && le(I, null, e.fallback);
return o2 && (o2.__u &= -33), [le(I, null, t.__a ? null : e.children), o2];
};
var P = function(e, t, n) {
if (++n[1] === n[0] && e.o.delete(t), e.props.revealOrder && (e.props.revealOrder[0] !== "t" || !e.o.size))
for (n = e.u; n; ) {
for (; n.length > 3; )
n.pop()();
if (n[1] < n[0])
break;
e.u = n = n[2];
}
};
function se2(e) {
return this.getChildContext = function() {
return e.context;
}, e.children;
}
function le2(e) {
var t = this, n = e.i;
t.componentWillUnmount = function() {
ae(null, t.l), t.l = null, t.i = null;
}, t.i && t.i !== n && t.componentWillUnmount(), t.l || (t.i = n, t.l = { nodeType: 1, parentNode: n, childNodes: [], appendChild: function(r2) {
this.childNodes.push(r2), t.i.appendChild(r2);
}, insertBefore: function(r2, o2) {
this.childNodes.push(r2), t.i.appendChild(r2);
}, removeChild: function(r2) {
this.childNodes.splice(this.childNodes.indexOf(r2) >>> 1, 1), t.i.removeChild(r2);
} }), ae(le(se2, { context: t.context }, e.__v), t.l);
}
function ce2(e, t) {
var n = le(le2, { __v: e, i: t });
return n.containerInfo = t, n;
}
(p2.prototype = new F()).__a = function(e) {
var t = this, n = j3(t.__v), r2 = t.o.get(e);
return r2[0]++, function(o2) {
var u = function() {
t.props.revealOrder ? (r2.push(o2), P(t, e, r2)) : o2();
};
n ? n(u) : u();
};
}, p2.prototype.render = function(e) {
this.u = null, this.o = /* @__PURE__ */ new Map();
var t = ue(e.children);
e.revealOrder && e.revealOrder[0] === "b" && t.reverse();
for (var n = t.length; n--; )
this.o.set(t[n], this.u = [1, 0, this.u]);
return e.children;
}, p2.prototype.componentDidUpdate = p2.prototype.componentDidMount = function() {
var e = this;
this.o.forEach(function(t, n) {
P(e, n, t);
});
};
var Y2 = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103;
var _e2 = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/;
var fe2 = /^on(Ani|Tra|Tou|BeforeInp|Compo)/;
var pe2 = /[A-Z0-9]/g;
var de2 = typeof document < "u";
var he2 = function(e) {
return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(e);
};
function me(e, t, n) {
return t.__k == null && (t.textContent = ""), ae(e, t), typeof n == "function" && n(), e ? e.__c : null;
}
function ve2(e, t, n) {
return de(e, t), typeof n == "function" && n(), e ? e.__c : null;
}
F.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(e) {
Object.defineProperty(F.prototype, e, { configurable: true, get: function() {
return this["UNSAFE_" + e];
}, set: function(t) {
Object.defineProperty(this, e, { configurable: true, writable: true, value: t });
} });
});
var w = d.event;
function ye2() {
}
function be() {
return this.cancelBubble;
}
function Ce() {
return this.defaultPrevented;
}
d.event = function(e) {
return w && (e = w(e)), e.persist = ye2, e.isPropagationStopped = be, e.isDefaultPrevented = Ce, e.nativeEvent = e;
};
var N;
var Ee = { enumerable: false, configurable: true, get: function() {
return this.class;
} };
var I3 = d.vnode;
d.vnode = function(e) {
typeof e.type == "string" && function(t) {
var n = t.props, r2 = t.type, o2 = {};
for (var u in n) {
var a = n[u];
if (!(u === "value" && "defaultValue" in n && a == null || de2 && u === "children" && r2 === "noscript" || u === "class" || u === "className")) {
var s = u.toLowerCase();
u === "defaultValue" && "value" in n && n.value == null ? u = "value" : u === "download" && a === true ? a = "" : s === "translate" && a === "no" ? a = false : s === "ondoubleclick" ? u = "ondblclick" : s !== "onchange" || r2 !== "input" && r2 !== "textarea" || he2(n.type) ? s === "onfocus" ? u = "onfocusin" : s === "onblur" ? u = "onfocusout" : fe2.test(u) ? u = s : r2.indexOf("-") === -1 && _e2.test(u) ? u = u.replace(pe2, "-$&").toLowerCase() : a === null && (a = void 0) : s = u = "oninput", s === "oninput" && o2[u = s] && (u = "oninputCapture"), o2[u] = a;
}
}
r2 == "select" && o2.multiple && Array.isArray(o2.value) && (o2.value = ue(n.children).forEach(function(l2) {
l2.props.selected = o2.value.indexOf(l2.props.value) != -1;
})), r2 == "select" && o2.defaultValue != null && (o2.value = ue(n.children).forEach(function(l2) {
l2.props.selected = o2.multiple ? o2.defaultValue.indexOf(l2.props.value) != -1 : o2.defaultValue == l2.props.value;
})), n.class && !n.className ? (o2.class = n.class, Object.defineProperty(o2, "className", Ee)) : (n.className && !n.class || n.class && n.className) && (o2.class = o2.className = n.className), t.props = o2;
}(e), e.$$typeof = Y2, I3 && I3(e);
};
var U3 = d.__r;
d.__r = function(e) {
U3 && U3(e), N = e.__c;
};
var D2 = d.diffed;
d.diffed = function(e) {
D2 && D2(e);
var t = e.props, n = e.__e;
n != null && e.type === "textarea" && "value" in t && t.value !== n.value && (n.value = t.value == null ? "" : t.value), N = null;
};
var Se = { ReactCurrentDispatcher: { current: { readContext: function(e) {
return N.__n[e.__c].props.value;
}, useCallback: G2, useContext: J2, useDebugValue: K2, useDeferredValue: q2, useEffect: z2, useId: Q2, useImperativeHandle: M2, useInsertionEffect: J3, useLayoutEffect: S2, useMemo: T, useReducer: R2, useRef: L2, useState: I2, useSyncExternalStore: K3, useTransition: G3 } } };
function ge(e) {
return le.bind(null, e);
}
function y2(e) {
return !!e && e.$$typeof === Y2;
}
function Ne(e) {
return y2(e) && e.type === I;
}
function Re(e) {
return !!e && !!e.displayName && (typeof e.displayName == "string" || e.displayName instanceof String) && e.displayName.startsWith("Memo(");
}
function xe(e) {
return y2(e) ? ve.apply(null, arguments) : e;
}
function ke(e) {
return !!e.__k && (ae(null, e), true);
}
function Oe(e) {
return e && (e.base || e.nodeType === 1 && e) || null;
}
var Pe = function(e, t) {
return e(t);
};
var we = function(e, t) {
return e(t);
};
var Ie = I;
function Z2(e) {
e();
}
function q2(e) {
return e;
}
function G3() {
return [false, Z2];
}
var J3 = S2;
var Ue = y2;
function K3(e, t) {
var n = t(), r2 = I2({ h: { __: n, v: t } }), o2 = r2[0].h, u = r2[1];
return S2(function() {
o2.__ = n, o2.v = t, b3(o2) && u({ h: o2 });
}, [e, n, t]), z2(function() {
return b3(o2) && u({ h: o2 }), e(function() {
b3(o2) && u({ h: o2 });
});
}, [e]), n;
}
function b3(e) {
var t, n, r2 = e.v, o2 = e.__;
try {
var u = r2();
return !((t = o2) === (n = u) && (t !== 0 || 1 / t == 1 / n) || t != t && n != n);
} catch {
return true;
}
}
var Me = { useState: I2, useId: Q2, useReducer: R2, useEffect: z2, useLayoutEffect: S2, useInsertionEffect: J3, useTransition: G3, useDeferredValue: q2, useSyncExternalStore: K3, startTransition: Z2, useRef: L2, useImperativeHandle: M2, useMemo: T, useCallback: G2, useContext: J2, useDebugValue: K2, version: "17.0.2", Children: ue2, render: me, hydrate: ve2, unmountComponentAtNode: ke, createPortal: ce2, createElement: le, createContext: ye, createFactory: ge, cloneElement: xe, createRef: he, Fragment: I, isValidElement: y2, isElement: Ue, isFragment: Ne, isMemo: Re, findDOMNode: Oe, Component: F, PureComponent: E2, memo: ne2, forwardRef: oe2, flushSync: we, unstable_batchedUpdates: Pe, StrictMode: Ie, Suspense: h, SuspenseList: p2, lazy: ie2, __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: Se };
// importmap-url:https://esm.sh/stable/preact@10.22.0/denonext/jsx-runtime.js
var d3 = 0;
var x4 = Array.isArray;
function g2(r2, t, e, a, o2, s) {
t || (t = {});
var i, n, f = t;
if ("ref" in f)
for (n in f = {}, t)
n == "ref" ? i = t[n] : f[n] = t[n];
var u = { type: r2, props: f, key: e, ref: i, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, constructor: void 0, __v: --d3, __i: -1, __u: 0, __source: o2, __self: s };
if (typeof r2 == "function" && (i = r2.defaultProps))
for (n in i)
f[n] === void 0 && (f[n] = i[n]);
return d.vnode && d.vnode(u), u;
}
// importmap-url:file:///C:/Local%20Web%20Projects/deno-esbuild-bundler/other.tsx
var other_default = "TEST STRING";
var app = () => {
const [stateGet, stateSet] = I2(7);
return /* @__PURE__ */ g2("div", { children: /* @__PURE__ */ g2("h1", { children: [
"lolidk ",
/* @__PURE__ */ g2("button", { onClick: (_) => stateSet(stateGet + 1), children: stateGet })
] }) });
};
// importmap-url:file:///C:/Local%20Web%20Projects/deno-esbuild-bundler/app.tsx
console.log(other_default, app);
Me.render(Me.createElement(app, null), document.querySelector("#app"));

75
introspect.ts Normal file
View File

@ -0,0 +1,75 @@
import { parse as JSONC } from "https://deno.land/x/jsonct@v0.1.0/mod.ts";
type JsonLike = { [key: string]: string | string[] | JsonLike; };
/** A `file://` url version of Deno.cwd() */
export const Root = new URL(`file://${Deno.cwd().replaceAll("\\", "/")}`).toString() + "/";
export default async function HuntConfig()
{
let path:string, json:JsonLike|undefined;
const loadJSON =async(inPath:string)=>{
try{
const resp = await fetch(Root + inPath);
if(inPath.endsWith(".jsonc"))
{
const text = await resp.text();
json = JSONC(text) as JsonLike;
}
else
{
json = await resp.json();
}
return json;
}
catch(_e)
{
return {};
}
}
try// look for `deno.json`
{
json = await loadJSON("deno.json");
}
catch(_e)
{
try // look for `deno.jsonc`
{
json = await loadJSON("deno.jsonc");
}
catch(_e)
{
try // look in the vscode plugin settings
{
json = await loadJSON(".vscode/settings.json")
path = json ? json["deno.config"] as string : "";
json = undefined;
if(path)
{
json = await loadJSON(path)
}
}
catch(_e)
{
// cant find a config using the vscode plugin
}
}
}
if(!json)
{
json = {};
}
path = json.importMap as string;
if(!json.imports && path)
{
json.imports = await loadJSON(path) as JsonLike;
}
return json as {imports:JsonLike, compilerOptions:JsonLike};
}

59
mod.ts Normal file
View File

@ -0,0 +1,59 @@
import * as ESBuild from "https://deno.land/x/esbuild@v0.19.2/wasm.js";
import * as Mapper from "https://esm.sh/esbuild-plugin-importmaps@1.0.0"; // https://github.com/andstellar/esbuild-plugin-importmaps
import Introspect, {Root} from "./introspect.ts";
const prefix = "/_dot_importer_/";
const resolvePlugin:ESBuild.Plugin = {
name: "resolve-plugin",
setup(build) {
build.onResolve({ filter: /^(\.\/|\.\.\/).*/ }, (args)=>
{
let resolveRoot = args.importer||Root;
if(resolveRoot.startsWith(prefix))
{
resolveRoot = resolveRoot.substring(prefix.length);
}
const output:ESBuild.OnResolveResult = {
path:prefix + new URL(args.path, resolveRoot).href,
namespace:"http",
}
return output;
});
build.onLoad({ filter: /.*/, namespace:"http" }, async(args)=> {
const fetchPath = args.path.substring(prefix.length);
const result = await fetch(fetchPath);
const contents = await result.text();
return { contents, loader: `tsx` };
});
},
};
await ESBuild.initialize({ worker: false });
export type ImportMap = Parameters<typeof Mapper.importmapPlugin>[0];
export type BuildOptions = ESBuild.BuildOptions;
export default async function(buildOptions={} as BuildOptions, importMap:ImportMap|false = false):Promise<ESBuild.BuildResult<ESBuild.BuildOptions>>
{
if(importMap === false)
{
importMap = await Introspect() as ImportMap;
}
const configuration:ESBuild.BuildOptions = {
entryPoints: ["entry"],
bundle: true,
minify: true,
format: "esm",
jsx: "automatic",
jsxImportSource: "react",
...buildOptions,
plugins: [
resolvePlugin,
Mapper.importmapPlugin(importMap) as ESBuild.Plugin,
...buildOptions.plugins||[]
]
};
const result = await ESBuild.build(configuration);
return result;
}
export { ESBuild };

View File

@ -1,6 +0,0 @@
export default "TEST STRING";
import {useState} from "react";
export const app =()=> {
const [stateGet, stateSet] = useState(7)
return <div><h1>lolidk <button onClick={_=>stateSet(stateGet + 1)}>{stateGet}</button></h1></div>;
}

135
serve.tsx Normal file
View File

@ -0,0 +1,135 @@
import bundler from "./mod.ts";
import mime from "https://esm.sh/mime@4.0.3";
import { parseArgs } from "jsr:@std/cli/parse-args";
if(Deno.mainModule == import.meta.url)
{
serve(parseArgs(Deno.args) as ServeArgs);
}
type ServeArgs = {path?:string, html?:string, port?:string|number};
function serve(settings:ServeArgs):void
{
let basePath = "";
const SetDirectory =(inPath:string)=>{
if(inPath.startsWith("http://")||inPath.startsWith("https://")||inPath.startsWith("file://"))
{
basePath = inPath;
}
else
{
basePath = new URL(inPath, new URL(`file://${Deno.cwd().replaceAll("\\", "/")}/`).toString()).href;
}
if(!basePath.endsWith("/"))
{
basePath = basePath + "/";
}
console.log("Base Path:", basePath);
}
SetDirectory(settings.path||"./");
const transpiled:Map<string, string> = new Map();
const ServeJSCode =(inText:string)=> new Response(inText, {headers:{"content-type":"application/javascript"}});
const ServeStatic =async(inPath:string)=>
{
try
{
const handle = await fetch(basePath+inPath.substring(1));
return new Response(handle.body, {headers:{"content-type": mime.getType(inPath)??""}})
}
catch(_e)
{
return resp404;
}
};
const resp404 = new Response("404", {status:404});
let respIndex:false|Response|Promise<Response> = false;
if(settings.html)
{
if(settings.html.indexOf("<") != -1)
{
respIndex= new Response(settings.html, {headers:{"content-type":"text-html"}});
}
else
{
respIndex = ServeStatic(settings.html);
}
}
Deno.serve({port:parseInt(settings.port as string)||8000}, async(req)=>{
const url = new URL(req.url);
const index = url.pathname.lastIndexOf(".");
if(index > -1)
{
const ext = url.pathname.substring(index+1);
if(ext === "ts" || ext == "tsx" || ext == "js" || ext == "jsx")
{
if(ext == "js")
{
const lookup = transpiled.get(url.pathname);
if(lookup)
{
return ServeJSCode(lookup);
}
}
else
{
const lookup = transpiled.get(url.pathname.substring(0, index)+".js");
if(lookup)
{
return ServeJSCode(lookup);
}
}
try
{
const results = await bundler({
entryPoints:[basePath+url.pathname],
outdir:"/",
entryNames: `[dir][name]`,
splitting: true
});
if(results.outputFiles)
{
results.outputFiles.forEach(output=>transpiled.set(output.path, output.text))
return ServeJSCode(results.outputFiles[0].text);
}
else
{
throw(new Error("no output"));
}
}
catch(_e)
{
return resp404;
}
}
else
{
return ServeStatic(url.pathname);
}
}
if(respIndex)
{
return respIndex;
}
else
{
let indexLookup = url.pathname;
if(!indexLookup.endsWith("/"))
{
indexLookup = indexLookup+"/";
}
return ServeStatic(indexLookup+"index.html");
}
});
}
export default serve

2
test/app-dynamic.tsx Normal file
View File

@ -0,0 +1,2 @@
console.log("hey included")
export default "async include";

10
test/app.tsx Normal file
View File

@ -0,0 +1,10 @@
import * as React from "react"
const dyn = await import("./app-dynamic.tsx");
console.log(dyn);
import Other from "./other.tsx";
console.log(Other);
React.render(<h1>sup!</h1>, document.querySelector("#app")||document.body);

2
test/deep/deep.tsx Normal file
View File

@ -0,0 +1,2 @@
import "../app.tsx";
console.log("we deep!");

View File

@ -4,5 +4,6 @@
</head>
<body>
<div id="app"></div>
</body><script src="dump.js" type="module"></script>
</body>
<script src="/app.tsx" type="module"></script>
</html>

3
test/other.tsx Normal file
View File

@ -0,0 +1,3 @@
import React from "react";
console.log(React.createElement("div", {}, "hey"));
export default "TEST STRING";