From a404545133f2b8976aae348255507ce763ca2984 Mon Sep 17 00:00:00 2001 From: YouROK <8yourok8@mail.ru> Date: Thu, 24 Dec 2020 12:59:16 +0300 Subject: [PATCH] add react web project --- web/.babelrc | 8 + web/.env | 3 + web/.eslintcache | 1 + web/.gitignore | 23 + web/.prettierrc | 10 + web/README.md | 1 + web/{ => dest}/index.html | 4 +- web/gulpfile.js | 17 + web/package-lock.json | 19149 ++++++++++++++++++++++ web/package.json | 51 + web/public/index.html | 60 + web/src/App.js | 36 + web/src/components/Add.js | 93 + web/src/components/Appbar.js | 191 + web/src/components/DialogCacheInfo.js | 130 + web/src/components/DialogTorrentInfo.js | 95 + web/src/components/Donate.js | 59 + web/src/components/RemoveAll.js | 40 + web/src/components/Settings.js | 180 + web/src/components/Torrent.js | 224 + web/src/components/TorrentList.js | 52 + web/src/components/Upload.js | 40 + web/src/index.css | 13 + web/src/index.js | 11 + web/src/utils/Hosts.js | 16 + web/src/utils/Utils.js | 10 + 26 files changed, 20515 insertions(+), 2 deletions(-) create mode 100644 web/.babelrc create mode 100644 web/.env create mode 100644 web/.eslintcache create mode 100644 web/.gitignore create mode 100644 web/.prettierrc create mode 100644 web/README.md rename web/{ => dest}/index.html (91%) create mode 100644 web/gulpfile.js create mode 100644 web/package-lock.json create mode 100644 web/package.json create mode 100644 web/public/index.html create mode 100644 web/src/App.js create mode 100644 web/src/components/Add.js create mode 100644 web/src/components/Appbar.js create mode 100644 web/src/components/DialogCacheInfo.js create mode 100644 web/src/components/DialogTorrentInfo.js create mode 100644 web/src/components/Donate.js create mode 100644 web/src/components/RemoveAll.js create mode 100644 web/src/components/Settings.js create mode 100644 web/src/components/Torrent.js create mode 100644 web/src/components/TorrentList.js create mode 100644 web/src/components/Upload.js create mode 100644 web/src/index.css create mode 100644 web/src/index.js create mode 100644 web/src/utils/Hosts.js create mode 100644 web/src/utils/Utils.js diff --git a/web/.babelrc b/web/.babelrc new file mode 100644 index 0000000..576d38f --- /dev/null +++ b/web/.babelrc @@ -0,0 +1,8 @@ +{ + "plugins": ["@babel/plugin-transform-react-jsx", "@babel/plugin-proposal-class-properties"], + "env": { + "production": { + "presets": ["minify"] + } + } +} \ No newline at end of file diff --git a/web/.env b/web/.env new file mode 100644 index 0000000..20a7ee3 --- /dev/null +++ b/web/.env @@ -0,0 +1,3 @@ +INLINE_RUNTIME_CHUNK=false +GENERATE_SOURCEMAP=false +SKIP_PREFLIGHT_CHECK=true \ No newline at end of file diff --git a/web/.eslintcache b/web/.eslintcache new file mode 100644 index 0000000..c976326 --- /dev/null +++ b/web/.eslintcache @@ -0,0 +1 @@ +[{"/home/yourok/MEGAWork/Web/TorrServerWeb/src/index.js":"1","/home/yourok/MEGAWork/Web/TorrServerWeb/src/App.js":"2","/home/yourok/MEGAWork/Web/TorrServerWeb/src/components/Appbar.js":"3","/home/yourok/MEGAWork/Web/TorrServerWeb/src/components/TorrentList.js":"4","/home/yourok/MEGAWork/Web/TorrServerWeb/src/components/RemoveAll.js":"5","/home/yourok/MEGAWork/Web/TorrServerWeb/src/components/Add.js":"6","/home/yourok/MEGAWork/Web/TorrServerWeb/src/components/Upload.js":"7","/home/yourok/MEGAWork/Web/TorrServerWeb/src/utils/Hosts.js":"8","/home/yourok/MEGAWork/Web/TorrServerWeb/src/components/Donate.js":"9","/home/yourok/MEGAWork/Web/TorrServerWeb/src/components/Settings.js":"10","/home/yourok/MEGAWork/Web/TorrServerWeb/src/components/Torrent.js":"11","/home/yourok/MEGAWork/Web/TorrServerWeb/src/components/DialogCacheInfo.js":"12","/home/yourok/MEGAWork/Web/TorrServerWeb/src/utils/Utils.js":"13","/home/yourok/MEGAWork/Web/TorrServerWeb/src/components/DialogTorrentInfo.js":"14","/home/yourok/MEGAWork/go/TorrServer/web/src/index.js":"15","/home/yourok/MEGAWork/go/TorrServer/web/src/App.js":"16","/home/yourok/MEGAWork/go/TorrServer/web/src/components/Appbar.js":"17","/home/yourok/MEGAWork/go/TorrServer/web/src/components/TorrentList.js":"18","/home/yourok/MEGAWork/go/TorrServer/web/src/components/Add.js":"19","/home/yourok/MEGAWork/go/TorrServer/web/src/components/RemoveAll.js":"20","/home/yourok/MEGAWork/go/TorrServer/web/src/components/Donate.js":"21","/home/yourok/MEGAWork/go/TorrServer/web/src/components/Upload.js":"22","/home/yourok/MEGAWork/go/TorrServer/web/src/components/Settings.js":"23","/home/yourok/MEGAWork/go/TorrServer/web/src/utils/Hosts.js":"24","/home/yourok/MEGAWork/go/TorrServer/web/src/components/Torrent.js":"25","/home/yourok/MEGAWork/go/TorrServer/web/src/components/DialogTorrentInfo.js":"26","/home/yourok/MEGAWork/go/TorrServer/web/src/components/DialogCacheInfo.js":"27","/home/yourok/MEGAWork/go/TorrServer/web/src/utils/Utils.js":"28"},{"size":224,"mtime":1607328766846,"results":"29","hashOfConfig":"30"},{"size":840,"mtime":1607329513826,"results":"31","hashOfConfig":"30"},{"size":6484,"mtime":1607340369952,"results":"32","hashOfConfig":"30"},{"size":1568,"mtime":1607340137621,"results":"33","hashOfConfig":"30"},{"size":1416,"mtime":1607335705443,"results":"34","hashOfConfig":"30"},{"size":3345,"mtime":1607335694784,"results":"35","hashOfConfig":"30"},{"size":1348,"mtime":1607335733737,"results":"36","hashOfConfig":"30"},{"size":737,"mtime":1607427032081,"results":"37","hashOfConfig":"30"},{"size":2793,"mtime":1607330316050,"results":"38","hashOfConfig":"30"},{"size":9183,"mtime":1608638362207,"results":"39","hashOfConfig":"30"},{"size":6820,"mtime":1607591408226,"results":"40","hashOfConfig":"30"},{"size":4168,"mtime":1608211292654,"results":"41","hashOfConfig":"30"},{"size":428,"mtime":1607431364533,"results":"42","hashOfConfig":"30"},{"size":4424,"mtime":1608211201124,"results":"43","hashOfConfig":"30"},{"size":224,"mtime":1607328766846,"results":"44","hashOfConfig":"45"},{"size":840,"mtime":1607329513826,"results":"46","hashOfConfig":"45"},{"size":6484,"mtime":1607340369952,"results":"47","hashOfConfig":"45"},{"size":1568,"mtime":1607340137621,"results":"48","hashOfConfig":"45"},{"size":3345,"mtime":1607335694784,"results":"49","hashOfConfig":"45"},{"size":1416,"mtime":1607335705443,"results":"50","hashOfConfig":"45"},{"size":2793,"mtime":1607330316050,"results":"51","hashOfConfig":"45"},{"size":1348,"mtime":1607335733737,"results":"52","hashOfConfig":"45"},{"size":9183,"mtime":1608638362207,"results":"53","hashOfConfig":"45"},{"size":737,"mtime":1607427032081,"results":"54","hashOfConfig":"45"},{"size":6820,"mtime":1607591408226,"results":"55","hashOfConfig":"45"},{"size":4424,"mtime":1608211201124,"results":"56","hashOfConfig":"45"},{"size":4173,"mtime":1608803193680,"results":"57","hashOfConfig":"45"},{"size":428,"mtime":1607431364533,"results":"58","hashOfConfig":"45"},{"filePath":"59","messages":"60","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"61"},"bgudbu",{"filePath":"62","messages":"63","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"61"},{"filePath":"64","messages":"65","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"61"},{"filePath":"66","messages":"67","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"61"},{"filePath":"68","messages":"69","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"61"},{"filePath":"70","messages":"71","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"61"},{"filePath":"72","messages":"73","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"61"},{"filePath":"74","messages":"75","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"61"},{"filePath":"76","messages":"77","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"61"},{"filePath":"78","messages":"79","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"80","usedDeprecatedRules":"61"},{"filePath":"81","messages":"82","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"61"},{"filePath":"83","messages":"84","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"61"},{"filePath":"85","messages":"86","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"87"},{"filePath":"88","messages":"89","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"61"},{"filePath":"90","messages":"91","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"92"},"17eruzz",{"filePath":"93","messages":"94","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"92"},{"filePath":"95","messages":"96","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"92"},{"filePath":"97","messages":"98","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"92"},{"filePath":"99","messages":"100","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"92"},{"filePath":"101","messages":"102","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"92"},{"filePath":"103","messages":"104","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"92"},{"filePath":"105","messages":"106","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"92"},{"filePath":"107","messages":"108","errorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"80","usedDeprecatedRules":"92"},{"filePath":"109","messages":"110","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"92"},{"filePath":"111","messages":"112","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"92"},{"filePath":"113","messages":"114","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"92"},{"filePath":"115","messages":"116","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":"117"},{"filePath":"118","messages":"119","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"92"},"/home/yourok/MEGAWork/Web/TorrServerWeb/src/index.js",[],["120","121"],"/home/yourok/MEGAWork/Web/TorrServerWeb/src/App.js",[],"/home/yourok/MEGAWork/Web/TorrServerWeb/src/components/Appbar.js",[],"/home/yourok/MEGAWork/Web/TorrServerWeb/src/components/TorrentList.js",[],"/home/yourok/MEGAWork/Web/TorrServerWeb/src/components/RemoveAll.js",[],"/home/yourok/MEGAWork/Web/TorrServerWeb/src/components/Add.js",[],"/home/yourok/MEGAWork/Web/TorrServerWeb/src/components/Upload.js",[],"/home/yourok/MEGAWork/Web/TorrServerWeb/src/utils/Hosts.js",[],"/home/yourok/MEGAWork/Web/TorrServerWeb/src/components/Donate.js",[],"/home/yourok/MEGAWork/Web/TorrServerWeb/src/components/Settings.js",["122","123"],"import ListItem from '@material-ui/core/ListItem'\nimport ListItemIcon from '@material-ui/core/ListItemIcon'\nimport ListItemText from '@material-ui/core/ListItemText'\nimport React, { useEffect } from 'react'\nimport SettingsIcon from '@material-ui/icons/Settings'\nimport Dialog from '@material-ui/core/Dialog'\nimport DialogTitle from '@material-ui/core/DialogTitle'\nimport DialogContent from '@material-ui/core/DialogContent'\nimport TextField from '@material-ui/core/TextField'\nimport DialogActions from '@material-ui/core/DialogActions'\nimport Button from '@material-ui/core/Button'\nimport { FormControlLabel, InputLabel, Select, Switch } from '@material-ui/core'\nimport { settingsHost, setTorrServerHost, torrserverHost } from '../utils/Hosts'\n\nexport default function SettingsDialog() {\n const [open, setOpen] = React.useState(false)\n const [settings, setSets] = React.useState({})\n const [show, setShow] = React.useState(false)\n const [tsHost, setTSHost] = React.useState(torrserverHost ? torrserverHost : window.location.protocol + '//' + window.location.hostname + (window.location.port ? ':' + window.location.port : ''))\n\n const handleClickOpen = () => {\n setOpen(true)\n }\n const handleClose = () => {\n setOpen(false)\n }\n const handleCloseSave = () => {\n setOpen(false)\n let sets = JSON.parse(JSON.stringify(settings))\n sets.CacheSize *= 1024 * 1024\n sets.PreloadBufferSize *= 1024 * 1024\n fetch(settingsHost(), {\n method: 'post',\n body: JSON.stringify({ action: 'set', sets: sets }),\n headers: {\n Accept: 'application/json, text/plain, */*',\n 'Content-Type': 'application/json',\n },\n })\n }\n\n useEffect(() => {\n fetch(settingsHost(), {\n method: 'post',\n body: JSON.stringify({ action: 'get' }),\n headers: {\n Accept: 'application/json, text/plain, */*',\n 'Content-Type': 'application/json',\n },\n })\n .then((res) => res.json())\n .then(\n (json) => {\n json.CacheSize /= 1024 * 1024\n json.PreloadBufferSize /= 1024 * 1024\n setSets(json)\n setShow(true)\n },\n (error) => {\n setShow(false)\n console.log(error)\n }\n )\n .catch((e) => {\n setShow(false)\n console.log(e)\n })\n }, [tsHost])\n\n const onInputHost = (event) => {\n let host = event.target.value\n setTorrServerHost(host)\n setTSHost(host)\n }\n\n const inputForm = (event) => {\n let sets = JSON.parse(JSON.stringify(settings))\n if (event.target.type === 'number' || event.target.type === 'select-one') {\n sets[event.target.id] = Number(event.target.value)\n } else if (event.target.type === 'checkbox') {\n sets[event.target.id] = Boolean(event.target.checked)\n }\n setSets(sets)\n }\n\n return (\n
\n \n \n \n \n \n \n \n Settings\n \n \n {show && (\n <>\n \n } label=\"Preload buffer\" />\n \n

\n Retracker mode\n \n \n } label=\"Enable IPv6\" />\n
\n } label=\"Force encrypt\" />\n
\n } label=\"Disable TCP\" />\n
\n } label=\"Disable UTP\" />\n
\n } label=\"Disable UPNP\" />\n
\n } label=\"Disable DHT\" />\n
\n } label=\"Disable upload\" />\n
\n \n \n \n \n \n

\n Strategy\n \n \n )}\n \n \n \n \n \n

\n
\n )\n}\n\n/*\n{\n\t\"CacheSize\": 209715200,\n\t\"PreloadBufferSize\": 20971520,\n\t\"RetrackersMode\": 1,\n\t\"TorrentDisconnectTimeout\": 30,\n\t\"EnableIPv6\": false,\n\t\"DisableTCP\": false,\n\t\"DisableUTP\": true,\n\t\"DisableUPNP\": false,\n\t\"DisableDHT\": false,\n\t\"DisableUpload\": false,\n\t\"DownloadRateLimit\": 0,\n\t\"UploadRateLimit\": 0,\n\t\"ConnectionsLimit\": 20,\n\t\"DhtConnectionLimit\": 500,\n\t\"PeersListenPort\": 0\n}\n */\n","/home/yourok/MEGAWork/Web/TorrServerWeb/src/components/Torrent.js",[],"/home/yourok/MEGAWork/Web/TorrServerWeb/src/components/DialogCacheInfo.js",[],"/home/yourok/MEGAWork/Web/TorrServerWeb/src/utils/Utils.js",[],["124","125"],"/home/yourok/MEGAWork/Web/TorrServerWeb/src/components/DialogTorrentInfo.js",[],"/home/yourok/MEGAWork/go/TorrServer/web/src/index.js",[],["126","127"],"/home/yourok/MEGAWork/go/TorrServer/web/src/App.js",[],"/home/yourok/MEGAWork/go/TorrServer/web/src/components/Appbar.js",[],"/home/yourok/MEGAWork/go/TorrServer/web/src/components/TorrentList.js",[],"/home/yourok/MEGAWork/go/TorrServer/web/src/components/Add.js",[],"/home/yourok/MEGAWork/go/TorrServer/web/src/components/RemoveAll.js",[],"/home/yourok/MEGAWork/go/TorrServer/web/src/components/Donate.js",[],"/home/yourok/MEGAWork/go/TorrServer/web/src/components/Upload.js",[],"/home/yourok/MEGAWork/go/TorrServer/web/src/components/Settings.js",["128","129"],"/home/yourok/MEGAWork/go/TorrServer/web/src/utils/Hosts.js",[],"/home/yourok/MEGAWork/go/TorrServer/web/src/components/Torrent.js",[],"/home/yourok/MEGAWork/go/TorrServer/web/src/components/DialogTorrentInfo.js",[],"/home/yourok/MEGAWork/go/TorrServer/web/src/components/DialogCacheInfo.js",["130","131","132"],"import React, { useEffect, useRef } from 'react'\nimport Typography from '@material-ui/core/Typography'\n\nimport { getPeerString, humanizeSize } from '../utils/Utils'\nimport DialogTitle from '@material-ui/core/DialogTitle'\nimport DialogContent from '@material-ui/core/DialogContent'\nimport { cacheHost } from '../utils/Hosts'\n\nexport default function DialogCacheInfo(props) {\n const [hash] = React.useState(props.hash)\n const [cache, setCache] = React.useState({})\n const timerID = useRef(-1)\n\n useEffect(() => {\n if (hash)\n timerID.current = setInterval(() => {\n getCache(hash, (cache) => {\n setCache(cache)\n })\n }, 1000)\n else clearInterval(timerID.current)\n\n return () => {\n clearInterval(timerID.current)\n }\n }, [hash, props.open])\n\n return (\n
\n \n \n Hash {cache.Hash}\n
\n Capacity {humanizeSize(cache.Capacity)}\n
\n Filled {humanizeSize(cache.Filled)}\n
\n Torrent size {cache.Torrent && cache.Torrent.torrent_size && humanizeSize(cache.Torrent.torrent_size)}\n
\n Pieces length {humanizeSize(cache.PiecesLength)}\n
\n Pieces count {cache.PiecesCount}\n
\n Peers: {getPeerString(cache.Torrent)}\n
\n Download speed {cache.Torrent && cache.Torrent.download_speed ? humanizeSize(cache.Torrent.download_speed) + '/sec' : ''}\n
\n Status {cache.Torrent && cache.Torrent.stat_string && cache.Torrent.stat_string}\n
\n
\n \n
\n \n
\n )\n}\n\nfunction getCacheMap(cache) {\n if (!cache || !cache.PiecesCount) return ''\n var html = ''\n for (let i = 0; i < cache.PiecesCount; i++) {\n html += \" {\n if (i >= r.Start && i <= r.End && i != r.Reader)\n html += ' reader-range'\n if (i == r.Reader) {\n html += ' piece-reader'\n info += ' reader'\n }\n })\n }\n html += \"' title='\" + info + \"'>\"\n }\n return html\n}\n\nfunction getCache(hash, callback) {\n try {\n fetch(cacheHost(), {\n method: 'post',\n body: JSON.stringify({ action: 'get', hash: hash }),\n headers: {\n Accept: 'application/json, text/plain, */*',\n 'Content-Type': 'application/json',\n },\n })\n .then((res) => res.json())\n .then(\n (json) => {\n callback(json)\n },\n (error) => {\n callback({})\n console.error(error)\n }\n )\n } catch (e) {\n console.error(e)\n callback({})\n }\n}\n/*\n{\n\t\"Hash\": \"41e36c8de915d80db83fc134bee4e7e2d292657e\",\n\t\"Capacity\": 209715200,\n\t\"Filled\": 2914808,\n\t\"PiecesLength\": 4194304,\n\t\"PiecesCount\": 2065,\n\t\"DownloadSpeed\": 32770.860273455524,\n\t\"Pieces\": {\n\t\t\"2064\": {\n\t\t\t\"Id\": 2064,\n\t\t\t\"Length\": 2914808,\n\t\t\t\"Size\": 162296,\n\t\t\t\"Completed\": false\n\t\t}\n\t}\n}\n */\n","/home/yourok/MEGAWork/go/TorrServer/web/src/utils/Utils.js",[],{"ruleId":"133","replacedBy":"134"},{"ruleId":"135","replacedBy":"136"},{"ruleId":"137","severity":1,"message":"138","line":103,"column":29,"nodeType":"139","endLine":103,"endColumn":35},{"ruleId":"137","severity":1,"message":"138","line":139,"column":29,"nodeType":"139","endLine":139,"endColumn":35},{"ruleId":"133","replacedBy":"140"},{"ruleId":"135","replacedBy":"141"},{"ruleId":"133","replacedBy":"142"},{"ruleId":"135","replacedBy":"143"},{"ruleId":"137","severity":1,"message":"138","line":103,"column":29,"nodeType":"139","endLine":103,"endColumn":35},{"ruleId":"137","severity":1,"message":"138","line":139,"column":29,"nodeType":"139","endLine":139,"endColumn":35},{"ruleId":"144","severity":1,"message":"145","line":74,"column":35,"nodeType":"146","messageId":"147","endLine":81,"endColumn":14},{"ruleId":"148","severity":1,"message":"149","line":75,"column":53,"nodeType":"150","messageId":"151","endLine":75,"endColumn":55},{"ruleId":"148","severity":1,"message":"152","line":77,"column":23,"nodeType":"150","messageId":"151","endLine":77,"endColumn":25},"no-native-reassign",["153"],"no-negated-in-lhs",["154"],"jsx-a11y/heading-has-content","Headings must have content and the content must be accessible by a screen reader.","JSXOpeningElement",["153"],["154"],["153"],["154"],"no-loop-func","Function declared in a loop contains unsafe references to variable(s) 'html', 'html'.","ArrowFunctionExpression","unsafeRefs","eqeqeq","Expected '!==' and instead saw '!='.","BinaryExpression","unexpected","Expected '===' and instead saw '=='.","no-global-assign","no-unsafe-negation"] \ No newline at end of file diff --git a/web/.gitignore b/web/.gitignore new file mode 100644 index 0000000..4d29575 --- /dev/null +++ b/web/.gitignore @@ -0,0 +1,23 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# production +/build + +# misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/web/.prettierrc b/web/.prettierrc new file mode 100644 index 0000000..e929b0c --- /dev/null +++ b/web/.prettierrc @@ -0,0 +1,10 @@ +{ + "useTabs": false, + "printWidth": 200, + "tabWidth": 4, + "singleQuote": true, + "trailingComma": "es5", + "jsxBracketSameLine": false, + "parser": "flow", + "semi": false +} \ No newline at end of file diff --git a/web/README.md b/web/README.md new file mode 100644 index 0000000..e4d09b7 --- /dev/null +++ b/web/README.md @@ -0,0 +1 @@ +## TorrServer web client diff --git a/web/index.html b/web/dest/index.html similarity index 91% rename from web/index.html rename to web/dest/index.html index f7da740..e872452 100644 --- a/web/index.html +++ b/web/dest/index.html @@ -1,6 +1,6 @@ -TorrServer
\ No newline at end of file +(this.webpackJsonptorrserver_web=this.webpackJsonptorrserver_web||[]).push([[2],[function(e,t,n){"use strict";e.exports=n(111)},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}},function(e,t,n){"use strict";function r(e){var t,n,o="";if("string"===typeof e||"number"===typeof e)o+=e;else if("object"===typeof e)if(Array.isArray(e))for(t=0;t1&&void 0!==arguments[1]?arguments[1]:{};return function(n){var a=t.defaultTheme,l=t.withTheme,f=void 0!==l&&l,p=t.name,h=Object(o.a)(t,["defaultTheme","withTheme","name"]);var m=p,b=Object(s.a)(e,Object(r.a)({defaultTheme:a,Component:n,name:p||n.displayName,classNamePrefix:m},h)),v=i.a.forwardRef((function(e,t){e.classes;var l,u=e.innerRef,s=Object(o.a)(e,["classes","innerRef"]),h=b(Object(r.a)({},n.defaultProps,e)),m=s;return("string"===typeof p||f)&&(l=Object(d.a)()||a,p&&(m=Object(c.a)({theme:l,name:p,props:s})),f&&!m.theme&&(m.theme=l)),i.a.createElement(n,Object(r.a)({ref:u||t,classes:h},m))}));return u()(v,n),v}},p=n(28);t.a=function(e,t){return f(e,Object(r.a)({defaultTheme:p.a},t))}},function(e,t,n){e.exports=n(117)()},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(93);function o(e){if("string"!==typeof e)throw new Error(Object(r.a)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),o=n(30);function a(e,t){return r.useMemo((function(){return null==e&&null==t?null:function(n){Object(o.a)(e,n),Object(o.a)(t,n)}}),[e,t])}},function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(112)},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return Math.min(Math.max(t,e),n)}function a(e){if(e.type)return e;if("#"===e.charAt(0))return a(function(e){e=e.substr(1);var t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g"),n=e.match(t);return n&&1===n[0].length&&(n=n.map((function(e){return e+e}))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map((function(e,t){return t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3})).join(", "),")"):""}(e));var t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla"].indexOf(n))throw new Error(Object(r.a)(3,e));var o=e.substring(t+1,e.length-1).split(",");return{type:n,values:o=o.map((function(e){return parseFloat(e)}))}}function i(e){var t=e.type,n=e.values;return-1!==t.indexOf("rgb")?n=n.map((function(e,t){return t<3?parseInt(e,10):e})):-1!==t.indexOf("hsl")&&(n[1]="".concat(n[1],"%"),n[2]="".concat(n[2],"%")),"".concat(t,"(").concat(n.join(", "),")")}function l(e,t){var n=u(e),r=u(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function u(e){var t="hsl"===(e=a(e)).type?a(function(e){var t=(e=a(e)).values,n=t[0],r=t[1]/100,o=t[2]/100,l=r*Math.min(o,1-o),u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return o-l*Math.max(Math.min(t-3,9-t,1),-1)},s="rgb",c=[Math.round(255*u(0)),Math.round(255*u(8)),Math.round(255*u(4))];return"hsla"===e.type&&(s+="a",c.push(t[3])),i({type:s,values:c})}(e)).values:e.values;return t=t.map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)})),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function s(e,t){return e=a(e),t=o(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),e.values[3]=t,i(e)}function c(e,t){if(e=a(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]*=1-t;return i(e)}function d(e,t){if(e=a(e),t=o(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(var n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;return i(e)}},function(e,t,n){"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return a}));var r=n(3),o={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},a={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function i(e){return"".concat(Math.round(e),"ms")}t.a={easing:o,duration:a,create:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.duration,l=void 0===n?a.standard:n,u=t.easing,s=void 0===u?o.easeInOut:u,c=t.delay,d=void 0===c?0:c;Object(r.a)(t,["duration","easing","delay"]);return(Array.isArray(e)?e:[e]).map((function(e){return"".concat(e," ").concat("string"===typeof l?l:i(l)," ").concat(s," ").concat("string"===typeof d?d:i(d))})).join(",")},getAutoHeightDuration:function(e){if(!e)return 0;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}}},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),o=n(34);function a(){return r.useContext(o.a)}},function(e,t,n){"use strict";var r=n(16);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=a.default.memo(a.default.forwardRef((function(t,n){return a.default.createElement(i.default,(0,o.default)({ref:n},t),e)})));0;return n.muiName=i.default.muiName,n};var o=r(n(120)),a=r(n(0)),i=r(n(75))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(94),o=(n(0),n(28));function a(){return Object(r.a)()||o.a}},function(e,t,n){"use strict";function r(e){var t=e.props,n=e.states,r=e.muiFormControl;return n.reduce((function(e,n){return e[n]=t[n],r&&"undefined"===typeof t[n]&&(e[n]=r[n]),e}),{})}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return o}));var r=function(e){return e.scrollTop};function o(e,t){var n=e.timeout,r=e.style,o=void 0===r?{}:r;return{duration:o.transitionDuration||"number"===typeof n?n:n[t.mode]||0,delay:o.transitionDelay}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(47);var o=n(78),a=n(55);function i(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(o.a)(e)||Object(a.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(79);var o=n(55),a=n(80);function i(e,t){return Object(r.a)(e)||function(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,a=void 0;try{for(var i,l=e[Symbol.iterator]();!(r=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(u){o=!0,a=u}finally{try{r||null==l.return||l.return()}finally{if(o)throw a}}return n}}(e,t)||Object(o.a)(e,t)||Object(a.a)()}},function(e,t,n){"use strict";var r=n(0),o=r.createContext({});t.a=o},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(0),o="undefined"!==typeof window?r.useLayoutEffect:r.useEffect;function a(e){var t=r.useRef(e);return o((function(){t.current=e})),r.useCallback((function(){return t.current.apply(void 0,arguments)}),[])}},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(92),o=Object(r.a)();t.a=o},function(e,t,n){"use strict";var r=n(122);t.a=function(e,t){return t?Object(r.a)(e,t,{clone:!1}):e}},function(e,t,n){"use strict";function r(e,t){"function"===typeof e?e(t):e&&(e.current=t)}n.d(t,"a",(function(){return r}))},,function(e,t,n){"use strict";function r(e){return(r="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"b",(function(){return a}));var r=n(0),o=r.createContext();function a(){return r.useContext(o)}t.a=o},function(e,t,n){"use strict";function r(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function o(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(r(e.value)&&""!==e.value||t&&r(e.defaultValue)&&""!==e.defaultValue)}function a(e){return e.startAdornment}n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}))},function(e,t,n){"use strict";var r=n(1),o=n(3),a=n(0),i=(n(6),n(4)),l=n(5),u=n(7),s={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p"},c=a.forwardRef((function(e,t){var n=e.align,l=void 0===n?"inherit":n,c=e.classes,d=e.className,f=e.color,p=void 0===f?"initial":f,h=e.component,m=e.display,b=void 0===m?"initial":m,v=e.gutterBottom,g=void 0!==v&&v,y=e.noWrap,x=void 0!==y&&y,w=e.paragraph,k=void 0!==w&&w,O=e.variant,E=void 0===O?"body1":O,S=e.variantMapping,j=void 0===S?s:S,C=Object(o.a)(e,["align","classes","className","color","component","display","gutterBottom","noWrap","paragraph","variant","variantMapping"]),P=h||(k?"p":j[E]||s[E])||"span";return a.createElement(P,Object(r.a)({className:Object(i.a)(c.root,d,"inherit"!==E&&c[E],"initial"!==p&&c["color".concat(Object(u.a)(p))],x&&c.noWrap,g&&c.gutterBottom,k&&c.paragraph,"inherit"!==l&&c["align".concat(Object(u.a)(l))],"initial"!==b&&c["display".concat(Object(u.a)(b))]),ref:t},C))}));t.a=Object(l.a)((function(e){return{root:{margin:0},body2:e.typography.body2,body1:e.typography.body1,caption:e.typography.caption,button:e.typography.button,h1:e.typography.h1,h2:e.typography.h2,h3:e.typography.h3,h4:e.typography.h4,h5:e.typography.h5,h6:e.typography.h6,subtitle1:e.typography.subtitle1,subtitle2:e.typography.subtitle2,overline:e.typography.overline,srOnly:{position:"absolute",height:1,width:1,overflow:"hidden"},alignLeft:{textAlign:"left"},alignCenter:{textAlign:"center"},alignRight:{textAlign:"right"},alignJustify:{textAlign:"justify"},noWrap:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},gutterBottom:{marginBottom:"0.35em"},paragraph:{marginBottom:16},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorTextPrimary:{color:e.palette.text.primary},colorTextSecondary:{color:e.palette.text.secondary},colorError:{color:e.palette.error.main},displayInline:{display:"inline"},displayBlock:{display:"block"}}}),{name:"MuiTypography"})(c)},,function(e,t,n){"use strict";function r(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,o=new Array(r),a=0;ae.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0,r=t.pulsate,o=void 0!==r&&r,a=t.center,l=void 0===a?i||t.pulsate:a,u=t.fakeElement,s=void 0!==u&&u;if("mousedown"===e.type&&b.current)b.current=!1;else{"touchstart"===e.type&&(b.current=!0);var c,d,f,p=s?null:y.current,h=p?p.getBoundingClientRect():{width:0,height:0,left:0,top:0};if(l||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(h.width/2),d=Math.round(h.height/2);else{var m=e.touches?e.touches[0]:e,w=m.clientX,k=m.clientY;c=Math.round(w-h.left),d=Math.round(k-h.top)}if(l)(f=Math.sqrt((2*Math.pow(h.width,2)+Math.pow(h.height,2))/3))%2===0&&(f+=1);else{var O=2*Math.max(Math.abs((p?p.clientWidth:0)-c),c)+2,E=2*Math.max(Math.abs((p?p.clientHeight:0)-d),d)+2;f=Math.sqrt(Math.pow(O,2)+Math.pow(E,2))}e.touches?null===g.current&&(g.current=function(){x({pulsate:o,rippleX:c,rippleY:d,rippleSize:f,cb:n})},v.current=setTimeout((function(){g.current&&(g.current(),g.current=null)}),80)):x({pulsate:o,rippleX:c,rippleY:d,rippleSize:f,cb:n})}}),[i,x]),O=a.useCallback((function(){w({},{pulsate:!0})}),[w]),E=a.useCallback((function(e,t){if(clearTimeout(v.current),"touchend"===e.type&&g.current)return e.persist(),g.current(),g.current=null,void(v.current=setTimeout((function(){E(e,t)})));g.current=null,p((function(e){return e.length>0?e.slice(1):e})),m.current=t}),[]);return a.useImperativeHandle(t,(function(){return{pulsate:O,start:w,stop:E}}),[O,w,E]),a.createElement("span",Object(r.a)({className:Object(u.a)(l.root,s),ref:y},c),a.createElement(M,{component:null,exit:!0},f))})),I=Object(d.a)((function(e){return{root:{overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"},ripple:{opacity:0,position:"absolute"},rippleVisible:{opacity:.3,transform:"scale(1)",animation:"$enter ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},ripplePulsate:{animationDuration:"".concat(e.transitions.duration.shorter,"ms")},child:{opacity:1,display:"block",width:"100%",height:"100%",borderRadius:"50%",backgroundColor:"currentColor"},childLeaving:{opacity:0,animation:"$exit ".concat(550,"ms ").concat(e.transitions.easing.easeInOut)},childPulsate:{position:"absolute",left:0,top:0,animation:"$pulsate 2500ms ".concat(e.transitions.easing.easeInOut," 200ms infinite")},"@keyframes enter":{"0%":{transform:"scale(0)",opacity:.1},"100%":{transform:"scale(1)",opacity:.3}},"@keyframes exit":{"0%":{opacity:1},"100%":{opacity:0}},"@keyframes pulsate":{"0%":{transform:"scale(1)"},"50%":{transform:"scale(0.92)"},"100%":{transform:"scale(1)"}}}}),{flip:!1,name:"MuiTouchRipple"})(a.memo(L)),A=a.forwardRef((function(e,t){var n=e.action,i=e.buttonRef,d=e.centerRipple,f=void 0!==d&&d,p=e.children,h=e.classes,m=e.className,b=e.component,v=void 0===b?"button":b,g=e.disabled,y=void 0!==g&&g,x=e.disableRipple,k=void 0!==x&&x,O=e.disableTouchRipple,E=void 0!==O&&O,S=e.focusRipple,j=void 0!==S&&S,C=e.focusVisibleClassName,P=e.onBlur,R=e.onClick,N=e.onFocus,T=e.onFocusVisible,M=e.onKeyDown,_=e.onKeyUp,z=e.onMouseDown,L=e.onMouseLeave,A=e.onMouseUp,D=e.onTouchEnd,F=e.onTouchMove,W=e.onTouchStart,B=e.onDragLeave,$=e.tabIndex,V=void 0===$?0:$,U=e.TouchRippleProps,H=e.type,q=void 0===H?"button":H,K=Object(o.a)(e,["action","buttonRef","centerRipple","children","classes","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","onBlur","onClick","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","onDragLeave","tabIndex","TouchRippleProps","type"]),Q=a.useRef(null);var X=a.useRef(null),Y=a.useState(!1),G=Y[0],J=Y[1];y&&G&&J(!1);var Z=w(),ee=Z.isFocusVisible,te=Z.onBlurVisible,ne=Z.ref;function re(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:E;return Object(c.a)((function(r){return t&&t(r),!n&&X.current&&X.current[e](r),!0}))}a.useImperativeHandle(n,(function(){return{focusVisible:function(){J(!0),Q.current.focus()}}}),[]),a.useEffect((function(){G&&j&&!k&&X.current.pulsate()}),[k,j,G]);var oe=re("start",z),ae=re("stop",B),ie=re("stop",A),le=re("stop",(function(e){G&&e.preventDefault(),L&&L(e)})),ue=re("start",W),se=re("stop",D),ce=re("stop",F),de=re("stop",(function(e){G&&(te(e),J(!1)),P&&P(e)}),!1),fe=Object(c.a)((function(e){Q.current||(Q.current=e.currentTarget),ee(e)&&(J(!0),T&&T(e)),N&&N(e)})),pe=function(){var e=l.findDOMNode(Q.current);return v&&"button"!==v&&!("A"===e.tagName&&e.href)},he=a.useRef(!1),me=Object(c.a)((function(e){j&&!he.current&&G&&X.current&&" "===e.key&&(he.current=!0,e.persist(),X.current.stop(e,(function(){X.current.start(e)}))),e.target===e.currentTarget&&pe()&&" "===e.key&&e.preventDefault(),M&&M(e),e.target===e.currentTarget&&pe()&&"Enter"===e.key&&!y&&(e.preventDefault(),R&&R(e))})),be=Object(c.a)((function(e){j&&" "===e.key&&X.current&&G&&!e.defaultPrevented&&(he.current=!1,e.persist(),X.current.stop(e,(function(){X.current.pulsate(e)}))),_&&_(e),R&&e.target===e.currentTarget&&pe()&&" "===e.key&&!e.defaultPrevented&&R(e)})),ve=v;"button"===ve&&K.href&&(ve="a");var ge={};"button"===ve?(ge.type=q,ge.disabled=y):("a"===ve&&K.href||(ge.role="button"),ge["aria-disabled"]=y);var ye=Object(s.a)(i,t),xe=Object(s.a)(ne,Q),we=Object(s.a)(ye,xe),ke=a.useState(!1),Oe=ke[0],Ee=ke[1];a.useEffect((function(){Ee(!0)}),[]);var Se=Oe&&!k&&!y;return a.createElement(ve,Object(r.a)({className:Object(u.a)(h.root,m,G&&[h.focusVisible,C],y&&h.disabled),onBlur:de,onClick:R,onFocus:fe,onKeyDown:me,onKeyUp:be,onMouseDown:oe,onMouseLeave:le,onMouseUp:ie,onDragLeave:ae,onTouchEnd:se,onTouchMove:ce,onTouchStart:ue,ref:we,tabIndex:y?-1:V},ge,K),p,Se?a.createElement(I,Object(r.a)({ref:X,center:f},U)):null)}));t.a=Object(d.a)({root:{display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle","-moz-appearance":"none","-webkit-appearance":"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},"&$disabled":{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}},disabled:{},focusVisible:{}},{name:"MuiButtonBase"})(A)},,,,,,function(e,t,n){"use strict";n.r(t);var r=n(76);n.d(t,"default",(function(){return r.a}))},function(e,t,n){"use strict";var r=n(1),o=n(3),a=n(0),i=(n(6),n(4)),l=n(5),u=n(7),s=a.forwardRef((function(e,t){var n=e.children,l=e.classes,s=e.className,c=e.color,d=void 0===c?"inherit":c,f=e.component,p=void 0===f?"svg":f,h=e.fontSize,m=void 0===h?"default":h,b=e.htmlColor,v=e.titleAccess,g=e.viewBox,y=void 0===g?"0 0 24 24":g,x=Object(o.a)(e,["children","classes","className","color","component","fontSize","htmlColor","titleAccess","viewBox"]);return a.createElement(p,Object(r.a)({className:Object(i.a)(l.root,s,"inherit"!==d&&l["color".concat(Object(u.a)(d))],"default"!==m&&l["fontSize".concat(Object(u.a)(m))]),focusable:"false",viewBox:y,color:b,"aria-hidden":!v||void 0,role:v?"img":void 0,ref:t},x),n,v?a.createElement("title",null,v):null)}));s.muiName="SvgIcon",t.a=Object(l.a)((function(e){return{root:{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:"currentColor",flexShrink:0,fontSize:e.typography.pxToRem(24),transition:e.transitions.create("fill",{duration:e.transitions.duration.shorter})},colorPrimary:{color:e.palette.primary.main},colorSecondary:{color:e.palette.secondary.main},colorAction:{color:e.palette.action.active},colorError:{color:e.palette.error.main},colorDisabled:{color:e.palette.action.disabled},fontSizeInherit:{fontSize:"inherit"},fontSizeSmall:{fontSize:e.typography.pxToRem(20)},fontSizeLarge:{fontSize:e.typography.pxToRem(35)}}}),{name:"MuiSvgIcon"})(s)},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(26);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t0?r:e)-s/100).concat(a,")")},between:f,only:function(e){return f(e,e)},width:function(e){return n[e]}},c)}function s(e,t,n){var o;return Object(i.a)({gutters:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object(i.a)({paddingLeft:t(2),paddingRight:t(2)},n,Object(r.a)({},e.up("sm"),Object(i.a)({paddingLeft:t(3),paddingRight:t(3)},n[e.up("sm")])))},toolbar:(o={minHeight:56},Object(r.a)(o,"".concat(e.up("xs")," and (orientation: landscape)"),{minHeight:48}),Object(r.a)(o,e.up("sm"),{minHeight:64}),o)},n)}var c=n(93),d={black:"#000",white:"#fff"},f={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"},p={50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe"},h={50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162"},m={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},b={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},v={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},g={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},y=n(13),x={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)",hint:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:d.white,default:f[50]},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},w={text:{primary:d.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",hint:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:f[800],default:"#303030"},action:{active:d.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function k(e,t,n,r){var o=r.light||r,a=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=Object(y.d)(e.main,o):"dark"===t&&(e.dark=Object(y.a)(e.main,a)))}function O(e){var t=e.primary,n=void 0===t?{light:p[300],main:p[500],dark:p[700]}:t,r=e.secondary,l=void 0===r?{light:h.A200,main:h.A400,dark:h.A700}:r,u=e.error,s=void 0===u?{light:m[300],main:m[500],dark:m[700]}:u,O=e.warning,E=void 0===O?{light:b[300],main:b[500],dark:b[700]}:O,S=e.info,j=void 0===S?{light:v[300],main:v[500],dark:v[700]}:S,C=e.success,P=void 0===C?{light:g[300],main:g[500],dark:g[700]}:C,R=e.type,N=void 0===R?"light":R,T=e.contrastThreshold,M=void 0===T?3:T,_=e.tonalOffset,z=void 0===_?.2:_,L=Object(o.a)(e,["primary","secondary","error","warning","info","success","type","contrastThreshold","tonalOffset"]);function I(e){return Object(y.c)(e,w.text.primary)>=M?w.text.primary:x.text.primary}var A=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:700;if(!(e=Object(i.a)({},e)).main&&e[t]&&(e.main=e[t]),!e.main)throw new Error(Object(c.a)(4,t));if("string"!==typeof e.main)throw new Error(Object(c.a)(5,JSON.stringify(e.main)));return k(e,"light",n,z),k(e,"dark",r,z),e.contrastText||(e.contrastText=I(e.main)),e},D={dark:w,light:x};return Object(a.a)(Object(i.a)({common:d,type:N,primary:A(n),secondary:A(l,"A400","A200","A700"),error:A(s),warning:A(E),info:A(j),success:A(P),grey:f,contrastThreshold:M,getContrastText:I,augmentColor:A,tonalOffset:z},D[N]),L)}function E(e){return Math.round(1e5*e)/1e5}var S={textTransform:"uppercase"},j='"Roboto", "Helvetica", "Arial", sans-serif';function C(e,t){var n="function"===typeof t?t(e):t,r=n.fontFamily,l=void 0===r?j:r,u=n.fontSize,s=void 0===u?14:u,c=n.fontWeightLight,d=void 0===c?300:c,f=n.fontWeightRegular,p=void 0===f?400:f,h=n.fontWeightMedium,m=void 0===h?500:h,b=n.fontWeightBold,v=void 0===b?700:b,g=n.htmlFontSize,y=void 0===g?16:g,x=n.allVariants,w=n.pxToRem,k=Object(o.a)(n,["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"]);var O=s/14,C=w||function(e){return"".concat(e/y*O,"rem")},P=function(e,t,n,r,o){return Object(i.a)({fontFamily:l,fontWeight:e,fontSize:C(t),lineHeight:n},l===j?{letterSpacing:"".concat(E(r/t),"em")}:{},o,x)},R={h1:P(d,96,1.167,-1.5),h2:P(d,60,1.2,-.5),h3:P(p,48,1.167,0),h4:P(p,34,1.235,.25),h5:P(p,24,1.334,0),h6:P(m,20,1.6,.15),subtitle1:P(p,16,1.75,.15),subtitle2:P(m,14,1.57,.1),body1:P(p,16,1.5,.15),body2:P(p,14,1.43,.15),button:P(m,14,1.75,.4,S),caption:P(p,12,1.66,.4),overline:P(p,12,2.66,1,S)};return Object(a.a)(Object(i.a)({htmlFontSize:y,pxToRem:C,round:E,fontFamily:l,fontSize:s,fontWeightLight:d,fontWeightRegular:p,fontWeightMedium:m,fontWeightBold:v},R),k,{clone:!1})}function P(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}var R=["none",P(0,2,1,-1,0,1,1,0,0,1,3,0),P(0,3,1,-2,0,2,2,0,0,1,5,0),P(0,3,3,-2,0,3,4,0,0,1,8,0),P(0,2,4,-1,0,4,5,0,0,1,10,0),P(0,3,5,-1,0,5,8,0,0,1,14,0),P(0,3,5,-1,0,6,10,0,0,1,18,0),P(0,4,5,-2,0,7,10,1,0,2,16,1),P(0,5,5,-3,0,8,10,1,0,3,14,2),P(0,5,6,-3,0,9,12,1,0,3,16,2),P(0,6,6,-3,0,10,14,1,0,4,18,3),P(0,6,7,-4,0,11,15,1,0,4,20,3),P(0,7,8,-4,0,12,17,2,0,5,22,4),P(0,7,8,-4,0,13,19,2,0,5,24,4),P(0,7,9,-4,0,14,21,2,0,5,26,4),P(0,8,9,-5,0,15,22,2,0,6,28,5),P(0,8,10,-5,0,16,24,2,0,6,30,5),P(0,8,11,-5,0,17,26,2,0,6,32,5),P(0,9,11,-5,0,18,28,2,0,7,34,6),P(0,9,12,-6,0,19,29,2,0,7,36,6),P(0,10,13,-6,0,20,31,3,0,8,38,7),P(0,10,13,-6,0,21,33,3,0,8,40,7),P(0,10,14,-6,0,22,35,3,0,8,42,7),P(0,11,14,-7,0,23,36,3,0,9,44,8),P(0,11,15,-7,0,24,38,3,0,9,46,8)],N={borderRadius:4},T=n(184);function M(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;var t=Object(T.a)({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=e.breakpoints,n=void 0===t?{}:t,r=e.mixins,i=void 0===r?{}:r,l=e.palette,c=void 0===l?{}:l,d=e.spacing,f=e.typography,p=void 0===f?{}:f,h=Object(o.a)(e,["breakpoints","mixins","palette","spacing","typography"]),m=O(c),b=u(n),v=M(d),g=Object(a.a)({breakpoints:b,direction:"ltr",mixins:s(b,v,i),overrides:{},palette:m,props:{},shadows:R,typography:C(m,p),spacing:v,shape:N,transitions:_.a,zIndex:z.a},h),y=arguments.length,x=new Array(y>1?y-1:0),w=1;w0&&Math.abs((e.outerHeightStyle||0)-d)>1||e.overflow!==f)?(O.current+=1,{overflow:f,outerHeightStyle:d}):e}))}),[l,g,e.placeholder]);i.useEffect((function(){var e=Object(p.a)((function(){O.current=0,C()}));return window.addEventListener("resize",e),function(){e.clear(),window.removeEventListener("resize",e)}}),[C]),m((function(){C()})),i.useEffect((function(){O.current=0}),[d]);return i.createElement(i.Fragment,null,i.createElement("textarea",Object(o.a)({value:d,onChange:function(e){O.current=0,y||C(),n&&n(e)},ref:w,rows:g,style:Object(o.a)({height:S.outerHeightStyle,overflow:S.overflow?"hidden":null},c)},v)),i.createElement("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:k,tabIndex:-1,style:Object(o.a)({},b,c)}))})),g=n(35),y="undefined"===typeof window?i.useEffect:i.useLayoutEffect,x=i.forwardRef((function(e,t){var n=e["aria-describedby"],c=e.autoComplete,p=e.autoFocus,h=e.classes,m=e.className,b=(e.color,e.defaultValue),x=e.disabled,w=e.endAdornment,k=(e.error,e.fullWidth),O=void 0!==k&&k,E=e.id,S=e.inputComponent,j=void 0===S?"input":S,C=e.inputProps,P=void 0===C?{}:C,R=e.inputRef,N=(e.margin,e.multiline),T=void 0!==N&&N,M=e.name,_=e.onBlur,z=e.onChange,L=e.onClick,I=e.onFocus,A=e.onKeyDown,D=e.onKeyUp,F=e.placeholder,W=e.readOnly,B=e.renderSuffix,$=e.rows,V=e.rowsMax,U=e.rowsMin,H=e.startAdornment,q=e.type,K=void 0===q?"text":q,Q=e.value,X=Object(r.a)(e,["aria-describedby","autoComplete","autoFocus","classes","className","color","defaultValue","disabled","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","rowsMax","rowsMin","startAdornment","type","value"]),Y=null!=P.value?P.value:Q,G=i.useRef(null!=Y).current,J=i.useRef(),Z=i.useCallback((function(e){0}),[]),ee=Object(f.a)(P.ref,Z),te=Object(f.a)(R,ee),ne=Object(f.a)(J,te),re=i.useState(!1),oe=re[0],ae=re[1],ie=Object(s.b)();var le=Object(u.a)({props:e,muiFormControl:ie,states:["color","disabled","error","hiddenLabel","margin","required","filled"]});le.focused=ie?ie.focused:oe,i.useEffect((function(){!ie&&x&&oe&&(ae(!1),_&&_())}),[ie,x,oe,_]);var ue=ie&&ie.onFilled,se=ie&&ie.onEmpty,ce=i.useCallback((function(e){Object(g.b)(e)?ue&&ue():se&&se()}),[ue,se]);y((function(){G&&ce({value:Y})}),[Y,ce,G]);i.useEffect((function(){ce(J.current)}),[]);var de=j,fe=Object(o.a)({},P,{ref:ne});"string"!==typeof de?fe=Object(o.a)({inputRef:ne,type:K},fe,{ref:null}):T?!$||V||U?(fe=Object(o.a)({rows:$,rowsMax:V},fe),de=v):de="textarea":fe=Object(o.a)({type:K},fe);return i.useEffect((function(){ie&&ie.setAdornedStart(Boolean(H))}),[ie,H]),i.createElement("div",Object(o.a)({className:Object(l.a)(h.root,h["color".concat(Object(d.a)(le.color||"primary"))],m,le.disabled&&h.disabled,le.error&&h.error,O&&h.fullWidth,le.focused&&h.focused,ie&&h.formControl,T&&h.multiline,H&&h.adornedStart,w&&h.adornedEnd,"dense"===le.margin&&h.marginDense),onClick:function(e){J.current&&e.currentTarget===e.target&&J.current.focus(),L&&L(e)},ref:t},X),H,i.createElement(s.a.Provider,{value:null},i.createElement(de,Object(o.a)({"aria-invalid":le.error,"aria-describedby":n,autoComplete:c,autoFocus:p,defaultValue:b,disabled:le.disabled,id:E,onAnimationStart:function(e){ce("mui-auto-fill-cancel"===e.animationName?J.current:{value:"x"})},name:M,placeholder:F,readOnly:W,required:le.required,rows:$,value:Y,onKeyDown:A,onKeyUp:D},fe,{className:Object(l.a)(h.input,P.className,le.disabled&&h.disabled,T&&h.inputMultiline,le.hiddenLabel&&h.inputHiddenLabel,H&&h.inputAdornedStart,w&&h.inputAdornedEnd,"search"===K&&h.inputTypeSearch,"dense"===le.margin&&h.inputMarginDense),onBlur:function(e){_&&_(e),P.onBlur&&P.onBlur(e),ie&&ie.onBlur?ie.onBlur(e):ae(!1)},onChange:function(e){if(!G){var t=e.target||J.current;if(null==t)throw new Error(Object(a.a)(1));ce({value:t.value})}for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o