diff --git a/.gitignore b/.gitignore index 6cc824c2..715ee670 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ elm-stuff -.cache node_modules /dist -/src/optimized.js +build diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..1d65b44a --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1 @@ +{ "elmLS.elmFormatPath": "elm-format-hack" } diff --git a/README.md b/README.md index d9adbb46..8b827105 100644 --- a/README.md +++ b/README.md @@ -6,4 +6,4 @@ It's a rewrite in Elm of "mePlot", which was a formerly J2ME, then Android appli It's pre-1.0, and there is much to do. -To test it, `pnpm install` and then `pnpm start`. +To test it, `bun install` and then `bun start`. diff --git a/TODO.md b/TODO.md index d0e05849..5df5cdc4 100644 --- a/TODO.md +++ b/TODO.md @@ -1,10 +1,32 @@ -* Save on Google -* Fix parse of `(x-α)(x-β)(x-γ)` -* Save to folder -* User functions -* undo/redo -* solve (x-pi)(x-e) -* fix 3d navigation -* Manual -* Profile [blocked by https://github.com/NixOS/nixpkgs/issues/107585] -* Fix save image [?] +# Todo + +- solve `x² - 3pi x² + 3 pi² x - pi³ = 0` +- Fuzzy test the solver +- User functions +- Undo/redo + +## Meh + +- Integrals +- Zoom controls on desktop + +## Long term + +- Intersections +- Profile [blocked by https://github.com/NixOS/nixpkgs/issues/107585] + +## Ugh + +- 3D vector fields +- Save to folder +- Axes' labels +- Wrap equations in KaTeX +- Better onboarding +- Save on Google +- Implement nonshitty 3d navigation +- Manual + +## Uh? + +- In step simplify, prefilter 1 and 0 out of associative +- Fix save image diff --git a/bun.lock b/bun.lock new file mode 100644 index 00000000..7c9f07ff --- /dev/null +++ b/bun.lock @@ -0,0 +1,274 @@ +{ + "lockfileVersion": 1, + "configVersion": 1, + "workspaces": { + "": { + "name": "nuplot", + "devDependencies": { + "elm": "^0.19.1-6", + "elm-format": "^0.8.8", + "elm-review": "^2.13.5", + "elm-watch": "^2.0.0-beta.12", + }, + }, + }, + "packages": { + "@avh4/elm-format-darwin-arm64": ["@avh4/elm-format-darwin-arm64@0.8.8-1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-VDu3CRajhB/Sax+CEU4PhIzErBZv8vVxbk9Sk8seUHa1ngfICa3Ejoq3PhnoOFKYF1v1sSxNOC2RnUzvd/9bUw=="], + + "@avh4/elm-format-darwin-x64": ["@avh4/elm-format-darwin-x64@0.8.8-1", "", { "os": "darwin", "cpu": "x64" }, "sha512-9NAzi3HUBSHEIx3Nje+a6wFcv6RDKv2PO0OUNcV/XlS4Sou3r89xsYAVAXS8mi4+CKTdscyfSSkgGd8qiCCxAw=="], + + "@avh4/elm-format-linux-arm64": ["@avh4/elm-format-linux-arm64@0.8.8-1", "", { "os": "linux", "cpu": "arm64" }, "sha512-VNuXYphgxtnk7Gw+VBgWBeA9k8wKSo9r/O2F7udgurokYLO8S+RGhLHgD9mb6Yecv/veWz4v9n/O0IggH/BOCQ=="], + + "@avh4/elm-format-linux-x64": ["@avh4/elm-format-linux-x64@0.8.8-1", "", { "os": "linux", "cpu": "x64" }, "sha512-IvtmUTDw/V5mBeglLgtQMzWZPc0QvmqUmoJ+vipxYii3DJ/1KV2drtpvlLuFdBlFrehUivtrh4HhOTsdGXxyXQ=="], + + "@avh4/elm-format-win32-x64": ["@avh4/elm-format-win32-x64@0.8.8-1", "", { "os": "win32", "cpu": "x64" }, "sha512-qGYZM2oJFSVQ80Tayk1v15ba7PWCU3B89EkA3Fy4YQasvtA+UrYYR5Bv7MRF4kn6Zp7oSDk4FhknURFsZWZ7kg=="], + + "@elm_binaries/darwin_arm64": ["@elm_binaries/darwin_arm64@0.19.1-0", "", { "os": "darwin", "cpu": "arm64" }, "sha512-mjbsH7BNHEAmoE2SCJFcfk5fIHwFIpxtSgnEAqMsVLpBUFoEtAeX+LQ+N0vSFJB3WAh73+QYx/xSluxxLcL6dA=="], + + "@elm_binaries/darwin_x64": ["@elm_binaries/darwin_x64@0.19.1-0", "", { "os": "darwin", "cpu": "x64" }, "sha512-QGUtrZTPBzaxgi9al6nr+9313wrnUVHuijzUK39UsPS+pa+n6CmWyV/69sHZeX9qy6UfeugE0PzF3qcUiy2GDQ=="], + + "@elm_binaries/linux_x64": ["@elm_binaries/linux_x64@0.19.1-0", "", { "os": "linux", "cpu": "x64" }, "sha512-T1ZrWVhg2kKAsi8caOd3vp/1A3e21VuCpSG63x8rDie50fHbCytTway9B8WHEdnBFv4mYWiA68dzGxYCiFmU2w=="], + + "@elm_binaries/win32_x64": ["@elm_binaries/win32_x64@0.19.1-0", "", { "os": "win32", "cpu": "x64" }, "sha512-yDleiXqSE9EcqKtd9SkC/4RIW8I71YsXzMPL79ub2bBPHjWTcoyyeBbYjoOB9SxSlArJ74HaoBApzT6hY7Zobg=="], + + "@sindresorhus/is": ["@sindresorhus/is@4.6.0", "", {}, "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw=="], + + "@szmarczak/http-timer": ["@szmarczak/http-timer@4.0.6", "", { "dependencies": { "defer-to-connect": "^2.0.0" } }, "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w=="], + + "@types/cacheable-request": ["@types/cacheable-request@6.0.3", "", { "dependencies": { "@types/http-cache-semantics": "*", "@types/keyv": "^3.1.4", "@types/node": "*", "@types/responselike": "^1.0.0" } }, "sha512-IQ3EbTzGxIigb1I3qPZc1rWJnH0BmSKv5QYTalEwweFvyBDLSAe24zP0le/hyi7ecGfZVlIVAg4BZqb8WBwKqw=="], + + "@types/http-cache-semantics": ["@types/http-cache-semantics@4.0.4", "", {}, "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA=="], + + "@types/keyv": ["@types/keyv@3.1.4", "", { "dependencies": { "@types/node": "*" } }, "sha512-BQ5aZNSCpj7D6K2ksrRCTmKRLEpnPvWDiLPfoGyhZ++8YtiK9d/3DBKPJgry359X/P1PfruyYwvnvwFjuEiEIg=="], + + "@types/node": ["@types/node@25.0.9", "", { "dependencies": { "undici-types": "~7.16.0" } }, "sha512-/rpCXHlCWeqClNBwUhDcusJxXYDjZTyE8v5oTO7WbL8eij2nKhUeU89/6xgjU7N4/Vh3He0BtyhJdQbDyhiXAw=="], + + "@types/responselike": ["@types/responselike@1.0.3", "", { "dependencies": { "@types/node": "*" } }, "sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw=="], + + "ansi-escapes": ["ansi-escapes@4.3.2", "", { "dependencies": { "type-fest": "^0.21.3" } }, "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ=="], + + "ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="], + + "ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="], + + "anymatch": ["anymatch@3.1.3", "", { "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" } }, "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw=="], + + "balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="], + + "base64-js": ["base64-js@1.5.1", "", {}, "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="], + + "binary-extensions": ["binary-extensions@2.3.0", "", {}, "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw=="], + + "bl": ["bl@4.1.0", "", { "dependencies": { "buffer": "^5.5.0", "inherits": "^2.0.4", "readable-stream": "^3.4.0" } }, "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w=="], + + "brace-expansion": ["brace-expansion@1.1.12", "", { "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg=="], + + "braces": ["braces@3.0.3", "", { "dependencies": { "fill-range": "^7.1.1" } }, "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA=="], + + "buffer": ["buffer@5.7.1", "", { "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" } }, "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ=="], + + "cacheable-lookup": ["cacheable-lookup@5.0.4", "", {}, "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA=="], + + "cacheable-request": ["cacheable-request@7.0.4", "", { "dependencies": { "clone-response": "^1.0.2", "get-stream": "^5.1.0", "http-cache-semantics": "^4.0.0", "keyv": "^4.0.0", "lowercase-keys": "^2.0.0", "normalize-url": "^6.0.1", "responselike": "^2.0.0" } }, "sha512-v+p6ongsrp0yTGbJXjgxPow2+DL93DASP4kXCDKb8/bwRtt9OEF3whggkkDkGNzgcWy2XaF4a8nZglC7uElscg=="], + + "chalk": ["chalk@4.1.2", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="], + + "chokidar": ["chokidar@3.6.0", "", { "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", "readdirp": "~3.6.0" }, "optionalDependencies": { "fsevents": "~2.3.2" } }, "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw=="], + + "cli-cursor": ["cli-cursor@3.1.0", "", { "dependencies": { "restore-cursor": "^3.1.0" } }, "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw=="], + + "cli-spinners": ["cli-spinners@2.9.2", "", {}, "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg=="], + + "clone": ["clone@1.0.4", "", {}, "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg=="], + + "clone-response": ["clone-response@1.0.3", "", { "dependencies": { "mimic-response": "^1.0.0" } }, "sha512-ROoL94jJH2dUVML2Y/5PEDNaSHgeOdSDicUyS7izcF63G6sTc/FTjLub4b8Il9S8S0beOfYt0TaA5qvFK+w0wA=="], + + "color-convert": ["color-convert@2.0.1", "", { "dependencies": { "color-name": "~1.1.4" } }, "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="], + + "color-name": ["color-name@1.1.4", "", {}, "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="], + + "concat-map": ["concat-map@0.0.1", "", {}, "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg=="], + + "cross-spawn": ["cross-spawn@7.0.6", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="], + + "debug": ["debug@4.4.3", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA=="], + + "decompress-response": ["decompress-response@6.0.0", "", { "dependencies": { "mimic-response": "^3.1.0" } }, "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ=="], + + "defaults": ["defaults@1.0.4", "", { "dependencies": { "clone": "^1.0.2" } }, "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A=="], + + "defer-to-connect": ["defer-to-connect@2.0.1", "", {}, "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg=="], + + "elm": ["elm@0.19.1-6", "", { "optionalDependencies": { "@elm_binaries/darwin_arm64": "0.19.1-0", "@elm_binaries/darwin_x64": "0.19.1-0", "@elm_binaries/linux_x64": "0.19.1-0", "@elm_binaries/win32_x64": "0.19.1-0" }, "bin": { "elm": "bin/elm" } }, "sha512-mKYyierHICPdMx/vhiIacdPmTPnh889gjHOZ75ZAoCxo3lZmSWbGP8HMw78wyctJH0HwvTmeKhlYSWboQNYPeQ=="], + + "elm-format": ["elm-format@0.8.8", "", { "optionalDependencies": { "@avh4/elm-format-darwin-arm64": "0.8.8-1", "@avh4/elm-format-darwin-x64": "0.8.8-1", "@avh4/elm-format-linux-arm64": "0.8.8-1", "@avh4/elm-format-linux-x64": "0.8.8-1", "@avh4/elm-format-win32-x64": "0.8.8-1" }, "bin": { "elm-format": "bin/elm-format" } }, "sha512-OJYUtVnepuy8UZdnL5OCjSxUY5+dIGP2NdWTB6icxVVOOH0b8MpJIijTPsGW+ztnv9yzSoTK0dhCuVDh+AGhNQ=="], + + "elm-review": ["elm-review@2.13.5", "", { "dependencies": { "chalk": "^4.0.0", "chokidar": "^3.5.2", "cross-spawn": "^7.0.3", "elm-solve-deps-wasm": "^1.0.2 || ^2.0.0", "fastest-levenshtein": "^1.0.16", "find-up": "^4.1.0 || ^5.0.0", "folder-hash": "^3.3.0", "got": "^11.8.5", "graceful-fs": "^4.2.11", "minimist": "^1.2.6", "ora": "^5.4.0", "path-key": "^3.1.1", "prompts": "^2.2.1", "strip-ansi": "^6.0.0", "terminal-link": "^2.1.1", "tinyglobby": "^0.2.10", "which": "^2.0.2", "wrap-ansi": "^7.0.0" }, "bin": { "elm-review": "bin/elm-review" } }, "sha512-Iw3YztGjmuGyn4nIEVOxqx+dacJialprpB0ZVrBHA0sBBOQ9+QhBaQnQ0tp0G8U8UoIAush0M7XoBqzUN1F/+A=="], + + "elm-solve-deps-wasm": ["elm-solve-deps-wasm@2.0.0", "", {}, "sha512-11OV8FgB9qsth/F94q2SJjb1MoEgbworSyNM1L+YlxVoaxp7wtWPyA8cNcPEkSoIKG1B8Tqg68ED1P6dVamHSg=="], + + "elm-watch": ["elm-watch@2.0.0-beta.12", "", { "dependencies": { "chokidar": "^3.5.3", "cross-spawn": "^7.0.6", "tiny-decoders": "^23.0.0", "ws": "^8.18.0" }, "bin": { "elm-watch": "index.js" } }, "sha512-qIgi3gvEHzSdWDo7T12v1JR6vCXM3rrh5PPmjB3ZXdnYmc2ADvNKHt9+vAmoQNJVJcR/EIofAtHp/RpUgC8m3w=="], + + "emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="], + + "end-of-stream": ["end-of-stream@1.4.5", "", { "dependencies": { "once": "^1.4.0" } }, "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg=="], + + "fastest-levenshtein": ["fastest-levenshtein@1.0.16", "", {}, "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg=="], + + "fdir": ["fdir@6.5.0", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="], + + "fill-range": ["fill-range@7.1.1", "", { "dependencies": { "to-regex-range": "^5.0.1" } }, "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg=="], + + "find-up": ["find-up@5.0.0", "", { "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" } }, "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng=="], + + "folder-hash": ["folder-hash@3.3.3", "", { "dependencies": { "debug": "^4.1.1", "graceful-fs": "~4.2.0", "minimatch": "~3.0.4" }, "bin": { "folder-hash": "bin/folder-hash" } }, "sha512-SDgHBgV+RCjrYs8aUwCb9rTgbTVuSdzvFmLaChsLre1yf+D64khCW++VYciaByZ8Rm0uKF8R/XEpXuTRSGUM1A=="], + + "fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="], + + "get-stream": ["get-stream@5.2.0", "", { "dependencies": { "pump": "^3.0.0" } }, "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA=="], + + "glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="], + + "got": ["got@11.8.6", "", { "dependencies": { "@sindresorhus/is": "^4.0.0", "@szmarczak/http-timer": "^4.0.5", "@types/cacheable-request": "^6.0.1", "@types/responselike": "^1.0.0", "cacheable-lookup": "^5.0.3", "cacheable-request": "^7.0.2", "decompress-response": "^6.0.0", "http2-wrapper": "^1.0.0-beta.5.2", "lowercase-keys": "^2.0.0", "p-cancelable": "^2.0.0", "responselike": "^2.0.0" } }, "sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g=="], + + "graceful-fs": ["graceful-fs@4.2.11", "", {}, "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="], + + "has-flag": ["has-flag@4.0.0", "", {}, "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="], + + "http-cache-semantics": ["http-cache-semantics@4.2.0", "", {}, "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ=="], + + "http2-wrapper": ["http2-wrapper@1.0.3", "", { "dependencies": { "quick-lru": "^5.1.1", "resolve-alpn": "^1.0.0" } }, "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg=="], + + "ieee754": ["ieee754@1.2.1", "", {}, "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="], + + "inherits": ["inherits@2.0.4", "", {}, "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="], + + "is-binary-path": ["is-binary-path@2.1.0", "", { "dependencies": { "binary-extensions": "^2.0.0" } }, "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw=="], + + "is-extglob": ["is-extglob@2.1.1", "", {}, "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ=="], + + "is-fullwidth-code-point": ["is-fullwidth-code-point@3.0.0", "", {}, "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="], + + "is-glob": ["is-glob@4.0.3", "", { "dependencies": { "is-extglob": "^2.1.1" } }, "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg=="], + + "is-interactive": ["is-interactive@1.0.0", "", {}, "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w=="], + + "is-number": ["is-number@7.0.0", "", {}, "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="], + + "is-unicode-supported": ["is-unicode-supported@0.1.0", "", {}, "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw=="], + + "isexe": ["isexe@2.0.0", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="], + + "json-buffer": ["json-buffer@3.0.1", "", {}, "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ=="], + + "keyv": ["keyv@4.5.4", "", { "dependencies": { "json-buffer": "3.0.1" } }, "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw=="], + + "kleur": ["kleur@3.0.3", "", {}, "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w=="], + + "locate-path": ["locate-path@6.0.0", "", { "dependencies": { "p-locate": "^5.0.0" } }, "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw=="], + + "log-symbols": ["log-symbols@4.1.0", "", { "dependencies": { "chalk": "^4.1.0", "is-unicode-supported": "^0.1.0" } }, "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg=="], + + "lowercase-keys": ["lowercase-keys@2.0.0", "", {}, "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA=="], + + "mimic-fn": ["mimic-fn@2.1.0", "", {}, "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg=="], + + "mimic-response": ["mimic-response@3.1.0", "", {}, "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ=="], + + "minimatch": ["minimatch@3.0.8", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q=="], + + "minimist": ["minimist@1.2.8", "", {}, "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="], + + "ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="], + + "normalize-path": ["normalize-path@3.0.0", "", {}, "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="], + + "normalize-url": ["normalize-url@6.1.0", "", {}, "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A=="], + + "once": ["once@1.4.0", "", { "dependencies": { "wrappy": "1" } }, "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w=="], + + "onetime": ["onetime@5.1.2", "", { "dependencies": { "mimic-fn": "^2.1.0" } }, "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg=="], + + "ora": ["ora@5.4.1", "", { "dependencies": { "bl": "^4.1.0", "chalk": "^4.1.0", "cli-cursor": "^3.1.0", "cli-spinners": "^2.5.0", "is-interactive": "^1.0.0", "is-unicode-supported": "^0.1.0", "log-symbols": "^4.1.0", "strip-ansi": "^6.0.0", "wcwidth": "^1.0.1" } }, "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ=="], + + "p-cancelable": ["p-cancelable@2.1.1", "", {}, "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg=="], + + "p-limit": ["p-limit@3.1.0", "", { "dependencies": { "yocto-queue": "^0.1.0" } }, "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ=="], + + "p-locate": ["p-locate@5.0.0", "", { "dependencies": { "p-limit": "^3.0.2" } }, "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw=="], + + "path-exists": ["path-exists@4.0.0", "", {}, "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="], + + "path-key": ["path-key@3.1.1", "", {}, "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="], + + "picomatch": ["picomatch@4.0.3", "", {}, "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q=="], + + "prompts": ["prompts@2.4.2", "", { "dependencies": { "kleur": "^3.0.3", "sisteransi": "^1.0.5" } }, "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q=="], + + "pump": ["pump@3.0.3", "", { "dependencies": { "end-of-stream": "^1.1.0", "once": "^1.3.1" } }, "sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA=="], + + "quick-lru": ["quick-lru@5.1.1", "", {}, "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA=="], + + "readable-stream": ["readable-stream@3.6.2", "", { "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", "util-deprecate": "^1.0.1" } }, "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA=="], + + "readdirp": ["readdirp@3.6.0", "", { "dependencies": { "picomatch": "^2.2.1" } }, "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA=="], + + "resolve-alpn": ["resolve-alpn@1.2.1", "", {}, "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g=="], + + "responselike": ["responselike@2.0.1", "", { "dependencies": { "lowercase-keys": "^2.0.0" } }, "sha512-4gl03wn3hj1HP3yzgdI7d3lCkF95F21Pz4BPGvKHinyQzALR5CapwC8yIi0Rh58DEMQ/SguC03wFj2k0M/mHhw=="], + + "restore-cursor": ["restore-cursor@3.1.0", "", { "dependencies": { "onetime": "^5.1.0", "signal-exit": "^3.0.2" } }, "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA=="], + + "safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="], + + "shebang-command": ["shebang-command@2.0.0", "", { "dependencies": { "shebang-regex": "^3.0.0" } }, "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA=="], + + "shebang-regex": ["shebang-regex@3.0.0", "", {}, "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A=="], + + "signal-exit": ["signal-exit@3.0.7", "", {}, "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="], + + "sisteransi": ["sisteransi@1.0.5", "", {}, "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg=="], + + "string-width": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="], + + "string_decoder": ["string_decoder@1.3.0", "", { "dependencies": { "safe-buffer": "~5.2.0" } }, "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA=="], + + "strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="], + + "supports-color": ["supports-color@7.2.0", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="], + + "supports-hyperlinks": ["supports-hyperlinks@2.3.0", "", { "dependencies": { "has-flag": "^4.0.0", "supports-color": "^7.0.0" } }, "sha512-RpsAZlpWcDwOPQA22aCH4J0t7L8JmAvsCxfOSEwm7cQs3LshN36QaTkwd70DnBOXDWGssw2eUoc8CaRWT0XunA=="], + + "terminal-link": ["terminal-link@2.1.1", "", { "dependencies": { "ansi-escapes": "^4.2.1", "supports-hyperlinks": "^2.0.0" } }, "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ=="], + + "tiny-decoders": ["tiny-decoders@23.0.0", "", {}, "sha512-gQB+za3EW9JN1ASDmrVl1a1I6Q/jzg4M75YLI9ToHCdCW4/9KvBTTNH4u3kFbg8e+/8Zn68VRF+ayuiPNqYAmg=="], + + "tinyglobby": ["tinyglobby@0.2.15", "", { "dependencies": { "fdir": "^6.5.0", "picomatch": "^4.0.3" } }, "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ=="], + + "to-regex-range": ["to-regex-range@5.0.1", "", { "dependencies": { "is-number": "^7.0.0" } }, "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ=="], + + "type-fest": ["type-fest@0.21.3", "", {}, "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w=="], + + "undici-types": ["undici-types@7.16.0", "", {}, "sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw=="], + + "util-deprecate": ["util-deprecate@1.0.2", "", {}, "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="], + + "wcwidth": ["wcwidth@1.0.1", "", { "dependencies": { "defaults": "^1.0.3" } }, "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg=="], + + "which": ["which@2.0.2", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="], + + "wrap-ansi": ["wrap-ansi@7.0.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q=="], + + "wrappy": ["wrappy@1.0.2", "", {}, "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="], + + "ws": ["ws@8.19.0", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg=="], + + "yocto-queue": ["yocto-queue@0.1.0", "", {}, "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q=="], + + "anymatch/picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="], + + "clone-response/mimic-response": ["mimic-response@1.0.1", "", {}, "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ=="], + + "readdirp/picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="], + } +} diff --git a/elm-watch.json b/elm-watch.json new file mode 100644 index 00000000..09ee3630 --- /dev/null +++ b/elm-watch.json @@ -0,0 +1,9 @@ +{ + "targets": { + "Main": { + "inputs": ["src/elm/UI.elm"], + "output": "build/main.js" + } + }, + "serve": "." +} diff --git a/elm.json b/elm.json index bd158a7b..0a8e25b3 100644 --- a/elm.json +++ b/elm.json @@ -21,13 +21,12 @@ "elm-community/list-extra": "8.2.4", "elm-community/maybe-extra": "5.2.0", "elm-community/result-extra": "2.4.0", - "elm-explorations/test": "1.2.2", "lemol/ant-design-icons-elm-ui": "1.0.0", "miniBill/elm-codec": "2.0.0", - "miniBill/elm-ui-with-context": "1.0.0" + "miniBill/elm-ui-with-context": "1.0.0", + "miniBill/elm-unicode": "1.0.2" }, "indirect": { - "elm/random": "1.0.0", "elm/regex": "1.0.0", "elm/svg": "1.0.1", "elm/time": "1.0.0", @@ -38,7 +37,11 @@ } }, "test-dependencies": { - "direct": {}, - "indirect": {} + "direct": { + "elm-explorations/test": "1.2.2" + }, + "indirect": { + "elm/random": "1.0.0" + } } -} \ No newline at end of file +} diff --git a/index.html b/index.html new file mode 100644 index 00000000..8f9a8048 --- /dev/null +++ b/index.html @@ -0,0 +1,54 @@ + + + + + + nuPlot + + + + + + + + + + + + + + + + + +
+ + + + + + + + diff --git a/package.json b/package.json index 99657f00..1855de2d 100644 --- a/package.json +++ b/package.json @@ -15,23 +15,14 @@ ] }, "devDependencies": { - "elm": "^0.19.1-3", - "elm-hot": "^1.1.5", - "elm-optimize-level-2": "^0.1.5", - "elm-review": "^2.3.3", - "glslify-bundle": "^5.1.1", - "glslify-deps": "^1.3.2", - "node-elm-compiler": "^5.0.5", - "parcel-bundler": "^1.12.4", - "parcel-plugin-ogimage": "^1.2.0", - "parcel-plugin-pwa-manifest": "^3.0.10", - "parcel-plugin-static-files-copy": "^2.5.0", - "typescript": "^4.1.2" + "elm": "^0.19.1-6", + "elm-format": "^0.8.8", + "elm-review": "^2.13.5", + "elm-watch": "^2.0.0-beta.12" }, "scripts": { - "build": "rm -rf .cache dist elm-stuff; elm-optimize-level-2 src/elm/UI.elm --output src/optimized.js && parcel build src/index.html --public-url .", - "buildForBenchmark": "rm -rf .cache elm-stuff dist; elm-optimize-level-2 src/elm/UI.elm --output src/optimized.js && parcel build --no-minify src/index.html --public-url .", - "start": "parcel src/dev.html", + "build": "rm -rf dist; elm-watch make --optimize", + "start": "elm-watch hot", "test": "elm-test" }, "name": "nuplot", @@ -39,7 +30,7 @@ "pwaManifest": { "name": "NuPlot", "shortName": "NuPlot", - "startURL": ".", + "startURL": "./index.html", "theme": "#dcd0ff", "generateIconOptions": { "baseIcon": "./public/icon.svg", @@ -48,13 +39,15 @@ 384, 512 ], - "genFavicons": true + "genFavicons": true, + "purpose": [ + "any", + "maskable" + ] }, + "display": "standalone", "development": { "disabled": true } - }, - "dependencies": { - "localforage": "^1.9.0" } -} \ No newline at end of file +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml deleted file mode 100644 index 1164f706..00000000 --- a/pnpm-lock.yaml +++ /dev/null @@ -1,6914 +0,0 @@ -dependencies: - localforage: 1.9.0 -devDependencies: - elm: 0.19.1-3 - elm-hot: 1.1.5 - elm-optimize-level-2: 0.1.5 - elm-review: 2.3.3 - glslify-bundle: 5.1.1 - glslify-deps: 1.3.2 - node-elm-compiler: 5.0.5 - parcel-bundler: 1.12.4 - parcel-plugin-ogimage: 1.2.0 - parcel-plugin-pwa-manifest: 3.0.10_parcel-bundler@1.12.4 - parcel-plugin-static-files-copy: 2.5.0 - typescript: 4.1.2 -lockfileVersion: 5.2 -packages: - /@babel/code-frame/7.10.4: - dependencies: - '@babel/highlight': 7.10.4 - dev: true - resolution: - integrity: sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg== - /@babel/compat-data/7.12.7: - dev: true - resolution: - integrity: sha512-YaxPMGs/XIWtYqrdEOZOCPsVWfEoriXopnsz3/i7apYPXQ3698UFhS6dVT1KN5qOsWmVgw/FOrmQgpRaZayGsw== - /@babel/core/7.12.9: - dependencies: - '@babel/code-frame': 7.10.4 - '@babel/generator': 7.12.5 - '@babel/helper-module-transforms': 7.12.1 - '@babel/helpers': 7.12.5 - '@babel/parser': 7.12.7 - '@babel/template': 7.12.7 - '@babel/traverse': 7.12.9 - '@babel/types': 7.12.7 - convert-source-map: 1.7.0 - debug: 4.3.1 - gensync: 1.0.0-beta.2 - json5: 2.1.3 - lodash: 4.17.20 - resolve: 1.19.0 - semver: 5.7.1 - source-map: 0.5.7 - dev: true - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-gTXYh3M5wb7FRXQy+FErKFAv90BnlOuNn1QkCK2lREoPAjrQCO49+HVSrFoe5uakFAF5eenS75KbO2vQiLrTMQ== - /@babel/generator/7.12.5: - dependencies: - '@babel/types': 7.12.7 - jsesc: 2.5.2 - source-map: 0.5.7 - dev: true - resolution: - integrity: sha512-m16TQQJ8hPt7E+OS/XVQg/7U184MLXtvuGbCdA7na61vha+ImkyyNM/9DDA0unYCVZn3ZOhng+qz48/KBOT96A== - /@babel/helper-annotate-as-pure/7.10.4: - dependencies: - '@babel/types': 7.12.7 - dev: true - resolution: - integrity: sha512-XQlqKQP4vXFB7BN8fEEerrmYvHp3fK/rBkRFz9jaJbzK0B1DSfej9Kc7ZzE8Z/OnId1jpJdNAZ3BFQjWG68rcA== - /@babel/helper-builder-binary-assignment-operator-visitor/7.10.4: - dependencies: - '@babel/helper-explode-assignable-expression': 7.12.1 - '@babel/types': 7.12.7 - dev: true - resolution: - integrity: sha512-L0zGlFrGWZK4PbT8AszSfLTM5sDU1+Az/En9VrdT8/LmEiJt4zXt+Jve9DCAnQcbqDhCI+29y/L93mrDzddCcg== - /@babel/helper-builder-react-jsx-experimental/7.12.4: - dependencies: - '@babel/helper-annotate-as-pure': 7.10.4 - '@babel/helper-module-imports': 7.12.5 - '@babel/types': 7.12.7 - dev: true - resolution: - integrity: sha512-AjEa0jrQqNk7eDQOo0pTfUOwQBMF+xVqrausQwT9/rTKy0g04ggFNaJpaE09IQMn9yExluigWMJcj0WC7bq+Og== - /@babel/helper-builder-react-jsx/7.10.4: - dependencies: - '@babel/helper-annotate-as-pure': 7.10.4 - '@babel/types': 7.12.7 - dev: true - resolution: - integrity: sha512-5nPcIZ7+KKDxT1427oBivl9V9YTal7qk0diccnh7RrcgrT/pGFOjgGw1dgryyx1GvHEpXVfoDF6Ak3rTiWh8Rg== - /@babel/helper-compilation-targets/7.12.5_@babel+core@7.12.9: - dependencies: - '@babel/compat-data': 7.12.7 - '@babel/core': 7.12.9 - '@babel/helper-validator-option': 7.12.1 - browserslist: 4.15.0 - semver: 5.7.1 - dev: true - peerDependencies: - '@babel/core': ^7.0.0 - resolution: - integrity: sha512-+qH6NrscMolUlzOYngSBMIOQpKUGPPsc61Bu5W10mg84LxZ7cmvnBHzARKbDoFxVvqqAbj6Tg6N7bSrWSPXMyw== - /@babel/helper-create-class-features-plugin/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-function-name': 7.10.4 - '@babel/helper-member-expression-to-functions': 7.12.7 - '@babel/helper-optimise-call-expression': 7.12.7 - '@babel/helper-replace-supers': 7.12.5 - '@babel/helper-split-export-declaration': 7.11.0 - dev: true - peerDependencies: - '@babel/core': ^7.0.0 - resolution: - integrity: sha512-hkL++rWeta/OVOBTRJc9a5Azh5mt5WgZUGAKMD8JM141YsE08K//bp1unBBieO6rUKkIPyUE0USQ30jAy3Sk1w== - /@babel/helper-create-regexp-features-plugin/7.12.7_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-annotate-as-pure': 7.10.4 - regexpu-core: 4.7.1 - dev: true - peerDependencies: - '@babel/core': ^7.0.0 - resolution: - integrity: sha512-idnutvQPdpbduutvi3JVfEgcVIHooQnhvhx0Nk9isOINOIGYkZea1Pk2JlJRiUnMefrlvr0vkByATBY/mB4vjQ== - /@babel/helper-define-map/7.10.5: - dependencies: - '@babel/helper-function-name': 7.10.4 - '@babel/types': 7.12.7 - lodash: 4.17.20 - dev: true - resolution: - integrity: sha512-fMw4kgFB720aQFXSVaXr79pjjcW5puTCM16+rECJ/plGS+zByelE8l9nCpV1GibxTnFVmUuYG9U8wYfQHdzOEQ== - /@babel/helper-explode-assignable-expression/7.12.1: - dependencies: - '@babel/types': 7.12.7 - dev: true - resolution: - integrity: sha512-dmUwH8XmlrUpVqgtZ737tK88v07l840z9j3OEhCLwKTkjlvKpfqXVIZ0wpK3aeOxspwGrf/5AP5qLx4rO3w5rA== - /@babel/helper-function-name/7.10.4: - dependencies: - '@babel/helper-get-function-arity': 7.10.4 - '@babel/template': 7.12.7 - '@babel/types': 7.12.7 - dev: true - resolution: - integrity: sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ== - /@babel/helper-get-function-arity/7.10.4: - dependencies: - '@babel/types': 7.12.7 - dev: true - resolution: - integrity: sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A== - /@babel/helper-hoist-variables/7.10.4: - dependencies: - '@babel/types': 7.12.7 - dev: true - resolution: - integrity: sha512-wljroF5PgCk2juF69kanHVs6vrLwIPNp6DLD+Lrl3hoQ3PpPPikaDRNFA+0t81NOoMt2DL6WW/mdU8k4k6ZzuA== - /@babel/helper-member-expression-to-functions/7.12.7: - dependencies: - '@babel/types': 7.12.7 - dev: true - resolution: - integrity: sha512-DCsuPyeWxeHgh1Dus7APn7iza42i/qXqiFPWyBDdOFtvS581JQePsc1F/nD+fHrcswhLlRc2UpYS1NwERxZhHw== - /@babel/helper-module-imports/7.12.5: - dependencies: - '@babel/types': 7.12.7 - dev: true - resolution: - integrity: sha512-SR713Ogqg6++uexFRORf/+nPXMmWIn80TALu0uaFb+iQIUoR7bOC7zBWyzBs5b3tBBJXuyD0cRu1F15GyzjOWA== - /@babel/helper-module-transforms/7.12.1: - dependencies: - '@babel/helper-module-imports': 7.12.5 - '@babel/helper-replace-supers': 7.12.5 - '@babel/helper-simple-access': 7.12.1 - '@babel/helper-split-export-declaration': 7.11.0 - '@babel/helper-validator-identifier': 7.10.4 - '@babel/template': 7.12.7 - '@babel/traverse': 7.12.9 - '@babel/types': 7.12.7 - lodash: 4.17.20 - dev: true - resolution: - integrity: sha512-QQzehgFAZ2bbISiCpmVGfiGux8YVFXQ0abBic2Envhej22DVXV9nCFaS5hIQbkyo1AdGb+gNME2TSh3hYJVV/w== - /@babel/helper-optimise-call-expression/7.12.7: - dependencies: - '@babel/types': 7.12.7 - dev: true - resolution: - integrity: sha512-I5xc9oSJ2h59OwyUqjv95HRyzxj53DAubUERgQMrpcCEYQyToeHA+NEcUEsVWB4j53RDeskeBJ0SgRAYHDBckw== - /@babel/helper-plugin-utils/7.10.4: - dev: true - resolution: - integrity: sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg== - /@babel/helper-remap-async-to-generator/7.12.1: - dependencies: - '@babel/helper-annotate-as-pure': 7.10.4 - '@babel/helper-wrap-function': 7.12.3 - '@babel/types': 7.12.7 - dev: true - resolution: - integrity: sha512-9d0KQCRM8clMPcDwo8SevNs+/9a8yWVVmaE80FGJcEP8N1qToREmWEGnBn8BUlJhYRFz6fqxeRL1sl5Ogsed7A== - /@babel/helper-replace-supers/7.12.5: - dependencies: - '@babel/helper-member-expression-to-functions': 7.12.7 - '@babel/helper-optimise-call-expression': 7.12.7 - '@babel/traverse': 7.12.9 - '@babel/types': 7.12.7 - dev: true - resolution: - integrity: sha512-5YILoed0ZyIpF4gKcpZitEnXEJ9UoDRki1Ey6xz46rxOzfNMAhVIJMoune1hmPVxh40LRv1+oafz7UsWX+vyWA== - /@babel/helper-simple-access/7.12.1: - dependencies: - '@babel/types': 7.12.7 - dev: true - resolution: - integrity: sha512-OxBp7pMrjVewSSC8fXDFrHrBcJATOOFssZwv16F3/6Xtc138GHybBfPbm9kfiqQHKhYQrlamWILwlDCeyMFEaA== - /@babel/helper-skip-transparent-expression-wrappers/7.12.1: - dependencies: - '@babel/types': 7.12.7 - dev: true - resolution: - integrity: sha512-Mf5AUuhG1/OCChOJ/HcADmvcHM42WJockombn8ATJG3OnyiSxBK/Mm5x78BQWvmtXZKHgbjdGL2kin/HOLlZGA== - /@babel/helper-split-export-declaration/7.11.0: - dependencies: - '@babel/types': 7.12.7 - dev: true - resolution: - integrity: sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg== - /@babel/helper-validator-identifier/7.10.4: - dev: true - resolution: - integrity: sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw== - /@babel/helper-validator-option/7.12.1: - dev: true - resolution: - integrity: sha512-YpJabsXlJVWP0USHjnC/AQDTLlZERbON577YUVO/wLpqyj6HAtVYnWaQaN0iUN+1/tWn3c+uKKXjRut5115Y2A== - /@babel/helper-wrap-function/7.12.3: - dependencies: - '@babel/helper-function-name': 7.10.4 - '@babel/template': 7.12.7 - '@babel/traverse': 7.12.9 - '@babel/types': 7.12.7 - dev: true - resolution: - integrity: sha512-Cvb8IuJDln3rs6tzjW3Y8UeelAOdnpB8xtQ4sme2MSZ9wOxrbThporC0y/EtE16VAtoyEfLM404Xr1e0OOp+ow== - /@babel/helpers/7.12.5: - dependencies: - '@babel/template': 7.12.7 - '@babel/traverse': 7.12.9 - '@babel/types': 7.12.7 - dev: true - resolution: - integrity: sha512-lgKGMQlKqA8meJqKsW6rUnc4MdUk35Ln0ATDqdM1a/UpARODdI4j5Y5lVfUScnSNkJcdCRAaWkspykNoFg9sJA== - /@babel/highlight/7.10.4: - dependencies: - '@babel/helper-validator-identifier': 7.10.4 - chalk: 2.4.2 - js-tokens: 4.0.0 - dev: true - resolution: - integrity: sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA== - /@babel/parser/7.12.7: - dev: true - engines: - node: '>=6.0.0' - hasBin: true - resolution: - integrity: sha512-oWR02Ubp4xTLCAqPRiNIuMVgNO5Aif/xpXtabhzW2HWUD47XJsAB4Zd/Rg30+XeQA3juXigV7hlquOTmwqLiwg== - /@babel/plugin-proposal-async-generator-functions/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - '@babel/helper-remap-async-to-generator': 7.12.1 - '@babel/plugin-syntax-async-generators': 7.8.4_@babel+core@7.12.9 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-d+/o30tJxFxrA1lhzJqiUcEJdI6jKlNregCv5bASeGf2Q4MXmnwH7viDo7nhx1/ohf09oaH8j1GVYG/e3Yqk6A== - /@babel/plugin-proposal-class-properties/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-create-class-features-plugin': 7.12.1_@babel+core@7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-cKp3dlQsFsEs5CWKnN7BnSHOd0EOW8EKpEjkoz1pO2E5KzIDNV9Ros1b0CnmbVgAGXJubOYVBOGCT1OmJwOI7w== - /@babel/plugin-proposal-dynamic-import/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - '@babel/plugin-syntax-dynamic-import': 7.8.3_@babel+core@7.12.9 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-a4rhUSZFuq5W8/OO8H7BL5zspjnc1FLd9hlOxIK/f7qG4a0qsqk8uvF/ywgBA8/OmjsapjpvaEOYItfGG1qIvQ== - /@babel/plugin-proposal-export-namespace-from/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - '@babel/plugin-syntax-export-namespace-from': 7.8.3_@babel+core@7.12.9 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-6CThGf0irEkzujYS5LQcjBx8j/4aQGiVv7J9+2f7pGfxqyKh3WnmVJYW3hdrQjyksErMGBPQrCnHfOtna+WLbw== - /@babel/plugin-proposal-json-strings/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - '@babel/plugin-syntax-json-strings': 7.8.3_@babel+core@7.12.9 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-GoLDUi6U9ZLzlSda2Df++VSqDJg3CG+dR0+iWsv6XRw1rEq+zwt4DirM9yrxW6XWaTpmai1cWJLMfM8qQJf+yw== - /@babel/plugin-proposal-logical-assignment-operators/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4_@babel+core@7.12.9 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-k8ZmVv0JU+4gcUGeCDZOGd0lCIamU/sMtIiX3UWnUc5yzgq6YUGyEolNYD+MLYKfSzgECPcqetVcJP9Afe/aCA== - /@babel/plugin-proposal-nullish-coalescing-operator/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3_@babel+core@7.12.9 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-nZY0ESiaQDI1y96+jk6VxMOaL4LPo/QDHBqL+SF3/vl6dHkTwHlOI8L4ZwuRBHgakRBw5zsVylel7QPbbGuYgg== - /@babel/plugin-proposal-numeric-separator/7.12.7_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - '@babel/plugin-syntax-numeric-separator': 7.10.4_@babel+core@7.12.9 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-8c+uy0qmnRTeukiGsjLGy6uVs/TFjJchGXUeBqlG4VWYOdJWkhhVPdQ3uHwbmalfJwv2JsV0qffXP4asRfL2SQ== - /@babel/plugin-proposal-object-rest-spread/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - '@babel/plugin-syntax-object-rest-spread': 7.8.3_@babel+core@7.12.9 - '@babel/plugin-transform-parameters': 7.12.1_@babel+core@7.12.9 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-s6SowJIjzlhx8o7lsFx5zmY4At6CTtDvgNQDdPzkBQucle58A6b/TTeEBYtyDgmcXjUTM+vE8YOGHZzzbc/ioA== - /@babel/plugin-proposal-optional-catch-binding/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - '@babel/plugin-syntax-optional-catch-binding': 7.8.3_@babel+core@7.12.9 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-hFvIjgprh9mMw5v42sJWLI1lzU5L2sznP805zeT6rySVRA0Y18StRhDqhSxlap0oVgItRsB6WSROp4YnJTJz0g== - /@babel/plugin-proposal-optional-chaining/7.12.7_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - '@babel/helper-skip-transparent-expression-wrappers': 7.12.1 - '@babel/plugin-syntax-optional-chaining': 7.8.3_@babel+core@7.12.9 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-4ovylXZ0PWmwoOvhU2vhnzVNnm88/Sm9nx7V8BPgMvAzn5zDou3/Awy0EjglyubVHasJj+XCEkr/r1X3P5elCA== - /@babel/plugin-proposal-private-methods/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-create-class-features-plugin': 7.12.1_@babel+core@7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-mwZ1phvH7/NHK6Kf8LP7MYDogGV+DKB1mryFOEwx5EBNQrosvIczzZFTUmWaeujd5xT6G1ELYWUz3CutMhjE1w== - /@babel/plugin-proposal-unicode-property-regex/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-create-regexp-features-plugin': 7.12.7_@babel+core@7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - engines: - node: '>=4' - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-MYq+l+PvHuw/rKUz1at/vb6nCnQ2gmJBNaM62z0OgH7B2W1D9pvkpYtlti9bGtizNIU1K3zm4bZF9F91efVY0w== - /@babel/plugin-syntax-async-generators/7.8.4_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== - /@babel/plugin-syntax-class-properties/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-U40A76x5gTwmESz+qiqssqmeEsKvcSyvtgktrm0uzcARAmM9I1jR221f6Oq+GmHrcD+LvZDag1UTOTe2fL3TeA== - /@babel/plugin-syntax-dynamic-import/7.8.3_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ== - /@babel/plugin-syntax-export-namespace-from/7.8.3_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q== - /@babel/plugin-syntax-flow/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-1lBLLmtxrwpm4VKmtVFselI/P3pX+G63fAtUUt6b2Nzgao77KNDwyuRt90Mj2/9pKobtt68FdvjfqohZjg/FCA== - /@babel/plugin-syntax-json-strings/7.8.3_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== - /@babel/plugin-syntax-jsx/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-1yRi7yAtB0ETgxdY9ti/p2TivUxJkTdhu/ZbF9MshVGqOx1TdB3b7xCXs49Fupgg50N45KcAsRP/ZqWjs9SRjg== - /@babel/plugin-syntax-logical-assignment-operators/7.10.4_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== - /@babel/plugin-syntax-nullish-coalescing-operator/7.8.3_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== - /@babel/plugin-syntax-numeric-separator/7.10.4_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== - /@babel/plugin-syntax-object-rest-spread/7.8.3_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== - /@babel/plugin-syntax-optional-catch-binding/7.8.3_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== - /@babel/plugin-syntax-optional-chaining/7.8.3_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== - /@babel/plugin-syntax-top-level-await/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-i7ooMZFS+a/Om0crxZodrTzNEPJHZrlMVGMTEpFAj6rYY/bKCddB0Dk/YxfPuYXOopuhKk/e1jV6h+WUU9XN3A== - /@babel/plugin-transform-arrow-functions/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-5QB50qyN44fzzz4/qxDPQMBCTHgxg3n0xRBLJUmBlLoU/sFvxVWGZF/ZUfMVDQuJUKXaBhbupxIzIfZ6Fwk/0A== - /@babel/plugin-transform-async-to-generator/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-module-imports': 7.12.5 - '@babel/helper-plugin-utils': 7.10.4 - '@babel/helper-remap-async-to-generator': 7.12.1 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-SDtqoEcarK1DFlRJ1hHRY5HvJUj5kX4qmtpMAm2QnhOlyuMC4TMdCRgW6WXpv93rZeYNeLP22y8Aq2dbcDRM1A== - /@babel/plugin-transform-block-scoped-functions/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-5OpxfuYnSgPalRpo8EWGPzIYf0lHBWORCkj5M0oLBwHdlux9Ri36QqGW3/LR13RSVOAoUUMzoPI/jpE4ABcHoA== - /@babel/plugin-transform-block-scoping/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-zJyAC9sZdE60r1nVQHblcfCj29Dh2Y0DOvlMkcqSo0ckqjiCwNiUezUKw+RjOCwGfpLRwnAeQ2XlLpsnGkvv9w== - /@babel/plugin-transform-classes/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-annotate-as-pure': 7.10.4 - '@babel/helper-define-map': 7.10.5 - '@babel/helper-function-name': 7.10.4 - '@babel/helper-optimise-call-expression': 7.12.7 - '@babel/helper-plugin-utils': 7.10.4 - '@babel/helper-replace-supers': 7.12.5 - '@babel/helper-split-export-declaration': 7.11.0 - globals: 11.12.0 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-/74xkA7bVdzQTBeSUhLLJgYIcxw/dpEpCdRDiHgPJ3Mv6uC11UhjpOhl72CgqbBCmt1qtssCyB2xnJm1+PFjog== - /@babel/plugin-transform-computed-properties/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-vVUOYpPWB7BkgUWPo4C44mUQHpTZXakEqFjbv8rQMg7TC6S6ZhGZ3otQcRH6u7+adSlE5i0sp63eMC/XGffrzg== - /@babel/plugin-transform-destructuring/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-fRMYFKuzi/rSiYb2uRLiUENJOKq4Gnl+6qOv5f8z0TZXg3llUwUhsNNwrwaT/6dUhJTzNpBr+CUvEWBtfNY1cw== - /@babel/plugin-transform-dotall-regex/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-create-regexp-features-plugin': 7.12.7_@babel+core@7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-B2pXeRKoLszfEW7J4Hg9LoFaWEbr/kzo3teWHmtFCszjRNa/b40f9mfeqZsIDLLt/FjwQ6pz/Gdlwy85xNckBA== - /@babel/plugin-transform-duplicate-keys/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-iRght0T0HztAb/CazveUpUQrZY+aGKKaWXMJ4uf9YJtqxSUe09j3wteztCUDRHs+SRAL7yMuFqUsLoAKKzgXjw== - /@babel/plugin-transform-exponentiation-operator/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-builder-binary-assignment-operator-visitor': 7.10.4 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-7tqwy2bv48q+c1EHbXK0Zx3KXd2RVQp6OC7PbwFNt/dPTAV3Lu5sWtWuAj8owr5wqtWnqHfl2/mJlUmqkChKug== - /@babel/plugin-transform-flow-strip-types/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - '@babel/plugin-syntax-flow': 7.12.1_@babel+core@7.12.9 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-8hAtkmsQb36yMmEtk2JZ9JnVyDSnDOdlB+0nEGzIDLuK4yR3JcEjfuFPYkdEPSh8Id+rAMeBEn+X0iVEyho6Hg== - /@babel/plugin-transform-for-of/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-Zaeq10naAsuHo7heQvyV0ptj4dlZJwZgNAtBYBnu5nNKJoW62m0zKcIEyVECrUKErkUkg6ajMy4ZfnVZciSBhg== - /@babel/plugin-transform-function-name/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-function-name': 7.10.4 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-JF3UgJUILoFrFMEnOJLJkRHSk6LUSXLmEFsA23aR2O5CSLUxbeUX1IZ1YQ7Sn0aXb601Ncwjx73a+FVqgcljVw== - /@babel/plugin-transform-literals/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-+PxVGA+2Ag6uGgL0A5f+9rklOnnMccwEBzwYFL3EUaKuiyVnUipyXncFcfjSkbimLrODoqki1U9XxZzTvfN7IQ== - /@babel/plugin-transform-member-expression-literals/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-1sxePl6z9ad0gFMB9KqmYofk34flq62aqMt9NqliS/7hPEpURUCMbyHXrMPlo282iY7nAvUB1aQd5mg79UD9Jg== - /@babel/plugin-transform-modules-amd/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-module-transforms': 7.12.1 - '@babel/helper-plugin-utils': 7.10.4 - babel-plugin-dynamic-import-node: 2.3.3 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-tDW8hMkzad5oDtzsB70HIQQRBiTKrhfgwC/KkJeGsaNFTdWhKNt/BiE8c5yj19XiGyrxpbkOfH87qkNg1YGlOQ== - /@babel/plugin-transform-modules-commonjs/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-module-transforms': 7.12.1 - '@babel/helper-plugin-utils': 7.10.4 - '@babel/helper-simple-access': 7.12.1 - babel-plugin-dynamic-import-node: 2.3.3 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-dY789wq6l0uLY8py9c1B48V8mVL5gZh/+PQ5ZPrylPYsnAvnEMjqsUXkuoDVPeVK+0VyGar+D08107LzDQ6pag== - /@babel/plugin-transform-modules-systemjs/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-hoist-variables': 7.10.4 - '@babel/helper-module-transforms': 7.12.1 - '@babel/helper-plugin-utils': 7.10.4 - '@babel/helper-validator-identifier': 7.10.4 - babel-plugin-dynamic-import-node: 2.3.3 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-Hn7cVvOavVh8yvW6fLwveFqSnd7rbQN3zJvoPNyNaQSvgfKmDBO9U1YL9+PCXGRlZD9tNdWTy5ACKqMuzyn32Q== - /@babel/plugin-transform-modules-umd/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-module-transforms': 7.12.1 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-aEIubCS0KHKM0zUos5fIoQm+AZUMt1ZvMpqz0/H5qAQ7vWylr9+PLYurT+Ic7ID/bKLd4q8hDovaG3Zch2uz5Q== - /@babel/plugin-transform-named-capturing-groups-regex/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-create-regexp-features-plugin': 7.12.7_@babel+core@7.12.9 - dev: true - peerDependencies: - '@babel/core': ^7.0.0 - resolution: - integrity: sha512-tB43uQ62RHcoDp9v2Nsf+dSM8sbNodbEicbQNA53zHz8pWUhsgHSJCGpt7daXxRydjb0KnfmB+ChXOv3oADp1Q== - /@babel/plugin-transform-new-target/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-+eW/VLcUL5L9IvJH7rT1sT0CzkdUTvPrXC2PXTn/7z7tXLBuKvezYbGdxD5WMRoyvyaujOq2fWoKl869heKjhw== - /@babel/plugin-transform-object-super/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - '@babel/helper-replace-supers': 7.12.5 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-AvypiGJH9hsquNUn+RXVcBdeE3KHPZexWRdimhuV59cSoOt5kFBmqlByorAeUlGG2CJWd0U+4ZtNKga/TB0cAw== - /@babel/plugin-transform-parameters/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-xq9C5EQhdPK23ZeCdMxl8bbRnAgHFrw5EOC3KJUsSylZqdkCaFEXxGSBuTSObOpiiHHNyb82es8M1QYgfQGfNg== - /@babel/plugin-transform-property-literals/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-6MTCR/mZ1MQS+AwZLplX4cEySjCpnIF26ToWo942nqn8hXSm7McaHQNeGx/pt7suI1TWOWMfa/NgBhiqSnX0cQ== - /@babel/plugin-transform-react-jsx/7.12.7_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-builder-react-jsx': 7.10.4 - '@babel/helper-builder-react-jsx-experimental': 7.12.4 - '@babel/helper-plugin-utils': 7.10.4 - '@babel/plugin-syntax-jsx': 7.12.1_@babel+core@7.12.9 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-YFlTi6MEsclFAPIDNZYiCRbneg1MFGao9pPG9uD5htwE0vDbPaMUMeYd6itWjw7K4kro4UbdQf3ljmFl9y48dQ== - /@babel/plugin-transform-regenerator/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - regenerator-transform: 0.14.5 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-gYrHqs5itw6i4PflFX3OdBPMQdPbF4bj2REIUxlMRUFk0/ZOAIpDFuViuxPjUL7YC8UPnf+XG7/utJvqXdPKng== - /@babel/plugin-transform-reserved-words/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-pOnUfhyPKvZpVyBHhSBoX8vfA09b7r00Pmm1sH+29ae2hMTKVmSp4Ztsr8KBKjLjx17H0eJqaRC3bR2iThM54A== - /@babel/plugin-transform-shorthand-properties/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-GFZS3c/MhX1OusqB1MZ1ct2xRzX5ppQh2JU1h2Pnfk88HtFTM+TWQqJNfwkmxtPQtb/s1tk87oENfXJlx7rSDw== - /@babel/plugin-transform-spread/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - '@babel/helper-skip-transparent-expression-wrappers': 7.12.1 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-vuLp8CP0BE18zVYjsEBZ5xoCecMK6LBMMxYzJnh01rxQRvhNhH1csMMmBfNo5tGpGO+NhdSNW2mzIvBu3K1fng== - /@babel/plugin-transform-sticky-regex/7.12.7_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-VEiqZL5N/QvDbdjfYQBhruN0HYjSPjC4XkeqW4ny/jNtH9gcbgaqBIXYEZCNnESMAGs0/K/R7oFGMhOyu/eIxg== - /@babel/plugin-transform-template-literals/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-b4Zx3KHi+taXB1dVRBhVJtEPi9h1THCeKmae2qP0YdUHIFhVjtpqqNfxeVAa1xeHVhAy4SbHxEwx5cltAu5apw== - /@babel/plugin-transform-typeof-symbol/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-EPGgpGy+O5Kg5pJFNDKuxt9RdmTgj5sgrus2XVeMp/ZIbOESadgILUbm50SNpghOh3/6yrbsH+NB5+WJTmsA7Q== - /@babel/plugin-transform-unicode-escapes/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-I8gNHJLIc7GdApm7wkVnStWssPNbSRMPtgHdmH3sRM1zopz09UWPS4x5V4n1yz/MIWTVnJ9sp6IkuXdWM4w+2Q== - /@babel/plugin-transform-unicode-regex/7.12.1_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-create-regexp-features-plugin': 7.12.7_@babel+core@7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-SqH4ClNngh/zGwHZOOQMTD+e8FGWexILV+ePMyiDJttAWRh5dhDL8rcl5lSgU3Huiq6Zn6pWTMvdPAb21Dwdyg== - /@babel/preset-env/7.12.7_@babel+core@7.12.9: - dependencies: - '@babel/compat-data': 7.12.7 - '@babel/core': 7.12.9 - '@babel/helper-compilation-targets': 7.12.5_@babel+core@7.12.9 - '@babel/helper-module-imports': 7.12.5 - '@babel/helper-plugin-utils': 7.10.4 - '@babel/helper-validator-option': 7.12.1 - '@babel/plugin-proposal-async-generator-functions': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-proposal-class-properties': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-proposal-dynamic-import': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-proposal-export-namespace-from': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-proposal-json-strings': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-proposal-logical-assignment-operators': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-proposal-nullish-coalescing-operator': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-proposal-numeric-separator': 7.12.7_@babel+core@7.12.9 - '@babel/plugin-proposal-object-rest-spread': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-proposal-optional-catch-binding': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-proposal-optional-chaining': 7.12.7_@babel+core@7.12.9 - '@babel/plugin-proposal-private-methods': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-proposal-unicode-property-regex': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-syntax-async-generators': 7.8.4_@babel+core@7.12.9 - '@babel/plugin-syntax-class-properties': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-syntax-dynamic-import': 7.8.3_@babel+core@7.12.9 - '@babel/plugin-syntax-export-namespace-from': 7.8.3_@babel+core@7.12.9 - '@babel/plugin-syntax-json-strings': 7.8.3_@babel+core@7.12.9 - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4_@babel+core@7.12.9 - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3_@babel+core@7.12.9 - '@babel/plugin-syntax-numeric-separator': 7.10.4_@babel+core@7.12.9 - '@babel/plugin-syntax-object-rest-spread': 7.8.3_@babel+core@7.12.9 - '@babel/plugin-syntax-optional-catch-binding': 7.8.3_@babel+core@7.12.9 - '@babel/plugin-syntax-optional-chaining': 7.8.3_@babel+core@7.12.9 - '@babel/plugin-syntax-top-level-await': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-transform-arrow-functions': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-transform-async-to-generator': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-transform-block-scoped-functions': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-transform-block-scoping': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-transform-classes': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-transform-computed-properties': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-transform-destructuring': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-transform-dotall-regex': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-transform-duplicate-keys': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-transform-exponentiation-operator': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-transform-for-of': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-transform-function-name': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-transform-literals': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-transform-member-expression-literals': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-transform-modules-amd': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-transform-modules-commonjs': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-transform-modules-systemjs': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-transform-modules-umd': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-transform-named-capturing-groups-regex': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-transform-new-target': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-transform-object-super': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-transform-parameters': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-transform-property-literals': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-transform-regenerator': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-transform-reserved-words': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-transform-shorthand-properties': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-transform-spread': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-transform-sticky-regex': 7.12.7_@babel+core@7.12.9 - '@babel/plugin-transform-template-literals': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-transform-typeof-symbol': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-transform-unicode-escapes': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-transform-unicode-regex': 7.12.1_@babel+core@7.12.9 - '@babel/preset-modules': 0.1.4_@babel+core@7.12.9 - '@babel/types': 7.12.7 - core-js-compat: 3.8.1 - semver: 5.7.1 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-OnNdfAr1FUQg7ksb7bmbKoby4qFOHw6DKWWUNB9KqnnCldxhxJlP+21dpyaWFmf2h0rTbOkXJtAGevY3XW1eew== - /@babel/preset-modules/0.1.4_@babel+core@7.12.9: - dependencies: - '@babel/core': 7.12.9 - '@babel/helper-plugin-utils': 7.10.4 - '@babel/plugin-proposal-unicode-property-regex': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-transform-dotall-regex': 7.12.1_@babel+core@7.12.9 - '@babel/types': 7.12.7 - esutils: 2.0.3 - dev: true - peerDependencies: - '@babel/core': ^7.0.0-0 - resolution: - integrity: sha512-J36NhwnfdzpmH41M1DrnkkgAqhZaqr/NBdPfQ677mLzlaXo+oDiv1deyCDtgAhz8p328otdob0Du7+xgHGZbKg== - /@babel/runtime/7.12.5: - dependencies: - regenerator-runtime: 0.13.7 - dev: true - resolution: - integrity: sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg== - /@babel/template/7.12.7: - dependencies: - '@babel/code-frame': 7.10.4 - '@babel/parser': 7.12.7 - '@babel/types': 7.12.7 - dev: true - resolution: - integrity: sha512-GkDzmHS6GV7ZeXfJZ0tLRBhZcMcY0/Lnb+eEbXDBfCAcZCjrZKe6p3J4we/D24O9Y8enxWAg1cWwof59yLh2ow== - /@babel/traverse/7.12.9: - dependencies: - '@babel/code-frame': 7.10.4 - '@babel/generator': 7.12.5 - '@babel/helper-function-name': 7.10.4 - '@babel/helper-split-export-declaration': 7.11.0 - '@babel/parser': 7.12.7 - '@babel/types': 7.12.7 - debug: 4.3.1 - globals: 11.12.0 - lodash: 4.17.20 - dev: true - resolution: - integrity: sha512-iX9ajqnLdoU1s1nHt36JDI9KG4k+vmI8WgjK5d+aDTwQbL2fUnzedNedssA645Ede3PM2ma1n8Q4h2ohwXgMXw== - /@babel/types/7.12.7: - dependencies: - '@babel/helper-validator-identifier': 7.10.4 - lodash: 4.17.20 - to-fast-properties: 2.0.0 - dev: true - resolution: - integrity: sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ== - /@choojs/findup/0.2.1: - dependencies: - commander: 2.20.3 - dev: true - hasBin: true - resolution: - integrity: sha512-YstAqNb0MCN8PjdLCDfRsBcGVRN41f3vgLvaI0IrIcBp4AqILRSS0DeWNGkicC+f/zRIPJLc+9RURVSepwvfBw== - /@iarna/toml/2.2.5: - dev: true - resolution: - integrity: sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg== - /@mrmlnc/readdir-enhanced/2.2.1: - dependencies: - call-me-maybe: 1.0.1 - glob-to-regexp: 0.3.0 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g== - /@nodelib/fs.stat/1.1.3: - dev: true - engines: - node: '>= 6' - resolution: - integrity: sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== - /@parcel/fs/1.11.0: - dependencies: - '@parcel/utils': 1.11.0 - mkdirp: 0.5.5 - rimraf: 2.7.1 - dev: true - engines: - node: '>= 6.0.0' - resolution: - integrity: sha512-86RyEqULbbVoeo8OLcv+LQ1Vq2PKBAvWTU9fCgALxuCTbbs5Ppcvll4Vr+Ko1AnmMzja/k++SzNAwJfeQXVlpA== - /@parcel/logger/1.11.1: - dependencies: - '@parcel/workers': 1.11.0 - chalk: 2.4.2 - grapheme-breaker: 0.3.2 - ora: 2.1.0 - strip-ansi: 4.0.0 - dev: true - engines: - node: '>= 6.0.0' - resolution: - integrity: sha512-9NF3M6UVeP2udOBDILuoEHd8VrF4vQqoWHEafymO1pfSoOMfxrSJZw1MfyAAIUN/IFp9qjcpDCUbDZB+ioVevA== - /@parcel/utils/1.11.0: - dev: true - engines: - node: '>= 6.0.0' - resolution: - integrity: sha512-cA3p4jTlaMeOtAKR/6AadanOPvKeg8VwgnHhOyfi0yClD0TZS/hi9xu12w4EzA/8NtHu0g6o4RDfcNjqN8l1AQ== - /@parcel/watcher/1.12.1: - dependencies: - '@parcel/utils': 1.11.0 - chokidar: 2.1.8 - dev: true - resolution: - integrity: sha512-od+uCtCxC/KoNQAIE1vWx1YTyKYY+7CTrxBJPRh3cDWw/C0tCtlBMVlrbplscGoEpt6B27KhJDCv82PBxOERNA== - /@parcel/workers/1.11.0: - dependencies: - '@parcel/utils': 1.11.0 - physical-cpu-count: 2.0.0 - dev: true - engines: - node: '>= 6.0.0' - resolution: - integrity: sha512-USSjRAAQYsZFlv43FUPdD+jEGML5/8oLF0rUzPQTtK4q9kvaXr49F5ZplyLz5lox78cLZ0TxN2bIDQ1xhOkulQ== - /@pwa-manifest/core/1.4.1: - dependencies: - '@pwa-manifest/potrace': 1.0.0 - sharp: 0.25.4 - dev: true - engines: - node: '>=10' - resolution: - integrity: sha512-yygBNbSyomWjd03dmxO/YGho05VgXM1QVVO0iCpcKMmrq0TKKdAhdjWxSYHWr9RMT2tAFRNIjquf9tt8I8KDCQ== - /@pwa-manifest/potrace/1.0.0: - dependencies: - sharp: 0.25.4 - dev: true - engines: - node: '>=10' - resolution: - integrity: sha512-eTiEreR4UjQRN1QEaogZNYFAsrWLSOAhNCVAUYO/8a33b4g5nSkbbyrRSNCyx1jdTXq9NGpRfBtRhDJJqgO5Iw== - /@sindresorhus/is/2.1.1: - dev: true - engines: - node: '>=10' - resolution: - integrity: sha512-/aPsuoj/1Dw/kzhkgz+ES6TxG0zfTMGLwuK2ZG00k/iJzYHTLCE8mVU8EPqEOp/lmxPoq1C1C9RYToRKb2KEfg== - /@szmarczak/http-timer/4.0.5: - dependencies: - defer-to-connect: 2.0.0 - dev: true - engines: - node: '>=10' - resolution: - integrity: sha512-PyRA9sm1Yayuj5OIoJ1hGt2YISX45w9WcFbh6ddT0Z/0yaFxOtGLInr4jUfU1EAFVs0Yfyfev4RNwBlUaHdlDQ== - /@types/cacheable-request/6.0.1: - dependencies: - '@types/http-cache-semantics': 4.0.0 - '@types/keyv': 3.1.1 - '@types/node': 14.14.10 - '@types/responselike': 1.0.0 - dev: true - resolution: - integrity: sha512-ykFq2zmBGOCbpIXtoVbz4SKY5QriWPh3AjyU4G74RYbtt5yOc5OfaY75ftjg7mikMOla1CTGpX3lLbuJh8DTrQ== - /@types/http-cache-semantics/4.0.0: - dev: true - resolution: - integrity: sha512-c3Xy026kOF7QOTn00hbIllV1dLR9hG9NkSrLQgCVs8NF6sBU+VGWjD3wLPhmh1TYAc7ugCFsvHYMN4VcBN1U1A== - /@types/keyv/3.1.1: - dependencies: - '@types/node': 14.14.10 - dev: true - resolution: - integrity: sha512-MPtoySlAZQ37VoLaPcTHCu1RWJ4llDkULYZIzOYxlhxBqYPB0RsRlmMU0R6tahtFe27mIdkHV+551ZWV4PLmVw== - /@types/node/14.14.10: - dev: true - resolution: - integrity: sha512-J32dgx2hw8vXrSbu4ZlVhn1Nm3GbeCFNw2FWL8S5QKucHGY0cyNwjdQdO+KMBZ4wpmC7KhLCiNsdk1RFRIYUQQ== - /@types/q/1.5.4: - dev: true - resolution: - integrity: sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug== - /@types/responselike/1.0.0: - dependencies: - '@types/node': 14.14.10 - dev: true - resolution: - integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA== - /abab/2.0.5: - dev: true - resolution: - integrity: sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q== - /acorn-globals/4.3.4: - dependencies: - acorn: 6.4.2 - acorn-walk: 6.2.0 - dev: true - resolution: - integrity: sha512-clfQEh21R+D0leSbUdWf3OcfqyaCSAQ8Ryq00bofSekfr9W8u1jyYZo6ir0xu9Gtcf7BjcHJpnbZH7JOCpP60A== - /acorn-walk/6.2.0: - dev: true - engines: - node: '>=0.4.0' - resolution: - integrity: sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA== - /acorn/6.4.2: - dev: true - engines: - node: '>=0.4.0' - hasBin: true - resolution: - integrity: sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ== - /acorn/7.4.1: - dev: true - engines: - node: '>=0.4.0' - hasBin: true - resolution: - integrity: sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== - /ajv/6.12.6: - dependencies: - fast-deep-equal: 3.1.3 - fast-json-stable-stringify: 2.1.0 - json-schema-traverse: 0.4.1 - uri-js: 4.4.0 - dev: true - resolution: - integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - /alphanum-sort/1.0.2: - dev: true - resolution: - integrity: sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM= - /ansi-escapes/4.3.1: - dependencies: - type-fest: 0.11.0 - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA== - /ansi-regex/2.1.1: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-w7M6te42DYbg5ijwRorn7yfWVN8= - /ansi-regex/3.0.0: - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= - /ansi-regex/4.1.0: - dev: true - engines: - node: '>=6' - resolution: - integrity: sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== - /ansi-regex/5.0.0: - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== - /ansi-styles/2.2.1: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= - /ansi-styles/3.2.1: - dependencies: - color-convert: 1.9.3 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - /ansi-styles/4.3.0: - dependencies: - color-convert: 2.0.1 - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - /ansi-to-html/0.6.14: - dependencies: - entities: 1.1.2 - dev: true - hasBin: true - resolution: - integrity: sha512-7ZslfB1+EnFSDO5Ju+ue5Y6It19DRnZXWv8jrGHgIlPna5Mh4jz7BV5jCbQneXNFurQcKoolaaAjHtgSBfOIuA== - /anymatch/2.0.0: - dependencies: - micromatch: 3.1.10 - normalize-path: 2.1.1 - dev: true - resolution: - integrity: sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw== - /anymatch/3.1.1: - dependencies: - normalize-path: 3.0.0 - picomatch: 2.2.2 - dev: true - engines: - node: '>= 8' - resolution: - integrity: sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg== - /aproba/1.2.0: - dev: true - resolution: - integrity: sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== - /are-we-there-yet/1.1.5: - dependencies: - delegates: 1.0.0 - readable-stream: 2.3.7 - dev: true - resolution: - integrity: sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w== - /argparse/1.0.10: - dependencies: - sprintf-js: 1.0.3 - dev: true - resolution: - integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - /arr-diff/4.0.0: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= - /arr-flatten/1.1.0: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== - /arr-union/3.1.0: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= - /array-equal/1.0.0: - dev: true - resolution: - integrity: sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM= - /array-unique/0.3.2: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= - /asn1.js/5.4.1: - dependencies: - bn.js: 4.11.9 - inherits: 2.0.4 - minimalistic-assert: 1.0.1 - safer-buffer: 2.1.2 - dev: true - resolution: - integrity: sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA== - /asn1/0.2.4: - dependencies: - safer-buffer: 2.1.2 - dev: true - resolution: - integrity: sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== - /assert-plus/1.0.0: - dev: true - engines: - node: '>=0.8' - resolution: - integrity: sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= - /assert/1.5.0: - dependencies: - object-assign: 4.1.1 - util: 0.10.3 - dev: true - resolution: - integrity: sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA== - /assign-symbols/1.0.0: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= - /async-each/1.0.3: - dev: true - resolution: - integrity: sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== - /async-limiter/1.0.1: - dev: true - resolution: - integrity: sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== - /asynckit/0.4.0: - dev: true - resolution: - integrity: sha1-x57Zf380y48robyXkLzDZkdLS3k= - /at-least-node/1.0.0: - dev: true - engines: - node: '>= 4.0.0' - resolution: - integrity: sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== - /atob/2.1.2: - dev: true - engines: - node: '>= 4.5.0' - hasBin: true - resolution: - integrity: sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== - /aws-sign2/0.7.0: - dev: true - resolution: - integrity: sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= - /aws4/1.11.0: - dev: true - resolution: - integrity: sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== - /babel-plugin-dynamic-import-node/2.3.3: - dependencies: - object.assign: 4.1.2 - dev: true - resolution: - integrity: sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ== - /babel-runtime/6.26.0: - dependencies: - core-js: 2.6.12 - regenerator-runtime: 0.11.1 - dev: true - resolution: - integrity: sha1-llxwWGaOgrVde/4E/yM3vItWR/4= - /babel-types/6.26.0: - dependencies: - babel-runtime: 6.26.0 - esutils: 2.0.3 - lodash: 4.17.20 - to-fast-properties: 1.0.3 - dev: true - resolution: - integrity: sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc= - /babylon-walk/1.0.2: - dependencies: - babel-runtime: 6.26.0 - babel-types: 6.26.0 - lodash.clone: 4.5.0 - dev: true - resolution: - integrity: sha1-OxWl3btIKni0zpwByLoYFwLZ1s4= - /balanced-match/1.0.0: - dev: true - resolution: - integrity: sha1-ibTRmasr7kneFk6gK4nORi1xt2c= - /base/0.11.2: - dependencies: - cache-base: 1.0.1 - class-utils: 0.3.6 - component-emitter: 1.3.0 - define-property: 1.0.0 - isobject: 3.0.1 - mixin-deep: 1.3.2 - pascalcase: 0.1.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== - /base64-js/1.5.1: - dev: true - resolution: - integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== - /bcrypt-pbkdf/1.0.2: - dependencies: - tweetnacl: 0.14.5 - dev: true - resolution: - integrity: sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= - /binary-extensions/1.13.1: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw== - /binary-extensions/2.1.0: - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ== - /binary/0.3.0: - dependencies: - buffers: 0.1.1 - chainsaw: 0.1.0 - dev: true - resolution: - integrity: sha1-n2BVO8XOjDOG87VTz/R0Yq3sqnk= - /bindings/1.5.0: - dependencies: - file-uri-to-path: 1.0.0 - dev: true - resolution: - integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ== - /binwrap/0.2.2: - dependencies: - mustache: 3.2.1 - request: 2.88.2 - request-promise: 4.2.6_request@2.88.2 - tar: 4.4.13 - unzip-stream: 0.3.1 - dev: true - hasBin: true - resolution: - integrity: sha512-Y+Wvypk3JhH5GPZAvlwJAWOVH/OsOhQMSj37vySuWHwQivoALplPxfBA8b973rFJI7OS+O+1YmmYXIiEXVMAcw== - /bl/4.0.3: - dependencies: - buffer: 5.7.1 - inherits: 2.0.4 - readable-stream: 3.6.0 - dev: true - resolution: - integrity: sha512-fs4G6/Hu4/EE+F75J8DuN/0IpQqNjAdC7aEQv7Qt8MHGUH7Ckv2MwTEEeN9QehD0pfIDkMI1bkHYkKy7xHyKIg== - /bluebird/3.7.2: - dev: true - resolution: - integrity: sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== - /bn.js/4.11.9: - dev: true - resolution: - integrity: sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw== - /bn.js/5.1.3: - dev: true - resolution: - integrity: sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ== - /boolbase/1.0.0: - dev: true - resolution: - integrity: sha1-aN/1++YMUes3cl6p4+0xDcwed24= - /brace-expansion/1.1.11: - dependencies: - balanced-match: 1.0.0 - concat-map: 0.0.1 - dev: true - resolution: - integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - /braces/2.3.2: - dependencies: - arr-flatten: 1.1.0 - array-unique: 0.3.2 - extend-shallow: 2.0.1 - fill-range: 4.0.0 - isobject: 3.0.1 - repeat-element: 1.1.3 - snapdragon: 0.8.2 - snapdragon-node: 2.1.1 - split-string: 3.1.0 - to-regex: 3.0.2 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== - /braces/3.0.2: - dependencies: - fill-range: 7.0.1 - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - /brfs/1.6.1: - dependencies: - quote-stream: 1.0.2 - resolve: 1.19.0 - static-module: 2.2.5 - through2: 2.0.5 - dev: true - hasBin: true - resolution: - integrity: sha512-OfZpABRQQf+Xsmju8XE9bDjs+uU4vLREGolP7bDgcpsI17QREyZ4Bl+2KLxxx1kCgA0fAIhKQBaBYh+PEcCqYQ== - /brorand/1.1.0: - dev: true - resolution: - integrity: sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= - /browser-process-hrtime/1.0.0: - dev: true - resolution: - integrity: sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== - /browserify-aes/1.2.0: - dependencies: - buffer-xor: 1.0.3 - cipher-base: 1.0.4 - create-hash: 1.2.0 - evp_bytestokey: 1.0.3 - inherits: 2.0.4 - safe-buffer: 5.2.1 - dev: true - resolution: - integrity: sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== - /browserify-cipher/1.0.1: - dependencies: - browserify-aes: 1.2.0 - browserify-des: 1.0.2 - evp_bytestokey: 1.0.3 - dev: true - resolution: - integrity: sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== - /browserify-des/1.0.2: - dependencies: - cipher-base: 1.0.4 - des.js: 1.0.1 - inherits: 2.0.4 - safe-buffer: 5.2.1 - dev: true - resolution: - integrity: sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== - /browserify-rsa/4.1.0: - dependencies: - bn.js: 5.1.3 - randombytes: 2.1.0 - dev: true - resolution: - integrity: sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog== - /browserify-sign/4.2.1: - dependencies: - bn.js: 5.1.3 - browserify-rsa: 4.1.0 - create-hash: 1.2.0 - create-hmac: 1.1.7 - elliptic: 6.5.3 - inherits: 2.0.4 - parse-asn1: 5.1.6 - readable-stream: 3.6.0 - safe-buffer: 5.2.1 - dev: true - resolution: - integrity: sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg== - /browserify-zlib/0.2.0: - dependencies: - pako: 1.0.11 - dev: true - resolution: - integrity: sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA== - /browserslist/4.15.0: - dependencies: - caniuse-lite: 1.0.30001165 - colorette: 1.2.1 - electron-to-chromium: 1.3.616 - escalade: 3.1.1 - node-releases: 1.1.67 - dev: true - engines: - node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7 - hasBin: true - resolution: - integrity: sha512-IJ1iysdMkGmjjYeRlDU8PQejVwxvVO5QOfXH7ylW31GO6LwNRSmm/SgRXtNsEXqMLl2e+2H5eEJ7sfynF8TCaQ== - /buffer-equal/0.0.1: - dev: true - engines: - node: '>=0.4.0' - resolution: - integrity: sha1-kbx0sR6kBbyRa8aqkI+q+ltKrEs= - /buffer-from/1.1.1: - dev: true - resolution: - integrity: sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== - /buffer-xor/1.0.3: - dev: true - resolution: - integrity: sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= - /buffer/4.9.2: - dependencies: - base64-js: 1.5.1 - ieee754: 1.2.1 - isarray: 1.0.0 - dev: true - resolution: - integrity: sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg== - /buffer/5.7.1: - dependencies: - base64-js: 1.5.1 - ieee754: 1.2.1 - dev: true - resolution: - integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== - /buffers/0.1.1: - dev: true - engines: - node: '>=0.2.0' - resolution: - integrity: sha1-skV5w77U1tOWru5tmorn9Ugqt7s= - /builtin-status-codes/3.0.0: - dev: true - resolution: - integrity: sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug= - /cache-base/1.0.1: - dependencies: - collection-visit: 1.0.0 - component-emitter: 1.3.0 - get-value: 2.0.6 - has-value: 1.0.0 - isobject: 3.0.1 - set-value: 2.0.1 - to-object-path: 0.3.0 - union-value: 1.0.1 - unset-value: 1.0.0 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== - /cacheable-lookup/2.0.1: - dependencies: - '@types/keyv': 3.1.1 - keyv: 4.0.3 - dev: true - engines: - node: '>=10' - resolution: - integrity: sha512-EMMbsiOTcdngM/K6gV/OxF2x0t07+vMOWxZNSCRQMjO2MY2nhZQ6OYhOOpyQrbhqsgtvKGI7hcq6xjnA92USjg== - /cacheable-request/7.0.1: - dependencies: - clone-response: 1.0.2 - get-stream: 5.2.0 - http-cache-semantics: 4.1.0 - keyv: 4.0.3 - lowercase-keys: 2.0.0 - normalize-url: 4.5.0 - responselike: 2.0.0 - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-lt0mJ6YAnsrBErpTMWeu5kl/tg9xMAWjavYTN6VQXM1A/teBITuNcccXsCxF0tDQQJf9DfAaX5O4e0zp0KlfZw== - /call-bind/1.0.0: - dependencies: - function-bind: 1.1.1 - get-intrinsic: 1.0.1 - dev: true - resolution: - integrity: sha512-AEXsYIyyDY3MCzbwdhzG3Jx1R0J2wetQyUynn6dYHAO+bg8l1k7jwZtRv4ryryFs7EP+NDlikJlVe59jr0cM2w== - /call-me-maybe/1.0.1: - dev: true - resolution: - integrity: sha1-JtII6onje1y95gJQoV8DHBak1ms= - /caller-callsite/2.0.0: - dependencies: - callsites: 2.0.0 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ= - /caller-path/2.0.0: - dependencies: - caller-callsite: 2.0.0 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ= - /callsites/2.0.0: - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA= - /caniuse-api/3.0.0: - dependencies: - browserslist: 4.15.0 - caniuse-lite: 1.0.30001165 - lodash.memoize: 4.1.2 - lodash.uniq: 4.5.0 - dev: true - resolution: - integrity: sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw== - /caniuse-lite/1.0.30001165: - dev: true - resolution: - integrity: sha512-8cEsSMwXfx7lWSUMA2s08z9dIgsnR5NAqjXP23stdsU3AUWkCr/rr4s4OFtHXn5XXr6+7kam3QFVoYyXNPdJPA== - /caseless/0.12.0: - dev: true - resolution: - integrity: sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= - /chainsaw/0.1.0: - dependencies: - traverse: 0.3.9 - dev: true - resolution: - integrity: sha1-XqtQsor+WAdNDVgpE4iCi15fvJg= - /chalk/1.1.3: - dependencies: - ansi-styles: 2.2.1 - escape-string-regexp: 1.0.5 - has-ansi: 2.0.0 - strip-ansi: 3.0.1 - supports-color: 2.0.0 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= - /chalk/2.4.2: - dependencies: - ansi-styles: 3.2.1 - escape-string-regexp: 1.0.5 - supports-color: 5.5.0 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - /chalk/3.0.0: - dependencies: - ansi-styles: 4.3.0 - supports-color: 7.2.0 - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== - /chalk/4.1.0: - dependencies: - ansi-styles: 4.3.0 - supports-color: 7.2.0 - dev: true - engines: - node: '>=10' - resolution: - integrity: sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== - /chokidar/2.1.8: - dependencies: - anymatch: 2.0.0 - async-each: 1.0.3 - braces: 2.3.2 - glob-parent: 3.1.0 - inherits: 2.0.4 - is-binary-path: 1.0.1 - is-glob: 4.0.1 - normalize-path: 3.0.0 - path-is-absolute: 1.0.1 - readdirp: 2.2.1 - upath: 1.2.0 - deprecated: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. - dev: true - optionalDependencies: - fsevents: 1.2.13 - resolution: - integrity: sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== - /chokidar/3.4.3: - dependencies: - anymatch: 3.1.1 - braces: 3.0.2 - glob-parent: 5.1.1 - is-binary-path: 2.1.0 - is-glob: 4.0.1 - normalize-path: 3.0.0 - readdirp: 3.5.0 - dev: true - engines: - node: '>= 8.10.0' - optionalDependencies: - fsevents: 2.1.3 - resolution: - integrity: sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ== - /chownr/1.1.4: - dev: true - resolution: - integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== - /chownr/2.0.0: - dev: true - engines: - node: '>=10' - resolution: - integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== - /cipher-base/1.0.4: - dependencies: - inherits: 2.0.4 - safe-buffer: 5.2.1 - dev: true - resolution: - integrity: sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== - /class-utils/0.3.6: - dependencies: - arr-union: 3.1.0 - define-property: 0.2.5 - isobject: 3.0.1 - static-extend: 0.1.2 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== - /cli-cursor/2.1.0: - dependencies: - restore-cursor: 2.0.0 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU= - /cli-cursor/3.1.0: - dependencies: - restore-cursor: 3.1.0 - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== - /cli-spinners/1.3.1: - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-1QL4544moEsDVH9T/l6Cemov/37iv1RtoKf7NJ04A60+4MREXNfx/QvavbH6QoGdsD4N4Mwy49cmaINR/o2mdg== - /cli-spinners/2.5.0: - dev: true - engines: - node: '>=6' - resolution: - integrity: sha512-PC+AmIuK04E6aeSs/pUccSujsTzBhu4HzC2dL+CfJB/Jcc2qTRbEwZQDfIUpt2Xl8BodYBEq8w4fc0kU2I9DjQ== - /clone-response/1.0.2: - dependencies: - mimic-response: 1.0.1 - dev: true - resolution: - integrity: sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= - /clone/1.0.4: - dev: true - engines: - node: '>=0.8' - resolution: - integrity: sha1-2jCcwmPfFZlMaIypAheco8fNfH4= - /clone/2.1.2: - dev: true - engines: - node: '>=0.8' - resolution: - integrity: sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18= - /coa/2.0.2: - dependencies: - '@types/q': 1.5.4 - chalk: 2.4.2 - q: 1.5.1 - dev: true - engines: - node: '>= 4.0' - resolution: - integrity: sha512-q5/jG+YQnSy4nRTV4F7lPepBJZ8qBNJJDBuJdoejDyLXgmL7IEo+Le2JDZudFTFt7mrCqIRaSjws4ygRCTCAXA== - /code-point-at/1.1.0: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= - /collection-visit/1.0.0: - dependencies: - map-visit: 1.0.0 - object-visit: 1.0.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= - /color-convert/1.9.3: - dependencies: - color-name: 1.1.3 - dev: true - resolution: - integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - /color-convert/2.0.1: - dependencies: - color-name: 1.1.4 - dev: true - engines: - node: '>=7.0.0' - resolution: - integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - /color-name/1.1.3: - dev: true - resolution: - integrity: sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= - /color-name/1.1.4: - dev: true - resolution: - integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - /color-string/1.5.4: - dependencies: - color-name: 1.1.4 - simple-swizzle: 0.2.2 - dev: true - resolution: - integrity: sha512-57yF5yt8Xa3czSEW1jfQDE79Idk0+AkN/4KWad6tbdxUmAs3MvjxlWSWD4deYytcRfoZ9nhKyFl1kj5tBvidbw== - /color/3.1.3: - dependencies: - color-convert: 1.9.3 - color-string: 1.5.4 - dev: true - resolution: - integrity: sha512-xgXAcTHa2HeFCGLE9Xs/R82hujGtu9Jd9x4NW3T34+OMs7VoPsjwzRczKHvTAHeJwWFwX5j15+MgAppE8ztObQ== - /colorette/1.2.1: - dev: true - resolution: - integrity: sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw== - /combined-stream/1.0.8: - dependencies: - delayed-stream: 1.0.0 - dev: true - engines: - node: '>= 0.8' - resolution: - integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - /command-exists/1.2.9: - dev: true - resolution: - integrity: sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w== - /commander/2.20.3: - dev: true - resolution: - integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - /commander/5.1.0: - dev: true - engines: - node: '>= 6' - resolution: - integrity: sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg== - /commander/6.2.0: - dev: true - engines: - node: '>= 6' - resolution: - integrity: sha512-zP4jEKbe8SHzKJYQmq8Y9gYjtO/POJLgIdKgV7B9qNmABVFVc+ctqSX6iXh4mCpJfRBOabiZ2YKPg8ciDw6C+Q== - /component-emitter/1.3.0: - dev: true - resolution: - integrity: sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== - /concat-map/0.0.1: - dev: true - resolution: - integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= - /concat-stream/1.6.2: - dependencies: - buffer-from: 1.1.1 - inherits: 2.0.4 - readable-stream: 2.3.7 - typedarray: 0.0.6 - dev: true - engines: - '0': node >= 0.8 - resolution: - integrity: sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== - /console-browserify/1.2.0: - dev: true - resolution: - integrity: sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA== - /console-control-strings/1.1.0: - dev: true - resolution: - integrity: sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= - /constants-browserify/1.0.0: - dev: true - resolution: - integrity: sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= - /convert-source-map/1.7.0: - dependencies: - safe-buffer: 5.1.2 - dev: true - resolution: - integrity: sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== - /copy-descriptor/0.1.1: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= - /core-js-compat/3.8.1: - dependencies: - browserslist: 4.15.0 - semver: 7.0.0 - dev: true - resolution: - integrity: sha512-a16TLmy9NVD1rkjUGbwuyWkiDoN0FDpAwrfLONvHFQx0D9k7J9y0srwMT8QP/Z6HE3MIFaVynEeYwZwPX1o5RQ== - /core-js/2.6.12: - deprecated: 'core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.' - dev: true - requiresBuild: true - resolution: - integrity: sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== - /core-util-is/1.0.2: - dev: true - resolution: - integrity: sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= - /cosmiconfig/5.2.1: - dependencies: - import-fresh: 2.0.0 - is-directory: 0.3.1 - js-yaml: 3.14.0 - parse-json: 4.0.0 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA== - /create-ecdh/4.0.4: - dependencies: - bn.js: 4.11.9 - elliptic: 6.5.3 - dev: true - resolution: - integrity: sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A== - /create-hash/1.2.0: - dependencies: - cipher-base: 1.0.4 - inherits: 2.0.4 - md5.js: 1.3.5 - ripemd160: 2.0.2 - sha.js: 2.4.11 - dev: true - resolution: - integrity: sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== - /create-hmac/1.1.7: - dependencies: - cipher-base: 1.0.4 - create-hash: 1.2.0 - inherits: 2.0.4 - ripemd160: 2.0.2 - safe-buffer: 5.2.1 - sha.js: 2.4.11 - dev: true - resolution: - integrity: sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== - /cross-spawn-promise/0.10.2: - dependencies: - cross-spawn: 5.1.0 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-74PXJf6DYaab2klRS+D+9qxKJL1Weo3/ao9OPoH6NFzxtINSa/HE2mcyAPu1fpEmRTPD4Gdmpg3xEXQSgI8lpg== - /cross-spawn/5.1.0: - dependencies: - lru-cache: 4.1.5 - shebang-command: 1.2.0 - which: 1.3.1 - dev: true - resolution: - integrity: sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= - /cross-spawn/6.0.5: - dependencies: - nice-try: 1.0.5 - path-key: 2.0.1 - semver: 5.7.1 - shebang-command: 1.2.0 - which: 1.3.1 - dev: true - engines: - node: '>=4.8' - resolution: - integrity: sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== - /cross-spawn/7.0.3: - dependencies: - path-key: 3.1.1 - shebang-command: 2.0.0 - which: 2.0.2 - dev: true - engines: - node: '>= 8' - resolution: - integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== - /crypto-browserify/3.12.0: - dependencies: - browserify-cipher: 1.0.1 - browserify-sign: 4.2.1 - create-ecdh: 4.0.4 - create-hash: 1.2.0 - create-hmac: 1.1.7 - diffie-hellman: 5.0.3 - inherits: 2.0.4 - pbkdf2: 3.1.1 - public-encrypt: 4.0.3 - randombytes: 2.1.0 - randomfill: 1.0.4 - dev: true - resolution: - integrity: sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== - /css-color-names/0.0.4: - dev: true - resolution: - integrity: sha1-gIrcLnnPhHOAabZGyyDsJ762KeA= - /css-declaration-sorter/4.0.1: - dependencies: - postcss: 7.0.35 - timsort: 0.3.0 - dev: true - engines: - node: '>4' - resolution: - integrity: sha512-BcxQSKTSEEQUftYpBVnsH4SF05NTuBokb19/sBt6asXGKZ/6VP7PLG1CBCkFDYOnhXhPh0jMhO6xZ71oYHXHBA== - /css-modules-loader-core/1.1.0: - dependencies: - icss-replace-symbols: 1.1.0 - postcss: 6.0.1 - postcss-modules-extract-imports: 1.1.0 - postcss-modules-local-by-default: 1.2.0 - postcss-modules-scope: 1.1.0 - postcss-modules-values: 1.3.0 - dev: true - resolution: - integrity: sha1-WQhmgpShvs0mGuCkziGwtVHyHRY= - /css-select-base-adapter/0.1.1: - dev: true - resolution: - integrity: sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w== - /css-select/2.1.0: - dependencies: - boolbase: 1.0.0 - css-what: 3.4.2 - domutils: 1.7.0 - nth-check: 1.0.2 - dev: true - resolution: - integrity: sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ== - /css-selector-tokenizer/0.7.3: - dependencies: - cssesc: 3.0.0 - fastparse: 1.1.2 - dev: true - resolution: - integrity: sha512-jWQv3oCEL5kMErj4wRnK/OPoBi0D+P1FR2cDCKYPaMeD2eW3/mttav8HT4hT1CKopiJI/psEULjkClhvJo4Lvg== - /css-tree/1.0.0-alpha.37: - dependencies: - mdn-data: 2.0.4 - source-map: 0.6.1 - dev: true - engines: - node: '>=8.0.0' - resolution: - integrity: sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg== - /css-tree/1.1.2: - dependencies: - mdn-data: 2.0.14 - source-map: 0.6.1 - dev: true - engines: - node: '>=8.0.0' - resolution: - integrity: sha512-wCoWush5Aeo48GLhfHPbmvZs59Z+M7k5+B1xDnXbdWNcEF423DoFdqSWE0PM5aNk5nI5cp1q7ms36zGApY/sKQ== - /css-what/3.4.2: - dev: true - engines: - node: '>= 6' - resolution: - integrity: sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ== - /cssesc/3.0.0: - dev: true - engines: - node: '>=4' - hasBin: true - resolution: - integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== - /cssnano-preset-default/4.0.7: - dependencies: - css-declaration-sorter: 4.0.1 - cssnano-util-raw-cache: 4.0.1 - postcss: 7.0.35 - postcss-calc: 7.0.5 - postcss-colormin: 4.0.3 - postcss-convert-values: 4.0.1 - postcss-discard-comments: 4.0.2 - postcss-discard-duplicates: 4.0.2 - postcss-discard-empty: 4.0.1 - postcss-discard-overridden: 4.0.1 - postcss-merge-longhand: 4.0.11 - postcss-merge-rules: 4.0.3 - postcss-minify-font-values: 4.0.2 - postcss-minify-gradients: 4.0.2 - postcss-minify-params: 4.0.2 - postcss-minify-selectors: 4.0.2 - postcss-normalize-charset: 4.0.1 - postcss-normalize-display-values: 4.0.2 - postcss-normalize-positions: 4.0.2 - postcss-normalize-repeat-style: 4.0.2 - postcss-normalize-string: 4.0.2 - postcss-normalize-timing-functions: 4.0.2 - postcss-normalize-unicode: 4.0.1 - postcss-normalize-url: 4.0.1 - postcss-normalize-whitespace: 4.0.2 - postcss-ordered-values: 4.1.2 - postcss-reduce-initial: 4.0.3 - postcss-reduce-transforms: 4.0.2 - postcss-svgo: 4.0.2 - postcss-unique-selectors: 4.0.1 - dev: true - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-x0YHHx2h6p0fCl1zY9L9roD7rnlltugGu7zXSKQx6k2rYw0Hi3IqxcoAGF7u9Q5w1nt7vK0ulxV8Lo+EvllGsA== - /cssnano-util-get-arguments/4.0.0: - dev: true - engines: - node: '>=6.9.0' - resolution: - integrity: sha1-7ToIKZ8h11dBsg87gfGU7UnMFQ8= - /cssnano-util-get-match/4.0.0: - dev: true - engines: - node: '>=6.9.0' - resolution: - integrity: sha1-wOTKB/U4a7F+xeUiULT1lhNlFW0= - /cssnano-util-raw-cache/4.0.1: - dependencies: - postcss: 7.0.35 - dev: true - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-qLuYtWK2b2Dy55I8ZX3ky1Z16WYsx544Q0UWViebptpwn/xDBmog2TLg4f+DBMg1rJ6JDWtn96WHbOKDWt1WQA== - /cssnano-util-same-parent/4.0.1: - dev: true - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-WcKx5OY+KoSIAxBW6UBBRay1U6vkYheCdjyVNDm85zt5K9mHoGOfsOsqIszfAqrQQFIIKgjh2+FDgIj/zsl21Q== - /cssnano/4.1.10: - dependencies: - cosmiconfig: 5.2.1 - cssnano-preset-default: 4.0.7 - is-resolvable: 1.1.0 - postcss: 7.0.35 - dev: true - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-5wny+F6H4/8RgNlaqab4ktc3e0/blKutmq8yNlBFXA//nSFFAqAngjNVRzUvCgYROULmZZUoosL/KSoZo5aUaQ== - /csso/4.2.0: - dependencies: - css-tree: 1.1.2 - dev: true - engines: - node: '>=8.0.0' - resolution: - integrity: sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA== - /cssom/0.3.8: - dev: true - resolution: - integrity: sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== - /cssstyle/1.4.0: - dependencies: - cssom: 0.3.8 - dev: true - resolution: - integrity: sha512-GBrLZYZ4X4x6/QEoBnIrqb8B/f5l4+8me2dkom/j1Gtbxy0kBv6OGzKuAsGM75bkGwGAFkt56Iwg28S3XTZgSA== - /dashdash/1.14.1: - dependencies: - assert-plus: 1.0.0 - dev: true - engines: - node: '>=0.10' - resolution: - integrity: sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= - /data-urls/1.1.0: - dependencies: - abab: 2.0.5 - whatwg-mimetype: 2.3.0 - whatwg-url: 7.1.0 - dev: true - resolution: - integrity: sha512-YTWYI9se1P55u58gL5GkQHW4P6VJBJ5iBT+B5a7i2Tjadhv52paJG0qHX4A0OR6/t52odI64KP2YvFpkDOi3eQ== - /deasync/0.1.21: - dependencies: - bindings: 1.5.0 - node-addon-api: 1.7.2 - dev: true - engines: - node: '>=0.11.0' - requiresBuild: true - resolution: - integrity: sha512-kUmM8Y+PZpMpQ+B4AuOW9k2Pfx/mSupJtxOsLzmnHY2WqZUYRFccFn2RhzPAqt3Xb+sorK/badW2D4zNzqZz5w== - /debug/2.6.9: - dependencies: - ms: 2.0.0 - dev: true - resolution: - integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - /debug/4.3.1: - dependencies: - ms: 2.1.2 - dev: true - engines: - node: '>=6.0' - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - resolution: - integrity: sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== - /decode-uri-component/0.2.0: - dev: true - engines: - node: '>=0.10' - resolution: - integrity: sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= - /decompress-response/4.2.1: - dependencies: - mimic-response: 2.1.0 - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw== - /decompress-response/5.0.0: - dependencies: - mimic-response: 2.1.0 - dev: true - engines: - node: '>=10' - resolution: - integrity: sha512-TLZWWybuxWgoW7Lykv+gq9xvzOsUjQ9tF09Tj6NSTYGMTCHNXzrPnD6Hi+TgZq19PyTAGH4Ll/NIM/eTGglnMw== - /decompress-response/6.0.0: - dependencies: - mimic-response: 3.1.0 - dev: true - engines: - node: '>=10' - resolution: - integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ== - /deep-extend/0.6.0: - dev: true - engines: - node: '>=4.0.0' - resolution: - integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== - /deep-is/0.1.3: - dev: true - resolution: - integrity: sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= - /defaults/1.0.3: - dependencies: - clone: 1.0.4 - dev: true - resolution: - integrity: sha1-xlYFHpgX2f8I7YgUd/P+QBnz730= - /defer-to-connect/2.0.0: - dev: true - engines: - node: '>=10' - resolution: - integrity: sha512-bYL2d05vOSf1JEZNx5vSAtPuBMkX8K9EUutg7zlKvTqKXHt7RhWJFbmd7qakVuf13i+IkGmp6FwSsONOf6VYIg== - /define-properties/1.1.3: - dependencies: - object-keys: 1.1.1 - dev: true - engines: - node: '>= 0.4' - resolution: - integrity: sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== - /define-property/0.2.5: - dependencies: - is-descriptor: 0.1.6 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= - /define-property/1.0.0: - dependencies: - is-descriptor: 1.0.2 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-dp66rz9KY6rTr56NMEybvnm/sOY= - /define-property/2.0.2: - dependencies: - is-descriptor: 1.0.2 - isobject: 3.0.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== - /delayed-stream/1.0.0: - dev: true - engines: - node: '>=0.4.0' - resolution: - integrity: sha1-3zrhmayt+31ECqrgsp4icrJOxhk= - /delegates/1.0.0: - dev: true - resolution: - integrity: sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= - /depd/1.1.2: - dev: true - engines: - node: '>= 0.6' - resolution: - integrity: sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= - /des.js/1.0.1: - dependencies: - inherits: 2.0.4 - minimalistic-assert: 1.0.1 - dev: true - resolution: - integrity: sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA== - /destroy/1.0.4: - dev: true - resolution: - integrity: sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= - /detect-libc/1.0.3: - dev: true - engines: - node: '>=0.10' - hasBin: true - resolution: - integrity: sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= - /diffie-hellman/5.0.3: - dependencies: - bn.js: 4.11.9 - miller-rabin: 4.0.1 - randombytes: 2.1.0 - dev: true - resolution: - integrity: sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== - /dom-serializer/0.2.2: - dependencies: - domelementtype: 2.1.0 - entities: 2.1.0 - dev: true - resolution: - integrity: sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g== - /domain-browser/1.2.0: - dev: true - engines: - node: '>=0.4' - npm: '>=1.2' - resolution: - integrity: sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA== - /domelementtype/1.3.1: - dev: true - resolution: - integrity: sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w== - /domelementtype/2.1.0: - dev: true - resolution: - integrity: sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w== - /domexception/1.0.1: - dependencies: - webidl-conversions: 4.0.2 - dev: true - resolution: - integrity: sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug== - /domhandler/2.4.2: - dependencies: - domelementtype: 1.3.1 - dev: true - resolution: - integrity: sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA== - /domutils/1.7.0: - dependencies: - dom-serializer: 0.2.2 - domelementtype: 1.3.1 - dev: true - resolution: - integrity: sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg== - /dot-prop/5.3.0: - dependencies: - is-obj: 2.0.0 - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q== - /dotenv-expand/5.1.0: - dev: true - resolution: - integrity: sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA== - /dotenv/5.0.1: - dev: true - engines: - node: '>=4.6.0' - resolution: - integrity: sha512-4As8uPrjfwb7VXC+WnLCbXK7y+Ueb2B3zgNCePYfhxS1PYeaO1YTeplffTEcbfLhvFNGLAz90VvJs9yomG7bow== - /duplexer2/0.1.4: - dependencies: - readable-stream: 2.3.7 - dev: true - resolution: - integrity: sha1-ixLauHjA1p4+eJEFFmKjL8a93ME= - /duplexer3/0.1.4: - dev: true - resolution: - integrity: sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= - /ecc-jsbn/0.1.2: - dependencies: - jsbn: 0.1.1 - safer-buffer: 2.1.2 - dev: true - resolution: - integrity: sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= - /ee-first/1.1.1: - dev: true - resolution: - integrity: sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= - /electron-to-chromium/1.3.616: - dev: true - resolution: - integrity: sha512-CI8L38UN2BEnqXw3/oRIQTmde0LiSeqWSRlPA42ZTYgJQ8fYenzAM2Z3ni+jtILTcrs5aiXZCGJ96Pm+3/yGyQ== - /elliptic/6.5.3: - dependencies: - bn.js: 4.11.9 - brorand: 1.1.0 - hash.js: 1.1.7 - hmac-drbg: 1.0.1 - inherits: 2.0.4 - minimalistic-assert: 1.0.1 - minimalistic-crypto-utils: 1.0.1 - dev: true - resolution: - integrity: sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw== - /elm-hot/1.1.5: - dev: true - resolution: - integrity: sha512-HSMlAr6INTV82wkpPNG0zsHoJXo/04GwG7bnhFX8s4zyIbbzuJAovsdo27FAT6/NKx5IVTXGI+IFcK9Z7oN1Tw== - /elm-json/0.2.8: - dependencies: - binwrap: 0.2.2 - dev: true - hasBin: true - requiresBuild: true - resolution: - integrity: sha512-YfK39CNrHjB4LMnas6aAb2LP37YgqAnh69bWD7ojAs7lBNNkWIeBifeszAfmapylQt1MVuwj6zPPYwrqRQXEBA== - /elm-optimize-level-2/0.1.5: - dependencies: - chalk: 4.1.0 - commander: 6.2.0 - node-elm-compiler: 5.0.5 - ts-union: 2.3.0 - typescript: 3.9.7 - dev: true - engines: - node: '>=12' - hasBin: true - resolution: - integrity: sha512-9vaPjQEjdxzUXewbCJn1X3oIwUgdBssgy+uQvsqyDSpyEwYWxQCgX4qX3NtqKNgsHEZ+TYFzKlzdKvcRKbjOUg== - /elm-review/2.3.3: - dependencies: - chalk: 4.1.0 - chokidar: 3.4.3 - cross-spawn: 7.0.3 - cross-spawn-promise: 0.10.2 - elm-json: 0.2.8 - find-up: 4.1.0 - folder-hash: 3.3.3 - fs-extra: 9.0.1 - glob: 7.1.6 - got: 10.7.0 - minimist: 1.2.5 - ora: 4.1.1 - prompts: 2.4.0 - strip-ansi: 6.0.0 - temp: 0.9.4 - terminal-link: 2.1.1 - which: 2.0.2 - wrap-ansi: 6.2.0 - dev: true - engines: - node: '>=10.0.0' - hasBin: true - resolution: - integrity: sha512-1TiTnEXzpzACrc/JdB3tvmgNf5Qd0RyX8wbBqPPuc1aWvHHvPf6wi/ncz1gcILFAObr1zquCePkJkoW0uoZiBA== - /elm/0.19.1-3: - dependencies: - request: 2.88.2 - dev: true - engines: - node: '>=7.0.0' - hasBin: true - requiresBuild: true - resolution: - integrity: sha512-6y36ewCcVmTOx8lj7cKJs3bhI5qMfoVEigePZ9PhEUNKpwjjML/pU2u2YSpHVAznuCcojoF6KIsrS1Ci7GtVaQ== - /emoji-regex/8.0.0: - dev: true - resolution: - integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - /encodeurl/1.0.2: - dev: true - engines: - node: '>= 0.8' - resolution: - integrity: sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= - /end-of-stream/1.4.4: - dependencies: - once: 1.4.0 - dev: true - resolution: - integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== - /entities/1.1.2: - dev: true - resolution: - integrity: sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w== - /entities/2.1.0: - dev: true - resolution: - integrity: sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w== - /envinfo/7.7.3: - dev: true - engines: - node: '>=4' - hasBin: true - resolution: - integrity: sha512-46+j5QxbPWza0PB1i15nZx0xQ4I/EfQxg9J8Had3b408SV63nEtor2e+oiY63amTo9KTuh2a3XLObNwduxYwwA== - /error-ex/1.3.2: - dependencies: - is-arrayish: 0.2.1 - dev: true - resolution: - integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - /es-abstract/1.17.7: - dependencies: - es-to-primitive: 1.2.1 - function-bind: 1.1.1 - has: 1.0.3 - has-symbols: 1.0.1 - is-callable: 1.2.2 - is-regex: 1.1.1 - object-inspect: 1.9.0 - object-keys: 1.1.1 - object.assign: 4.1.2 - string.prototype.trimend: 1.0.3 - string.prototype.trimstart: 1.0.3 - dev: true - engines: - node: '>= 0.4' - resolution: - integrity: sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g== - /es-abstract/1.18.0-next.1: - dependencies: - es-to-primitive: 1.2.1 - function-bind: 1.1.1 - has: 1.0.3 - has-symbols: 1.0.1 - is-callable: 1.2.2 - is-negative-zero: 2.0.1 - is-regex: 1.1.1 - object-inspect: 1.9.0 - object-keys: 1.1.1 - object.assign: 4.1.2 - string.prototype.trimend: 1.0.3 - string.prototype.trimstart: 1.0.3 - dev: true - engines: - node: '>= 0.4' - resolution: - integrity: sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA== - /es-to-primitive/1.2.1: - dependencies: - is-callable: 1.2.2 - is-date-object: 1.0.2 - is-symbol: 1.0.3 - dev: true - engines: - node: '>= 0.4' - resolution: - integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== - /escalade/3.1.1: - dev: true - engines: - node: '>=6' - resolution: - integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== - /escape-html/1.0.3: - dev: true - resolution: - integrity: sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= - /escape-string-regexp/1.0.5: - dev: true - engines: - node: '>=0.8.0' - resolution: - integrity: sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= - /escodegen/1.14.3: - dependencies: - esprima: 4.0.1 - estraverse: 4.3.0 - esutils: 2.0.3 - optionator: 0.8.3 - dev: true - engines: - node: '>=4.0' - hasBin: true - optionalDependencies: - source-map: 0.6.1 - resolution: - integrity: sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw== - /escodegen/1.9.1: - dependencies: - esprima: 3.1.3 - estraverse: 4.3.0 - esutils: 2.0.3 - optionator: 0.8.3 - dev: true - engines: - node: '>=4.0' - hasBin: true - optionalDependencies: - source-map: 0.6.1 - resolution: - integrity: sha512-6hTjO1NAWkHnDk3OqQ4YrCuwwmGHL9S3nPlzBOUG/R44rda3wLNrfvQ5fkSGjyhHFKM7ALPKcKGrwvCLe0lC7Q== - /esprima/3.1.3: - dev: true - engines: - node: '>=4' - hasBin: true - resolution: - integrity: sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM= - /esprima/4.0.1: - dev: true - engines: - node: '>=4' - hasBin: true - resolution: - integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - /estraverse/4.3.0: - dev: true - engines: - node: '>=4.0' - resolution: - integrity: sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== - /esutils/2.0.3: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== - /etag/1.8.1: - dev: true - engines: - node: '>= 0.6' - resolution: - integrity: sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= - /events/3.2.0: - dev: true - engines: - node: '>=0.8.x' - resolution: - integrity: sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg== - /evp_bytestokey/1.0.3: - dependencies: - md5.js: 1.3.5 - safe-buffer: 5.2.1 - dev: true - resolution: - integrity: sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== - /expand-brackets/2.1.4: - dependencies: - debug: 2.6.9 - define-property: 0.2.5 - extend-shallow: 2.0.1 - posix-character-classes: 0.1.1 - regex-not: 1.0.2 - snapdragon: 0.8.2 - to-regex: 3.0.2 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-t3c14xXOMPa27/D4OwQVGiJEliI= - /expand-template/2.0.3: - dev: true - engines: - node: '>=6' - resolution: - integrity: sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg== - /extend-shallow/2.0.1: - dependencies: - is-extendable: 0.1.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= - /extend-shallow/3.0.2: - dependencies: - assign-symbols: 1.0.0 - is-extendable: 1.0.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= - /extend/3.0.2: - dev: true - resolution: - integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - /extglob/2.0.4: - dependencies: - array-unique: 0.3.2 - define-property: 1.0.0 - expand-brackets: 2.1.4 - extend-shallow: 2.0.1 - fragment-cache: 0.2.1 - regex-not: 1.0.2 - snapdragon: 0.8.2 - to-regex: 3.0.2 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== - /extsprintf/1.3.0: - dev: true - engines: - '0': node >=0.6.0 - resolution: - integrity: sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= - /falafel/2.2.4: - dependencies: - acorn: 7.4.1 - foreach: 2.0.5 - isarray: 2.0.5 - object-keys: 1.1.1 - dev: true - engines: - node: '>=0.4.0' - resolution: - integrity: sha512-0HXjo8XASWRmsS0X1EkhwEMZaD3Qvp7FfURwjLKjG1ghfRm/MGZl2r4cWUTv41KdNghTw4OUMmVtdGQp3+H+uQ== - /fast-deep-equal/3.1.3: - dev: true - resolution: - integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - /fast-glob/2.2.7: - dependencies: - '@mrmlnc/readdir-enhanced': 2.2.1 - '@nodelib/fs.stat': 1.1.3 - glob-parent: 3.1.0 - is-glob: 4.0.1 - merge2: 1.4.1 - micromatch: 3.1.10 - dev: true - engines: - node: '>=4.0.0' - resolution: - integrity: sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw== - /fast-json-stable-stringify/2.1.0: - dev: true - resolution: - integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - /fast-levenshtein/2.0.6: - dev: true - resolution: - integrity: sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= - /fastparse/1.1.2: - dev: true - resolution: - integrity: sha512-483XLLxTVIwWK3QTrMGRqUfUpoOs/0hbQrl2oz4J0pAcm3A3bu84wxTFqGqkJzewCLdME38xJLJAxBABfQT8sQ== - /file-uri-to-path/1.0.0: - dev: true - resolution: - integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw== - /filesize/3.6.1: - dev: true - engines: - node: '>= 0.4.0' - resolution: - integrity: sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg== - /fill-range/4.0.0: - dependencies: - extend-shallow: 2.0.1 - is-number: 3.0.0 - repeat-string: 1.6.1 - to-regex-range: 2.1.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= - /fill-range/7.0.1: - dependencies: - to-regex-range: 5.0.1 - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - /find-elm-dependencies/2.0.4: - dependencies: - firstline: 1.3.1 - lodash: 4.17.20 - dev: true - engines: - node: '>=4.0.0' - hasBin: true - resolution: - integrity: sha512-x/4w4fVmlD2X4PD9oQ+yh9EyaQef6OtEULdMGBTuWx0Nkppvo2Z/bAiQioW2n+GdRYKypME2b9OmYTw5tw5qDg== - /find-up/4.1.0: - dependencies: - locate-path: 5.0.0 - path-exists: 4.0.0 - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - /firstline/1.3.1: - dev: true - engines: - node: '>=6.4.0' - resolution: - integrity: sha512-ycwgqtoxujz1dm0kjkBFOPQMESxB9uKc/PlD951dQDIG+tBXRpYZC2UmJb0gDxopQ1ZX6oyRQN3goRczYu7Deg== - /folder-hash/3.3.3: - dependencies: - debug: 4.3.1 - graceful-fs: 4.2.4 - minimatch: 3.0.4 - dev: true - engines: - node: '>=6.0.0' - hasBin: true - resolution: - integrity: sha512-SDgHBgV+RCjrYs8aUwCb9rTgbTVuSdzvFmLaChsLre1yf+D64khCW++VYciaByZ8Rm0uKF8R/XEpXuTRSGUM1A== - /for-in/1.0.2: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= - /foreach/2.0.5: - dev: true - resolution: - integrity: sha1-C+4AUBiusmDQo6865ljdATbsG5k= - /forever-agent/0.6.1: - dev: true - resolution: - integrity: sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= - /form-data/2.3.3: - dependencies: - asynckit: 0.4.0 - combined-stream: 1.0.8 - mime-types: 2.1.27 - dev: true - engines: - node: '>= 0.12' - resolution: - integrity: sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== - /fragment-cache/0.2.1: - dependencies: - map-cache: 0.2.2 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= - /fresh/0.5.2: - dev: true - engines: - node: '>= 0.6' - resolution: - integrity: sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= - /fs-constants/1.0.0: - dev: true - resolution: - integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== - /fs-extra/9.0.1: - dependencies: - at-least-node: 1.0.0 - graceful-fs: 4.2.4 - jsonfile: 6.1.0 - universalify: 1.0.0 - dev: true - engines: - node: '>=10' - resolution: - integrity: sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ== - /fs-minipass/1.2.7: - dependencies: - minipass: 2.9.0 - dev: true - resolution: - integrity: sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== - /fs-minipass/2.1.0: - dependencies: - minipass: 3.1.3 - dev: true - engines: - node: '>= 8' - resolution: - integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== - /fs.realpath/1.0.0: - dev: true - resolution: - integrity: sha1-FQStJSMVjKpA20onh8sBQRmU6k8= - /fs/0.0.1-security: - dev: true - resolution: - integrity: sha1-invTcYa23d84E/I4WLV+yq9eQdQ= - /fsevents/1.2.13: - dependencies: - bindings: 1.5.0 - nan: 2.14.2 - deprecated: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. - dev: true - engines: - node: '>= 4.0' - optional: true - os: - - darwin - requiresBuild: true - resolution: - integrity: sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw== - /fsevents/2.1.3: - dev: true - engines: - node: ^8.16.0 || ^10.6.0 || >=11.0.0 - optional: true - os: - - darwin - resolution: - integrity: sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== - /function-bind/1.1.1: - dev: true - resolution: - integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - /gauge/2.7.4: - dependencies: - aproba: 1.2.0 - console-control-strings: 1.1.0 - has-unicode: 2.0.1 - object-assign: 4.1.1 - signal-exit: 3.0.3 - string-width: 1.0.2 - strip-ansi: 3.0.1 - wide-align: 1.1.3 - dev: true - resolution: - integrity: sha1-LANAXHU4w51+s3sxcCLjJfsBi/c= - /gensync/1.0.0-beta.2: - dev: true - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== - /get-intrinsic/1.0.1: - dependencies: - function-bind: 1.1.1 - has: 1.0.3 - has-symbols: 1.0.1 - dev: true - resolution: - integrity: sha512-ZnWP+AmS1VUaLgTRy47+zKtjTxz+0xMpx3I52i+aalBK1QP19ggLF3Db89KJX7kjfOfP2eoa01qc++GwPgufPg== - /get-port/3.2.0: - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-3Xzn3hh8Bsi/NTeWrHHgmfCYDrw= - /get-stream/5.2.0: - dependencies: - pump: 3.0.0 - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== - /get-value/2.0.6: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= - /getpass/0.1.7: - dependencies: - assert-plus: 1.0.0 - dev: true - resolution: - integrity: sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= - /github-from-package/0.0.0: - dev: true - resolution: - integrity: sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4= - /glob-parent/3.1.0: - dependencies: - is-glob: 3.1.0 - path-dirname: 1.0.2 - dev: true - resolution: - integrity: sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4= - /glob-parent/5.1.1: - dependencies: - is-glob: 4.0.1 - dev: true - engines: - node: '>= 6' - resolution: - integrity: sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ== - /glob-to-regexp/0.3.0: - dev: true - resolution: - integrity: sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= - /glob/7.1.6: - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.0.4 - once: 1.4.0 - path-is-absolute: 1.0.1 - dev: true - resolution: - integrity: sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== - /globals/11.12.0: - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== - /glsl-inject-defines/1.0.3: - dependencies: - glsl-token-inject-block: 1.1.0 - glsl-token-string: 1.0.1 - glsl-tokenizer: 2.1.5 - dev: true - resolution: - integrity: sha1-3RqswsF/yyvT/DJBHGYz0Ne2D9Q= - /glsl-resolve/0.0.1: - dependencies: - resolve: 0.6.3 - xtend: 2.2.0 - dev: true - resolution: - integrity: sha1-iUvvc5ENeSyBtRQxgANdCnivdtM= - /glsl-token-assignments/2.0.2: - dev: true - resolution: - integrity: sha1-pdgqt4SZwuimuDy2lJXm5mXOAZ8= - /glsl-token-defines/1.0.0: - dependencies: - glsl-tokenizer: 2.1.5 - dev: true - resolution: - integrity: sha1-y4kqqVmTYjFyhHDU90AySJaX+p0= - /glsl-token-depth/1.1.2: - dev: true - resolution: - integrity: sha1-I8XjDuK9JViEtKKLyFC495HpXYQ= - /glsl-token-descope/1.0.2: - dependencies: - glsl-token-assignments: 2.0.2 - glsl-token-depth: 1.1.2 - glsl-token-properties: 1.0.1 - glsl-token-scope: 1.1.2 - dev: true - resolution: - integrity: sha1-D8kKsyYYa4L1l7LnfcniHvzTIHY= - /glsl-token-inject-block/1.1.0: - dev: true - resolution: - integrity: sha1-4QFfWYDBCRgkraomJfHf3ovQADQ= - /glsl-token-properties/1.0.1: - dev: true - resolution: - integrity: sha1-SD3D2Dnw1LXGFx0VkfJJvlPCip4= - /glsl-token-scope/1.1.2: - dev: true - resolution: - integrity: sha1-oXKOeN8kRE+cuT/RjvD3VQOmQ7E= - /glsl-token-string/1.0.1: - dev: true - resolution: - integrity: sha1-WUQdL4V958NEnJRWZgIezjWOSOw= - /glsl-token-whitespace-trim/1.0.0: - dev: true - resolution: - integrity: sha1-RtHf6Yx1vX1QTAXX0RsbPpzJOxA= - /glsl-tokenizer/2.1.5: - dependencies: - through2: 0.6.5 - dev: true - resolution: - integrity: sha512-XSZEJ/i4dmz3Pmbnpsy3cKh7cotvFlBiZnDOwnj/05EwNp2XrhQ4XKJxT7/pDt4kp4YcpRSKz8eTV7S+mwV6MA== - /glslify-bundle/5.1.1: - dependencies: - glsl-inject-defines: 1.0.3 - glsl-token-defines: 1.0.0 - glsl-token-depth: 1.1.2 - glsl-token-descope: 1.0.2 - glsl-token-scope: 1.1.2 - glsl-token-string: 1.0.1 - glsl-token-whitespace-trim: 1.0.0 - glsl-tokenizer: 2.1.5 - murmurhash-js: 1.0.0 - shallow-copy: 0.0.1 - dev: true - resolution: - integrity: sha512-plaAOQPv62M1r3OsWf2UbjN0hUYAB7Aph5bfH58VxJZJhloRNbxOL9tl/7H71K7OLJoSJ2ZqWOKk3ttQ6wy24A== - /glslify-deps/1.3.2: - dependencies: - '@choojs/findup': 0.2.1 - events: 3.2.0 - glsl-resolve: 0.0.1 - glsl-tokenizer: 2.1.5 - graceful-fs: 4.2.4 - inherits: 2.0.4 - map-limit: 0.0.1 - resolve: 1.19.0 - dev: true - resolution: - integrity: sha512-7S7IkHWygJRjcawveXQjRXLO2FTjijPDYC7QfZyAQanY+yGLCFHYnPtsGT9bdyHiwPTw/5a1m1M9hamT2aBpag== - /got/10.7.0: - dependencies: - '@sindresorhus/is': 2.1.1 - '@szmarczak/http-timer': 4.0.5 - '@types/cacheable-request': 6.0.1 - cacheable-lookup: 2.0.1 - cacheable-request: 7.0.1 - decompress-response: 5.0.0 - duplexer3: 0.1.4 - get-stream: 5.2.0 - lowercase-keys: 2.0.0 - mimic-response: 2.1.0 - p-cancelable: 2.0.0 - p-event: 4.2.0 - responselike: 2.0.0 - to-readable-stream: 2.1.0 - type-fest: 0.10.0 - dev: true - engines: - node: '>=10' - resolution: - integrity: sha512-aWTDeNw9g+XqEZNcTjMMZSy7B7yE9toWOFYip7ofFTLleJhvZwUxxTxkTpKvF+p1SAA4VHmuEy7PiHTHyq8tJg== - /graceful-fs/4.2.4: - dev: true - resolution: - integrity: sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== - /grapheme-breaker/0.3.2: - dependencies: - brfs: 1.6.1 - unicode-trie: 0.3.1 - dev: true - resolution: - integrity: sha1-W55reMODJFLSuiuxy4MPlidkEKw= - /har-schema/2.0.0: - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= - /har-validator/5.1.5: - dependencies: - ajv: 6.12.6 - har-schema: 2.0.0 - deprecated: this library is no longer supported - dev: true - engines: - node: '>=6' - resolution: - integrity: sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== - /has-ansi/2.0.0: - dependencies: - ansi-regex: 2.1.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= - /has-flag/1.0.0: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo= - /has-flag/3.0.0: - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-tdRU3CGZriJWmfNGfloH87lVuv0= - /has-flag/4.0.0: - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - /has-symbols/1.0.1: - dev: true - engines: - node: '>= 0.4' - resolution: - integrity: sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== - /has-unicode/2.0.1: - dev: true - resolution: - integrity: sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk= - /has-value/0.3.1: - dependencies: - get-value: 2.0.6 - has-values: 0.1.4 - isobject: 2.1.0 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= - /has-value/1.0.0: - dependencies: - get-value: 2.0.6 - has-values: 1.0.0 - isobject: 3.0.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= - /has-values/0.1.4: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-bWHeldkd/Km5oCCJrThL/49it3E= - /has-values/1.0.0: - dependencies: - is-number: 3.0.0 - kind-of: 4.0.0 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= - /has/1.0.3: - dependencies: - function-bind: 1.1.1 - dev: true - engines: - node: '>= 0.4.0' - resolution: - integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - /hash-base/3.1.0: - dependencies: - inherits: 2.0.4 - readable-stream: 3.6.0 - safe-buffer: 5.2.1 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== - /hash.js/1.1.7: - dependencies: - inherits: 2.0.4 - minimalistic-assert: 1.0.1 - dev: true - resolution: - integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== - /hex-color-regex/1.1.0: - dev: true - resolution: - integrity: sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ== - /hmac-drbg/1.0.1: - dependencies: - hash.js: 1.1.7 - minimalistic-assert: 1.0.1 - minimalistic-crypto-utils: 1.0.1 - dev: true - resolution: - integrity: sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= - /hsl-regex/1.0.0: - dev: true - resolution: - integrity: sha1-1JMwx4ntgZ4nakwNJy3/owsY/m4= - /hsla-regex/1.0.0: - dev: true - resolution: - integrity: sha1-wc56MWjIxmFAM6S194d/OyJfnDg= - /html-comment-regex/1.1.2: - dev: true - resolution: - integrity: sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ== - /html-encoding-sniffer/1.0.2: - dependencies: - whatwg-encoding: 1.0.5 - dev: true - resolution: - integrity: sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw== - /html-tags/1.2.0: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-x43mW1Zjqll5id0rerSSANfk25g= - /htmlnano/0.2.8: - dependencies: - cssnano: 4.1.10 - posthtml: 0.13.4 - posthtml-render: 1.4.0 - purgecss: 2.3.0 - relateurl: 0.2.7 - srcset: 3.0.0 - svgo: 1.3.2 - terser: 4.8.0 - timsort: 0.3.0 - uncss: 0.17.3 - dev: true - resolution: - integrity: sha512-q5gbo4SIDAE5sfJ5V0UD6uu+n1dcO/Mpr0B6SlDlJBoV7xKPne4uG4UwrT8vUWjdjIPJl95TY8EDuEbBW2TG0A== - /htmlparser2/3.10.1: - dependencies: - domelementtype: 1.3.1 - domhandler: 2.4.2 - domutils: 1.7.0 - entities: 1.1.2 - inherits: 2.0.4 - readable-stream: 3.6.0 - dev: true - resolution: - integrity: sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ== - /http-cache-semantics/4.1.0: - dev: true - resolution: - integrity: sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== - /http-errors/1.7.3: - dependencies: - depd: 1.1.2 - inherits: 2.0.4 - setprototypeof: 1.1.1 - statuses: 1.5.0 - toidentifier: 1.0.0 - dev: true - engines: - node: '>= 0.6' - resolution: - integrity: sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== - /http-signature/1.2.0: - dependencies: - assert-plus: 1.0.0 - jsprim: 1.4.1 - sshpk: 1.16.1 - dev: true - engines: - node: '>=0.8' - npm: '>=1.3.7' - resolution: - integrity: sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= - /https-browserify/1.0.0: - dev: true - resolution: - integrity: sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= - /iconv-lite/0.4.24: - dependencies: - safer-buffer: 2.1.2 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - /icss-replace-symbols/1.1.0: - dev: true - resolution: - integrity: sha1-Bupvg2ead0njhs/h/oEq5dsiPe0= - /ieee754/1.2.1: - dev: true - resolution: - integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== - /immediate/3.0.6: - dev: false - resolution: - integrity: sha1-nbHb0Pr43m++D13V5Wu2BigN5ps= - /import-fresh/2.0.0: - dependencies: - caller-path: 2.0.0 - resolve-from: 3.0.0 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-2BNVwVYS04bGH53dOSLUMEgipUY= - /indexes-of/1.0.1: - dev: true - resolution: - integrity: sha1-8w9xbI4r00bHtn0985FVZqfAVgc= - /inflight/1.0.6: - dependencies: - once: 1.4.0 - wrappy: 1.0.2 - dev: true - resolution: - integrity: sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= - /inherits/2.0.1: - dev: true - resolution: - integrity: sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE= - /inherits/2.0.3: - dev: true - resolution: - integrity: sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= - /inherits/2.0.4: - dev: true - resolution: - integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - /ini/1.3.8: - dev: true - resolution: - integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== - /is-absolute-url/2.1.0: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-UFMN+4T8yap9vnhS6Do3uTufKqY= - /is-absolute-url/3.0.3: - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q== - /is-accessor-descriptor/0.1.6: - dependencies: - kind-of: 3.2.2 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= - /is-accessor-descriptor/1.0.0: - dependencies: - kind-of: 6.0.3 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== - /is-arrayish/0.2.1: - dev: true - resolution: - integrity: sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= - /is-arrayish/0.3.2: - dev: true - resolution: - integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ== - /is-binary-path/1.0.1: - dependencies: - binary-extensions: 1.13.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg= - /is-binary-path/2.1.0: - dependencies: - binary-extensions: 2.1.0 - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - /is-buffer/1.1.6: - dev: true - resolution: - integrity: sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== - /is-callable/1.2.2: - dev: true - engines: - node: '>= 0.4' - resolution: - integrity: sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA== - /is-color-stop/1.1.0: - dependencies: - css-color-names: 0.0.4 - hex-color-regex: 1.1.0 - hsl-regex: 1.0.0 - hsla-regex: 1.0.0 - rgb-regex: 1.0.1 - rgba-regex: 1.0.0 - dev: true - resolution: - integrity: sha1-z/9HGu5N1cnhWFmPvhKWe1za00U= - /is-core-module/2.2.0: - dependencies: - has: 1.0.3 - dev: true - resolution: - integrity: sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ== - /is-data-descriptor/0.1.4: - dependencies: - kind-of: 3.2.2 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= - /is-data-descriptor/1.0.0: - dependencies: - kind-of: 6.0.3 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== - /is-date-object/1.0.2: - dev: true - engines: - node: '>= 0.4' - resolution: - integrity: sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g== - /is-descriptor/0.1.6: - dependencies: - is-accessor-descriptor: 0.1.6 - is-data-descriptor: 0.1.4 - kind-of: 5.1.0 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== - /is-descriptor/1.0.2: - dependencies: - is-accessor-descriptor: 1.0.0 - is-data-descriptor: 1.0.0 - kind-of: 6.0.3 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== - /is-directory/0.3.1: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE= - /is-extendable/0.1.1: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= - /is-extendable/1.0.1: - dependencies: - is-plain-object: 2.0.4 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== - /is-extglob/2.1.1: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= - /is-fullwidth-code-point/1.0.0: - dependencies: - number-is-nan: 1.0.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-754xOG8DGn8NZDr4L95QxFfvAMs= - /is-fullwidth-code-point/3.0.0: - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - /is-glob/3.1.0: - dependencies: - is-extglob: 2.1.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo= - /is-glob/4.0.1: - dependencies: - is-extglob: 2.1.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== - /is-html/1.1.0: - dependencies: - html-tags: 1.2.0 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-4E8cGNOUhRETlvmgJz6rUa8hhGQ= - /is-interactive/1.0.0: - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== - /is-negative-zero/2.0.1: - dev: true - engines: - node: '>= 0.4' - resolution: - integrity: sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w== - /is-number/3.0.0: - dependencies: - kind-of: 3.2.2 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= - /is-number/7.0.0: - dev: true - engines: - node: '>=0.12.0' - resolution: - integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - /is-obj/2.0.0: - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== - /is-plain-object/2.0.4: - dependencies: - isobject: 3.0.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== - /is-regex/1.1.1: - dependencies: - has-symbols: 1.0.1 - dev: true - engines: - node: '>= 0.4' - resolution: - integrity: sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg== - /is-resolvable/1.1.0: - dev: true - resolution: - integrity: sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg== - /is-svg/3.0.0: - dependencies: - html-comment-regex: 1.1.2 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-gi4iHK53LR2ujhLVVj+37Ykh9GLqYHX6JOVXbLAucaG/Cqw9xwdFOjDM2qeifLs1sF1npXXFvDu0r5HNgCMrzQ== - /is-symbol/1.0.3: - dependencies: - has-symbols: 1.0.1 - dev: true - engines: - node: '>= 0.4' - resolution: - integrity: sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ== - /is-typedarray/1.0.0: - dev: true - resolution: - integrity: sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= - /is-url/1.2.4: - dev: true - resolution: - integrity: sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww== - /is-windows/1.0.2: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== - /is-wsl/1.1.0: - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0= - /isarray/0.0.1: - dev: true - resolution: - integrity: sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= - /isarray/1.0.0: - dev: true - resolution: - integrity: sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= - /isarray/2.0.5: - dev: true - resolution: - integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== - /isexe/2.0.0: - dev: true - resolution: - integrity: sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - /isobject/2.1.0: - dependencies: - isarray: 1.0.0 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= - /isobject/3.0.1: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-TkMekrEalzFjaqH5yNHMvP2reN8= - /isstream/0.1.2: - dev: true - resolution: - integrity: sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= - /js-tokens/4.0.0: - dev: true - resolution: - integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - /js-yaml/3.14.0: - dependencies: - argparse: 1.0.10 - esprima: 4.0.1 - dev: true - hasBin: true - resolution: - integrity: sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== - /jsbn/0.1.1: - dev: true - resolution: - integrity: sha1-peZUwuWi3rXyAdls77yoDA7y9RM= - /jsdom/14.1.0: - dependencies: - abab: 2.0.5 - acorn: 6.4.2 - acorn-globals: 4.3.4 - array-equal: 1.0.0 - cssom: 0.3.8 - cssstyle: 1.4.0 - data-urls: 1.1.0 - domexception: 1.0.1 - escodegen: 1.14.3 - html-encoding-sniffer: 1.0.2 - nwsapi: 2.2.0 - parse5: 5.1.0 - pn: 1.1.0 - request: 2.88.2 - request-promise-native: 1.0.9_request@2.88.2 - saxes: 3.1.11 - symbol-tree: 3.2.4 - tough-cookie: 2.5.0 - w3c-hr-time: 1.0.2 - w3c-xmlserializer: 1.1.2 - webidl-conversions: 4.0.2 - whatwg-encoding: 1.0.5 - whatwg-mimetype: 2.3.0 - whatwg-url: 7.1.0 - ws: 6.2.1 - xml-name-validator: 3.0.0 - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-O901mfJSuTdwU2w3Sn+74T+RnDVP+FuV5fH8tcPWyqrseRAb0s5xOtPgCFiPOtLcyK7CLIJwPyD83ZqQWvA5ng== - /jsesc/0.5.0: - dev: true - hasBin: true - resolution: - integrity: sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= - /jsesc/2.5.2: - dev: true - engines: - node: '>=4' - hasBin: true - resolution: - integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== - /json-buffer/3.0.1: - dev: true - resolution: - integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== - /json-parse-better-errors/1.0.2: - dev: true - resolution: - integrity: sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== - /json-schema-traverse/0.4.1: - dev: true - resolution: - integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - /json-schema/0.2.3: - dev: true - resolution: - integrity: sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= - /json-stringify-safe/5.0.1: - dev: true - resolution: - integrity: sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= - /json5/1.0.1: - dependencies: - minimist: 1.2.5 - dev: true - hasBin: true - resolution: - integrity: sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow== - /json5/2.1.3: - dependencies: - minimist: 1.2.5 - dev: true - engines: - node: '>=6' - hasBin: true - resolution: - integrity: sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA== - /jsonfile/6.1.0: - dependencies: - universalify: 2.0.0 - dev: true - optionalDependencies: - graceful-fs: 4.2.4 - resolution: - integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== - /jsprim/1.4.1: - dependencies: - assert-plus: 1.0.0 - extsprintf: 1.3.0 - json-schema: 0.2.3 - verror: 1.10.0 - dev: true - engines: - '0': node >=0.6.0 - resolution: - integrity: sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= - /keyv/4.0.3: - dependencies: - json-buffer: 3.0.1 - dev: true - resolution: - integrity: sha512-zdGa2TOpSZPq5mU6iowDARnMBZgtCqJ11dJROFi6tg6kTn4nuUdU09lFyLFSaHrWqpIJ+EBq4E8/Dc0Vx5vLdA== - /kind-of/3.2.2: - dependencies: - is-buffer: 1.1.6 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= - /kind-of/4.0.0: - dependencies: - is-buffer: 1.1.6 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-IIE989cSkosgc3hpGkUGb65y3Vc= - /kind-of/5.1.0: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== - /kind-of/6.0.3: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== - /kleur/3.0.3: - dev: true - engines: - node: '>=6' - resolution: - integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== - /levn/0.3.0: - dependencies: - prelude-ls: 1.1.2 - type-check: 0.3.2 - dev: true - engines: - node: '>= 0.8.0' - resolution: - integrity: sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= - /lie/3.1.1: - dependencies: - immediate: 3.0.6 - dev: false - resolution: - integrity: sha1-mkNrLMd0bKWd56QfpGmz77dr2H4= - /localforage/1.9.0: - dependencies: - lie: 3.1.1 - dev: false - resolution: - integrity: sha512-rR1oyNrKulpe+VM9cYmcFn6tsHuokyVHFaCM3+osEmxaHTbEk8oQu6eGDfS6DQLWi/N67XRmB8ECG37OES368g== - /locate-path/5.0.0: - dependencies: - p-locate: 4.1.0 - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== - /lodash.clone/4.5.0: - dev: true - resolution: - integrity: sha1-GVhwRQ9aExkkeN9Lw9I9LeoZB7Y= - /lodash.memoize/4.1.2: - dev: true - resolution: - integrity: sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4= - /lodash.sortby/4.7.0: - dev: true - resolution: - integrity: sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= - /lodash.uniq/4.5.0: - dev: true - resolution: - integrity: sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= - /lodash/4.17.20: - dev: true - resolution: - integrity: sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== - /log-symbols/2.2.0: - dependencies: - chalk: 2.4.2 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg== - /log-symbols/3.0.0: - dependencies: - chalk: 2.4.2 - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== - /lowercase-keys/2.0.0: - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== - /lru-cache/4.1.5: - dependencies: - pseudomap: 1.0.2 - yallist: 2.1.2 - dev: true - resolution: - integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== - /lru-cache/6.0.0: - dependencies: - yallist: 4.0.0 - dev: true - engines: - node: '>=10' - resolution: - integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - /magic-string/0.22.5: - dependencies: - vlq: 0.2.3 - dev: true - resolution: - integrity: sha512-oreip9rJZkzvA8Qzk9HFs8fZGF/u7H/gtrE8EN6RjKJ9kh2HlC+yQ2QezifqTZfGyiuAV0dRv5a+y/8gBb1m9w== - /map-cache/0.2.2: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= - /map-limit/0.0.1: - dependencies: - once: 1.3.3 - dev: true - resolution: - integrity: sha1-63lhAxwPDo0AG/LVb6toXViCLzg= - /map-visit/1.0.0: - dependencies: - object-visit: 1.0.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= - /md5.js/1.3.5: - dependencies: - hash-base: 3.1.0 - inherits: 2.0.4 - safe-buffer: 5.2.1 - dev: true - resolution: - integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== - /mdn-data/2.0.14: - dev: true - resolution: - integrity: sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow== - /mdn-data/2.0.4: - dev: true - resolution: - integrity: sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA== - /merge-source-map/1.0.4: - dependencies: - source-map: 0.5.7 - dev: true - resolution: - integrity: sha1-pd5GU42uhNQRTMXqArR3KmNGcB8= - /merge2/1.4.1: - dev: true - engines: - node: '>= 8' - resolution: - integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== - /micromatch/3.1.10: - dependencies: - arr-diff: 4.0.0 - array-unique: 0.3.2 - braces: 2.3.2 - define-property: 2.0.2 - extend-shallow: 3.0.2 - extglob: 2.0.4 - fragment-cache: 0.2.1 - kind-of: 6.0.3 - nanomatch: 1.2.13 - object.pick: 1.3.0 - regex-not: 1.0.2 - snapdragon: 0.8.2 - to-regex: 3.0.2 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== - /miller-rabin/4.0.1: - dependencies: - bn.js: 4.11.9 - brorand: 1.1.0 - dev: true - hasBin: true - resolution: - integrity: sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== - /mime-db/1.44.0: - dev: true - engines: - node: '>= 0.6' - resolution: - integrity: sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg== - /mime-types/2.1.27: - dependencies: - mime-db: 1.44.0 - dev: true - engines: - node: '>= 0.6' - resolution: - integrity: sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w== - /mime/1.6.0: - dev: true - engines: - node: '>=4' - hasBin: true - resolution: - integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== - /mimic-fn/1.2.0: - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== - /mimic-fn/2.1.0: - dev: true - engines: - node: '>=6' - resolution: - integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== - /mimic-response/1.0.1: - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== - /mimic-response/2.1.0: - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA== - /mimic-response/3.1.0: - dev: true - engines: - node: '>=10' - resolution: - integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ== - /minimalistic-assert/1.0.1: - dev: true - resolution: - integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== - /minimalistic-crypto-utils/1.0.1: - dev: true - resolution: - integrity: sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= - /minimatch/3.0.4: - dependencies: - brace-expansion: 1.1.11 - dev: true - resolution: - integrity: sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - /minimist/1.2.5: - dev: true - resolution: - integrity: sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== - /minipass/2.9.0: - dependencies: - safe-buffer: 5.2.1 - yallist: 3.1.1 - dev: true - resolution: - integrity: sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== - /minipass/3.1.3: - dependencies: - yallist: 4.0.0 - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg== - /minizlib/1.3.3: - dependencies: - minipass: 2.9.0 - dev: true - resolution: - integrity: sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== - /minizlib/2.1.2: - dependencies: - minipass: 3.1.3 - yallist: 4.0.0 - dev: true - engines: - node: '>= 8' - resolution: - integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== - /mixin-deep/1.3.2: - dependencies: - for-in: 1.0.2 - is-extendable: 1.0.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== - /mkdirp-classic/0.5.3: - dev: true - resolution: - integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== - /mkdirp/0.5.5: - dependencies: - minimist: 1.2.5 - dev: true - hasBin: true - resolution: - integrity: sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== - /mkdirp/1.0.4: - dev: true - engines: - node: '>=10' - hasBin: true - resolution: - integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== - /ms/2.0.0: - dev: true - resolution: - integrity: sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= - /ms/2.1.1: - dev: true - resolution: - integrity: sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== - /ms/2.1.2: - dev: true - resolution: - integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - /murmurhash-js/1.0.0: - dev: true - resolution: - integrity: sha1-sGJ44h/Gw3+lMTcysEEry2rhX1E= - /mustache/3.2.1: - dev: true - engines: - npm: '>=1.4.0' - hasBin: true - resolution: - integrity: sha512-RERvMFdLpaFfSRIEe632yDm5nsd0SDKn8hGmcUwswnyiE5mtdZLDybtHAz6hjJhawokF0hXvGLtx9mrQfm6FkA== - /mute-stream/0.0.8: - dev: true - resolution: - integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== - /nan/2.14.2: - dev: true - optional: true - resolution: - integrity: sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ== - /nanomatch/1.2.13: - dependencies: - arr-diff: 4.0.0 - array-unique: 0.3.2 - define-property: 2.0.2 - extend-shallow: 3.0.2 - fragment-cache: 0.2.1 - is-windows: 1.0.2 - kind-of: 6.0.3 - object.pick: 1.3.0 - regex-not: 1.0.2 - snapdragon: 0.8.2 - to-regex: 3.0.2 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== - /napi-build-utils/1.0.2: - dev: true - resolution: - integrity: sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg== - /nice-try/1.0.5: - dev: true - resolution: - integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== - /node-abi/2.19.3: - dependencies: - semver: 5.7.1 - dev: true - resolution: - integrity: sha512-9xZrlyfvKhWme2EXFKQhZRp1yNWT/uI1luYPr3sFl+H4keYY4xR+1jO7mvTTijIsHf1M+QDe9uWuKeEpLInIlg== - /node-addon-api/1.7.2: - dev: true - resolution: - integrity: sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg== - /node-addon-api/3.0.2: - dev: true - resolution: - integrity: sha512-+D4s2HCnxPd5PjjI0STKwncjXTUKKqm74MDMz9OPXavjsGmjkvwgLtA5yoxJUdmpj52+2u+RrXgPipahKczMKg== - /node-elm-compiler/5.0.5: - dependencies: - cross-spawn: 6.0.5 - find-elm-dependencies: 2.0.4 - lodash: 4.17.20 - temp: 0.9.4 - dev: true - engines: - node: '>=4.0.0' - resolution: - integrity: sha512-vapB+VkmKMY1NRy7jjpGjzwWbKmtiRfzbgVoV/eROz5Kx30QvY0Nd5Ua7iST+9utrn1aG8cVToXC6UWdEO5BKQ== - /node-forge/0.7.6: - dev: true - resolution: - integrity: sha512-sol30LUpz1jQFBjOKwbjxijiE3b6pjd74YwfD0fJOKPjF+fONKb2Yg8rYgS6+bK6VDl+/wfr4IYpC7jDzLUIfw== - /node-libs-browser/2.2.1: - dependencies: - assert: 1.5.0 - browserify-zlib: 0.2.0 - buffer: 4.9.2 - console-browserify: 1.2.0 - constants-browserify: 1.0.0 - crypto-browserify: 3.12.0 - domain-browser: 1.2.0 - events: 3.2.0 - https-browserify: 1.0.0 - os-browserify: 0.3.0 - path-browserify: 0.0.1 - process: 0.11.10 - punycode: 1.4.1 - querystring-es3: 0.2.1 - readable-stream: 2.3.7 - stream-browserify: 2.0.2 - stream-http: 2.8.3 - string_decoder: 1.3.0 - timers-browserify: 2.0.12 - tty-browserify: 0.0.0 - url: 0.11.0 - util: 0.11.1 - vm-browserify: 1.1.2 - dev: true - resolution: - integrity: sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q== - /node-releases/1.1.67: - dev: true - resolution: - integrity: sha512-V5QF9noGFl3EymEwUYzO+3NTDpGfQB4ve6Qfnzf3UNydMhjQRVPR1DZTuvWiLzaFJYw2fmDwAfnRNEVb64hSIg== - /noop-logger/0.1.1: - dev: true - resolution: - integrity: sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI= - /normalize-path/2.1.1: - dependencies: - remove-trailing-separator: 1.1.0 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-GrKLVW4Zg2Oowab35vogE3/mrtk= - /normalize-path/3.0.0: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - /normalize-url/3.3.0: - dev: true - engines: - node: '>=6' - resolution: - integrity: sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg== - /normalize-url/4.5.0: - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ== - /npmlog/4.1.2: - dependencies: - are-we-there-yet: 1.1.5 - console-control-strings: 1.1.0 - gauge: 2.7.4 - set-blocking: 2.0.0 - dev: true - resolution: - integrity: sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== - /nth-check/1.0.2: - dependencies: - boolbase: 1.0.0 - dev: true - resolution: - integrity: sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg== - /number-is-nan/1.0.1: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= - /nwsapi/2.2.0: - dev: true - resolution: - integrity: sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ== - /oauth-sign/0.9.0: - dev: true - resolution: - integrity: sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== - /object-assign/4.1.1: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= - /object-copy/0.1.0: - dependencies: - copy-descriptor: 0.1.1 - define-property: 0.2.5 - kind-of: 3.2.2 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-fn2Fi3gb18mRpBupde04EnVOmYw= - /object-inspect/1.4.1: - dev: true - resolution: - integrity: sha512-wqdhLpfCUbEsoEwl3FXwGyv8ief1k/1aUdIPCqVnupM6e8l63BEJdiF/0swtn04/8p05tG/T0FrpTlfwvljOdw== - /object-inspect/1.9.0: - dev: true - resolution: - integrity: sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw== - /object-keys/1.1.1: - dev: true - engines: - node: '>= 0.4' - resolution: - integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== - /object-visit/1.0.1: - dependencies: - isobject: 3.0.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= - /object.assign/4.1.2: - dependencies: - call-bind: 1.0.0 - define-properties: 1.1.3 - has-symbols: 1.0.1 - object-keys: 1.1.1 - dev: true - engines: - node: '>= 0.4' - resolution: - integrity: sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== - /object.getownpropertydescriptors/2.1.1: - dependencies: - call-bind: 1.0.0 - define-properties: 1.1.3 - es-abstract: 1.18.0-next.1 - dev: true - engines: - node: '>= 0.8' - resolution: - integrity: sha512-6DtXgZ/lIZ9hqx4GtZETobXLR/ZLaa0aqV0kzbn80Rf8Z2e/XFnhA0I7p07N2wH8bBBltr2xQPi6sbKWAY2Eng== - /object.pick/1.3.0: - dependencies: - isobject: 3.0.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= - /object.values/1.1.2: - dependencies: - call-bind: 1.0.0 - define-properties: 1.1.3 - es-abstract: 1.18.0-next.1 - has: 1.0.3 - dev: true - engines: - node: '>= 0.4' - resolution: - integrity: sha512-MYC0jvJopr8EK6dPBiO8Nb9mvjdypOachO5REGk6MXzujbBrAisKo3HmdEI6kZDL6fC31Mwee/5YbtMebixeag== - /on-finished/2.3.0: - dependencies: - ee-first: 1.1.1 - dev: true - engines: - node: '>= 0.8' - resolution: - integrity: sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= - /once/1.3.3: - dependencies: - wrappy: 1.0.2 - dev: true - resolution: - integrity: sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA= - /once/1.4.0: - dependencies: - wrappy: 1.0.2 - dev: true - resolution: - integrity: sha1-WDsap3WWHUsROsF9nFC6753Xa9E= - /onetime/2.0.1: - dependencies: - mimic-fn: 1.2.0 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ= - /onetime/5.1.2: - dependencies: - mimic-fn: 2.1.0 - dev: true - engines: - node: '>=6' - resolution: - integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== - /opn/5.5.0: - dependencies: - is-wsl: 1.1.0 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA== - /optionator/0.8.3: - dependencies: - deep-is: 0.1.3 - fast-levenshtein: 2.0.6 - levn: 0.3.0 - prelude-ls: 1.1.2 - type-check: 0.3.2 - word-wrap: 1.2.3 - dev: true - engines: - node: '>= 0.8.0' - resolution: - integrity: sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== - /ora/2.1.0: - dependencies: - chalk: 2.4.2 - cli-cursor: 2.1.0 - cli-spinners: 1.3.1 - log-symbols: 2.2.0 - strip-ansi: 4.0.0 - wcwidth: 1.0.1 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-hNNlAd3gfv/iPmsNxYoAPLvxg7HuPozww7fFonMZvL84tP6Ox5igfk5j/+a9rtJJwqMgKK+JgWsAQik5o0HTLA== - /ora/3.4.0: - dependencies: - chalk: 2.4.2 - cli-cursor: 2.1.0 - cli-spinners: 2.5.0 - log-symbols: 2.2.0 - strip-ansi: 5.2.0 - wcwidth: 1.0.1 - dev: true - engines: - node: '>=6' - resolution: - integrity: sha512-eNwHudNbO1folBP3JsZ19v9azXWtQZjICdr3Q0TDPIaeBQ3mXLrh54wM+er0+hSp+dWKf+Z8KM58CYzEyIYxYg== - /ora/4.1.1: - dependencies: - chalk: 3.0.0 - cli-cursor: 3.1.0 - cli-spinners: 2.5.0 - is-interactive: 1.0.0 - log-symbols: 3.0.0 - mute-stream: 0.0.8 - strip-ansi: 6.0.0 - wcwidth: 1.0.1 - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-sjYP8QyVWBpBZWD6Vr1M/KwknSw6kJOz41tvGMlwWeClHBtYKTbHMki1PsLZnxKpXMPbTKv9b3pjQu3REib96A== - /os-browserify/0.3.0: - dev: true - resolution: - integrity: sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc= - /p-cancelable/2.0.0: - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-wvPXDmbMmu2ksjkB4Z3nZWTSkJEb9lqVdMaCKpZUGJG9TMiNp9XcbG3fn9fPKjem04fJMJnXoyFPk2FmgiaiNg== - /p-event/4.2.0: - dependencies: - p-timeout: 3.2.0 - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-KXatOjCRXXkSePPb1Nbi0p0m+gQAwdlbhi4wQKJPI1HsMQS9g+Sqp2o+QHziPr7eYJyOZet836KoHEVM1mwOrQ== - /p-finally/1.0.0: - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= - /p-limit/2.3.0: - dependencies: - p-try: 2.2.0 - dev: true - engines: - node: '>=6' - resolution: - integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - /p-locate/4.1.0: - dependencies: - p-limit: 2.3.0 - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== - /p-timeout/3.2.0: - dependencies: - p-finally: 1.0.0 - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg== - /p-try/2.2.0: - dev: true - engines: - node: '>=6' - resolution: - integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - /pako/0.2.9: - dev: true - resolution: - integrity: sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU= - /pako/1.0.11: - dev: true - resolution: - integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== - /parcel-bundler/1.12.4: - dependencies: - '@babel/code-frame': 7.10.4 - '@babel/core': 7.12.9 - '@babel/generator': 7.12.5 - '@babel/parser': 7.12.7 - '@babel/plugin-transform-flow-strip-types': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-transform-modules-commonjs': 7.12.1_@babel+core@7.12.9 - '@babel/plugin-transform-react-jsx': 7.12.7_@babel+core@7.12.9 - '@babel/preset-env': 7.12.7_@babel+core@7.12.9 - '@babel/runtime': 7.12.5 - '@babel/template': 7.12.7 - '@babel/traverse': 7.12.9 - '@babel/types': 7.12.7 - '@iarna/toml': 2.2.5 - '@parcel/fs': 1.11.0 - '@parcel/logger': 1.11.1 - '@parcel/utils': 1.11.0 - '@parcel/watcher': 1.12.1 - '@parcel/workers': 1.11.0 - ansi-to-html: 0.6.14 - babylon-walk: 1.0.2 - browserslist: 4.15.0 - chalk: 2.4.2 - clone: 2.1.2 - command-exists: 1.2.9 - commander: 2.20.3 - core-js: 2.6.12 - cross-spawn: 6.0.5 - css-modules-loader-core: 1.1.0 - cssnano: 4.1.10 - deasync: 0.1.21 - dotenv: 5.0.1 - dotenv-expand: 5.1.0 - envinfo: 7.7.3 - fast-glob: 2.2.7 - filesize: 3.6.1 - get-port: 3.2.0 - htmlnano: 0.2.8 - is-glob: 4.0.1 - is-url: 1.2.4 - js-yaml: 3.14.0 - json5: 1.0.1 - micromatch: 3.1.10 - mkdirp: 0.5.5 - node-forge: 0.7.6 - node-libs-browser: 2.2.1 - opn: 5.5.0 - postcss: 7.0.35 - postcss-value-parser: 3.3.1 - posthtml: 0.11.6 - posthtml-parser: 0.4.2 - posthtml-render: 1.4.0 - resolve: 1.19.0 - semver: 5.7.1 - serialize-to-js: 3.1.1 - serve-static: 1.14.1 - source-map: 0.6.1 - terser: 3.17.0 - v8-compile-cache: 2.2.0 - ws: 5.2.2 - dev: true - engines: - node: '>= 6.0.0' - hasBin: true - requiresBuild: true - resolution: - integrity: sha512-G+iZGGiPEXcRzw0fiRxWYCKxdt/F7l9a0xkiU4XbcVRJCSlBnioWEwJMutOCCpoQmaQtjB4RBHDGIHN85AIhLQ== - /parcel-plugin-ogimage/1.2.0: - dependencies: - chalk: 2.4.2 - fs: 0.0.1-security - ora: 3.4.0 - path: 0.12.7 - pretty-ms: 5.1.0 - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-EN4X3UnEvp/Vd1pun45fiJKMrrrgFNbSb8iuHkjo7Sszwg+ou8ivYD7h8Iw9UNEvGJVGD0JrktJnSmhZ2P51rg== - /parcel-plugin-pwa-manifest/3.0.10_parcel-bundler@1.12.4: - dependencies: - '@pwa-manifest/core': 1.4.1 - parcel-bundler: 1.12.4 - dev: true - engines: - node: '>=10' - peerDependencies: - parcel-bundler: ^1.12.4 - resolution: - integrity: sha512-ZAo8VKqcGgjfJztxIIIGUGFiHhRV50h/FAr/4afsti9u60bGl5ETQdyPxq0kWKV4M07fqaNKGswieP0ayzRtjw== - /parcel-plugin-static-files-copy/2.5.0: - dependencies: - minimatch: 3.0.4 - path: 0.12.7 - dev: true - resolution: - integrity: sha512-5rxOPw3iV+WXhePfByoIxsUlL4I0o95CgcF31gwgnhPuj2q6tVPuzEAJsag9bWJr5Vd/SXFPTNsUAGAg4jP07Q== - /parse-asn1/5.1.6: - dependencies: - asn1.js: 5.4.1 - browserify-aes: 1.2.0 - evp_bytestokey: 1.0.3 - pbkdf2: 3.1.1 - safe-buffer: 5.2.1 - dev: true - resolution: - integrity: sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw== - /parse-json/4.0.0: - dependencies: - error-ex: 1.3.2 - json-parse-better-errors: 1.0.2 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= - /parse-ms/2.1.0: - dev: true - engines: - node: '>=6' - resolution: - integrity: sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA== - /parse5/5.1.0: - dev: true - resolution: - integrity: sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ== - /parseurl/1.3.3: - dev: true - engines: - node: '>= 0.8' - resolution: - integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== - /pascalcase/0.1.1: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= - /path-browserify/0.0.1: - dev: true - resolution: - integrity: sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ== - /path-dirname/1.0.2: - dev: true - resolution: - integrity: sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA= - /path-exists/4.0.0: - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - /path-is-absolute/1.0.1: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-F0uSaHNVNP+8es5r9TpanhtcX18= - /path-key/2.0.1: - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= - /path-key/3.1.1: - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - /path-parse/1.0.6: - dev: true - resolution: - integrity: sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== - /path/0.12.7: - dependencies: - process: 0.11.10 - util: 0.10.4 - dev: true - resolution: - integrity: sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8= - /pbkdf2/3.1.1: - dependencies: - create-hash: 1.2.0 - create-hmac: 1.1.7 - ripemd160: 2.0.2 - safe-buffer: 5.2.1 - sha.js: 2.4.11 - dev: true - engines: - node: '>=0.12' - resolution: - integrity: sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg== - /performance-now/2.1.0: - dev: true - resolution: - integrity: sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= - /physical-cpu-count/2.0.0: - dev: true - resolution: - integrity: sha1-GN4vl+S/epVRrXURlCtUlverpmA= - /picomatch/2.2.2: - dev: true - engines: - node: '>=8.6' - resolution: - integrity: sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== - /pn/1.1.0: - dev: true - resolution: - integrity: sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA== - /posix-character-classes/0.1.1: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= - /postcss-calc/7.0.5: - dependencies: - postcss: 7.0.35 - postcss-selector-parser: 6.0.4 - postcss-value-parser: 4.1.0 - dev: true - resolution: - integrity: sha512-1tKHutbGtLtEZF6PT4JSihCHfIVldU72mZ8SdZHIYriIZ9fh9k9aWSppaT8rHsyI3dX+KSR+W+Ix9BMY3AODrg== - /postcss-colormin/4.0.3: - dependencies: - browserslist: 4.15.0 - color: 3.1.3 - has: 1.0.3 - postcss: 7.0.35 - postcss-value-parser: 3.3.1 - dev: true - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-WyQFAdDZpExQh32j0U0feWisZ0dmOtPl44qYmJKkq9xFWY3p+4qnRzCHeNrkeRhwPHz9bQ3mo0/yVkaply0MNw== - /postcss-convert-values/4.0.1: - dependencies: - postcss: 7.0.35 - postcss-value-parser: 3.3.1 - dev: true - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-Kisdo1y77KUC0Jmn0OXU/COOJbzM8cImvw1ZFsBgBgMgb1iL23Zs/LXRe3r+EZqM3vGYKdQ2YJVQ5VkJI+zEJQ== - /postcss-discard-comments/4.0.2: - dependencies: - postcss: 7.0.35 - dev: true - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-RJutN259iuRf3IW7GZyLM5Sw4GLTOH8FmsXBnv8Ab/Tc2k4SR4qbV4DNbyyY4+Sjo362SyDmW2DQ7lBSChrpkg== - /postcss-discard-duplicates/4.0.2: - dependencies: - postcss: 7.0.35 - dev: true - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-ZNQfR1gPNAiXZhgENFfEglF93pciw0WxMkJeVmw8eF+JZBbMD7jp6C67GqJAXVZP2BWbOztKfbsdmMp/k8c6oQ== - /postcss-discard-empty/4.0.1: - dependencies: - postcss: 7.0.35 - dev: true - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-B9miTzbznhDjTfjvipfHoqbWKwd0Mj+/fL5s1QOz06wufguil+Xheo4XpOnc4NqKYBCNqqEzgPv2aPBIJLox0w== - /postcss-discard-overridden/4.0.1: - dependencies: - postcss: 7.0.35 - dev: true - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-IYY2bEDD7g1XM1IDEsUT4//iEYCxAmP5oDSFMVU/JVvT7gh+l4fmjciLqGgwjdWpQIdb0Che2VX00QObS5+cTg== - /postcss-merge-longhand/4.0.11: - dependencies: - css-color-names: 0.0.4 - postcss: 7.0.35 - postcss-value-parser: 3.3.1 - stylehacks: 4.0.3 - dev: true - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-alx/zmoeXvJjp7L4mxEMjh8lxVlDFX1gqWHzaaQewwMZiVhLo42TEClKaeHbRf6J7j82ZOdTJ808RtN0ZOZwvw== - /postcss-merge-rules/4.0.3: - dependencies: - browserslist: 4.15.0 - caniuse-api: 3.0.0 - cssnano-util-same-parent: 4.0.1 - postcss: 7.0.35 - postcss-selector-parser: 3.1.2 - vendors: 1.0.4 - dev: true - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-U7e3r1SbvYzO0Jr3UT/zKBVgYYyhAz0aitvGIYOYK5CPmkNih+WDSsS5tvPrJ8YMQYlEMvsZIiqmn7HdFUaeEQ== - /postcss-minify-font-values/4.0.2: - dependencies: - postcss: 7.0.35 - postcss-value-parser: 3.3.1 - dev: true - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-j85oO6OnRU9zPf04+PZv1LYIYOprWm6IA6zkXkrJXyRveDEuQggG6tvoy8ir8ZwjLxLuGfNkCZEQG7zan+Hbtg== - /postcss-minify-gradients/4.0.2: - dependencies: - cssnano-util-get-arguments: 4.0.0 - is-color-stop: 1.1.0 - postcss: 7.0.35 - postcss-value-parser: 3.3.1 - dev: true - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-qKPfwlONdcf/AndP1U8SJ/uzIJtowHlMaSioKzebAXSG4iJthlWC9iSWznQcX4f66gIWX44RSA841HTHj3wK+Q== - /postcss-minify-params/4.0.2: - dependencies: - alphanum-sort: 1.0.2 - browserslist: 4.15.0 - cssnano-util-get-arguments: 4.0.0 - postcss: 7.0.35 - postcss-value-parser: 3.3.1 - uniqs: 2.0.0 - dev: true - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-G7eWyzEx0xL4/wiBBJxJOz48zAKV2WG3iZOqVhPet/9geefm/Px5uo1fzlHu+DOjT+m0Mmiz3jkQzVHe6wxAWg== - /postcss-minify-selectors/4.0.2: - dependencies: - alphanum-sort: 1.0.2 - has: 1.0.3 - postcss: 7.0.35 - postcss-selector-parser: 3.1.2 - dev: true - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-D5S1iViljXBj9kflQo4YutWnJmwm8VvIsU1GeXJGiG9j8CIg9zs4voPMdQDUmIxetUOh60VilsNzCiAFTOqu3g== - /postcss-modules-extract-imports/1.1.0: - dependencies: - postcss: 6.0.1 - dev: true - resolution: - integrity: sha1-thTJcgvmgW6u41+zpfqh26agXds= - /postcss-modules-local-by-default/1.2.0: - dependencies: - css-selector-tokenizer: 0.7.3 - postcss: 6.0.1 - dev: true - resolution: - integrity: sha1-99gMOYxaOT+nlkRmvRlQCn1hwGk= - /postcss-modules-scope/1.1.0: - dependencies: - css-selector-tokenizer: 0.7.3 - postcss: 6.0.1 - dev: true - resolution: - integrity: sha1-1upkmUx5+XtipytCb75gVqGUu5A= - /postcss-modules-values/1.3.0: - dependencies: - icss-replace-symbols: 1.1.0 - postcss: 6.0.1 - dev: true - resolution: - integrity: sha1-7P+p1+GSUYOJ9CrQ6D9yrsRW6iA= - /postcss-normalize-charset/4.0.1: - dependencies: - postcss: 7.0.35 - dev: true - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-gMXCrrlWh6G27U0hF3vNvR3w8I1s2wOBILvA87iNXaPvSNo5uZAMYsZG7XjCUf1eVxuPfyL4TJ7++SGZLc9A3g== - /postcss-normalize-display-values/4.0.2: - dependencies: - cssnano-util-get-match: 4.0.0 - postcss: 7.0.35 - postcss-value-parser: 3.3.1 - dev: true - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-3F2jcsaMW7+VtRMAqf/3m4cPFhPD3EFRgNs18u+k3lTJJlVe7d0YPO+bnwqo2xg8YiRpDXJI2u8A0wqJxMsQuQ== - /postcss-normalize-positions/4.0.2: - dependencies: - cssnano-util-get-arguments: 4.0.0 - has: 1.0.3 - postcss: 7.0.35 - postcss-value-parser: 3.3.1 - dev: true - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-Dlf3/9AxpxE+NF1fJxYDeggi5WwV35MXGFnnoccP/9qDtFrTArZ0D0R+iKcg5WsUd8nUYMIl8yXDCtcrT8JrdA== - /postcss-normalize-repeat-style/4.0.2: - dependencies: - cssnano-util-get-arguments: 4.0.0 - cssnano-util-get-match: 4.0.0 - postcss: 7.0.35 - postcss-value-parser: 3.3.1 - dev: true - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-qvigdYYMpSuoFs3Is/f5nHdRLJN/ITA7huIoCyqqENJe9PvPmLhNLMu7QTjPdtnVf6OcYYO5SHonx4+fbJE1+Q== - /postcss-normalize-string/4.0.2: - dependencies: - has: 1.0.3 - postcss: 7.0.35 - postcss-value-parser: 3.3.1 - dev: true - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-RrERod97Dnwqq49WNz8qo66ps0swYZDSb6rM57kN2J+aoyEAJfZ6bMx0sx/F9TIEX0xthPGCmeyiam/jXif0eA== - /postcss-normalize-timing-functions/4.0.2: - dependencies: - cssnano-util-get-match: 4.0.0 - postcss: 7.0.35 - postcss-value-parser: 3.3.1 - dev: true - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-acwJY95edP762e++00Ehq9L4sZCEcOPyaHwoaFOhIwWCDfik6YvqsYNxckee65JHLKzuNSSmAdxwD2Cud1Z54A== - /postcss-normalize-unicode/4.0.1: - dependencies: - browserslist: 4.15.0 - postcss: 7.0.35 - postcss-value-parser: 3.3.1 - dev: true - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-od18Uq2wCYn+vZ/qCOeutvHjB5jm57ToxRaMeNuf0nWVHaP9Hua56QyMF6fs/4FSUnVIw0CBPsU0K4LnBPwYwg== - /postcss-normalize-url/4.0.1: - dependencies: - is-absolute-url: 2.1.0 - normalize-url: 3.3.0 - postcss: 7.0.35 - postcss-value-parser: 3.3.1 - dev: true - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-p5oVaF4+IHwu7VpMan/SSpmpYxcJMtkGppYf0VbdH5B6hN8YNmVyJLuY9FmLQTzY3fag5ESUUHDqM+heid0UVA== - /postcss-normalize-whitespace/4.0.2: - dependencies: - postcss: 7.0.35 - postcss-value-parser: 3.3.1 - dev: true - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-tO8QIgrsI3p95r8fyqKV+ufKlSHh9hMJqACqbv2XknufqEDhDvbguXGBBqxw9nsQoXWf0qOqppziKJKHMD4GtA== - /postcss-ordered-values/4.1.2: - dependencies: - cssnano-util-get-arguments: 4.0.0 - postcss: 7.0.35 - postcss-value-parser: 3.3.1 - dev: true - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-2fCObh5UanxvSxeXrtLtlwVThBvHn6MQcu4ksNT2tsaV2Fg76R2CV98W7wNSlX+5/pFwEyaDwKLLoEV7uRybAw== - /postcss-reduce-initial/4.0.3: - dependencies: - browserslist: 4.15.0 - caniuse-api: 3.0.0 - has: 1.0.3 - postcss: 7.0.35 - dev: true - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-gKWmR5aUulSjbzOfD9AlJiHCGH6AEVLaM0AV+aSioxUDd16qXP1PCh8d1/BGVvpdWn8k/HiK7n6TjeoXN1F7DA== - /postcss-reduce-transforms/4.0.2: - dependencies: - cssnano-util-get-match: 4.0.0 - has: 1.0.3 - postcss: 7.0.35 - postcss-value-parser: 3.3.1 - dev: true - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-EEVig1Q2QJ4ELpJXMZR8Vt5DQx8/mo+dGWSR7vWXqcob2gQLyQGsionYcGKATXvQzMPn6DSN1vTN7yFximdIAg== - /postcss-selector-parser/3.1.2: - dependencies: - dot-prop: 5.3.0 - indexes-of: 1.0.1 - uniq: 1.0.1 - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA== - /postcss-selector-parser/6.0.2: - dependencies: - cssesc: 3.0.0 - indexes-of: 1.0.1 - uniq: 1.0.1 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-36P2QR59jDTOAiIkqEprfJDsoNrvwFei3eCqKd1Y0tUsBimsq39BLp7RD+JWny3WgB1zGhJX8XVePwm9k4wdBg== - /postcss-selector-parser/6.0.4: - dependencies: - cssesc: 3.0.0 - indexes-of: 1.0.1 - uniq: 1.0.1 - util-deprecate: 1.0.2 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-gjMeXBempyInaBqpp8gODmwZ52WaYsVOsfr4L4lDQ7n3ncD6mEyySiDtgzCT+NYC0mmeOLvtsF8iaEf0YT6dBw== - /postcss-svgo/4.0.2: - dependencies: - is-svg: 3.0.0 - postcss: 7.0.35 - postcss-value-parser: 3.3.1 - svgo: 1.3.2 - dev: true - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-C6wyjo3VwFm0QgBy+Fu7gCYOkCmgmClghO+pjcxvrcBKtiKt0uCF+hvbMO1fyv5BMImRK90SMb+dwUnfbGd+jw== - /postcss-unique-selectors/4.0.1: - dependencies: - alphanum-sort: 1.0.2 - postcss: 7.0.35 - uniqs: 2.0.0 - dev: true - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-+JanVaryLo9QwZjKrmJgkI4Fn8SBgRO6WXQBJi7KiAVPlmxikB5Jzc4EvXMT2H0/m0RjrVVm9rGNhZddm/8Spg== - /postcss-value-parser/3.3.1: - dev: true - resolution: - integrity: sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== - /postcss-value-parser/4.1.0: - dev: true - resolution: - integrity: sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ== - /postcss/6.0.1: - dependencies: - chalk: 1.1.3 - source-map: 0.5.7 - supports-color: 3.2.3 - dev: true - engines: - node: '>=4.0.0' - resolution: - integrity: sha1-AA29H47vIXqjaLmiEsX8QLKo8/I= - /postcss/7.0.32: - dependencies: - chalk: 2.4.2 - source-map: 0.6.1 - supports-color: 6.1.0 - dev: true - engines: - node: '>=6.0.0' - resolution: - integrity: sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw== - /postcss/7.0.35: - dependencies: - chalk: 2.4.2 - source-map: 0.6.1 - supports-color: 6.1.0 - dev: true - engines: - node: '>=6.0.0' - resolution: - integrity: sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg== - /posthtml-parser/0.4.2: - dependencies: - htmlparser2: 3.10.1 - dev: true - resolution: - integrity: sha512-BUIorsYJTvS9UhXxPTzupIztOMVNPa/HtAm9KHni9z6qEfiJ1bpOBL5DfUOL9XAc3XkLIEzBzpph+Zbm4AdRAg== - /posthtml-parser/0.5.3: - dependencies: - htmlparser2: 3.10.1 - dev: true - engines: - node: '>=10.0.0' - resolution: - integrity: sha512-uHosRn0y+1wbnlYKrqMjBPoo/kK5LPYImLtiETszNFYfFwAD3cQdD1R2E13Mh5icBxkHj+yKtlIHozCsmVWD/Q== - /posthtml-render/1.4.0: - dev: true - engines: - node: '>=10' - resolution: - integrity: sha512-W1779iVHGfq0Fvh2PROhCe2QhB8mEErgqzo1wpIt36tCgChafP+hbXIhLDOM8ePJrZcFs0vkNEtdibEWVqChqw== - /posthtml/0.11.6: - dependencies: - posthtml-parser: 0.4.2 - posthtml-render: 1.4.0 - dev: true - engines: - node: '>=6.0.0' - resolution: - integrity: sha512-C2hrAPzmRdpuL3iH0TDdQ6XCc9M7Dcc3zEW5BLerY65G4tWWszwv6nG/ksi6ul5i2mx22ubdljgktXCtNkydkw== - /posthtml/0.13.4: - dependencies: - posthtml-parser: 0.5.3 - posthtml-render: 1.4.0 - dev: true - engines: - node: '>=10.0.0' - resolution: - integrity: sha512-i2oTo/+dwXGC6zaAQSF6WZEQSbEqu10hsvg01DWzGAfZmy31Iiy9ktPh9nnXDfZiYytjxTIvxoK4TI0uk4QWpw== - /prebuild-install/5.3.6: - dependencies: - detect-libc: 1.0.3 - expand-template: 2.0.3 - github-from-package: 0.0.0 - minimist: 1.2.5 - mkdirp-classic: 0.5.3 - napi-build-utils: 1.0.2 - node-abi: 2.19.3 - noop-logger: 0.1.1 - npmlog: 4.1.2 - pump: 3.0.0 - rc: 1.2.8 - simple-get: 3.1.0 - tar-fs: 2.1.1 - tunnel-agent: 0.6.0 - which-pm-runs: 1.0.0 - dev: true - engines: - node: '>=6' - hasBin: true - resolution: - integrity: sha512-s8Aai8++QQGi4sSbs/M1Qku62PFK49Jm1CbgXklGz4nmHveDq0wzJkg7Na5QbnO1uNH8K7iqx2EQ/mV0MZEmOg== - /prelude-ls/1.1.2: - dev: true - engines: - node: '>= 0.8.0' - resolution: - integrity: sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= - /pretty-ms/5.1.0: - dependencies: - parse-ms: 2.1.0 - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-4gaK1skD2gwscCfkswYQRmddUb2GJZtzDGRjHWadVHtK/DIKFufa12MvES6/xu1tVbUYeia5bmLcwJtZJQUqnw== - /process-nextick-args/2.0.1: - dev: true - resolution: - integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== - /process/0.11.10: - dev: true - engines: - node: '>= 0.6.0' - resolution: - integrity: sha1-czIwDoQBYb2j5podHZGn1LwW8YI= - /prompts/2.4.0: - dependencies: - kleur: 3.0.3 - sisteransi: 1.0.5 - dev: true - engines: - node: '>= 6' - resolution: - integrity: sha512-awZAKrk3vN6CroQukBL+R9051a4R3zCZBlJm/HBfrSZ8iTpYix3VX1vU4mveiLpiwmOJT4wokTF9m6HUk4KqWQ== - /pseudomap/1.0.2: - dev: true - resolution: - integrity: sha1-8FKijacOYYkX7wqKw0wa5aaChrM= - /psl/1.8.0: - dev: true - resolution: - integrity: sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== - /public-encrypt/4.0.3: - dependencies: - bn.js: 4.11.9 - browserify-rsa: 4.1.0 - create-hash: 1.2.0 - parse-asn1: 5.1.6 - randombytes: 2.1.0 - safe-buffer: 5.2.1 - dev: true - resolution: - integrity: sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== - /pump/3.0.0: - dependencies: - end-of-stream: 1.4.4 - once: 1.4.0 - dev: true - resolution: - integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== - /punycode/1.3.2: - dev: true - resolution: - integrity: sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= - /punycode/1.4.1: - dev: true - resolution: - integrity: sha1-wNWmOycYgArY4esPpSachN1BhF4= - /punycode/2.1.1: - dev: true - engines: - node: '>=6' - resolution: - integrity: sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - /purgecss/2.3.0: - dependencies: - commander: 5.1.0 - glob: 7.1.6 - postcss: 7.0.32 - postcss-selector-parser: 6.0.4 - dev: true - hasBin: true - resolution: - integrity: sha512-BE5CROfVGsx2XIhxGuZAT7rTH9lLeQx/6M0P7DTXQH4IUc3BBzs9JUzt4yzGf3JrH9enkeq6YJBe9CTtkm1WmQ== - /q/1.5.1: - dev: true - engines: - node: '>=0.6.0' - teleport: '>=0.2.0' - resolution: - integrity: sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= - /qs/6.5.2: - dev: true - engines: - node: '>=0.6' - resolution: - integrity: sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== - /querystring-es3/0.2.1: - dev: true - engines: - node: '>=0.4.x' - resolution: - integrity: sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM= - /querystring/0.2.0: - dev: true - engines: - node: '>=0.4.x' - resolution: - integrity: sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= - /quote-stream/1.0.2: - dependencies: - buffer-equal: 0.0.1 - minimist: 1.2.5 - through2: 2.0.5 - dev: true - hasBin: true - resolution: - integrity: sha1-hJY/jJwmuULhU/7rU6rnRlK34LI= - /randombytes/2.1.0: - dependencies: - safe-buffer: 5.2.1 - dev: true - resolution: - integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - /randomfill/1.0.4: - dependencies: - randombytes: 2.1.0 - safe-buffer: 5.2.1 - dev: true - resolution: - integrity: sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== - /range-parser/1.2.1: - dev: true - engines: - node: '>= 0.6' - resolution: - integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== - /rc/1.2.8: - dependencies: - deep-extend: 0.6.0 - ini: 1.3.8 - minimist: 1.2.5 - strip-json-comments: 2.0.1 - dev: true - hasBin: true - resolution: - integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== - /readable-stream/1.0.34: - dependencies: - core-util-is: 1.0.2 - inherits: 2.0.4 - isarray: 0.0.1 - string_decoder: 0.10.31 - dev: true - resolution: - integrity: sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw= - /readable-stream/2.3.7: - dependencies: - core-util-is: 1.0.2 - inherits: 2.0.4 - isarray: 1.0.0 - process-nextick-args: 2.0.1 - safe-buffer: 5.1.2 - string_decoder: 1.1.1 - util-deprecate: 1.0.2 - dev: true - resolution: - integrity: sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== - /readable-stream/3.6.0: - dependencies: - inherits: 2.0.4 - string_decoder: 1.3.0 - util-deprecate: 1.0.2 - dev: true - engines: - node: '>= 6' - resolution: - integrity: sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== - /readdirp/2.2.1: - dependencies: - graceful-fs: 4.2.4 - micromatch: 3.1.10 - readable-stream: 2.3.7 - dev: true - engines: - node: '>=0.10' - resolution: - integrity: sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== - /readdirp/3.5.0: - dependencies: - picomatch: 2.2.2 - dev: true - engines: - node: '>=8.10.0' - resolution: - integrity: sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ== - /regenerate-unicode-properties/8.2.0: - dependencies: - regenerate: 1.4.2 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA== - /regenerate/1.4.2: - dev: true - resolution: - integrity: sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== - /regenerator-runtime/0.11.1: - dev: true - resolution: - integrity: sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== - /regenerator-runtime/0.13.7: - dev: true - resolution: - integrity: sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew== - /regenerator-transform/0.14.5: - dependencies: - '@babel/runtime': 7.12.5 - dev: true - resolution: - integrity: sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw== - /regex-not/1.0.2: - dependencies: - extend-shallow: 3.0.2 - safe-regex: 1.1.0 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== - /regexpu-core/4.7.1: - dependencies: - regenerate: 1.4.2 - regenerate-unicode-properties: 8.2.0 - regjsgen: 0.5.2 - regjsparser: 0.6.4 - unicode-match-property-ecmascript: 1.0.4 - unicode-match-property-value-ecmascript: 1.2.0 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ== - /regjsgen/0.5.2: - dev: true - resolution: - integrity: sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A== - /regjsparser/0.6.4: - dependencies: - jsesc: 0.5.0 - dev: true - hasBin: true - resolution: - integrity: sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw== - /relateurl/0.2.7: - dev: true - engines: - node: '>= 0.10' - resolution: - integrity: sha1-VNvzd+UUQKypCkzSdGANP/LYiKk= - /remove-trailing-separator/1.1.0: - dev: true - resolution: - integrity: sha1-wkvOKig62tW8P1jg1IJJuSN52O8= - /repeat-element/1.1.3: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g== - /repeat-string/1.6.1: - dev: true - engines: - node: '>=0.10' - resolution: - integrity: sha1-jcrkcOHIirwtYA//Sndihtp15jc= - /request-promise-core/1.1.4_request@2.88.2: - dependencies: - lodash: 4.17.20 - request: 2.88.2 - dev: true - engines: - node: '>=0.10.0' - peerDependencies: - request: ^2.34 - resolution: - integrity: sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw== - /request-promise-native/1.0.9_request@2.88.2: - dependencies: - request: 2.88.2 - request-promise-core: 1.1.4_request@2.88.2 - stealthy-require: 1.1.1 - tough-cookie: 2.5.0 - deprecated: 'request-promise-native has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142' - dev: true - engines: - node: '>=0.12.0' - peerDependencies: - request: ^2.34 - resolution: - integrity: sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g== - /request-promise/4.2.6_request@2.88.2: - dependencies: - bluebird: 3.7.2 - request: 2.88.2 - request-promise-core: 1.1.4_request@2.88.2 - stealthy-require: 1.1.1 - tough-cookie: 2.5.0 - deprecated: 'request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142' - dev: true - engines: - node: '>=0.10.0' - peerDependencies: - request: ^2.34 - resolution: - integrity: sha512-HCHI3DJJUakkOr8fNoCc73E5nU5bqITjOYFMDrKHYOXWXrgD/SBaC7LjwuPymUprRyuF06UK7hd/lMHkmUXglQ== - /request/2.88.2: - dependencies: - aws-sign2: 0.7.0 - aws4: 1.11.0 - caseless: 0.12.0 - combined-stream: 1.0.8 - extend: 3.0.2 - forever-agent: 0.6.1 - form-data: 2.3.3 - har-validator: 5.1.5 - http-signature: 1.2.0 - is-typedarray: 1.0.0 - isstream: 0.1.2 - json-stringify-safe: 5.0.1 - mime-types: 2.1.27 - oauth-sign: 0.9.0 - performance-now: 2.1.0 - qs: 6.5.2 - safe-buffer: 5.2.1 - tough-cookie: 2.5.0 - tunnel-agent: 0.6.0 - uuid: 3.4.0 - deprecated: 'request has been deprecated, see https://github.com/request/request/issues/3142' - dev: true - engines: - node: '>= 6' - resolution: - integrity: sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== - /resolve-from/3.0.0: - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-six699nWiBvItuZTM17rywoYh0g= - /resolve-url/0.2.1: - deprecated: 'https://github.com/lydell/resolve-url#deprecated' - dev: true - resolution: - integrity: sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= - /resolve/0.6.3: - dev: true - resolution: - integrity: sha1-3ZV5gufnNt699TtYpN2RdUV13UY= - /resolve/1.19.0: - dependencies: - is-core-module: 2.2.0 - path-parse: 1.0.6 - dev: true - resolution: - integrity: sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== - /responselike/2.0.0: - dependencies: - lowercase-keys: 2.0.0 - dev: true - resolution: - integrity: sha512-xH48u3FTB9VsZw7R+vvgaKeLKzT6jOogbQhEe/jewwnZgzPcnyWui2Av6JpoYZF/91uueC+lqhWqeURw5/qhCw== - /restore-cursor/2.0.0: - dependencies: - onetime: 2.0.1 - signal-exit: 3.0.3 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-n37ih/gv0ybU/RYpI9YhKe7g368= - /restore-cursor/3.1.0: - dependencies: - onetime: 5.1.2 - signal-exit: 3.0.3 - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== - /ret/0.1.15: - dev: true - engines: - node: '>=0.12' - resolution: - integrity: sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== - /rgb-regex/1.0.1: - dev: true - resolution: - integrity: sha1-wODWiC3w4jviVKR16O3UGRX+rrE= - /rgba-regex/1.0.0: - dev: true - resolution: - integrity: sha1-QzdOLiyglosO8VI0YLfXMP8i7rM= - /rimraf/2.6.3: - dependencies: - glob: 7.1.6 - dev: true - hasBin: true - resolution: - integrity: sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== - /rimraf/2.7.1: - dependencies: - glob: 7.1.6 - dev: true - hasBin: true - resolution: - integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== - /ripemd160/2.0.2: - dependencies: - hash-base: 3.1.0 - inherits: 2.0.4 - dev: true - resolution: - integrity: sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== - /safe-buffer/5.1.2: - dev: true - resolution: - integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - /safe-buffer/5.2.1: - dev: true - resolution: - integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - /safe-regex/1.1.0: - dependencies: - ret: 0.1.15 - dev: true - resolution: - integrity: sha1-QKNmnzsHfR6UPURinhV91IAjvy4= - /safer-buffer/2.1.2: - dev: true - resolution: - integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - /sax/1.2.4: - dev: true - resolution: - integrity: sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== - /saxes/3.1.11: - dependencies: - xmlchars: 2.2.0 - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-Ydydq3zC+WYDJK1+gRxRapLIED9PWeSuuS41wqyoRmzvhhh9nc+QQrVMKJYzJFULazeGhzSV0QleN2wD3boh2g== - /semver/5.7.1: - dev: true - hasBin: true - resolution: - integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - /semver/7.0.0: - dev: true - hasBin: true - resolution: - integrity: sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== - /semver/7.3.4: - dependencies: - lru-cache: 6.0.0 - dev: true - engines: - node: '>=10' - hasBin: true - resolution: - integrity: sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== - /send/0.17.1: - dependencies: - debug: 2.6.9 - depd: 1.1.2 - destroy: 1.0.4 - encodeurl: 1.0.2 - escape-html: 1.0.3 - etag: 1.8.1 - fresh: 0.5.2 - http-errors: 1.7.3 - mime: 1.6.0 - ms: 2.1.1 - on-finished: 2.3.0 - range-parser: 1.2.1 - statuses: 1.5.0 - dev: true - engines: - node: '>= 0.8.0' - resolution: - integrity: sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg== - /serialize-to-js/3.1.1: - dev: true - engines: - node: '>=4.0.0' - resolution: - integrity: sha512-F+NGU0UHMBO4Q965tjw7rvieNVjlH6Lqi2emq/Lc9LUURYJbiCzmpi4Cy1OOjjVPtxu0c+NE85LU6968Wko5ZA== - /serve-static/1.14.1: - dependencies: - encodeurl: 1.0.2 - escape-html: 1.0.3 - parseurl: 1.3.3 - send: 0.17.1 - dev: true - engines: - node: '>= 0.8.0' - resolution: - integrity: sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg== - /set-blocking/2.0.0: - dev: true - resolution: - integrity: sha1-BF+XgtARrppoA93TgrJDkrPYkPc= - /set-value/2.0.1: - dependencies: - extend-shallow: 2.0.1 - is-extendable: 0.1.1 - is-plain-object: 2.0.4 - split-string: 3.1.0 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== - /setimmediate/1.0.5: - dev: true - resolution: - integrity: sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= - /setprototypeof/1.1.1: - dev: true - resolution: - integrity: sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== - /sha.js/2.4.11: - dependencies: - inherits: 2.0.4 - safe-buffer: 5.2.1 - dev: true - hasBin: true - resolution: - integrity: sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== - /shallow-copy/0.0.1: - dev: true - resolution: - integrity: sha1-QV9CcC1z2BAzApLMXuhurhoRoXA= - /sharp/0.25.4: - dependencies: - color: 3.1.3 - detect-libc: 1.0.3 - node-addon-api: 3.0.2 - npmlog: 4.1.2 - prebuild-install: 5.3.6 - semver: 7.3.4 - simple-get: 4.0.0 - tar: 6.0.5 - tunnel-agent: 0.6.0 - dev: true - engines: - node: '>=10' - requiresBuild: true - resolution: - integrity: sha512-umSzJJ1oBwIOfwFFt/fJ7JgCva9FvrEU2cbbm7u/3hSDZhXvkME8WE5qpaJqLIe2Har5msF5UG4CzYlEg5o3BQ== - /shebang-command/1.2.0: - dependencies: - shebang-regex: 1.0.0 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= - /shebang-command/2.0.0: - dependencies: - shebang-regex: 3.0.0 - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - /shebang-regex/1.0.0: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= - /shebang-regex/3.0.0: - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - /signal-exit/3.0.3: - dev: true - resolution: - integrity: sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== - /simple-concat/1.0.1: - dev: true - resolution: - integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== - /simple-get/3.1.0: - dependencies: - decompress-response: 4.2.1 - once: 1.4.0 - simple-concat: 1.0.1 - dev: true - resolution: - integrity: sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA== - /simple-get/4.0.0: - dependencies: - decompress-response: 6.0.0 - once: 1.4.0 - simple-concat: 1.0.1 - dev: true - resolution: - integrity: sha512-ZalZGexYr3TA0SwySsr5HlgOOinS4Jsa8YB2GJ6lUNAazyAu4KG/VmzMTwAt2YVXzzVj8QmefmAonZIK2BSGcQ== - /simple-swizzle/0.2.2: - dependencies: - is-arrayish: 0.3.2 - dev: true - resolution: - integrity: sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo= - /sisteransi/1.0.5: - dev: true - resolution: - integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== - /snapdragon-node/2.1.1: - dependencies: - define-property: 1.0.0 - isobject: 3.0.1 - snapdragon-util: 3.0.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== - /snapdragon-util/3.0.1: - dependencies: - kind-of: 3.2.2 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== - /snapdragon/0.8.2: - dependencies: - base: 0.11.2 - debug: 2.6.9 - define-property: 0.2.5 - extend-shallow: 2.0.1 - map-cache: 0.2.2 - source-map: 0.5.7 - source-map-resolve: 0.5.3 - use: 3.1.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== - /source-map-resolve/0.5.3: - dependencies: - atob: 2.1.2 - decode-uri-component: 0.2.0 - resolve-url: 0.2.1 - source-map-url: 0.4.0 - urix: 0.1.0 - dev: true - resolution: - integrity: sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== - /source-map-support/0.5.19: - dependencies: - buffer-from: 1.1.1 - source-map: 0.6.1 - dev: true - resolution: - integrity: sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== - /source-map-url/0.4.0: - dev: true - resolution: - integrity: sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM= - /source-map/0.5.7: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= - /source-map/0.6.1: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - /split-string/3.1.0: - dependencies: - extend-shallow: 3.0.2 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== - /sprintf-js/1.0.3: - dev: true - resolution: - integrity: sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= - /srcset/3.0.0: - dev: true - engines: - node: '>=10' - resolution: - integrity: sha512-D59vF08Qzu/C4GAOXVgMTLfgryt5fyWo93FZyhEWANo0PokFz/iWdDe13mX3O5TRf6l8vMTqckAfR4zPiaH0yQ== - /sshpk/1.16.1: - dependencies: - asn1: 0.2.4 - assert-plus: 1.0.0 - bcrypt-pbkdf: 1.0.2 - dashdash: 1.14.1 - ecc-jsbn: 0.1.2 - getpass: 0.1.7 - jsbn: 0.1.1 - safer-buffer: 2.1.2 - tweetnacl: 0.14.5 - dev: true - engines: - node: '>=0.10.0' - hasBin: true - resolution: - integrity: sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== - /stable/0.1.8: - dev: true - resolution: - integrity: sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w== - /static-eval/2.1.0: - dependencies: - escodegen: 1.14.3 - dev: true - resolution: - integrity: sha512-agtxZ/kWSsCkI5E4QifRwsaPs0P0JmZV6dkLz6ILYfFYQGn+5plctanRN+IC8dJRiFkyXHrwEE3W9Wmx67uDbw== - /static-extend/0.1.2: - dependencies: - define-property: 0.2.5 - object-copy: 0.1.0 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= - /static-module/2.2.5: - dependencies: - concat-stream: 1.6.2 - convert-source-map: 1.7.0 - duplexer2: 0.1.4 - escodegen: 1.9.1 - falafel: 2.2.4 - has: 1.0.3 - magic-string: 0.22.5 - merge-source-map: 1.0.4 - object-inspect: 1.4.1 - quote-stream: 1.0.2 - readable-stream: 2.3.7 - shallow-copy: 0.0.1 - static-eval: 2.1.0 - through2: 2.0.5 - dev: true - resolution: - integrity: sha512-D8vv82E/Kpmz3TXHKG8PPsCPg+RAX6cbCOyvjM6x04qZtQ47EtJFVwRsdov3n5d6/6ynrOY9XB4JkaZwB2xoRQ== - /statuses/1.5.0: - dev: true - engines: - node: '>= 0.6' - resolution: - integrity: sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= - /stealthy-require/1.1.1: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks= - /stream-browserify/2.0.2: - dependencies: - inherits: 2.0.4 - readable-stream: 2.3.7 - dev: true - resolution: - integrity: sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg== - /stream-http/2.8.3: - dependencies: - builtin-status-codes: 3.0.0 - inherits: 2.0.4 - readable-stream: 2.3.7 - to-arraybuffer: 1.0.1 - xtend: 4.0.2 - dev: true - resolution: - integrity: sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw== - /string-width/1.0.2: - dependencies: - code-point-at: 1.1.0 - is-fullwidth-code-point: 1.0.0 - strip-ansi: 3.0.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= - /string-width/4.2.0: - dependencies: - emoji-regex: 8.0.0 - is-fullwidth-code-point: 3.0.0 - strip-ansi: 6.0.0 - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg== - /string.prototype.trimend/1.0.3: - dependencies: - call-bind: 1.0.0 - define-properties: 1.1.3 - dev: true - resolution: - integrity: sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw== - /string.prototype.trimstart/1.0.3: - dependencies: - call-bind: 1.0.0 - define-properties: 1.1.3 - dev: true - resolution: - integrity: sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg== - /string_decoder/0.10.31: - dev: true - resolution: - integrity: sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= - /string_decoder/1.1.1: - dependencies: - safe-buffer: 5.1.2 - dev: true - resolution: - integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - /string_decoder/1.3.0: - dependencies: - safe-buffer: 5.2.1 - dev: true - resolution: - integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - /strip-ansi/3.0.1: - dependencies: - ansi-regex: 2.1.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= - /strip-ansi/4.0.0: - dependencies: - ansi-regex: 3.0.0 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-qEeQIusaw2iocTibY1JixQXuNo8= - /strip-ansi/5.2.0: - dependencies: - ansi-regex: 4.1.0 - dev: true - engines: - node: '>=6' - resolution: - integrity: sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== - /strip-ansi/6.0.0: - dependencies: - ansi-regex: 5.0.0 - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== - /strip-json-comments/2.0.1: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-PFMZQukIwml8DsNEhYwobHygpgo= - /stylehacks/4.0.3: - dependencies: - browserslist: 4.15.0 - postcss: 7.0.35 - postcss-selector-parser: 3.1.2 - dev: true - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-7GlLk9JwlElY4Y6a/rmbH2MhVlTyVmiJd1PfTCqFaIBEGMYNsrO/v3SeGTdhBThLg4Z+NbOk/qFMwCa+J+3p/g== - /supports-color/2.0.0: - dev: true - engines: - node: '>=0.8.0' - resolution: - integrity: sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= - /supports-color/3.2.3: - dependencies: - has-flag: 1.0.0 - dev: true - engines: - node: '>=0.8.0' - resolution: - integrity: sha1-ZawFBLOVQXHYpklGsq48u4pfVPY= - /supports-color/5.5.0: - dependencies: - has-flag: 3.0.0 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - /supports-color/6.1.0: - dependencies: - has-flag: 3.0.0 - dev: true - engines: - node: '>=6' - resolution: - integrity: sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== - /supports-color/7.2.0: - dependencies: - has-flag: 4.0.0 - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - /supports-hyperlinks/2.1.0: - dependencies: - has-flag: 4.0.0 - supports-color: 7.2.0 - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-zoE5/e+dnEijk6ASB6/qrK+oYdm2do1hjoLWrqUC/8WEIW1gbxFcKuBof7sW8ArN6e+AYvsE8HBGiVRWL/F5CA== - /svgo/1.3.2: - dependencies: - chalk: 2.4.2 - coa: 2.0.2 - css-select: 2.1.0 - css-select-base-adapter: 0.1.1 - css-tree: 1.0.0-alpha.37 - csso: 4.2.0 - js-yaml: 3.14.0 - mkdirp: 0.5.5 - object.values: 1.1.2 - sax: 1.2.4 - stable: 0.1.8 - unquote: 1.1.1 - util.promisify: 1.0.1 - dev: true - engines: - node: '>=4.0.0' - hasBin: true - resolution: - integrity: sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw== - /symbol-tree/3.2.4: - dev: true - resolution: - integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== - /tar-fs/2.1.1: - dependencies: - chownr: 1.1.4 - mkdirp-classic: 0.5.3 - pump: 3.0.0 - tar-stream: 2.1.4 - dev: true - resolution: - integrity: sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng== - /tar-stream/2.1.4: - dependencies: - bl: 4.0.3 - end-of-stream: 1.4.4 - fs-constants: 1.0.0 - inherits: 2.0.4 - readable-stream: 3.6.0 - dev: true - engines: - node: '>=6' - resolution: - integrity: sha512-o3pS2zlG4gxr67GmFYBLlq+dM8gyRGUOvsrHclSkvtVtQbjV0s/+ZE8OpICbaj8clrX3tjeHngYGP7rweaBnuw== - /tar/4.4.13: - dependencies: - chownr: 1.1.4 - fs-minipass: 1.2.7 - minipass: 2.9.0 - minizlib: 1.3.3 - mkdirp: 0.5.5 - safe-buffer: 5.2.1 - yallist: 3.1.1 - dev: true - engines: - node: '>=4.5' - resolution: - integrity: sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== - /tar/6.0.5: - dependencies: - chownr: 2.0.0 - fs-minipass: 2.1.0 - minipass: 3.1.3 - minizlib: 2.1.2 - mkdirp: 1.0.4 - yallist: 4.0.0 - dev: true - engines: - node: '>= 10' - resolution: - integrity: sha512-0b4HOimQHj9nXNEAA7zWwMM91Zhhba3pspja6sQbgTpynOJf+bkjBnfybNYzbpLbnwXnbyB4LOREvlyXLkCHSg== - /temp/0.9.4: - dependencies: - mkdirp: 0.5.5 - rimraf: 2.6.3 - dev: true - engines: - node: '>=6.0.0' - resolution: - integrity: sha512-yYrrsWnrXMcdsnu/7YMYAofM1ktpL5By7vZhf15CrXijWWrEYZks5AXBudalfSWJLlnen/QUJUB5aoB0kqZUGA== - /terminal-link/2.1.1: - dependencies: - ansi-escapes: 4.3.1 - supports-hyperlinks: 2.1.0 - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ== - /terser/3.17.0: - dependencies: - commander: 2.20.3 - source-map: 0.6.1 - source-map-support: 0.5.19 - dev: true - engines: - node: '>=6.0.0' - hasBin: true - resolution: - integrity: sha512-/FQzzPJmCpjAH9Xvk2paiWrFq+5M6aVOf+2KRbwhByISDX/EujxsK+BAvrhb6H+2rtrLCHK9N01wO014vrIwVQ== - /terser/4.8.0: - dependencies: - commander: 2.20.3 - source-map: 0.6.1 - source-map-support: 0.5.19 - dev: true - engines: - node: '>=6.0.0' - hasBin: true - resolution: - integrity: sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw== - /through2/0.6.5: - dependencies: - readable-stream: 1.0.34 - xtend: 4.0.2 - dev: true - resolution: - integrity: sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg= - /through2/2.0.5: - dependencies: - readable-stream: 2.3.7 - xtend: 4.0.2 - dev: true - resolution: - integrity: sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== - /timers-browserify/2.0.12: - dependencies: - setimmediate: 1.0.5 - dev: true - engines: - node: '>=0.6.0' - resolution: - integrity: sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ== - /timsort/0.3.0: - dev: true - resolution: - integrity: sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q= - /tiny-inflate/1.0.3: - dev: true - resolution: - integrity: sha512-pkY1fj1cKHb2seWDy0B16HeWyczlJA9/WW3u3c4z/NiWDsO3DOU5D7nhTLE9CF0yXv/QZFY7sEJmj24dK+Rrqw== - /to-arraybuffer/1.0.1: - dev: true - resolution: - integrity: sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M= - /to-fast-properties/1.0.3: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= - /to-fast-properties/2.0.0: - dev: true - engines: - node: '>=4' - resolution: - integrity: sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= - /to-object-path/0.3.0: - dependencies: - kind-of: 3.2.2 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= - /to-readable-stream/2.1.0: - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-o3Qa6DGg1CEXshSdvWNX2sN4QHqg03SPq7U6jPXRahlQdl5dK8oXjkU/2/sGrnOZKeGV1zLSO8qPwyKklPPE7w== - /to-regex-range/2.1.1: - dependencies: - is-number: 3.0.0 - repeat-string: 1.6.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= - /to-regex-range/5.0.1: - dependencies: - is-number: 7.0.0 - dev: true - engines: - node: '>=8.0' - resolution: - integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - /to-regex/3.0.2: - dependencies: - define-property: 2.0.2 - extend-shallow: 3.0.2 - regex-not: 1.0.2 - safe-regex: 1.1.0 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== - /toidentifier/1.0.0: - dev: true - engines: - node: '>=0.6' - resolution: - integrity: sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== - /tough-cookie/2.5.0: - dependencies: - psl: 1.8.0 - punycode: 2.1.1 - dev: true - engines: - node: '>=0.8' - resolution: - integrity: sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== - /tr46/1.0.1: - dependencies: - punycode: 2.1.1 - dev: true - resolution: - integrity: sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk= - /traverse/0.3.9: - dev: true - resolution: - integrity: sha1-cXuPIgzAu3tE5AUUwisui7xw2Lk= - /ts-union/2.3.0: - dev: true - resolution: - integrity: sha512-OP+W9WoYvGlOMjc90D6nYz60jU1zQlXAg3VBtuSoMDejY94PaORkya9HtHjaaqqwA4I5/hN38fmKK0nSWj7jPg== - /tty-browserify/0.0.0: - dev: true - resolution: - integrity: sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY= - /tunnel-agent/0.6.0: - dependencies: - safe-buffer: 5.2.1 - dev: true - resolution: - integrity: sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= - /tweetnacl/0.14.5: - dev: true - resolution: - integrity: sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= - /type-check/0.3.2: - dependencies: - prelude-ls: 1.1.2 - dev: true - engines: - node: '>= 0.8.0' - resolution: - integrity: sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= - /type-fest/0.10.0: - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-EUV9jo4sffrwlg8s0zDhP0T2WD3pru5Xi0+HTE3zTUmBaZNhfkite9PdSJwdXLwPVW0jnAHT56pZHIOYckPEiw== - /type-fest/0.11.0: - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ== - /typedarray/0.0.6: - dev: true - resolution: - integrity: sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= - /typescript/3.9.7: - dev: true - engines: - node: '>=4.2.0' - hasBin: true - resolution: - integrity: sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw== - /typescript/4.1.2: - dev: true - engines: - node: '>=4.2.0' - hasBin: true - resolution: - integrity: sha512-thGloWsGH3SOxv1SoY7QojKi0tc+8FnOmiarEGMbd/lar7QOEd3hvlx3Fp5y6FlDUGl9L+pd4n2e+oToGMmhRQ== - /uncss/0.17.3: - dependencies: - commander: 2.20.3 - glob: 7.1.6 - is-absolute-url: 3.0.3 - is-html: 1.1.0 - jsdom: 14.1.0 - lodash: 4.17.20 - postcss: 7.0.35 - postcss-selector-parser: 6.0.2 - request: 2.88.2 - dev: true - engines: - node: '>=6.0' - hasBin: true - resolution: - integrity: sha512-ksdDWl81YWvF/X14fOSw4iu8tESDHFIeyKIeDrK6GEVTQvqJc1WlOEXqostNwOCi3qAj++4EaLsdAgPmUbEyog== - /unicode-canonical-property-names-ecmascript/1.0.4: - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ== - /unicode-match-property-ecmascript/1.0.4: - dependencies: - unicode-canonical-property-names-ecmascript: 1.0.4 - unicode-property-aliases-ecmascript: 1.1.0 - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg== - /unicode-match-property-value-ecmascript/1.2.0: - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ== - /unicode-property-aliases-ecmascript/1.1.0: - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg== - /unicode-trie/0.3.1: - dependencies: - pako: 0.2.9 - tiny-inflate: 1.0.3 - dev: true - resolution: - integrity: sha1-1nHd3YkQGgi6w3tqUWEBBgIFIIU= - /union-value/1.0.1: - dependencies: - arr-union: 3.1.0 - get-value: 2.0.6 - is-extendable: 0.1.1 - set-value: 2.0.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== - /uniq/1.0.1: - dev: true - resolution: - integrity: sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8= - /uniqs/2.0.0: - dev: true - resolution: - integrity: sha1-/+3ks2slKQaW5uFl1KWe25mOawI= - /universalify/1.0.0: - dev: true - engines: - node: '>= 10.0.0' - resolution: - integrity: sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug== - /universalify/2.0.0: - dev: true - engines: - node: '>= 10.0.0' - resolution: - integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== - /unquote/1.1.1: - dev: true - resolution: - integrity: sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ= - /unset-value/1.0.0: - dependencies: - has-value: 0.3.1 - isobject: 3.0.1 - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= - /unzip-stream/0.3.1: - dependencies: - binary: 0.3.0 - mkdirp: 0.5.5 - dev: true - resolution: - integrity: sha512-RzaGXLNt+CW+T41h1zl6pGz3EaeVhYlK+rdAap+7DxW5kqsqePO8kRtWPaCiVqdhZc86EctSPVYNix30YOMzmw== - /upath/1.2.0: - dev: true - engines: - node: '>=4' - resolution: - integrity: sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== - /uri-js/4.4.0: - dependencies: - punycode: 2.1.1 - dev: true - resolution: - integrity: sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g== - /urix/0.1.0: - deprecated: 'Please see https://github.com/lydell/urix#deprecated' - dev: true - resolution: - integrity: sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= - /url/0.11.0: - dependencies: - punycode: 1.3.2 - querystring: 0.2.0 - dev: true - resolution: - integrity: sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= - /use/3.1.1: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== - /util-deprecate/1.0.2: - dev: true - resolution: - integrity: sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= - /util.promisify/1.0.1: - dependencies: - define-properties: 1.1.3 - es-abstract: 1.17.7 - has-symbols: 1.0.1 - object.getownpropertydescriptors: 2.1.1 - dev: true - resolution: - integrity: sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA== - /util/0.10.3: - dependencies: - inherits: 2.0.1 - dev: true - resolution: - integrity: sha1-evsa/lCAUkZInj23/g7TeTNqwPk= - /util/0.10.4: - dependencies: - inherits: 2.0.3 - dev: true - resolution: - integrity: sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A== - /util/0.11.1: - dependencies: - inherits: 2.0.3 - dev: true - resolution: - integrity: sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ== - /uuid/3.4.0: - dev: true - hasBin: true - resolution: - integrity: sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== - /v8-compile-cache/2.2.0: - dev: true - resolution: - integrity: sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q== - /vendors/1.0.4: - dev: true - resolution: - integrity: sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w== - /verror/1.10.0: - dependencies: - assert-plus: 1.0.0 - core-util-is: 1.0.2 - extsprintf: 1.3.0 - dev: true - engines: - '0': node >=0.6.0 - resolution: - integrity: sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= - /vlq/0.2.3: - dev: true - resolution: - integrity: sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow== - /vm-browserify/1.1.2: - dev: true - resolution: - integrity: sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== - /w3c-hr-time/1.0.2: - dependencies: - browser-process-hrtime: 1.0.0 - dev: true - resolution: - integrity: sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ== - /w3c-xmlserializer/1.1.2: - dependencies: - domexception: 1.0.1 - webidl-conversions: 4.0.2 - xml-name-validator: 3.0.0 - dev: true - resolution: - integrity: sha512-p10l/ayESzrBMYWRID6xbuCKh2Fp77+sA0doRuGn4tTIMrrZVeqfpKjXHY+oDh3K4nLdPgNwMTVP6Vp4pvqbNg== - /wcwidth/1.0.1: - dependencies: - defaults: 1.0.3 - dev: true - resolution: - integrity: sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g= - /webidl-conversions/4.0.2: - dev: true - resolution: - integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== - /whatwg-encoding/1.0.5: - dependencies: - iconv-lite: 0.4.24 - dev: true - resolution: - integrity: sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw== - /whatwg-mimetype/2.3.0: - dev: true - resolution: - integrity: sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== - /whatwg-url/7.1.0: - dependencies: - lodash.sortby: 4.7.0 - tr46: 1.0.1 - webidl-conversions: 4.0.2 - dev: true - resolution: - integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg== - /which-pm-runs/1.0.0: - dev: true - resolution: - integrity: sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs= - /which/1.3.1: - dependencies: - isexe: 2.0.0 - dev: true - hasBin: true - resolution: - integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== - /which/2.0.2: - dependencies: - isexe: 2.0.0 - dev: true - engines: - node: '>= 8' - hasBin: true - resolution: - integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - /wide-align/1.1.3: - dependencies: - string-width: 1.0.2 - dev: true - resolution: - integrity: sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== - /word-wrap/1.2.3: - dev: true - engines: - node: '>=0.10.0' - resolution: - integrity: sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== - /wrap-ansi/6.2.0: - dependencies: - ansi-styles: 4.3.0 - string-width: 4.2.0 - strip-ansi: 6.0.0 - dev: true - engines: - node: '>=8' - resolution: - integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== - /wrappy/1.0.2: - dev: true - resolution: - integrity: sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= - /ws/5.2.2: - dependencies: - async-limiter: 1.0.1 - dev: true - resolution: - integrity: sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA== - /ws/6.2.1: - dependencies: - async-limiter: 1.0.1 - dev: true - resolution: - integrity: sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA== - /xml-name-validator/3.0.0: - dev: true - resolution: - integrity: sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== - /xmlchars/2.2.0: - dev: true - resolution: - integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== - /xtend/2.2.0: - dev: true - engines: - node: '>=0.4' - resolution: - integrity: sha1-7vax8ZjByN6vrYsXZaBNrUoBxak= - /xtend/4.0.2: - dev: true - engines: - node: '>=0.4' - resolution: - integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== - /yallist/2.1.2: - dev: true - resolution: - integrity: sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= - /yallist/3.1.1: - dev: true - resolution: - integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== - /yallist/4.0.0: - dev: true - resolution: - integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -specifiers: - elm: ^0.19.1-3 - elm-hot: ^1.1.5 - elm-optimize-level-2: ^0.1.5 - elm-review: ^2.3.3 - glslify-bundle: ^5.1.1 - glslify-deps: ^1.3.2 - localforage: ^1.9.0 - node-elm-compiler: ^5.0.5 - parcel-bundler: ^1.12.4 - parcel-plugin-ogimage: ^1.2.0 - parcel-plugin-pwa-manifest: ^3.0.10 - parcel-plugin-static-files-copy: ^2.5.0 - typescript: ^4.1.2 diff --git a/static/google4bbf71c8b6b365a6.html b/public/google4bbf71c8b6b365a6.html similarity index 100% rename from static/google4bbf71c8b6b365a6.html rename to public/google4bbf71c8b6b365a6.html diff --git a/public/icon.svg b/public/icon.svg index 092add6a..82fd7d4d 100644 --- a/public/icon.svg +++ b/public/icon.svg @@ -1,17 +1,12 @@ - + - - P - - - + + \ No newline at end of file diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 00000000..14267e90 --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Allow: / \ No newline at end of file diff --git a/src/img/screenshot.png b/public/screenshot.png similarity index 100% rename from src/img/screenshot.png rename to public/screenshot.png diff --git a/review/elm.json b/review/elm.json index e28e7534..57e58c4b 100644 --- a/review/elm.json +++ b/review/elm.json @@ -7,31 +7,32 @@ "dependencies": { "direct": { "elm/core": "1.0.5", - "elm/json": "1.1.3", - "elm/project-metadata-utils": "1.0.1", - "jfmengels/elm-review": "2.3.8", - "jfmengels/elm-review-common": "1.0.2", - "jfmengels/elm-review-unused": "1.1.4", - "stil4m/elm-syntax": "7.1.3" + "elm/json": "1.1.4", + "elm/project-metadata-utils": "1.0.2", + "jfmengels/elm-review": "2.16.4", + "jfmengels/elm-review-common": "1.3.5", + "jfmengels/elm-review-unused": "1.2.6", + "sparksp/elm-review-always": "1.0.6", + "sparksp/elm-review-imports": "1.0.2", + "stil4m/elm-syntax": "7.3.9", + "truqu/elm-review-nobooleancase": "1.0.1" }, "indirect": { - "elm/html": "1.0.0", + "elm/bytes": "1.0.8", + "elm/html": "1.0.1", "elm/parser": "1.1.0", "elm/random": "1.0.0", + "elm/regex": "1.0.0", "elm/time": "1.0.0", - "elm/url": "1.0.0", - "elm/virtual-dom": "1.0.2", - "elm-community/json-extra": "4.3.0", - "elm-community/list-extra": "8.2.4", - "elm-explorations/test": "1.2.2", + "elm/virtual-dom": "1.0.5", + "elm-explorations/test": "2.2.1", "rtfeldman/elm-hex": "1.0.0", - "rtfeldman/elm-iso8601-date-strings": "1.1.3", "stil4m/structured-writer": "1.0.3" } }, "test-dependencies": { "direct": { - "elm-explorations/test": "1.2.2" + "elm-explorations/test": "2.2.1" }, "indirect": {} } diff --git a/review/src/ReviewConfig.elm b/review/src/ReviewConfig.elm index 24fdab2c..4e365a64 100644 --- a/review/src/ReviewConfig.elm +++ b/review/src/ReviewConfig.elm @@ -1,9 +1,12 @@ module ReviewConfig exposing (config) +import NoAlways +import NoBooleanCase import NoExposingEverything import NoImportingEverything import NoMissingTypeAnnotation import NoMissingTypeExpose +import NoModuleOnExposedNames import NoUnused.CustomTypeConstructorArgs import NoUnused.CustomTypeConstructors import NoUnused.Dependencies @@ -17,16 +20,19 @@ import Review.Rule exposing (Rule) config : List Rule config = - [ NoUnused.CustomTypeConstructors.rule [] + [ NoAlways.rule + , NoBooleanCase.rule + , NoExposingEverything.rule + , NoImportingEverything.rule [] + , NoMissingTypeAnnotation.rule + , NoMissingTypeExpose.rule + , NoModuleOnExposedNames.rule , NoUnused.CustomTypeConstructorArgs.rule + , NoUnused.CustomTypeConstructors.rule [] , NoUnused.Dependencies.rule , NoUnused.Exports.rule , NoUnused.Modules.rule , NoUnused.Parameters.rule , NoUnused.Patterns.rule , NoUnused.Variables.rule - , NoExposingEverything.rule - , NoImportingEverything.rule [] - , NoMissingTypeAnnotation.rule - , NoMissingTypeExpose.rule ] diff --git a/src/dev.html b/src/dev.html deleted file mode 100644 index 2750f6aa..00000000 --- a/src/dev.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - nuPlot - - - - - - - - - - - - -
- - - - - \ No newline at end of file diff --git a/src/elm-extra/List/MyExtra.elm b/src/elm-extra/List/MyExtra.elm index 842fbc6f..8ef31833 100644 --- a/src/elm-extra/List/MyExtra.elm +++ b/src/elm-extra/List/MyExtra.elm @@ -1,9 +1,4 @@ -module List.MyExtra exposing (LeftOrRight(..), categorize, groupOneWith, unzip3) - - -unzip3 : List ( a, b, c ) -> ( List a, List b, List c ) -unzip3 = - List.foldr (\( x, y, z ) ( xs, ys, zs ) -> ( x :: xs, y :: ys, z :: zs )) ( [], [], [] ) +module List.MyExtra exposing (LeftOrRight(..), categorize, groupOneWith) groupOneWith : (a -> a -> Maybe a) -> List a -> List a diff --git a/src/elm-extra/SortedAnySet.elm b/src/elm-extra/SortedAnySet.elm index a119e81d..1f5e04b0 100644 --- a/src/elm-extra/SortedAnySet.elm +++ b/src/elm-extra/SortedAnySet.elm @@ -1,4 +1,4 @@ -module SortedAnySet exposing (SortedAnySet, empty, insert, isEmpty, member, singleton, toList) +module SortedAnySet exposing (SortedAnySet, empty, insert, member, toList) type SortedAnySet a @@ -24,16 +24,6 @@ toList (SortedAnySet list) = List.reverse list -singleton : a -> SortedAnySet a -singleton x = - SortedAnySet [ x ] - - empty : SortedAnySet a empty = SortedAnySet [] - - -isEmpty : SortedAnySet a -> Bool -isEmpty (SortedAnySet l) = - List.isEmpty l diff --git a/src/elm-extra/Trie.elm b/src/elm-extra/Trie.elm index 2c488bda..8086d401 100644 --- a/src/elm-extra/Trie.elm +++ b/src/elm-extra/Trie.elm @@ -1,7 +1,7 @@ -module Trie exposing (Trie, empty, fromList, get, getLongestPrefix, insert, isEmpty, member, size, union) +module Trie exposing (Trie, empty, fromList, get, getLongestPrefix, insert, union) import Dict exposing (Dict) -import List.Extra as List +import Maybe.MyExtra type Trie a @@ -16,30 +16,10 @@ fromList = List.foldl (\( k, v ) -> insert k v) empty -size : Trie a -> Int -size (Trie { value, children }) = - let - childrenSize = - children - |> Dict.values - |> List.map size - |> List.sum - in - if value == Nothing then - childrenSize - - else - 1 + childrenSize - - -member : String -> Trie a -> Bool -member key trie = - get key trie /= Nothing - - get : String -> Trie a -> Maybe a get key = let + go : List Char -> Trie b -> Maybe b go k (Trie { value, children }) = case k of [] -> @@ -52,14 +32,10 @@ get key = go (String.toList key) -isEmpty : Trie a -> Bool -isEmpty (Trie { value, children }) = - value == Nothing && Dict.isEmpty children - - insert : String -> a -> Trie a -> Trie a insert s v = let + go : List Char -> Trie a -> Trie a go ss ((Trie trie) as orig) = case ss of [] -> @@ -91,47 +67,28 @@ empty = union : Trie a -> Trie a -> Trie a union (Trie l) (Trie r) = - let - go x y = - case x of - [] -> - y - - (( xc, xn ) as xh) :: xt -> - case y of - [] -> - x - - (( yc, yn ) as yh) :: yt -> - if xc == yc then - ( xc, union xn yn ) :: go xt yt - - else if xc < yc then - xh :: go xt y - - else - yh :: go x yt - - value = - case l.value of - Nothing -> - r.value - - Just _ -> - l.value - in Trie - { value = value - , children = Dict.fromList <| go (Dict.toList l.children) (Dict.toList r.children) + { value = + l.value + |> Maybe.MyExtra.withDefaultMaybe r.value + , children = + Dict.merge Dict.insert + (\k lv rv -> Dict.insert k (union lv rv)) + Dict.insert + l.children + r.children + Dict.empty } getLongestPrefix : String -> Trie a -> Maybe ( String, a ) getLongestPrefix s = let + tryClose : List Char -> Maybe a -> Maybe ( String, a ) tryClose acc value = Maybe.map (\v -> ( String.fromList <| List.reverse acc, v )) value + go : List Char -> List Char -> Trie a -> Maybe ( String, a ) go cs acc (Trie { value, children }) = case cs of [] -> diff --git a/src/elm-extra/Zipper.elm b/src/elm-extra/Zipper.elm index 94231a12..527b28dc 100644 --- a/src/elm-extra/Zipper.elm +++ b/src/elm-extra/Zipper.elm @@ -24,7 +24,6 @@ module Zipper exposing ) import Codec exposing (Codec) -import List import List.Extra as List diff --git a/src/elm/API/Google.elm b/src/elm/API/Google.elm index 597872e1..2cd48d14 100644 --- a/src/elm/API/Google.elm +++ b/src/elm/API/Google.elm @@ -215,7 +215,7 @@ jsonResolver decoder = NetworkError_ -> Err NetworkError - BadStatus_ { statusCode } _ -> + BadStatus_ { statusCode } body -> case statusCode of 401 -> Err Unauthorized @@ -224,9 +224,9 @@ jsonResolver decoder = Err FileNotFound _ -> - Err (UnexpectedResponse <| Debug.toString response) + Err (UnexpectedResponse <| "BadStatus " ++ String.fromInt statusCode ++ ", body: " ++ body) GoodStatus_ _ body -> JD.decodeString decoder body - |> Result.mapError (\e -> UnexpectedResponse <| Debug.toString e) + |> Result.mapError (\e -> UnexpectedResponse <| JD.errorToString e) ) diff --git a/src/elm/Document.elm b/src/elm/Document.elm index 6c5809f3..3e78fced 100644 --- a/src/elm/Document.elm +++ b/src/elm/Document.elm @@ -48,7 +48,7 @@ type RowData type Output - = ParseError String + = ParseError (L10N String) | Parsed Expression @@ -157,18 +157,18 @@ emptyRow = parseRow : String -> ( List MetadataWithErrors, List Row ) parseRow row = let - combine e last = - case ( e.data, last.data ) of + combine curr last = + case ( curr.data, last.data ) of ( MarkdownRow, MarkdownRow ) -> Just - { input = e.input ++ "\n" ++ last.input + { input = curr.input ++ "\n" ++ last.input , editing = False , data = MarkdownRow } ( CodeRow _, CodeRow _ ) -> Just - { input = e.input ++ "\n" ++ last.input + { input = curr.input ++ "\n" ++ last.input , editing = False , data = CodeRow [] } diff --git a/src/elm/Expression.elm b/src/elm/Expression.elm index 1ba10d64..f9fdc839 100644 --- a/src/elm/Expression.elm +++ b/src/elm/Expression.elm @@ -10,6 +10,7 @@ module Expression exposing , SolutionTree(..) , UnaryOperation(..) , VariableStatus(..) + , asMatrix , defaultContext , equals , filterContext @@ -32,15 +33,13 @@ module Expression exposing , visit ) -import Char -import Complex exposing (Complex(..)) import Dict exposing (Dict) import Element.WithContext as Element exposing (Element) import Element.WithContext.Border as Border import Element.WithContext.Font -import List import Set exposing (Set) import Trie exposing (Trie) +import UI.L10N exposing (L10N, invariant) type Expression @@ -59,7 +58,7 @@ type Expression type SolutionTree = SolutionForall String - | SolutionError String + | SolutionError (L10N String) | SolutionNone String | SolutionDone Expression | SolutionStep Expression SolutionTree @@ -85,7 +84,7 @@ type KnownFunction | Tanh -- Power | Abs - | Sqrt + | Root Int | Ln | Log10 | Exp @@ -108,10 +107,14 @@ type KnownFunction | Ceiling | Pw | Plot + | APlot | Simplify | StepSimplify | Solve | Mod + | Mbrot + -- Loops + | For type UnaryOperation @@ -166,8 +169,8 @@ visit f expr = Integer i -> Integer i - UnaryOperation uop e -> - UnaryOperation uop <| visit f e + UnaryOperation uop c -> + UnaryOperation uop <| visit f c BinaryOperation bop l r -> BinaryOperation bop (visit f l) (visit f r) @@ -178,20 +181,20 @@ visit f expr = AssociativeOperation aop l r o -> AssociativeOperation aop (visit f l) (visit f r) (List.map (visit f) o) - Apply func e -> - Apply func <| List.map (visit f) e + Apply func args -> + Apply func <| List.map (visit f) args Variable v -> Variable v - Lambda x e -> - Lambda x <| visit f e + Lambda x c -> + Lambda x <| visit f c Float fl -> Float fl - Replace vars e -> - Replace (Dict.map (\_ -> Maybe.map (visit f)) vars) (visit f e) + Replace vars c -> + Replace (Dict.map (\_ -> Maybe.map (visit f)) vars) (visit f c) List es -> List <| List.map (visit f) es @@ -252,29 +255,28 @@ partialSubstitute var val = fullSubstitute : Dict String Expression -> Expression -> Expression fullSubstitute dict = - visit <| - \expr -> - case expr of - Replace vars e -> - Just <| - Replace (Dict.map (\_ -> Maybe.map <| fullSubstitute dict) vars) <| - let - reduced = - Dict.filter (\k _ -> not <| Dict.member k vars) dict - in - if Dict.isEmpty reduced then - e - - else - fullSubstitute dict e - - Variable string -> - Dict.get string dict - |> Maybe.withDefault expr - |> Just + visit <| \expr -> + case expr of + Replace vars e -> + Just <| + Replace (Dict.map (\_ -> Maybe.map <| fullSubstitute dict) vars) <| + let + reduced = + Dict.filter (\k _ -> not <| Dict.member k vars) dict + in + if Dict.isEmpty reduced then + e - _ -> - Nothing + else + fullSubstitute dict e + + Variable string -> + Dict.get string dict + |> Maybe.withDefault expr + |> Just + + _ -> + Nothing equals : Expression -> Expression -> Bool @@ -392,26 +394,28 @@ toString = >> toStringPrec 0 -solutionTreeToString : SolutionTree -> String +solutionTreeToString : SolutionTree -> L10N String solutionTreeToString tree = case tree of SolutionDone e -> - toString e + invariant <| toString e SolutionForall v -> - "∀" ++ v ++ "∈ ℝ" + invariant <| "∀" ++ v ++ "∈ ℝ" SolutionError e -> - "Error: " ++ e + { en = "Error: " ++ e.en + , it = "Errore: " ++ e.it + } SolutionNone v -> - "∄" ++ v ++ "∈ ℝ" + invariant <| "∄" ++ v ++ "∈ ℝ" SolutionStep e n -> - toString e ++ ", " ++ solutionTreeToString n + UI.L10N.map (\p -> toString e ++ ", " ++ p) (solutionTreeToString n) SolutionBranch ls -> - "(" ++ String.join ") (" (List.map solutionTreeToString ls) ++ ")" + UI.L10N.map (\ps -> "(" ++ String.join ") (" ps ++ ")") (UI.L10N.traverse solutionTreeToString ls) type PrintExpression @@ -709,7 +713,8 @@ unaryFunctions = power = [ ( "abs", Abs ) , ( "sign", Sign ) - , ( "sqrt", Sqrt ) + , ( "sqrt", Root 2 ) + , ( "cbrt", Root 3 ) , ( "ln", Ln ) , ( "log10", Log10 ) , ( "exp", Exp ) @@ -728,6 +733,7 @@ unaryFunctions = other = [ ( "plot", Plot ) + , ( "aplot", APlot ) , ( "simplify", Simplify ) , ( "stepsimplify", StepSimplify ) , ( "floor", Floor ) @@ -751,6 +757,7 @@ binaryFunctions = , ( "dd", Dd ) , ( "solve", Solve ) , ( "mod", Mod ) + , ( "mbrot", Mbrot ) ] @@ -768,6 +775,7 @@ variadicFunctions : List ( String, KnownFunction ) variadicFunctions = [ ( "min", Min ) , ( "max", Max ) + , ( "for", For ) ] @@ -875,9 +883,15 @@ functionNameToString name = KnownFunction Sign -> "sign" - KnownFunction Sqrt -> + KnownFunction (Root 2) -> "sqrt" + KnownFunction (Root 3) -> + "cbrt" + + KnownFunction (Root n) -> + "root" ++ String.fromInt n + KnownFunction Ln -> "ln" @@ -914,6 +928,9 @@ functionNameToString name = KnownFunction Plot -> "plot" + KnownFunction APlot -> + "aplot" + KnownFunction Simplify -> "simplify" @@ -941,36 +958,41 @@ functionNameToString name = KnownFunction Mod -> "mod" + KnownFunction Mbrot -> + "mbrot" + + KnownFunction For -> + "for" + UserFunction u -> u pfullSubstitute : Dict String (Maybe PrintExpression) -> PrintExpression -> PrintExpression pfullSubstitute dict = - pvisit <| - \expr -> - case expr of - PReplace vars e -> - Just <| - PReplace (Dict.map (\_ -> Maybe.map <| pfullSubstitute dict) vars) <| - let - reduced = - Dict.filter (\k _ -> not <| Dict.member k vars) dict - in - if Dict.isEmpty reduced then - e - - else - pfullSubstitute dict e - - PVariable string -> - Dict.get string dict - |> Maybe.andThen identity - |> Maybe.withDefault expr - |> Just + pvisit <| \expr -> + case expr of + PReplace vars e -> + Just <| + PReplace (Dict.map (\_ -> Maybe.map <| pfullSubstitute dict) vars) <| + let + reduced = + Dict.filter (\k _ -> not <| Dict.member k vars) dict + in + if Dict.isEmpty reduced then + e - _ -> - Nothing + else + pfullSubstitute dict e + + PVariable string -> + Dict.get string dict + |> Maybe.andThen identity + |> Maybe.withDefault expr + |> Just + + _ -> + Nothing toTeXString : Expression -> String @@ -1107,6 +1129,17 @@ asMatrixPrint = ) +asMatrix : Expression -> Maybe (List (List Expression)) +asMatrix = + genericAsMatrix <| \e -> + case e of + List es -> + Just es + + _ -> + Nothing + + genericAsMatrix : (a -> Maybe (List a)) -> a -> Maybe (List (List a)) genericAsMatrix asList mx = mx @@ -1336,6 +1369,13 @@ toTeXStringPrec p e = PAdd l (PNegate r) -> infixl_ 6 " - " l r + PAdd l (PBy (PInteger m) r) -> + if m < 0 then + infixl_ 6 " - " l (PBy (PInteger -m) r) + + else + infixl_ 6 " + " l (PBy (PInteger m) r) + PAdd l (PFloat pf) -> if pf < 0 then infixl_ 6 " - " l (PFloat -pf) @@ -1421,9 +1461,12 @@ toTeXStringPrec p e = PApply (KnownFunction Abs) [ ex ] -> paren (p > 10) <| "\\left|" ++ toTeXStringPrec 0 ex ++ "\\right|" - PApply (KnownFunction Sqrt) [ ex ] -> + PApply (KnownFunction (Root 2)) [ ex ] -> paren (p > 10) <| "\\sqrt{" ++ toTeXStringPrec 0 ex ++ "}" + PApply (KnownFunction (Root n)) [ ex ] -> + paren (p > 10) <| "\\sqrt[" ++ String.fromInt n ++ "]{" ++ toTeXStringPrec 0 ex ++ "}" + PApply name [ (PList _) as ex ] -> paren (p > 10) <| "\\mathrm{" ++ functionNameToString name ++ "}" ++ toTeXStringPrec 0 ex diff --git a/src/elm/Expression/Cleaner.elm b/src/elm/Expression/Cleaner.elm index 461da34d..f3c89e0e 100644 --- a/src/elm/Expression/Cleaner.elm +++ b/src/elm/Expression/Cleaner.elm @@ -9,10 +9,6 @@ cuts = , ( "≤", "<=" ) , ( "⩽", "<=" ) , ( "≠", "<>" ) - , ( "++", "+" ) - , ( "+-", "-" ) - , ( "-+", "-" ) - , ( "--", "+" ) , ( "**", "^" ) , ( "^-1", "^(-1)" ) , ( "²", "^(2)" ) diff --git a/src/elm/Expression/Derivative.elm b/src/elm/Expression/Derivative.elm index 6fad8692..76e57656 100644 --- a/src/elm/Expression/Derivative.elm +++ b/src/elm/Expression/Derivative.elm @@ -1,7 +1,7 @@ module Expression.Derivative exposing (derivative) -import Expression exposing (AssociativeOperation(..), BinaryOperation(..), Expression(..), UnaryOperation(..), filterContext, fullSubstitute) -import Expression.Utils exposing (by, byShort, div, ipowShort, ln_, minus, one, plus, pow, square, zero) +import Expression exposing (AssociativeOperation(..), BinaryOperation(..), Expression(..), FunctionName(..), KnownFunction(..), UnaryOperation(..), filterContext, fullSubstitute) +import Expression.Utils exposing (by, byShort, cos_, cosh_, div, e, exp, ipowShort, ln_, log10_, minus, negate_, one, plus, pow, sign, sin_, sinh_, sqrt_, square, tan_, zero) derivative : String -> Expression -> Expression @@ -79,5 +79,171 @@ derivative var expr = Replace ctx e -> derivative var <| fullSubstitute (filterContext ctx) e + Apply (KnownFunction f) [ x ] -> + case x of + Variable xv -> + if xv == var then + knownDerivative f x + + else + zero + + _ -> + by [ knownDerivative f x, derivative var x ] + + Apply (KnownFunction For) args -> + case Expression.Utils.runForLoop args of + Just result -> + derivative var <| List result + + Nothing -> + Variable "TODO" + Apply _ _ -> + --TODO + Variable "TODO" + + +knownDerivative : KnownFunction -> Expression -> Expression +knownDerivative name x = + case name of + Sin -> + cos_ x + + Cos -> + negate_ <| sin_ x + + Tan -> + plus [ one, square <| tan_ x ] + + Asin -> + div one <| sqrt_ (minus one (square x)) + + Acos -> + negate_ <| div one <| sqrt_ (minus one (square x)) + + Atan -> + div one (plus [ one, square x ]) + + Atan2 -> + --TODO + Variable "TODO" + + Sinh -> + cosh_ x + + Cosh -> + sinh_ x + + Tanh -> + div one <| square <| cosh_ x + + Abs -> + sign x + + Root n -> + let + ni = + Integer n + in + div + (pow x + (div + (Integer (1 - n)) + ni + ) + ) + ni + + Ln -> + div one x + + Log10 -> + by [ div one x, log10_ (Variable "e") ] + + Exp -> + exp x + + Sign -> zero + + Re -> + --TODO + Variable "TODO" + + Im -> + --TODO + Variable "TODO" + + Arg -> + --TODO + Variable "TODO" + + Gra -> + --TODO + Variable "TODO" + + Det -> + --TODO + Variable "TODO" + + Dd -> + --TODO + Variable "TODO" + + Ii -> + --TODO + Variable "TODO" + + Min -> + --TODO + Variable "TODO" + + Max -> + --TODO + Variable "TODO" + + Round -> + zero + + Floor -> + zero + + Ceiling -> + zero + + Pw -> + --TODO + Variable "TODO" + + Plot -> + --TODO + Variable "TODO" + + APlot -> + --TODO + Variable "TODO" + + Simplify -> + --TODO + Variable "TODO" + + StepSimplify -> + --TODO + Variable "TODO" + + Solve -> + --TODO + Variable "TODO" + + Mod -> + --TODO + Variable "TODO" + + Mbrot -> + --TODO + Variable "TODO" + + For -> + --TODO + Variable "TODO" diff --git a/src/elm/Expression/Graph.elm b/src/elm/Expression/Graph.elm index ee8c2073..0687902a 100644 --- a/src/elm/Expression/Graph.elm +++ b/src/elm/Expression/Graph.elm @@ -1,6 +1,6 @@ module Expression.Graph exposing (Graph(..), fromExpression, toExpression, toString) -import Expression exposing (Expression(..), FunctionName(..), KnownFunction(..), RelationOperation(..), getFreeVariables) +import Expression exposing (AssociativeOperation, BinaryOperation, Expression(..), FunctionName(..), KnownFunction(..), RelationOperation(..), UnaryOperation, getFreeVariables) import Expression.Simplify import Expression.Utils exposing (minus) import Set @@ -11,12 +11,23 @@ type Graph | Relation2D Expression | Implicit2D Expression Expression | Polar2D Expression + | VectorField2D Expression Expression | Parametric2D Expression Expression | Implicit3D Expression | Contour Expression | GraphList (List Graph) +type GraphExpression + = GFloat Float + | GVariable String + | GAssociative AssociativeOperation GraphExpression GraphExpression (List GraphExpression) + | GBinary BinaryOperation GraphExpression GraphExpression + | GUnary UnaryOperation GraphExpression + | GApply FunctionName (List GraphExpression) + | GList (List GraphExpression) + + fromExpression : Expression -> Graph fromExpression = let @@ -63,7 +74,12 @@ fromExpression = GraphList <| List.map fromExpression ls else - GraphList <| List.map fromExpression ls + case ls of + [ List [ x ], List [ y ] ] -> + VectorField2D x y + + _ -> + GraphList <| List.map fromExpression ls Apply (KnownFunction Simplify) [ e ] -> go <| Expression.Simplify.simplify e @@ -108,6 +124,9 @@ toString g = Contour c -> "Contour " ++ Expression.toString c + VectorField2D x y -> + "VectorField2D" ++ Expression.toString x ++ ", " ++ Expression.toString y + GraphList gs -> "GraphList [" ++ String.join ", " (List.map toString gs) ++ "]" @@ -133,6 +152,9 @@ toExpression g = Polar2D e -> e + VectorField2D x y -> + List [ x, y ] + Parametric2D x y -> List [ x, y ] diff --git a/src/elm/Expression/NumericRange.elm b/src/elm/Expression/NumericRange.elm index 4ca98010..7915662d 100644 --- a/src/elm/Expression/NumericRange.elm +++ b/src/elm/Expression/NumericRange.elm @@ -87,9 +87,12 @@ getRange ctx e = o -> o - Apply (KnownFunction Sqrt) [ c ] -> + Apply (KnownFunction (Root 2)) [ c ] -> sqrtRange <| getRange ctx c + Apply (KnownFunction (Root 3)) [ c ] -> + getRange ctx c + Apply (KnownFunction Re) [ _ ] -> Real @@ -106,6 +109,9 @@ getRange ctx e = Apply (KnownFunction Pw) [ _, t, f ] -> union (getRange ctx t) (getRange ctx f) + Apply (KnownFunction Mbrot) _ -> + Complex + Apply (KnownFunction _) args -> if List.any (\c -> getRange ctx c == Complex) args then Complex @@ -168,9 +174,28 @@ powerRange ctx brange ex = _ -> Complex + + asInteger n = + case n of + Integer i -> + Just i + + Float f -> + let + rounded = + round f + in + if toFloat rounded == f then + Just rounded + + else + Nothing + + _ -> + Nothing in - case ex of - Integer j -> + case asInteger ex of + Just j -> if abs j > 10 then default () @@ -183,7 +208,7 @@ powerRange ctx brange ex = else squareRange brange - _ -> + Nothing -> default () diff --git a/src/elm/Expression/Parser.elm b/src/elm/Expression/Parser.elm index 4970bf95..63a050ad 100644 --- a/src/elm/Expression/Parser.elm +++ b/src/elm/Expression/Parser.elm @@ -1,24 +1,14 @@ module Expression.Parser exposing (ParserContext(..), Problem(..), errorsToString, parse) import Dict exposing (Dict) -import Expression - exposing - ( AssociativeOperation(..) - , BinaryOperation(..) - , Context - , Expression(..) - , FunctionName(..) - , KnownFunction(..) - , RelationOperation(..) - , VariableStatus(..) - , defaultContext - ) +import Expression exposing (Context, Expression(..), RelationOperation(..), VariableStatus(..), defaultContext) import Expression.Cleaner as Cleaner import Expression.Utils exposing (by, div, minus, negate_, plus, pow, vector) -import List import List.Extra as List -import Parser.Advanced as Parser exposing ((|.), (|=), Parser, Step(..), Token(..), getChompedString) +import Parser.Advanced as Parser exposing ((|.), (|=), Parser, Step(..), Token(..)) import Trie exposing (Trie) +import UI.L10N exposing (L10N, invariant) +import Unicode type alias ExpressionParser a = @@ -39,123 +29,166 @@ type ParserContext | VectorContext -contextToString : ParserContext -> String +contextToString : ParserContext -> L10N String contextToString ctx = case ctx of AddSubtractionContext -> - "an addition or subtraction" + { en = "an addition or subtraction" + , it = "un addizione o una sottrazione" + } AtomContext -> - "an atom" + { en = "an atomic expression" + , it = "un espressione atomica" + } ExpressionContext -> - "an expression" + { en = "an expression" + , it = "un espressione" + } ListContext -> - "a list" + { en = "a list" + , it = "una lista" + } MultiDivisionContext -> - "a multiplication or a division" + { en = "a multiplication or a division" + , it = "una moltiplicazione o una divisione" + } NumberContext -> - "a number" + { en = "a number" + , it = "un numero" + } PowerContext -> - "an exponentiation" + { en = "an exponentiation" + , it = "un elevamento a potenza" + } ReplacementContext -> - "a replacement" + { en = "a replacement" + , it = "una sostituzione" + } ReplacementListContext -> - "a replacement list" + { en = "a replacement list" + , it = "una lista di sostituzioni" + } VariableContext -> - "a variable" + { en = "a variable" + , it = "una variabile" + } VectorContext -> - "a vector" + { en = "a vector" + , it = "un vettore" + } type Problem - = Expected String + = Expected (L10N String) | Unexpected -errorsToString : String -> List (Parser.DeadEnd ParserContext Problem) -> String +errorsToString : String -> List (Parser.DeadEnd ParserContext Problem) -> L10N String errorsToString input err = - let - errsString = - err - |> List.gatherEqualsBy (\{ col, contextStack } -> { col = col, contextStack = contextStack }) - |> List.map problemGroupToString - - problemGroupToString ( { col, contextStack, problem }, problems ) = - let - allProblems = - problem :: List.map .problem problems - - prefix = - case contextStack of - [] -> - String.repeat (col + 1) " " ++ "^ " + UI.L10N.map (String.join "\n") <| + UI.L10N.sequence <| + [ { en = "Error parsing expression:", it = "Errore nel parsing dell'espressione:" } + , invariant <| " " ++ input + ] + ++ (if List.isEmpty err then + [ { en = "No valid parse?" + , it = "Nessuna interpretazione possibile?" + } + ] - frame :: _ -> - let - pprefix = - if col == frame.col then - String.repeat (col + 1) " " + else + err + |> List.gatherEqualsBy (\{ col, contextStack } -> { col = col, contextStack = contextStack }) + |> List.map problemGroupToString + ) - else - String.repeat (frame.col + 1) " " - ++ "|" - ++ String.repeat (col - frame.col - 1) "-" - in - pprefix ++ "^ While trying to parse " ++ contextToString frame.context ++ ". " - in - String.concat - [ prefix - , if List.any ((==) Unexpected) allProblems then - if List.all ((==) Unexpected) allProblems then - "Unexpected" - else - "Unexpected, expected " - - else - "Expected " - , allProblems - |> List.filterMap - (\p -> - case p of - Unexpected -> - Nothing - - Expected e -> - Just e - ) - |> (\expecteds -> - case List.reverse expecteds of - [] -> - "" +problemGroupToString : + ( Parser.DeadEnd ParserContext Problem + , List (Parser.DeadEnd ParserContext Problem) + ) + -> L10N String +problemGroupToString ( { col, contextStack, problem }, problems ) = + let + allProblems = + problem :: List.map .problem problems - [ single ] -> - single + prefix = + case contextStack of + [] -> + invariant <| String.repeat (col + 1) " " ++ "^ " - last :: init -> - String.join ", " (List.reverse init) ++ " or " ++ last - ) - ] + frame :: _ -> + let + pprefix = + if col == frame.col then + String.repeat (col + 1) " " + + else + String.repeat (frame.col + 1) " " + ++ "|" + ++ String.repeat (col - frame.col - 1) "-" + + ctxString = + contextToString frame.context + in + { en = pprefix ++ "^ While trying to parse " ++ ctxString.en ++ ". " + , it = pprefix ++ "^ Durante il parsing di " ++ ctxString.it ++ ". " + } in - String.join "\n" <| - [ "Error parsing expression:" - , " " ++ input - ] - ++ (if List.isEmpty err then - [ "No valid parse?" ] + UI.L10N.concat + [ prefix + , if List.any ((==) Unexpected) allProblems then + if List.all ((==) Unexpected) allProblems then + { en = "Unexpected" + , it = "Inatteso" + } - else - errsString + else + { en = "Unexpected, expected " + , it = "Inatteso, atteso " + } + + else + { en = "Expected " + , it = "Atteso " + } + , allProblems + |> List.filterMap + (\p -> + case p of + Unexpected -> + Nothing + + Expected e -> + Just e + ) + |> (\expecteds -> + case List.reverse expecteds of + [] -> + invariant "" + + [ single ] -> + single + + last :: init -> + UI.L10N.concat + [ UI.L10N.map (String.join ", ") <| UI.L10N.sequence (List.reverse init) + , { en = " or ", it = " o " } + , last + ] ) + ] parse : String -> Result (List (Parser.DeadEnd ParserContext Problem)) Expression @@ -192,7 +225,12 @@ mainParser = token : String -> Token Problem token x = - Token x (Expected <| "a '" ++ x ++ "'") + Token x + (Expected + { en = "a '" ++ x ++ "'" + , it = "un '" ++ x ++ "'" + } + ) replacementParser : ExpressionParser Expression @@ -207,6 +245,14 @@ replacementParser context = |> Parser.inContext ReplacementContext +expectedALetter : Problem +expectedALetter = + Expected + { en = "a letter" + , it = "una lettera" + } + + replacementListParser : ExpressionParser (Dict String (Maybe Expression)) replacementListParser context = let @@ -218,7 +264,7 @@ replacementListParser context = |> Parser.andThen (\s -> if String.isEmpty s then - Parser.problem <| Expected "a letter" + Parser.problem expectedALetter else Parser.succeed s @@ -232,14 +278,14 @@ replacementListParser context = shortVariable = Parser.succeed (\p e -> ( p, Just e )) - |= Parser.getChompedString (Parser.chompIf isVariableLetter (Expected "a letter")) + |= Parser.getChompedString (Parser.chompIf isVariableLetter expectedALetter) |. whitespace |. (Parser.chompWhile ((==) '=') |> Parser.getChompedString |> Parser.andThen (\s -> if String.length s > 1 then - Parser.problem <| Expected "0 or 1 '='" + Parser.problem <| Expected { en = "0 or 1 '='", it = "0 o 1 '='" } else Parser.succeed () @@ -256,7 +302,7 @@ replacementListParser context = |> Parser.andThen (\s -> if String.isEmpty s then - Parser.problem <| Expected "a letter" + Parser.problem expectedALetter else Parser.succeed s @@ -334,7 +380,11 @@ relationParser context = Parser.succeed <| Lambda v r _ -> - Parser.problem <| Expected "left side of lambda" + Parser.problem <| + Expected + { en = "left side of lambda" + , it = "la parte sinistra di una lambda" + } ) |. Parser.symbol (token "=>") |. whitespace @@ -373,17 +423,37 @@ addsubtractionParser context = multidivisionParser : ExpressionParser Expression multidivisionParser context = - Parser.inContext MultiDivisionContext <| - multiSequence - { separators = - [ ( \l r -> by [ l, r ], \_ -> Parser.symbol <| token "*" ) - , ( \l r -> div l r, \_ -> Parser.symbol <| token "/" ) - , ( \l r -> by [ l, r ], \_ -> Parser.succeed () ) + let + signLoopStep b = + Parser.oneOf + [ Parser.succeed (Loop <| not b) + |. Parser.symbol (token "-") + , Parser.succeed (Loop b) + |. Parser.symbol (token "+") + , Parser.succeed + (Done <| + if b then + negate_ + + else + identity + ) ] - , item = powerParser - , allowNegation = True - } - context + in + Parser.inContext MultiDivisionContext <| + Parser.succeed (\maybeNegate md -> maybeNegate md) + |= Parser.loop False signLoopStep + |. whitespace + |= multiSequence + { separators = + [ ( \l r -> by [ l, r ], \_ -> Parser.symbol <| token "*" ) + , ( \l r -> div l r, \_ -> Parser.symbol <| token "/" ) + , ( \l r -> by [ l, r ], \_ -> Parser.succeed () ) + ] + , item = powerParser + , allowNegation = True + } + context powerParser : ExpressionParser Expression @@ -411,11 +481,6 @@ type alias SequenceData = multiSequence : SequenceData -> ExpressionParser Expression multiSequence data context = Parser.succeed identity - |= Parser.oneOf - [ Parser.succeed negate_ - |. Parser.symbol (token "-") - , Parser.succeed identity - ] |= data.item context |> Parser.andThen (\first -> @@ -493,9 +558,14 @@ atomParser context = , Parser.inContext VariableContext <| variableParser context , Parser.inContext NumberContext <| Parser.andThen tryParseNumber <| - getChompedString <| + Parser.getChompedString <| Parser.succeed () - |. Parser.chompIf (\c -> c == '.' || Char.isDigit c) (Expected "a digit, or a dot") + |. Parser.chompIf (\c -> c == '.' || Char.isDigit c) + (Expected + { en = "a digit, or a dot" + , it = "una cifra, o un punto" + } + ) |. Parser.chompWhile (\c -> c == '.' || Char.isDigit c) ] @@ -512,7 +582,12 @@ tryParseNumber n = Parser.succeed <| Float f Nothing -> - Parser.problem (Expected "a number") + Parser.problem + (Expected + { en = "a number" + , it = "un numero" + } + ) optional : Parser c x () -> Parser c x () @@ -559,7 +634,7 @@ variableParser context = [ Parser.succeed Just |. Parser.symbol (token "(") |. whitespace - |= parseArgs arity True context + |= parseArgs Nothing True context |. Parser.oneOf [ Parser.symbol (token ")"), Parser.succeed () ] |. whitespace , Parser.map Just <| parseArgs arity False context @@ -574,7 +649,21 @@ variableParser context = |. chomp (String.length name) Nothing -> - Parser.problem (Expected "a letter") + let + l = + String.left 1 rest + in + case String.toList l of + [ v ] -> + if isVariableLetter v then + Parser.succeed (Variable l) + |. chomp 1 + + else + Parser.problem expectedALetter + + _ -> + Parser.problem expectedALetter ) @@ -647,5 +736,5 @@ parseArgs count greedy context = isVariableLetter : Char -> Bool -isVariableLetter c = - Char.isAlpha c || (Char.toCode c >= Char.toCode 'Ά' && Char.toCode c <= Char.toCode 'Ͽ') +isVariableLetter = + Unicode.isAlpha diff --git a/src/elm/Expression/Polynomial.elm b/src/elm/Expression/Polynomial.elm new file mode 100644 index 00000000..3e03c3ff --- /dev/null +++ b/src/elm/Expression/Polynomial.elm @@ -0,0 +1,157 @@ +module Expression.Polynomial exposing (Exponents, Polynomial, asPolynomial) + +import Dict exposing (Dict) +import Expression exposing (AssociativeOperation(..), BinaryOperation(..), Expression(..), UnaryOperation(..)) +import Expression.Utils exposing (byShort, div, negateShort, one, plusShort) +import List.Extra as List +import List.MyExtra as List +import Maybe.Extra as Maybe + + +type alias Exponents = + List ( String, Int ) + + +type alias Polynomial = + Dict Exponents Expression + + +asPolynomial : List String -> Expression -> Maybe Polynomial +asPolynomial vars e = + let + res = + case e of + Integer _ -> + Just <| Dict.singleton [] e + + Float _ -> + Just <| Dict.singleton [] e + + Variable v -> + if List.member v vars then + Just <| Dict.singleton [ ( v, 1 ) ] one + + else + Just <| Dict.singleton [] e + + UnaryOperation Negate c -> + asPolynomial vars c + |> Maybe.map negate_ + + AssociativeOperation Addition l m r -> + (l :: m :: r) + |> Maybe.traverse (asPolynomial vars) + |> Maybe.map (List.foldr sum Dict.empty) + + AssociativeOperation Multiplication l m r -> + (l :: m :: r) + |> Maybe.traverse (asPolynomial vars) + |> Maybe.map (List.foldr by (Dict.singleton [] (Integer 1))) + + BinaryOperation Power b (Integer i) -> + Maybe.andThen (pow i) (asPolynomial vars b) + + BinaryOperation Division n d -> + let + polyD = + Maybe.map Dict.toList <| asPolynomial vars d + in + case polyD of + Just [ ( [], z ) ] -> + asPolynomial vars n + |> Maybe.map + (Dict.map + (\_ k -> + div k z + ) + ) + + _ -> + Nothing + + _ -> + Nothing + in + res + + +negate_ : Polynomial -> Polynomial +negate_ = + Dict.map <| always negateShort + + +sum : Polynomial -> Polynomial -> Polynomial +sum l r = + let + go ll rl acc = + case ( ll, rl ) of + ( [], _ ) -> + rl ++ acc + + ( _, [] ) -> + ll ++ acc + + ( (( ln, lc ) as lh) :: lt, (( rn, rc ) as rh) :: rt ) -> + if ln == rn then + go lt rl (( ln, plusShort [ lc, rc ] ) :: acc) + + else if ln < rn then + go lt rl (lh :: acc) + + else + go ll rt (rh :: acc) + in + Dict.fromList <| go (Dict.toList l) (Dict.toList r) [] + + +by : Polynomial -> Polynomial -> Polynomial +by l r = + List.cartesianProduct [ Dict.toList l, Dict.toList r ] + |> List.filterMap + (\p -> + case p of + [ v, w ] -> + Just ( v, w ) + + _ -> + Nothing + ) + |> List.map + (\( ( les, lc ), ( res, rc ) ) -> + ( (les ++ res) + |> List.sort + |> List.groupOneWith + (\( ln, le ) ( rn, re ) -> + if ln == rn then + Just ( ln, le + re ) + + else + Nothing + ) + , byShort [ lc, rc ] + ) + ) + |> List.foldr + (\( k, v ) -> + Dict.update k + (Maybe.withDefault (Integer 0) + >> (\w -> plusShort [ v, w ]) + >> Just + ) + ) + Dict.empty + + +pow : Int -> Polynomial -> Maybe Polynomial +pow e p = + if e < 0 then + Nothing + + else if e == 0 then + Just <| Dict.singleton [] (Integer 1) + + else if e == 1 then + Just p + + else + Maybe.map (by p) (pow (e - 1) p) diff --git a/src/elm/Expression/Simplify.elm b/src/elm/Expression/Simplify.elm index 42b5da59..6df9f210 100644 --- a/src/elm/Expression/Simplify.elm +++ b/src/elm/Expression/Simplify.elm @@ -19,9 +19,9 @@ import Expression , visit ) import Expression.Derivative -import Expression.Utils exposing (asPoly, by, byShort, cos_, div, factor, i, im, ipow, ipowShort, minus, negate_, one, plus, plusShort, pow, re, sin_, sqrt_, square, two, zero) +import Expression.Polynomial exposing (asPolynomial) +import Expression.Utils exposing (abs_, by, byShort, cbrt, cos_, div, divShort, factor, i, im, ipow, ipowShort, minus, minusOne, negateShort, negate_, one, plus, plusShort, pow, re, sin_, sqrt_, square, two, zero) import Fraction -import List import List.Extra as List import List.MyExtra exposing (groupOneWith) import Maybe.Extra as Maybe @@ -157,6 +157,12 @@ stepSimplifyNegate context expr = else negate_ expr + AssociativeOperation Multiplication (Integer i) m r -> + by <| [ Integer -i, m ] ++ r + + AssociativeOperation Addition l m r -> + plus <| List.map negate_ (l :: m :: r) + _ -> negate_ expr @@ -211,8 +217,25 @@ stepSimplifyApply fname sargs = KnownFunction name -> case ( name, sargs ) of - ( Sqrt, _ ) -> - stepSimplifySqrt sargs + ( Root 2, [ arg ] ) -> + stepSimplifySqrt arg + |> Maybe.withDefault (sqrt_ arg) + + ( Root 3, [ arg ] ) -> + stepSimplifyCbrt arg + |> Maybe.withDefault (cbrt arg) + + ( Sin, [ arg ] ) -> + stepSimplifySin arg + |> Maybe.withDefault (sin_ arg) + + ( Abs, [ arg ] ) -> + stepSimplifyAbs arg + |> Maybe.withDefault (abs_ arg) + + ( Cos, [ arg ] ) -> + stepSimplifyCos arg + |> Maybe.withDefault (cos_ arg) ( Sinh, [ AssociativeOperation Multiplication l r o ] ) -> case extract (findSpecificVariable "i") (l :: r :: o) of @@ -262,59 +285,410 @@ stepSimplifyApply fname sargs = in plus [ by [ re l, im rest ], by [ im l, re rest ] ] + ( Ii, [ expr, Variable var, from, to ] ) -> + stepSimplifyIntegral expr var from to + _ -> Apply fname sargs -stepSimplifySqrt : List Expression -> Expression -stepSimplifySqrt sargs = - case sargs of - [ Integer j ] -> +stepSimplifyIntegral : Expression -> String -> Expression -> Expression -> Expression +stepSimplifyIntegral expr var from to = + let + default () = + Apply (KnownFunction Ii) [ expr, Variable var, from, to ] + in + case asPolynomial [ var ] expr of + Just poly -> let - a = - abs j + integrateOne ( v, exp ) = + div + (ipow (Variable v) (exp + 1)) + (Integer (exp + 1)) - r = - truncate (sqrt <| toFloat a) + integrateMonomial ( vars, coeff ) = + case vars of + [] -> + by [ coeff, Variable var ] - s = - if r * r == a then - Integer r + _ -> + by <| coeff :: List.map integrateOne vars - else - let - ( outer, inner ) = - abs a - |> factor - |> List.foldl - (\( f, e ) ( o, i ) -> - ( o * f ^ (e // 2) - , i * f ^ modBy 2 e - ) - ) - ( 1, 1 ) - in - case ( outer, inner ) of - ( _, 1 ) -> - Integer outer - - ( 1, _ ) -> - Apply (KnownFunction Sqrt) [ Integer inner ] + primitive = + poly + |> Dict.toList + |> List.map integrateMonomial + |> plus + in + minus + (partialSubstitute var to primitive) + (partialSubstitute var from primitive) + + Nothing -> + default () + + +stepSimplifyAbs : Expression -> Maybe Expression +stepSimplifyAbs sarg = + case sarg of + Integer i -> + Just <| Integer <| abs i + + Float f -> + Just <| Float <| abs f + + Variable v -> + case v of + "e" -> + Just sarg + + "pi" -> + Just sarg + + _ -> + Nothing + + Apply (KnownFunction Abs) _ -> + Just sarg + + _ -> + Nothing + + +stepSimplifySqrt : Expression -> Maybe Expression +stepSimplifySqrt sarg = + case sarg of + Integer j -> + sqrtInteger j + + BinaryOperation Division n d -> + Just <| div (sqrt_ n) (sqrt_ d) + + AssociativeOperation Multiplication l m r -> + let + sqrts = + (l :: m :: r) |> List.map stepSimplifySqrt + in + if List.any ((/=) Nothing) sqrts then + Just <| by <| List.map2 (Maybe.withDefault << sqrt_) (l :: m :: r) sqrts + + else + Nothing + + BinaryOperation Power b (Integer e) -> + if e < 0 then + Nothing + + else + let + outer = + abs_ <| ipowShort b (e // 2) + in + if modBy 2 e == 0 then + Just outer + + else + Just <| byShort [ outer, sqrt_ b ] + + _ -> + Nothing + + +stepSimplifySin : Expression -> Maybe Expression +stepSimplifySin sarg = + case sarg of + Float j -> + Just <| Float <| sin j + + Variable "pi" -> + Just zero + + UnaryOperation Negate c -> + Just <| negateShort <| sin_ c + + BinaryOperation Division (AssociativeOperation Addition l m r) d -> + stepSimplifySin <| plus <| List.map (\n -> divShort n d) (l :: m :: r) + + AssociativeOperation Addition l m r -> + let + rr = + plus <| m :: r + in + Just <| + plus + [ by [ sin_ l, cos_ rr ] + , by [ cos_ l, sin_ rr ] + ] + + BinaryOperation Division n d -> + asPiFraction n d + |> Maybe.andThen (\( pn, pd ) -> getSinValueForPiFraction pn pd) + + _ -> + Nothing + + +getSinValueForPiFraction : Int -> Int -> Maybe Expression +getSinValueForPiFraction pn pd = + if pd < 0 then + getSinValueForPiFraction -pn -pd + + else if pd == 0 then + Nothing + + else if pn == 0 then + Just zero + + else + case Fraction.gcd pn pd of + 1 -> + case modBy pd 4 of + 0 -> + case modBy 8 (pn * 4 // pd) of + 0 -> + Just zero + + 1 -> + Just <| div (sqrt_ <| Integer 2) two + + 2 -> + Just one + + 3 -> + Just <| div (sqrt_ <| Integer 2) two + + 4 -> + Just zero + + 5 -> + Just <| div (negate_ <| sqrt_ <| Integer 2) two + + 6 -> + Just minusOne + + -- 7 + _ -> + Just <| div (negate_ <| sqrt_ <| Integer 2) two + + _ -> + case modBy pd 6 of + 0 -> + case modBy 12 (pn * 6 // pd) of + 0 -> + Just zero + + 1 -> + Just <| div one two + + 2 -> + Just <| div (sqrt_ <| Integer 3) two + + 3 -> + Just one + + 4 -> + Just <| div (sqrt_ <| Integer 3) two + + 5 -> + Just <| div one two + + 6 -> + Just zero + + 7 -> + Just <| div minusOne two + + 8 -> + Just <| div (negate_ <| sqrt_ <| Integer 3) two + + 9 -> + Just minusOne + + 10 -> + Just <| div (negate_ <| sqrt_ <| Integer 3) two + + -- 11 + _ -> + Just <| div minusOne two _ -> - by [ Integer outer, Apply (KnownFunction Sqrt) [ Integer inner ] ] + Nothing + + g -> + getSinValueForPiFraction (pn // g) (pd // g) + + +asPiFraction : Expression -> Expression -> Maybe ( Int, Int ) +asPiFraction n d = + case ( n, d ) of + ( Variable "pi", Integer di ) -> + Just ( 1, di ) + + ( AssociativeOperation Multiplication (Integer ni) (Variable "pi") [], Integer di ) -> + Just ( ni, di ) + + _ -> + Nothing + + +stepSimplifyCos : Expression -> Maybe Expression +stepSimplifyCos sarg = + case sarg of + Float j -> + Just <| Float <| cos j + + Variable "pi" -> + Just one + + UnaryOperation Negate c -> + Just <| cos_ c + + BinaryOperation Division (AssociativeOperation Addition l m r) d -> + stepSimplifyCos <| plus <| List.map (\n -> divShort n d) (l :: m :: r) + + AssociativeOperation Addition l m r -> + let + rr = + plus <| m :: r + in + Just <| + minus + (by [ cos_ l, cos_ rr ]) + (by [ sin_ l, sin_ rr ]) + + BinaryOperation Division n d -> + asPiFraction n d + |> Maybe.andThen (\( pn, pd ) -> getSinValueForPiFraction (pn * 2 + pd) (pd * 2)) + + _ -> + Nothing + + +stepSimplifyCbrt : Expression -> Maybe Expression +stepSimplifyCbrt sarg = + case sarg of + Integer j -> + cbrtInteger j + + BinaryOperation Division n d -> + Just <| div (cbrt n) (cbrt d) + + AssociativeOperation Multiplication l m r -> + let + cbrts = + (l :: m :: r) |> List.map stepSimplifyCbrt in - if j < 0 then - by [ Variable "i", s ] + if List.any ((/=) Nothing) cbrts then + Just <| by <| List.map2 (Maybe.withDefault << cbrt) (l :: m :: r) cbrts else - s + Nothing + + BinaryOperation Power b (Integer e) -> + if e < 0 then + Nothing + + else + let + outer = + ipowShort b (e // 3) + in + case modBy 3 e of + 0 -> + Just outer - [ BinaryOperation Division n d ] -> - div (sqrt_ n) (sqrt_ d) + 1 -> + Just <| byShort [ outer, cbrt b ] + + _ -> + Just <| byShort [ outer, cbrt <| square b ] _ -> - Apply (KnownFunction Sqrt) sargs + Nothing + + +sqrtInteger : Int -> Maybe Expression +sqrtInteger j = + let + a = + abs j + + r = + truncate (sqrt <| toFloat a) + + s = + if r * r == a then + Just <| Integer r + + else + let + ( outer, inner ) = + factor a + |> List.foldl + (\( f, e ) ( o, i ) -> + ( o * f ^ (e // 2) + , i * f ^ modBy 2 e + ) + ) + ( 1, 1 ) + in + case ( outer, inner ) of + ( _, 1 ) -> + Just <| Integer outer + + ( 1, _ ) -> + Nothing + + _ -> + Just <| by [ Integer outer, sqrt_ <| Integer inner ] + in + if j < 0 then + Just <| by [ Variable "i", Maybe.withDefault (sqrt_ (Integer a)) s ] + + else + s + + +cbrtInteger : Int -> Maybe Expression +cbrtInteger j = + let + a = + abs j + + r = + truncate (toFloat a ^ (1.0 / 3.0)) + in + if r * r * r == j then + Just <| Integer r + + else + let + ( outer, inner ) = + factor a + |> List.foldl + (\( f, e ) ( o, i ) -> + ( o * f ^ (e // 3) + , i * f ^ modBy 3 e + ) + ) + ( 1, 1 ) + + s = + case ( outer, inner ) of + ( _, 1 ) -> + Just <| Integer outer + + ( 1, _ ) -> + Nothing + + _ -> + Just <| by [ Integer outer, cbrt <| Integer inner ] + in + if j < 0 then + Just <| negate_ <| Maybe.withDefault (cbrt (Integer a)) s + + else + s stepSimplifyRe : List Expression -> Expression @@ -358,6 +732,29 @@ stepSimplifyRe sargs = stepSimplifyDivision : Expression -> Expression -> Expression stepSimplifyDivision ls rs = + let + trySimplifyFactors nz dz dzip = + case stepSimplifyDivision (Zipper.selected nz) (Zipper.selected dz) of + BinaryOperation Division _ _ -> + if Zipper.canGoRight dz then + trySimplifyFactors nz (Zipper.right 1 dz) dzip + + else if Zipper.canGoRight nz then + trySimplifyFactors (Zipper.right 1 nz) dzip dzip + + else + div ls rs + + Integer 1 -> + div + (by <| Zipper.getLeft nz ++ Zipper.getRight nz) + (by <| Zipper.getLeft dz ++ Zipper.getRight dz) + + reduced -> + div + (by <| Zipper.getLeft nz ++ reduced :: Zipper.getRight nz) + (by <| Zipper.getLeft dz ++ Zipper.getRight dz) + in case ( ls, rs ) of ( BinaryOperation Division lsn lsd, _ ) -> div lsn <| by [ lsd, rs ] @@ -433,30 +830,49 @@ stepSimplifyDivision ls rs = dzip = Zipper.fromNonemptyList dl (dm :: dr) + in + trySimplifyFactors nzip dzip dzip - go nz dz = - case stepSimplifyDivision (Zipper.selected nz) (Zipper.selected dz) of - BinaryOperation Division _ _ -> - if Zipper.canGoRight dz then - go nz (Zipper.right 1 dz) - - else if Zipper.canGoRight nz then - go (Zipper.right 1 nz) dzip + ( n, AssociativeOperation Multiplication dl dm dr ) -> + let + nzip = + Zipper.fromNonemptyList n [] - else - div ls rs + dzip = + Zipper.fromNonemptyList dl (dm :: dr) + in + trySimplifyFactors nzip dzip dzip - Integer 1 -> - div - (by <| Zipper.getLeft nz ++ Zipper.getRight nz) - (by <| Zipper.getLeft dz ++ Zipper.getRight dz) + ( AssociativeOperation Multiplication nl nm nr, d ) -> + let + nzip = + Zipper.fromNonemptyList nl (nm :: nr) - reduced -> - div - (by <| Zipper.getLeft nz ++ reduced :: Zipper.getRight nz) - (by <| Zipper.getLeft dz ++ Zipper.getRight dz) + dzip = + Zipper.fromNonemptyList d [] in - go nzip dzip + trySimplifyFactors nzip dzip dzip + + ( BinaryOperation Power lb le, BinaryOperation Power rb re ) -> + if Expression.equals lb rb then + pow lb (minus le re) + + else + div ls rs + + ( _, BinaryOperation Power rb re ) -> + if Expression.equals ls rb then + pow ls (minus one re) + + else + div ls rs + + ( BinaryOperation Power lb le, _ ) -> + if Expression.equals lb rs then + pow lb (minus le one) + + else + div ls rs _ -> if Expression.equals ls rs then @@ -500,6 +916,9 @@ isImmaginary e = stepSimplifyPower : Expression -> Expression -> Expression stepSimplifyPower ls rs = case ( ls, rs ) of + ( _, Integer 1 ) -> + ls + ( AssociativeOperation Multiplication lm rm om, Integer rsi ) -> AssociativeOperation Multiplication (ipow lm rsi) @@ -555,7 +974,7 @@ stepSimplifyPower ls rs = i 2 -> - Integer -1 + minusOne -- 3 _ -> @@ -574,6 +993,19 @@ stepSimplifyPower ls rs = else negate_ <| pow nl rs + ( BinaryOperation Power bb be, _ ) -> + pow bb <| by [ be, rs ] + + ( _, UnaryOperation Negate n ) -> + div one (pow ls n) + + ( _, Integer n ) -> + if n < 0 then + div one (ipow ls -n) + + else + pow ls rs + _ -> pow ls rs @@ -721,14 +1153,13 @@ sortByDegree aop ee = List.foldl (\var -> List.stableSortWith - (by <| - \e -> - -- "i" doesn't have higher nonsimplified powers, and we want it later - if var == "i" && aop == Addition then - negate <| Maybe.withDefault -1 <| polyDegree var e + (by <| \e -> + -- "i" doesn't have higher nonsimplified powers, and we want it later + if var == "i" && aop == Addition then + negate <| Maybe.withDefault -1 <| polyDegree var e - else - Maybe.withDefault -1 <| polyDegree var e + else + Maybe.withDefault -1 <| polyDegree var e ) ) ee @@ -743,6 +1174,9 @@ stepSimplifyAddition left right = ( _, Integer 0 ) -> Just left + ( Integer 0, _ ) -> + Just right + ( Integer il, Integer ir ) -> Just <| Integer <| il + ir @@ -769,6 +1203,9 @@ stepSimplifyAddition left right = if Expression.equals nl right then Just zero + else if Expression.equals left right then + Just <| by [ two, right ] + else Nothing @@ -776,8 +1213,16 @@ stepSimplifyAddition left right = if Expression.equals nr left then Just zero + else if Expression.equals left right then + Just <| by [ two, right ] + else - Nothing + case nr of + BinaryOperation Division rn rd -> + Just <| div (minus (by [ left, rd ]) rn) rd + + _ -> + Nothing ( BinaryOperation Division ln ld, BinaryOperation Division rn rd ) -> Just <| div (plus [ by [ ln, rd ], by [ rn, ld ] ]) (by [ ld, rd ]) @@ -797,23 +1242,25 @@ stepSimplifyAddition left right = else Nothing - in - case Set.toList <| getFreeVariables left of - [ var ] -> - case - Result.map2 Tuple.pair - (asPoly var left |> Result.map Dict.toList) - (asPoly var right |> Result.map Dict.toList) - of - Ok ( [ ( dl, cl ) ], [ ( dr, cr ) ] ) -> - if dl == dr then - Just <| byShort [ plusShort [ cl, cr ], ipowShort (Variable var) dl ] - else - standard () + leftVars = + Set.toList (getFreeVariables left) + in + case + ( asPolynomial leftVars left |> Maybe.map Dict.toList + , asPolynomial leftVars right |> Maybe.map Dict.toList + ) + of + ( Just [ ( dl, cl ) ], Just [ ( dr, cr ) ] ) -> + if dl == dr && not (List.isEmpty dl) then + let + pows = + List.map (\( v, e ) -> ipowShort (Variable v) e) dl + in + Just <| byShort <| plusShort [ cl, cr ] :: pows - _ -> - standard () + else + standard () _ -> standard () @@ -831,82 +1278,118 @@ asList l = stepSimplifyMultiplication : Expression -> Expression -> Maybe Expression stepSimplifyMultiplication left right = - case ( left, right ) of - ( Integer 1, l ) -> - Just l + let + go = + case ( left, right ) of + ( Integer 1, l ) -> + Just l - ( c, Integer 1 ) -> - Just c + ( c, Integer 1 ) -> + Just c - ( _, Integer 0 ) -> - Just <| Integer 0 + ( _, Integer 0 ) -> + Just <| Integer 0 - ( Integer 0, _ ) -> - Just <| Integer 0 + ( Integer 0, _ ) -> + Just <| Integer 0 - ( Integer il, Integer ir ) -> - Just <| Integer <| il * ir + ( Integer il, Integer ir ) -> + Just <| Integer <| il * ir - ( AssociativeOperation Addition l m r, _ ) -> - Just <| plus <| by [ l, right ] :: by [ m, right ] :: List.map (\o -> by [ o, right ]) r + ( Integer j, _ ) -> + if j == -1 then + Just <| negate_ right - ( _, AssociativeOperation Addition l m r ) -> - Just <| plus <| by [ left, l ] :: by [ left, m ] :: List.map (\o -> by [ left, o ]) r + else + go1 () - ( BinaryOperation Power lb le, BinaryOperation Power rb re ) -> - if Expression.equals lb rb then - case ( le, re ) of - ( Integer lei, Integer rei ) -> - Just (ipow lb <| lei + rei) + ( _, Integer k ) -> + if k == -1 then + Just <| negate_ left - _ -> - Just (pow lb <| plus [ le, re ]) + else + go1 () - else - Nothing + _ -> + go1 () - ( BinaryOperation Power pb pe, l ) -> - if Expression.equals l pb then - case pe of - Integer pei -> - Just (ipow pb <| pei + 1) + go1 () = + case ( left, right ) of + ( AssociativeOperation Addition l m r, _ ) -> + Just <| plus <| by [ l, right ] :: by [ m, right ] :: List.map (\o -> by [ o, right ]) r - _ -> - Just (BinaryOperation Power pb <| plus [ one, pe ]) + ( _, AssociativeOperation Addition l m r ) -> + Just <| plus <| by [ left, l ] :: by [ left, m ] :: List.map (\o -> by [ left, o ]) r - else - Nothing + ( BinaryOperation Power lb le, BinaryOperation Power rb re ) -> + if Expression.equals lb rb then + case ( le, re ) of + ( Integer lei, Integer rei ) -> + Just (ipow lb <| lei + rei) - ( _, BinaryOperation Power pb pe ) -> - if Expression.equals left pb then - case pe of - Integer pei -> - Just (ipow pb <| pei + 1) + _ -> + Just (pow lb <| plus [ le, re ]) - _ -> - Just (BinaryOperation Power pb <| plus [ one, pe ]) + else + go2 () - else - Nothing + ( BinaryOperation Power pb pe, l ) -> + if Expression.equals l pb then + case pe of + Integer pei -> + Just (ipow pb <| pei + 1) + + _ -> + Just (BinaryOperation Power pb <| plus [ one, pe ]) - ( BinaryOperation Division ln ld, r ) -> - Just <| div (by [ ln, r ]) ld + else + go2 () - ( l, BinaryOperation Division rn rd ) -> - Just <| div (by [ l, rn ]) rd + ( _, BinaryOperation Power pb pe ) -> + if Expression.equals left pb then + case pe of + Integer pei -> + Just (ipow pb <| pei + 1) - ( List _, List _ ) -> - multiplyMatrices left right + _ -> + Just (BinaryOperation Power pb <| plus [ one, pe ]) - ( Lambda x f, c ) -> - Just <| partialSubstitute x c f + else + go2 () - _ -> + _ -> + go2 () + + go2 () = + case ( left, right ) of + ( BinaryOperation Division ln ld, r ) -> + Just <| div (by [ ln, r ]) ld + + ( l, BinaryOperation Division rn rd ) -> + Just <| div (by [ l, rn ]) rd + + ( List _, List _ ) -> + case multiplyMatrices left right of + Just r -> + Just r + + Nothing -> + go3 () + + ( Lambda x f, c ) -> + Just <| partialSubstitute x c f + + _ -> + go3 () + + go3 () = if Expression.equals left right then Just <| ipow right 2 else Nothing + in + go addMatrices : Expression -> Expression -> Maybe Expression @@ -1042,6 +1525,9 @@ innerHoistLabmda expr = ( KnownFunction Plot, _ ) -> Nothing + ( KnownFunction APlot, _ ) -> + Nothing + ( _, [ Lambda x f ] ) -> Just <| Lambda x <| hoistLambda <| Apply fn [ f ] diff --git a/src/elm/Expression/Solver.elm b/src/elm/Expression/Solver.elm index 9fccae79..2994f1ae 100644 --- a/src/elm/Expression/Solver.elm +++ b/src/elm/Expression/Solver.elm @@ -2,11 +2,11 @@ module Expression.Solver exposing (solve, stepSimplify) import Dict exposing (Dict) import Expression exposing (AssociativeOperation(..), BinaryOperation(..), Expression(..), RelationOperation(..), SolutionTree(..), UnaryOperation(..)) -import Expression.Simplify exposing (simplify, stepSimplify) -import Expression.Utils exposing (asPoly, by, byShort, div, divShort, factor, i, ipow, isZero, minus, negateShort, negate_, one, plus, plusShort, pow, sqrt_, square, zero) +import Expression.Polynomial exposing (Polynomial, asPolynomial) +import Expression.Simplify exposing (simplify) +import Expression.Utils exposing (by, byShort, cbrt, div, divShort, double, factor, i, ipow, ipowShort, isZero, minus, minusOne, negateShort, negate_, one, plus, plusShort, pow, sqrt_, square, zero) import Fraction exposing (Fraction, gcd) import List.Extra as List -import Result import Result.Extra as Result @@ -14,18 +14,73 @@ solve : Expression -> Expression -> SolutionTree solve e x = case x of Variable v -> - e - |> stepSimplify (innerSolve v) - |> cut + let + go m = + m + |> stepSimplify + |> onLeaves + (\s -> + case s of + RelationOperation Equals l (BinaryOperation Division n d) -> + RelationOperation Equals (by [ l, d ]) n + |> stepSimplify + |> onLeaves (innerSolve v) + + RelationOperation Equals (BinaryOperation Division n d) r -> + RelationOperation Equals n (by [ r, d ]) + |> stepSimplify + |> onLeaves (innerSolve v) + + _ -> + innerSolve v s + ) + in + cut <| + case e of + RelationOperation Equals l r -> + if isZero l then + if isZero r then + go e + + else + SolutionStep e <| go (RelationOperation Equals r l) + + else if isZero r then + case l of + AssociativeOperation Multiplication ml mm mr -> + SolutionStep e <| SolutionBranch <| List.map (\mc -> go (RelationOperation Equals mc zero)) (ml :: mm :: mr) + + _ -> + go e + + else + go e + + AssociativeOperation Multiplication ml mm mr -> + SolutionStep e <| + SolutionStep (RelationOperation Equals e zero) <| + SolutionBranch <| + List.map (\mc -> go (RelationOperation Equals mc zero)) (ml :: mm :: mr) + + RelationOperation _ _ _ -> + go e + + _ -> + SolutionStep e <| go <| RelationOperation Equals e zero _ -> - SolutionError "The second argument of `solve` must be the variable you want to solve for" + SolutionError + { en = "The second argument of `solve` must be the variable you want to solve for" + , it = "Il secondo argomento di `solve` deve essere la variabile per cui risolvere l'equazione" + } type Shortcut = Shortcut SolutionTree (Dict String Shortcut) +{-| Simplify a `SolutionTree` by simplifying branches of the form `x -> ... -> x` to `x` +-} cut : SolutionTree -> SolutionTree cut = let @@ -75,70 +130,102 @@ innerSolve v expr = SolutionStep expr <| solveEquation v l r RelationOperation _ _ _ -> - SolutionError "Cannot solve disequations [yet!]" + SolutionError + { en = "Cannot solve disequations [yet!]" + , it = "Non è [per ora!] possibile risolvere le disequazioni" + } _ -> - innerSolve v <| RelationOperation Equals expr zero + case expr of + BinaryOperation Division n _ -> + RelationOperation Equals n zero + |> stepSimplify + |> onLeaves (innerSolve v) + + _ -> + SolutionStep (RelationOperation Equals expr zero) <| + solveEquation v expr zero solveEquation : String -> Expression -> Expression -> SolutionTree solveEquation v l r = let go expr = - case asPoly v expr |> Result.map (Dict.map (always simplify)) of - Err err -> - SolutionError <| "Cannot solve " ++ Expression.toString expr ++ ", " ++ err - - Ok coeffs -> - SolutionStep (RelationOperation Equals expr zero) <| - SolutionStep (coeffsToEq v coeffs) <| - case Dict.toList coeffs |> List.reverse |> List.filterNot (Tuple.second >> isZero) of - [] -> + case asPolynomial [ v ] expr |> Maybe.map (Dict.map (always simplify)) of + Nothing -> + SolutionError <| + { en = "Cannot solve " ++ Expression.toString expr + , it = "Impossibile risolvere " ++ Expression.toString expr + } + + Just coeffs -> + let + rebuilt = + coeffsToEq coeffs + + cleanCoeffs = + Dict.toList coeffs + |> List.reverse + |> List.filterNot (Tuple.second >> isZero) + + get k = + cleanCoeffs + |> List.find + (\( d, _ ) -> + if k == 0 then + d == [] + + else + d == [ ( v, k ) ] + ) + |> Maybe.map Tuple.second + |> Maybe.withDefault zero + + default () = + case findRationalRoot v (Dict.fromList cleanCoeffs) of + Ok { root, rest } -> + SolutionBranch + [ innerSolve v <| RelationOperation Equals (Variable v) root + , innerSolve v <| RelationOperation Equals rest zero + ] + + Err e -> + SolutionError <| + { en = "Cannot solve " ++ Expression.toString rebuilt ++ ", " ++ e + , it = "Impossibile risolvere " ++ Expression.toString rebuilt ++ ", " ++ e + } + + last = + case List.head cleanCoeffs of + Nothing -> solve0 v zero - [ ( 0, k ) ] -> + Just ( [], k ) -> solve0 v k - [ ( 1, a ) ] -> - solve1 v a zero - - [ ( 1, a ), ( 0, b ) ] -> - solve1 v a b - - [ ( 2, a ) ] -> - solve2 v a zero zero + Just ( [ ( _, 1 ) ], a ) -> + solve1 v a (get 0) - [ ( 2, a ), ( 1, b ) ] -> - solve2 v a b zero + Just ( [ ( _, 2 ) ], a ) -> + solve2 v a (get 1) (get 0) - [ ( 2, a ), ( 0, c ) ] -> - solve2 v a zero c + Just ( [ ( _, 3 ) ], _ {- a -} ) -> + -- solve3 v a (get 2) (get 1) (get 0) + default () - [ ( 2, a ), ( 1, b ), ( 0, c ) ] -> - solve2 v a b c + Just ( [ ( _, 4 ) ], a ) -> + if isZero (get 1) && isZero (get 3) then + solve4Biquad v a (get 2) (get 0) - [ ( 4, a ) ] -> - solve4Biquad v a zero zero + else + default () - [ ( 4, a ), ( 0, e ) ] -> - solve4Biquad v a zero e - - [ ( 4, a ), ( 2, c ), ( 0, e ) ] -> - solve4Biquad v a c e - - [ ( 4, a ), ( 2, c ) ] -> - solve4Biquad v a c zero - - cleanCoeffs -> - case findRationalRoot v cleanCoeffs of - Ok { root, rest } -> - SolutionBranch - [ innerSolve v <| RelationOperation Equals (Variable v) root - , innerSolve v <| RelationOperation Equals rest zero - ] - - Err e -> - SolutionError <| "Cannot solve " ++ Expression.toString (coeffsToEq v coeffs) ++ ", " ++ e + _ -> + default () + in + SolutionStep (RelationOperation Equals expr zero) <| + SolutionStep rebuilt <| + last in case ( l, r ) of ( Integer 0, _ ) -> @@ -151,103 +238,122 @@ solveEquation v l r = go (minus l r) -findRationalRoot : String -> List ( Int, Expression ) -> Result String { root : Expression, rest : Expression } +findRationalRoot : String -> Polynomial -> Result String { root : Expression, rest : Expression } findRationalRoot v coeffs = let - findRoot rats = - let - commonMultiple = - rats - |> List.map Tuple.second - |> List.foldl (\f a -> abs <| Fraction.divisor f * a // gcd (Fraction.divisor f) a) 1 - - reduced = - rats - |> List.map - (Tuple.mapSecond - (Fraction.toPair - >> (\( n, d ) -> - n * commonMultiple // d - ) - ) - ) + toMonovariablePolynomial = + List.foldl + (\( exps, coeff ) acc -> + case exps of + [] -> + Result.map ((::) ( 0, coeff )) acc - known = - reduced - |> List.find (\( d, _ ) -> d == 0) - |> Maybe.map Tuple.second - |> Maybe.withDefault 0 - - potentialsN = - allDivisors known - - head = - reduced - |> List.sortBy (\( d, _ ) -> -d) - |> List.head - |> Maybe.map Tuple.second - |> Maybe.withDefault 1 - - potentialsD = - allDivisors head - - allDivisors n = - n - |> abs - |> factor - |> (::) ( 1, 0 ) - |> List.map (\( f, m ) -> List.initialize (m + 1) (\e -> f ^ e)) - |> List.cartesianProduct - |> List.map List.product - - potentials = - potentialsN - |> List.concatMap - (\n -> - List.map (Fraction.build n) potentialsD - ) - |> List.concatMap (\f -> [ f, Fraction.negate f ]) - |> List.uniqueBy Fraction.toPair - |> List.sortBy Fraction.toFloat - - res = - potentials - |> List.filterMap tryDivision - |> List.head - - reducedDict = - Dict.fromList reduced - - maximumDegree = - Dict.keys reducedDict |> List.maximum |> Maybe.withDefault 0 - - getCoeff d = - Fraction.fromInt <| Maybe.withDefault 0 <| Dict.get d reducedDict - - tryDivision potential = - List.range 0 (maximumDegree - 1) - |> List.foldr - (\degree ( r, a ) -> - let - k = - getCoeff degree - - r_ = - Fraction.plus k (Fraction.by r potential) - in - ( r_, r :: a ) - ) - ( getCoeff maximumDegree, [] ) - |> (\( r, c ) -> - if Fraction.isZero r then - Just <| rootAndRest potential c + [ ( w, e ) ] -> + if w == v then + Result.map ((::) ( e, coeff )) acc - else - Nothing - ) - in - res - |> Result.fromMaybe "no rational root found, and no simple formula is usable" + else + Err "Unexpected monomial in intermediate solution polynomial" + + _ -> + Err "Unexpected monomial in intermediate solution polynomial" + ) + (Ok []) + + mono = + coeffs + |> Dict.toList + |> toMonovariablePolynomial + in + mono + |> Result.andThen + (\monoCoeff -> + case + monoCoeff + |> List.map (\( d, e ) -> Result.map (Tuple.pair d) (asFraction e)) + |> Result.combine + |> Result.andThen (findRationalRootFromFractions v) + of + (Ok _) as resultFromFractions -> + resultFromFractions + + Err _ -> + Err "todo" + ) + + +findRationalRootFromFractions : String -> List ( Int, Fraction ) -> Result String { root : Expression, rest : Expression } +findRationalRootFromFractions v rats = + let + commonMultiple = + rats + |> List.map Tuple.second + |> List.foldl (\f a -> abs <| Fraction.divisor f * a // gcd (Fraction.divisor f) a) 1 + + reduced = + rats + |> List.map + (Tuple.mapSecond + (Fraction.toPair + >> (\( n, d ) -> + n * commonMultiple // d + ) + ) + ) + + known = + reduced + |> List.find (\( d, _ ) -> d == 0) + |> Maybe.map Tuple.second + |> Maybe.withDefault 0 + + potentialsN = + allDivisors known + + head = + reduced + |> List.sortBy (\( d, _ ) -> negate d) + |> List.head + |> Maybe.map Tuple.second + |> Maybe.withDefault 1 + + potentialsD = + allDivisors head + + allDivisors n = + n + |> abs + |> factor + |> (::) ( 1, 0 ) + |> List.map (\( f, m ) -> List.initialize (m + 1) (\exp -> f ^ exp)) + |> List.cartesianProduct + |> List.map List.product + + potentials = + potentialsN + |> List.concatMap + (\n -> + List.map (Fraction.build n) potentialsD + ) + |> List.concatMap (\f -> [ f, Fraction.negate f ]) + |> List.uniqueBy Fraction.toPair + |> List.sortBy Fraction.toFloat + + res = + potentials + |> List.filterMap tryDivision + |> List.head + + reducedDict = + Dict.fromList reduced + + maximumDegree = + Dict.keys reducedDict + |> List.maximum + |> Maybe.withDefault 0 + + getCoeff d = + Fraction.fromInt <| Maybe.withDefault 0 <| Dict.get d reducedDict rootAndRest potential c = let @@ -269,14 +375,14 @@ findRationalRoot v coeffs = c |> List.indexedMap (\exponent k -> - let - ke = - toExpr k - in if Fraction.isZero k then Nothing else + let + ke = + toExpr k + in Just <| case exponent of 0 -> @@ -303,11 +409,31 @@ findRationalRoot v coeffs = { root = toExpr potential , rest = rest } + + tryDivision potential = + List.range 0 (maximumDegree - 1) + |> List.foldr + (\degree ( r, a ) -> + let + k = + getCoeff degree + + r_ = + Fraction.plus k (Fraction.by r potential) + in + ( r_, r :: a ) + ) + ( getCoeff maximumDegree, [] ) + |> (\( r, c ) -> + if Fraction.isZero r then + Just <| rootAndRest potential c + + else + Nothing + ) in - coeffs - |> List.map (\( d, e ) -> Result.map (Tuple.pair d) (asFraction e)) - |> Result.combine - |> Result.andThen findRoot + res + |> Result.fromMaybe "no rational root found, and no simple formula is usable" asFraction : Expression -> Result String Fraction @@ -335,61 +461,140 @@ asFraction e = Err <| Expression.toString e ++ " is not a fraction" -coeffsToEq : String -> Dict Int Expression -> Expression -coeffsToEq v coeffs = +type alias SimpleCoefficient = + List SimpleAtom + + +type alias SimpleAtom = + ( Int, Dict String Int ) + + +simpleCoefficientAlgebra : + { negate : SimpleCoefficient -> SimpleCoefficient + , plus : SimpleCoefficient -> SimpleCoefficient -> SimpleCoefficient + , by : SimpleCoefficient -> SimpleCoefficient -> SimpleCoefficient + } +simpleCoefficientAlgebra = + let + negate t = + List.map (\( c, v ) -> ( -c, v )) t + + squash = + List.gatherEqualsBy Tuple.second + >> List.map (\( ( h, c ), t ) -> ( h + List.sum (List.map Tuple.first t), c )) + + plus l r = + squash <| l ++ r + + by ls rs = + List.concatMap (\l -> List.map (byHelper l) rs) ls + + byHelper ( lc, lv ) ( rc, rv ) = + ( lc * rc + , (Dict.toList lv ++ Dict.toList rv) + |> List.gatherEqualsBy Tuple.first + |> List.map (\( ( l, h ), t ) -> ( l, h + List.sum (List.map Tuple.second t) )) + |> Dict.fromList + ) + in + { negate = negate + , plus = plus + , by = by + } + + +coeffsToEq : Polynomial -> Expression +coeffsToEq coeffs = coeffs |> Dict.toList |> List.reverse |> List.filterMap - (\( e, c ) -> - if e == 0 then + (\( exps, c ) -> + if List.isEmpty exps then if isZero c then Nothing else Just c + else if isZero c then + Nothing + else let - p = - if e == 1 then - Variable v - - else - ipow (Variable v) e + pows = + byShort <| List.map (\( v, e ) -> ipowShort (Variable v) e) exps in - if isZero c then - Nothing - - else - case c of - Integer i -> - if i == 1 then - Just p + case c of + Integer i -> + if i == 1 then + Just pows - else if i == -1 then - Just <| negate_ p + else if i == -1 then + Just <| negate_ pows - else - Just <| by [ c, p ] + else + Just <| by [ c, pows ] - Float f -> - if f == 1 then - Just p + Float f -> + if f == 1 then + Just pows - else if f == -1 then - Just <| negate_ p + else if f == -1 then + Just <| negate_ pows - else - Just <| by [ c, p ] + else + Just <| by [ c, pows ] - _ -> - Just <| by [ c, p ] + _ -> + Just <| by [ c, pows ] ) |> plus |> (\l -> RelationOperation Equals l zero) +solutionBranch : String -> Expression -> SolutionTree +solutionBranch v sol = + stepSimplify <| solIs v sol + + +stepSimplify : Expression -> SolutionTree +stepSimplify = + let + go i e = + if i <= 0 then + SolutionDone e + + else + let + next = + Expression.Simplify.stepSimplify Dict.empty e + in + if Expression.equals next e then + SolutionDone e + + else + SolutionStep e <| go (i - 1) next + in + go 50 + + +onLeaves : (Expression -> SolutionTree) -> SolutionTree -> SolutionTree +onLeaves f tree = + case tree of + SolutionBranch cs -> + SolutionBranch <| List.map (onLeaves f) cs + + SolutionDone e -> + f e + + SolutionStep s c -> + SolutionStep s <| onLeaves f c + + _ -> + tree + + solIs : String -> Expression -> Expression solIs = RelationOperation Equals << Variable @@ -410,32 +615,7 @@ solve1 v a b = solve0 v b else - let - sol = - solIs v <| divShort (negateShort b) a - in - stepSimplify SolutionDone sol - - -stepSimplify : (Expression -> SolutionTree) -> Expression -> SolutionTree -stepSimplify final = - let - go i e = - if i <= 0 then - final e - - else - let - next = - Expression.Simplify.stepSimplify Dict.empty e - in - if Expression.equals next e then - final e - - else - SolutionStep e <| go (i - 1) next - in - go 100 + solutionBranch v <| divShort (negateShort b) a solve2 : String -> Expression -> Expression -> Expression -> SolutionTree @@ -447,14 +627,15 @@ solve2 v a b c = let solPlus = sqrt_ (divShort (negateShort c) a) - - branch sol = - stepSimplify SolutionDone (solIs v sol) in - SolutionBranch - [ branch <| negateShort solPlus - , branch solPlus - ] + if simplify solPlus == Integer 0 then + solutionBranch v solPlus + + else + SolutionBranch + [ solutionBranch v solPlus + , solutionBranch v <| negateShort solPlus + ] else let @@ -463,16 +644,83 @@ solve2 v a b c = solPlus = divShort (plusShort [ negateShort b, sqrt_ delta ]) (byShort [ Integer 2, a ]) + in + if simplify delta == Integer 0 then + solutionBranch v solPlus - solMinus = - divShort (minus (negateShort b) (sqrt_ delta)) (byShort [ Integer 2, a ]) + else + let + solMinus = + divShort (minus (negateShort b) (sqrt_ delta)) (byShort [ Integer 2, a ]) + in + SolutionBranch + [ solutionBranch v solPlus + , solutionBranch v solMinus + ] + + +solve3 : String -> Expression -> Expression -> Expression -> Expression -> SolutionTree +solve3 v a b c d = + if isZero a then + solve2 v b c d + + else if isZero b && isZero c then + let + solPlus = + cbrt (negate_ d) + + xi = + div (plus [ minusOne, sqrt_ (Integer -3) ]) (Integer 2) - branch sol = - stepSimplify SolutionDone (solIs v sol) + xiTwo = + div (minus minusOne (sqrt_ (Integer -3))) (Integer 2) in SolutionBranch - [ branch solMinus - , branch solPlus + [ solutionBranch v solPlus + , solutionBranch v <| byShort [ xi, solPlus ] + , solutionBranch v <| byShort [ xiTwo, solPlus ] + ] + + else + let + xi = + div (plus [ minusOne, sqrt_ (Integer -3) ]) (Integer 2) + + xiTwo = + div (minus minusOne (sqrt_ (Integer -3))) (Integer 2) + + sol k = + let + deltaOne = + plus [ double <| ipow b 3, negate_ <| by [ Integer 9, a, b, c ], by [ Integer 27, square a, d ] ] + + deltaZero = + minus (square b) (by [ Integer 3, a, c ]) + + bigC = + cbrt <| + div + (plus [ deltaOne, sqrt_ <| minus (square deltaOne) (by [ Integer 4, ipow deltaZero 3 ]) ]) + (Integer 2) + + xiC = + byShort [ k, bigC ] + in + by + [ div + minusOne + (by [ Integer 3, a ]) + , plus + [ b + , xiC + , div deltaZero xiC + ] + ] + in + SolutionBranch + [ solutionBranch v <| sol one + , solutionBranch v <| sol xi + , solutionBranch v <| sol xiTwo ] @@ -485,15 +733,12 @@ solve4Biquad v a c e = let solPlus = pow (divShort (negateShort e) a) (div one (Integer 4)) - - branch sol = - stepSimplify SolutionDone (solIs v sol) in SolutionBranch - [ branch solPlus - , branch <| negateShort solPlus - , branch <| byShort [ i, solPlus ] - , branch <| byShort [ negateShort i, solPlus ] + [ solutionBranch v solPlus + , solutionBranch v <| negateShort solPlus + , solutionBranch v <| byShort [ i, solPlus ] + , solutionBranch v <| byShort [ negateShort i, solPlus ] ] else @@ -506,13 +751,10 @@ solve4Biquad v a c e = solMinus = sqrt_ <| div (minus (negateShort c) (sqrt_ delta)) (byShort [ Integer 2, a ]) - - branch sol = - stepSimplify SolutionDone (solIs v sol) in SolutionBranch - [ branch solPlus - , branch solMinus - , branch <| negateShort solPlus - , branch <| negateShort solMinus + [ solutionBranch v solPlus + , solutionBranch v solMinus + , solutionBranch v <| negateShort solPlus + , solutionBranch v <| negateShort solMinus ] diff --git a/src/elm/Expression/Utils.elm b/src/elm/Expression/Utils.elm index 58218739..5e8731e5 100644 --- a/src/elm/Expression/Utils.elm +++ b/src/elm/Expression/Utils.elm @@ -1,6 +1,6 @@ -module Expression.Utils exposing (a, abs_, asPoly, asin_, atan2_, b, by, byShort, c, complex, cos_, cosh_, d, dd, det, determinant, div, divShort, double, e, exp_, f, factor, g, gra_, h, i, icomplex, ii, im, ipow, ipowShort, isOne, isZero, j, k, l, ln_, m, minus, n, negateShort, negate_, o, one, p, plus, plusShort, pow, q, r, re, s, sin_, sinh_, sqrt_, square, squash, t, triple, two, u, v, vector, w, x, y, z, zero) +module Expression.Utils exposing (a, abs_, asin_, atan2_, b, by, byShort, c, cbrt, complex, cos_, cosh_, d, dd, det, determinant, div, divShort, double, e, exp, f, factor, g, gra_, h, i, icomplex, ii, im, ipow, ipowShort, isOne, isZero, j, k, l, ln_, log10_, m, minus, minusOne, n, negateShort, negate_, o, one, p, plus, plusShort, pow, q, r, re, runForLoop, s, sign, sin_, sinh_, sqrt_, square, squash, t, tan_, triple, two, u, v, vector, w, x, y, z, zero) -import Dict exposing (Dict) +import Dict import Expression exposing (AssociativeOperation(..), BinaryOperation(..), Expression(..), FunctionName(..), KnownFunction(..), UnaryOperation(..), genericAsSquareMatrix, genericDeterminant, visit) import List.Extra as List @@ -24,6 +24,11 @@ two = Integer 2 +minusOne : Expression +minusOne = + Integer -1 + + -- Variables @@ -217,9 +222,14 @@ ipow base exponent = pow base <| Integer exponent +cbrt : Expression -> Expression +cbrt = + unaryFunc (Root 3) + + sqrt_ : Expression -> Expression sqrt_ = - unaryFunc Sqrt + unaryFunc (Root 2) re : Expression -> Expression @@ -252,16 +262,21 @@ sin_ = unaryFunc Sin -exp_ : Expression -> Expression -exp_ = - unaryFunc Exp - - cos_ : Expression -> Expression cos_ = unaryFunc Cos +tan_ : Expression -> Expression +tan_ = + unaryFunc Tan + + +exp : Expression -> Expression +exp = + unaryFunc Exp + + atan2_ : Expression -> Expression -> Expression atan2_ = binaryFunc Atan2 @@ -287,6 +302,16 @@ ln_ = unaryFunc Ln +log10_ : Expression -> Expression +log10_ = + unaryFunc Log10 + + +sign : Expression -> Expression +sign = + unaryFunc Sign + + double : Expression -> Expression double num = by [ two, num ] @@ -327,35 +352,34 @@ associativeOperation op default xs = squash : Expression -> Expression squash = - visit <| - \expr -> - case expr of - AssociativeOperation Addition ol or oo -> - let - extract el = - case squash el of - AssociativeOperation Addition il ir io -> - List.concatMap extract <| il :: ir :: io - - ex -> - [ ex ] - in - Just <| plus <| List.concatMap extract (ol :: or :: oo) - - AssociativeOperation Multiplication ol or oo -> - let - extract el = - case squash el of - AssociativeOperation Multiplication il ir io -> - List.concatMap extract <| il :: ir :: io - - ex -> - [ ex ] - in - Just <| by <| List.concatMap extract (ol :: or :: oo) - - _ -> - Nothing + visit <| \expr -> + case expr of + AssociativeOperation Addition ol or oo -> + let + extract el = + case squash el of + AssociativeOperation Addition il ir io -> + List.concatMap extract <| il :: ir :: io + + ex -> + [ ex ] + in + Just <| plus <| List.concatMap extract (ol :: or :: oo) + + AssociativeOperation Multiplication ol or oo -> + let + extract el = + case squash el of + AssociativeOperation Multiplication il ir io -> + List.concatMap extract <| il :: ir :: io + + ex -> + [ ex ] + in + Just <| by <| List.concatMap extract (ol :: or :: oo) + + _ -> + Nothing complex : Expression -> Expression -> Expression @@ -448,81 +472,6 @@ smallPrimes = [ 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997 ] -asPoly : String -> Expression -> Result String (Dict Int Expression) -asPoly var expr = - case expr of - AssociativeOperation Addition ll mm rr -> - List.foldl - (Result.map2 <| - \el acc -> - Dict.merge - Dict.insert - (\kk aa bb -> Dict.insert kk <| plusShort [ aa, bb ]) - Dict.insert - el - acc - Dict.empty - ) - (Ok <| Dict.empty) - (List.map (asPoly var) (ll :: mm :: rr)) - - AssociativeOperation Multiplication ll mm rr -> - (ll :: mm :: rr) - |> List.map (asPoly var >> Result.map Dict.toList) - |> List.foldl - (Result.map2 <| - \el acc -> - acc - |> List.concatMap (\acc_e -> el |> List.map (Tuple.pair acc_e)) - |> List.map (\( ( dl, cl ), ( dr, cr ) ) -> ( dl + dr, byShort [ cl, cr ] )) - ) - (Ok [ ( 0, one ) ]) - |> Result.map - (\ls -> - ls - |> List.gatherEqualsBy Tuple.first - |> List.map (\( ( deg, ff ), ts ) -> ( deg, plusShort <| ff :: List.map Tuple.second ts )) - |> Dict.fromList - ) - - Integer _ -> - Ok <| Dict.singleton 0 expr - - Float _ -> - Ok <| Dict.singleton 0 expr - - Variable evar -> - Ok <| - if var == evar then - Dict.singleton 1 one - - else - Dict.singleton 0 expr - - UnaryOperation Negate inner -> - inner - |> asPoly var - |> Result.map (Dict.map (always negateShort)) - - BinaryOperation Division num ((Integer _) as den) -> - num - |> asPoly var - |> Result.map (Dict.map (\_ coeff -> divShort coeff den)) - - BinaryOperation Power base (Integer ex) -> - if ex < 0 then - Err ("Cannot extract coefficients from " ++ Expression.toString expr) - - else if ex == 0 then - Ok <| Dict.singleton 0 one - - else - asPoly var <| byShort [ base, ipowShort base (ex - 1) ] - - _ -> - Err ("Cannot extract coefficients from " ++ Expression.toString expr) - - ipowShort : Expression -> Int -> Expression ipowShort base exponent = case exponent of @@ -606,3 +555,25 @@ isOne expr = _ -> False + + +runForLoop : List Expression -> Maybe (List Expression) +runForLoop args = + let + run expression values = + List.map + (\value -> by [ expression, value ]) + values + in + case args of + [ expression, Integer from, Integer to ] -> + Just <| run expression <| List.map Integer (List.range from (to - 1)) + + [ expression, List values ] -> + Just <| run expression values + + [ expression, Integer to ] -> + Just <| run expression <| List.map Integer (List.range 0 (to - 1)) + + _ -> + Nothing diff --git a/src/elm/Expression/Value.elm b/src/elm/Expression/Value.elm index b241bc46..ec1a92f7 100644 --- a/src/elm/Expression/Value.elm +++ b/src/elm/Expression/Value.elm @@ -1,20 +1,21 @@ -module Expression.Value exposing (Value(..), complexToSymbolic, toString, value) +module Expression.Value exposing (Value(..), complexToSymbolic, toExpression, toString, value) import Complex exposing (Complex(..)) import Dict exposing (Dict) -import Expression exposing (AssociativeOperation(..), BinaryOperation(..), Expression(..), FunctionName(..), KnownFunction(..), RelationOperation(..), SolutionTree(..), UnaryOperation(..), filterContext, fullSubstitute, genericAsSquareMatrix, genericDeterminant, genericMatrixMultiplication) -import Expression.Graph exposing (Graph(..)) +import Expression exposing (AssociativeOperation(..), BinaryOperation(..), Expression(..), FunctionName(..), KnownFunction(..), RelationOperation(..), SolutionTree, UnaryOperation(..), filterContext, fullSubstitute, genericAsSquareMatrix, genericDeterminant, genericMatrixMultiplication) +import Expression.Graph exposing (Graph) import Expression.Simplify import Expression.Solver import Expression.Utils as Utils +import UI.L10N exposing (L10N, invariant) type Value - = ErrorValue String + = ErrorValue (L10N String) | SolutionTreeValue SolutionTree | SymbolicValue Expression | ComplexValue Complex - | GraphValue Graph + | GraphValue { axes : Bool, graph : Graph } | LambdaValue String Value | ListValue (List Value) @@ -167,7 +168,7 @@ partialSubstitute : String -> Value -> Value -> Value partialSubstitute var val expr = case expr of SymbolicValue s -> - SymbolicValue <| Expression.partialSubstitute var (toSymbolic val) s + SymbolicValue <| Expression.partialSubstitute var (toExpression val) s LambdaValue x f -> if x == var then @@ -195,7 +196,12 @@ partialSubstitute var val expr = matrixMultiplication : Dict String Value -> List Value -> List Value -> Value matrixMultiplication context l r = genericMatrixMultiplication { asList = asList, by = by context, plus = plus context, toList = ListValue } (ListValue l) (ListValue r) - |> Maybe.withDefault (ErrorValue "Cannot multiply matrices") + |> Maybe.withDefault + (ErrorValue + { en = "Cannot multiply the matrices" + , it = "Impossibile moltiplicare let matrici" + } + ) applyValue : Dict String Value -> FunctionName -> List Expression -> Value @@ -238,16 +244,19 @@ applyValue context name args = unaryFunctionValue context args Round Complex.round KnownFunction Min -> - binaryFunctionValue context args Min Complex.min + arbitraryFunctionValue context args Min Complex.min KnownFunction Max -> - binaryFunctionValue context args Max Complex.max + arbitraryFunctionValue context args Max Complex.max KnownFunction Atan2 -> binaryFunctionValue context args Atan2 Complex.atan2 - KnownFunction Sqrt -> - unaryFunctionValue context args Sqrt Complex.sqrt + KnownFunction (Root 2) -> + unaryFunctionValue context args (Root 2) Complex.sqrt + + KnownFunction (Root n) -> + unaryFunctionValue context args (Root n) (\v -> Complex.power v (Complex.fromReal <| 1.0 / toFloat n)) KnownFunction Ln -> unaryFunctionValue context args Ln Complex.ln @@ -270,13 +279,16 @@ applyValue context name args = KnownFunction Log10 -> unaryFunctionValue context args Log10 <| \v -> Complex.div v (Complex.ln <| Complex.fromReal 10) + KnownFunction Mbrot -> + SymbolicValue <| Apply name args + KnownFunction Det -> case args of [ c ] -> determinant context <| innerValue context c _ -> - ErrorValue "Unexpected number of args to pw, expected 1" + unexpectedArgCount (Just "det") [ 1 ] KnownFunction Exp -> unaryFunctionValue context args Exp Complex.exp @@ -284,26 +296,26 @@ applyValue context name args = KnownFunction Pw -> case args of [ c, t, f ] -> - if ComplexValue Complex.zero == innerValue context c then - innerValue context f + case innerValue context c of + ComplexValue cv -> + innerValue context <| + if cv == Complex.zero then + f - else - innerValue context t + else + t - _ -> - ErrorValue "Unexpected number of args to pw, expected 3" + ErrorValue e -> + ErrorValue e - KnownFunction Gra -> - ErrorValue "TODO" + SymbolicValue s -> + SymbolicValue <| Apply (KnownFunction Pw) [ s, t, f ] - KnownFunction Dd -> - ErrorValue "TODO" + _ -> + SymbolicValue <| Apply (KnownFunction Pw) args - KnownFunction Ii -> - ErrorValue "TODO" - - KnownFunction Mod -> - ErrorValue "TODO" + _ -> + unexpectedArgCount (Just "pw") [ 3 ] KnownFunction Solve -> case args of @@ -312,7 +324,7 @@ applyValue context name args = Expression.Solver.solve e x _ -> - ErrorValue "Error in solve: wrong number of arguments" + unexpectedArgCount (Just "solve") [ 2 ] KnownFunction Simplify -> case args of @@ -320,26 +332,105 @@ applyValue context name args = SymbolicValue <| Expression.Simplify.simplify e _ -> - ErrorValue "Error in simplify: wrong number of arguments" + unexpectedArgCount (Just "simplify") [ 1 ] KnownFunction StepSimplify -> case args of [ e ] -> - SolutionTreeValue <| Expression.Solver.stepSimplify SolutionDone e + SolutionTreeValue <| Expression.Solver.stepSimplify e _ -> - ErrorValue "Error in stepsimplify: wrong number of arguments" + unexpectedArgCount (Just "stepsimplify") [ 1 ] KnownFunction Plot -> case args of [ e ] -> - GraphValue <| Expression.Graph.fromExpression e + GraphValue + { axes = True + , graph = Expression.Graph.fromExpression <| toExpression <| value Dict.empty e + } + + _ -> + unexpectedArgCount (Just "plot") [ 1 ] + + KnownFunction APlot -> + case args of + [ e ] -> + GraphValue + { axes = False + , graph = Expression.Graph.fromExpression <| toExpression <| value Dict.empty e + } _ -> - ErrorValue "Error in plot: wrong number of arguments" + unexpectedArgCount (Just "aplot") [ 1 ] + + KnownFunction For -> + case Utils.runForLoop args of + Just values -> + value context <| List values + + _ -> + unexpectedArgCount (Just "for") [ 2, 3 ] + + KnownFunction Gra -> + --TODO + SymbolicValue <| Apply name args + + KnownFunction Dd -> + --TODO + SymbolicValue <| Apply name args + + KnownFunction Ii -> + --TODO + SymbolicValue <| Apply name args + + KnownFunction Mod -> + --TODO + SymbolicValue <| Apply name args UserFunction _ -> - ErrorValue "TODO" + --TODO + SymbolicValue <| Apply name args + + +unexpectedArgCount : Maybe String -> List Int -> Value +unexpectedArgCount maybeName count = + case maybeName of + Just name -> + ErrorValue + { en = + "Unexpected number of args to " + ++ name + ++ ", expected " + ++ String.join " or " (List.map String.fromInt count) + , it = + "Numero di argomenti inatteso per " + ++ name + ++ ", " + ++ (if count == [ 1 ] then + "atteso " + + else + "attesi " + ) + ++ String.join " o " (List.map String.fromInt count) + } + + Nothing -> + ErrorValue + { en = + "Unexpected number of args, expected " + ++ String.join " or " (List.map String.fromInt count) + , it = + "Numero di argomenti inatteso, " + ++ (if count == [ 1 ] then + "atteso " + + else + "attesi " + ) + ++ String.join " o " (List.map String.fromInt count) + } asList : Value -> Maybe (List Value) @@ -389,16 +480,31 @@ determinant context val = , by = by context , negate = negateValue } - |> Maybe.withDefault (ErrorValue "Error in calculating the determinant") + |> Maybe.withDefault + (ErrorValue + { en = "Error in calculating the determinant" + , it = "Errore nel calcolo del determinante" + } + ) Nothing -> - ErrorValue "Cannot calculate the determinant of a nonquare matrix" + ErrorValue <| + UI.L10N.concat + [ strings.cannotCalculateDeterminantOf + , { en = "a nonquare matrix" + , it = "una matrice non quadrata" + } + ] SymbolicValue s -> SymbolicValue <| Utils.determinant s GraphValue _ -> - ErrorValue "Cannot calculate the determinant of a graph" + ErrorValue <| + UI.L10N.concat + [ strings.cannotCalculateDeterminantOf + , strings.graphs + ] ComplexValue _ -> val @@ -410,7 +516,11 @@ determinant context val = val SolutionTreeValue _ -> - ErrorValue "Cannot calculate the determinant of a solution" + ErrorValue <| + UI.L10N.concat + [ strings.cannotCalculateDeterminantOf + , strings.solutionTrees + ] unaryFunctionValue : Dict String Value -> List Expression -> KnownFunction -> (Complex -> Complex) -> Value @@ -423,11 +533,10 @@ unaryFunctionValue context args s f = , list = Nothing , lambda = Nothing } - <| - innerValue context e + (innerValue context e) _ -> - ErrorValue "Unexpected number of arguments, expected 1" + unexpectedArgCount Nothing [ 1 ] binaryFunctionValue : Dict String Value -> List Expression -> KnownFunction -> (Complex -> Complex -> Complex) -> Value @@ -445,32 +554,75 @@ binaryFunctionValue context args s f = (innerValue context r) _ -> - ErrorValue "Unexpected number of arguments, expected 1" + unexpectedArgCount Nothing [ 2 ] -toString : Value -> String +arbitraryFunctionValue : Dict String Value -> List Expression -> KnownFunction -> (Complex -> Complex -> Complex) -> Value +arbitraryFunctionValue context args s f = + case args of + h :: t -> + List.foldr + (\e -> + complexMap2 + { symbolic = \lv rv -> Apply (KnownFunction s) [ lv, rv ] + , complex = f + , list = Nothing + , lambda = Nothing + , context = context + } + (innerValue context e) + ) + (innerValue context h) + t + + _ -> + unexpectedArgCount Nothing [ 1 ] + + +toString : Value -> L10N String toString v = case v of ComplexValue z -> - Complex.toString z + invariant <| Complex.toString z ListValue ls -> - "{" ++ String.join ", " (List.map toString ls) ++ "}" + UI.L10N.concat + [ invariant "{" + , UI.L10N.map (String.join ", ") (UI.L10N.traverse toString ls) + , invariant "}" + ] ErrorValue e -> - "Error: " ++ e + { en = "Error: " ++ e.en + , it = "Errore: " ++ e.it + } SymbolicValue s -> - Expression.toString s + invariant <| Expression.toString s GraphValue g -> - "Graph: " ++ Expression.Graph.toString g + { en = + if g.axes then + "Graph: " ++ Expression.Graph.toString g.graph + + else + "Graph without axes: " ++ Expression.Graph.toString g.graph + , it = + if g.axes then + "Grafico: " ++ Expression.Graph.toString g.graph + + else + "Grafico senza assi: " ++ Expression.Graph.toString g.graph + } LambdaValue x f -> - "Lambda: " ++ x ++ " => " ++ toString f + UI.L10N.map (\fs -> "Lambda: " ++ x ++ " => " ++ fs) (toString f) SolutionTreeValue s -> - "SolutionTree: " ++ Expression.solutionTreeToString s + UI.L10N.concat + [ { en = "SolutionTree: ", it = "Albero di Soluzioni: " } + , Expression.solutionTreeToString s + ] relationValue : RelationOperation -> Complex -> Complex -> Complex @@ -533,10 +685,18 @@ complexMap ({ lambda, symbolic, complex, list } as fs) v = ComplexValue <| complex c GraphValue _ -> - ErrorValue "Tried to apply function to graph" + ErrorValue <| + UI.L10N.concat + [ strings.cannotApplyFunctionsTo + , strings.graphs + ] SolutionTreeValue _ -> - ErrorValue "Tried to apply function to solution tree" + ErrorValue <| + UI.L10N.concat + [ strings.cannotApplyFunctionsTo + , strings.solutionTrees + ] SymbolicValue w -> SymbolicValue <| symbolic w @@ -561,6 +721,30 @@ simpleComplexMap2 symbolic complex context l r = (innerValue context r) +strings = + { cannotCalculateDeterminantOf = + { en = "Cannot calculate the determinant of " + , it = "Impossibile calcolare il determinante di " + } + , cannotPerformCalculationsOn = + { en = "Cannot perform calculations on " + , it = "Impossibile effettuare operazioni su " + } + , cannotApplyFunctionsTo = + { en = "Cannot apply functions to " + , it = "Impossibile applicare funzioni a " + } + , graphs = + { en = "graphs" + , it = "grafici" + } + , solutionTrees = + { en = "solution trees" + , it = "alberi di soluzioni" + } + } + + complexMap2 : { symbolic : Expression -> Expression -> Expression , complex : Complex -> Complex -> Complex @@ -580,10 +764,18 @@ complexMap2 ({ symbolic, complex, list, lambda, context } as fs) v w = w ( SolutionTreeValue _, _ ) -> - ErrorValue "Tried to apply function to solution tree" + ErrorValue <| + UI.L10N.concat + [ strings.cannotPerformCalculationsOn + , strings.solutionTrees + ] ( _, SolutionTreeValue _ ) -> - ErrorValue "Tried to apply function to solution tree" + ErrorValue <| + UI.L10N.concat + [ strings.cannotPerformCalculationsOn + , strings.solutionTrees + ] ( LambdaValue x f, _ ) -> case lambda of @@ -593,7 +785,7 @@ complexMap2 ({ symbolic, complex, list, lambda, context } as fs) v w = Nothing -> LambdaValue x <| innerValue (Dict.remove x context) - (symbolic (toSymbolic f) (toSymbolic w)) + (symbolic (toExpression f) (toExpression w)) ( _, LambdaValue x f ) -> case lambda of @@ -603,7 +795,7 @@ complexMap2 ({ symbolic, complex, list, lambda, context } as fs) v w = Nothing -> LambdaValue x <| innerValue (Dict.remove x context) - (symbolic (toSymbolic v) (toSymbolic f)) + (symbolic (toExpression v) (toExpression f)) ( ListValue ls, ListValue rs ) -> case list of @@ -617,10 +809,10 @@ complexMap2 ({ symbolic, complex, list, lambda, context } as fs) v w = ComplexValue <| complex l r ( SymbolicValue l, _ ) -> - SymbolicValue <| symbolic l (toSymbolic w) + SymbolicValue <| symbolic l (toExpression w) ( _, SymbolicValue r ) -> - SymbolicValue <| symbolic (toSymbolic v) r + SymbolicValue <| symbolic (toExpression v) r ( ListValue l, ComplexValue _ ) -> ListValue <| List.map (\le -> complexMap2 fs le w) l @@ -629,17 +821,25 @@ complexMap2 ({ symbolic, complex, list, lambda, context } as fs) v w = ListValue <| List.map (\re -> complexMap2 fs v re) r ( GraphValue _, _ ) -> - ErrorValue "Cannot perform calculations on graphs" + ErrorValue <| + UI.L10N.concat + [ strings.cannotPerformCalculationsOn + , strings.graphs + ] ( _, GraphValue _ ) -> - ErrorValue "Cannot perform calculations on graphs" + ErrorValue <| + UI.L10N.concat + [ strings.cannotPerformCalculationsOn + , strings.graphs + ] -toSymbolic : Value -> Expression -toSymbolic v = +toExpression : Value -> Expression +toExpression v = case v of LambdaValue x f -> - Lambda x <| toSymbolic f + Lambda x <| toExpression f SymbolicValue s -> s @@ -648,10 +848,18 @@ toSymbolic v = complexToSymbolic c ListValue l -> - List <| List.map toSymbolic l + List <| List.map toExpression l - GraphValue g -> - Apply (KnownFunction Plot) [ Expression.Graph.toExpression g ] + GraphValue { graph, axes } -> + Apply + (KnownFunction <| + if axes then + Plot + + else + APlot + ) + [ Expression.Graph.toExpression graph ] ErrorValue _ -> Integer 0 diff --git a/src/elm/Fraction.elm b/src/elm/Fraction.elm index f9bf08e9..d31e295c 100644 --- a/src/elm/Fraction.elm +++ b/src/elm/Fraction.elm @@ -48,7 +48,7 @@ build n d = else let g = - abs <| gcd n d + gcd n d in Fraction (n // g) (d // g) @@ -71,7 +71,7 @@ isZero (Fraction n _) = gcd : Int -> Int -> Int gcd ll rr = if ll < 0 then - -(gcd -ll rr) + gcd -ll rr else if ll < rr then gcd rr ll diff --git a/src/elm/UI.elm b/src/elm/UI.elm index 00ef2c3a..45e2e24c 100644 --- a/src/elm/UI.elm +++ b/src/elm/UI.elm @@ -9,38 +9,31 @@ import Browser.Events import Browser.Navigation exposing (Key) import Codec import Document exposing (Modal(..), Output(..), Row, RowData(..), StoredDocument, UIDocument) -import Element.WithContext as Element exposing (DeviceClass(..), alignBottom, alignRight, centerX, centerY, el, fill, height, inFront, padding, scrollbarX, shrink, spacing, width) +import Element.WithContext as Element exposing (DeviceClass(..), alignBottom, alignRight, centerX, centerY, el, fill, height, padding, scrollbarX, shrink, spacing, width) import Element.WithContext.Background as Background import Element.WithContext.Border as Border import Element.WithContext.Font as Font import Element.WithContext.Input as Input import Element.WithContext.Lazy as Lazy -import Expression exposing (Expression(..), RelationOperation(..)) import Expression.Parser import File import File.Download import File.Select import Html import Html.Attributes -import List import List.Extra as List -import Maybe import Maybe.MyExtra as Maybe import Task import UI.L10N as L10N exposing (L10N, Language(..), text, title) -import UI.Model as Model exposing (CellMsg(..), Context, DocumentMsg(..), Flags, Model, Msg(..)) +import UI.Model as Model exposing (CellMsg(..), DocumentMsg(..), Flags, Model, Msg(..)) import UI.Ports import UI.RowView -import UI.Theme as Theme exposing (hr, onKey) +import UI.Theme as Theme exposing (Element, hr, onKey) import Url exposing (Url) import Url.Parser import Zipper exposing (Zipper) -type alias Element msg = - Element.Element Context msg - - main : Program Flags Model Msg main = Browser.application @@ -59,25 +52,26 @@ main = } , update = update , subscriptions = subscriptions - , onUrlChange = always <| Nop "onUrlChange" - , onUrlRequest = always <| Nop "onUrlRequest" + , onUrlChange = \_ -> Nop "onUrlChange" + , onUrlRequest = \_ -> Nop "onUrlRequest" } defaultDocument : List String defaultDocument = - [ "{{plotsinx, plot(x1,-1,.5sinsqrt(x²+y²+z²" - , "plot{z=sin(x²+y²),x²+y²+(z-2)² = 3}" , "simplifydet{{a,b,c},{0,1,0},{1,2,3" - , "solve(x+2(x-(x²-6)+1),x" + , "plot{z=sin(x²+y²),x²+y²+(z-2)² = 3}" + , "stepsimplify(sin(pi/2-x))" + , "[zx+iy]{plot(z³-1),plotabs(z³-1),plotarg(z³-1)}" , "" ] init : Flags -> Url -> Key -> ( Model, Cmd Msg ) -init ({ saved, hasClipboard, languages } as flags) url key = +init ({ saved, hasClipboard, hasFullscreen, languages } as flags) url key = let indexToId index = let @@ -138,6 +132,7 @@ init ({ saved, hasClipboard, languages } as flags) url key = , height = floor viewport.height } ) + |> Task.perform Resized parseLanguage lang = case String.split "-" lang of @@ -221,13 +216,16 @@ init ({ saved, hasClipboard, languages } as flags) url key = , google = google , context = { hasClipboard = hasClipboard + , hasFullscreen = hasFullscreen + , isFullscreen = False , language = languages |> List.map parseLanguage |> List.filterMap identity |> List.head |> Maybe.withDefault En - , expandIntervals = True + , expandIntervals = False + , rayDifferentials = True -- The other classes have faster processors so should update quicker , deviceClass = Phone @@ -237,10 +235,13 @@ init ({ saved, hasClipboard, languages } as flags) url key = ( model , case googleAccessTokenFromUrl of Nothing -> - Task.perform Resized measure + measure Just token -> - UI.Ports.saveGoogleAccessTokenAndCloseWindow token + Cmd.batch + [ measure + , UI.Ports.saveGoogleAccessTokenAndCloseWindow token + ] ) @@ -272,7 +273,18 @@ view model = textarea.input { word-break: break-word !important; - }""" + } + + @media (hover: hover) { + div.hover-parent div.on-parent-hover { + visibility: hidden; + } + + div.hover-parent:hover div.on-parent-hover { + visibility: visible; + } + } + """ ] , documentPicker model , documentView @@ -294,7 +306,7 @@ toolbar ({ google, openMenu, showPendingActions } as model) = Input.button ([ alignRight , centerY - , padding Theme.spacing + , Theme.padding , Border.rounded 999 , Element.mouseOver [ Background.color <| Theme.darken Theme.colors.background ] , title label @@ -311,16 +323,16 @@ toolbar ({ google, openMenu, showPendingActions } as model) = { en = "Menu", it = "Menù" } pendingActions = - let - waitingAccessTokenLabel = - { en = "Waiting for user to authenticate with Google" - , it = "In attesa che l'utente si autentichi con Google" - } - in let viewGoogleAction { en, it } { name, request } = case request of Google.WaitingAccessToken -> + let + waitingAccessTokenLabel = + { en = "Waiting for user to authenticate with Google" + , it = "In attesa che l'utente si autentichi con Google" + } + in ( text { en = name ++ ": " ++ waitingAccessTokenLabel.en , it = name ++ ": " ++ waitingAccessTokenLabel.it @@ -347,7 +359,8 @@ toolbar ({ google, openMenu, showPendingActions } as model) = "unexpected response " ++ r _ -> - Debug.toString error + -- Debug.toString error + "Unexpected error" ) , it = name @@ -357,7 +370,8 @@ toolbar ({ google, openMenu, showPendingActions } as model) = "risposta inattesa " ++ r _ -> - Debug.toString error + -- Debug.toString error + "Unexpected error" ) } ] @@ -409,7 +423,7 @@ toolbar ({ google, openMenu, showPendingActions } as model) = ) in Element.row - [ padding <| Theme.spacing // 4 + [ padding <| Theme.rythm // 4 , if openMenu then Element.below <| dropdown model @@ -443,7 +457,7 @@ viewPendingActions actions = [ label , Input.button [ alignRight - , Element.htmlAttribute <| Html.Attributes.title "Do it" + , title { en = "Run", it = "Esegui" } ] { onPress = Just m , label = Element.element <| Icons.playSquareOutlined Theme.darkIconAttrs @@ -454,7 +468,7 @@ viewPendingActions actions = [ alignRight , Background.color Theme.colors.background , Border.width 1 - , padding Theme.spacing + , Theme.padding ] (List.intersperse hr <| List.map viewPendingAction actions) @@ -482,7 +496,7 @@ dropdown model = btn msg icon lbl = Input.button - [ padding Theme.spacing + [ Theme.padding , width fill ] { onPress = Just msg @@ -493,7 +507,7 @@ dropdown model = Element.none mainIcon :: layers -> - List.foldl (\e -> el [ inFront e ]) mainIcon layers + List.foldl (\e -> el [ Element.inFront e ]) mainIcon layers , text lbl ] } @@ -503,44 +517,67 @@ dropdown model = [ Element.element <| icon Theme.darkIconAttrs ] lbl - vr = - el - [ height fill - , Border.widthEach - { top = 0 - , bottom = 0 - , right = 1 - , left = 0 - } - ] - Element.none - languageButton lang flag = el [ width fill ] <| el [ centerX ] <| btn (Language lang) [] <| L10N.invariant flag - languagesRow = - Element.row [ width fill ] - [ languageButton En "🇬🇧" - , vr - , languageButton It "🇮🇹" - ] - expandIntervalsButton expandIntervals = if expandIntervals then btn (ToggleExpandIntervals False) [ Element.element <| Icons.funnelPlotOutlined Theme.darkIconAttrs , bigStop ] - { en = "Do not apply noise reduction", it = "Non applicare riduzione rumore" } + { en = "Do not apply noise reduction" + , it = "Non applicare riduzione rumore" + } else - simpleBtn (ToggleExpandIntervals True) Icons.funnelPlotOutlined { en = "Apply noise reduction", it = "Applica riduzione rumore" } + simpleBtn (ToggleExpandIntervals True) + Icons.funnelPlotOutlined + { en = "Apply noise reduction" + , it = "Applica riduzione rumore" + } + + rayDifferentialsButton rayDifferentials = + if rayDifferentials then + btn (ToggleRayDifferentials False) + [ Element.element <| Icons.funnelPlotOutlined Theme.darkIconAttrs + , bigStop + ] + { en = "Do not apply ray differentials" + , it = "Non applicare differenziali raggi" + } + + else + simpleBtn (ToggleRayDifferentials True) + Icons.funnelPlotOutlined + { en = "Apply ray differentials" + , it = "Applica differenziali raggi" + } buttons = let + vr = + el + [ height fill + , Border.widthEach + { top = 0 + , bottom = 0 + , right = 1 + , left = 0 + } + ] + Element.none + + languagesRow = + Element.row [ width fill ] + [ languageButton En "🇬🇧" + , vr + , languageButton It "🇮🇹" + ] + sid = selectedDocumentId model in @@ -553,6 +590,7 @@ dropdown model = { en = "Save", it = "Salva" } ) , Just <| Element.with .expandIntervals expandIntervalsButton + , Just <| Element.with .rayDifferentials rayDifferentialsButton {- , sid |> Maybe.map @@ -637,14 +675,14 @@ documentPicker ({ documents } as model) = ] in Element.row - [ Element.paddingEach { left = Theme.spacing, right = Theme.spacing, top = Theme.spacing, bottom = 0 } + [ Element.paddingEach { left = Theme.rythm, right = Theme.rythm, top = Theme.rythm, bottom = 0 } , Border.widthEach { bottom = 1, top = 0, left = 0, right = 0 } , width fill - , spacing <| Theme.spacing // 2 + , spacing <| Theme.rythm // 2 ] [ Element.row [ alignBottom - , spacing <| Theme.spacing // 2 + , spacing <| Theme.rythm // 2 , scrollbarX , width fill ] @@ -672,7 +710,7 @@ ellipsize s = documentTabButton : { a | selected : Bool, onPress : msg, closeMsg : Maybe msg, label : Element msg, title : L10N String } -> Element msg -documentTabButton { selected, onPress, closeMsg, label, title } = +documentTabButton ({ selected, onPress, closeMsg, label } as config) = let focusStyle = Element.focused @@ -707,7 +745,7 @@ documentTabButton { selected, onPress, closeMsg, label, title } = else Theme.colors.unselectedDocument - , L10N.title title + , title config.title , alignBottom , focusStyle ] @@ -721,14 +759,14 @@ documentTabButton { selected, onPress, closeMsg, label, title } = el [ case closeMsg of Nothing -> - Element.padding Theme.spacing + Theme.padding Just _ -> Element.paddingEach - { left = Theme.spacing - , top = Theme.spacing - , bottom = Theme.spacing - , right = Theme.spacing // 2 + { left = Theme.rythm + , top = Theme.rythm + , bottom = Theme.rythm + , right = Theme.rythm // 2 } ] label @@ -740,12 +778,16 @@ documentTabButton { selected, onPress, closeMsg, label, title } = Just _ -> Input.button [ Element.paddingEach - { left = Theme.spacing // 2 - , top = Theme.spacing - , bottom = Theme.spacing - , right = Theme.spacing + { left = Theme.rythm // 2 + , top = Theme.rythm + , bottom = Theme.rythm + , right = Theme.rythm } , focusStyleChild + , title + { en = "Close" + , it = "Chiudi" + } ] { onPress = closeMsg , label = Element.element <| Icons.closeOutlined Theme.smallDarkIconAttrs @@ -761,7 +803,7 @@ viewDocumentModal document = el [ width fill , height fill - , padding <| Theme.spacing * 8 + , padding <| Theme.rythm * 8 , Background.color Theme.colors.modalTransparentBackground , Element.htmlAttribute <| Html.Attributes.style "backdrop-filter" "blur(2px)" ] @@ -773,15 +815,15 @@ viewDocumentModal document = , Border.rounded Theme.roundness ] <| - el [ padding Theme.spacing ] <| + el [ Theme.padding ] <| Theme.column [] (e ++ [ Theme.row [ alignRight ] - [ Input.button [ padding Theme.spacing ] + [ Input.button [ Theme.padding ] { onPress = Just onOk , label = text { en = "Ok", it = "Ok" } } - , Input.button [ padding Theme.spacing ] + , Input.button [ Theme.padding ] { onPress = Just DocumentPopModal , label = text { en = "Cancel", it = "Annulla" } } @@ -812,17 +854,16 @@ viewDocumentModal document = wrap (DocumentRename name) [ Input.text [ Input.focusedOnLoad - , onKey <| - \key -> - case key of - "Enter" -> - Just <| DocumentRename name + , onKey <| \key -> + case key of + "Enter" -> + Just <| DocumentRename name - "Escape" -> - Just DocumentPopModal + "Escape" -> + Just DocumentPopModal - _ -> - Nothing + _ -> + Nothing ] { onChange = DocumentReplaceModal << ModalRename , text = name @@ -852,8 +893,8 @@ viewDocument size { id, rows } = in Element.map (DocumentMsg id) <| Element.column - [ Element.spacing <| 2 * Theme.spacing - , Element.padding Theme.spacing + [ spacing <| 2 * Theme.rythm + , Theme.padding , width fill , height fill , Element.scrollbarY @@ -867,27 +908,24 @@ update msg = calculateRow r = case r.data of CodeRow _ -> - { r | editing = False, data = CodeRow <| List.filterMap parseOrError <| String.split "\n" r.input } + { r | editing = False, data = CodeRow <| List.filterMap parseOrError <| String.split "\n" <| String.replace "\\\n" "" r.input } MarkdownRow -> { r | editing = False } - filterEmpty = - List.filterNot (.input >> String.isEmpty) - >> (\rs -> rs ++ [ Document.emptyRow ]) - inner model = case msg of - DocumentMsg id (DocumentCellMsg data) -> + DocumentMsg docId (DocumentCellMsg data) -> let updateRow rowF = - updateCurrent + updateByDocId docId (\curr -> { curr | rows = curr.rows |> List.updateAt data.index rowF - |> filterEmpty + |> List.filterNot (.input >> String.isEmpty) + |> (\rs -> rs ++ [ Document.emptyRow ]) } ) model @@ -899,6 +937,9 @@ update msg = SaveCanvas canvasId -> ( model, UI.Ports.saveCanvas canvasId ) + FullscreenCanvas canvasId -> + ( model, UI.Ports.fullscreenCanvas canvasId ) + Input input -> updateRow (\r -> { r | input = input }) @@ -920,6 +961,12 @@ update msg = Clear -> updateRow (\r -> { r | data = CodeRow [] }) + ExitFullscreenCanvas canvasId -> + ( model, UI.Ports.exitFullscreenCanvas canvasId ) + + ResetZoom canvasId -> + ( model, UI.Ports.resetZoomCanvas canvasId ) + DocumentNew -> addDocument model { rows = [ Document.emptyRow ] @@ -927,20 +974,18 @@ update msg = , googleId = Nothing } - DocumentMsg id DocumentSelect -> + DocumentMsg docId DocumentSelect -> let documents = Maybe.map - (Zipper.focusFind (\d -> d.id == id)) + (Zipper.focusFind (\{ id } -> id == docId)) model.documents in - ( { model | documents = documents } - , persist documents - ) + persist { model | documents = documents } DocumentMsg docId (DocumentClose { ask }) -> if ask then - updateCurrent + updateByDocId docId (\document -> { document | modals = ModalClose :: document.modals @@ -954,15 +999,17 @@ update msg = model.documents |> Maybe.andThen (Zipper.filter (\{ id } -> id /= docId)) in - ( { model | documents = documents } - , persist documents - ) + persist { model | documents = documents } - DocumentMsg _ DocumentCalculateAll -> - updateCurrent (\doc -> { doc | rows = List.map calculateRow doc.rows }) model + DocumentMsg docId DocumentCalculateAll -> + updateByDocId docId + (\doc -> + { doc | rows = List.map calculateRow doc.rows } + ) + model - DocumentMsg _ DocumentClearAll -> - updateCurrent + DocumentMsg docId DocumentClearAll -> + updateByDocId docId (\doc -> { doc | rows = @@ -980,8 +1027,8 @@ update msg = ) model - DocumentMsg _ (DocumentRename name) -> - updateCurrent + DocumentMsg docId (DocumentRename name) -> + updateByDocId docId (\doc -> { doc | name = @@ -1011,25 +1058,21 @@ update msg = DocumentOpen -> ( model, File.Select.file [ "text/plain", ".txt" ] DocumentOpenSelected ) - DocumentMsg _ (DocumentPushModal modal) -> - updateCurrent (\document -> { document | modals = modal :: document.modals }) model + DocumentMsg docId (DocumentPushModal modal) -> + updateByDocId docId (\document -> { document | modals = modal :: document.modals }) model - DocumentMsg _ DocumentPopModal -> - updateCurrent (\document -> { document | modals = List.drop 1 document.modals }) model + DocumentMsg docId DocumentPopModal -> + updateByDocId docId (\document -> { document | modals = List.drop 1 document.modals }) model - DocumentMsg _ (DocumentReplaceModal modal) -> - updateCurrent (\document -> { document | modals = modal :: List.drop 1 document.modals }) model + DocumentMsg docId (DocumentReplaceModal modal) -> + updateByDocId docId (\document -> { document | modals = modal :: List.drop 1 document.modals }) model - DocumentMsg _ DocumentDownload -> - case model.documents of + DocumentMsg docId DocumentDownload -> + case List.find (\{ id } -> id == docId) <| Maybe.withDefault [] <| Maybe.map Zipper.toList model.documents of Nothing -> ( model, Cmd.none ) - Just docs -> - let - document = - Zipper.selected docs - in + Just document -> -- TODO: ask the user for a name if empty ( model , File.Download.string @@ -1079,6 +1122,13 @@ update msg = in ( { model | context = { context | expandIntervals = expandIntervals } }, Cmd.none ) + ToggleRayDifferentials rayDifferentials -> + let + context = + model.context + in + ( { model | context = { context | rayDifferentials = rayDifferentials } }, Cmd.none ) + GoogleAuth -> ( model, UI.Ports.openWindow <| Google.authenticationFlowUrl model.rootUrl ) @@ -1091,114 +1141,7 @@ update msg = ( model, Cmd.none ) DocumentMsg docId (DocumentGoogleId res) -> - case res of - Ok googleId -> - let - google = - model.google - - maybeDoc = - model.google.waitingId - |> List.find (\{ id } -> id == docId) - - google_ { name, content } request = - { google - | waitingId = List.filter (\{ id } -> id /= docId) google.waitingId - , waitingSave = - { id = docId - , name = name - , content = content - , googleId = googleId - , request = request - } - :: google.waitingSave - } - - documents_ = - Maybe.map - (Zipper.map - (\_ ({ id } as document) -> - if id == docId then - { document - | googleId = Just googleId - } - - else - document - ) - ) - model.documents - in - case maybeDoc of - Nothing -> - ( model - , Cmd.none - ) - - Just data -> - case google.accessToken of - Missing -> - ( { model - | google = google_ data WaitingAccessToken - , documents = documents_ - } - , persist documents_ - ) - - Expired -> - ( { model - | google = google_ data WaitingAccessToken - , documents = documents_ - } - , persist documents_ - ) - - Present token -> - ( { model - | google = google_ data Running - , documents = documents_ - } - , Cmd.batch - [ Task.attempt (DocumentMsg docId << DocumentGoogleSaveResult) - (Google.uploadFile - { id = googleId - , name = data.name - , content = data.content - , accessToken = token - } - ) - , persist documents_ - ] - ) - - Err e -> - let - google = - model.google - - google_ = - { google - | waitingId = - List.map - (\({ id } as data) -> - if id == docId then - { data | request = Google.Errored e } - - else - data - ) - google.waitingId - } - in - if e == Google.Unauthorized then - ( { model - | google = { google_ | accessToken = Expired } - } - , UI.Ports.saveGoogleAccessToken "" - ) - - else - ( { model | google = google_ }, Cmd.none ) + documentGoogleId docId res model DocumentMsg docId (DocumentGoogleSaveResult res) -> let @@ -1237,6 +1180,20 @@ update msg = else ( { model | google = google_ }, Cmd.none ) + IsFullscreen isFullscreen -> + let + context = + model.context + in + ( { model + | context = + { context + | isFullscreen = isFullscreen + } + } + , Cmd.none + ) + GoogleGotAccessToken token -> let google = @@ -1293,6 +1250,120 @@ update msg = \model -> inner { model | openMenu = False, showPendingActions = False } +documentGoogleId : Document.Id -> Result Google.Error Google.FileId -> Model -> ( Model, Cmd Msg ) +documentGoogleId docId res model = + case res of + Ok googleId -> + let + google = + model.google + + maybeDoc = + model.google.waitingId + |> List.find (\{ id } -> id == docId) + + google_ { name, content } request = + { google + | waitingId = List.filter (\{ id } -> id /= docId) google.waitingId + , waitingSave = + { id = docId + , name = name + , content = content + , googleId = googleId + , request = request + } + :: google.waitingSave + } + in + case maybeDoc of + Nothing -> + ( model + , Cmd.none + ) + + Just data -> + let + documents_ = + Maybe.map + (Zipper.map + (\_ ({ id } as document) -> + if id == docId then + { document + | googleId = Just googleId + } + + else + document + ) + ) + model.documents + in + case google.accessToken of + Missing -> + persist + { model + | google = google_ data WaitingAccessToken + , documents = documents_ + } + + Expired -> + persist + { model + | google = google_ data WaitingAccessToken + , documents = documents_ + } + + Present token -> + { model + | google = google_ data Running + , documents = documents_ + } + |> persist + |> withCommand + (Task.attempt (DocumentMsg docId << DocumentGoogleSaveResult) <| + Google.uploadFile + { id = googleId + , name = data.name + , content = data.content + , accessToken = token + } + ) + + Err e -> + let + google = + model.google + + google_ = + { google + | waitingId = + List.map + (\({ id } as data) -> + if id == docId then + { data | request = Google.Errored e } + + else + data + ) + google.waitingId + } + in + if e == Google.Unauthorized then + ( { model + | google = { google_ | accessToken = Expired } + } + , UI.Ports.saveGoogleAccessToken "" + ) + + else + ( { model | google = google_ }, Cmd.none ) + + +withCommand : Cmd Msg -> ( Model, Cmd Msg ) -> ( Model, Cmd Msg ) +withCommand cmd ( model, cmds ) = + ( model, Cmd.batch [ cmd, cmds ] ) + + addDocument : Model -> StoredDocument -> ( Model, Cmd Msg ) addDocument model { name, rows, googleId } = let @@ -1315,20 +1386,21 @@ addDocument model { name, rows, googleId } = |> Zipper.append toAppend |> Zipper.allRight in - ( { model - | documents = documents - , nextId = model.nextId + 1 - } - , persist documents - ) + persist + { model + | documents = documents + , nextId = model.nextId + 1 + } -persist : Maybe (Zipper UIDocument) -> Cmd msg -persist documents = - documents +persist : Model -> ( Model, Cmd msg ) +persist model = + ( model + , model.documents |> Maybe.map (Zipper.map (\_ -> Document.toStored)) |> Codec.encodeToValue Model.documentsCodec |> UI.Ports.persist + ) googleSave : Model -> UIDocument -> ( Model, Cmd Msg ) @@ -1399,23 +1471,26 @@ googleSave model document = ) -updateCurrent : (UIDocument -> UIDocument) -> Model -> ( Model, Cmd msg ) -updateCurrent f model = +updateByDocId : Document.Id -> (UIDocument -> UIDocument) -> Model -> ( Model, Cmd msg ) +updateByDocId docId f model = case model.documents of Nothing -> ( model, Cmd.none ) Just docs -> let - selected = - Zipper.selected docs - documents = - Just <| Zipper.setSelected (f selected) docs + Zipper.map + (\_ ({ id } as doc) -> + if id == docId then + f doc + + else + doc + ) + docs in - ( { model | documents = documents } - , persist documents - ) + persist { model | documents = Just documents } parseOrError : String -> Maybe Output @@ -1438,4 +1513,5 @@ subscriptions _ = Sub.batch [ Browser.Events.onResize (\w h -> Resized { width = w, height = h }) , UI.Ports.gotGoogleAccessToken GoogleGotAccessToken + , UI.Ports.isFullscreen IsFullscreen ] diff --git a/src/elm/UI/Glsl.elm b/src/elm/UI/Glsl.elm index f1c19e12..bbd1dba8 100644 --- a/src/elm/UI/Glsl.elm +++ b/src/elm/UI/Glsl.elm @@ -1,27 +1,40 @@ module UI.Glsl exposing (getGlsl) import Dict -import Expression exposing (AssociativeOperation(..), BinaryOperation(..), Expression(..), FunctionName(..), KnownFunction(..)) +import Expression exposing (AssociativeOperation(..), BinaryOperation(..), Expression(..), FunctionName(..), KnownFunction(..), RelationOperation(..)) import Expression.Graph exposing (Graph(..)) -import Expression.Utils exposing (minus, plus, square) -import List.Extra as List -import List.MyExtra as List +import Expression.Polynomial exposing (asPolynomial) +import Expression.Utils exposing (by, cbrt, div, ipow, minus, one, plus, sqrt_, square) +import Maybe.Extra as Maybe import SortedAnySet as Set -import UI.Glsl.Code exposing (constantToGlsl, deindent, intervalFunctionToGlsl, intervalOperationToGlsl, mainGlsl, straightFunctionToGlsl, straightOperationToGlsl, toSrc3D, toSrcContour, toSrcImplicit, toSrcParametric, toSrcPolar, toSrcRelation) +import UI.Glsl.Code exposing (constantToGlsl, deindent, intervalFunctionToGlsl, intervalOperationToGlsl, mainGlsl, straightFunctionToGlsl, straightOperationToGlsl, toSrc3D, toSrcContour, toSrcImplicit, toSrcParametric, toSrcPolar, toSrcRelation, toSrcVectorField2D) +import UI.Glsl.Generator as Generator exposing (floatT, uniform, unknownTypedName, vec2T) import UI.Glsl.Model exposing (GlslConstant(..), GlslFunction(..), GlslOperation(..)) +import UI.Glsl.Plane as Plane +import UI.Glsl.Polynomial +import UI.Glsl.Sphere as Sphere -getGlsl : Bool -> Graph -> String -getGlsl expandIntervals graph = +getGlsl : Bool -> Bool -> Graph -> String +getGlsl expandIntervals rayDifferentials graph = let - { expr, srcExpr, interval, thetaDelta, pixel2D, pixel3D } = + uniforms = + { u_canvasWidth = uniform floatT "u_canvasWidth" + , u_canvasHeight = uniform floatT "u_canvasHeight" + , u_viewportWidth = uniform floatT "u_viewportWidth" + , u_viewportHeight = uniform floatT "u_viewportHeight" + , u_zoomCenter = uniform vec2T "u_zoomCenter" + , u_drawAxes = uniform floatT "u_drawAxes" + } + + { expr, srcExpr, interval, usesThetaDelta, pixel2D, pixel3D } = extract "" graph build2d toSrc prefix e = { expr = e , srcExpr = toSrc prefix e , interval = StraightOnly - , thetaDelta = False + , usesThetaDelta = False , pixel2D = [ { name = "pixel" ++ prefix, color = True } ] , pixel3D = [] } @@ -30,11 +43,11 @@ getGlsl expandIntervals graph = case g of Explicit2D c -> build2d toSrcImplicit prefix <| - Expression.Utils.minus Expression.Utils.y c + minus Expression.Utils.y c Implicit2D l r -> build2d toSrcImplicit prefix <| - Expression.Utils.minus l r + minus l r Polar2D e -> build2d toSrcPolar prefix e @@ -50,7 +63,7 @@ getGlsl expandIntervals graph = { expr = e , srcExpr = toSrcParametric expandIntervals prefix e , interval = IntervalOnly - , thetaDelta = False + , usesThetaDelta = False , pixel2D = [ { name = "pixel" ++ prefix, color = True } ] , pixel3D = [] } @@ -62,16 +75,20 @@ getGlsl expandIntervals graph = { expr = e , srcExpr = toSrcContour prefix e , interval = StraightOnly - , thetaDelta = True + , usesThetaDelta = True , pixel2D = [ { name = "pixel" ++ prefix, color = False } ] , pixel3D = [] } Implicit3D e -> - { expr = e - , srcExpr = "BORK" ++ toSrc3D expandIntervals prefix e + let + f = + get3DSource expandIntervals prefix e + in + { expr = f.expr + , srcExpr = f.srcExpr , interval = IntervalAndStraight - , thetaDelta = True + , usesThetaDelta = True , pixel2D = [] , pixel3D = [ prefix ] } @@ -92,18 +109,26 @@ getGlsl expandIntervals graph = else StraightOnly - , thetaDelta = List.any .thetaDelta extracted + , usesThetaDelta = List.any .usesThetaDelta extracted , pixel2D = List.concatMap .pixel2D extracted , pixel3D = List.concatMap .pixel3D extracted } + VectorField2D x y -> + { expr = Apply (KnownFunction Arg) [ x, y ] + , srcExpr = toSrcVectorField2D prefix x y + , interval = StraightOnly + , usesThetaDelta = True + , pixel2D = [ { name = "pixel" ++ prefix, color = False } ] + , pixel3D = [] + } + thetaDeltaCode = - deindent 4 <| - if thetaDelta then - UI.Glsl.Code.thetaDelta + if usesThetaDelta then + deindent 4 <| UI.Glsl.Code.thetaDelta - else - "" + else + "" reqs = expr @@ -113,7 +138,145 @@ getGlsl expandIntervals graph = |> List.map (requirementToGlsl interval) |> String.join "\n" in - thetaDeltaCode ++ reqs ++ "\n/* Expression */" ++ deindent 4 srcExpr ++ mainGlsl pixel2D pixel3D + thetaDeltaCode + ++ reqs + ++ "\n/* Expression */\n" + ++ deindent 4 srcExpr + ++ mainGlsl + uniforms + rayDifferentials + (List.map + (\p -> + { name = unknownTypedName p.name + , color = p.color + } + ) + pixel2D + ) + pixel3D + + +get3DSource : Bool -> String -> Expression -> { expr : Expression, srcExpr : String } +get3DSource expandIntervals prefix e = + case Sphere.asSphere e |> Maybe.map (Sphere.toGlsl prefix) of + Just glsl -> + { expr = e + , srcExpr = glsl + } + + Nothing -> + case Plane.asPlane e |> Maybe.map (Plane.toGlsl prefix) of + Just glsl -> + { expr = e + , srcExpr = glsl + } + + Nothing -> + case tryGlslFromPolynomial prefix e of + Just o -> + o + + Nothing -> + let + glsl = + toSrc3D expandIntervals prefix e + |> Generator.fileToGlsl + in + { expr = e + , srcExpr = glsl ++ UI.Glsl.Code.suffixToBisect prefix + } + + +tryGlslFromPolynomial : String -> Expression -> Maybe { expr : Expression, srcExpr : String } +tryGlslFromPolynomial prefix e = + let + t = + Variable "t" + + var v = + plus [ Variable <| "o." ++ v, by [ t, Variable <| "d" ++ v ] ] + + repls = + [ "x", "y", "z" ] + |> List.map (\c -> ( c, var c )) + |> Dict.fromList + + replaced = + Expression.fullSubstitute repls e + + poly = + (case replaced of + RelationOperation Equals l r -> + minus l r + + _ -> + replaced + ) + |> asPolynomial [ "t" ] + |> Maybe.map Dict.toList + |> Maybe.andThen + (Maybe.traverse + (\p -> + case p of + ( [], k ) -> + Just ( 0, k ) + + ( [ ( v, d ) ], k ) -> + if v == "t" then + Just ( d, k ) + + else + Nothing + + _ -> + Nothing + ) + ) + |> Maybe.map Dict.fromList + |> Maybe.withDefault Dict.empty + + fromSols sols = + let + checks = + sols + |> List.foldl + (\( k, v ) ( known, lines ) -> + let + ( decl, drop ) = + if List.member k known then + ( "", 0 ) + + else if String.startsWith "!" k then + ( "float ", 1 ) + + else + ( "vec2 ", 0 ) + + newLine = + decl ++ String.dropLeft drop k ++ " = " ++ v ++ ";" + in + ( k :: known, newLine :: lines ) + ) + ( [ "t" ], [] ) + |> Tuple.second + |> List.reverse + |> String.join "\n " + + srcExpr = + """ + bool bisect""" ++ prefix ++ """(vec3 o, mat3 d, float max_distance, out vec3 found) { + float t = max_distance * 2.0; + """ ++ checks ++ """ + found = o + t * mix(d[0], d[1], 0.5); + return t < max_distance && t > 0.0; + } + """ + in + { expr = div one <| sqrt_ <| cbrt <| ipow e 3 + , srcExpr = deindent 16 srcExpr + } + in + UI.Glsl.Polynomial.getSolutions poly |> Maybe.map (\( _, sols ) -> fromSols sols) transitiveClosure : List Requirement -> List Requirement @@ -182,7 +345,7 @@ requirementToGlsl i r = functionToGlsl i f RequireConstant c -> - constantToGlsl c + constantToGlsl c |> Generator.funDeclToGlsl RequireOperation o -> operationToGlsl i o @@ -224,6 +387,9 @@ expressionToRequirements e = BinaryOperation Power b (Integer _) -> [ RequireOperation GlslPower, RequireOperation GlslMultiplication, RequireFunction Square22 ] ++ expressionToRequirements b + BinaryOperation Power b (Float _) -> + [ RequireOperation GlslPower, RequireOperation GlslMultiplication, RequireFunction Square22 ] ++ expressionToRequirements b + BinaryOperation op l r -> let op_ = @@ -300,9 +466,15 @@ toGlslFunction name = Sign -> Just Sign22 - Sqrt -> + Root 2 -> Just Sqrt22 + Root 3 -> + Just Cbrt22 + + Root _ -> + Nothing + Ln -> Just Ln22 @@ -357,6 +529,9 @@ toGlslFunction name = Plot -> Nothing + APlot -> + Nothing + Simplify -> Nothing @@ -366,6 +541,12 @@ toGlslFunction name = Solve -> Nothing + Mbrot -> + Just Mbrot22 + + For -> + Nothing + dependenciesOf : Requirement -> List Requirement dependenciesOf req = @@ -389,7 +570,7 @@ dependenciesOf req = [ RequireConstant I, RequireOperation GlslMultiplication, RequireOperation GlslDivision, RequireFunction Ln22 ] RequireFunction Atan222 -> - [] + [ RequireFunction Atan22, RequireOperation GlslMultiplication, RequireFunction Sign22 ] RequireFunction Sinh22 -> [ RequireFunction Exp22, RequireFunction Sinh11 ] @@ -409,6 +590,9 @@ dependenciesOf req = RequireFunction Sqrt22 -> [] + RequireFunction Cbrt22 -> + [ RequireOperation GlslPower ] + RequireFunction Square22 -> [] @@ -460,6 +644,9 @@ dependenciesOf req = RequireFunction Round22 -> [] + RequireFunction Mbrot22 -> + [ RequireOperation GlslMultiplication ] + RequireOperation GlslPower -> RequireOperation GlslMultiplication :: List.map RequireFunction [ Exp22, Ln22 ] @@ -486,23 +673,27 @@ operationToGlsl : RequiresInterval -> GlslOperation -> String operationToGlsl interval op = case interval of StraightOnly -> - deindent 12 <| straightOperationToGlsl op + Generator.fileToGlsl <| straightOperationToGlsl op IntervalOnly -> deindent 12 <| intervalOperationToGlsl op IntervalAndStraight -> - deindent 12 <| straightOperationToGlsl op ++ "\n" ++ intervalOperationToGlsl op + (Generator.fileToGlsl <| straightOperationToGlsl op) + ++ "\n" + ++ deindent 12 (intervalOperationToGlsl op) functionToGlsl : RequiresInterval -> GlslFunction -> String functionToGlsl interval name = case interval of StraightOnly -> - deindent 12 <| straightFunctionToGlsl name + Generator.fileToGlsl <| straightFunctionToGlsl name IntervalOnly -> deindent 12 <| intervalFunctionToGlsl name IntervalAndStraight -> - deindent 12 <| straightFunctionToGlsl name ++ "\n" ++ intervalFunctionToGlsl name + Generator.fileToGlsl (straightFunctionToGlsl name) + ++ "\n" + ++ deindent 12 (intervalFunctionToGlsl name) diff --git a/src/elm/UI/Glsl/Code.elm b/src/elm/UI/Glsl/Code.elm index 7e7c6f73..0aa6a7d0 100644 --- a/src/elm/UI/Glsl/Code.elm +++ b/src/elm/UI/Glsl/Code.elm @@ -1,72 +1,176 @@ -module UI.Glsl.Code exposing (constantToGlsl, deindent, intervalFunctionToGlsl, intervalOperationToGlsl, mainGlsl, straightFunctionToGlsl, straightOperationToGlsl, thetaDelta, toSrc3D, toSrcContour, toSrcImplicit, toSrcParametric, toSrcPolar, toSrcRelation) +module UI.Glsl.Code exposing (Uniforms, constantToGlsl, deindent, expressionToGlsl, intervalFunctionToGlsl, intervalOperationToGlsl, mainGlsl, straightFunctionToGlsl, straightOperationToGlsl, suffixToBisect, thetaDelta, threshold, toSrc3D, toSrcContour, toSrcImplicit, toSrcParametric, toSrcPolar, toSrcRelation, toSrcVectorField2D) -import Expression exposing (Expression(..), FunctionName(..), KnownFunction(..), PrintExpression(..), RelationOperation(..)) +import Dict +import Expression exposing (FunctionName(..), KnownFunction(..), PrintExpression(..), toPrintExpression) +import UI.Glsl.Generator as Generator exposing (Expression, File, FunDecl, Statement, TypedName, Vec2, Vec3, Vec4, abs_, add, ands, arr, assign, by, byF, call0, call1, call2, call4, ceil_, decl, def, div, dot2, dotted2, dotted3, dotted4, eq, exp, float, floatT, floatToGlsl, fun0, fun1, fun2, fun3, geq, gl_FragColor, gl_FragCoord, gt, if_, int, log, lt, mat3T, max_, min_, mod, negate_, normalize, one, pow, radians_, return, sign, subtract, ternary, unknown, unknownFunDecl, unknownTypedName, unsafeCall, vec2, vec2T, vec2Zero, vec3, vec3T, vec3Zero, vec4, vec4T, vec4Zero, vec4_3_1, voidT, zero) import UI.Glsl.Model exposing (GlslConstant(..), GlslFunction(..), GlslOperation(..)) -constantToGlsl : GlslConstant -> String +type alias Uniforms = + { u_canvasWidth : Expression Float + , u_canvasHeight : Expression Float + , u_viewportWidth : Expression Float + , u_viewportHeight : Expression Float + , u_drawAxes : Expression Float + , u_zoomCenter : Expression Vec2 + } + + +constantToGlsl : GlslConstant -> FunDecl constantToGlsl c = case c of I -> - """ - vec2 i() { - return vec2(0,1); - } - """ + fun0 vec2T "i" <| + [ return <| vec2 zero one ] Pi -> - """ - vec2 pi() { - return vec2(radians(180.0), 0.0); - } - """ + fun0 vec2T "pi" <| + [ return <| vec2 (radians_ <| float 180) zero ] E -> - """ - vec2 e() { - return vec2(exp(1.0), 0.0); - } - """ + fun0 vec2T "e" <| + [ return <| vec2 (exp one) zero ] + + +by2Tuple : ( FunDecl, Expression Vec2 -> Expression Vec2 -> Expression Vec2 ) +by2Tuple = + fun2 vec2T "by" (vec2T "a") (vec2T "b") <| \a b -> + let + da = + dotted2 a + + db = + dotted2 b + in + [ return <| + vec2 + (subtract + (by da.x db.x) + (by da.y db.y) + ) + (add + (by da.x db.y) + (by da.y db.x) + ) + ] + + +by2Decl : FunDecl +by2Decl = + Tuple.first by2Tuple + + +by2 : Expression Vec2 -> Expression Vec2 -> Expression Vec2 +by2 = + Tuple.second by2Tuple + + +by3Tuple : ( FunDecl, Expression Vec2 -> Expression Vec2 -> Expression Vec2 -> Expression Vec2 ) +by3Tuple = + fun3 vec2T "by" (vec2T "a") (vec2T "b") (vec2T "c") <| \a b c -> + [ return <| by2 (by2 a b) c ] + + +by3Decl : FunDecl +by3Decl = + Tuple.first by3Tuple -straightOperationToGlsl : GlslOperation -> String +by3 : Expression Vec2 -> Expression Vec2 -> Expression Vec2 -> Expression Vec2 +by3 = + Tuple.second by3Tuple + + +div2Tuple : ( FunDecl, Expression Vec2 -> Expression Vec2 -> Expression Vec2 ) +div2Tuple = + fun2 vec2T "div" (vec2T "a") (vec2T "b") <| \a b -> + let + da = + dotted2 a + + db = + dotted2 b + in + def floatT "k" (div one <| dot2 b b) <| \k -> + def floatT "r" (by k <| dot2 a b) <| \r -> + def floatT + "i" + (by k + (subtract (by da.y db.x) (by da.x db.y)) + ) + <| \i -> + [ return <| vec2 r i ] + + +div2Decl : FunDecl +div2Decl = + Tuple.first div2Tuple + + +div2 : Expression Vec2 -> Expression Vec2 -> Expression Vec2 +div2 = + Tuple.second div2Tuple + + +log10Tuple : ( FunDecl, Expression Float -> Expression Float ) +log10Tuple = + fun1 floatT "log10" (floatT "x") <| + \x -> [ return <| div (log x) (log <| float 10) ] + + +log10Decl : FunDecl +log10Decl = + Tuple.first log10Tuple + + +log10 : Expression Float -> Expression Float +log10 = + Tuple.second log10Tuple + + +straightOperationToGlsl : GlslOperation -> List FunDecl straightOperationToGlsl op = case op of GlslAddition -> - "" + [] GlslMultiplication -> - """ - vec2 by(vec2 a, vec2 b) { - return vec2(a.x*b.x-a.y*b.y, a.x*b.y+a.y*b.x); - } - """ + [ by2Decl + , by3Decl + ] GlslNegation -> - "" + [] GlslDivision -> - """ - vec2 div(vec2 a, vec2 b) { - float k = 1.0 / dot(b, b); - float r = k * dot(a, b); - float i = k * (a.y*b.x - a.x*b.y); - return vec2(r, i); - } - """ + [ div2Decl + ] GlslPower -> - """ - vec2 cpow(vec2 w, vec2 z) { - if(w.x >= 0.0 && w.y == 0.0 && z.y == 0.0) { - return vec2(pow(w.x, z.x), 0); - } - return cexp(by(cln(w), z)); - } - """ + [ Tuple.first <| + fun2 vec2T "cpow" (vec2T "w") (vec2T "z") <| \w z -> + let + dw = + dotted2 w + + dz = + dotted2 z + in + [ return <| + ternary + (ands + [ geq dw.x zero + , eq dw.y zero + , eq dz.y zero + ] + ) + (vec2 (pow dw.x dz.x) zero) + (call1 (unknownTypedName "cexp") <| by (call1 (unknownTypedName "cln") w) z) + ] + ] GlslRelations -> - "" + [] intervalOperationToGlsl : GlslOperation -> String @@ -158,6 +262,8 @@ intervalOperationToGlsl op = } vec2 ipow(vec2 b, vec2 e) { + if(e.y - e.x < 0.000001 && abs(e.x - round(e.x)) < 0.000001) + return ipow(b, int(e.x)); return iexp(iby(iln(b), e)); } @@ -198,36 +304,39 @@ intervalOperationToGlsl op = """ -straightFunctionToGlsl : GlslFunction -> String +straightFunctionToGlsl : GlslFunction -> List FunDecl straightFunctionToGlsl name = case name of Sinh11 -> - """ - float sinh(float x) { - return 0.5 * (exp(x) - exp(-x)); - } - """ + [ Tuple.first <| + fun1 floatT "sinh" (floatT "x") <| + \x -> [ return <| by (float 0.5) <| subtract (exp x) (exp <| negate_ x) ] + ] Cosh11 -> - """ - float cosh(float x) { - return 0.5 * (exp(x) + exp(-x)); - } - """ + [ Tuple.first <| + fun1 floatT "cosh" (floatT "x") <| + \x -> [ return <| by (float 0.5) <| add (exp x) (exp <| negate_ x) ] + ] Tanh11 -> - """ - float tanh(float x) { - if(abs(x) > 10.0) - return sign(x); - float p = exp(x); - float m = exp(-x); - return (p - m) / (p + m); - } - """ + [ Tuple.first <| + fun1 floatT "tanh" (floatT "x") <| \x -> + if_ (gt (abs_ x) (float 10)) + (return <| sign x) + :: (def floatT "p" (exp x) <| \p -> + def floatT "m" (exp <| negate_ x) <| \m -> + [ return <| div (subtract p m) (add p m) + ] + ) + ] Sin22 -> - """ + [ unknownFunDecl + { name = "csin" + , type_ = "vec2 -> vec2" + , body = + """ vec2 csin(vec2 z) { if(z.y == 0.0) { return vec2(sin(z.x), 0); @@ -235,9 +344,15 @@ straightFunctionToGlsl name = return vec2(sin(z.x) * cosh(z.y), cos(z.x) * sinh(z.y)); } """ + } + ] Cos22 -> - """ + [ unknownFunDecl + { name = + "ccos" + , type_ = "TODO" + , body = """ vec2 ccos(vec2 z) { if(z.y == 0.0) { return vec2(cos(z.x), 0); @@ -245,9 +360,15 @@ straightFunctionToGlsl name = return vec2(cos(z.x) * cosh(z.y), sin(z.x) * sinh(z.y)); } """ + } + ] Tan22 -> - """ + [ unknownFunDecl + { name = + "ctan" + , type_ = "TODO" + , body = """ vec2 ctan(vec2 z) { if(z.y == 0.0) { return vec2(tan(z.x), 0); @@ -255,25 +376,43 @@ straightFunctionToGlsl name = return div(csin(z), ccos(z)); } """ + } + ] Asin22 -> - """ + [ unknownFunDecl + { name = + "casin" + , type_ = "TODO" + , body = """ vec2 casin(vec2 z) { vec2 s = csqrt(vec2(1, 0) - by(z, z)); vec2 arg = s - by(vec2(0, 1), z); return by(vec2(0, 1), cln(arg)); } """ + } + ] Acos22 -> - """ + [ unknownFunDecl + { name = + "cacos" + , type_ = "TODO" + , body = """ vec2 cacos(vec2 z) { return pi() * 0.5 - casin(z); } """ + } + ] Atan22 -> - """ + [ unknownFunDecl + { name = + "catan" + , type_ = "TODO" + , body = """ vec2 catan(vec2 z) { if(z.y == 0.0) { return vec2(atan(z.x), 0); @@ -284,73 +423,93 @@ straightFunctionToGlsl name = return -0.5 * by(vec2(0, 1), cln(l)); } """ + } + ] Atan222 -> - """ + [ unknownFunDecl + { name = + "catan2" + , type_ = "TODO" + , body = """ vec2 catan2(vec2 y, vec2 x) { vec2 z = vec2(x.x - y.y, x.y + y.x); return vec2(atan(z.y, z.x), 0.0); } """ + } + ] Sinh22 -> - """ + [ unknownFunDecl { name = "csinh", type_ = "TODO", body = """ vec2 csinh(vec2 z) { return 0.5 * (cexp(z) - cexp(-z)); } - """ + """ } ] Cosh22 -> - """ + [ unknownFunDecl { name = "ccosh", type_ = "TODO", body = """ vec2 ccosh(vec2 z) { return 0.5 * (cexp(z) + cexp(-z)); } - """ + """ } ] Tanh22 -> - """ + [ unknownFunDecl { name = "ctanh", type_ = "TODO", body = """ vec2 ctanh(vec2 z) { vec2 p = cexp(z); vec2 m = cexp(-z); return div(p - m, p + m); } - """ + """ } ] Abs22 -> - """ + [ unknownFunDecl { name = "cabs", type_ = "TODO", body = """ vec2 cabs(vec2 z) { return vec2(length(z), 0.0); } - """ + """ } ] Sign22 -> - """ + [ unknownFunDecl { name = "csign", type_ = "TODO", body = """ vec2 csign(vec2 z) { return vec2(sign(z.x), sign(z.y)); } - """ + """ } ] Sqrt22 -> - """ + [ unknownFunDecl { name = "csqrt", type_ = "TODO", body = """ vec2 csqrt(vec2 z) { if(z.y == 0.0 && z.x >= 0.0) { return vec2(sqrt(z.x), 0); } float r = pow(dot(z, z), 0.25); float t = atan(z.y, z.x) * 0.5; - return vec2(r * cos(t), r * sin(t)); + return r * vec2(cos(t), sin(t)); } - """ + """ } ] + + Cbrt22 -> + [ unknownFunDecl { name = "ccbrt", type_ = "TODO", body = """ + vec2 ccbrt(vec2 z) { + if(z.y == 0.0) { + return vec2(sign(z.x) * pow(z.x, 1.0 / 3.0), 0); + } + float r = pow(dot(z, z), 1.0 / 6.0); + float t = atan(z.y, z.x) / 3.0 + (z.x > 0.0 ? 0.0 : radians(120.0)); + return r * vec2(cos(t), sin(t)); + } + """ } ] Square22 -> - """ + [ unknownFunDecl { name = "csquare", type_ = "TODO", body = """ vec2 csquare(vec2 z) { return by(z, z); } - """ + """ } ] Ln22 -> - """ + [ unknownFunDecl { name = "cln", type_ = "TODO", body = """ vec2 cln(vec2 z) { if(z.y == 0.0 && z.x >= 0.0) { return vec2(log(z.x), 0); @@ -359,94 +518,121 @@ straightFunctionToGlsl name = float py = atan(z.y, z.x); return vec2(log(px), py); } - """ + """ } ] Log1022 -> - """ + [ unknownFunDecl { name = "clog10", type_ = "TODO", body = """ vec2 clog10(vec2 z) { return div(cln(z), vec2(log(10.0), 0)); } - """ + """ } ] Exp22 -> - """ + [ unknownFunDecl { name = "cexp", type_ = "TODO", body = """ vec2 cexp(vec2 z) { if(z.y == 0.0) { return vec2(exp(z.x), 0); } return vec2(cos(z.y) * exp(z.x), sin(z.y) * exp(z.x)); } - """ + """ } ] Re22 -> - """ + [ unknownFunDecl { name = "cre", type_ = "TODO", body = """ vec2 cre(vec2 z) { return vec2(z.x, 0.0); } - """ + """ } ] Im22 -> - """ + [ unknownFunDecl { name = "cim", type_ = "TODO", body = """ vec2 cim(vec2 z) { return vec2(z.y, 0.0); } - """ + """ } ] Arg22 -> - """ + [ unknownFunDecl { name = "arg", type_ = "TODO", body = """ + float arg(vec2 v) { + return atan(v.y, v.x); + } + vec2 carg(vec2 v) { return vec2(atan(v.y, v.x), 0); } - """ + """ } ] Pw22 -> - """ + [ unknownFunDecl { name = "cpw", type_ = "TODO", body = """ vec2 cpw(vec2 c, vec2 t, vec2 f) { return c.x > 0.0 ? t : f; } - """ + """ } ] Ceiling22 -> - """ + [ unknownFunDecl { name = "cceiling", type_ = "TODO", body = """ vec2 cceiling(vec2 z) { return ceil(z); } - """ + """ } ] Floor22 -> - """ + [ unknownFunDecl { name = "cfloor", type_ = "TODO", body = """ vec2 cfloor(vec2 z) { return floor(z); } - """ + """ } ] Round22 -> - """ + [ unknownFunDecl { name = "cround", type_ = "TODO", body = """ vec2 cround(vec2 z) { return floor(z + vec2(0.5, 0.5)); } - """ + """ } ] Min222 -> - """ + [ unknownFunDecl { name = "cmin", type_ = "TODO", body = """ vec2 cmin(vec2 l, vec2 r) { return l.x < r.x ? l : r; } - """ + """ } ] Max222 -> - """ + [ unknownFunDecl { name = "cmax", type_ = "TODO", body = """ vec2 cmax(vec2 l, vec2 r) { return l.x > r.x ? l : r; } - """ + """ } ] Mod22 -> - """ + [ unknownFunDecl { name = "cmod", type_ = "TODO", body = """ vec2 cmod(vec2 l, vec2 r) { return vec2(mod(l.x, r.x), 0); } - """ + """ } ] + + Mbrot22 -> + [ unknownFunDecl { name = "cmbrot", type_ = "TODO", body = """ + vec2 cmbrot(vec2 x, vec2 y) { + vec2 c = x + vec2(-y.y, y.x); + + float p = length(c - vec2(0.25, 0)); + if(c.x <= p - 2.0*p*p + 0.25 || length(c + vec2(1,0)) <= 0.25) + return vec2(0,0); + + vec2 z = c; + for(int i = 0; i < 4000; i++) { + z = vec2(z.x * z.x - z.y * z.y, 2.0 * z.x * z.y) + c; + if(length(z) > 1000000.0) { + float logLength = log(length(z)); + float nu = log(logLength / log(2.0)) / log(2.0); + float fi = float(i) - nu; + return vec2(sin(fi),cos(fi)); + } + } + return vec2(0,0); + } + """ } ] intervalFunctionToGlsl : GlslFunction -> String @@ -469,7 +655,18 @@ intervalFunctionToGlsl name = Acos22 -> """ - TODO Acos22 + vec2 iacos(vec2 z) { + // Don't use clamp so if z is fully outside range the result is empty + vec2 clamped = vec2( + max(z.x, -1.0), + min(z.y, 1.0) + ); + return acos(clamped).yx; + } + + vec4 gacos(vec4 v) { + return vec4(acos(v.x), -v.yzw / sqrt(1.0 - v.x * v.x)); + } """ Arg22 -> @@ -500,17 +697,45 @@ intervalFunctionToGlsl name = Asin22 -> """ - TODO Asin22 + vec2 iasin(vec2 z) { + // Don't use clamp so if z is fully outside range the result is empty + vec2 clamped = vec2( + max(z.x, -1.0), + min(z.y, 1.0) + ); + return asin(clamped); + } + + vec4 gasin(vec4 v) { + return vec4(asin(v.x), v.yzw / sqrt(1.0 - v.x * v.x)); + } """ Atan22 -> """ - TODO Atan22 + vec2 iatan(vec2 z) { + return atan(z); + } + + vec4 gatan(vec4 v) { + return vec4(atan(v.x), v.yzw / (1.0 + v.x * v.x)); + } """ Atan222 -> """ - TODO Atan222 + vec2 iatan2(vec2 y, vec2 x) { + // TODO: improve this + vec2 r = vec2(atan(y.x, x.x), atan(y.y, x.x)); + vec2 q = vec2(atan(y.x, x.y), atan(y.y, x.y)); + vec2 rs = vec2(min(r.x, r.y), max(r.x, r.y)); + vec2 qs = vec2(min(q.x, q.y), max(q.x, q.y)); + return vec2(min(rs.x,qs.x),max(rs.y,qs.y)); + } + + vec4 gatan2(vec4 y, vec4 x) { + return vec4(atan(y.x, x.x), y.yzw / x.yzw / (1.0 + y.x * y.x / x.x / x.x)); + } """ Ceiling22 -> @@ -592,7 +817,13 @@ intervalFunctionToGlsl name = Log1022 -> """ - TODO Log1022 + vec2 ilog10(vec2 z) { + return log(z) / log(10.0); + } + + vec4 glog10(vec4 z) { + return vec4(log(z.x), z.yzw / z.x) / log(10.0); + } """ Pw22 -> @@ -634,7 +865,13 @@ intervalFunctionToGlsl name = Round22 -> """ - TODO Round22 + vec2 iround(vec2 z) { + return round(z); + } + + vec4 ground(vec4 z) { + return gnum(round(z.x)); + } """ Sin22 -> @@ -688,6 +925,21 @@ intervalFunctionToGlsl name = } """ + Cbrt22 -> + """ + float cbrt(float v) { + return sign(v) * pow(abs(v), 1.0 / 3.0); + } + + vec2 icbrt(vec2 v) { + return vec2(cbrt(v.x), cbrt(v.y)); + } + + vec4 gcbrt(vec4 v) { + return vec4(cbrt(v.x), pow(v.x, -2.0 / 3.0) / 3.0 * v.yzw); + } + """ + Square22 -> """ vec2 isquare(vec2 z) { @@ -759,39 +1011,52 @@ intervalFunctionToGlsl name = vec2 imod(vec2 x, vec2 y) { return x + ineg(iby(y, ifloor(idiv(x, y)))); } - + vec4 gmod(vec4 l, vec4 r) { return vec4(mod(l.x, r.x), l.yzw); } """ + Mbrot22 -> + """TODO""" -toSrcImplicit : String -> Expression -> String + +toSrcImplicit : String -> Expression.Expression -> String toSrcImplicit suffix e = + let + antialiasingSamples = + 7 + in """ float f""" ++ suffix ++ """(float x, float y) { - vec2 complex = """ ++ expressionToGlsl e ++ """; + vec2 complex = """ ++ Generator.expressionToGlsl (expressionToGlsl [ ( "x", unknown "x" ), ( "y", unknown "y" ) ] e) ++ """; if(abs(complex.y) > """ ++ floatToGlsl epsilon ++ """) { - return -1.0; + return 0.0; } - return complex.x > 0.0 ? 1.0 : 0.0; + return complex.x > 0.0 ? 1.0 : -1.0; } vec3 pixel""" ++ suffix ++ """(float deltaX, float deltaY, float x, float y) { - x += deltaX / 2.0; - y += deltaY / 2.0; - float h = f""" ++ suffix ++ """(x,y); - float l = f""" ++ suffix ++ """(x - deltaX,y); - float ul = f""" ++ suffix ++ """(x - deltaX,y - deltaY); - float u = f""" ++ suffix ++ """(x,y - deltaY); - return (h != l || h != u || h != ul) - && (h >= 0.0 && l >= 0.0 && ul >= 0.0 && u >= 0.0) - ? vec3(1,1,1) : vec3(0,0,0); + float sum = 0.0; + float samples = """ ++ floatToGlsl antialiasingSamples ++ """ * 2.0 + 1.0; + samples *= samples; + float coeff = 0.0875; + for(int w = -""" ++ String.fromInt antialiasingSamples ++ """; w <= """ ++ String.fromInt antialiasingSamples ++ """; w++) + for(int h = -""" ++ String.fromInt antialiasingSamples ++ """; h <= """ ++ String.fromInt antialiasingSamples ++ """; h++) { + float piece = f""" ++ suffix ++ """(x + deltaX * coeff * float(w), y + deltaX * coeff * float(h)); + if(piece == 0.0) + return vec3(0); + sum += piece; + } + + float perc = (samples - abs(sum)) / samples; + perc = pow(perc, 0.2); + return perc * vec3(1,1,1); } """ -toSrcPolar : String -> Expression -> String +toSrcPolar : String -> Expression.Expression -> String toSrcPolar suffix e = """ float f""" ++ suffix ++ """(float x, float y, float deltaT, float ot) { @@ -802,7 +1067,7 @@ toSrcPolar suffix e = if(t < ot) t += radians(360.0); else t -= radians(360.0); } - vec2 complex = """ ++ expressionToGlsl e ++ """; + vec2 complex = """ ++ Generator.expressionToGlsl (expressionToGlsl [ ( "x", unknown "x" ), ( "y", unknown "y" ), ( "r", unknown "r" ), ( "t", unknown "t" ) ] e) ++ """; if(abs(complex.y) > """ ++ floatToGlsl epsilon ++ """) { return -1.0; } @@ -832,7 +1097,7 @@ toSrcPolar suffix e = """ -toSrcParametric : Bool -> String -> Expression -> String +toSrcParametric : Bool -> String -> Expression.Expression -> String toSrcParametric expandIntervals suffix e = """ vec2 interval""" ++ suffix ++ """(vec2 p, float from, float to) { @@ -910,11 +1175,83 @@ thetaDelta = """ -toSrcContour : String -> Expression -> String +toSrcVectorField2D : String -> Expression.Expression -> Expression.Expression -> String +toSrcVectorField2D suffix x y = + """ + vec2 vector""" ++ suffix ++ """(float x, float y) { + vec2 xv = """ ++ Generator.expressionToGlsl (expressionToGlsl [ ( "x", unknown "x" ), ( "y", unknown "y" ) ] x) ++ """; + vec2 yv = """ ++ Generator.expressionToGlsl (expressionToGlsl [ ( "x", unknown "x" ), ( "y", unknown "y" ) ] y) ++ """; + return abs(xv.y) + abs(yv.y) < """ ++ floatToGlsl epsilon ++ """ ? vec2(xv.x, yv.x) : vec2(0,0); + } + + bool near(vec2 o, vec2 corner, vec2 vector, float deltaX, float mx) { + float angleCorner = arg(o - corner); + float angleVector = arg(vector); + float delta = mod(angleCorner - angleVector, radians(360.0)); + float l = length(vector) / mx; + float maxLength = deltaX * VECTOR_SPACING * (l < """ ++ floatToGlsl epsilon ++ """ ? 0.0 : l / 2.0 + 0.5); + float wantedLength = length(o - corner); + float angularDistance = mix(180.0, 0.0, pow(wantedLength / maxLength, 0.3)); + return (delta < radians(angularDistance) || delta > radians(360.0 - angularDistance)) && wantedLength < maxLength; + } + + vec3 pixel""" ++ suffix ++ """(float deltaX, float deltaY, float x, float y) { + vec2 o = vec2(x, y); + + float mx = 0.0; + for(int xi = -X_POINTS; xi <= X_POINTS; xi++) { + for(int yi = -Y_POINTS; yi <= Y_POINTS; yi++) { + vec2 p = u_zoomCenter + vec2(deltaX * VECTOR_SPACING * float(xi), deltaX * VECTOR_SPACING * float(yi)); + vec2 v = vector""" ++ suffix ++ """(p.x, p.y); + mx = max(mx, length(v)); + } + } + + vec3 colorA = vec3(0.0, 1.0, 0.0); + vec3 colorB = vec3(0.0, 0.0, 1.0); + + x = o.x - mod(o.x, deltaX * VECTOR_SPACING); + y = o.y - mod(o.y, deltaX * VECTOR_SPACING); + + vec2 bl = vector""" ++ suffix ++ """(x, y); + vec2 br = vector""" ++ suffix ++ """(x + deltaX * VECTOR_SPACING, y); + vec2 ul = vector""" ++ suffix ++ """(x, y + deltaX * VECTOR_SPACING); + vec2 ur = vector""" ++ suffix ++ """(x + deltaX * VECTOR_SPACING, y + deltaX * VECTOR_SPACING); + + float angleO; + vec2 corner; + float l; + + corner = vec2(x, y); + l = length(bl) / mx; + if(near(o, corner, bl, deltaX, mx)) + return mix(colorA, colorB, l); + + corner = vec2(x + deltaX * VECTOR_SPACING, y); + l = length(br) / mx; + if(near(o, corner, br, deltaX, mx)) + return mix(colorA, colorB, l); + + corner = vec2(x, y + deltaX * VECTOR_SPACING); + l = length(ul) / mx; + if(near(o, corner, ul, deltaX, mx)) + return mix(colorA, colorB, l); + + corner = vec2(x + deltaX * VECTOR_SPACING, y + deltaX * VECTOR_SPACING); + l = length(ur) / mx; + if(near(o, corner, ur, deltaX, mx)) + return mix(colorA, colorB, l); + + return vec3(0,0,0); + } + """ + + +toSrcContour : String -> Expression.Expression -> String toSrcContour suffix e = """ vec3 pixel""" ++ suffix ++ """_o(float deltaX, float deltaY, float x, float y) { - vec2 z = """ ++ expressionToGlsl e ++ """; + vec2 z = """ ++ Generator.expressionToGlsl (expressionToGlsl [ ( "x", unknown "x" ), ( "y", unknown "y" ) ] e) ++ """; float theta = atan(z.y, z.x) / radians(360.0); @@ -958,11 +1295,11 @@ toSrcContour suffix e = """ -toSrcRelation : String -> Expression -> String +toSrcRelation : String -> Expression.Expression -> String toSrcRelation suffix e = """ vec3 pixel""" ++ suffix ++ """(float deltaX, float deltaY, float x, float y) { - vec2 complex = """ ++ expressionToGlsl e ++ """; + vec2 complex = """ ++ Generator.expressionToGlsl (expressionToGlsl [ ( "x", unknown "x" ), ( "y", unknown "y" ) ] e) ++ """; return complex.x > 0.0 && abs(complex.y) < """ ++ floatToGlsl epsilon ++ """ ? vec3(0.8,0.5,0.5) : vec3(0,0,0); } """ @@ -996,135 +1333,120 @@ wordWrap = >> String.join "\n " -expressionToGlsl : Expression -> String -expressionToGlsl = - Expression.toPrintExpression - >> expressionToGlslPrec 0 - >> wordWrap - - -expressionToIntervalGlsl : Bool -> Expression -> String +expressionToIntervalGlsl : Bool -> Expression.Expression -> String expressionToIntervalGlsl expandIntervals = - Expression.toPrintExpression + toPrintExpression >> expressionToIntervalGlslPrec expandIntervals 0 >> wordWrap -expressionToNormalGlsl : Expression -> String -expressionToNormalGlsl = - Expression.toPrintExpression - >> expressionToNormalGlslPrec 0 - >> wordWrap - - -expressionToGlslPrec : Int -> PrintExpression -> String -expressionToGlslPrec p expr = +expressionToGlsl : List ( String, Expression Float ) -> Expression.Expression -> Expression Vec2 +expressionToGlsl context = let - paren b c = - if b then - "(" ++ c ++ ")" + ctx = + Dict.fromList context - else - c + go expr = + case expr of + PVariable "i" -> + vec2 zero one - noninfix op c = - paren (p > 10) <| op ++ expressionToGlslPrec 11 c + PVariable "pi" -> + vec2 (radians_ <| float 180) zero - infixl_ n op l r = - paren (p > n) <| expressionToGlslPrec n l ++ op ++ expressionToGlslPrec (n + 1) r + PVariable "e" -> + vec2 (exp one) zero - apply name ex = - paren (p > 10) <| name ++ "(" ++ String.join ", " (List.map (expressionToGlslPrec 0) ex) ++ ")" - in - case expr of - PVariable "i" -> - "vec2(0,1)" + PVariable v -> + case Dict.get v ctx of + Just w -> + vec2 w zero - PVariable "pi" -> - "vec2(radians(180.0),0.0)" + Nothing -> + unknown <| "Variable " ++ v ++ " is undefined" - PVariable "e" -> - "vec2(exp(1.0),0)" + PInteger v -> + vec2 (float <| toFloat v) zero - PVariable v -> - "vec2(" ++ v ++ ",0)" + PFloat f -> + vec2 (float f) zero - PInteger v -> - "vec2(" ++ String.fromInt v ++ ",0)" + PNegate expression -> + negate_ <| go expression - PFloat f -> - "vec2(" ++ floatToGlsl f ++ ",0)" + PAdd l (PNegate r) -> + subtract (go l) (go r) - PNegate expression -> - "(" ++ noninfix "-" expression ++ ")" + PAdd l r -> + add (go l) (go r) - PAdd l (PNegate r) -> - infixl_ 6 " - " l r + PRel op l r -> + if op == "<=" || op == "<" then + subtract (go r) (go l) - PAdd l r -> - infixl_ 6 " + " l r + else if op == "=" then + abs_ <| subtract (go r) (go l) - PRel op l r -> - if op == "<=" || op == "<" then - infixl_ 6 " - " r l + else + subtract (go l) (go r) - else if op == "=" then - "(abs(" ++ infixl_ 6 " - " r l ++ "))" + PBy l r -> + by2 (go l) (go r) - else - infixl_ 6 " - " l r + PDiv l r -> + div2 (go l) (go r) - PBy l r -> - apply "by" [ l, r ] + PPower (PVariable v) (PInteger 2) -> + case Dict.get v ctx of + Just w -> + vec2 (by w w) zero - PDiv l r -> - apply "div" [ l, r ] + Nothing -> + unknown <| "Variable " ++ v ++ " is undefined" - PPower (PVariable "i") r -> - apply "cpow" [ PVariable "i", r ] + PPower l r -> + call2 (unknownTypedName "cpow") (go l) (go r) - PPower (PVariable v) (PInteger 2) -> - "vec2(" ++ v ++ "*" ++ v ++ ",0)" + PApply (KnownFunction Simplify) [ e ] -> + go e - PPower l r -> - apply "cpow" [ l, r ] + PApply name ex -> + if List.any (\( _, v ) -> name == KnownFunction v) Expression.variadicFunctions then + case List.map go ex of + [] -> + vec2Zero - PApply (KnownFunction Simplify) [ e ] -> - expressionToGlslPrec p e + head :: tail -> + List.foldl (\e a -> call2 (unknownTypedName <| "c" ++ Expression.functionNameToString name) a e) head tail - PApply name ex -> - if List.any (\( _, v ) -> name == KnownFunction v) Expression.variadicFunctions then - case List.map (expressionToGlslPrec 0) ex of - [] -> - "vec2(0)" + else + unsafeCall ("c" ++ Expression.functionNameToString name) (List.map go ex) - head :: tail -> - List.foldl (\e a -> "c" ++ Expression.functionNameToString name ++ "(" ++ a ++ "," ++ e ++ ")") head tail + PList es -> + unsafeCall ("vec" ++ String.fromInt (List.length es)) (List.map go es) - else - apply ("c" ++ Expression.functionNameToString name) ex + PReplace var e -> + go (Expression.pfullSubstitute var e) - PList es -> - "vec" ++ String.fromInt (List.length es) ++ "(" ++ String.join ", " (List.map (expressionToGlslPrec 0) es) ++ ")" + -- If this happens, it's too late + PLambda _ _ -> + vec2Zero + in + toPrintExpression >> go - PReplace var e -> - expressionToGlslPrec p (Expression.pfullSubstitute var e) - -- If this happens, it's too late - PLambda _ _ -> - "vec2(0)" +paren : Bool -> String -> String +paren b c = + if b then + "(" ++ c ++ ")" + + else + c expressionToIntervalGlslPrec : Bool -> Int -> PrintExpression -> String expressionToIntervalGlslPrec expandIntervals p expr = let - paren b c = - if b then - "(" ++ c ++ ")" - - else - c - infixl_ n op l r = paren (p > n) <| expressionToIntervalGlslPrec expandIntervals n l ++ op ++ expressionToIntervalGlslPrec expandIntervals (n + 1) r @@ -1196,6 +1518,13 @@ expressionToIntervalGlslPrec expandIntervals p expr = PPower l (PInteger 2) -> expand <| "isquare(" ++ expressionToIntervalGlslPrec expandIntervals 0 l ++ ")" + PPower l (PFloat f) -> + if f == 2.0 then + expand <| "isquare(" ++ expressionToIntervalGlslPrec expandIntervals 0 l ++ ")" + + else + expand <| apply "ipow" [ l, PFloat f ] + PPower l (PInteger ri) -> let ris = @@ -1232,231 +1561,374 @@ expressionToIntervalGlslPrec expandIntervals p expr = "vec2(0)" -expressionToNormalGlslPrec : Int -> PrintExpression -> String -expressionToNormalGlslPrec p expr = +expressionToNormalGlsl : { x : Expression Float, y : Expression Float, z : Expression Float } -> Expression.Expression -> Expression Vec4 +expressionToNormalGlsl { x, y, z } = let - paren b c = - if b then - "(" ++ c ++ ")" + gnum : Expression Float -> Expression Vec4 + gnum = + call1 (unknownTypedName "gnum") - else - c + go expr = + case expr of + PVariable "pi" -> + gnum (radians_ <| float 180) - infixl_ n op l r = - paren (p > n) <| expressionToNormalGlslPrec n l ++ op ++ expressionToNormalGlslPrec (n + 1) r + PVariable "e" -> + gnum <| exp one - apply name ex = - paren (p > 10) <| name ++ "(" ++ String.join ", " (List.map (expressionToNormalGlslPrec 0) ex) ++ ")" - in - case expr of - PVariable "pi" -> - "gnum(radians(180.0))" - - PVariable "e" -> - "gnum(exp(1.0))" + PVariable "x" -> + vec4 x one zero zero - PVariable "x" -> - "vec4(x,1,0,0)" + PVariable "y" -> + vec4 y zero one zero - PVariable "y" -> - "vec4(y,0,1,0)" - - PVariable "z" -> - "vec4(z,0,0,1)" - - PVariable v -> - v + PVariable "z" -> + vec4 z zero zero one - PInteger v -> - "gnum(" ++ String.fromInt v ++ ".0)" + PInteger v -> + gnum <| float <| toFloat v - PFloat f -> - "gnum(" ++ floatToGlsl f ++ ")" + PFloat f -> + gnum <| float f - PNegate expression -> - "gneg(" ++ expressionToNormalGlslPrec 10 expression ++ ")" + PNegate expression -> + call1 (unknownTypedName "gneg") (go expression) - PAdd l r -> - infixl_ 6 " + " l r + PAdd l r -> + add (go l) (go r) - PRel op l r -> - if op == "<=" || op == "<" then - infixl_ 6 " - " r l + PRel op l r -> + if op == "<=" || op == "<" then + subtract (go r) (go l) - else if op == "=" then - "(abs(" ++ infixl_ 6 " - " r l ++ "))" + else if op == "=" then + abs_ <| subtract (go r) (go l) - else - infixl_ 6 " - " l r + else + subtract (go l) (go r) - PBy l r -> - apply "gby" [ l, r ] + PBy l r -> + call2 (unknownTypedName "gby") (go l) (go r) - PDiv l r -> - apply "gdiv" [ l, r ] + PDiv l r -> + call2 (unknownTypedName "gdiv") (go l) (go r) - PPower l (PInteger 2) -> - apply "gsquare" [ l ] + PPower l (PInteger 2) -> + call1 (unknownTypedName "gsquare") (go l) - PPower l (PInteger ri) -> - "gpow(" ++ expressionToNormalGlslPrec 0 l ++ ", " ++ String.fromInt ri ++ ")" + PPower l (PInteger ri) -> + call2 (unknownTypedName "gpow") (go l) (int ri) - PPower l r -> - apply "gpow" [ l, r ] + PPower l r -> + call2 (unknownTypedName "gpow") (go l) (go r) - PApply name ex -> - if List.any (\( _, v ) -> name == KnownFunction v) Expression.variadicFunctions then - case List.map (expressionToNormalGlslPrec 0) ex of - [] -> - "vec2(0)" + PApply name ex -> + if List.any (\( _, v ) -> name == KnownFunction v) Expression.variadicFunctions then + case List.map go ex of + [] -> + vec4Zero - head :: tail -> - List.foldl (\e a -> "g" ++ Expression.functionNameToString name ++ "(" ++ a ++ "," ++ e ++ ")") head tail + head :: tail -> + List.foldl (\e a -> call2 (unknownTypedName <| "g" ++ Expression.functionNameToString name) a e) head tail - else - apply ("g" ++ Expression.functionNameToString name) ex - - PList es -> - "vec" ++ String.fromInt (List.length es) ++ "(" ++ String.join ", " (List.map (expressionToNormalGlslPrec 0) es) ++ ")" + else + unsafeCall ("g" ++ Expression.functionNameToString name) (List.map go ex) - PReplace var e -> - expressionToNormalGlslPrec p (Expression.pfullSubstitute var e) + PList es -> + unsafeCall ("vec" ++ String.fromInt (List.length es)) (List.map go es) - -- If this happens, it's too late - PLambda _ _ -> - "vec4(0)" + PReplace var e -> + go (Expression.pfullSubstitute var e) + PVariable _ -> + vec4Zero -floatToGlsl : Float -> String -floatToGlsl f = - let - s = - String.fromFloat f + -- If this happens, it's too late + PLambda _ _ -> + vec4Zero in - if String.contains "." s then - s - - else - s ++ ".0" + toPrintExpression >> go -mainGlsl : List { name : String, color : Bool } -> List String -> String -mainGlsl pixel2 pixel3 = +mainGlsl : + Uniforms + -> Bool + -> + List + { name : TypedName (Float -> Float -> Float -> Float -> Vec3) + , color : Bool + } + -> List String + -> String +mainGlsl uniforms rayDifferentials pixel2 pixel3 = case ( pixel2, pixel3 ) of ( _, [] ) -> - main2D pixel2 ++ "\n\nvoid main () { gl_FragColor = pixel2(); }" + Generator.fileToGlsl <| + main2D uniforms pixel2 + ++ [ fun0 voidT "main" <| + [ assign gl_FragColor <| call0 (unknownTypedName "pixel2") ] + ] ( [], _ ) -> - main3D pixel3 ++ "\n\nvoid main () { gl_FragColor = pixel3(); }" + main3D rayDifferentials pixel3 + ++ "\n\n" + ++ Generator.fileToGlsl + [ fun0 voidT "main" <| + [ assign gl_FragColor <| call0 (unknownTypedName "pixel3") ] + ] _ -> - main2D pixel2 ++ "\n\n" ++ main3D pixel3 ++ "\n\nvoid main () { gl_FragColor = max(pixel2(), pixel3()); }" - - -main2D : List { name : String, color : Bool } -> String -main2D pixels = + Generator.fileToGlsl (main2D uniforms pixel2) + ++ "\n\n" + ++ main3D rayDifferentials pixel3 + ++ Generator.fileToGlsl + [ fun0 voidT "main" <| + [ assign gl_FragColor <| max_ (call0 (unknownTypedName "pixel2")) (call0 (unknownTypedName "pixel3")) ] + ] + + +main2D : + Uniforms + -> + List + { name : TypedName (Float -> Float -> Float -> Float -> Vec3) + , color : Bool + } + -> File +main2D uniforms pixels = + [ log10Decl + , axisDecl + , pixel2Decl uniforms pixels + ] + + +pixel2Decl : + Uniforms + -> + List + { name : TypedName (Float -> Float -> Float -> Float -> Vec3) + , color : Bool + } + -> FunDecl +pixel2Decl uniforms pixels = let - addPixel i { name, color } = + addPixel : + Expression Float + -> Expression Float + -> Expression Float + -> Expression Float + -> Expression Vec3 + -> Expression Vec3 + -> Int + -> + { name : TypedName (Float -> Float -> Float -> Float -> Vec3) + , color : Bool + } + -> List (Statement f) + addPixel deltaX deltaY x y px curr i { name, color } = let k = if color then - "hl2rgb(" ++ h ++ ", 0.5)" ++ " * " ++ name + let + h = + float <| (toFloat (i + 2) / pi) + in + by (call2 (unknownTypedName "hl2rgb") h (float 0.5)) (call4 name deltaX deltaY x y) else - name - - h = - floatToGlsl <| (toFloat (i + 2) / pi) + call4 name deltaX deltaY x y in - """ - curr = """ ++ k ++ """(deltaX, deltaY, x, y); - px = curr == vec3(0,0,0) ? px : curr;""" + [ assign curr k + , assign px <| ternary (eq curr vec3Zero) px curr + ] - inner = + inner deltaX deltaY x y px curr = pixels - |> List.indexedMap addPixel - |> String.concat + |> List.indexedMap (addPixel deltaX deltaY x y px curr) + |> List.concat in - deindent 8 <| - """ - float log10(float x) { - return log(x) / log(10.0); - } + fun0 vec4T "pixel2" <| + def vec2T "canvasSize" (vec2 uniforms.u_canvasWidth uniforms.u_canvasHeight) <| \canvasSize -> + def vec2T "uv_centered" (subtract (dotted4 gl_FragCoord).xy (byF (float 0.5) canvasSize)) <| \uv_centered -> + def vec2T "viewportSize" (byF (div uniforms.u_viewportWidth uniforms.u_canvasWidth) canvasSize) <| \viewportSize -> + def vec2T "uv" (by (div uv_centered canvasSize) viewportSize) <| \uv -> + def vec2T "c" (add uniforms.u_zoomCenter uv) <| \c -> + def floatT "x" (dotted2 c).x <| \x -> + def floatT "y" (dotted2 c).y <| \y -> + def floatT "deltaX" (div uniforms.u_viewportWidth uniforms.u_canvasWidth) <| \deltaX -> + def floatT "deltaY" (div uniforms.u_viewportWidth uniforms.u_canvasHeight) <| \deltaY -> + def vec3T "px" vec3Zero <| \px -> + decl vec3T "curr" <| \curr -> + inner deltaX deltaY x y px curr + ++ (def floatT "maxDelta" (max_ deltaX deltaY) <| \maxDelta -> + def vec3T + "yax" + (ternary + (eq uniforms.u_drawAxes one) + (byF (axis x y maxDelta) (vec3 zero one zero)) + vec3Zero + ) + <| \yax -> + def vec3T + "xax" + (ternary + (eq uniforms.u_drawAxes one) + (byF (axis y x maxDelta) (vec3 one zero zero)) + vec3Zero + ) + <| \xax -> + [ return <| vec4_3_1 (max_ px (max_ xax yax)) one + ] + ) + + +axisTuple : ( FunDecl, Expression Float -> Expression Float -> Expression Float -> Expression Float ) +axisTuple = + fun3 floatT "axis" (floatT "coord") (floatT "otherCoord") (floatT "maxDelta") <| \coord otherCoord maxDelta -> + def floatT "across" (subtract one <| abs_ <| div coord maxDelta) <| \across -> + if_ (lt across (float -12)) + (return zero) + :: (def floatT "smallUnit" (pow (float 10) (ceil_ (log10 maxDelta))) <| \smallUnit -> + if_ (ands [ lt across zero, lt (abs_ otherCoord) (by maxDelta (float 2)) ]) + (return zero) + :: (def floatT + "unit" + (ternary + (lt across (float -6)) + (by smallUnit (float 100)) + (ternary + (lt across (float -0.1)) + (by smallUnit (float 10)) + (by smallUnit (float 5)) + ) + ) + <| \unit -> + def floatT "parallel" (ternary (lt (mod (abs_ otherCoord) unit) maxDelta) one zero) <| \parallel -> + [ return <| max_ zero (max_ across parallel) ] + ) + ) - float axis(float coord, float otherCoord, float maxDelta) { - float across = 1.0 - abs(coord/maxDelta); - if(across < -12.0) - return 0.0; - float smallUnit = pow(10.0, ceil(log10(maxDelta))); - if(across < 0.0 && abs(otherCoord) < maxDelta * 2.0) - return 0.0; - float unit = across < -6.0 ? smallUnit * 100.0 : across < -0.1 ? smallUnit * 10.0 : smallUnit * 5.0; - float parallel = mod(abs(otherCoord), unit) < maxDelta ? 1.0 : 0.0; - return max(0.0, max(across, parallel)); - } - vec4 pixel2 () { - vec2 canvasSize = vec2(u_canvasWidth, u_canvasHeight); - vec2 uv_centered = gl_FragCoord.xy - 0.5 * canvasSize; - - vec2 viewportSize = (u_viewportWidth / u_canvasWidth) * canvasSize; - vec2 uv = uv_centered / canvasSize * viewportSize; - vec2 c = u_zoomCenter + uv; - float x = c.x; - float y = c.y; - - float deltaX = u_viewportWidth / u_canvasWidth; - float deltaY = u_viewportWidth / u_canvasHeight; - vec3 px = vec3(0,0,0); - vec3 curr;""" - ++ inner - ++ """ - float maxDelta = max(deltaX, deltaY); - vec3 yax = axis(x, y, maxDelta) * vec3(0,1,0); - vec3 xax = axis(y, x, maxDelta) * vec3(1,0,0); - return vec4(max(px, max(xax, yax)), 1.0); - } - """ +axis : Expression Float -> Expression Float -> Expression Float -> Expression Float +axis = + Tuple.second axisTuple -toSrc3D : Bool -> String -> Expression -> String +axisDecl : FunDecl +axisDecl = + Tuple.first axisTuple + + +toSrc3D : Bool -> String -> Expression.Expression -> File toSrc3D expandIntervals suffix e = - """ - vec3 normal""" ++ suffix ++ """(vec3 p) { - float x = p.x; - float y = p.y; - float z = p.z; - vec4 gradient = """ ++ expressionToNormalGlsl e ++ """; - return normalize(gradient.yzw); - } + [ Tuple.first <| + fun1 vec3T ("normal" ++ suffix) (vec3T "p") <| \p -> + let + dp = + dotted3 p + in + def floatT "x" dp.x <| \x -> + def floatT "y" dp.y <| \y -> + def floatT "z" dp.z <| \z -> + def vec4T "gradient" (expressionToNormalGlsl { x = x, y = y, z = z } e) <| \gradient -> + [ return <| normalize (dotted4 gradient).yzw ] + , Tuple.first <| + fun2 vec2T ("interval" ++ suffix) (mat3T "f") (mat3T "t") <| \f t -> + def vec3T "mn" (min_ (arr f <| int 0) (arr t <| int 0)) <| \mn -> + def vec3T "mx" (max_ (arr f <| int 1) (arr t <| int 1)) <| \mx -> + let + dmn = + dotted3 mn + + dmx = + dotted3 mx + in + def vec2T "x" (vec2 dmn.x dmx.x) <| \x -> + def vec2T "y" (vec2 dmn.y dmx.y) <| \y -> + def vec2T "z" (vec2 dmn.z dmx.z) <| \z -> + [ return <| unknown <| expressionToIntervalGlsl expandIntervals e ] + ] + + +main3D : Bool -> List String -> String +main3D rayDifferentials suffixes = + let + k = + if rayDifferentials then + "0.001" - vec2 interval""" ++ suffix ++ """(vec3 f, vec3 t) { - vec3 mn = min(f, t); - vec3 mx = max(f, t); - vec2 x = vec2(mn.x, mx.x); - vec2 y = vec2(mn.y, mx.y); - vec2 z = vec2(mn.z, mx.z); - return """ ++ expressionToIntervalGlsl expandIntervals e ++ """; - } - """ + else + "0.0" + block = + """ + vec4 pixel3 () { + float eye_dist = 2.0 * u_viewportWidth; + vec2 canvasSize = vec2(u_canvasWidth, u_canvasHeight); + vec2 uv_centered = gl_FragCoord.xy - 0.5 * canvasSize; + vec2 uv_normalized = 1.0 / u_canvasHeight * uv_centered; -main3D : List String -> String -main3D suffixes = - let - head = - String.join "\n" <| List.map suffixToBisect suffixes ++ [ raytrace ] + float t = u_theta + 0.58; + float p = -2.0 * u_phi; + vec3 eye = eye_dist * normalize(vec3( + cos(t) * sin(p), + cos(t) * -cos(p), + sin(t) + )); + vec3 target = vec3(0); + vec3 to_target = normalize(target-eye); + vec3 across = normalize(cross(to_target, vec3(0,0,1))); + vec3 up = normalize(cross(across, to_target)); + + vec3 canvas_center = eye + to_target; + vec3 canvas_point = canvas_center + uv_normalized.x * across + uv_normalized.y * up; + + vec3 ray_direction = normalize(canvas_point - eye); + + vec3 diffs = abs(fwidth(ray_direction)); + float k = """ ++ k ++ """; + mat3 d = mat3(ray_direction - k * diffs, ray_direction + k * diffs, vec3(0)); + + float max_distance = 100.0 * eye_dist; + return raytrace(canvas_point, d, max_distance); + } + """ + in + deindent 12 <| raytrace suffixes ++ block + + +raytrace : List String -> String +raytrace suffixes = + let colorCoeff = floatToGlsl (1.19 - 0.2 * toFloat (List.length suffixes)) innerTrace = String.join "\n" (List.indexedMap suffixToRay suffixes) - raytrace = + innerLightTrace = + String.join "\n" (List.map suffixToRayLight suffixes) + + suffixToRay i suffix = + """ + if(bisect""" ++ suffix ++ """(o, d, max_distance, f) && length(f - o) < curr_distance) { + found_index = """ ++ String.fromInt i ++ """; + found = f; + curr_distance = length(found - o); + } + """ + + suffixToRayLight suffix = + """ + else if(bisect""" ++ suffix ++ """(offseted, light_direction, light_distance, f)) { + light_coeff = 0.2; + } """ - vec4 raytrace(vec3 o, vec3 d, float max_distance) { - vec3 found = o + 2.0 * max_distance * d; + in + """ + vec4 raytrace(vec3 o, mat3 d, float max_distance) { + vec3 found = vec3(0); float curr_distance = max_distance; int found_index = -1; vec3 f = vec3(0); @@ -1465,17 +1937,18 @@ main3D suffixes = if(found_index >= 0) { float hue_based_on_index = (float(found_index))*radians(360.0 / 1.1); - vec3 light_direction = normalize(vec3(-0.3, 0.0, 1.0)); + vec3 ld = normalize(vec3(-0.3, 0.0, 1.0)); + vec3 diffs = d[1] - d[0]; + mat3 light_direction = mat3(ld - 0.5 * diffs, ld + 0.5 * diffs, vec3(0)); float light_distance = max_distance; - bool in_light = true; + float light_coeff = 0.45; vec3 offseted = found + 0.0001 * max_distance * normalize(o - found); if(0 == 1) { } """ ++ innerLightTrace ++ """ - float l = in_light ? 0.45 : 0.2; vec3 px = mix( - hl2rgb(hue_based_on_index, l), - hl2rgb(found.z * 0.5, l), + hl2rgb(hue_based_on_index, light_coeff), + hl2rgb(found.z * 0.5, light_coeff), max(0.2, """ ++ colorCoeff ++ """) ); return vec4(px, 1.0); @@ -1483,44 +1956,32 @@ main3D suffixes = return vec4(0.0, 0.0, 0.0, 1.0); } } - """ + """ - innerLightTrace = - String.join "\n" (List.map suffixToRayLight suffixes) - suffixToRay i suffix = - """ - if(bisect""" ++ suffix ++ """(o, d, max_distance, f) && length(f - o) < curr_distance) { - found_index = """ ++ String.fromInt i ++ """; - found = f; - curr_distance = length(found - o); - } - """ +threshold : String +threshold = + "0.000001 * max_distance" - suffixToRayLight suffix = - """ - else if(bisect""" ++ suffix ++ """(offseted, light_direction, light_distance, f)) { - in_light = false; - } - """ - suffixToBisect suffix = - """ - bool bisect""" ++ suffix ++ """(vec3 o, vec3 d, float max_distance, out vec3 found) { - vec3 from = o; - vec3 to = o + max_distance * d; - float ithreshold = 0.000001 * max_distance; +suffixToBisect : String -> String +suffixToBisect suffix = + """ + bool bisect""" ++ suffix ++ """(vec3 o, mat3 d, float max_distance, out vec3 found) { + mat3 from = mat3(o, o, vec3(0)); + mat3 to = from + max_distance * d; + float ithreshold = """ ++ threshold ++ """; int depth = 0; int choices = 0; for(int it = 0; it < MAX_ITERATIONS; it++) { - vec3 midpoint = mix(from, to, 0.5); + mat3 midpoint = 0.5 * (from + to); vec2 front = interval""" ++ suffix ++ """(from, midpoint); vec2 back = interval""" ++ suffix ++ """(midpoint, to); if(depth >= MAX_DEPTH || (front.y - front.x < ithreshold && front.x <= 0.0 && front.y >= 0.0) || (back.y - back.x < ithreshold && back.x <= 0.0 && back.y >= 0.0) ) { - found = midpoint; + found = mix(midpoint[0], midpoint[1], 0.5); return true; } if(front.x <= 0.0 && front.y >= 0.0) { @@ -1558,42 +2019,22 @@ main3D suffixes = } return false; } - """ - in - deindent 12 <| - head - ++ """ - vec4 pixel3 () { - float eye_dist = 2.0 * u_viewportWidth; - vec2 canvasSize = vec2(u_canvasWidth, u_canvasHeight); - vec2 uv_centered = gl_FragCoord.xy - 0.5 * canvasSize; - vec2 uv_normalized = 1.0 / u_canvasHeight * uv_centered; - - float t = u_theta + 0.58; - float p = -2.0 * u_phi; - vec3 eye = eye_dist * normalize(vec3( - cos(t) * sin(p), - cos(t) * -cos(p), - sin(t) - )); - - vec3 target = vec3(0); - vec3 to_target = normalize(target-eye); - vec3 across = normalize(cross(to_target, vec3(0,0,1))); - vec3 up = normalize(cross(across, to_target)); - - vec3 canvas_center = eye + to_target; - vec3 canvas_point = canvas_center + uv_normalized.x * across + uv_normalized.y * up; - - vec3 ray_direction = normalize(canvas_point - eye); - float max_distance = 40.0 * eye_dist; - return raytrace(canvas_point, ray_direction, max_distance); - } - """ + """ deindent : Int -> String -> String deindent i = + let + s = + String.repeat i " " + in String.split "\n" - >> List.map (String.dropLeft i) + >> List.map + (\l -> + if String.startsWith s l then + String.dropLeft i l + + else + l + ) >> String.join "\n" diff --git a/src/elm/UI/Glsl/Generator.elm b/src/elm/UI/Glsl/Generator.elm new file mode 100644 index 00000000..3fb5820b --- /dev/null +++ b/src/elm/UI/Glsl/Generator.elm @@ -0,0 +1,878 @@ +module UI.Glsl.Generator exposing (Expression, File, FunDecl, Mat3, Name, Statement(..), Type, TypedName, TypingFunction, Vec2, Vec3, Vec4, abs_, add, ands, arr, assign, by, byF, call0, call1, call2, call4, ceil_, decl, def, div, dot2, dot3, dotted2, dotted3, dotted4, eq, exp, expressionToGlsl, false, fileToGlsl, float, floatT, floatToGlsl, fun0, fun1, fun2, fun3, funDeclToGlsl, geq, gl_FragColor, gl_FragCoord, gt, if_, int, leq, log, lt, mat3T, max_, min_, mod, negate_, normalize, one, pow, radians_, return, sign, statementToGlsl, subtract, ternary, true, uniform, unknown, unknownFunDecl, unknownName, unknownTypedName, unsafeCall, vec2, vec2T, vec2Zero, vec3, vec3T, vec3Zero, vec4, vec4T, vec4Zero, vec4_3_1, voidT, zero) + +import Expression exposing (RelationOperation(..)) +import Set + + +type alias File = + List FunDecl + + +type FunDecl + = FunDecl { name : String, type_ : String, body : String } + + +type Statement r + = Block String (List (Statement r)) + | Line String + | Return (Expression r) + | Expression (Expression Never) + | Decl String Name (Maybe (Expression Never)) + + +type Expression t + = Bool Bool + | Int Int + | Float Float + | Variable String + | And (Expression Bool) (Expression Bool) + | Or (Expression Bool) (Expression Bool) + | Comparison RelationOperation (Expression Never) (Expression Never) + | Ternary (Expression Bool) (Expression t) (Expression t) + | Add (Expression t) (Expression t) + | Subtract (Expression t) (Expression t) + | By (Expression t) (Expression t) + | Div (Expression t) (Expression t) + | Call String (List (Expression Never)) + | Negate (Expression t) + | Unknown String + | Dot (Expression Never) String + | Array (Expression Never) (Expression Int) + | Assign (Expression t) (Expression t) + + +type alias TypingFunction t = + String -> TypedName t + + +type alias TypedName t = + ( Type t, Name ) + + +type Type t + = Type String + + +type Name + = Name String + + + +-- Internal-only functions + + +{-| UNSAFE +-} +typecastExpression : Expression f -> Expression t +typecastExpression e = + case e of + Unknown u -> + Unknown u + + Bool b -> + Bool b + + Float f -> + Float f + + Int i -> + Int i + + Variable v -> + Variable v + + And l r -> + And l r + + Or l r -> + Or l r + + Comparison rel l r -> + Comparison rel l r + + Ternary c t f -> + Ternary c (typecastExpression t) (typecastExpression f) + + Negate l -> + Negate <| typecastExpression l + + Add l r -> + Add (typecastExpression l) (typecastExpression r) + + Subtract l r -> + Subtract (typecastExpression l) (typecastExpression r) + + By l r -> + By (typecastExpression l) (typecastExpression r) + + Div l r -> + Div (typecastExpression l) (typecastExpression r) + + Dot l r -> + Dot l r + + Call n args -> + Call n args + + Array l r -> + Array l r + + Assign l r -> + Assign (typecastExpression l) (typecastExpression r) + + + +-- UTILS + + +fileToGlsl : File -> String +fileToGlsl decls = + decls + |> List.foldl + (\(FunDecl { name, type_, body }) ( found, output ) -> + if Set.member ( name, type_ ) found then + ( found, output ) + + else + ( Set.insert ( name, type_ ) found, body :: output ) + ) + ( Set.empty, [] ) + |> Tuple.second + |> List.reverse + |> String.join "\n\n" + + +funDeclToGlsl : FunDecl -> String +funDeclToGlsl (FunDecl { body }) = + body + + +statementToGlsl : Statement s -> String +statementToGlsl = + let + go i c = + case c of + Block h b -> + String.join "\n" <| + (indent i h ++ " {") + :: List.map (go (i + 1)) b + ++ [ indent i "}" ] + + Line l -> + indent i l ++ ";" + + Return e -> + indent i <| "return " ++ expressionToGlsl e ++ ";" + + Expression e -> + indent i <| expressionToGlsl e ++ ";" + + Decl t (Name n) (Just e) -> + indent i <| t ++ " " ++ n ++ " = " ++ expressionToGlsl e ++ ";" + + Decl t (Name n) Nothing -> + indent i <| t ++ " " ++ n ++ ";" + in + go 1 + + +expressionToGlsl : Expression t -> String +expressionToGlsl = + let + -- The numbers are precedence numbers from the GLSL spec + go : Bool -> Expression a -> String + go rec e = + case e of + Unknown u -> + u + + _ -> + go17 rec e + + go17 : Bool -> Expression b -> String + go17 rec e = + go16 rec e + + go16 : Bool -> Expression c -> String + go16 rec e = + case e of + Assign l r -> + go15 False l ++ " = " ++ go15 False r + + _ -> + go15 rec e + + go15 : Bool -> Expression d -> String + go15 rec e = + case e of + Ternary c t f -> + go14 False c ++ " ? " ++ go14 False t ++ " : " ++ go15 False f + + _ -> + go14 rec e + + go14 : Bool -> Expression e -> String + go14 rec e = + case e of + Or l r -> + go14 False (typecastExpression l) ++ " || " ++ go13 False r + + _ -> + go13 rec e + + go13 : Bool -> Expression f -> String + go13 rec e = + go12 rec e + + go12 : Bool -> Expression g -> String + go12 rec e = + case e of + And l r -> + go12 False (typecastExpression l) ++ " && " ++ go11 False r + + _ -> + go11 rec e + + go11 : Bool -> Expression h -> String + go11 rec e = + go10 rec e + + go10 : Bool -> Expression i -> String + go10 rec e = + go9 rec e + + go9 : Bool -> Expression j -> String + go9 rec e = + go8 rec e + + go8 : Bool -> Expression k -> String + go8 rec e = + case e of + Comparison Equals l r -> + go7 False l ++ " == " ++ go7 False r + + _ -> + go7 rec e + + go7 : Bool -> Expression l -> String + go7 rec e = + case e of + Comparison LessThan l r -> + go6 False l ++ " < " ++ go6 False r + + Comparison LessThanOrEquals l r -> + go6 False l ++ " <= " ++ go6 False r + + Comparison GreaterThan l r -> + go6 False l ++ " > " ++ go6 False r + + Comparison GreaterThanOrEquals l r -> + go6 False l ++ " >= " ++ go6 False r + + _ -> + go6 rec e + + go6 : Bool -> Expression m -> String + go6 rec e = + go5 rec e + + go5 : Bool -> Expression n -> String + go5 rec e = + case e of + Add l r -> + go5 False l ++ " + " ++ go4 False r + + Subtract l r -> + go5 False l ++ " - " ++ go4 False r + + _ -> + go4 rec e + + go4 : Bool -> Expression o -> String + go4 rec e = + case e of + By l r -> + go4 False l ++ " * " ++ go3 False r + + Div l r -> + go4 False l ++ " / " ++ go3 False r + + _ -> + go3 rec e + + go3 : Bool -> Expression p -> String + go3 rec e = + case e of + Negate c -> + "-" ++ go2 False c + + _ -> + go2 rec e + + go2 : Bool -> Expression q -> String + go2 rec e = + case e of + Call name args -> + name ++ "(" ++ String.join "," (List.map (go False) args) ++ ")" + + Dot l r -> + go2 False (typecastExpression l) ++ "." ++ r + + Array l r -> + go2 False (typecastExpression l) ++ "[" ++ go False r ++ "]" + + _ -> + go1 rec e + + go1 : Bool -> Expression r -> String + go1 rec e = + case e of + Bool b -> + if b then + "true" + + else + "false" + + Float f -> + floatToGlsl f + + Int i -> + String.fromInt i + + Variable v -> + v + + _ -> + if rec then + "!!!Error in toString for Glsl!!!" + + else + "(" ++ go True e ++ ")" + in + go False + + +indent : Int -> String -> String +indent i line = + String.repeat (4 * i) " " ++ line + + + +--EXPRESSIONS + + +ternary : Expression Bool -> Expression t -> Expression t -> Expression t +ternary = + Ternary + + +ands : List (Expression Bool) -> Expression Bool +ands es = + case es of + [] -> + true + + h :: t -> + List.foldl (\e a -> And a e) h t + + +true : Expression Bool +true = + Bool True + + +false : Expression Bool +false = + Bool False + + +add : Expression t -> Expression t -> Expression t +add = + Add + + +subtract : Expression t -> Expression t -> Expression t +subtract = + Subtract + + +negate_ : Expression t -> Expression t +negate_ = + Negate + + +by : Expression t -> Expression t -> Expression t +by = + By + + +byF : Expression Float -> Expression t -> Expression t +byF l = + By (typecastExpression l) + + +div : Expression t -> Expression t -> Expression t +div = + Div + + +lt : Expression t -> Expression t -> Expression Bool +lt l r = + Comparison LessThan (typecastExpression l) (typecastExpression r) + + +leq : Expression t -> Expression t -> Expression Bool +leq l r = + Comparison LessThanOrEquals (typecastExpression l) (typecastExpression r) + + +eq : Expression t -> Expression t -> Expression Bool +eq l r = + Comparison Equals (typecastExpression l) (typecastExpression r) + + +geq : Expression t -> Expression t -> Expression Bool +geq l r = + Comparison GreaterThanOrEquals (typecastExpression l) (typecastExpression r) + + +gt : Expression t -> Expression t -> Expression Bool +gt l r = + Comparison GreaterThan (typecastExpression l) (typecastExpression r) + + +unsafeCall : String -> List (Expression t) -> Expression r +unsafeCall name = + Call name << List.map typecastExpression + + +call0 : TypedName r -> Expression r +call0 ( _, Name fname ) = + Call fname [] + + +call1 : TypedName (a -> r) -> Expression a -> Expression r +call1 ( _, Name fname ) arg0 = + Call fname [ typecastExpression arg0 ] + + +call2 : TypedName (a -> b -> r) -> Expression a -> Expression b -> Expression r +call2 ( _, Name fname ) arg0 arg1 = + Call fname [ typecastExpression arg0, typecastExpression arg1 ] + + +call3 : TypedName (a -> b -> c -> r) -> Expression a -> Expression b -> Expression c -> Expression r +call3 ( _, Name fname ) arg0 arg1 arg2 = + Call fname [ typecastExpression arg0, typecastExpression arg1, typecastExpression arg2 ] + + +call4 : TypedName (a -> b -> c -> d -> r) -> Expression a -> Expression b -> Expression c -> Expression d -> Expression r +call4 ( _, Name fname ) arg0 arg1 arg2 arg3 = + Call fname [ typecastExpression arg0, typecastExpression arg1, typecastExpression arg2, typecastExpression arg3 ] + + +zero : Expression Float +zero = + Float 0 + + +one : Expression Float +one = + Float 1 + + +float : Float -> Expression Float +float = + Float + + +int : Int -> Expression Int +int = + Int + + +floatToGlsl : Float -> String +floatToGlsl f = + let + s = + String.fromFloat f + in + if String.contains "." s || String.contains "e" s then + s + + else + s ++ "." + + +abs_ : Expression t -> Expression t +abs_ = + call1 ( Type "", Name "abs" ) + + +exp : Expression t -> Expression t +exp = + call1 ( Type "", Name "exp" ) + + +log : Expression t -> Expression t +log = + call1 ( Type "", Name "log" ) + + +mod : Expression t -> Expression t -> Expression t +mod = + call2 ( Type "", Name "mod" ) + + +dotted2 : + Expression Vec2 + -> + { x : Expression Float + , y : Expression Float + } +dotted2 e = + let + tc = + typecastExpression e + in + { x = Dot tc "x" + , y = Dot tc "y" + } + + +dotted3 : + Expression Vec3 + -> + { x : Expression Float + , y : Expression Float + , z : Expression Float + } +dotted3 e = + let + tc = + typecastExpression e + in + { x = Dot tc "x" + , y = Dot tc "y" + , z = Dot tc "z" + } + + +dotted4 : + Expression Vec4 + -> + { x : Expression Float + , y : Expression Float + , z : Expression Float + , xy : Expression Vec2 + , yzw : Expression Vec3 + } +dotted4 e = + let + tc = + typecastExpression e + in + { x = Dot tc "x" + , y = Dot tc "y" + , z = Dot tc "z" + , xy = Dot tc "xy" + , yzw = Dot tc "yzw" + } + + +arr : Expression Mat3 -> Expression Int -> Expression Vec3 +arr l r = + Array (typecastExpression l) r + + +dot2 : Expression Vec2 -> Expression Vec2 -> Expression Float +dot2 = + call2 ( Type "", Name "dot" ) + + +dot3 : Expression Vec3 -> Expression Vec3 -> Expression Float +dot3 = + call2 ( Type "", Name "dot" ) + + +vec2 : Expression Float -> Expression Float -> Expression Vec2 +vec2 = + call2 ( Type "", Name "vec2" ) + + +vec2Zero : Expression Vec2 +vec2Zero = + call1 ( Type "", Name "vec2" ) (int 0) + + +vec3 : Expression Float -> Expression Float -> Expression Float -> Expression Vec3 +vec3 = + call3 ( Type "", Name "vec3" ) + + +vec3Zero : Expression Vec3 +vec3Zero = + call1 ( Type "", Name "vec3" ) (int 0) + + +vec4 : Expression Float -> Expression Float -> Expression Float -> Expression Float -> Expression Vec4 +vec4 = + call4 ( Type "", Name "vec4" ) + + +vec4Zero : Expression Vec4 +vec4Zero = + call1 ( Type "", Name "vec4" ) (int 0) + + +vec4_3_1 : Expression Vec3 -> Expression Float -> Expression Vec4 +vec4_3_1 = + call2 ( Type "", Name "vec4" ) + + +min_ : Expression t -> Expression t -> Expression t +min_ = + call2 ( Type "", Name "min" ) + + +max_ : Expression t -> Expression t -> Expression t +max_ = + call2 ( Type "", Name "max" ) + + +pow : Expression Float -> Expression Float -> Expression Float +pow = + call2 ( Type "", Name "pow" ) + + +ceil_ : Expression Float -> Expression Float +ceil_ = + call1 ( Type "", Name "ceil" ) + + +sign : Expression t -> Expression t +sign = + call1 ( Type "", Name "sign" ) + + +radians_ : Expression Float -> Expression Float +radians_ = + call1 ( Type "", Name "radians" ) + + +normalize : Expression t -> Expression t +normalize = + call1 ( Type "", Name "normalize" ) + + +unknown : String -> Expression t +unknown = + -- let + -- _ = + -- Debug.todo + -- in + Unknown + + +gl_FragColor : Expression Vec3 +gl_FragColor = + Variable "gl_FragColor" + + +gl_FragCoord : Expression Vec4 +gl_FragCoord = + Variable "gl_FragCoord" + + +uniform : TypingFunction t -> String -> Expression t +uniform _ name = + Variable name + + +unknownName : String -> Name +unknownName = + -- let + -- _ = + -- Debug.todo + -- in + Name + + +unknownTypedName : String -> TypedName t +unknownTypedName n = + -- let + -- _ = + -- Debug.todo + -- in + ( Type "", Name n ) + + + +-- STATEMENTS + + +fun : TypingFunction t -> String -> List ( String, String ) -> List (Statement t) -> FunDecl +fun typeF name args body = + let + ( Type rt, _ ) = + typeF name + + argsList = + String.join ", " (List.map (\( t, n ) -> t ++ " " ++ n) args) + in + FunDecl + { name = name + , type_ = + (args ++ [ ( rt, "" ) ]) + |> List.map Tuple.first + |> String.join " -> " + , body = + String.join "\n" <| + (rt ++ " " ++ name ++ "(" ++ argsList ++ ") {") + :: List.map statementToGlsl body + ++ [ "}" ] + } + + +argToString : ( Type t, Name ) -> ( String, String ) +argToString ( Type t, Name n ) = + ( t, n ) + + +toVar : TypedName t -> Expression t +toVar ( _, Name n ) = + Variable n + + +fun0 : TypingFunction r -> String -> List (Statement r) -> FunDecl +fun0 typeF name body = + fun typeF name [] <| + body + + +fun1 : TypingFunction r -> String -> TypedName a -> (Expression a -> List (Statement r)) -> ( FunDecl, Expression a -> Expression r ) +fun1 typeF name arg0 body = + ( fun typeF name [ argToString arg0 ] <| + body (toVar arg0) + , call1 ( Type "", Name name ) + ) + + +fun2 : TypingFunction r -> String -> TypedName a -> TypedName b -> (Expression a -> Expression b -> List (Statement r)) -> ( FunDecl, Expression a -> Expression b -> Expression r ) +fun2 typeF name arg0 arg1 body = + ( fun typeF name [ argToString arg0, argToString arg1 ] <| + body (toVar arg0) (toVar arg1) + , call2 ( Type "", Name name ) + ) + + +fun3 : TypingFunction r -> String -> TypedName a -> TypedName b -> TypedName c -> (Expression a -> Expression b -> Expression c -> List (Statement r)) -> ( FunDecl, Expression a -> Expression b -> Expression c -> Expression r ) +fun3 typeF name arg0 arg1 arg2 body = + ( fun typeF name [ argToString arg0, argToString arg1, argToString arg2 ] <| + body (toVar arg0) (toVar arg1) (toVar arg2) + , call3 ( Type "", Name name ) + ) + + +if_ : Expression Bool -> Statement r -> Statement r +if_ cond ifTrue = + Block ("if(" ++ expressionToGlsl cond ++ ")") [ ifTrue ] + + +return : Expression r -> Statement r +return = + Return + + +decl : TypingFunction t -> String -> (Expression t -> List (Statement a)) -> List (Statement a) +decl typeF name k = + let + ( Type t, _ ) = + typeF name + + go = + Decl t (Name name) Nothing + in + go :: k (Variable name) + + +def : TypingFunction t -> String -> Expression t -> (Expression t -> List (Statement a)) -> List (Statement a) +def typeF name value k = + let + ( Type t, _ ) = + typeF name + + go = + Decl t (Name name) (Just <| typecastExpression value) + in + go :: k (Variable name) + + +assign : Expression t -> Expression t -> Statement a +assign name value = + Expression <| Assign (typecastExpression name) (typecastExpression value) + + +unknownFunDecl : { name : String, type_ : String, body : String } -> FunDecl +unknownFunDecl = + let + _ = + Debug.todo + in + FunDecl + + + +-- TYPES + + +buildType : String -> String -> ( Type t, Name ) +buildType t n = + ( Type t, Name n ) + + +voidT : TypingFunction () +voidT = + buildType "void" + + +floatT : TypingFunction Float +floatT = + buildType "float" + + +type Vec2 + = Vec2 Vec2 + + +vec2T : TypingFunction Vec2 +vec2T = + buildType "vec2" + + +type Vec3 + = Vec3 Vec3 + + +vec3T : TypingFunction Vec3 +vec3T = + buildType "vec3" + + +type Vec4 + = Vec4 Vec4 + + +vec4T : TypingFunction Vec4 +vec4T = + buildType "vec4" + + +type Mat3 + = Mat3 Mat3 + + +mat3T : TypingFunction Mat3 +mat3T = + buildType "mat3" diff --git a/src/elm/UI/Glsl/Model.elm b/src/elm/UI/Glsl/Model.elm index 3d53f5d8..54fb7b91 100644 --- a/src/elm/UI/Glsl/Model.elm +++ b/src/elm/UI/Glsl/Model.elm @@ -20,6 +20,7 @@ type GlslFunction | Max222 | Min222 | Mod22 + | Mbrot22 | Pw22 | Re22 | Round22 @@ -28,6 +29,7 @@ type GlslFunction | Sinh11 | Sinh22 | Sqrt22 + | Cbrt22 | Square22 | Tan22 | Tanh11 diff --git a/src/elm/UI/Glsl/Plane.elm b/src/elm/UI/Glsl/Plane.elm new file mode 100644 index 00000000..6529cfe8 --- /dev/null +++ b/src/elm/UI/Glsl/Plane.elm @@ -0,0 +1,53 @@ +module UI.Glsl.Plane exposing (Plane, asPlane, toGlsl) + +import Dict +import Expression exposing (Expression) +import UI.Glsl.Code exposing (threshold) +import UI.Glsl.Generator exposing (floatToGlsl) +import UI.Glsl.Polynomial as Polynomial + + +type Plane + = Plane { x : Float, y : Float, z : Float, known : Float } + + +asPlane : Expression -> Maybe Plane +asPlane e = + Polynomial.asPolynomial [ "x", "y", "z" ] e + |> Maybe.andThen + (\poly -> + if Polynomial.getDegree poly /= 1 then + Nothing + + else + let + get k = + Maybe.withDefault 0 <| Dict.get k poly + in + Just <| + Plane + { x = get [ ( "x", 1 ) ] + , y = get [ ( "y", 1 ) ] + , z = get [ ( "z", 1 ) ] + , known = get [] + } + ) + + +toGlsl : String -> Plane -> String +toGlsl suffix (Plane { x, y, z, known }) = + -- a x + b y + c z + k = 0 + -- x = ox + t dx + -- y = oy + t dy + -- z = oz + t dz + -- a ox + a t dx + b oy + b t dy + c oz + c t dz + k = 0 + -- t (a dx + b dy + c dy) = - k - (a ox + b oy + c oz) + -- t = - (k + dot abc o) / (dot abc d) + """ + bool bisect""" ++ suffix ++ """(vec3 o, mat3 d, float max_distance, out vec3 found) { + vec3 coeffs = vec3(""" ++ floatToGlsl x ++ "," ++ floatToGlsl y ++ "," ++ floatToGlsl z ++ """); + float t = -(""" ++ floatToGlsl known ++ """ + dot(coeffs, o)) / dot(coeffs, 0.5 * (d[0] + d[1])); + found = o + t * 0.5 * (d[0] + d[1]); + return t > """ ++ threshold ++ """; + } + """ diff --git a/src/elm/UI/Glsl/Polynomial.elm b/src/elm/UI/Glsl/Polynomial.elm new file mode 100644 index 00000000..e1e5e9e6 --- /dev/null +++ b/src/elm/UI/Glsl/Polynomial.elm @@ -0,0 +1,157 @@ +module UI.Glsl.Polynomial exposing (asPolynomial, getDegree, getSolutions) + +import Dict exposing (Dict) +import Expression exposing (AssociativeOperation(..), BinaryOperation(..), Expression(..), RelationOperation(..), UnaryOperation(..)) +import Expression.Polynomial exposing (Exponents) +import Expression.Utils exposing (minus, zero) +import Maybe.Extra as Maybe +import UI.Glsl.Code exposing (threshold) +import UI.Glsl.Generator as Generator exposing (unknown) + + +getDegree : Dict (List ( a, number )) b -> number +getDegree poly = + poly + |> Dict.toList + |> List.map (Tuple.first >> List.map Tuple.second >> List.sum) + |> List.maximum + |> Maybe.withDefault 0 + + +asPolynomial : List String -> Expression -> Maybe (Dict Exponents Float) +asPolynomial vars e = + case e of + RelationOperation Equals l r -> + asPolynomial vars (minus l r) + + _ -> + e + |> Expression.Polynomial.asPolynomial vars + |> Maybe.map Dict.toList + |> Maybe.andThen (Maybe.traverse (\( k, v ) -> Maybe.map (Tuple.pair k) (toFloat v))) + |> Maybe.map Dict.fromList + + +toFloat : Expression -> Maybe Float +toFloat e = + case e of + Integer i -> + Just <| Basics.toFloat i + + Float f -> + Just <| f + + AssociativeOperation Addition l m r -> + (l :: m :: r) + |> Maybe.traverse toFloat + |> Maybe.map List.sum + + AssociativeOperation Multiplication l m r -> + (l :: m :: r) + |> Maybe.traverse toFloat + |> Maybe.map List.product + + UnaryOperation Negate c -> + Maybe.map negate <| toFloat c + + BinaryOperation Division n d -> + Maybe.map2 (/) (toFloat n) (toFloat d) + + BinaryOperation Power b ex -> + Maybe.map2 (^) (toFloat b) (toFloat ex) + + _ -> + Nothing + + +getSolutions : Dict Int Expression -> Maybe ( Int, List ( String, String ) ) +getSolutions poly = + let + deg = + poly + |> Dict.keys + |> List.maximum + |> Maybe.withDefault 0 + + get d = + Dict.get d poly + |> Maybe.withDefault zero + |> UI.Glsl.Code.expressionToGlsl + [ ( "dx", unknown "dx" ) + , ( "dy", unknown "dy" ) + , ( "dz", unknown "dz" ) + , ( "o.x", unknown "o.x" ) + , ( "o.y", unknown "o.y" ) + , ( "o.z", unknown "o.z" ) + ] + |> Generator.expressionToGlsl + + tFrom v = + ( "t", v ++ ".x < 0.0 || abs(" ++ v ++ ".y) > " ++ threshold ++ " ? t : min(" ++ v ++ ".x, t)" ) + + sols = + case deg of + 1 -> + -- ax + b = 0 + -- x = -b / a + [ ( "!dx", "mix(d[0].x, d[1].x, 0.5)" ) + , ( "!dy", "mix(d[0].y, d[1].y, 0.5)" ) + , ( "!dz", "mix(d[0].z, d[1].z, 0.5)" ) + , ( "a", get 1 ) + , ( "b", get 0 ) + , ( "x", "div(-b, a)" ) + , tFrom "x" + ] + + 2 -> + -- ax² + bx + c = 0 + [ ( "!dx", "mix(d[0].x, d[1].x, 0.5)" ) + , ( "!dy", "mix(d[0].y, d[1].y, 0.5)" ) + , ( "!dz", "mix(d[0].z, d[1].z, 0.5)" ) + , ( "a", get 2 ) + , ( "b", get 1 ) + , ( "c", get 0 ) + , ( "delta", "by(b,b) - 4.0 * by(a,c)" ) + , ( "sqdelta", "csqrt(delta)" ) + , ( "den", "2.0 * a" ) + , ( "pos", "div(- b + sqdelta, den)" ) + , tFrom "pos" + , ( "neg", "div(- b - sqdelta, den)" ) + , tFrom "neg" + ] + + {- 3 -> + [ ( "!dx", "mix(d[0].x, d[1].x, 0.5)" ) + , ( "!dy", "mix(d[0].y, d[1].y, 0.5)" ) + , ( "!dz", "mix(d[0].z, d[1].z, 0.5)" ) + , ( "a", get 3 ) + , ( "b", get 2 ) + , ( "c", get 1 ) + , ( "dd", get 0 ) + , ( "deltaZero", "by(b,b) - 3.0 * by(a,c)" ) + , ( "deltaOne", "2.0 * by(b,b,b) - 9.0 * by(a,b,c) + 27.0 * by(a,a, dd)" ) + , ( "inner", "csqrt(by(deltaOne,deltaOne) - 4.0 * by(deltaZero,deltaZero,deltaZero))" ) + , ( "CargPlus", "deltaOne + inner" ) + , ( "CargMinus", "deltaOne - inner" ) + , ( "Carg", "length(CargMinus) > length(CargPlus) ? CargMinus : CargPlus" ) + , ( "C", "ccbrt(0.5 * Carg)" ) + , ( "coeff", "-div(vec2(1,0), 3.0 * a)" ) + , ( "xi", "0.5 * vec2(-1,sqrt(3.0))" ) + , ( "x", "by(coeff, b + C + div(deltaZero, C))" ) + , tFrom "x" + , ( "C", "by(xi,C)" ) + , ( "x", "by(coeff, b + C + div(deltaZero, C))" ) + , tFrom "x" + , ( "C", "by(xi,C)" ) + , ( "x", "by(coeff, b + C + div(deltaZero, C))" ) + , tFrom "x" + ] + -} + _ -> + [] + in + if List.isEmpty sols then + Nothing + + else + Just ( deg, sols ) diff --git a/src/elm/UI/Glsl/Sphere.elm b/src/elm/UI/Glsl/Sphere.elm new file mode 100644 index 00000000..fed0094e --- /dev/null +++ b/src/elm/UI/Glsl/Sphere.elm @@ -0,0 +1,94 @@ +module UI.Glsl.Sphere exposing (Sphere, asSphere, toGlsl) + +import Dict exposing (Dict) +import Expression exposing (Expression) +import Expression.Polynomial exposing (Exponents) +import UI.Glsl.Code exposing (threshold) +import UI.Glsl.Generator exposing (floatToGlsl) +import UI.Glsl.Polynomial as Polynomial + + +type Sphere + = Sphere + { center : { x : Float, y : Float, z : Float } + , radius : Float + } + + +asSphere : Expression -> Maybe Sphere +asSphere e = + e + |> Polynomial.asPolynomial [ "x", "y", "z" ] + |> Maybe.andThen reduce + |> Maybe.andThen + (\poly -> + if Polynomial.getDegree poly /= 2 then + Nothing + + else + -- (x-a)²+(y-b)²+(z-c)²=r² + -- x²-2ax+a² + y²-2by+b² + z²-2cz+c² - r² = 0 + -- k = a² + b² + c² - r² + -- r² = a²+b²+c²-k + let + getCenter v = + case ( Dict.get [ ( v, 2 ) ] poly, Maybe.withDefault 0 <| Dict.get [ ( v, 1 ) ] poly ) of + ( Just s, l ) -> + if s /= 1 then + Nothing + + else + Just <| -l / 2 + + _ -> + Nothing + in + Maybe.map3 + (\x y z -> + Sphere + { center = + { x = x + , y = y + , z = z + } + , radius = sqrt <| max 0 <| x * x + y * y + z * z - Maybe.withDefault 0 (Dict.get [] poly) + } + ) + (getCenter "x") + (getCenter "y") + (getCenter "z") + ) + + +reduce : Dict Exponents Float -> Maybe (Dict Exponents Float) +reduce poly = + Dict.get [ ( "x", 2 ) ] poly + |> Maybe.andThen + (\c -> + if c == 0 then + Nothing + + else + Just <| Dict.map (\_ v -> v / c) poly + ) + + +toGlsl : String -> Sphere -> String +toGlsl suffix (Sphere { center, radius }) = + """ + bool bisect""" ++ suffix ++ """(vec3 o, mat3 d, float max_distance, out vec3 found) { + vec3 center = vec3(""" ++ floatToGlsl center.x ++ """,""" ++ floatToGlsl center.y ++ """,""" ++ floatToGlsl center.z ++ """); + + vec3 to_center = o - center; + float b = dot(to_center, mix(d[0], d[1], 0.5)); + float c = dot(to_center, to_center) - """ ++ floatToGlsl (radius * radius) ++ """; + float delta = b*b - c; + if(delta < 0.) + return false; + float x = -b - sqrt(delta); + if(x < """ ++ threshold ++ """) + return false; + found = o + x * mix(d[0], d[1], 0.5); + return true; + } + """ diff --git a/src/elm/UI/L10N.elm b/src/elm/UI/L10N.elm index 64847b7a..f97c0def 100644 --- a/src/elm/UI/L10N.elm +++ b/src/elm/UI/L10N.elm @@ -1,6 +1,6 @@ -module UI.L10N exposing (L10N, Language(..), invariant, localize, map, text, title) +module UI.L10N exposing (L10N, Language(..), concat, invariant, localize, map, sequence, text, title, traverse) -import Element.WithContext as Element exposing (Element) +import Element.WithContext as Element exposing (Attribute, Element) import Html.Attributes @@ -22,6 +22,31 @@ map f { en, it } = } +traverse : (a -> L10N b) -> List a -> L10N (List b) +traverse f = + List.foldr + (\e { en, it } -> + let + fe = + f e + in + { en = fe.en :: en + , it = fe.it :: it + } + ) + { en = [], it = [] } + + +sequence : List (L10N a) -> L10N (List a) +sequence = + traverse identity + + +concat : List (L10N String) -> L10N String +concat = + sequence >> map String.concat + + invariant : a -> L10N a invariant content = { en = content @@ -45,7 +70,7 @@ text l10n = Element.text -title : L10N String -> Element.Attribute { a | language : Language } msg +title : L10N String -> Attribute { a | language : Language } msg title l10n = Element.withAttribute (localize l10n) (Element.htmlAttribute << Html.Attributes.title) diff --git a/src/elm/UI/Model.elm b/src/elm/UI/Model.elm index d74972e9..7edac0c8 100644 --- a/src/elm/UI/Model.elm +++ b/src/elm/UI/Model.elm @@ -1,15 +1,12 @@ -module UI.Model exposing (CanvasId(..), CellMsg(..), Context, DocumentMsg(..), Flags, Google, Model, Msg(..), documentsCodec) +module UI.Model exposing (CanvasId(..), CellMsg(..), Context, DocumentMsg(..), Flags, Google, Model, Msg(..), Size, documentsCodec) import API.Google as Google import Browser.Navigation exposing (Key) import Codec exposing (Codec) -import Document as Document exposing (RowData(..), StoredDocument, UIDocument) +import Document exposing (StoredDocument, UIDocument) import Element.WithContext exposing (DeviceClass) import File exposing (File) import Json.Decode as JD -import List.Extra as List -import List.MyExtra as List exposing (LeftOrRight(..)) -import Maybe.MyExtra as Maybe import UI.L10N exposing (Language) import Zipper exposing (Zipper) @@ -21,6 +18,7 @@ import Zipper exposing (Zipper) type alias Flags = { saved : JD.Value , hasClipboard : Bool + , hasFullscreen : Bool , languages : List String , rootUrl : String , googleAccessToken : String @@ -53,8 +51,11 @@ type alias Size = type alias Context = { language : Language , hasClipboard : Bool + , hasFullscreen : Bool , expandIntervals : Bool + , rayDifferentials : Bool , deviceClass : DeviceClass + , isFullscreen : Bool } @@ -80,9 +81,11 @@ type Msg | ToggleMenu Bool | ToggleShowPendingActions Bool | ToggleExpandIntervals Bool + | ToggleRayDifferentials Bool | Language Language | GoogleAuth | GoogleGotAccessToken String + | IsFullscreen Bool | Nop String @@ -110,7 +113,10 @@ type CellMsg | StartEditing | Calculate | Input String + | ResetZoom CanvasId | SaveCanvas CanvasId + | FullscreenCanvas CanvasId + | ExitFullscreenCanvas CanvasId | CopyCanvas CanvasId diff --git a/src/elm/UI/Ports.elm b/src/elm/UI/Ports.elm index 9f080162..9eb29f84 100644 --- a/src/elm/UI/Ports.elm +++ b/src/elm/UI/Ports.elm @@ -1,4 +1,4 @@ -port module UI.Ports exposing (copyCanvas, gotGoogleAccessToken, openWindow, persist, saveCanvas, saveGoogleAccessToken, saveGoogleAccessTokenAndCloseWindow) +port module UI.Ports exposing (copyCanvas, exitFullscreenCanvas, fullscreenCanvas, gotGoogleAccessToken, isFullscreen, openWindow, persist, resetZoomCanvas, saveCanvas, saveGoogleAccessToken, saveGoogleAccessTokenAndCloseWindow) import Json.Decode exposing (Value) import UI.Model exposing (CanvasId(..)) @@ -26,6 +26,24 @@ saveCanvas (CanvasId id) = port save : String -> Cmd msg +fullscreenCanvas : CanvasId -> Cmd msg +fullscreenCanvas (CanvasId id) = + fullscreen id + + +exitFullscreenCanvas : CanvasId -> Cmd msg +exitFullscreenCanvas (CanvasId id) = + exitFullscreen id + + +resetZoomCanvas : CanvasId -> Cmd msg +resetZoomCanvas (CanvasId id) = + resetZoom id + + +port fullscreen : String -> Cmd msg + + port saveGoogleAccessToken : String -> Cmd msg @@ -33,3 +51,12 @@ port saveGoogleAccessTokenAndCloseWindow : String -> Cmd msg port gotGoogleAccessToken : (String -> msg) -> Sub msg + + +port exitFullscreen : String -> Cmd msg + + +port resetZoom : String -> Cmd msg + + +port isFullscreen : (Bool -> msg) -> Sub msg diff --git a/src/elm/UI/RowView.elm b/src/elm/UI/RowView.elm index 746ff138..a62ed93a 100644 --- a/src/elm/UI/RowView.elm +++ b/src/elm/UI/RowView.elm @@ -4,32 +4,29 @@ import Ant.Icons as Icons import Complex import Dict import Document exposing (Output(..), Row, RowData(..)) -import Element.WithContext as Element exposing (DeviceClass(..), Element, alignBottom, alignRight, alignTop, centerX, el, fill, height, htmlAttribute, inFront, none, padding, paddingXY, px, row, shrink, spacing, text, width) +import Element.WithContext as Element exposing (DeviceClass(..), alignBottom, alignRight, alignTop, centerX, el, fill, height, htmlAttribute, inFront, none, paddingXY, px, row, shrink, spacing, width) +import Element.WithContext.Background as Background import Element.WithContext.Border as Border import Element.WithContext.Font as Font import Element.WithContext.Input as Input import Element.WithContext.Lazy as Lazy -import Expression exposing (AssociativeOperation(..), BinaryOperation(..), Expression(..), FunctionName(..), KnownFunction(..), RelationOperation(..), SolutionTree(..), UnaryOperation(..), genericAsMatrix) +import Expression exposing (Expression(..), SolutionTree(..), genericAsMatrix) import Expression.Graph exposing (Graph(..)) import Expression.NumericRange import Expression.Value exposing (Value(..)) import Html import Html.Attributes import Json.Encode -import List.Extra as List import Markdown.Parser import Markdown.Renderer import UI.Glsl exposing (getGlsl) -import UI.Model exposing (CanvasId(..), CellMsg(..), Context, DocumentMsg(..), Msg(..)) -import UI.Theme as Theme +import UI.L10N exposing (L10N, invariant, text, title) +import UI.Model exposing (CanvasId(..), CellMsg(..), DocumentMsg(..)) +import UI.Theme as Theme exposing (Element) -type alias Element msg = - Element.Element Context msg - - -draw : { width : Int, height : Int } -> CanvasId -> { wdiv : Int, hdiv : Int } -> Graph -> Element CellMsg -draw { width, height } id { wdiv, hdiv } graph = +draw : { width : Int, height : Int } -> CanvasId -> { wdiv : Int, hdiv : Int } -> { graph : Graph, axes : Bool } -> Element CellMsg +draw size id { wdiv, hdiv } { graph, axes } = let isCompletelyReal g = case g of @@ -37,11 +34,7 @@ draw { width, height } id { wdiv, hdiv } graph = List.all isCompletelyReal gs Contour e -> - if Expression.NumericRange.isCompletelyReal e then - True - - else - False + Expression.NumericRange.isCompletelyReal e _ -> False @@ -65,10 +58,10 @@ draw { width, height } id { wdiv, hdiv } graph = "0" rawImageWidth = - min 1920 <| width - (8 + wdiv) * Theme.spacing + min 1920 <| size.width - (8 + wdiv) * Theme.rythm rawImageHeight = - min 1080 <| height - (14 + hdiv) * Theme.spacing + min 1080 <| size.height - (14 + hdiv) * Theme.rythm imageWidth = min rawImageWidth <| rawImageHeight * 4 // 3 @@ -76,51 +69,80 @@ draw { width, height } id { wdiv, hdiv } graph = imageHeight = min rawImageHeight <| rawImageWidth * 4 // 3 - saveButton = - Input.button [] - { label = Element.element <| Icons.saveOutlined Theme.lightIconAttrs - , onPress = Just <| SaveCanvas id + iconButton msg rounds icon = + Input.button + [ Element.behindContent <| + el + [ width fill + , height fill + , Background.color <| Element.rgba 0 0 0 0.2 + , Border.roundEach rounds + ] + none + , Theme.padding + , htmlAttribute <| Html.Attributes.class "on-parent-hover" + ] + { label = Element.element <| icon Theme.lightIconAttrs + , onPress = Just <| msg id } - copyButton = - Element.with .hasClipboard <| - \hasClipboard -> - if hasClipboard then - Input.button [] - { label = Element.element <| Icons.copyOutlined Theme.lightIconAttrs - , onPress = Just <| CopyCanvas id - } + noRound = + { topLeft = 0, topRight = 0, bottomLeft = 0, bottomRight = 0 } - else - none + brButtonsRow = + Element.with identity <| \{ isFullscreen, hasFullscreen } -> + row [ alignRight, alignBottom ] <| + if isFullscreen then + [ iconButton ResetZoom { noRound | topLeft = Theme.rythm } Icons.aimOutlined + , iconButton ExitFullscreenCanvas noRound Icons.fullscreenExitOutlined + ] + + else if hasFullscreen then + [ iconButton ResetZoom { noRound | topLeft = Theme.rythm } Icons.aimOutlined + , iconButton FullscreenCanvas noRound Icons.fullscreenOutlined + ] - buttonsRow = - Theme.row [ alignRight, alignTop, padding Theme.spacing ] [ copyButton, saveButton ] + else + [ iconButton ResetZoom { noRound | topLeft = Theme.rythm } Icons.aimOutlined + ] + + urButtonsRow = + Element.with .hasClipboard <| \hasClipboard -> + row [ alignRight, alignTop ] <| + if hasClipboard then + [ iconButton CopyCanvas { noRound | bottomLeft = Theme.rythm } Icons.copyOutlined + , iconButton SaveCanvas noRound Icons.saveOutlined + ] + + else + [ iconButton SaveCanvas { noRound | bottomLeft = Theme.rythm } Icons.saveOutlined + ] + + (CanvasId cid) = + id attrs = - [ inFront buttonsRow + [ inFront urButtonsRow + , inFront brButtonsRow + , htmlAttribute <| Html.Attributes.id <| cid ++ "-parent" + , htmlAttribute <| Html.Attributes.class "hover-parent" ] in - Element.with .expandIntervals <| - \expandIntervals -> - el attrs <| - Element.html <| - Html.node "nu-plot" - [ let - (CanvasId cid) = - id - in - Html.Attributes.id cid - , Html.Attributes.property "exprSrc" <| Json.Encode.string <| getGlsl expandIntervals graph - , Html.Attributes.attribute "canvas-width" <| String.fromInt <| imageWidth // wdiv - , Html.Attributes.attribute "canvas-height" <| String.fromInt <| imageHeight // hdiv - , Html.Attributes.attribute "white-lines" <| String.fromInt Theme.whiteLines - , Html.Attributes.attribute "completely-real" <| boolToIntString <| isCompletelyReal graph - , Html.Attributes.attribute "de-noise" "0.000001" - , Html.Attributes.attribute "is-3d" <| boolToIntString <| is3D graph - , Html.Attributes.title <| Expression.toString <| Expression.Graph.toExpression graph - ] - [] + Element.with identity <| \{ rayDifferentials, expandIntervals } -> + el attrs <| + Element.html <| + Html.node "nu-plot" + [ Html.Attributes.id cid + , Html.Attributes.property "exprSrc" <| Json.Encode.string <| getGlsl expandIntervals rayDifferentials graph + , Html.Attributes.attribute "canvas-width" <| String.fromInt <| imageWidth // wdiv + , Html.Attributes.attribute "canvas-height" <| String.fromInt <| imageHeight // hdiv + , Html.Attributes.attribute "white-lines" <| String.fromInt Theme.whiteLines + , Html.Attributes.attribute "completely-real" <| boolToIntString <| isCompletelyReal graph + , Html.Attributes.attribute "draw-axes" <| boolToIntString axes + , Html.Attributes.attribute "is-3d" <| boolToIntString <| is3D graph + , Html.Attributes.title <| Expression.toString <| Expression.Graph.toExpression graph + ] + [] view : { width : Int, height : Int } -> Int -> Row -> Element DocumentMsg @@ -139,23 +161,38 @@ view size index { input, editing, data } = output in Theme.column - [ Element.width fill + [ width fill , alignTop ] (codeInputLine size index input :: outputRows) MarkdownRow -> + let + toCodeCellButton = + Input.button + [ alignRight + , title + { en = "Convert to Code cell" + , it = "Converti in cella con Codice" + } + ] + { label = Element.element <| Icons.swapOutlined Theme.darkIconAttrs + , onPress = Just ToCode + } + in if editing then - Theme.row [ Element.width fill ] + Theme.row [ width fill ] [ inputBox (size.width - 100) input - , Input.button [ htmlAttribute <| Html.Attributes.title "End editing" ] + , Input.button + [ title + { en = "End editing" + , it = "Fine modifica" + } + ] { onPress = Just EndEditing , label = Element.element <| Icons.enterOutlined Theme.darkIconAttrs } - , Input.button [ alignRight, htmlAttribute <| Html.Attributes.title "Convert to Code cell" ] - { label = Element.element <| Icons.swapOutlined Theme.darkIconAttrs - , onPress = Just ToCode - } + , toCodeCellButton ] else @@ -165,30 +202,37 @@ view size index { input, editing, data } = |> Markdown.Renderer.render Markdown.Renderer.defaultHtmlRenderer |> Result.withDefault [] |> List.map (\e -> Element.paragraph [] [ Element.html e ]) - |> Element.textColumn [ Element.width fill, alignTop ] + |> Element.textColumn [ width fill, alignTop ] |> (\e -> - Theme.row [ Element.width fill ] + Theme.row [ width fill ] [ e - , Input.button [ htmlAttribute <| Html.Attributes.title "Edit" ] - { onPress = Just StartEditing - , label = Element.element <| Icons.editOutlined Theme.darkIconAttrs - } - , Input.button [ alignRight, htmlAttribute <| Html.Attributes.title "Convert to Code cell" ] - { label = Element.element <| Icons.swapOutlined Theme.darkIconAttrs - , onPress = Just ToCode - } + , editButton + , toCodeCellButton ] ) +editButton : Element CellMsg +editButton = + Input.button + [ title + { en = "Edit" + , it = "Modifica" + } + ] + { onPress = Just StartEditing + , label = Element.element <| Icons.editOutlined Theme.darkIconAttrs + } + + inputBox : Int -> String -> Element CellMsg inputBox maxWidth input = Input.multiline - [ Element.width <| Element.maximum maxWidth fill - , Element.htmlAttribute <| Html.Attributes.attribute "autocorrect" "off" - , Element.htmlAttribute <| Html.Attributes.attribute "autocapitalize" "none" - , Element.htmlAttribute <| Html.Attributes.spellcheck False - , Element.htmlAttribute <| Html.Attributes.class "input" + [ width <| Element.maximum maxWidth fill + , htmlAttribute <| Html.Attributes.attribute "autocorrect" "off" + , htmlAttribute <| Html.Attributes.attribute "autocapitalize" "none" + , htmlAttribute <| Html.Attributes.spellcheck False + , htmlAttribute <| Html.Attributes.class "input" , Theme.onCtrlEnter Calculate ] { label = Input.labelHidden "Input" @@ -203,36 +247,53 @@ codeInputLine : { a | width : Int } -> Int -> String -> Element CellMsg codeInputLine size index input = let buttons = - [ Input.button [ alignRight, htmlAttribute <| Html.Attributes.title "Press Ctrl+Enter to calculate" ] + [ Input.button + [ alignRight + , title + { en = "Press Ctrl+Enter to calculate" + , it = "Premere Ctrl+Invio per calcolare" + } + ] { onPress = Just Calculate , label = Element.element <| Icons.playSquareOutlined Theme.darkIconAttrs } - , Input.button [ alignRight, htmlAttribute <| Html.Attributes.title "Convert to Markdown cell" ] + , Input.button + [ alignRight + , title + { en = "Convert to Markdown cell" + , it = "Converti in cella con Markdown" + } + ] { label = Element.element <| Icons.swapOutlined Theme.darkIconAttrs , onPress = Just ToMarkdown } - , Input.button [ alignRight, htmlAttribute <| Html.Attributes.title "Clear result" ] + , Input.button + [ alignRight + , title + { en = "Clear result" + , it = "Pulisci risultato" + } + ] { label = Element.element <| Icons.stopOutlined Theme.darkIconAttrs , onPress = Just Clear } ] label = - text <| "In [" ++ String.fromInt index ++ "]" + text <| invariant <| "In [" ++ String.fromInt index ++ "]" in - Element.with .deviceClass <| - \deviceClass -> - case deviceClass of - Phone -> - Theme.column [ width fill ] - [ Theme.row [ width fill ] - (label :: buttons) - , inputBox (size.width - 2 * Theme.spacing) input - ] + Element.with .deviceClass <| \deviceClass -> + case deviceClass of + Phone -> + Theme.column [ width fill ] + [ Theme.row [ width fill ] + (label :: buttons) + , inputBox (size.width - 2 * Theme.rythm) input + ] - _ -> - Theme.row [ width fill ] - (label :: inputBox (size.width - 180) input :: buttons) + _ -> + Theme.row [ width fill ] + (label :: inputBox (size.width - 180) input :: buttons) statusLine : Int -> Output -> Element msg @@ -244,7 +305,7 @@ statusLine pageWidth output = Parsed e -> if False then Theme.column [ alignTop, width <| Element.maximum 200 fill ] - [ text "Interpreted as: " + [ text { en = "Interpreted as: ", it = "Interpretato come: " } , viewExpression pageWidth e ] @@ -252,21 +313,26 @@ statusLine pageWidth output = none -viewError : String -> Element msg +viewError : L10N String -> Element msg viewError e = let + tuples = + List.map2 (\en it -> { en = en, it = it }) + (String.split "\n" e.en) + (String.split "\n" e.it) + viewErrorLine l = Element.paragraph [ htmlAttribute <| Html.Attributes.class "pre" ] [ text l ] in - e - |> String.split "\n" + tuples |> List.map viewErrorLine |> Element.textColumn [ alignTop , Font.family [ Font.monospace ] , Font.color Theme.colors.errorMessage + , width fill ] @@ -279,16 +345,21 @@ viewSolutionTree : Int -> SolutionTree -> List (Element msg) viewSolutionTree pageWidth tree = case tree of SolutionStep e c -> - -- Theme.row [] [ + --Theme.row [] [ viewLaTeX pageWidth (Expression.toTeXString e) - --, Expression.toDebugTree Debug.todo e ] + --, Expression.toDebugTree Debug.todo e + --] :: viewSolutionTree pageWidth c SolutionForall v -> [ viewLaTeX pageWidth <| "\\forall " ++ v ++ " \\in \\mathbb{R}" ] SolutionError e -> - [ text <| "Error: " ++ e ] + [ text + { en = "Error: " ++ e.en + , it = "Errore: " ++ e.it + } + ] SolutionNone v -> [ viewLaTeX pageWidth <| "\\not \\exists " ++ v ++ " \\in \\mathbb{R}" ] @@ -301,16 +372,25 @@ viewSolutionTree pageWidth tree = br = el [ width <| px 1, height fill, Border.width 1 ] none in - [ Element.row [ spacing Theme.spacing ] <| List.intersperse br <| List.map (\c -> Element.column [ spacing Theme.spacing, alignTop ] <| viewSolutionTree pageWidth c) children ] + [ row [ Theme.spacing ] <| + List.intersperse br <| + List.map + (\c -> + Element.column + [ Theme.spacing, alignTop ] + (viewSolutionTree pageWidth c) + ) + children + ] viewLaTeX : Int -> String -> Element msg viewLaTeX pageWidth tex = el [ height shrink, width shrink ] <| Element.html <| - Html.node "math-jax" + Html.node "ka-tex" [ Html.Attributes.attribute "tex-src" tex - , Html.Attributes.attribute "container-width" <| String.fromInt <| pageWidth - 4 * Theme.spacing + , Html.Attributes.attribute "container-width" <| String.fromInt <| pageWidth - 2 * Theme.rythm ] [] @@ -336,7 +416,7 @@ simplyBracketed lw lr rw rr blocks = bracket we re = el [ width <| px Theme.bracketWidth - , Element.height fill + , height fill , Border.widthEach we , Border.roundEach re ] @@ -356,7 +436,7 @@ bracketed l r blocks = outputBlock : String -> { height : Int, width : Int } -> Output -> Element CellMsg -outputBlock blockId ({ width } as size) output = +outputBlock blockId size output = let showExpr : Expression -> ( Element CellMsg, Bool ) showExpr e = @@ -367,7 +447,8 @@ outputBlock blockId ({ width } as size) output = (\vv -> --Theme.row [] [ vv - --, Expression.toDebugTree Debug.todo e ] + --, Expression.toDebugTree Debug.todo e + --] ) asExpression v = @@ -397,21 +478,29 @@ outputBlock blockId ({ width } as size) output = viewValue id coeffs v = case asExpression v of Just ex -> - ( viewExpression width ex, False ) + ( viewExpression size.width ex, False ) Nothing -> case v of SymbolicValue s -> - ( viewExpression width s, False ) + ( viewExpression size.width s, False ) SolutionTreeValue t -> - ( Element.column [ spacing Theme.spacing ] <| viewSolutionTree (width - 2 * Theme.spacing) t, False ) + ( Element.column + [ Theme.spacing + , Element.scrollbarX + , width <| Element.maximum (size.width - 2 * Theme.rythm) fill + ] + <| + viewSolutionTree (size.width - 2 * Theme.rythm) t + , False + ) GraphValue g -> ( draw size (CanvasId id) coeffs g, True ) ComplexValue c -> - ( text <| Complex.toString c, False ) + ( text <| invariant <| Complex.toString c, False ) ErrorValue err -> ( viewError err, False ) @@ -419,10 +508,15 @@ outputBlock blockId ({ width } as size) output = LambdaValue x f -> case asExpression f of Just e -> - ( viewExpression width <| Lambda x e, False ) + ( viewExpression size.width <| Lambda x e, False ) Nothing -> - ( Element.row [] [ text <| x ++ " => ", Tuple.first (viewValue id coeffs f) ], False ) + ( row [] + [ text <| invariant <| x ++ " => " + , Tuple.first (viewValue id coeffs f) + ] + , False + ) ListValue ls -> let @@ -478,6 +572,6 @@ outputBlock blockId ({ width } as size) output = centerX else - Element.width fill + width fill ] child diff --git a/src/elm/UI/Theme.elm b/src/elm/UI/Theme.elm index ba5aeffc..3853fd0d 100644 --- a/src/elm/UI/Theme.elm +++ b/src/elm/UI/Theme.elm @@ -1,8 +1,8 @@ -module UI.Theme exposing (bracketBorderWidth, bracketWidth, colors, column, darkIconAttrs, darken, fontSize, grid, hr, iconSize, lightIconAttrs, onCtrlEnter, onEnter, onKey, roundness, row, smallDarkIconAttrs, spacing, whiteLines, wrappedRow) +module UI.Theme exposing (Attribute, Element, bracketBorderWidth, bracketWidth, colors, column, darkIconAttrs, darken, fontSize, grid, hr, iconSize, lightIconAttrs, onCtrlEnter, onEnter, onKey, padding, roundness, row, rythm, smallDarkIconAttrs, spacing, whiteLines, wrappedRow) import Ant.Icon import Color -import Element.WithContext as Element exposing (Attribute, Color, Element, el, fill, none, rgb, rgb255, rgba, shrink, width) +import Element.WithContext as Element exposing (Color, el, fill, none, rgb, rgb255, rgba, shrink, width) import Element.WithContext.Border as Border import Html.Events import Json.Decode as Decode @@ -59,8 +59,18 @@ fontSize = 20 -spacing : number +spacing : Attribute msg spacing = + Element.spacing rythm + + +padding : Attribute msg +padding = + Element.padding rythm + + +rythm : number +rythm = 10 @@ -127,17 +137,17 @@ mapHsl f = row : List (Attribute msg) -> List (Element msg) -> Element msg row attrs = - Element.row (Element.spacing spacing :: attrs) + Element.row (spacing :: attrs) wrappedRow : List (Attribute msg) -> List (Element msg) -> Element msg wrappedRow attrs = - Element.wrappedRow (Element.spacing spacing :: attrs) + Element.wrappedRow (spacing :: attrs) column : List (Attribute msg) -> List (Element msg) -> Element msg column attrs = - Element.column (Element.spacing spacing :: attrs) + Element.column (spacing :: attrs) grid : List (Attribute msg) -> List (List (Element msg)) -> Element msg @@ -156,7 +166,7 @@ grid attrs rows = |> List.drop i |> List.head |> Maybe.withDefault none - |> Element.el [ Element.alignBottom ] + |> el [ Element.alignBottom ] } w = @@ -164,7 +174,7 @@ grid attrs rows = |> List.maximum |> Maybe.withDefault 0 in - Element.table (Element.spacing spacing :: attrs) + Element.table (spacing :: attrs) { columns = List.map toColumn <| List.range 0 (w - 1) , data = rows } @@ -229,4 +239,4 @@ hr = , bottom = 0 } ] - Element.none + none diff --git a/src/index.html b/src/index.html deleted file mode 100644 index 2f7f4855..00000000 --- a/src/index.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - nuPlot - - - - - - - - - - - - -
- - - - - \ No newline at end of file diff --git a/src/elm/UI.elm.d.ts b/src/js/UI.elm.d.ts similarity index 74% rename from src/elm/UI.elm.d.ts rename to src/js/UI.elm.d.ts index 9e9dbe51..03645017 100644 --- a/src/elm/UI.elm.d.ts +++ b/src/js/UI.elm.d.ts @@ -7,6 +7,7 @@ export type ElmType = { flags: { saved: { [key: string]: string }; hasClipboard: boolean; + hasFullscreen: boolean; languages: readonly string[]; rootUrl: string; googleAccessToken: string; @@ -28,6 +29,15 @@ export type UIInstance = { copy: { subscribe(callback: (id: string) => void): void; }; + fullscreen: { + subscribe(callback: (id: string) => void): void; + }; + exitFullscreen: { + subscribe(callback: (id: string) => void): void; + }; + resetZoom: { + subscribe(callback: (id: string) => void): void; + }; saveGoogleAccessToken: { subscribe(callback: (token: string) => void): void; }; @@ -40,5 +50,8 @@ export type UIInstance = { gotGoogleAccessToken: { send(token: string): void; }; + isFullscreen: { + send(isFullscreen: boolean): void; + }; }; }; diff --git a/src/js/index.js b/src/js/index.js new file mode 100644 index 00000000..7149938b --- /dev/null +++ b/src/js/index.js @@ -0,0 +1,106 @@ +import { NuPlot } from "./nuplot.js"; +import { KaTeXElement } from "./katex.js"; + +// declare class ClipboardItem { +// constructor(data: { [mimeType: string]: Blob }); +// } + +customElements.define("nu-plot", NuPlot); +customElements.define("ka-tex", KaTeXElement); + +const storageKey = "documents"; + +function fromLS() { + /** @type {{ [key: string]: string }} */ + const saved = {}; + for (let i = 0; i < localStorage.length; i++) { + const key = localStorage.key(i); + if (key === null) continue; + const value = localStorage.getItem(key); + if (value === null) continue; + saved[key] = value; + } + return saved; +} + +export async function init() { + /** @type {{ [key: string]: string }} */ + let saved; + try { + saved = await window.localForage.getItem(storageKey); + } catch { + saved = fromLS(); + } + + const node = document.querySelector("main"); + if (node == null) { + document.write( + "Error initializing application. This might be caused by a browser extension." + ); + return; + } + + /** + * @type {import('./UI.elm.d.ts').ElmType} + */ + // @ts-ignore + const Elm = window.Elm; + const app = Elm.UI.init({ + node: node, + flags: { + saved: saved, + hasClipboard: typeof ClipboardItem !== "undefined", + hasFullscreen: "onfullscreenchange" in node, + languages: "languages" in navigator ? navigator.languages : [], + rootUrl: window.location.toString(), + googleAccessToken: localStorage.getItem("googleAccessToken") ?? "", + }, + }); + window.addEventListener("storage", (e) => { + if (e.key == "googleAccessToken") + app.ports.gotGoogleAccessToken.send(e.newValue ?? ""); + }); + app.ports.persist.subscribe((value) => { + window.localForage.setItem(storageKey, value); + }); + app.ports.save.subscribe((id) => { + /** @type {NuPlot | null} */ + const element = document.getElementById(id); + element?.save(); + }); + app.ports.fullscreen.subscribe((id) => { + const element = document.getElementById(id)?.parentElement; + element?.requestFullscreen(); + }); + app.ports.exitFullscreen.subscribe((id) => document.exitFullscreen()); + if ("onfullscreenchange" in document) + document.addEventListener("fullscreenchange", (e) => + app.ports.isFullscreen.send(document.fullscreenElement !== null) + ); + app.ports.resetZoom.subscribe((id) => { + /** @type {NuPlot | null} */ + const element = document.getElementById(id); + element?.resetZoom(true); + }); + app.ports.copy.subscribe((id) => { + /** @type {NuPlot | null} */ + const element = document.getElementById(id); + element?.copy(); + }); + app.ports.saveGoogleAccessToken.subscribe(async (token) => { + await window.localForage.setItem("googleAccessToken", token); + }); + app.ports.saveGoogleAccessTokenAndCloseWindow.subscribe(async (token) => { + await window.localForage.setItem("googleAccessToken", token); + window.close(); + }); + app.ports.openWindow.subscribe((url) => { + window.open( + url, + "popup", + "menubar=no,status=no,toolbar=no,width=400,height=400" + ); + }); +} + +init(); diff --git a/src/js/katex.js b/src/js/katex.js new file mode 100644 index 00000000..3a851846 --- /dev/null +++ b/src/js/katex.js @@ -0,0 +1,92 @@ +// declare global { +// interface Window { +// katex: { +// render(tex: string, node: HTMLElement): void; +// }; +// } +// } + +// export type Options = { +// display: boolean, +// scale: number, +// lineWidth: number, +// containerWidth: number, +// }; + +export class KaTeXElement extends HTMLElement { + constructor() { + super(); + + this.src = ""; + + // Create a shadow root + const shadowRoow = this.attachShadow({ mode: "open" }); // sets and returns 'this.shadowRoot' + + this.wrapper = document.createElement("div"); + this.wrapper.style.overflowX = "auto"; + this.wrapper.style.overflowY = "hidden"; + + let link = document.createElement("link"); + link.rel = "stylesheet"; + link.href = + "https://cdn.jsdelivr.net/npm/katex@0.12.0/dist/katex.min.css"; + link.integrity = + "sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X"; + link.crossOrigin = "anonymous"; + + let style = document.createElement("style"); + style.innerHTML = ".katex { padding: 0.5em }"; + + // attach the created elements to the shadow DOM + shadowRoow.append(this.wrapper); + + shadowRoow.append(link); + shadowRoow.append(style); + } + + /** + * + * @param {string} name + * @param {string} _oldValue + * @param {string} newValue + * @returns + */ + attributeChangedCallback(name, _oldValue, newValue) { + switch (name) { + case "tex-src": + if (!newValue) return; + this.src = newValue || ""; + this.render(); + break; + case "container-width": + if (!newValue) return; + this.wrapper.style.maxWidth = newValue + "px"; + break; + } + } + + render() { + if (this.src == "") return; + this.wrapper.innerHTML = "Rendering..."; + if (!window.katex) { + debugger; + requestAnimationFrame(this.render.bind(this)); + return; + } + requestAnimationFrame(() => { + try { + window.katex.render(this.src, this.wrapper); + } catch (err) { + this.wrapper.innerHTML = ""; + const errorNode = document.createElement("pre"); + errorNode.appendChild(document.createTextNode(err.message)); + errorNode.style.whiteSpace = "pre-wrap"; + this.wrapper.appendChild(errorNode); + } + }); + } + + static get observedAttributes() { + return ["tex-src", "container-width"]; + } +} diff --git a/src/js/localforage.min.js b/src/js/localforage.min.js new file mode 100644 index 00000000..7403f8f0 --- /dev/null +++ b/src/js/localforage.min.js @@ -0,0 +1,7 @@ +/*! + localForage -- Offline Storage, Improved + Version 1.10.0 + https://localforage.github.io/localForage + (c) 2013-2017 Mozilla, Apache License 2.0 +*/ +!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.localforage=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c||a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g=43)}}).catch(function(){return!1})}function n(a){return"boolean"==typeof xa?va.resolve(xa):m(a).then(function(a){return xa=a})}function o(a){var b=ya[a.name],c={};c.promise=new va(function(a,b){c.resolve=a,c.reject=b}),b.deferredOperations.push(c),b.dbReady?b.dbReady=b.dbReady.then(function(){return c.promise}):b.dbReady=c.promise}function p(a){var b=ya[a.name],c=b.deferredOperations.pop();if(c)return c.resolve(),c.promise}function q(a,b){var c=ya[a.name],d=c.deferredOperations.pop();if(d)return d.reject(b),d.promise}function r(a,b){return new va(function(c,d){if(ya[a.name]=ya[a.name]||B(),a.db){if(!b)return c(a.db);o(a),a.db.close()}var e=[a.name];b&&e.push(a.version);var f=ua.open.apply(ua,e);b&&(f.onupgradeneeded=function(b){var c=f.result;try{c.createObjectStore(a.storeName),b.oldVersion<=1&&c.createObjectStore(wa)}catch(c){if("ConstraintError"!==c.name)throw c;console.warn('The database "'+a.name+'" has been upgraded from version '+b.oldVersion+" to version "+b.newVersion+', but the storage "'+a.storeName+'" already exists.')}}),f.onerror=function(a){a.preventDefault(),d(f.error)},f.onsuccess=function(){var b=f.result;b.onversionchange=function(a){a.target.close()},c(b),p(a)}})}function s(a){return r(a,!1)}function t(a){return r(a,!0)}function u(a,b){if(!a.db)return!0;var c=!a.db.objectStoreNames.contains(a.storeName),d=a.versiona.db.version;if(d&&(a.version!==b&&console.warn('The database "'+a.name+"\" can't be downgraded from version "+a.db.version+" to version "+a.version+"."),a.version=a.db.version),e||c){if(c){var f=a.db.version+1;f>a.version&&(a.version=f)}return!0}return!1}function v(a){return new va(function(b,c){var d=new FileReader;d.onerror=c,d.onloadend=function(c){var d=btoa(c.target.result||"");b({__local_forage_encoded_blob:!0,data:d,type:a.type})},d.readAsBinaryString(a)})}function w(a){return g([l(atob(a.data))],{type:a.type})}function x(a){return a&&a.__local_forage_encoded_blob}function y(a){var b=this,c=b._initReady().then(function(){var a=ya[b._dbInfo.name];if(a&&a.dbReady)return a.dbReady});return i(c,a,a),c}function z(a){o(a);for(var b=ya[a.name],c=b.forages,d=0;d0&&(!a.db||"InvalidStateError"===e.name||"NotFoundError"===e.name))return va.resolve().then(function(){if(!a.db||"NotFoundError"===e.name&&!a.db.objectStoreNames.contains(a.storeName)&&a.version<=a.db.version)return a.db&&(a.version=a.db.version+1),t(a)}).then(function(){return z(a).then(function(){A(a,b,c,d-1)})}).catch(c);c(e)}}function B(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function C(a){function b(){return va.resolve()}var c=this,d={db:null};if(a)for(var e in a)d[e]=a[e];var f=ya[d.name];f||(f=B(),ya[d.name]=f),f.forages.push(c),c._initReady||(c._initReady=c.ready,c.ready=y);for(var g=[],h=0;h>4,k[i++]=(15&d)<<4|e>>2,k[i++]=(3&e)<<6|63&f;return j}function O(a){var b,c=new Uint8Array(a),d="";for(b=0;b>2],d+=Da[(3&c[b])<<4|c[b+1]>>4],d+=Da[(15&c[b+1])<<2|c[b+2]>>6],d+=Da[63&c[b+2]];return c.length%3==2?d=d.substring(0,d.length-1)+"=":c.length%3==1&&(d=d.substring(0,d.length-2)+"=="),d}function P(a,b){var c="";if(a&&(c=Ua.call(a)),a&&("[object ArrayBuffer]"===c||a.buffer&&"[object ArrayBuffer]"===Ua.call(a.buffer))){var d,e=Ga;a instanceof ArrayBuffer?(d=a,e+=Ia):(d=a.buffer,"[object Int8Array]"===c?e+=Ka:"[object Uint8Array]"===c?e+=La:"[object Uint8ClampedArray]"===c?e+=Ma:"[object Int16Array]"===c?e+=Na:"[object Uint16Array]"===c?e+=Pa:"[object Int32Array]"===c?e+=Oa:"[object Uint32Array]"===c?e+=Qa:"[object Float32Array]"===c?e+=Ra:"[object Float64Array]"===c?e+=Sa:b(new Error("Failed to get type for BinaryArray"))),b(e+O(d))}else if("[object Blob]"===c){var f=new FileReader;f.onload=function(){var c=Ea+a.type+"~"+O(this.result);b(Ga+Ja+c)},f.readAsArrayBuffer(a)}else try{b(JSON.stringify(a))}catch(c){console.error("Couldn't convert value into a JSON string: ",a),b(null,c)}}function Q(a){if(a.substring(0,Ha)!==Ga)return JSON.parse(a);var b,c=a.substring(Ta),d=a.substring(Ha,Ta);if(d===Ja&&Fa.test(c)){var e=c.match(Fa);b=e[1],c=c.substring(e[0].length)}var f=N(c);switch(d){case Ia:return f;case Ja:return g([f],{type:b});case Ka:return new Int8Array(f);case La:return new Uint8Array(f);case Ma:return new Uint8ClampedArray(f);case Na:return new Int16Array(f);case Pa:return new Uint16Array(f);case Oa:return new Int32Array(f);case Qa:return new Uint32Array(f);case Ra:return new Float32Array(f);case Sa:return new Float64Array(f);default:throw new Error("Unkown type: "+d)}}function R(a,b,c,d){a.executeSql("CREATE TABLE IF NOT EXISTS "+b.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],c,d)}function S(a){var b=this,c={db:null};if(a)for(var d in a)c[d]="string"!=typeof a[d]?a[d].toString():a[d];var e=new va(function(a,d){try{c.db=openDatabase(c.name,String(c.version),c.description,c.size)}catch(a){return d(a)}c.db.transaction(function(e){R(e,c,function(){b._dbInfo=c,a()},function(a,b){d(b)})},d)});return c.serializer=Va,e}function T(a,b,c,d,e,f){a.executeSql(c,d,e,function(a,g){g.code===g.SYNTAX_ERR?a.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[b.storeName],function(a,h){h.rows.length?f(a,g):R(a,b,function(){a.executeSql(c,d,e,f)},f)},f):f(a,g)},f)}function U(a,b){var c=this;a=j(a);var d=new va(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){T(c,e,"SELECT * FROM "+e.storeName+" WHERE key = ? LIMIT 1",[a],function(a,c){var d=c.rows.length?c.rows.item(0).value:null;d&&(d=e.serializer.deserialize(d)),b(d)},function(a,b){d(b)})})}).catch(d)});return h(d,b),d}function V(a,b){var c=this,d=new va(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){T(c,e,"SELECT * FROM "+e.storeName,[],function(c,d){for(var f=d.rows,g=f.length,h=0;h0)return void f(W.apply(e,[a,h,c,d-1]));g(b)}})})}).catch(g)});return h(f,c),f}function X(a,b,c){return W.apply(this,[a,b,c,1])}function Y(a,b){var c=this;a=j(a);var d=new va(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){T(c,e,"DELETE FROM "+e.storeName+" WHERE key = ?",[a],function(){b()},function(a,b){d(b)})})}).catch(d)});return h(d,b),d}function Z(a){var b=this,c=new va(function(a,c){b.ready().then(function(){var d=b._dbInfo;d.db.transaction(function(b){T(b,d,"DELETE FROM "+d.storeName,[],function(){a()},function(a,b){c(b)})})}).catch(c)});return h(c,a),c}function $(a){var b=this,c=new va(function(a,c){b.ready().then(function(){var d=b._dbInfo;d.db.transaction(function(b){T(b,d,"SELECT COUNT(key) as c FROM "+d.storeName,[],function(b,c){var d=c.rows.item(0).c;a(d)},function(a,b){c(b)})})}).catch(c)});return h(c,a),c}function _(a,b){var c=this,d=new va(function(b,d){c.ready().then(function(){var e=c._dbInfo;e.db.transaction(function(c){T(c,e,"SELECT key FROM "+e.storeName+" WHERE id = ? LIMIT 1",[a+1],function(a,c){var d=c.rows.length?c.rows.item(0).key:null;b(d)},function(a,b){d(b)})})}).catch(d)});return h(d,b),d}function aa(a){var b=this,c=new va(function(a,c){b.ready().then(function(){var d=b._dbInfo;d.db.transaction(function(b){T(b,d,"SELECT key FROM "+d.storeName,[],function(b,c){for(var d=[],e=0;e '__WebKitDatabaseInfoTable__'",[],function(c,d){for(var e=[],f=0;f0}function ha(a){var b=this,c={};if(a)for(var d in a)c[d]=a[d];return c.keyPrefix=ea(a,b._defaultConfig),ga()?(b._dbInfo=c,c.serializer=Va,va.resolve()):va.reject()}function ia(a){var b=this,c=b.ready().then(function(){for(var a=b._dbInfo.keyPrefix,c=localStorage.length-1;c>=0;c--){var d=localStorage.key(c);0===d.indexOf(a)&&localStorage.removeItem(d)}});return h(c,a),c}function ja(a,b){var c=this;a=j(a);var d=c.ready().then(function(){var b=c._dbInfo,d=localStorage.getItem(b.keyPrefix+a);return d&&(d=b.serializer.deserialize(d)),d});return h(d,b),d}function ka(a,b){var c=this,d=c.ready().then(function(){for(var b=c._dbInfo,d=b.keyPrefix,e=d.length,f=localStorage.length,g=1,h=0;h=0;b--){var c=localStorage.key(b);0===c.indexOf(a)&&localStorage.removeItem(c)}}):va.reject("Invalid arguments"),h(d,b),d}function ra(a,b){a[b]=function(){var c=arguments;return a.ready().then(function(){return a[b].apply(a,c)})}}function sa(){for(var a=1;a { + const name = window.prompt("Exported image name:", "export.png"); + if (!name) return; + + const dataUrl = this.canvas.toDataURL(); + const downloadElement = document.createElement("a"); + downloadElement.setAttribute("href", dataUrl); + downloadElement.setAttribute("download", name); + downloadElement.click(); + }); + } + + copy() { + this.withFilledCanvas(false, () => + this.canvas.toBlob((blob) => { + if (blob != null) + navigator.clipboard.write([ + new ClipboardItem({ "image/png": blob }), + ]); + }) + ); + } + + /** + * @param {boolean} changeSize + * @param {() => void} callback + */ + withFilledCanvas(changeSize, callback) { + let oldWidth = 0; + let oldHeight = 0; + + if (changeSize) { + const widthString = window.prompt("Exported image width:", "1920"); + + if (!widthString) return; + const heightString = window.prompt( + "Exported image height:", + "1080" + ); + + if (!heightString) return; + + oldWidth = this.canvas.width; + oldHeight = this.canvas.height; + this.canvas.width = +(widthString || 1920); + this.canvas.height = +(heightString || 1080); + } + + const oldIterations = this.currIterations; + this.currIterations = this.maxIterations; + + this.reloadFragmentShader(); + this.render(); + callback(); + + if (changeSize) { + this.canvas.width = oldWidth; + this.canvas.height = oldHeight; + + this.render(); + } + + this.currIterations = oldIterations; + this.reloadFragmentShader(); + } + + /** + * @param {boolean} reRender + */ + resetZoom(reRender) { + this.center = this.originalCenter = { x: 0, y: 0 }; + this.viewportWidth = this.originalViewportWidth = 2 * Math.PI; + this.phi = this.originalPhi = 0; + this.theta = this.originalTheta = 0; + if (reRender) this.renderOnAnimationFrame(true); + } + + #initCanvas() { + this.setSize(400, 400); + + this.gl = this.canvas.getContext("webgl2"); + this.hasWebGl2 = this.gl !== null; + if (!this.gl) this.gl = this.canvas.getContext("webgl"); + + if (this.gl == null) return; + + const vertex_shader = `precision highp float; + attribute vec2 a_Position; + void main() { + gl_Position = vec4(a_Position, 0.0, 1.0); + }`; + + this.program = this.gl.createProgram(); + + if (this.program == null) { + console.error("invalid program"); + return; + } + + if (!this.compileAndAttachShader(this.gl.VERTEX_SHADER, vertex_shader)) + return; + + const fragment_shader = this.#buildFragmentShader(this.src); + this.fragment_shader = this.compileAndAttachShader( + this.gl.FRAGMENT_SHADER, + fragment_shader + ); + if (!this.fragment_shader) return; + + this.gl.linkProgram(this.program); + this.gl.useProgram(this.program); + + /* create a vertex buffer for a full-screen triangle */ + const vertex_buf = this.gl.createBuffer(); + this.gl.bindBuffer(this.gl.ARRAY_BUFFER, vertex_buf); + this.gl.bufferData( + this.gl.ARRAY_BUFFER, + new Float32Array([-1, -1, 3, -1, -1, 3]), + this.gl.STATIC_DRAW + ); + + /* set up the position attribute */ + const position_attrib_location = this.gl.getAttribLocation( + this.program, + "a_Position" + ); + this.gl.enableVertexAttribArray(position_attrib_location); + this.gl.vertexAttribPointer( + position_attrib_location, + 2, + this.gl.FLOAT, + false, + 0, + 0 + ); + + /* input handling */ + this.canvas.onpointerdown = (e) => this.canvasOnPointerDown(e); + this.canvas.oncontextmenu = () => false; + this.canvas.onpointerup = (e) => this.canvasOnPointerUp(e); + this.canvas.onpointercancel = (e) => this.canvasOnPointerUp(e); + this.canvas.onpointermove = (e) => this.canvasOnPointerMove(e); + this.canvas.onwheel = (e) => this.canvasOnWheel(e); + this.canvas.ondblclick = () => this.resetZoom(false); + this.canvas.addEventListener( + "webglcontextlost", + (e) => { + if (this.pendingRequestAnimationFrame >= 0) + cancelAnimationFrame(this.pendingRequestAnimationFrame); + if (this.pendingTimeout >= 0) clearTimeout(this.pendingTimeout); + this.wrapper.removeChild(this.canvas); + + console.error("webglcontextlost", e); + this.label.innerHTML = + "Something went wrong with the graphics.
Try reloading the page"; + }, + false + ); + if ("onfullscreenchange" in document) + document.addEventListener("fullscreenchange", (e) => { + this.isFullscreen = + document.fullscreenElement?.id === this.id + "-parent"; + if (this.isFullscreen) { + this.preFullscreenWidth = this.canvas.clientWidth; + this.preFullscreenHeight = this.canvas.clientHeight; + this.setWidth(window.innerWidth); + this.setHeight(window.innerHeight); + } else { + this.setWidth(this.preFullscreenWidth); + this.setHeight(this.preFullscreenHeight); + } + this.renderOnAnimationFrame(); + }); + this.canvas.style.touchAction = "none"; + // Sync with Theme.elm + this.canvas.style.borderRadius = "3px"; + + /* display initial frame */ + this.renderOnAnimationFrame(); + } + + /** + * @param {number} width + * @param {number} height + */ + setSize(width, height) { + this.setWidth(width); + this.setHeight(height); + } + + /** + * @param {number} width + */ + setWidth(width) { + this.canvas.width = Math.round(width * (window.devicePixelRatio || 1)); + this.canvas.style.width = width + "px"; + this.reloadFragmentShader(); + } + + /** + * @param {number} height + */ + setHeight(height) { + this.canvas.height = Math.round( + height * (window.devicePixelRatio || 1) + ); + this.canvas.style.height = height + "px"; + this.reloadFragmentShader(); + } + + /** + * @param {string} expr + */ + #buildFragmentShader(expr) { + return `${declarations}\n${expr}`; + } + + /** + * @param {number} type + * @param {string} src + * @returns {WebGLShader | null} + */ + compileAndAttachShader(type, src) { + if (!this.gl || !this.program) return null; + const shader = this.gl.createShader(type); + + if (shader == null) { + console.error("invalid shader"); + return null; + } + + if (!this.sourceAndCompile(shader, src)) return null; + + this.gl.attachShader(this.program, shader); + + return shader; + } + + /** + * @param {number} x + * @param {number} y + * @returns {Point} + */ + fromScreen(x, y) { + return { + x: NuPlot.project( + x, + 0, + this.canvas.width, + this.minx(), + this.maxx() + ), + y: NuPlot.project( + y, + 0, + this.canvas.height, + this.miny(), + this.maxy() + ), + }; + } + + /** + * @returns number + */ + minx() { + return this.center.x - this.viewportWidth / 2.0; + } + + /** + * @returns number + */ + maxx() { + return this.center.x + this.viewportWidth / 2.0; + } + + /** + * @returns number + */ + miny() { + return this.center.y - this.viewportHeight / 2.0; + } + + /** + * @returns number + */ + maxy() { + return this.center.y - this.viewportHeight / 2.0; + } + + get viewportHeight() { + return (this.viewportWidth / this.canvas.width) * this.canvas.height; + } + + /** + * @param {number} x + * @param {number} froml + * @param {number} fromu + * @param {number} tol + * @param {number} tou + * @returns number + */ + static project(x, froml, fromu, tol, tou) { + return ((x - froml) / (fromu - froml)) * (tou - tol) + tol; + } + + /** + * @param {WheelEvent} e + * @returns boolean + */ + canvasOnWheel(e) { + // newCenter.x == oldCenter.x + oldWidth * (1 - k) * (e.x / canW - 1 / 2) + // newMiny - oldMiny == (e.y / canH) * (oldHeight * (1 - k)) + // (e.y / canH) * (k * oldHeight) + newMiny == (e.y / canH) * oldHeight + oldMiny + + const k = 1 + Math.sign(e.deltaY) * 0.06; + + this.center = { + x: + this.center.x + + this.viewportWidth * + (1 - k) * + (e.offsetX / this.canvas.width - 0.5), + y: + this.center.y + + this.viewportHeight * + (1 - k) * + (0.5 - e.offsetY / this.canvas.height), + }; + + this.viewportWidth *= k; + this.renderOnAnimationFrame(true); + // Intercept it + return false; + } + + /** + * @param {PointerEvent} e + */ + canvasOnPointerDown(e) { + this.#resetOriginal(); + + if (e.buttons == 4) { + // central wheel + this.resetZoom(true); + } else { + this.canvas.setPointerCapture(e.pointerId); + this.pointers[e.pointerId] = this.originalPointers[e.pointerId] = { + x: e.offsetX, + y: e.offsetY, + }; + this.renderOnAnimationFrame(true); + } + return true; + } + + /** + * @param {PointerEvent} e + */ + canvasOnPointerMove(e) { + if (!(e.pointerId in this.originalPointers)) + // Central mouse button + return; + + const original = this.originalPointers[e.pointerId]; + const pointer = { x: e.offsetX, y: e.offsetY }; + this.pointers[e.pointerId] = pointer; + + switch (Object.keys(this.originalPointers).length) { + case 1: + let dx = (pointer.x - original.x) / this.canvas.width; + const dy = (pointer.y - original.y) / this.canvas.height; + if (this.is3D) { + this.theta = this.originalTheta + dy * 3; + this.phi = this.originalPhi + dx * 3; + } else { + dx *= -1; + const x = this.originalCenter.x + dx * this.viewportWidth; + const y = this.originalCenter.y + dy * this.viewportHeight; + this.center = { x: x, y: y }; + break; + } + + case 2: + const otherId = +Object.keys(this.pointers).filter( + (k) => +k != e.pointerId + )[0]; + if ( + !(otherId in this.originalPointers) || + !(otherId in this.pointers) + ) { + delete this.pointers[otherId]; + // Something gone wrong. It's ok. + return; + } + const otherOriginal = this.originalPointers[otherId]; + const other = this.pointers[otherId]; + this.viewportWidth = + (this.originalViewportWidth / + NuPlot.distance(pointer, other)) * + NuPlot.distance(original, otherOriginal); + + break; + + case 0: + default: + break; + } + this.renderOnAnimationFrame(true); + } + + /** + * @param {Point} l + * @param {Point} r + * @returns {number} + */ + static distance(l, r) { + const dx = l.x - r.x; + const dy = l.y - r.y; + return Math.sqrt(dx * dx + dy * dy); + } + + /** + * @param {PointerEvent} e + */ + canvasOnPointerUp(e) { + delete this.pointers[e.pointerId]; + this.#resetOriginal(); + } + + #resetOriginal() { + this.originalPhi = this.phi; + this.originalTheta = this.theta; + this.originalViewportWidth = this.viewportWidth; + this.originalCenter = Object.assign({}, this.center); + this.originalPointers = Object.assign({}, this.pointers); + } + + /** + * @param {number} delay + + */ + renderWithDelay(delay) { + if (this.pendingRequestAnimationFrame >= 0 || this.pendingTimeout >= 0) + return; + this.pendingTimeout = window.setTimeout(() => { + this.pendingTimeout = -1; + this.pendingRequestAnimationFrame = window.requestAnimationFrame( + this.maybeRender.bind(this) + ); + }, delay); + } + + /** + * @param {boolean} rightNow + */ + renderOnAnimationFrame(rightNow = false) { + if (this.pendingRequestAnimationFrame >= 0) return; + if (this.pendingTimeout >= 0) + if (rightNow) { + window.clearTimeout(this.pendingTimeout); + this.pendingTimeout = -1; + } else { + return; + } + this.pendingRequestAnimationFrame = window.requestAnimationFrame( + this.maybeRender.bind(this) + ); + } + + maybeRender() { + this.pendingRequestAnimationFrame = -1; + + if (this.gl == null || this.program == null) return; + + if (this.#hasPointersDown()) { + if (this.currIterations == this.minIterations) { + this.render(); + } else { + this.currIterations = this.minIterations; + this.reloadFragmentShader(); + } + this.renderOnAnimationFrame(); + this.hadPointersDown = true; + } else if (this.currIterations < this.maxIterations) { + this.render(); + if (!this.hadPointersDown) { + this.currIterations = this.maxIterations; + this.reloadFragmentShader(); + } + this.renderWithDelay( + this.currIterations == this.minIterations ? 300 : 100 + ); + this.hadPointersDown = false; + } else if (this.currIterations >= this.maxIterations) { + this.render(); + this.currIterations = this.minIterations; + this.reloadFragmentShader(); + this.hadPointersDown = false; + } else { + this.render(); + this.hadPointersDown = false; + } + } + + #hasPointersDown() { + return Object.keys(this.originalPointers).length > 0; + } + + render() { + if (this.gl == null || this.program == null) return; + + this.gl.viewport(0, 0, this.canvas.width, this.canvas.height); + + /* bind inputs & render frame */ + this.#uniform1f("u_whiteLines", this.whiteLines); + this.#uniform1f("u_completelyReal", this.completelyReal); + this.#uniform1f("u_drawAxes", this.drawAxes); + this.#uniform1f("u_viewportWidth", this.viewportWidth); + this.#uniform1f("u_canvasWidth", this.canvas.width); + this.#uniform1f("u_canvasHeight", this.canvas.height); + this.#uniform2f("u_zoomCenter", this.center.x, this.center.y); + this.#uniform1f("u_phi", this.phi); + this.#uniform1f("u_theta", this.theta); + + this.gl.clearColor(0.0, 0.0, 0.0, 1.0); + this.gl.clear(this.gl.COLOR_BUFFER_BIT); + this.gl.drawArrays(this.gl.TRIANGLES, 0, 3); + } + + /** + * @param {string} name + * @param {number} value + */ + #uniform1f(name, value) { + if (!this.gl || !this.program) return; + + const uniform_location = this.gl.getUniformLocation(this.program, name); + this.gl.uniform1f(uniform_location, value); + } + + /** + * @param {string} name + * @param {number} arg1 + * @param {number} arg2 + */ + #uniform2f(name, arg1, arg2) { + if (!this.gl || !this.program) return; + + const uniform_location = this.gl.getUniformLocation(this.program, name); + this.gl.uniform2f(uniform_location, arg1, arg2); + } + + /** + * @param {string} name + * @param {string} _oldValue + * @param {string} newValue + */ + attributeChangedCallback(name, _oldValue, newValue) { + switch (name) { + case "canvas-width": + if (!newValue || this.isFullscreen) return; + this.setWidth(+newValue); + break; + + case "canvas-height": + if (!newValue || this.isFullscreen) return; + this.setHeight(+newValue); + break; + + case "white-lines": + if (!newValue) return; + this.whiteLines = +newValue; + break; + + case "completely-real": + if (!newValue) return; + this.completelyReal = +newValue; + break; + + case "draw-axes": + if (!newValue) return; + this.drawAxes = +newValue; + break; + + case "is-3d": + if (!newValue) return; + this.is3D = +newValue; + break; + } + this.renderOnAnimationFrame(); + } + + get exprSrc() { + return this.src; + } + + set exprSrc(newValue) { + if (newValue == this.src) return; + this.currIterations = this.maxIterations; + this.src = newValue; + this.reloadFragmentShader(); + this.renderOnAnimationFrame(); + } + + reloadFragmentShader() { + if (!this.gl || !this.program || !this.fragment_shader || !this.src) + return; + + const src = this.#buildFragmentShader(this.src); + + this.sourceAndCompile(this.fragment_shader, src); + + this.gl.linkProgram(this.program); + } + + /** + * @param {string} input + * @returns {string} + */ + static withLines(input) { + return input + .split("\n") + .map((l, i) => (i + 1).toString().padStart(3) + " " + l) + .join("\n"); + } + + /** + * @param {WebGLShader} shader + * @param {string} built + */ + sourceAndCompile(shader, built) { + if (!this.gl) return; + + built = `#define MAX_ITERATIONS ${this.currIterations.toString()} +#define X_POINTS ${Math.ceil(this.canvas.width / 60)} +#define Y_POINTS ${Math.ceil(this.canvas.height / 60)} +#define VECTOR_SPACING ${60 / 2}.0 +${built}`; + built = this.#translateToWebGl2(built); + + if (this.currIterations == this.maxIterations && false) + console.info(built); + + this.gl.shaderSource(shader, built); + this.gl.compileShader(shader); + + const compiled = this.gl.getShaderParameter( + shader, + this.gl.COMPILE_STATUS + ); + + this.label.innerHTML = ""; + + if (!compiled) { + this.#displayError(shader, built); + return null; + } + return compiled; + } + + /** + * @param {string} built + * @returns {string} + */ + #translateToWebGl2(built) { + if (this.hasWebGl2) { + const translated = built + .replace("attribute", "in") + .replace("gl_FragColor", "fragColor") + .replace("float sinh", "float sinh_") + .replace("float cosh", "float cosh_") + .replace("float tanh", "float tanh_") + .replace(" lessThanForMix", " lessThan"); + return `#version 300 es +precision highp float; +out vec4 fragColor; +${translated}`; + } + + if (this.gl?.getExtension("OES_standard_derivatives")) + return `#extension GL_OES_standard_derivatives : enable +${built}`; + + return built.replace("abs(fwidth(ray_direction))", "vec3(0)"); + } + + /** + * @param {WebGLShader} shader + * @param {string } built + */ + #displayError(shader, built) { + const log = this.gl?.getShaderInfoLog(shader); + + const errorNode = document.createElement("div"); + errorNode.innerText = + "Error creating graph. Try contacting the author."; + this.label.appendChild(errorNode); + + const preNode = document.createElement("pre"); + preNode.style.whiteSpace = "pre-wrap"; + preNode.style.maxWidth = "90vw"; + preNode.innerText = `Error compiling shader, log: + +${log} + + Source: + +${NuPlot.withLines(built)}`; + this.label.appendChild(preNode); + console.error("Error compiling shader, source:\n", built); + console.error("Log:\n", log); + } + + static get observedAttributes() { + return [ + "canvas-width", + "canvas-height", + "white-lines", + "completely-real", + "draw-axes", + "is-3d", + ]; + } +} + +const declarations = ` +#define MAX_DEPTH 30 +//#define MAX_DEPTH 60 + +precision highp float; + +uniform float u_whiteLines; +uniform float u_completelyReal; +uniform float u_drawAxes; +uniform vec2 u_zoomCenter; +uniform float u_viewportWidth; +uniform float u_canvasWidth; +uniform float u_canvasHeight; +uniform float u_phi; +uniform float u_theta; + +vec3 hl2rgb(float h, float l) +{ + vec3 rgb = clamp(abs(mod(h*6.0+vec3(0.0,4.0,2.0),6.0)-3.0)-1.0,0.0,1.0); + return l + (rgb - 0.5) * (1.0 - abs(2.0 * l - 1.0)); +} + +vec2 dup(float x) { + return vec2(x, x); +} + +vec4 gnum(float f) { + return vec4(f, 0, 0, 0); +} + +float atanPlus(float y, float x) { + return mod(radians(360.0) + atan(y, x), radians(360.0)); +} + +vec2 iexpand(vec2 v) { + return v * (vec2(1.0, 1.0) + sign(v) * vec2(-0.000001, 0.000001)); +} + +#define P31 2147483648 +#define P32M1 4294967295 + +int left_shift(int i) { + return i * 2; +} + +int left_shift_increment(int i) { + return i * 2 + 1; +} + +ivec2 increment(ivec2 i) { + return i.x == P32M1 + ? ivec2(0, i.y + 1) + : ivec2(i.x + 1, i.y); +} + +ivec2 left_shift(ivec2 i) { + return i.x >= P31 + ? ivec2(2 * (i.x - P31), i.y * 2 + 1) + : 2 * i; +} + +ivec2 left_shift_increment(ivec2 i) { + return increment(left_shift(i)); +} + +bool is_even(int i) { + return i / 2 * 2 == i; +} + +bool is_odd(int i) { + return i / 2 * 2 != i; +} + +bool is_even(ivec2 i) { + return is_even(i.x); +} + +ivec2 right_shift(ivec2 i) { + return is_odd(i.y) + ? ivec2(i.x / 2 + P31, i.y / 2) + : i / 2; +} + +int right_shift(int i) { + return i / 2; +} +`; diff --git a/src/optimized.js.d.ts b/src/optimized.js.d.ts deleted file mode 100644 index 6db8ca92..00000000 --- a/src/optimized.js.d.ts +++ /dev/null @@ -1,44 +0,0 @@ -export const Elm: ElmType; - -export type ElmType = { - UI: { - init: (config: { - node: HTMLElement; - flags: { - saved: { [key: string]: string }; - hasClipboard: boolean; - languages: readonly string[]; - rootUrl: string; - googleAccessToken: string; - }; - }) => UIInstance; - }; -}; - -export type UIInstance = { - ports: { - persist: { - subscribe( - callback: (param: { key: string; value: string }) => void - ): void; - }; - save: { - subscribe(callback: (id: string) => void): void; - }; - copy: { - subscribe(callback: (id: string) => void): void; - }; - saveGoogleAccessToken: { - subscribe(callback: (token: string) => void): void; - }; - saveGoogleAccessTokenAndCloseWindow: { - subscribe(callback: (token: string) => void): void; - }; - openWindow: { - subscribe(callback: (url: string) => void): void; - }; - gotGoogleAccessToken: { - call(token: string): void; - }; - }; -}; diff --git a/src/shaders/declarations.frag b/src/shaders/declarations.frag index 03d42e2f..f1a5f3a2 100644 --- a/src/shaders/declarations.frag +++ b/src/shaders/declarations.frag @@ -5,13 +5,13 @@ precision highp float; uniform float u_whiteLines; uniform float u_completelyReal; +uniform float u_drawAxes; uniform vec2 u_zoomCenter; uniform float u_viewportWidth; uniform float u_canvasWidth; uniform float u_canvasHeight; uniform float u_phi; uniform float u_theta; -uniform float u_denoise; vec3 hl2rgb(float h, float l) { @@ -32,7 +32,7 @@ float atanPlus(float y, float x) { } vec2 iexpand(vec2 v) { - return v * (vec2(1.0, 1.0) + sign(v) * vec2(-u_denoise, u_denoise)); + return v * (vec2(1.0, 1.0) + sign(v) * vec2(-0.000001, 0.000001)); } #define P31 2147483648 diff --git a/src/shaders/index.d.ts b/src/shaders/index.d.ts deleted file mode 100644 index 2881c191..00000000 --- a/src/shaders/index.d.ts +++ /dev/null @@ -1 +0,0 @@ -declare module "*.frag"; diff --git a/src/ts/dev.ts b/src/ts/dev.ts deleted file mode 100644 index cbefc806..00000000 --- a/src/ts/dev.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Elm } from "../elm/UI.elm"; -import { init } from "./main"; - -init(Elm); diff --git a/src/ts/index.ts b/src/ts/index.ts deleted file mode 100644 index 18f3a62e..00000000 --- a/src/ts/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { Elm } from "../optimized.js"; -import { init } from "./main"; - -init(Elm); diff --git a/src/ts/main.ts b/src/ts/main.ts deleted file mode 100644 index 0650360a..00000000 --- a/src/ts/main.ts +++ /dev/null @@ -1,99 +0,0 @@ -import { ElmType } from "../elm/UI.elm"; -import { NuPlot } from "./nuplot"; -import { MathJaxElement } from "./mathjax"; -import localForage from "localforage"; - -window.MathJax = { - // @ts-ignore - startup: { - typeset: false, - }, -}; - -function loadMathJax() { - var script = document.createElement("script"); - script.async = true; - script.src = "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js"; - - document.head.appendChild(script); -} - -// Delay loading MathJax -setTimeout(loadMathJax, 500); - -declare class ClipboardItem { - constructor(data: { [mimeType: string]: Blob }); -} - -customElements.define("nu-plot", NuPlot); -customElements.define("math-jax", MathJaxElement); - -const storageKey = "documents"; - -function fromLS() { - var saved: { [key: string]: string } = {}; - for (var i = 0; i < localStorage.length; i++) { - const key = localStorage.key(i); - if (key === null) continue; - const value = localStorage.getItem(key); - if (value === null) continue; - saved[key] = value; - } - return saved; -} - -function innerInit(Elm: ElmType, saved: { [key: string]: string }) { - const node = document.getElementById("main"); - if (node == null) { - document.write( - "Error initializing application. This might be caused by a browser extension." - ); - return; - } - - var app = Elm.UI.init({ - node: node, - flags: { - saved: saved, - hasClipboard: typeof ClipboardItem !== "undefined", - languages: "languages" in navigator ? navigator.languages : [], - rootUrl: window.location.toString(), - googleAccessToken: localStorage.getItem("googleAccessToken") ?? "", - }, - }); - window.addEventListener("storage", (e) => { - if (e.key == "googleAccessToken") - app.ports.gotGoogleAccessToken.send(e.newValue ?? ""); - }); - app.ports.persist.subscribe((value) => { - localForage.setItem(storageKey, value); - }); - app.ports.save.subscribe((id) => { - var element = document.getElementById(id) as NuPlot; - element?.save(); - }); - app.ports.copy.subscribe((id) => { - var element = document.getElementById(id) as NuPlot; - element?.copy(); - }); - app.ports.saveGoogleAccessToken.subscribe((token) => { - localStorage.setItem("googleAccessToken", token); - }); - app.ports.saveGoogleAccessTokenAndCloseWindow.subscribe((token) => { - localStorage.setItem("googleAccessToken", token); - window.close(); - }); - app.ports.openWindow.subscribe((url) => { - window.open( - url, - "popup", - "menubar=no,status=no,toolbar=no,width=400,height=400" - ); - }); -} - -export function init(Elm: ElmType) { - (localForage.getItem(storageKey) as Promise<{ [key: string]: string }>) - .then((saved) => innerInit(Elm, saved)) - .catch(() => innerInit(Elm, fromLS())); -} diff --git a/src/ts/mathjax.ts b/src/ts/mathjax.ts deleted file mode 100644 index b4ec94fc..00000000 --- a/src/ts/mathjax.ts +++ /dev/null @@ -1,103 +0,0 @@ -declare global { - interface Window { - MathJax: { - texReset(): void; - - svgStylesheet(): string; - - getMetricsFor(node: HTMLElement, display: boolean): Options; - - tex2svgPromise(src: string, options: Options): Promise; - - tex2chtmlPromise(src: string, options: Options): Promise; - - startup: { - typeset: boolean; - - document: { - clear(): void; - updateDocument(): void; - outputJax: { - svgStyles: HTMLStyleElement; - }; - }; - }; - }; - } -} - -export type Options = { - display: boolean; - scale: number; - lineWidth: number; - containerWidth: number; -}; - -export class MathJaxElement extends HTMLElement { - wrapper: HTMLElement; - - src = ""; - containerWidth = 1024; - - constructor() { - super(); - - // Create a shadow root - const shadowRoow = this.attachShadow({ mode: "open" }); // sets and returns 'this.shadowRoot' - - this.wrapper = document.createElement("div"); - this.wrapper.style.overflowX = "auto"; - - // attach the created elements to the shadow DOM - shadowRoow.append(this.wrapper); - } - - attributeChangedCallback(name: string, _oldValue: string, newValue: string) { - switch (name) { - case "tex-src": - if (!newValue) return; - this.src = newValue || ""; - this.render(); - break; - case "container-width": - if (!newValue) return; - this.containerWidth = +newValue; - this.render(); - break; - } - } - - render() { - if (this.src == "") return; - this.wrapper.innerHTML = "Rendering..."; - if (!window.MathJax || !("texReset" in window.MathJax)) { - requestAnimationFrame(this.render.bind(this)); - return; - } - window.MathJax.texReset(); - this.wrapper.style.maxWidth = this.containerWidth + "px"; - requestAnimationFrame(() => { - var options = window.MathJax.getMetricsFor(this.wrapper, false); - - window.MathJax.tex2svgPromise(this.src, options) - .then((node) => { - this.wrapper.innerHTML = - ""; - this.wrapper.appendChild(node); - window.MathJax.startup.document.clear(); - window.MathJax.startup.document.updateDocument(); - }) - .catch((err) => { - this.wrapper.innerHTML = ""; - const errorNode = document.createElement("pre"); - errorNode.appendChild(document.createTextNode(err.message)); - errorNode.style.whiteSpace = "pre-wrap"; - this.wrapper.appendChild(errorNode); - }); - }); - } - - static get observedAttributes() { - return ["tex-src", "container-width"]; - } -} diff --git a/src/ts/nuplot.ts b/src/ts/nuplot.ts deleted file mode 100644 index 58ec084d..00000000 --- a/src/ts/nuplot.ts +++ /dev/null @@ -1,614 +0,0 @@ -import declarations from "../shaders/declarations.frag"; - -declare class ClipboardItem { - constructor(data: { [mimeType: string]: Blob }); -} -declare global { - interface Clipboard { - write(items: ClipboardItem[]): void; - } -} - -type Point = { - x: number; - y: number; -}; - -export class NuPlot extends HTMLElement { - wrapper: HTMLElement; - label: HTMLElement; - canvas: HTMLCanvasElement; - - gl: WebGLRenderingContext | null = null; - program: WebGLProgram | null = null; - fragment_shader: WebGLShader | null = null; - - src = "void main() { gl_FragColor = vec4(0); }"; - - whiteLines = 6; - completelyReal = 0; - denoise = 0.000001; - is3D = 0; - minIterations = 25; - currIterations = 400; - maxIterations = 400; - - hadPointersDown = false; - pendingRequestAnimationFrame = -1; - pendingTimeout = -1; - - pointers: { [pointerId: number]: Point } = {}; - originalPointers: { [pointerId: number]: Point } = {}; - - phi = 0; - theta = 0; - originalPhi = 0; - originalTheta = 0; - - center!: Point; - viewportWidth!: number; - - originalCenter!: Point; - originalViewportWidth!: number; - hasWebGl2!: boolean; - - constructor() { - super(); - - this.resetZoom(); - - // Create a shadow root - const shadowRoow = this.attachShadow({ mode: "open" }); // sets and returns 'this.shadowRoot' - - this.wrapper = document.createElement("div"); - this.wrapper.style.position = "relative"; - - this.label = this.wrapper.appendChild(document.createElement("div")); - - this.canvas = this.wrapper.appendChild(document.createElement("canvas")); - this.initCanvas(); - - // attach the created elements to the shadow DOM - shadowRoow.append(this.wrapper); - } - - save() { - this.withFilledCanvas(true, () => { - const name = window.prompt("Exported image name:", "export.png"); - if (!name) return; - - const dataUrl = this.canvas.toDataURL(); - var downloadElement = document.createElement("a"); - downloadElement.setAttribute("href", dataUrl); - downloadElement.setAttribute("download", name); - downloadElement.click(); - }); - } - - copy() { - this.withFilledCanvas(false, () => - this.canvas.toBlob((blob) => { - if (blob != null) - navigator.clipboard.write([new ClipboardItem({ "image/png": blob })]); - }) - ); - } - - withFilledCanvas(changeSize: boolean, callback: () => void) { - let oldWidth = 0; - let oldHeight = 0; - - if (changeSize) { - const widthString = window.prompt("Exported image width:", "1920"); - - if (!widthString) return; - const heightString = window.prompt("Exported image height:", "1080"); - - if (!heightString) return; - - oldWidth = this.canvas.width; - oldHeight = this.canvas.height; - this.canvas.width = +(widthString || 1920); - this.canvas.height = +(heightString || 1080); - } - - const oldIterations = this.currIterations; - this.currIterations = this.maxIterations; - - this.reloadFragmentShader(this.buildFragmentShader(this.src)); - this.render(); - callback(); - - if (changeSize) { - this.canvas.width = oldWidth; - this.canvas.height = oldHeight; - - this.render(); - } - - this.currIterations = oldIterations; - this.reloadFragmentShader(this.buildFragmentShader(this.src)); - } - - resetZoom() { - this.center = this.originalCenter = { x: 0, y: 0 }; - this.viewportWidth = this.originalViewportWidth = 2 * Math.PI; - this.phi = this.originalPhi = 0; - this.theta = this.originalTheta = 0; - } - - private initCanvas() { - this.canvas.width = this.canvas.height = 400; - - this.gl = this.canvas.getContext("webgl2"); - this.hasWebGl2 = this.gl !== null; - if (!this.gl) this.gl = this.canvas.getContext("webgl"); - - if (this.gl == null) return; - - const vertex_shader = `precision highp float; - attribute vec2 a_Position; - void main() { - gl_Position = vec4(a_Position.x, a_Position.y, 0.0, 1.0); - }`; - - this.program = this.gl.createProgram(); - - if (this.program == null) { - if (process.env.NODE_ENV === "development") - console.error("invalid program"); - return; - } - - if (!this.compileAndAttachShader(this.gl.VERTEX_SHADER, vertex_shader)) - return; - - const fragment_shader = this.buildFragmentShader(this.src); - this.fragment_shader = this.compileAndAttachShader( - this.gl.FRAGMENT_SHADER, - fragment_shader - ); - if (!this.fragment_shader) return; - - this.gl.linkProgram(this.program); - this.gl.useProgram(this.program); - - /* create a vertex buffer for a full-screen triangle */ - var vertex_buf = this.gl.createBuffer(); - this.gl.bindBuffer(this.gl.ARRAY_BUFFER, vertex_buf); - this.gl.bufferData( - this.gl.ARRAY_BUFFER, - new Float32Array([-1, -1, 3, -1, -1, 3]), - this.gl.STATIC_DRAW - ); - - /* set up the position attribute */ - var position_attrib_location = this.gl.getAttribLocation( - this.program, - "a_Position" - ); - this.gl.enableVertexAttribArray(position_attrib_location); - this.gl.vertexAttribPointer( - position_attrib_location, - 2, - this.gl.FLOAT, - false, - 0, - 0 - ); - - /* input handling */ - this.canvas.onpointerdown = (e) => this.canvasOnPointerDown(e); - this.canvas.oncontextmenu = () => false; - this.canvas.onpointerup = (e) => this.canvasOnPointerUp(e); - this.canvas.onpointercancel = (e) => this.canvasOnPointerUp(e); - this.canvas.onpointermove = (e) => this.canvasOnPointerMove(e); - this.canvas.onwheel = (e) => this.canvasOnWheel(e); - this.canvas.ondblclick = () => this.resetZoom(); - this.canvas.addEventListener( - "webglcontextlost", - (e) => { - if (this.pendingRequestAnimationFrame >= 0) - cancelAnimationFrame(this.pendingRequestAnimationFrame); - if (this.pendingTimeout >= 0) clearTimeout(this.pendingTimeout); - this.wrapper.removeChild(this.canvas); - this.label.innerHTML = "Broken.
Try reloading"; - }, - false - ); - this.canvas.style.touchAction = "none"; - // Sync with Theme.elm - this.canvas.style.borderRadius = "3px"; - - /* display initial frame */ - this.renderOnAnimationFrame(); - } - - private buildFragmentShader(expr: string) { - return `${declarations}\n${expr}`; - } - - compileAndAttachShader(type: number, src: string): WebGLShader | null { - if (!this.gl || !this.program) return null; - const shader = this.gl.createShader(type); - - if (shader == null) { - if (process.env.NODE_ENV === "development") - console.error("invalid shader"); - return null; - } - - if (!this.sourceAndCompile(shader, src)) return null; - - this.gl.attachShader(this.program, shader); - - return shader; - } - - fromScreen(x: number, y: number): Point { - return { - x: NuPlot.project(x, 0, this.canvas.width, this.minx(), this.maxx()), - y: NuPlot.project(y, 0, this.canvas.height, this.miny(), this.maxy()), - }; - } - - minx(): number { - return this.center.x - this.viewportWidth / 2.0; - } - - maxx(): number { - return this.center.x + this.viewportWidth / 2.0; - } - - miny(): number { - return this.center.y - this.viewportHeight / 2.0; - } - - maxy(): number { - return this.center.y - this.viewportHeight / 2.0; - } - - get viewportHeight() { - return (this.viewportWidth / this.canvas.width) * this.canvas.height; - } - - static project( - x: number, - froml: number, - fromu: number, - tol: number, - tou: number - ): number { - return ((x - froml) / (fromu - froml)) * (tou - tol) + tol; - } - - canvasOnWheel(e: WheelEvent): boolean { - // newCenter.x == oldCenter.x + oldWidth * (1 - k) * (e.x / canW - 1 / 2) - // newMiny - oldMiny == (e.y / canH) * (oldHeight * (1 - k)) - // (e.y / canH) * (k * oldHeight) + newMiny == (e.y / canH) * oldHeight + oldMiny - - const k = 1 + Math.sign(e.deltaY) * 0.06; - - this.center = { - x: - this.center.x + - this.viewportWidth * (1 - k) * (e.offsetX / this.canvas.width - 0.5), - y: - this.center.y + - this.viewportHeight * (1 - k) * (0.5 - e.offsetY / this.canvas.height), - }; - - this.viewportWidth *= k; - this.renderOnAnimationFrame(true); - // Intercept it - return false; - } - - canvasOnPointerDown(e: PointerEvent) { - this.resetOriginal(); - - if (e.buttons == 4) { - // central wheel - this.resetZoom(); - } else { - this.canvas.setPointerCapture(e.pointerId); - this.pointers[e.pointerId] = this.originalPointers[e.pointerId] = { - x: e.offsetX, - y: e.offsetY, - }; - } - this.renderOnAnimationFrame(true); - return true; - } - - canvasOnPointerMove(e: PointerEvent) { - if (!(e.pointerId in this.originalPointers)) - // Central mouse button - return; - - const original = this.originalPointers[e.pointerId]; - const pointer = { x: e.offsetX, y: e.offsetY }; - this.pointers[e.pointerId] = pointer; - - switch (Object.keys(this.originalPointers).length) { - case 1: - var dx = (pointer.x - original.x) / this.canvas.width; - const dy = (pointer.y - original.y) / this.canvas.height; - if (this.is3D) { - this.theta = this.originalTheta + dy * 3; - this.phi = this.originalPhi + dx * 3; - } else { - dx *= -1; - const x = this.originalCenter.x + dx * this.viewportWidth; - const y = this.originalCenter.y + dy * this.viewportHeight; - this.center = { x: x, y: y }; - break; - } - - case 2: - const otherId = +Object.keys(this.pointers).filter( - (k) => +k != e.pointerId - )[0]; - if ( - !(otherId in this.originalPointers) || - !(otherId in this.pointers) - ) { - console.info("Not found???"); - return; - } - const otherOriginal = this.originalPointers[otherId]; - const other = this.pointers[otherId]; - this.viewportWidth = - (this.originalViewportWidth / NuPlot.distance(pointer, other)) * - NuPlot.distance(original, otherOriginal); - - break; - - case 0: - default: - break; - } - this.renderOnAnimationFrame(true); - } - - static distance(l: Point, r: Point): number { - const dx = l.x - r.x; - const dy = l.y - r.y; - return Math.sqrt(dx * dx + dy * dy); - } - - canvasOnPointerUp(e: PointerEvent) { - delete this.pointers[e.pointerId]; - this.resetOriginal(); - } - - private resetOriginal() { - this.originalPhi = this.phi; - this.originalTheta = this.theta; - this.originalViewportWidth = this.viewportWidth; - this.originalCenter = Object.assign({}, this.center); - this.originalPointers = Object.assign({}, this.pointers); - } - - renderWithDelay(delay: number) { - if (this.pendingRequestAnimationFrame >= 0 || this.pendingTimeout >= 0) - return; - this.pendingTimeout = window.setTimeout(() => { - this.pendingTimeout = -1; - this.pendingRequestAnimationFrame = window.requestAnimationFrame( - this.maybeRender.bind(this) - ); - }, delay); - } - - renderOnAnimationFrame(rightNow: boolean = false) { - if (this.pendingRequestAnimationFrame >= 0) return; - if (this.pendingTimeout >= 0) - if (rightNow) { - window.clearTimeout(this.pendingTimeout); - this.pendingTimeout = -1; - } else { - return; - } - this.pendingRequestAnimationFrame = window.requestAnimationFrame( - this.maybeRender.bind(this) - ); - } - - maybeRender() { - this.pendingRequestAnimationFrame = -1; - - if (this.gl == null || this.program == null) return; - - if (this.hasPointersDown()) { - if (this.currIterations == this.minIterations) { - this.render(); - } else { - this.currIterations = this.minIterations; - this.reloadFragmentShader(this.buildFragmentShader(this.src)); - } - this.renderOnAnimationFrame(); - this.hadPointersDown = true; - } else if (this.currIterations < this.maxIterations) { - this.render(); - if (!this.hadPointersDown) { - this.currIterations = this.maxIterations; - this.reloadFragmentShader(this.buildFragmentShader(this.src)); - } - this.renderWithDelay( - this.currIterations == this.minIterations ? 300 : 100 - ); - this.hadPointersDown = false; - } else if (this.currIterations >= this.maxIterations) { - this.render(); - this.currIterations = this.minIterations; - this.reloadFragmentShader(this.buildFragmentShader(this.src)); - this.hadPointersDown = false; - } else { - this.render(); - this.hadPointersDown = false; - } - } - - private hasPointersDown() { - return Object.keys(this.originalPointers).length > 0; - } - - render() { - if (this.gl == null || this.program == null) return; - - this.gl.viewport(0, 0, this.gl.canvas.width, this.gl.canvas.height); - - /* bind inputs & render frame */ - this.uniform1f("u_whiteLines", this.whiteLines); - this.uniform1f("u_completelyReal", this.completelyReal); - this.uniform1f("u_viewportWidth", this.viewportWidth); - this.uniform1f("u_canvasWidth", this.canvas.width); - this.uniform1f("u_canvasHeight", this.canvas.height); - this.uniform2f("u_zoomCenter", this.center.x, this.center.y); - this.uniform1f("u_phi", this.phi); - this.uniform1f("u_theta", this.theta); - this.uniform1f("u_denoise", this.denoise); - - this.gl.clearColor(0.0, 0.0, 0.0, 1.0); - this.gl.clear(this.gl.COLOR_BUFFER_BIT); - this.gl.drawArrays(this.gl.TRIANGLES, 0, 3); - } - - private uniform1f(name: string, value: number) { - if (!this.gl || !this.program) return; - - var uniform_location = this.gl.getUniformLocation(this.program, name); - this.gl.uniform1f(uniform_location, value); - } - - private uniform2f(name: string, arg1: number, arg2: number) { - if (!this.gl || !this.program) return; - - var uniform_location = this.gl.getUniformLocation(this.program, name); - this.gl.uniform2f(uniform_location, arg1, arg2); - } - - attributeChangedCallback(name: string, _oldValue: string, newValue: string) { - switch (name) { - case "canvas-width": - if (!newValue) return; - this.canvas.width = +newValue; - break; - - case "canvas-height": - if (!newValue) return; - this.canvas.height = +newValue; - break; - - case "white-lines": - if (!newValue) return; - this.whiteLines = +newValue; - break; - - case "completely-real": - if (!newValue) return; - this.completelyReal = +newValue; - break; - - case "de-noise": - this.denoise = +newValue; - break; - - case "is-3d": - if (!newValue) return; - this.is3D = +newValue; - break; - } - this.renderOnAnimationFrame(); - } - - set exprSrc(newValue: string) { - if (newValue == this.src) return; - this.currIterations = this.maxIterations; - this.src = newValue; - this.reloadFragmentShader(this.buildFragmentShader(this.src)); - this.renderOnAnimationFrame(); - } - - reloadFragmentShader(src: string) { - if (!src || !this.gl || !this.program || !this.fragment_shader) return; - - this.sourceAndCompile(this.fragment_shader, src); - - this.gl.linkProgram(this.program); - } - - static withLines(input: string): string { - return input - .split("\n") - .map((l, i) => (i + 1).toString().padStart(3) + " " + l) - .join("\n"); - } - - sourceAndCompile(shader: WebGLShader, built: string) { - if (!this.gl) return; - - built = `#define MAX_ITERATIONS ${this.currIterations.toString()} -${built}`; - if (this.hasWebGl2) { - const translated = built - .replace("attribute", "in") - .replace("gl_FragColor", "fragColor") - .replace("float sinh", "float sinh_") - .replace("float cosh", "float cosh_"); - built = `#version 300 es -precision highp float; -out vec4 fragColor; -${translated}`; - } - if ( - process.env.NODE_ENV === "development" && - this.currIterations == this.maxIterations && - false - ) - console.info(built); - - this.gl.shaderSource(shader, built); - this.gl.compileShader(shader); - - var compiled = this.gl.getShaderParameter(shader, this.gl.COMPILE_STATUS); - - this.label.innerHTML = ""; - - if (!compiled) { - if (process.env.NODE_ENV === "development") { - var preNode = document.createElement("pre"); - preNode.style.whiteSpace = "pre-wrap"; - preNode.innerText = `Error compiling shader, log: - -${this.gl.getShaderInfoLog(shader)} - - Source: - -${NuPlot.withLines(built)}`; - this.label.appendChild(preNode); - console.error("Error compiling shader, source:\n", built); - console.error("Log:\n", this.gl.getShaderInfoLog(shader)); - } else { - var errorNode = document.createElement("div"); - errorNode.innerText = - "Error creating graph. Try contacting the author."; - this.label.appendChild(errorNode); - } - return null; - } - return compiled; - } - - static get observedAttributes() { - return [ - "canvas-width", - "canvas-height", - "white-lines", - "completely-real", - "de-noise", - "is-3d", - ]; - } -} diff --git a/tests/ExpressionFuzzer.elm b/tests/ExpressionFuzzer.elm index f0e8a48c..cb9eefea 100644 --- a/tests/ExpressionFuzzer.elm +++ b/tests/ExpressionFuzzer.elm @@ -1,6 +1,6 @@ module ExpressionFuzzer exposing (expressionFuzzer) -import Expression exposing (AssociativeOperation(..), BinaryOperation(..), Expression(..), RelationOperation(..), UnaryOperation(..)) +import Expression exposing (BinaryOperation(..), Expression(..), UnaryOperation(..)) import Fuzz exposing (Fuzzer) diff --git a/tests/NumericRangeTest.elm b/tests/NumericRangeTest.elm new file mode 100644 index 00000000..740b997f --- /dev/null +++ b/tests/NumericRangeTest.elm @@ -0,0 +1,30 @@ +module NumericRangeTest exposing (suite) + +import Dict +import Expect +import Expression exposing (Expression) +import Expression.NumericRange as NumericRange exposing (NumericRange(..)) +import Expression.Utils exposing (plus, sin_, square, x, y) +import Expression.Value as Value +import Test exposing (Test, describe) + + +suite : Test +suite = + describe "The NumericRange module" + [ Test.test "Real² = Nonegative" <| \() -> + square x + |> expectValueRange Nonnegative + , Test.test "sin(Real² + Real²) = Real" <| \() -> + sin_ (plus [ square x, square y ]) + |> expectValueRange Real + ] + + +expectValueRange : NumericRange -> Expression -> Expect.Expectation +expectValueRange range expression = + expression + |> Value.value Dict.empty + |> Value.toExpression + |> NumericRange.get + |> Expect.equal range diff --git a/tests/ParserTest.elm b/tests/ParserTest.elm index 06f519b6..950ac352 100644 --- a/tests/ParserTest.elm +++ b/tests/ParserTest.elm @@ -3,9 +3,8 @@ module ParserTest exposing (suite) import Dict import Expect import Expression exposing (Expression(..), FunctionName(..), KnownFunction(..), RelationOperation(..)) -import Expression.Parser as Parser exposing (Problem(..)) -import Expression.Utils exposing (a, abs_, asin_, atan2_, b, by, c, complex, cos_, cosh_, d, dd, div, double, exp_, f, g, gra_, i, icomplex, ii, ipow, ln_, minus, n, negate_, one, plus, pow, sin_, sinh_, sqrt_, square, t, triple, two, vector, x, y, z, zero) -import Parser +import Expression.Parser as Parser +import Expression.Utils exposing (a, abs_, asin_, atan2_, b, by, c, complex, cos_, cosh_, d, dd, div, double, exp, f, g, gra_, i, icomplex, ii, ipow, ln_, minus, n, negate_, one, plus, pow, r, sin_, sinh_, sqrt_, square, t, triple, two, vector, x, y, z, zero) import Test exposing (Test, describe, test) @@ -13,22 +12,21 @@ suite : Test suite = let toTest ( from, to, expectedString ) = - test ("has the same behaviour of the java one on " ++ from) <| - \_ -> - let - parsed = - Parser.parse from - in - case parsed of - Ok ok -> - Expect.all - [ Expect.equal (Expression.toString to ++ " = " ++ Debug.toString to) - , Expect.equal (expectedString ++ " = " ++ Debug.toString to) - ] - (Expression.toString ok ++ " = " ++ Debug.toString ok) + test ("has the same behaviour of the java one on " ++ from) <| \_ -> + let + parsed = + Parser.parse from + in + case parsed of + Ok ok -> + Expect.all + [ Expect.equal (Expression.toString to ++ " = " ++ Debug.toString to) + , Expect.equal (expectedString ++ " = " ++ Debug.toString to) + ] + (Expression.toString ok ++ " = " ++ Debug.toString ok) - Err err -> - Expect.fail <| Parser.errorsToString from err + Err err -> + Expect.fail (Parser.errorsToString from err).en in describe "The Parser module" [ describe "Parser.parse" <| @@ -290,7 +288,7 @@ tests = , ( "{a,b", List [ a, b ], "{a, b}" ) , ( "{a,b,", List [ a, b ], "{a, b}" ) , ( "{a,b,}", List [ a, b ], "{a, b}" ) - , ( "2expa", by [ two, exp_ a ], "2exp(a)" ) + , ( "2expa", by [ two, exp a ], "2exp(a)" ) , ( "sin( 0c)", sin_ <| by [ zero, c ], "sin(0c)" ) , ( "sin (0c)", sin_ <| by [ zero, c ], "sin(0c)" ) , ( "sin ( 0c)", sin_ <| by [ zero, c ], "sin(0c)" ) @@ -309,7 +307,7 @@ tests = , ( "ii(ln(x),x,0,x+1)", ii (ln_ x) x zero (plus [ x, one ]), "ii(ln(x), x, 0, x + 1)" ) , ( "ii(lnx,x,0,x+1)", ii (ln_ x) x zero (plus [ x, one ]), "ii(ln(x), x, 0, x + 1)" ) , ( "iiln(x),x,0,x+1", plus [ ii (ln_ x) x zero x, one ], "ii(ln(x), x, 0, x) + 1" ) - , ( "ii(expx,x,lnx,x)", ii (exp_ x) x (ln_ x) x, "ii(exp(x), x, ln(x), x)" ) + , ( "ii(expx,x,lnx,x)", ii (exp x) x (ln_ x) x, "ii(exp(x), x, ln(x), x)" ) , ( "ii(a,x,0,x)", ii a x zero x, "ii(a, x, 0, x)" ) , ( "ln(x+sqrt(x^2+1))", ln_ <| plus [ x, sqrt_ <| plus [ square x, one ] ], "ln(x + sqrt(x² + 1))" ) , straight "a < b" (RelationOperation LessThan a b) @@ -327,7 +325,40 @@ tests = , ( "xx+1", plus [ by [ x, x ], one ], "x*x + 1" ) , straight "e^x" <| pow (Variable "e") x , ( "ln(ex)", ln_ <| by [ Variable "e", x ], "ln(e*x)" ) - , straight "exp(x)" <| exp_ x + , straight "exp(x)" <| exp x + , ( "[!ox;!oy;!oz;!dx;!dy;!dz][x=ox+tdx;y=oy+tdy;z=oz+tdz]solve(z=1/(x²+y²),t)" + , let + bangs = + [ "ox", "oy", "oz", "dx", "dy", "dz" ] + |> List.map (\k -> ( k, Nothing )) + |> Dict.fromList + + lines = + [ "x", "y", "z" ] + |> List.map (\l -> ( l, Just <| plus [ Variable ("o" ++ l), by [ t, Variable ("d" ++ l) ] ] )) + |> Dict.fromList + + eq = + RelationOperation Equals z (div one (plus [ square x, square y ])) + in + Replace bangs <| (Replace lines <| Apply (KnownFunction Solve) [ eq, t ]) + , "[!dx; !dy; !dz; !ox; !oy; !oz] [x = ox + t*dx; y = oy + t*dy; z = oz + t*dz] solve(z = 1/(x² + y²), t)" + ) + , ( "a+-b", minus a b, "a - b" ) + , ( "a-+b", minus a b, "a - b" ) + , ( "a++b", plus [ a, b ], "a + b" ) + , ( "a+++++-+-+b", plus [ a, b ], "a + b" ) + , ( "+2", two, "2" ) + , ( "[r=sqrt(x²+y²);t=atan2(y,x)]r=2/t" + , Replace + (Dict.fromList + [ ( "r", Just <| sqrt_ <| plus [ square x, square y ] ) + , ( "t", Just <| atan2_ y x ) + ] + ) + (RelationOperation Equals r <| div two t) + , "[r = sqrt(x² + y²); t = atan2(y, x)] r = 2/t" + ) -- Check values for those , straight "1/x" <| div one x @@ -420,10 +451,6 @@ tests = justParse("aa", "a^2"); justParse("aabb", "a^2b^2"); justParse("c(a+b)"); - assertSimplify("a++a", "2a"); - justParse("a+-b", "a-b"); - justParse("a-+b", "a-b"); - justParse("a+++++-+-+b", "a+b"); assertSimplify("(a+b)+(c+d)", "a+b+c+d"); final ICalculable left = justParse("a+b"); final Expression right = justParse("c+d"); diff --git a/tests/SimplificationTest.elm b/tests/SimplificationTest.elm index 77f730b2..5a60c42d 100644 --- a/tests/SimplificationTest.elm +++ b/tests/SimplificationTest.elm @@ -5,7 +5,7 @@ import Expect import Expression exposing (AssociativeOperation(..), Expression(..), RelationOperation(..)) import Expression.Parser import Expression.Simplify -import Expression.Utils exposing (a, atan2_, b, by, c, complex, cos_, cosh_, div, double, f, g, i, ipow, m, minus, n, negate_, one, plus, r, sin_, sinh_, sqrt_, square, triple, two, x, y, z, zero) +import Expression.Utils exposing (a, atan2_, b, by, c, complex, cos_, cosh_, div, double, f, g, i, ipow, m, minus, minusOne, n, negate_, one, plus, r, sin_, sinh_, sqrt_, square, triple, two, x, y, z, zero) import Test exposing (Test, describe, test) @@ -20,16 +20,14 @@ suite = doublySimplified = Expression.Simplify.simplify simplified in - [ test (Expression.toString from ++ " simplifies to " ++ Expression.toString to) <| - \_ -> - Expect.equal - (Expression.toString to ++ " = " ++ Debug.toString to) - (Expression.toString simplified ++ " = " ++ Debug.toString simplified) - , test ("Simplification is idempotent for " ++ Expression.toString from) <| - \_ -> - Expect.equal - (Expression.toString simplified ++ " = " ++ Debug.toString simplified) - (Expression.toString doublySimplified ++ " = " ++ Debug.toString doublySimplified) + [ test (Expression.toString from ++ " simplifies to " ++ Expression.toString to) <| \_ -> + Expect.equal + (Expression.toString to ++ " = " ++ Debug.toString to) + (Expression.toString simplified ++ " = " ++ Debug.toString simplified) + , test ("Simplification is idempotent for " ++ Expression.toString from) <| \_ -> + Expect.equal + (Expression.toString simplified ++ " = " ++ Debug.toString simplified) + (Expression.toString doublySimplified ++ " = " ++ Debug.toString doublySimplified) ] toTestsStepSimplify ( from, to ) = @@ -37,11 +35,10 @@ suite = stepSimplified = Expression.Simplify.stepSimplify Dict.empty from in - [ test (Expression.toString from ++ " step simplifies to " ++ Expression.toString to) <| - \_ -> - Expect.equal - (Expression.toString to ++ " = " ++ Debug.toString to) - (Expression.toString stepSimplified ++ " = " ++ Debug.toString stepSimplified) + [ test (Expression.toString from ++ " step simplifies to " ++ Expression.toString to) <| \_ -> + Expect.equal + (Expression.toString to ++ " = " ++ Debug.toString to) + (Expression.toString stepSimplified ++ " = " ++ Debug.toString stepSimplified) ] toTestSort ( aop, from, to ) = @@ -49,11 +46,10 @@ suite = sorted = Expression.Simplify.sortByDegree aop from in - test (Expression.toString (List from) ++ " sorts (" ++ Debug.toString aop ++ ") to " ++ Expression.toString (List to)) <| - \_ -> - Expect.equal - (Expression.toString (List to) ++ " = " ++ Debug.toString to) - (Expression.toString (List sorted) ++ " = " ++ Debug.toString sorted) + test (Expression.toString (List from) ++ " sorts (" ++ Debug.toString aop ++ ") to " ++ Expression.toString (List to)) <| \_ -> + Expect.equal + (Expression.toString (List to) ++ " = " ++ Debug.toString to) + (Expression.toString (List sorted) ++ " = " ++ Debug.toString sorted) in describe "The Expression.Simplify module" [ describe "Expression.Simplify.simplify" <| @@ -81,10 +77,7 @@ simplificationTests = , simplified <| div a b , simplified <| by [ a, b, c ] , simplified <| div (by [ a, b ]) c - , ( by [ div a b, c ] - , --div (by [ a, c ]) b - by [ div a b, c ] - ) + , ( by [ div a b, c ], div (by [ a, c ]) b ) , ( div (div a b) c, div a <| by [ b, c ] ) , ( div a a, one ) , ( Replace @@ -114,7 +107,7 @@ simplificationTests = , Integer 9 ) , simplified <| by [ two, x ] - , ( square i, Integer -1 ) + , ( square i, minusOne ) , ( ipow i 69, i ) , ( by [ a, negate_ <| by [ b, i ] ], negate_ <| by [ a, b, i ] ) , ( by [ complex a b, minus a <| by [ i, b ] ], plus [ square a, square b ] ) @@ -126,7 +119,7 @@ simplificationTests = , ( cosh_ <| by [ i, x ], cos_ x ) , simplified <| plus [ Float 0.5, triple i ] , ( div one i, negate_ i ) - , ( byself i, Integer -1 ) + , ( byself i, minusOne ) , simplified <| negate_ a , ( sqrt_ <| negate_ one, i ) , ( let diff --git a/tests/SolverTest.elm b/tests/SolverTest.elm new file mode 100644 index 00000000..54469a36 --- /dev/null +++ b/tests/SolverTest.elm @@ -0,0 +1,126 @@ +module SolverTest exposing (suite) + +import Expect +import Expression exposing (Expression(..), RelationOperation(..), SolutionTree(..)) +import Expression.Simplify exposing (simplify) +import Expression.Solver +import Expression.Utils exposing (by, c, div, i, minus, minusOne, negate_, one, plus, square, two, x, zero) +import Test exposing (Test, describe, test) + + +suite : Test +suite = + describe "The Expression.Solver module" + [ describe "Expression.Solver.solve" <| List.map toTestSolve solveTests ] + + +toTestSolve : ( Expression, Expression, List Expression ) -> Test +toTestSolve ( from, x, to ) = + let + solved = + Expression.Solver.solve from x + + solutions = + go solved + + go node = + case node of + SolutionDone s -> + [ s ] + + SolutionForall s -> + [ Variable <| "forall: " ++ s ] + + SolutionError e -> + [ Variable <| "error:" ++ e.en ] + + SolutionNone e -> + [ Variable <| "none: " ++ e ] + + SolutionStep _ c -> + go c + + SolutionBranch cs -> + List.concatMap go cs + + toString e = + Expression.toString e ++ " = " ++ Debug.toString e + in + test ("Has the correct solutions for " ++ Expression.toString from) <| \_ -> + Expect.equalLists + (List.map toString solutions) + (List.map toString to) + + +solveTests : List ( Expression, Expression, List Expression ) +solveTests = + let + xeq = + RelationOperation Equals x + + none = + Variable "none: x" + + pi = + Variable "pi" + in + [ {- let + repls = + [ "x", "y", "z" ] + |> List.map + (\v -> + ( v + , Just <| + plus + [ Variable <| "o" ++ v + , by [ t, Variable <| "d" ++ v ] + ] + ) + ) + |> Dict.fromList + in + ( Replace repls <| + minus + (plus [ square x, square y ]) + (ipow z 2) + , t + , [] + ), + -} + ( zero, x, [ Variable "forall: x" ] ) + , ( one, x, [ none ] ) + , ( x, x, [ xeq zero ] ) + , ( plus [ x, one ], x, [ xeq minusOne ] ) + , ( plus [ by [ two, x ], one ], x, [ xeq <| negate_ <| div one two ] ) + , ( square x, x, [ xeq zero ] ) + , ( plus [ square x, minusOne ], x, [ xeq one, xeq minusOne ] ) + , ( plus [ square x, one ], x, [ xeq i, xeq <| negate_ i ] ) + , ( plus [ square x, x ], x, [ xeq zero, xeq minusOne ] ) + , ( plus [ square x, by [ two, x ], one ], x, [ xeq minusOne ] ) + , ( plus [ square x, by [ two, x ], Integer -3 ], x, [ xeq one, xeq (Integer -3) ] ) + , ( simplify <| + by + [ minus x one + , minus x two + , minus x minusOne + , minus x two + ] + , x + , [ xeq minusOne + , xeq one + , xeq two + ] + ) + , ( simplify <| + by + [ minus x pi + , minus x pi + , minus x pi + ] + , x + , [ xeq pi + , xeq pi + , xeq pi + ] + ) + ] diff --git a/tests/TrieTest.elm b/tests/TrieTest.elm index 6c8b0f02..20cf2e96 100644 --- a/tests/TrieTest.elm +++ b/tests/TrieTest.elm @@ -1,8 +1,6 @@ module TrieTest exposing (suite) import Expect -import Expression exposing (Expression(..), RelationOperation(..)) -import Expression.Parser exposing (Problem(..)) import Fuzz import Test exposing (Test, describe) import Trie @@ -11,10 +9,9 @@ import Trie suite : Test suite = describe "The Trie module" - [ Test.fuzz Fuzz.string "insert >> get === Just" <| - \s -> - Trie.empty - |> Trie.insert s 0 - |> Trie.get s - |> Expect.equal (Just 0) + [ Test.fuzz Fuzz.string "insert >> get === Just" <| \s -> + Trie.empty + |> Trie.insert s 0 + |> Trie.get s + |> Expect.equal (Just 0) ] diff --git a/tsconfig.json b/tsconfig.json index 4efd4f4b..9521e6d9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -2,11 +2,14 @@ "compilerOptions": { "outDir": "./dist/", "noImplicitAny": true, + "checkJs": true, "module": "es6", "target": "es6", "strict": true, "sourceMap": true, "allowSyntheticDefaultImports": true, - "moduleResolution": "node" - } -} \ No newline at end of file + "moduleResolution": "node", + "lib": ["WebWorker", "DOM"] + }, + "exclude": ["node_modules"] +}