From eda622b6e3d02e93a93f90cb5b92db5f44dae04b Mon Sep 17 00:00:00 2001 From: aceberg <1502200+aceberg@users.noreply.github.com> Date: Sat, 15 Mar 2025 18:38:41 +0700 Subject: [PATCH 01/10] SolidJS, split back/front --- .goreleaser.yaml => backend/.goreleaser.yaml | 0 backend/LICENSE | 21 + Makefile => backend/Makefile | 0 {cmd => backend/cmd}/WatchYourLAN/main.go | 0 {configs => backend/configs}/install.sh | 0 {configs => backend/configs}/postinstall.sh | 0 .../configs}/watchyourlan.service | 0 go.mod => backend/go.mod | 18 +- go.sum => backend/go.sum | 62 +- {internal => backend/internal}/arp/arpscan.go | 0 {internal => backend/internal}/check/error.go | 0 {internal => backend/internal}/check/file.go | 0 .../internal}/conf/getconfig.go | 0 .../internal}/db/choose_db.go | 0 {internal => backend/internal}/db/connect.go | 0 {internal => backend/internal}/db/edit.go | 0 .../internal}/db/quote_str.go | 0 .../internal}/db/select-exec.go | 0 .../internal}/influx/influx.go | 0 .../internal}/models/models.go | 0 .../internal}/notify/shout.go | 0 .../internal}/portscan/scan.go | 0 {internal => backend/internal}/web/api.go | 0 {internal => backend/internal}/web/config.go | 0 .../internal}/web/const-var.go | 0 .../internal}/web/functions.go | 0 {internal => backend/internal}/web/host.go | 0 {internal => backend/internal}/web/index.go | 0 .../internal}/web/public/box.svg | 0 .../internal}/web/public/css/index.css | 0 .../internal}/web/public/favicon.png | Bin .../internal}/web/public/js/filter-search.js | 0 .../internal}/web/public/js/hist-html.js | 0 .../internal}/web/public/js/history.js | 0 .../internal}/web/public/js/host-scan.js | 0 .../internal}/web/public/js/host.js | 0 .../internal}/web/public/js/index.js | 0 .../internal}/web/public/js/notify.js | 0 .../internal}/web/public/js/refresh.js | 0 .../internal}/web/public/js/sort.js | 0 .../internal}/web/public/version | 0 .../internal}/web/routines-upd.go | 0 .../internal}/web/scan-routine.go | 0 .../internal}/web/templates/config.html | 0 .../internal}/web/templates/footer.html | 0 .../internal}/web/templates/header.html | 0 .../internal}/web/templates/history.html | 0 .../internal}/web/templates/host.html | 0 .../internal}/web/templates/index.html | 0 .../internal}/web/trim-history.go | 0 {internal => backend/internal}/web/webgui.go | 0 frontend/.gitignore | 24 + frontend/README.md | 28 + frontend/index.html | 13 + frontend/package-lock.json | 1645 +++++++++++++++++ frontend/package.json | 19 + frontend/src/App.css | 0 frontend/src/App.tsx | 14 + frontend/src/index.tsx | 7 + frontend/src/vite-env.d.ts | 1 + frontend/tsconfig.app.json | 27 + frontend/tsconfig.json | 7 + frontend/tsconfig.node.json | 24 + frontend/vite.config.ts | 6 + 64 files changed, 1873 insertions(+), 43 deletions(-) rename .goreleaser.yaml => backend/.goreleaser.yaml (100%) create mode 100644 backend/LICENSE rename Makefile => backend/Makefile (100%) rename {cmd => backend/cmd}/WatchYourLAN/main.go (100%) rename {configs => backend/configs}/install.sh (100%) rename {configs => backend/configs}/postinstall.sh (100%) rename {configs => backend/configs}/watchyourlan.service (100%) rename go.mod => backend/go.mod (85%) rename go.sum => backend/go.sum (86%) rename {internal => backend/internal}/arp/arpscan.go (100%) rename {internal => backend/internal}/check/error.go (100%) rename {internal => backend/internal}/check/file.go (100%) rename {internal => backend/internal}/conf/getconfig.go (100%) rename {internal => backend/internal}/db/choose_db.go (100%) rename {internal => backend/internal}/db/connect.go (100%) rename {internal => backend/internal}/db/edit.go (100%) rename {internal => backend/internal}/db/quote_str.go (100%) rename {internal => backend/internal}/db/select-exec.go (100%) rename {internal => backend/internal}/influx/influx.go (100%) rename {internal => backend/internal}/models/models.go (100%) rename {internal => backend/internal}/notify/shout.go (100%) rename {internal => backend/internal}/portscan/scan.go (100%) rename {internal => backend/internal}/web/api.go (100%) rename {internal => backend/internal}/web/config.go (100%) rename {internal => backend/internal}/web/const-var.go (100%) rename {internal => backend/internal}/web/functions.go (100%) rename {internal => backend/internal}/web/host.go (100%) rename {internal => backend/internal}/web/index.go (100%) rename {internal => backend/internal}/web/public/box.svg (100%) rename {internal => backend/internal}/web/public/css/index.css (100%) rename {internal => backend/internal}/web/public/favicon.png (100%) rename {internal => backend/internal}/web/public/js/filter-search.js (100%) rename {internal => backend/internal}/web/public/js/hist-html.js (100%) rename {internal => backend/internal}/web/public/js/history.js (100%) rename {internal => backend/internal}/web/public/js/host-scan.js (100%) rename {internal => backend/internal}/web/public/js/host.js (100%) rename {internal => backend/internal}/web/public/js/index.js (100%) rename {internal => backend/internal}/web/public/js/notify.js (100%) rename {internal => backend/internal}/web/public/js/refresh.js (100%) rename {internal => backend/internal}/web/public/js/sort.js (100%) rename {internal => backend/internal}/web/public/version (100%) rename {internal => backend/internal}/web/routines-upd.go (100%) rename {internal => backend/internal}/web/scan-routine.go (100%) rename {internal => backend/internal}/web/templates/config.html (100%) rename {internal => backend/internal}/web/templates/footer.html (100%) rename {internal => backend/internal}/web/templates/header.html (100%) rename {internal => backend/internal}/web/templates/history.html (100%) rename {internal => backend/internal}/web/templates/host.html (100%) rename {internal => backend/internal}/web/templates/index.html (100%) rename {internal => backend/internal}/web/trim-history.go (100%) rename {internal => backend/internal}/web/webgui.go (100%) create mode 100644 frontend/.gitignore create mode 100644 frontend/README.md create mode 100644 frontend/index.html create mode 100644 frontend/package-lock.json create mode 100644 frontend/package.json create mode 100644 frontend/src/App.css create mode 100644 frontend/src/App.tsx create mode 100644 frontend/src/index.tsx create mode 100644 frontend/src/vite-env.d.ts create mode 100644 frontend/tsconfig.app.json create mode 100644 frontend/tsconfig.json create mode 100644 frontend/tsconfig.node.json create mode 100644 frontend/vite.config.ts diff --git a/.goreleaser.yaml b/backend/.goreleaser.yaml similarity index 100% rename from .goreleaser.yaml rename to backend/.goreleaser.yaml diff --git a/backend/LICENSE b/backend/LICENSE new file mode 100644 index 0000000..aaaff2c --- /dev/null +++ b/backend/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 aceberg + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Makefile b/backend/Makefile similarity index 100% rename from Makefile rename to backend/Makefile diff --git a/cmd/WatchYourLAN/main.go b/backend/cmd/WatchYourLAN/main.go similarity index 100% rename from cmd/WatchYourLAN/main.go rename to backend/cmd/WatchYourLAN/main.go diff --git a/configs/install.sh b/backend/configs/install.sh similarity index 100% rename from configs/install.sh rename to backend/configs/install.sh diff --git a/configs/postinstall.sh b/backend/configs/postinstall.sh similarity index 100% rename from configs/postinstall.sh rename to backend/configs/postinstall.sh diff --git a/configs/watchyourlan.service b/backend/configs/watchyourlan.service similarity index 100% rename from configs/watchyourlan.service rename to backend/configs/watchyourlan.service diff --git a/go.mod b/backend/go.mod similarity index 85% rename from go.mod rename to backend/go.mod index a85297e..1d68eea 100644 --- a/go.mod +++ b/backend/go.mod @@ -1,6 +1,6 @@ module github.com/aceberg/WatchYourLAN -go 1.23.1 +go 1.23.6 require ( github.com/containrrr/shoutrrr v0.8.0 @@ -9,7 +9,7 @@ require ( github.com/jmoiron/sqlx v1.4.0 github.com/lib/pq v1.10.9 github.com/spf13/viper v1.19.0 - modernc.org/sqlite v1.33.1 + modernc.org/sqlite v1.36.1 ) require ( @@ -28,7 +28,6 @@ require ( github.com/go-playground/validator/v10 v10.20.0 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/google/uuid v1.6.0 // indirect - github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 // indirect github.com/json-iterator/go v1.1.12 // indirect @@ -57,17 +56,14 @@ require ( go.uber.org/multierr v1.9.0 // indirect golang.org/x/arch v0.8.0 // indirect golang.org/x/crypto v0.23.0 // indirect - golang.org/x/exp v0.0.0-20231108232855-2478ac86f678 // indirect + golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect golang.org/x/net v0.25.0 // indirect - golang.org/x/sys v0.22.0 // indirect + golang.org/x/sys v0.30.0 // indirect golang.org/x/text v0.15.0 // indirect google.golang.org/protobuf v1.34.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6 // indirect - modernc.org/libc v1.55.3 // indirect - modernc.org/mathutil v1.6.0 // indirect - modernc.org/memory v1.8.0 // indirect - modernc.org/strutil v1.2.0 // indirect - modernc.org/token v1.1.0 // indirect + modernc.org/libc v1.61.13 // indirect + modernc.org/mathutil v1.7.1 // indirect + modernc.org/memory v1.8.2 // indirect ) diff --git a/go.sum b/backend/go.sum similarity index 86% rename from go.sum rename to backend/go.sum index 6ce9acf..eed67b2 100644 --- a/go.sum +++ b/backend/go.sum @@ -57,8 +57,6 @@ github.com/google/pprof v0.0.0-20240409012703-83162a5b38cd h1:gbpYu9NMq8jhDVbvlG github.com/google/pprof v0.0.0-20240409012703-83162a5b38cd/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= -github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/influxdata/influxdb-client-go/v2 v2.14.0 h1:AjbBfJuq+QoaXNcrova8smSjwJdUHnwvfjMF71M1iI4= @@ -159,21 +157,23 @@ golang.org/x/arch v0.8.0 h1:3wRIsP3pM4yUptoR96otTUOXI367OS0+c9eeRi9doIc= golang.org/x/arch v0.8.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= -golang.org/x/exp v0.0.0-20231108232855-2478ac86f678 h1:mchzmB1XO2pMaKFRqk/+MV3mgGG96aqaPXaMifQU47w= -golang.org/x/exp v0.0.0-20231108232855-2478ac86f678/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= -golang.org/x/mod v0.16.0 h1:QX4fJ0Rr5cPQCF7O9lh9Se4pmwfwskqZfq5moyldzic= -golang.org/x/mod v0.16.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= +golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= +golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8= +golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= -golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= +golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw= -golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc= +golang.org/x/tools v0.23.0 h1:SGsXPZ+2l4JsgaCKkx+FQ9YZ5XEtA1GZYuoDjenLjvg= +golang.org/x/tools v0.23.0/go.mod h1:pnu6ufv6vQkll6szChhK3C3L/ruaIv5eBeztNG8wtsI= google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -184,30 +184,28 @@ gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -modernc.org/cc/v4 v4.21.4 h1:3Be/Rdo1fpr8GrQ7IVw9OHtplU4gWbb+wNgeoBMmGLQ= -modernc.org/cc/v4 v4.21.4/go.mod h1:HM7VJTZbUCR3rV8EYBi9wxnJ0ZBRiGE5OeGXNA0IsLQ= -modernc.org/ccgo/v4 v4.19.2 h1:lwQZgvboKD0jBwdaeVCTouxhxAyN6iawF3STraAal8Y= -modernc.org/ccgo/v4 v4.19.2/go.mod h1:ysS3mxiMV38XGRTTcgo0DQTeTmAO4oCmJl1nX9VFI3s= +modernc.org/cc/v4 v4.24.4 h1:TFkx1s6dCkQpd6dKurBNmpo+G8Zl4Sq/ztJ+2+DEsh0= +modernc.org/cc/v4 v4.24.4/go.mod h1:uVtb5OGqUKpoLWhqwNQo/8LwvoiEBLvZXIQ/SmO6mL0= +modernc.org/ccgo/v4 v4.23.16 h1:Z2N+kk38b7SfySC1ZkpGLN2vthNJP1+ZzGZIlH7uBxo= +modernc.org/ccgo/v4 v4.23.16/go.mod h1:nNma8goMTY7aQZQNTyN9AIoJfxav4nvTnvKThAeMDdo= modernc.org/fileutil v1.3.0 h1:gQ5SIzK3H9kdfai/5x41oQiKValumqNTDXMvKo62HvE= modernc.org/fileutil v1.3.0/go.mod h1:XatxS8fZi3pS8/hKG2GH/ArUogfxjpEKs3Ku3aK4JyQ= -modernc.org/gc/v2 v2.4.1 h1:9cNzOqPyMJBvrUipmynX0ZohMhcxPtMccYgGOJdOiBw= -modernc.org/gc/v2 v2.4.1/go.mod h1:wzN5dK1AzVGoH6XOzc3YZ+ey/jPgYHLuVckd62P0GYU= -modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6 h1:5D53IMaUuA5InSeMu9eJtlQXS2NxAhyWQvkKEgXZhHI= -modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6/go.mod h1:Qz0X07sNOR1jWYCrJMEnbW/X55x206Q7Vt4mz6/wHp4= -modernc.org/libc v1.55.3 h1:AzcW1mhlPNrRtjS5sS+eW2ISCgSOLLNyFzRh/V3Qj/U= -modernc.org/libc v1.55.3/go.mod h1:qFXepLhz+JjFThQ4kzwzOjA/y/artDeg+pcYnY+Q83w= -modernc.org/mathutil v1.6.0 h1:fRe9+AmYlaej+64JsEEhoWuAYBkOtQiMEU7n/XgfYi4= -modernc.org/mathutil v1.6.0/go.mod h1:Ui5Q9q1TR2gFm0AQRqQUaBWFLAhQpCwNcuhBOSedWPo= -modernc.org/memory v1.8.0 h1:IqGTL6eFMaDZZhEWwcREgeMXYwmW83LYW8cROZYkg+E= -modernc.org/memory v1.8.0/go.mod h1:XPZ936zp5OMKGWPqbD3JShgd/ZoQ7899TUuQqxY+peU= -modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4= -modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= -modernc.org/sortutil v1.2.0 h1:jQiD3PfS2REGJNzNCMMaLSp/wdMNieTbKX920Cqdgqc= -modernc.org/sortutil v1.2.0/go.mod h1:TKU2s7kJMf1AE84OoiGppNHJwvB753OYfNl2WRb++Ss= -modernc.org/sqlite v1.33.1 h1:trb6Z3YYoeM9eDL1O8do81kP+0ejv+YzgyFo+Gwy0nM= -modernc.org/sqlite v1.33.1/go.mod h1:pXV2xHxhzXZsgT/RtTFAPY6JJDEvOTcTdwADQCCWD4k= -modernc.org/strutil v1.2.0 h1:agBi9dp1I+eOnxXeiZawM8F4LawKv4NzGWSaLfyeNZA= -modernc.org/strutil v1.2.0/go.mod h1:/mdcBmfOibveCTBxUl5B5l6W+TTH1FXPLHZE6bTosX0= +modernc.org/gc/v2 v2.6.3 h1:aJVhcqAte49LF+mGveZ5KPlsp4tdGdAOT4sipJXADjw= +modernc.org/gc/v2 v2.6.3/go.mod h1:YgIahr1ypgfe7chRuJi2gD7DBQiKSLMPgBQe9oIiito= +modernc.org/libc v1.61.13 h1:3LRd6ZO1ezsFiX1y+bHd1ipyEHIJKvuprv0sLTBwLW8= +modernc.org/libc v1.61.13/go.mod h1:8F/uJWL/3nNil0Lgt1Dpz+GgkApWh04N3el3hxJcA6E= +modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU= +modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg= +modernc.org/memory v1.8.2 h1:cL9L4bcoAObu4NkxOlKWBWtNHIsnnACGF/TbqQ6sbcI= +modernc.org/memory v1.8.2/go.mod h1:ZbjSvMO5NQ1A2i3bWeDiVMxIorXwdClKE/0SZ+BMotU= +modernc.org/opt v0.1.4 h1:2kNGMRiUjrp4LcaPuLY2PzUfqM/w9N23quVwhKt5Qm8= +modernc.org/opt v0.1.4/go.mod h1:03fq9lsNfvkYSfxrfUhZCWPk1lm4cq4N+Bh//bEtgns= +modernc.org/sortutil v1.2.1 h1:+xyoGf15mM3NMlPDnFqrteY07klSFxLElE2PVuWIJ7w= +modernc.org/sortutil v1.2.1/go.mod h1:7ZI3a3REbai7gzCLcotuw9AC4VZVpYMjDzETGsSMqJE= +modernc.org/sqlite v1.36.1 h1:bDa8BJUH4lg6EGkLbahKe/8QqoF8p9gArSc6fTqYhyQ= +modernc.org/sqlite v1.36.1/go.mod h1:7MPwH7Z6bREicF9ZVUR78P1IKuxfZ8mRIDHD0iD+8TU= +modernc.org/strutil v1.2.1 h1:UneZBkQA+DX2Rp35KcM69cSsNES9ly8mQWD71HKlOA0= +modernc.org/strutil v1.2.1/go.mod h1:EHkiggD70koQxjVdSBM3JKM7k6L0FbGE5eymy9i3B9A= modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= nullprogram.com/x/optparse v1.0.0/go.mod h1:KdyPE+Igbe0jQUrVfMqDMeJQIJZEuyV7pjYmp6pbG50= diff --git a/internal/arp/arpscan.go b/backend/internal/arp/arpscan.go similarity index 100% rename from internal/arp/arpscan.go rename to backend/internal/arp/arpscan.go diff --git a/internal/check/error.go b/backend/internal/check/error.go similarity index 100% rename from internal/check/error.go rename to backend/internal/check/error.go diff --git a/internal/check/file.go b/backend/internal/check/file.go similarity index 100% rename from internal/check/file.go rename to backend/internal/check/file.go diff --git a/internal/conf/getconfig.go b/backend/internal/conf/getconfig.go similarity index 100% rename from internal/conf/getconfig.go rename to backend/internal/conf/getconfig.go diff --git a/internal/db/choose_db.go b/backend/internal/db/choose_db.go similarity index 100% rename from internal/db/choose_db.go rename to backend/internal/db/choose_db.go diff --git a/internal/db/connect.go b/backend/internal/db/connect.go similarity index 100% rename from internal/db/connect.go rename to backend/internal/db/connect.go diff --git a/internal/db/edit.go b/backend/internal/db/edit.go similarity index 100% rename from internal/db/edit.go rename to backend/internal/db/edit.go diff --git a/internal/db/quote_str.go b/backend/internal/db/quote_str.go similarity index 100% rename from internal/db/quote_str.go rename to backend/internal/db/quote_str.go diff --git a/internal/db/select-exec.go b/backend/internal/db/select-exec.go similarity index 100% rename from internal/db/select-exec.go rename to backend/internal/db/select-exec.go diff --git a/internal/influx/influx.go b/backend/internal/influx/influx.go similarity index 100% rename from internal/influx/influx.go rename to backend/internal/influx/influx.go diff --git a/internal/models/models.go b/backend/internal/models/models.go similarity index 100% rename from internal/models/models.go rename to backend/internal/models/models.go diff --git a/internal/notify/shout.go b/backend/internal/notify/shout.go similarity index 100% rename from internal/notify/shout.go rename to backend/internal/notify/shout.go diff --git a/internal/portscan/scan.go b/backend/internal/portscan/scan.go similarity index 100% rename from internal/portscan/scan.go rename to backend/internal/portscan/scan.go diff --git a/internal/web/api.go b/backend/internal/web/api.go similarity index 100% rename from internal/web/api.go rename to backend/internal/web/api.go diff --git a/internal/web/config.go b/backend/internal/web/config.go similarity index 100% rename from internal/web/config.go rename to backend/internal/web/config.go diff --git a/internal/web/const-var.go b/backend/internal/web/const-var.go similarity index 100% rename from internal/web/const-var.go rename to backend/internal/web/const-var.go diff --git a/internal/web/functions.go b/backend/internal/web/functions.go similarity index 100% rename from internal/web/functions.go rename to backend/internal/web/functions.go diff --git a/internal/web/host.go b/backend/internal/web/host.go similarity index 100% rename from internal/web/host.go rename to backend/internal/web/host.go diff --git a/internal/web/index.go b/backend/internal/web/index.go similarity index 100% rename from internal/web/index.go rename to backend/internal/web/index.go diff --git a/internal/web/public/box.svg b/backend/internal/web/public/box.svg similarity index 100% rename from internal/web/public/box.svg rename to backend/internal/web/public/box.svg diff --git a/internal/web/public/css/index.css b/backend/internal/web/public/css/index.css similarity index 100% rename from internal/web/public/css/index.css rename to backend/internal/web/public/css/index.css diff --git a/internal/web/public/favicon.png b/backend/internal/web/public/favicon.png similarity index 100% rename from internal/web/public/favicon.png rename to backend/internal/web/public/favicon.png diff --git a/internal/web/public/js/filter-search.js b/backend/internal/web/public/js/filter-search.js similarity index 100% rename from internal/web/public/js/filter-search.js rename to backend/internal/web/public/js/filter-search.js diff --git a/internal/web/public/js/hist-html.js b/backend/internal/web/public/js/hist-html.js similarity index 100% rename from internal/web/public/js/hist-html.js rename to backend/internal/web/public/js/hist-html.js diff --git a/internal/web/public/js/history.js b/backend/internal/web/public/js/history.js similarity index 100% rename from internal/web/public/js/history.js rename to backend/internal/web/public/js/history.js diff --git a/internal/web/public/js/host-scan.js b/backend/internal/web/public/js/host-scan.js similarity index 100% rename from internal/web/public/js/host-scan.js rename to backend/internal/web/public/js/host-scan.js diff --git a/internal/web/public/js/host.js b/backend/internal/web/public/js/host.js similarity index 100% rename from internal/web/public/js/host.js rename to backend/internal/web/public/js/host.js diff --git a/internal/web/public/js/index.js b/backend/internal/web/public/js/index.js similarity index 100% rename from internal/web/public/js/index.js rename to backend/internal/web/public/js/index.js diff --git a/internal/web/public/js/notify.js b/backend/internal/web/public/js/notify.js similarity index 100% rename from internal/web/public/js/notify.js rename to backend/internal/web/public/js/notify.js diff --git a/internal/web/public/js/refresh.js b/backend/internal/web/public/js/refresh.js similarity index 100% rename from internal/web/public/js/refresh.js rename to backend/internal/web/public/js/refresh.js diff --git a/internal/web/public/js/sort.js b/backend/internal/web/public/js/sort.js similarity index 100% rename from internal/web/public/js/sort.js rename to backend/internal/web/public/js/sort.js diff --git a/internal/web/public/version b/backend/internal/web/public/version similarity index 100% rename from internal/web/public/version rename to backend/internal/web/public/version diff --git a/internal/web/routines-upd.go b/backend/internal/web/routines-upd.go similarity index 100% rename from internal/web/routines-upd.go rename to backend/internal/web/routines-upd.go diff --git a/internal/web/scan-routine.go b/backend/internal/web/scan-routine.go similarity index 100% rename from internal/web/scan-routine.go rename to backend/internal/web/scan-routine.go diff --git a/internal/web/templates/config.html b/backend/internal/web/templates/config.html similarity index 100% rename from internal/web/templates/config.html rename to backend/internal/web/templates/config.html diff --git a/internal/web/templates/footer.html b/backend/internal/web/templates/footer.html similarity index 100% rename from internal/web/templates/footer.html rename to backend/internal/web/templates/footer.html diff --git a/internal/web/templates/header.html b/backend/internal/web/templates/header.html similarity index 100% rename from internal/web/templates/header.html rename to backend/internal/web/templates/header.html diff --git a/internal/web/templates/history.html b/backend/internal/web/templates/history.html similarity index 100% rename from internal/web/templates/history.html rename to backend/internal/web/templates/history.html diff --git a/internal/web/templates/host.html b/backend/internal/web/templates/host.html similarity index 100% rename from internal/web/templates/host.html rename to backend/internal/web/templates/host.html diff --git a/internal/web/templates/index.html b/backend/internal/web/templates/index.html similarity index 100% rename from internal/web/templates/index.html rename to backend/internal/web/templates/index.html diff --git a/internal/web/trim-history.go b/backend/internal/web/trim-history.go similarity index 100% rename from internal/web/trim-history.go rename to backend/internal/web/trim-history.go diff --git a/internal/web/webgui.go b/backend/internal/web/webgui.go similarity index 100% rename from internal/web/webgui.go rename to backend/internal/web/webgui.go diff --git a/frontend/.gitignore b/frontend/.gitignore new file mode 100644 index 0000000..a547bf3 --- /dev/null +++ b/frontend/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/frontend/README.md b/frontend/README.md new file mode 100644 index 0000000..167c567 --- /dev/null +++ b/frontend/README.md @@ -0,0 +1,28 @@ +## Usage + +```bash +$ npm install # or pnpm install or yarn install +``` + +### Learn more on the [Solid Website](https://solidjs.com) and come chat with us on our [Discord](https://discord.com/invite/solidjs) + +## Available Scripts + +In the project directory, you can run: + +### `npm run dev` + +Runs the app in the development mode.
+Open [http://localhost:5173](http://localhost:5173) to view it in the browser. + +### `npm run build` + +Builds the app for production to the `dist` folder.
+It correctly bundles Solid in production mode and optimizes the build for the best performance. + +The build is minified and the filenames include the hashes.
+Your app is ready to be deployed! + +## Deployment + +Learn more about deploying your application with the [documentations](https://vite.dev/guide/static-deploy.html) diff --git a/frontend/index.html b/frontend/index.html new file mode 100644 index 0000000..7b0e298 --- /dev/null +++ b/frontend/index.html @@ -0,0 +1,13 @@ + + + + + + + WatchYourLAN + + +
+ + + diff --git a/frontend/package-lock.json b/frontend/package-lock.json new file mode 100644 index 0000000..93c91c4 --- /dev/null +++ b/frontend/package-lock.json @@ -0,0 +1,1645 @@ +{ + "name": "watchyourlan", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "watchyourlan", + "version": "0.0.0", + "dependencies": { + "solid-js": "^1.9.5" + }, + "devDependencies": { + "typescript": "~5.7.2", + "vite": "^6.2.0", + "vite-plugin-solid": "^2.11.2" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", + "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.25.9", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.26.8", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.8.tgz", + "integrity": "sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.10.tgz", + "integrity": "sha512-vMqyb7XCDMPvJFFOaT9kxtiRh42GwlZEg1/uIgtZshS5a/8OaduUfCi7kynKgc3Tw/6Uo2D+db9qBttghhmxwQ==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.26.2", + "@babel/generator": "^7.26.10", + "@babel/helper-compilation-targets": "^7.26.5", + "@babel/helper-module-transforms": "^7.26.0", + "@babel/helpers": "^7.26.10", + "@babel/parser": "^7.26.10", + "@babel/template": "^7.26.9", + "@babel/traverse": "^7.26.10", + "@babel/types": "^7.26.10", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.10.tgz", + "integrity": "sha512-rRHT8siFIXQrAYOYqZQVsAr8vJ+cBNqcVAY6m5V8/4QqzaPl+zDBe6cLEPRDuNOUf3ww8RfJVlOyQMoSI+5Ang==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.26.10", + "@babel/types": "^7.26.10", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.26.5", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.26.5.tgz", + "integrity": "sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.26.5", + "@babel/helper-validator-option": "^7.25.9", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", + "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", + "dev": true, + "dependencies": { + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz", + "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9", + "@babel/traverse": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.26.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.26.5.tgz", + "integrity": "sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz", + "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.10.tgz", + "integrity": "sha512-UPYc3SauzZ3JGgj87GgZ89JVdC5dj0AoetR5Bw6wj4niittNyFh6+eOGonYvJ1ao6B8lEa3Q3klS7ADZ53bc5g==", + "dev": true, + "dependencies": { + "@babel/template": "^7.26.9", + "@babel/types": "^7.26.10" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.10.tgz", + "integrity": "sha512-6aQR2zGE/QFi8JpDLjUZEPYOs7+mhKXm86VaKFiLP35JQwQb6bwUE+XbvkH0EptsYhbNBSUGaUBLKqxH1xSgsA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.26.10" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.9.tgz", + "integrity": "sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.26.9", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.26.9.tgz", + "integrity": "sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.26.2", + "@babel/parser": "^7.26.9", + "@babel/types": "^7.26.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.10.tgz", + "integrity": "sha512-k8NuDrxr0WrPH5Aupqb2LCVURP/S0vBEn5mK6iH+GIYob66U5EtoZvcdudR2jQ4cmTwhEwW1DLB+Yyas9zjF6A==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.26.2", + "@babel/generator": "^7.26.10", + "@babel/parser": "^7.26.10", + "@babel/template": "^7.26.9", + "@babel/types": "^7.26.10", + "debug": "^4.3.1", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.26.10", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.10.tgz", + "integrity": "sha512-emqcG3vHrpxUKTrxcblR36dcrcoRDvKmnL/dCL6ZsHaShW80qxCAcNhzQZrpeM765VzEos+xOi4s+r4IXzTwdQ==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.1.tgz", + "integrity": "sha512-kfYGy8IdzTGy+z0vFGvExZtxkFlA4zAxgKEahG9KE1ScBjpQnFsNOX8KTU5ojNru5ed5CVoJYXFtoxaq5nFbjQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.1.tgz", + "integrity": "sha512-dp+MshLYux6j/JjdqVLnMglQlFu+MuVeNrmT5nk6q07wNhCdSnB7QZj+7G8VMUGh1q+vj2Bq8kRsuyA00I/k+Q==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.1.tgz", + "integrity": "sha512-50tM0zCJW5kGqgG7fQ7IHvQOcAn9TKiVRuQ/lN0xR+T2lzEFvAi1ZcS8DiksFcEpf1t/GYOeOfCAgDHFpkiSmA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.1.tgz", + "integrity": "sha512-GCj6WfUtNldqUzYkN/ITtlhwQqGWu9S45vUXs7EIYf+7rCiiqH9bCloatO9VhxsL0Pji+PF4Lz2XXCES+Q8hDw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.1.tgz", + "integrity": "sha512-5hEZKPf+nQjYoSr/elb62U19/l1mZDdqidGfmFutVUjjUZrOazAtwK+Kr+3y0C/oeJfLlxo9fXb1w7L+P7E4FQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.1.tgz", + "integrity": "sha512-hxVnwL2Dqs3fM1IWq8Iezh0cX7ZGdVhbTfnOy5uURtao5OIVCEyj9xIzemDi7sRvKsuSdtCAhMKarxqtlyVyfA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.1.tgz", + "integrity": "sha512-1MrCZs0fZa2g8E+FUo2ipw6jw5qqQiH+tERoS5fAfKnRx6NXH31tXBKI3VpmLijLH6yriMZsxJtaXUyFt/8Y4A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.1.tgz", + "integrity": "sha512-0IZWLiTyz7nm0xuIs0q1Y3QWJC52R8aSXxe40VUxm6BB1RNmkODtW6LHvWRrGiICulcX7ZvyH6h5fqdLu4gkww==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.1.tgz", + "integrity": "sha512-NdKOhS4u7JhDKw9G3cY6sWqFcnLITn6SqivVArbzIaf3cemShqfLGHYMx8Xlm/lBit3/5d7kXvriTUGa5YViuQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.1.tgz", + "integrity": "sha512-jaN3dHi0/DDPelk0nLcXRm1q7DNJpjXy7yWaWvbfkPvI+7XNSc/lDOnCLN7gzsyzgu6qSAmgSvP9oXAhP973uQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.1.tgz", + "integrity": "sha512-OJykPaF4v8JidKNGz8c/q1lBO44sQNUQtq1KktJXdBLn1hPod5rE/Hko5ugKKZd+D2+o1a9MFGUEIUwO2YfgkQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.1.tgz", + "integrity": "sha512-nGfornQj4dzcq5Vp835oM/o21UMlXzn79KobKlcs3Wz9smwiifknLy4xDCLUU0BWp7b/houtdrgUz7nOGnfIYg==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.1.tgz", + "integrity": "sha512-1osBbPEFYwIE5IVB/0g2X6i1qInZa1aIoj1TdL4AaAb55xIIgbg8Doq6a5BzYWgr+tEcDzYH67XVnTmUzL+nXg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.1.tgz", + "integrity": "sha512-/6VBJOwUf3TdTvJZ82qF3tbLuWsscd7/1w+D9LH0W/SqUgM5/JJD0lrJ1fVIfZsqB6RFmLCe0Xz3fmZc3WtyVg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.1.tgz", + "integrity": "sha512-nSut/Mx5gnilhcq2yIMLMe3Wl4FK5wx/o0QuuCLMtmJn+WeWYoEGDN1ipcN72g1WHsnIbxGXd4i/MF0gTcuAjQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.1.tgz", + "integrity": "sha512-cEECeLlJNfT8kZHqLarDBQso9a27o2Zd2AQ8USAEoGtejOrCYHNtKP8XQhMDJMtthdF4GBmjR2au3x1udADQQQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.1.tgz", + "integrity": "sha512-xbfUhu/gnvSEg+EGovRc+kjBAkrvtk38RlerAzQxvMzlB4fXpCFCeUAYzJvrnhFtdeyVCDANSjJvOvGYoeKzFA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.1.tgz", + "integrity": "sha512-O96poM2XGhLtpTh+s4+nP7YCCAfb4tJNRVZHfIE7dgmax+yMP2WgMd2OecBuaATHKTHsLWHQeuaxMRnCsH8+5g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.1.tgz", + "integrity": "sha512-X53z6uXip6KFXBQ+Krbx25XHV/NCbzryM6ehOAeAil7X7oa4XIq+394PWGnwaSQ2WRA0KI6PUO6hTO5zeF5ijA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.1.tgz", + "integrity": "sha512-Na9T3szbXezdzM/Kfs3GcRQNjHzM6GzFBeU1/6IV/npKP5ORtp9zbQjvkDJ47s6BCgaAZnnnu/cY1x342+MvZg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.1.tgz", + "integrity": "sha512-T3H78X2h1tszfRSf+txbt5aOp/e7TAz3ptVKu9Oyir3IAOFPGV6O9c2naym5TOriy1l0nNf6a4X5UXRZSGX/dw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.1.tgz", + "integrity": "sha512-2H3RUvcmULO7dIE5EWJH8eubZAI4xw54H1ilJnRNZdeo8dTADEZ21w6J22XBkXqGJbe0+wnNJtw3UXRoLJnFEg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.1.tgz", + "integrity": "sha512-GE7XvrdOzrb+yVKB9KsRMq+7a2U/K5Cf/8grVFRAGJmfADr/e/ODQ134RK2/eeHqYV5eQRFxb1hY7Nr15fv1NQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.1.tgz", + "integrity": "sha512-uOxSJCIcavSiT6UnBhBzE8wy3n0hOkJsBOzy7HDAuTDE++1DJMRRVCPGisULScHL+a/ZwdXPpXD3IyFKjA7K8A==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.1.tgz", + "integrity": "sha512-Y1EQdcfwMSeQN/ujR5VayLOJ1BHaK+ssyk0AEzPjC+t1lITgsnccPqFjb6V+LsTp/9Iov4ysfjxLaGJ9RPtkVg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", + "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.35.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.35.0.tgz", + "integrity": "sha512-uYQ2WfPaqz5QtVgMxfN6NpLD+no0MYHDBywl7itPYd3K5TjjSghNKmX8ic9S8NU8w81NVhJv/XojcHptRly7qQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.35.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.35.0.tgz", + "integrity": "sha512-FtKddj9XZudurLhdJnBl9fl6BwCJ3ky8riCXjEw3/UIbjmIY58ppWwPEvU3fNu+W7FUsAsB1CdH+7EQE6CXAPA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.35.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.35.0.tgz", + "integrity": "sha512-Uk+GjOJR6CY844/q6r5DR/6lkPFOw0hjfOIzVx22THJXMxktXG6CbejseJFznU8vHcEBLpiXKY3/6xc+cBm65Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.35.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.35.0.tgz", + "integrity": "sha512-3IrHjfAS6Vkp+5bISNQnPogRAW5GAV1n+bNCrDwXmfMHbPl5EhTmWtfmwlJxFRUCBZ+tZ/OxDyU08aF6NI/N5Q==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.35.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.35.0.tgz", + "integrity": "sha512-sxjoD/6F9cDLSELuLNnY0fOrM9WA0KrM0vWm57XhrIMf5FGiN8D0l7fn+bpUeBSU7dCgPV2oX4zHAsAXyHFGcQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.35.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.35.0.tgz", + "integrity": "sha512-2mpHCeRuD1u/2kruUiHSsnjWtHjqVbzhBkNVQ1aVD63CcexKVcQGwJ2g5VphOd84GvxfSvnnlEyBtQCE5hxVVw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.35.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.35.0.tgz", + "integrity": "sha512-mrA0v3QMy6ZSvEuLs0dMxcO2LnaCONs1Z73GUDBHWbY8tFFocM6yl7YyMu7rz4zS81NDSqhrUuolyZXGi8TEqg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.35.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.35.0.tgz", + "integrity": "sha512-DnYhhzcvTAKNexIql8pFajr0PiDGrIsBYPRvCKlA5ixSS3uwo/CWNZxB09jhIapEIg945KOzcYEAGGSmTSpk7A==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.35.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.35.0.tgz", + "integrity": "sha512-uagpnH2M2g2b5iLsCTZ35CL1FgyuzzJQ8L9VtlJ+FckBXroTwNOaD0z0/UF+k5K3aNQjbm8LIVpxykUOQt1m/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.35.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.35.0.tgz", + "integrity": "sha512-XQxVOCd6VJeHQA/7YcqyV0/88N6ysSVzRjJ9I9UA/xXpEsjvAgDTgH3wQYz5bmr7SPtVK2TsP2fQ2N9L4ukoUg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loongarch64-gnu": { + "version": "4.35.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.35.0.tgz", + "integrity": "sha512-5pMT5PzfgwcXEwOaSrqVsz/LvjDZt+vQ8RT/70yhPU06PTuq8WaHhfT1LW+cdD7mW6i/J5/XIkX/1tCAkh1W6g==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.35.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.35.0.tgz", + "integrity": "sha512-c+zkcvbhbXF98f4CtEIP1EBA/lCic5xB0lToneZYvMeKu5Kamq3O8gqrxiYYLzlZH6E3Aq+TSW86E4ay8iD8EA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.35.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.35.0.tgz", + "integrity": "sha512-s91fuAHdOwH/Tad2tzTtPX7UZyytHIRR6V4+2IGlV0Cej5rkG0R61SX4l4y9sh0JBibMiploZx3oHKPnQBKe4g==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.35.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.35.0.tgz", + "integrity": "sha512-hQRkPQPLYJZYGP+Hj4fR9dDBMIM7zrzJDWFEMPdTnTy95Ljnv0/4w/ixFw3pTBMEuuEuoqtBINYND4M7ujcuQw==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.35.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.35.0.tgz", + "integrity": "sha512-Pim1T8rXOri+0HmV4CdKSGrqcBWX0d1HoPnQ0uw0bdp1aP5SdQVNBy8LjYncvnLgu3fnnCt17xjWGd4cqh8/hA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.35.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.35.0.tgz", + "integrity": "sha512-QysqXzYiDvQWfUiTm8XmJNO2zm9yC9P/2Gkrwg2dH9cxotQzunBHYr6jk4SujCTqnfGxduOmQcI7c2ryuW8XVg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.35.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.35.0.tgz", + "integrity": "sha512-OUOlGqPkVJCdJETKOCEf1mw848ZyJ5w50/rZ/3IBQVdLfR5jk/6Sr5m3iO2tdPgwo0x7VcncYuOvMhBWZq8ayg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.35.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.35.0.tgz", + "integrity": "sha512-2/lsgejMrtwQe44glq7AFFHLfJBPafpsTa6JvP2NGef/ifOa4KBoglVf7AKN7EV9o32evBPRqfg96fEHzWo5kw==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.35.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.35.0.tgz", + "integrity": "sha512-PIQeY5XDkrOysbQblSW7v3l1MDZzkTEzAfTPkj5VAu3FW8fS4ynyLg2sINp0fp3SjZ8xkRYpLqoKcYqAkhU1dw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.6.8", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz", + "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.20.6", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.6.tgz", + "integrity": "sha512-r1bzfrm0tomOI8g1SzvCaQHo6Lcv6zu0EA+W2kHrt8dyrHQxGzBBL4kdkzIS+jBMV+EYcMAEAqXqYaLJq5rOZg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.20.7" + } + }, + "node_modules/@types/estree": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "dev": true + }, + "node_modules/babel-plugin-jsx-dom-expressions": { + "version": "0.39.7", + "resolved": "https://registry.npmjs.org/babel-plugin-jsx-dom-expressions/-/babel-plugin-jsx-dom-expressions-0.39.7.tgz", + "integrity": "sha512-8GzVmFla7jaTNWW8W+lTMl9YGva4/06CtwJjySnkYtt8G1v9weCzc2SuF1DfrudcCNb2Doetc1FRg33swBYZCA==", + "dev": true, + "dependencies": { + "@babel/helper-module-imports": "7.18.6", + "@babel/plugin-syntax-jsx": "^7.18.6", + "@babel/types": "^7.20.7", + "html-entities": "2.3.3", + "parse5": "^7.1.2", + "validate-html-nesting": "^1.2.1" + }, + "peerDependencies": { + "@babel/core": "^7.20.12" + } + }, + "node_modules/babel-plugin-jsx-dom-expressions/node_modules/@babel/helper-module-imports": { + "version": "7.18.6", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", + "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.18.6" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/babel-preset-solid": { + "version": "1.9.5", + "resolved": "https://registry.npmjs.org/babel-preset-solid/-/babel-preset-solid-1.9.5.tgz", + "integrity": "sha512-85I3osODJ1LvZbv8wFozROV1vXq32BubqHXAGu73A//TRs3NLI1OFP83AQBUTSQHwgZQmARjHlJciym3we+V+w==", + "dev": true, + "dependencies": { + "babel-plugin-jsx-dom-expressions": "^0.39.7" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/browserslist": { + "version": "4.24.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz", + "integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001688", + "electron-to-chromium": "^1.5.73", + "node-releases": "^2.0.19", + "update-browserslist-db": "^1.1.1" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001704", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001704.tgz", + "integrity": "sha512-+L2IgBbV6gXB4ETf0keSvLr7JUrRVbIaB/lrQ1+z8mRcQiisG5k+lG6O4n6Y5q6f5EuNfaYXKgymucphlEXQew==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==" + }, + "node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "dev": true, + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/electron-to-chromium": { + "version": "1.5.118", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.118.tgz", + "integrity": "sha512-yNDUus0iultYyVoEFLnQeei7LOQkL8wg8GQpkPCRrOlJXlcCwa6eGKZkxQ9ciHsqZyYbj8Jd94X1CTPzGm+uIA==", + "dev": true + }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "dev": true, + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/esbuild": { + "version": "0.25.1", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.1.tgz", + "integrity": "sha512-BGO5LtrGC7vxnqucAe/rmvKdJllfGaYWdyABvyMoXQlfYMb2bbRuReWR5tEGE//4LcNJj9XrkovTqNYRFZHAMQ==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.1", + "@esbuild/android-arm": "0.25.1", + "@esbuild/android-arm64": "0.25.1", + "@esbuild/android-x64": "0.25.1", + "@esbuild/darwin-arm64": "0.25.1", + "@esbuild/darwin-x64": "0.25.1", + "@esbuild/freebsd-arm64": "0.25.1", + "@esbuild/freebsd-x64": "0.25.1", + "@esbuild/linux-arm": "0.25.1", + "@esbuild/linux-arm64": "0.25.1", + "@esbuild/linux-ia32": "0.25.1", + "@esbuild/linux-loong64": "0.25.1", + "@esbuild/linux-mips64el": "0.25.1", + "@esbuild/linux-ppc64": "0.25.1", + "@esbuild/linux-riscv64": "0.25.1", + "@esbuild/linux-s390x": "0.25.1", + "@esbuild/linux-x64": "0.25.1", + "@esbuild/netbsd-arm64": "0.25.1", + "@esbuild/netbsd-x64": "0.25.1", + "@esbuild/openbsd-arm64": "0.25.1", + "@esbuild/openbsd-x64": "0.25.1", + "@esbuild/sunos-x64": "0.25.1", + "@esbuild/win32-arm64": "0.25.1", + "@esbuild/win32-ia32": "0.25.1", + "@esbuild/win32-x64": "0.25.1" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/html-entities": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.3.3.tgz", + "integrity": "sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA==", + "dev": true + }, + "node_modules/is-what": { + "version": "4.1.16", + "resolved": "https://registry.npmjs.org/is-what/-/is-what-4.1.16.tgz", + "integrity": "sha512-ZhMwEosbFJkA0YhFnNDgTM4ZxDRsS6HqTo7qsZM08fehyRYIYa0yHu5R6mgo1n/8MgaPBXiPimPD77baVFYg+A==", + "dev": true, + "engines": { + "node": ">=12.13" + }, + "funding": { + "url": "https://github.com/sponsors/mesqueeb" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/merge-anything": { + "version": "5.1.7", + "resolved": "https://registry.npmjs.org/merge-anything/-/merge-anything-5.1.7.tgz", + "integrity": "sha512-eRtbOb1N5iyH0tkQDAoQ4Ipsp/5qSR79Dzrz8hEPxRX10RWWR/iQXdoKmBSRCThY1Fh5EhISDtpSc93fpxUniQ==", + "dev": true, + "dependencies": { + "is-what": "^4.1.8" + }, + "engines": { + "node": ">=12.13" + }, + "funding": { + "url": "https://github.com/sponsors/mesqueeb" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "node_modules/nanoid": { + "version": "3.3.9", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.9.tgz", + "integrity": "sha512-SppoicMGpZvbF1l3z4x7No3OlIjP7QJvC9XR7AhZr1kL133KHnKPztkKDc+Ir4aJ/1VhTySrtKhrsycmrMQfvg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/node-releases": { + "version": "2.0.19", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", + "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", + "dev": true + }, + "node_modules/parse5": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.2.1.tgz", + "integrity": "sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ==", + "dev": true, + "dependencies": { + "entities": "^4.5.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true + }, + "node_modules/postcss": { + "version": "8.5.3", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.3.tgz", + "integrity": "sha512-dle9A3yYxlBSrt8Fu+IpjGT8SY8hN0mlaA6GY8t0P5PjIOZemULz/E2Bnm/2dcUOena75OTNkHI76uZBNUUq3A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.8", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/rollup": { + "version": "4.35.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.35.0.tgz", + "integrity": "sha512-kg6oI4g+vc41vePJyO6dHt/yl0Rz3Thv0kJeVQ3D1kS3E5XSuKbPc29G4IpT/Kv1KQwgHVcN+HtyS+HYLNSvQg==", + "dev": true, + "dependencies": { + "@types/estree": "1.0.6" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.35.0", + "@rollup/rollup-android-arm64": "4.35.0", + "@rollup/rollup-darwin-arm64": "4.35.0", + "@rollup/rollup-darwin-x64": "4.35.0", + "@rollup/rollup-freebsd-arm64": "4.35.0", + "@rollup/rollup-freebsd-x64": "4.35.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.35.0", + "@rollup/rollup-linux-arm-musleabihf": "4.35.0", + "@rollup/rollup-linux-arm64-gnu": "4.35.0", + "@rollup/rollup-linux-arm64-musl": "4.35.0", + "@rollup/rollup-linux-loongarch64-gnu": "4.35.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.35.0", + "@rollup/rollup-linux-riscv64-gnu": "4.35.0", + "@rollup/rollup-linux-s390x-gnu": "4.35.0", + "@rollup/rollup-linux-x64-gnu": "4.35.0", + "@rollup/rollup-linux-x64-musl": "4.35.0", + "@rollup/rollup-win32-arm64-msvc": "4.35.0", + "@rollup/rollup-win32-ia32-msvc": "4.35.0", + "@rollup/rollup-win32-x64-msvc": "4.35.0", + "fsevents": "~2.3.2" + } + }, + "node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/seroval": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/seroval/-/seroval-1.2.1.tgz", + "integrity": "sha512-yBxFFs3zmkvKNmR0pFSU//rIsYjuX418TnlDmc2weaq5XFDqDIV/NOMPBoLrbxjLH42p4UzRuXHryXh9dYcKcw==", + "engines": { + "node": ">=10" + } + }, + "node_modules/seroval-plugins": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/seroval-plugins/-/seroval-plugins-1.2.1.tgz", + "integrity": "sha512-H5vs53+39+x4Udwp4J5rNZfgFuA+Lt+uU+09w1gYBVWomtAl98B+E9w7yC05Xc81/HgLvJdlyqJbU0fJCKCmdw==", + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "seroval": "^1.0" + } + }, + "node_modules/solid-js": { + "version": "1.9.5", + "resolved": "https://registry.npmjs.org/solid-js/-/solid-js-1.9.5.tgz", + "integrity": "sha512-ogI3DaFcyn6UhYhrgcyRAMbu/buBJitYQASZz5WzfQVPP10RD2AbCoRZ517psnezrasyCbWzIxZ6kVqet768xw==", + "dependencies": { + "csstype": "^3.1.0", + "seroval": "^1.1.0", + "seroval-plugins": "^1.1.0" + } + }, + "node_modules/solid-refresh": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/solid-refresh/-/solid-refresh-0.6.3.tgz", + "integrity": "sha512-F3aPsX6hVw9ttm5LYlth8Q15x6MlI/J3Dn+o3EQyRTtTxidepSTwAYdozt01/YA+7ObcciagGEyXIopGZzQtbA==", + "dev": true, + "dependencies": { + "@babel/generator": "^7.23.6", + "@babel/helper-module-imports": "^7.22.15", + "@babel/types": "^7.23.6" + }, + "peerDependencies": { + "solid-js": "^1.3" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/typescript": { + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.3.tgz", + "integrity": "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.3.tgz", + "integrity": "sha512-UxhIZQ+QInVdunkDAaiazvvT/+fXL5Osr0JZlJulepYu6Jd7qJtDZjlur0emRlT71EN3ScPoE7gvsuIKKNavKw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/validate-html-nesting": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/validate-html-nesting/-/validate-html-nesting-1.2.2.tgz", + "integrity": "sha512-hGdgQozCsQJMyfK5urgFcWEqsSSrK63Awe0t/IMR0bZ0QMtnuaiHzThW81guu3qx9abLi99NEuiaN6P9gVYsNg==", + "dev": true + }, + "node_modules/vite": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/vite/-/vite-6.2.2.tgz", + "integrity": "sha512-yW7PeMM+LkDzc7CgJuRLMW2Jz0FxMOsVJ8Lv3gpgW9WLcb9cTW+121UEr1hvmfR7w3SegR5ItvYyzVz1vxNJgQ==", + "dev": true, + "dependencies": { + "esbuild": "^0.25.0", + "postcss": "^8.5.3", + "rollup": "^4.30.1" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "jiti": ">=1.21.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "sass-embedded": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vite-plugin-solid": { + "version": "2.11.6", + "resolved": "https://registry.npmjs.org/vite-plugin-solid/-/vite-plugin-solid-2.11.6.tgz", + "integrity": "sha512-Sl5CTqJTGyEeOsmdH6BOgalIZlwH3t4/y0RQuFLMGnvWMBvxb4+lq7x3BSiAw6etf0QexfNJW7HSOO/Qf7pigg==", + "dev": true, + "dependencies": { + "@babel/core": "^7.23.3", + "@types/babel__core": "^7.20.4", + "babel-preset-solid": "^1.8.4", + "merge-anything": "^5.1.7", + "solid-refresh": "^0.6.3", + "vitefu": "^1.0.4" + }, + "peerDependencies": { + "@testing-library/jest-dom": "^5.16.6 || ^5.17.0 || ^6.*", + "solid-js": "^1.7.2", + "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0" + }, + "peerDependenciesMeta": { + "@testing-library/jest-dom": { + "optional": true + } + } + }, + "node_modules/vitefu": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-1.0.6.tgz", + "integrity": "sha512-+Rex1GlappUyNN6UfwbVZne/9cYC4+R2XDk9xkNXBKMw6HQagdX9PgZ8V2v1WUSK1wfBLp7qbI1+XSNIlB1xmA==", + "dev": true, + "peerDependencies": { + "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0" + }, + "peerDependenciesMeta": { + "vite": { + "optional": true + } + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + } + } +} diff --git a/frontend/package.json b/frontend/package.json new file mode 100644 index 0000000..742ba36 --- /dev/null +++ b/frontend/package.json @@ -0,0 +1,19 @@ +{ + "name": "watchyourlan", + "private": true, + "version": "0.0.0", + "type": "module", + "scripts": { + "dev": "vite", + "build": "tsc -b && vite build", + "preview": "vite preview" + }, + "dependencies": { + "solid-js": "^1.9.5" + }, + "devDependencies": { + "typescript": "~5.7.2", + "vite": "^6.2.0", + "vite-plugin-solid": "^2.11.2" + } +} diff --git a/frontend/src/App.css b/frontend/src/App.css new file mode 100644 index 0000000..e69de29 diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx new file mode 100644 index 0000000..e4404e6 --- /dev/null +++ b/frontend/src/App.tsx @@ -0,0 +1,14 @@ +import './App.css' + +function App() { + + return ( + <> +
+

Hello!

+
+ + ) +} + +export default App diff --git a/frontend/src/index.tsx b/frontend/src/index.tsx new file mode 100644 index 0000000..62bb47d --- /dev/null +++ b/frontend/src/index.tsx @@ -0,0 +1,7 @@ +/* @refresh reload */ +import { render } from 'solid-js/web' +import App from './App.tsx' + +const root = document.getElementById('root') + +render(() => , root!) diff --git a/frontend/src/vite-env.d.ts b/frontend/src/vite-env.d.ts new file mode 100644 index 0000000..11f02fe --- /dev/null +++ b/frontend/src/vite-env.d.ts @@ -0,0 +1 @@ +/// diff --git a/frontend/tsconfig.app.json b/frontend/tsconfig.app.json new file mode 100644 index 0000000..542583a --- /dev/null +++ b/frontend/tsconfig.app.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", + "target": "ES2020", + "useDefineForClassFields": true, + "module": "ESNext", + "lib": ["ES2020", "DOM", "DOM.Iterable"], + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "isolatedModules": true, + "moduleDetection": "force", + "noEmit": true, + "jsx": "preserve", + "jsxImportSource": "solid-js", + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedSideEffectImports": true + }, + "include": ["src"] +} diff --git a/frontend/tsconfig.json b/frontend/tsconfig.json new file mode 100644 index 0000000..84c8a23 --- /dev/null +++ b/frontend/tsconfig.json @@ -0,0 +1,7 @@ +{ + "files": [], + "references": [ + { "path": "./tsconfig.app.json" }, + { "path": "./tsconfig.node.json" } + ], +} diff --git a/frontend/tsconfig.node.json b/frontend/tsconfig.node.json new file mode 100644 index 0000000..db0becc --- /dev/null +++ b/frontend/tsconfig.node.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", + "target": "ES2022", + "lib": ["ES2023"], + "module": "ESNext", + "skipLibCheck": true, + + /* Bundler mode */ + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "isolatedModules": true, + "moduleDetection": "force", + "noEmit": true, + + /* Linting */ + "strict": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, + "noUncheckedSideEffectImports": true + }, + "include": ["vite.config.ts"] +} diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts new file mode 100644 index 0000000..4095d9b --- /dev/null +++ b/frontend/vite.config.ts @@ -0,0 +1,6 @@ +import { defineConfig } from 'vite' +import solid from 'vite-plugin-solid' + +export default defineConfig({ + plugins: [solid()], +}) From 4fe2e36c777f1ea49d641457a3d8a732ecce552c Mon Sep 17 00:00:00 2001 From: aceberg <1502200+aceberg@users.noreply.github.com> Date: Sun, 16 Mar 2025 23:25:04 +0700 Subject: [PATCH 02/10] Body Table --- frontend/Makefile | 15 ++++++++ frontend/index.html | 5 ++- frontend/src/App.tsx | 11 +++--- frontend/src/functions/api.ts | 8 +++++ frontend/src/functions/exports.ts | 29 +++++++++++++++ frontend/src/pages/Body.tsx | 59 +++++++++++++++++++++++++++++++ 6 files changed, 122 insertions(+), 5 deletions(-) create mode 100644 frontend/Makefile create mode 100644 frontend/src/functions/api.ts create mode 100644 frontend/src/functions/exports.ts create mode 100644 frontend/src/pages/Body.tsx diff --git a/frontend/Makefile b/frontend/Makefile new file mode 100644 index 0000000..f7abe33 --- /dev/null +++ b/frontend/Makefile @@ -0,0 +1,15 @@ +PKG_NAME=WatchYourLAN +USR_NAME=aceberg + +build: + npm run build && \ + rm ../backend/internal/web/public/assets/* && \ + cp -r dist/assets ../backend/internal/web/public + +replace: + cd ../backend/internal/web/public/assets/ && \ + cat index-*.js | sed 's/assets/fs\/public\/assets/g;s/http:\/\/0.0.0.0:8840//' > index.js && \ + cat index-*.css | sed 's/assets/fs\/public\/assets/g' > index.css && \ + rm index-* + +all: build replace \ No newline at end of file diff --git a/frontend/index.html b/frontend/index.html index 7b0e298..a6b893d 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -1,10 +1,13 @@ - + WatchYourLAN + + +
diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index e4404e6..fec3b0d 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -1,13 +1,16 @@ import './App.css' +import Body from './pages/Body' function App() { return ( - <> -
-

Hello!

+
+
+
+ +
- +
) } diff --git a/frontend/src/functions/api.ts b/frontend/src/functions/api.ts new file mode 100644 index 0000000..2b4968b --- /dev/null +++ b/frontend/src/functions/api.ts @@ -0,0 +1,8 @@ +const api = 'http://0.0.0.0:8840'; + +export const getAllHosts = async () => { + const url = api+'/api/all'; + const hosts = await (await fetch(url)).json(); + + return hosts; +}; \ No newline at end of file diff --git a/frontend/src/functions/exports.ts b/frontend/src/functions/exports.ts new file mode 100644 index 0000000..dc80b58 --- /dev/null +++ b/frontend/src/functions/exports.ts @@ -0,0 +1,29 @@ +import { createSignal } from "solid-js"; + +export interface Host { + ID: number; + Name: string; + DNS: string; + Iface: string; + IP: string; + Mac: string; + Hw: string; + Date: string; + Known: number; + Now: number; +}; + +export const emptyHost: Host = { + ID: 0, + Name: "", + DNS: "", + Iface: "", + IP: "", + Mac: "", + Hw: "", + Date: "", + Known: 0, + Now: 0, +}; + +export const [allHosts, setAllHosts] = createSignal([]); \ No newline at end of file diff --git a/frontend/src/pages/Body.tsx b/frontend/src/pages/Body.tsx new file mode 100644 index 0000000..7b8e2e1 --- /dev/null +++ b/frontend/src/pages/Body.tsx @@ -0,0 +1,59 @@ +import { onMount } from "solid-js"; +import { allHosts, setAllHosts } from "../functions/exports"; +import { getAllHosts } from "../functions/api"; +import { For } from "solid-js"; + + +function Body() { + + const handleSort = (sortBy: string) => { + console.log("SORT BY", sortBy); + }; + + onMount(async () => { + + setAllHosts(await getAllHosts()); + }); + + return ( +
+
+ Header +
+
+ + + + + + + + + + + + + + + + {(host, index) => + + + + + + + + + + + + } + +
Name Iface IP MAC Hardware Date Known Online
{index()+1}.{host.Name}{host.Iface}{host.IP}{host.Mac}{host.Hw}{host.Date}{host.Known}{host.Now}
+
+
+ ) +} + +export default Body From fb1122c03da2606519d412b9a1e8c4584482a78a Mon Sep 17 00:00:00 2001 From: aceberg <1502200+aceberg@users.noreply.github.com> Date: Mon, 17 Mar 2025 09:31:51 +0700 Subject: [PATCH 03/10] Table Row --- backend/internal/web/public/assets/index.css | 1 + backend/internal/web/public/assets/index.js | 1 + backend/internal/web/templates/header.html | 2 - backend/internal/web/templates/index.html | 75 ++----------------- backend/internal/web/templates/old_index.html | 73 ++++++++++++++++++ frontend/src/App.css | 10 +++ frontend/src/components/TableRow.tsx | 38 ++++++++++ frontend/src/pages/Body.tsx | 14 +--- 8 files changed, 132 insertions(+), 82 deletions(-) create mode 100644 backend/internal/web/public/assets/index.css create mode 100644 backend/internal/web/public/assets/index.js create mode 100644 backend/internal/web/templates/old_index.html create mode 100644 frontend/src/components/TableRow.tsx diff --git a/backend/internal/web/public/assets/index.css b/backend/internal/web/public/assets/index.css new file mode 100644 index 0000000..356ac8c --- /dev/null +++ b/backend/internal/web/public/assets/index.css @@ -0,0 +1 @@ +.my-btn{height:100%;background-color:#0000;color:var(--bs-primary);text-align:center}.my-btn:hover{background-color:#0000001a} diff --git a/backend/internal/web/public/assets/index.js b/backend/internal/web/public/assets/index.js new file mode 100644 index 0000000..9bfe348 --- /dev/null +++ b/backend/internal/web/public/assets/index.js @@ -0,0 +1 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const s of n)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function l(n){const s={};return n.integrity&&(s.integrity=n.integrity),n.referrerPolicy&&(s.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?s.credentials="include":n.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(n){if(n.ep)return;n.ep=!0;const s=l(n);fetch(n.href,s)}})();const pe=!1,$e=(e,t)=>e===t,we=Symbol("solid-track"),B={equals:$e};let te=re;const E=1,M=2,le={owned:null,cleanups:null,context:null,owner:null};var d=null;let F=null,ye=null,h=null,g=null,A=null,R=0;function P(e,t){const l=h,i=d,n=e.length===0,s=t===void 0?i:t,o=n?le:{owned:null,cleanups:null,context:s?s.context:null,owner:s},r=n?e:()=>e(()=>T(()=>N(o)));d=o,h=null;try{return O(r,!0)}finally{h=l,d=i}}function ie(e,t){t=t?Object.assign({},B,t):B;const l={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},i=n=>(typeof n=="function"&&(n=n(l.value)),se(l,n));return[ne.bind(l),i]}function V(e,t,l){const i=q(e,t,!1,E);D(i)}function me(e,t,l){te=ve;const i=q(e,t,!1,E);i.user=!0,A?A.push(i):D(i)}function Se(e,t,l){l=l?Object.assign({},B,l):B;const i=q(e,t,!0,0);return i.observers=null,i.observerSlots=null,i.comparator=l.equals||void 0,D(i),ne.bind(i)}function T(e){if(h===null)return e();const t=h;h=null;try{return e()}finally{h=t}}function _e(e){me(()=>T(e))}function xe(e){return d===null||(d.cleanups===null?d.cleanups=[e]:d.cleanups.push(e)),e}function ne(){if(this.sources&&this.state)if(this.state===E)D(this);else{const e=g;g=null,O(()=>U(this),!1),g=e}if(h){const e=this.observers?this.observers.length:0;h.sources?(h.sources.push(this),h.sourceSlots.push(e)):(h.sources=[this],h.sourceSlots=[e]),this.observers?(this.observers.push(h),this.observerSlots.push(h.sources.length-1)):(this.observers=[h],this.observerSlots=[h.sources.length-1])}return this.value}function se(e,t,l){let i=e.value;return(!e.comparator||!e.comparator(i,t))&&(e.value=t,e.observers&&e.observers.length&&O(()=>{for(let n=0;n1e6)throw g=[],new Error},!1)),t}function D(e){if(!e.fn)return;N(e);const t=R;Ce(e,e.value,t)}function Ce(e,t,l){let i;const n=d,s=h;h=d=e;try{i=e.fn(t)}catch(o){return e.pure&&(e.state=E,e.owned&&e.owned.forEach(N),e.owned=null),e.updatedAt=l+1,ce(o)}finally{h=s,d=n}(!e.updatedAt||e.updatedAt<=l)&&(e.updatedAt!=null&&"observers"in e?se(e,i):e.value=i,e.updatedAt=l)}function q(e,t,l,i=E,n){const s={fn:e,state:i,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:d,context:d?d.context:null,pure:l};return d===null||d!==le&&(d.owned?d.owned.push(s):d.owned=[s]),s}function H(e){if(e.state===0)return;if(e.state===M)return U(e);if(e.suspense&&T(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt=0;l--)if(e=t[l],e.state===E)D(e);else if(e.state===M){const i=g;g=null,O(()=>U(e,t[0]),!1),g=i}}function O(e,t){if(g)return e();let l=!1;t||(g=[]),A?l=!0:A=[],R++;try{const i=e();return Ae(l),i}catch(i){l||(A=null),g=null,ce(i)}}function Ae(e){if(g&&(re(g),g=null),e)return;const t=A;A=null,t.length&&O(()=>te(t),!1)}function re(e){for(let t=0;t=0;t--)N(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)N(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function Ee(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function ce(e,t=d){throw Ee(e)}const ke=Symbol("fallback");function Z(e){for(let t=0;t1?[]:null;return xe(()=>Z(s)),()=>{let f=e()||[],a=f.length,u,c;return f[we],T(()=>{let b,p,S,x,C,w,$,y,v;if(a===0)o!==0&&(Z(s),s=[],i=[],n=[],o=0,r&&(r=[])),l.fallback&&(i=[ke],n[0]=P(L=>(s[0]=L,l.fallback())),o=1);else if(o===0){for(n=new Array(a),c=0;c=w&&y>=w&&i[$]===f[y];$--,y--)S[y]=n[$],x[y]=s[$],r&&(C[y]=r[$]);for(b=new Map,p=new Array(y+1),c=y;c>=w;c--)v=f[c],u=b.get(v),p[c]=u===void 0?-1:u,b.set(v,c);for(u=w;u<=$;u++)v=i[u],c=b.get(v),c!==void 0&&c!==-1?(S[c]=n[u],x[c]=s[u],r&&(C[c]=r[u]),c=p[c],b.set(v,c)):s[u]();for(c=w;ce(t||{}))}function Te(e){const t="fallback"in e&&{fallback:()=>e.fallback};return Se(Ne(()=>e.each,e.children,t||void 0))}function De(e,t,l){let i=l.length,n=t.length,s=i,o=0,r=0,f=t[n-1].nextSibling,a=null;for(;ou-r){const p=t[o];for(;r{n=s,t===document?e():_(t,e(),t.firstChild?null:void 0,l)},i.owner),()=>{n(),t.textContent=""}}function I(e,t,l,i){let n;const s=()=>{const r=document.createElement("template");return r.innerHTML=e,r.content.firstChild},o=()=>(n||(n=s())).cloneNode(!0);return o.cloneNode=o,o}function Ie(e,t=window.document){const l=t[z]||(t[z]=new Set);for(let i=0,n=e.length;iK(e,t(),n,l),i)}function Pe(e){let t=e.target;const l=`$$${e.type}`,i=e.target,n=e.currentTarget,s=f=>Object.defineProperty(e,"target",{configurable:!0,value:f}),o=()=>{const f=t[l];if(f&&!t.disabled){const a=t[`${l}Data`];if(a!==void 0?f.call(t,a,e):f.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&s(t.host),!0},r=()=>{for(;o()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),e.composedPath){const f=e.composedPath();s(f[0]);for(let a=0;a{let r=t();for(;typeof r=="function";)r=r();l=K(e,r,l,i)}),()=>l;if(Array.isArray(t)){const r=[],f=l&&Array.isArray(l);if(G(r,t,l,n))return V(()=>l=K(e,r,l,i,!0)),()=>l;if(r.length===0){if(l=k(e,l,i),o)return l}else f?l.length===0?ee(e,r,i):De(e,l,r):(l&&k(e),ee(e,r));l=r}else if(t.nodeType){if(Array.isArray(l)){if(o)return l=k(e,l,i,t);k(e,l,null,t)}else l==null||l===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);l=t}}return l}function G(e,t,l,i){let n=!1;for(let s=0,o=t.length;s=0;o--){const r=t[o];if(n!==r){const f=r.parentNode===e;!s&&!o?f?e.replaceChild(n,r):e.insertBefore(n,l):f&&r.remove()}else s=!0}}else e.insertBefore(n,l);return[n]}const[Be,Me]=ie([]),He="",Ue=async()=>{const e=He+"/api/all";return await(await fetch(e)).json()};var je=I(''),Ke=I(''),Re=I('.
');function Fe(e){const t="http://"+e.host.IP;let l=je();e.host.Now==1&&(l=Ke());let i=!1;return e.host.Known==1&&(i=!0),(()=>{var n=Re(),s=n.firstChild,o=s.firstChild,r=s.nextSibling,f=r.nextSibling,a=f.nextSibling,u=a.firstChild,c=a.nextSibling,m=c.nextSibling,b=m.nextSibling,p=b.nextSibling,S=p.firstChild,x=S.firstChild,C=p.nextSibling;return _(s,()=>e.index,o),_(r,()=>e.host.Name),_(f,()=>e.host.Iface),Le(u,"href",t),_(u,()=>e.host.IP),_(c,()=>e.host.Mac),_(m,()=>e.host.Hw),_(b,()=>e.host.Date),x.checked=i,_(C,l),n})()}var Ve=I('
Header
');function Ge(){const e=t=>{console.log("SORT BY",t)};return _e(async()=>{Me(await Ue())}),(()=>{var t=Ve(),l=t.firstChild,i=l.nextSibling,n=i.firstChild,s=n.firstChild,o=s.firstChild,r=o.firstChild,f=r.nextSibling,a=f.firstChild,u=a.nextSibling,c=f.nextSibling,m=c.firstChild,b=m.nextSibling,p=c.nextSibling,S=p.firstChild,x=S.nextSibling,C=p.nextSibling,w=C.firstChild,$=w.nextSibling,y=C.nextSibling,v=y.firstChild,L=v.nextSibling,Q=y.nextSibling,fe=Q.firstChild,W=fe.nextSibling,X=Q.nextSibling,ae=X.firstChild,Y=ae.nextSibling,ue=X.nextSibling,he=ue.firstChild,J=he.nextSibling,de=s.nextSibling;return u.$$click=e,u.$$clickData="Name",b.$$click=e,b.$$clickData="Iface",x.$$click=e,x.$$clickData="IP",$.$$click=e,$.$$clickData="Mac",L.$$click=e,L.$$clickData="Hw",W.$$click=e,W.$$clickData="Date",Y.$$click=e,Y.$$clickData="Known",J.$$click=e,J.$$clickData="Now",_(de,j(Te,{get each(){return Be()},children:(be,ge)=>j(Fe,{host:be,index:ge})})),t})()}Ie(["click"]);var qe=I('
');function Qe(){return(()=>{var e=qe(),t=e.firstChild,l=t.firstChild;return _(l,j(Ge,{})),e})()}const We=document.getElementById("root");Oe(()=>j(Qe,{}),We); diff --git a/backend/internal/web/templates/header.html b/backend/internal/web/templates/header.html index 5008d2d..1d2cd2a 100644 --- a/backend/internal/web/templates/header.html +++ b/backend/internal/web/templates/header.html @@ -20,8 +20,6 @@ {{ end }} - -
Name Iface IP MAC Hardware Date Known Online
- - - - - - - - - - - - - -
Name Iface IP MAC Hardware Date Known Online
-
-
-
- - - - - - + + + + + +
{{ template "footer.html" }} {{ end }} \ No newline at end of file diff --git a/backend/internal/web/templates/old_index.html b/backend/internal/web/templates/old_index.html new file mode 100644 index 0000000..440c56f --- /dev/null +++ b/backend/internal/web/templates/old_index.html @@ -0,0 +1,73 @@ +{{ define "oldindex.html" }} + + +
+
+
+
+ + +
+
+
+
+
+
+
+
+
+ + + + + + + + +
+
+
+ + +
+
+
+
+
+ + + + + + + + + + + + + + +
Name Iface IP MAC Hardware Date Known Online
+
+
+
+
+
+ + + + + +{{ template "footer.html" }} +{{ end }} \ No newline at end of file diff --git a/frontend/src/App.css b/frontend/src/App.css index e69de29..8707468 100644 --- a/frontend/src/App.css +++ b/frontend/src/App.css @@ -0,0 +1,10 @@ +/* Sort button */ +.my-btn { + height: 100%; + background-color: #00000000; + color: var(--bs-primary); + text-align: center; +} +.my-btn:hover { + background-color: #0000001a; +} \ No newline at end of file diff --git a/frontend/src/components/TableRow.tsx b/frontend/src/components/TableRow.tsx new file mode 100644 index 0000000..ad0c9a6 --- /dev/null +++ b/frontend/src/components/TableRow.tsx @@ -0,0 +1,38 @@ + + + +function TableRow(_props: any) { + + const link = "http://" + _props.host.IP; + + let now = ; + if (_props.host.Now == 1) { + now = ; + }; + + let known = false; + if (_props.host.Known == 1) { + known = true; + } + + return ( + + {_props.index}. + {_props.host.Name} + {_props.host.Iface} + {_props.host.IP} + {_props.host.Mac} + {_props.host.Hw} + {_props.host.Date} + +
+ +
+ + {now} + + + ) +} + +export default TableRow diff --git a/frontend/src/pages/Body.tsx b/frontend/src/pages/Body.tsx index 7b8e2e1..261053b 100644 --- a/frontend/src/pages/Body.tsx +++ b/frontend/src/pages/Body.tsx @@ -2,6 +2,7 @@ import { onMount } from "solid-js"; import { allHosts, setAllHosts } from "../functions/exports"; import { getAllHosts } from "../functions/api"; import { For } from "solid-js"; +import TableRow from "../components/TableRow"; function Body() { @@ -33,21 +34,12 @@ function Body() { Date Known Online + {(host, index) => - - {index()+1}. - {host.Name} - {host.Iface} - {host.IP} - {host.Mac} - {host.Hw} - {host.Date} - {host.Known} - {host.Now} - + } From 07637a7c941fa6c1557a17adebc0b3f1c9aae695 Mon Sep 17 00:00:00 2001 From: Gabe Cook Date: Mon, 17 Mar 2025 00:32:48 -0500 Subject: [PATCH 04/10] Remove `time/tzdata` dependency --- cmd/WatchYourLAN/main.go | 1 - 1 file changed, 1 deletion(-) diff --git a/cmd/WatchYourLAN/main.go b/cmd/WatchYourLAN/main.go index 40acd6d..263ac60 100644 --- a/cmd/WatchYourLAN/main.go +++ b/cmd/WatchYourLAN/main.go @@ -5,7 +5,6 @@ import ( // "net/http" // _ "net/http/pprof" - _ "time/tzdata" "github.com/aceberg/WatchYourLAN/internal/web" ) From a9972ac0ce594987fa777647f8759943ecbbe0b9 Mon Sep 17 00:00:00 2001 From: aceberg <1502200+aceberg@users.noreply.github.com> Date: Mon, 17 Mar 2025 21:38:57 +0700 Subject: [PATCH 05/10] Sort --- backend/internal/web/public/assets/index.js | 2 +- frontend/src/App.tsx | 9 ++++ frontend/src/components/CardHead.tsx | 20 ++++++++ frontend/src/components/TableHead.tsx | 28 +++++++++++ frontend/src/components/TableRow.tsx | 31 +++++++++++-- frontend/src/functions/api.ts | 10 +++- frontend/src/functions/exports.ts | 24 +++++----- frontend/src/functions/sort.ts | 51 +++++++++++++++++++++ frontend/src/pages/Body.tsx | 34 +++----------- 9 files changed, 162 insertions(+), 47 deletions(-) create mode 100644 frontend/src/components/CardHead.tsx create mode 100644 frontend/src/components/TableHead.tsx create mode 100644 frontend/src/functions/sort.ts diff --git a/backend/internal/web/public/assets/index.js b/backend/internal/web/public/assets/index.js index 9bfe348..f2a40a3 100644 --- a/backend/internal/web/public/assets/index.js +++ b/backend/internal/web/public/assets/index.js @@ -1 +1 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const s of n)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function l(n){const s={};return n.integrity&&(s.integrity=n.integrity),n.referrerPolicy&&(s.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?s.credentials="include":n.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(n){if(n.ep)return;n.ep=!0;const s=l(n);fetch(n.href,s)}})();const pe=!1,$e=(e,t)=>e===t,we=Symbol("solid-track"),B={equals:$e};let te=re;const E=1,M=2,le={owned:null,cleanups:null,context:null,owner:null};var d=null;let F=null,ye=null,h=null,g=null,A=null,R=0;function P(e,t){const l=h,i=d,n=e.length===0,s=t===void 0?i:t,o=n?le:{owned:null,cleanups:null,context:s?s.context:null,owner:s},r=n?e:()=>e(()=>T(()=>N(o)));d=o,h=null;try{return O(r,!0)}finally{h=l,d=i}}function ie(e,t){t=t?Object.assign({},B,t):B;const l={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},i=n=>(typeof n=="function"&&(n=n(l.value)),se(l,n));return[ne.bind(l),i]}function V(e,t,l){const i=q(e,t,!1,E);D(i)}function me(e,t,l){te=ve;const i=q(e,t,!1,E);i.user=!0,A?A.push(i):D(i)}function Se(e,t,l){l=l?Object.assign({},B,l):B;const i=q(e,t,!0,0);return i.observers=null,i.observerSlots=null,i.comparator=l.equals||void 0,D(i),ne.bind(i)}function T(e){if(h===null)return e();const t=h;h=null;try{return e()}finally{h=t}}function _e(e){me(()=>T(e))}function xe(e){return d===null||(d.cleanups===null?d.cleanups=[e]:d.cleanups.push(e)),e}function ne(){if(this.sources&&this.state)if(this.state===E)D(this);else{const e=g;g=null,O(()=>U(this),!1),g=e}if(h){const e=this.observers?this.observers.length:0;h.sources?(h.sources.push(this),h.sourceSlots.push(e)):(h.sources=[this],h.sourceSlots=[e]),this.observers?(this.observers.push(h),this.observerSlots.push(h.sources.length-1)):(this.observers=[h],this.observerSlots=[h.sources.length-1])}return this.value}function se(e,t,l){let i=e.value;return(!e.comparator||!e.comparator(i,t))&&(e.value=t,e.observers&&e.observers.length&&O(()=>{for(let n=0;n1e6)throw g=[],new Error},!1)),t}function D(e){if(!e.fn)return;N(e);const t=R;Ce(e,e.value,t)}function Ce(e,t,l){let i;const n=d,s=h;h=d=e;try{i=e.fn(t)}catch(o){return e.pure&&(e.state=E,e.owned&&e.owned.forEach(N),e.owned=null),e.updatedAt=l+1,ce(o)}finally{h=s,d=n}(!e.updatedAt||e.updatedAt<=l)&&(e.updatedAt!=null&&"observers"in e?se(e,i):e.value=i,e.updatedAt=l)}function q(e,t,l,i=E,n){const s={fn:e,state:i,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:d,context:d?d.context:null,pure:l};return d===null||d!==le&&(d.owned?d.owned.push(s):d.owned=[s]),s}function H(e){if(e.state===0)return;if(e.state===M)return U(e);if(e.suspense&&T(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt=0;l--)if(e=t[l],e.state===E)D(e);else if(e.state===M){const i=g;g=null,O(()=>U(e,t[0]),!1),g=i}}function O(e,t){if(g)return e();let l=!1;t||(g=[]),A?l=!0:A=[],R++;try{const i=e();return Ae(l),i}catch(i){l||(A=null),g=null,ce(i)}}function Ae(e){if(g&&(re(g),g=null),e)return;const t=A;A=null,t.length&&O(()=>te(t),!1)}function re(e){for(let t=0;t=0;t--)N(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)N(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function Ee(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function ce(e,t=d){throw Ee(e)}const ke=Symbol("fallback");function Z(e){for(let t=0;t1?[]:null;return xe(()=>Z(s)),()=>{let f=e()||[],a=f.length,u,c;return f[we],T(()=>{let b,p,S,x,C,w,$,y,v;if(a===0)o!==0&&(Z(s),s=[],i=[],n=[],o=0,r&&(r=[])),l.fallback&&(i=[ke],n[0]=P(L=>(s[0]=L,l.fallback())),o=1);else if(o===0){for(n=new Array(a),c=0;c=w&&y>=w&&i[$]===f[y];$--,y--)S[y]=n[$],x[y]=s[$],r&&(C[y]=r[$]);for(b=new Map,p=new Array(y+1),c=y;c>=w;c--)v=f[c],u=b.get(v),p[c]=u===void 0?-1:u,b.set(v,c);for(u=w;u<=$;u++)v=i[u],c=b.get(v),c!==void 0&&c!==-1?(S[c]=n[u],x[c]=s[u],r&&(C[c]=r[u]),c=p[c],b.set(v,c)):s[u]();for(c=w;ce(t||{}))}function Te(e){const t="fallback"in e&&{fallback:()=>e.fallback};return Se(Ne(()=>e.each,e.children,t||void 0))}function De(e,t,l){let i=l.length,n=t.length,s=i,o=0,r=0,f=t[n-1].nextSibling,a=null;for(;ou-r){const p=t[o];for(;r{n=s,t===document?e():_(t,e(),t.firstChild?null:void 0,l)},i.owner),()=>{n(),t.textContent=""}}function I(e,t,l,i){let n;const s=()=>{const r=document.createElement("template");return r.innerHTML=e,r.content.firstChild},o=()=>(n||(n=s())).cloneNode(!0);return o.cloneNode=o,o}function Ie(e,t=window.document){const l=t[z]||(t[z]=new Set);for(let i=0,n=e.length;iK(e,t(),n,l),i)}function Pe(e){let t=e.target;const l=`$$${e.type}`,i=e.target,n=e.currentTarget,s=f=>Object.defineProperty(e,"target",{configurable:!0,value:f}),o=()=>{const f=t[l];if(f&&!t.disabled){const a=t[`${l}Data`];if(a!==void 0?f.call(t,a,e):f.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&s(t.host),!0},r=()=>{for(;o()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),e.composedPath){const f=e.composedPath();s(f[0]);for(let a=0;a{let r=t();for(;typeof r=="function";)r=r();l=K(e,r,l,i)}),()=>l;if(Array.isArray(t)){const r=[],f=l&&Array.isArray(l);if(G(r,t,l,n))return V(()=>l=K(e,r,l,i,!0)),()=>l;if(r.length===0){if(l=k(e,l,i),o)return l}else f?l.length===0?ee(e,r,i):De(e,l,r):(l&&k(e),ee(e,r));l=r}else if(t.nodeType){if(Array.isArray(l)){if(o)return l=k(e,l,i,t);k(e,l,null,t)}else l==null||l===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);l=t}}return l}function G(e,t,l,i){let n=!1;for(let s=0,o=t.length;s=0;o--){const r=t[o];if(n!==r){const f=r.parentNode===e;!s&&!o?f?e.replaceChild(n,r):e.insertBefore(n,l):f&&r.remove()}else s=!0}}else e.insertBefore(n,l);return[n]}const[Be,Me]=ie([]),He="",Ue=async()=>{const e=He+"/api/all";return await(await fetch(e)).json()};var je=I(''),Ke=I(''),Re=I('.
');function Fe(e){const t="http://"+e.host.IP;let l=je();e.host.Now==1&&(l=Ke());let i=!1;return e.host.Known==1&&(i=!0),(()=>{var n=Re(),s=n.firstChild,o=s.firstChild,r=s.nextSibling,f=r.nextSibling,a=f.nextSibling,u=a.firstChild,c=a.nextSibling,m=c.nextSibling,b=m.nextSibling,p=b.nextSibling,S=p.firstChild,x=S.firstChild,C=p.nextSibling;return _(s,()=>e.index,o),_(r,()=>e.host.Name),_(f,()=>e.host.Iface),Le(u,"href",t),_(u,()=>e.host.IP),_(c,()=>e.host.Mac),_(m,()=>e.host.Hw),_(b,()=>e.host.Date),x.checked=i,_(C,l),n})()}var Ve=I('
Header
');function Ge(){const e=t=>{console.log("SORT BY",t)};return _e(async()=>{Me(await Ue())}),(()=>{var t=Ve(),l=t.firstChild,i=l.nextSibling,n=i.firstChild,s=n.firstChild,o=s.firstChild,r=o.firstChild,f=r.nextSibling,a=f.firstChild,u=a.nextSibling,c=f.nextSibling,m=c.firstChild,b=m.nextSibling,p=c.nextSibling,S=p.firstChild,x=S.nextSibling,C=p.nextSibling,w=C.firstChild,$=w.nextSibling,y=C.nextSibling,v=y.firstChild,L=v.nextSibling,Q=y.nextSibling,fe=Q.firstChild,W=fe.nextSibling,X=Q.nextSibling,ae=X.firstChild,Y=ae.nextSibling,ue=X.nextSibling,he=ue.firstChild,J=he.nextSibling,de=s.nextSibling;return u.$$click=e,u.$$clickData="Name",b.$$click=e,b.$$clickData="Iface",x.$$click=e,x.$$clickData="IP",$.$$click=e,$.$$clickData="Mac",L.$$click=e,L.$$clickData="Hw",W.$$click=e,W.$$clickData="Date",Y.$$click=e,Y.$$clickData="Known",J.$$click=e,J.$$clickData="Now",_(de,j(Te,{get each(){return Be()},children:(be,ge)=>j(Fe,{host:be,index:ge})})),t})()}Ie(["click"]);var qe=I('
');function Qe(){return(()=>{var e=qe(),t=e.firstChild,l=t.firstChild;return _(l,j(Ge,{})),e})()}const We=document.getElementById("root");Oe(()=>j(Qe,{}),We); +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))l(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&l(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function l(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();const Se=!1,_e=(e,t)=>e===t,xe=Symbol("solid-track"),U={equals:_e};let ce=de;const I=1,F=2,fe={owned:null,cleanups:null,context:null,owner:null};var h=null;let W=null,ve=null,d=null,g=null,k=null,G=0;function H(e,t){const n=d,l=h,i=e.length===0,s=t===void 0?l:t,o=i?fe:{owned:null,cleanups:null,context:s?s.context:null,owner:s},r=i?e:()=>e(()=>T(()=>O(o)));h=o,d=null;try{return M(r,!0)}finally{d=n,h=l}}function L(e,t){t=t?Object.assign({},U,t):U;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},l=i=>(typeof i=="function"&&(i=i(n.value)),ue(n,i));return[ae.bind(n),l]}function K(e,t,n){const l=Z(e,t,!1,I);B(l)}function Ce(e,t,n){ce=Ie;const l=Z(e,t,!1,I);l.user=!0,k?k.push(l):B(l)}function j(e,t,n){n=n?Object.assign({},U,n):U;const l=Z(e,t,!0,0);return l.observers=null,l.observerSlots=null,l.comparator=n.equals||void 0,B(l),ae.bind(l)}function T(e){if(d===null)return e();const t=d;d=null;try{return e()}finally{d=t}}function Ae(e){Ce(()=>T(e))}function ke(e){return h===null||(h.cleanups===null?h.cleanups=[e]:h.cleanups.push(e)),e}function ae(){if(this.sources&&this.state)if(this.state===I)B(this);else{const e=g;g=null,M(()=>V(this),!1),g=e}if(d){const e=this.observers?this.observers.length:0;d.sources?(d.sources.push(this),d.sourceSlots.push(e)):(d.sources=[this],d.sourceSlots=[e]),this.observers?(this.observers.push(d),this.observerSlots.push(d.sources.length-1)):(this.observers=[d],this.observerSlots=[d.sources.length-1])}return this.value}function ue(e,t,n){let l=e.value;return(!e.comparator||!e.comparator(l,t))&&(e.value=t,e.observers&&e.observers.length&&M(()=>{for(let i=0;i1e6)throw g=[],new Error},!1)),t}function B(e){if(!e.fn)return;O(e);const t=G;Ee(e,e.value,t)}function Ee(e,t,n){let l;const i=h,s=d;d=h=e;try{l=e.fn(t)}catch(o){return e.pure&&(e.state=I,e.owned&&e.owned.forEach(O),e.owned=null),e.updatedAt=n+1,be(o)}finally{d=s,h=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?ue(e,l):e.value=l,e.updatedAt=n)}function Z(e,t,n,l=I,i){const s={fn:e,state:l,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:h,context:h?h.context:null,pure:n};return h===null||h!==fe&&(h.owned?h.owned.push(s):h.owned=[s]),s}function R(e){if(e.state===0)return;if(e.state===F)return V(e);if(e.suspense&&T(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt=0;n--)if(e=t[n],e.state===I)B(e);else if(e.state===F){const l=g;g=null,M(()=>V(e,t[0]),!1),g=l}}function M(e,t){if(g)return e();let n=!1;t||(g=[]),k?n=!0:k=[],G++;try{const l=e();return Ne(n),l}catch(l){n||(k=null),g=null,be(l)}}function Ne(e){if(g&&(de(g),g=null),e)return;const t=k;k=null,t.length&&M(()=>ce(t),!1)}function de(e){for(let t=0;t=0;t--)O(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)O(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function Te(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function be(e,t=h){throw Te(e)}const De=Symbol("fallback");function ne(e){for(let t=0;t1?[]:null;return ke(()=>ne(s)),()=>{let f=e()||[],a=f.length,u,c;return f[xe],T(()=>{let b,_,m,v,A,$,p,w,x;if(a===0)o!==0&&(ne(s),s=[],l=[],i=[],o=0,r&&(r=[])),n.fallback&&(l=[De],i[0]=H(E=>(s[0]=E,n.fallback())),o=1);else if(o===0){for(i=new Array(a),c=0;c=$&&w>=$&&l[p]===f[w];p--,w--)m[w]=i[p],v[w]=s[p],r&&(A[w]=r[p]);for(b=new Map,_=new Array(w+1),c=w;c>=$;c--)x=f[c],u=b.get(x),_[c]=u===void 0?-1:u,b.set(x,c);for(u=$;u<=p;u++)x=l[u],c=b.get(x),c!==void 0&&c!==-1?(m[c]=i[u],v[c]=s[u],r&&(A[c]=r[u]),c=_[c],b.set(x,c)):s[u]();for(c=$;ce(t||{}))}const Oe=e=>`Stale read from <${e}>.`;function Le(e){const t="fallback"in e&&{fallback:()=>e.fallback};return j(Pe(()=>e.each,e.children,t||void 0))}function $e(e){const t=e.keyed,n=j(()=>e.when,void 0,void 0),l=t?n:j(n,void 0,{equals:(i,s)=>!i==!s});return j(()=>{const i=l();if(i){const s=e.children;return typeof s=="function"&&s.length>0?T(()=>s(t?i:()=>{if(!T(l))throw Oe("Show");return n()})):s}return e.fallback},void 0,void 0)}function Be(e,t,n){let l=n.length,i=t.length,s=l,o=0,r=0,f=t[i-1].nextSibling,a=null;for(;ou-r){const _=t[o];for(;r{i=s,t===document?e():y(t,e(),t.firstChild?null:void 0,n)},l.owner),()=>{i(),t.textContent=""}}function C(e,t,n,l){let i;const s=()=>{const r=document.createElement("template");return r.innerHTML=e,r.content.firstChild},o=()=>(i||(i=s())).cloneNode(!0);return o.cloneNode=o,o}function z(e,t=window.document){const n=t[le]||(t[le]=new Set);for(let l=0,i=e.length;lq(e,t(),i,n),l)}function je(e){let t=e.target;const n=`$$${e.type}`,l=e.target,i=e.currentTarget,s=f=>Object.defineProperty(e,"target",{configurable:!0,value:f}),o=()=>{const f=t[n];if(f&&!t.disabled){const a=t[`${n}Data`];if(a!==void 0?f.call(t,a,e):f.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&s(t.host),!0},r=()=>{for(;o()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),e.composedPath){const f=e.composedPath();s(f[0]);for(let a=0;a{let r=t();for(;typeof r=="function";)r=r();n=q(e,r,n,l)}),()=>n;if(Array.isArray(t)){const r=[],f=n&&Array.isArray(n);if(J(r,t,n,i))return K(()=>n=q(e,r,n,l,!0)),()=>n;if(r.length===0){if(n=D(e,n,l),o)return n}else f?n.length===0?ie(e,r,l):Be(e,n,r):(n&&D(e),ie(e,r));n=r}else if(t.nodeType){if(Array.isArray(n)){if(o)return n=D(e,n,l,t);D(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function J(e,t,n,l){let i=!1;for(let s=0,o=t.length;s=0;o--){const r=t[o];if(i!==r){const f=r.parentNode===e;!s&&!o?f?e.replaceChild(i,r):e.insertBefore(i,n):f&&r.remove()}else s=!0}}else e.insertBefore(i,n);return[i]}const ge="",Ue=async()=>{const e=ge+"/api/all";return await(await fetch(e)).json()},se=async(e,t,n)=>{const l=ge+"/api/edit/"+e+"/"+t+"/"+n;return await(await fetch(l)).json()},[pe,Y]=L([]);L();const[we,re]=L(!1);var Fe=C(''),Ke=C(''),Re=C(""),Ve=C('
Name Iface IP MAC Hardware Date Known Online
.
');function qe(e){const[t,n]=L(e.host.Name),l="http://"+e.host.IP;let i=Fe();e.host.Now==1&&(i=Ke());let s=!1;e.host.Known==1&&(s=!0);const o=async f=>{n(f),await se(e.host.ID,t(),"")},r=async()=>{await se(e.host.ID,t(),"toggle")};return(()=>{var f=Ve(),a=f.firstChild,u=a.firstChild,c=a.nextSibling,S=c.nextSibling,b=S.nextSibling,_=b.firstChild,m=b.nextSibling,v=m.nextSibling,A=v.nextSibling,$=A.nextSibling,p=$.firstChild,w=p.firstChild,x=$.nextSibling;return y(a,()=>e.index,u),y(c,N($e,{get when(){return we()},get fallback(){return t()},get children(){var E=Re();return E.$$input=Q=>o(Q.target.value),K(()=>E.value=t()),E}})),y(S,()=>e.host.Iface),He(_,"href",l),y(_,()=>e.host.IP),y(m,()=>e.host.Mac),y(v,()=>e.host.Hw),y(A,()=>e.host.Date),w.$$click=r,w.checked=s,y(x,i),f})()}z(["input","click"]);var Ge=C('
Name Iface IP MAC Hardware Date Known Online ');function et(){const e=t=>{Je(t)};return(()=>{var t=ze(),n=t.firstChild,l=n.firstChild,i=l.nextSibling,s=i.firstChild,o=s.nextSibling,r=i.nextSibling,f=r.firstChild,a=f.nextSibling,u=r.nextSibling,c=u.firstChild,S=c.nextSibling,b=u.nextSibling,_=b.firstChild,m=_.nextSibling,v=b.nextSibling,A=v.firstChild,$=A.nextSibling,p=v.nextSibling,w=p.firstChild,x=w.nextSibling,E=p.nextSibling,Q=E.firstChild,ee=Q.nextSibling,ye=E.nextSibling,me=ye.firstChild,te=me.nextSibling;return o.$$click=e,o.$$clickData="Name",a.$$click=e,a.$$clickData="Iface",S.$$click=e,S.$$clickData="IP",m.$$click=e,m.$$clickData="Mac",$.$$click=e,$.$$clickData="Hw",x.$$click=e,x.$$clickData="Date",ee.$$click=e,ee.$$clickData="Known",te.$$click=e,te.$$clickData="Now",t})()}z(["click"]);var tt=C('
');function nt(){return(()=>{var e=tt(),t=e.firstChild,n=t.nextSibling,l=n.firstChild,i=l.firstChild;return y(t,N(Xe,{})),y(l,N(et,{}),i),y(i,N(Le,{get each(){return pe()},children:(s,o)=>N(qe,{host:s,index:o})})),e})()}var lt=C('
');function it(){return Ae(async()=>{const e=await Ue();Y(e)}),(()=>{var e=lt(),t=e.firstChild,n=t.firstChild;return y(n,N(nt,{})),e})()}const st=document.getElementById("root");Me(()=>N(it,{}),st); diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index fec3b0d..f577cbb 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -1,8 +1,17 @@ +import { onMount } from 'solid-js'; import './App.css' +import { apiGetAllHosts } from './functions/api'; +import { setAllHosts } from './functions/exports'; import Body from './pages/Body' function App() { + onMount(async () => { + + const hosts = await apiGetAllHosts(); + setAllHosts(hosts); + }); + return (
diff --git a/frontend/src/components/CardHead.tsx b/frontend/src/components/CardHead.tsx new file mode 100644 index 0000000..0e7cb88 --- /dev/null +++ b/frontend/src/components/CardHead.tsx @@ -0,0 +1,20 @@ +import { Show } from "solid-js"; +import { editNames, setEditNames } from "../functions/exports"; + +function CardHead() { + + return ( +
+
+ Edit names} + > + + +
+
+ ) +} + +export default CardHead diff --git a/frontend/src/components/TableHead.tsx b/frontend/src/components/TableHead.tsx new file mode 100644 index 0000000..f769b1a --- /dev/null +++ b/frontend/src/components/TableHead.tsx @@ -0,0 +1,28 @@ +import { Host } from "../functions/exports"; +import { sortByAnyField } from "../functions/sort"; + +function TableHead() { + + const handleSort = (sortBy: keyof Host) => { + sortByAnyField(sortBy); + }; + + return ( +
+ + + + + + + + + + + + + + ) +} + +export default TableHead \ No newline at end of file diff --git a/frontend/src/components/TableRow.tsx b/frontend/src/components/TableRow.tsx index ad0c9a6..fdfa118 100644 --- a/frontend/src/components/TableRow.tsx +++ b/frontend/src/components/TableRow.tsx @@ -1,8 +1,11 @@ - - +import { createSignal, Show } from "solid-js"; +import { editNames } from "../functions/exports"; +import { apiEditHost } from "../functions/api"; function TableRow(_props: any) { + const [name, setName] = createSignal(_props.host.Name); + const link = "http://" + _props.host.IP; let now = ; @@ -15,10 +18,27 @@ function TableRow(_props: any) { known = true; } + const handleInput = async (n: string) => { + // console.log('Edit:', n); + setName(n); + await apiEditHost(_props.host.ID, name(), ''); + }; + const handleToggle = async () => { + await apiEditHost(_props.host.ID, name(), 'toggle'); + }; + return ( - + @@ -26,11 +46,12 @@ function TableRow(_props: any) { - + ) } diff --git a/frontend/src/functions/api.ts b/frontend/src/functions/api.ts index 2b4968b..c79f743 100644 --- a/frontend/src/functions/api.ts +++ b/frontend/src/functions/api.ts @@ -1,8 +1,16 @@ const api = 'http://0.0.0.0:8840'; -export const getAllHosts = async () => { +export const apiGetAllHosts = async () => { const url = api+'/api/all'; const hosts = await (await fetch(url)).json(); return hosts; +}; + +export const apiEditHost = async (id:number, name:string, known:string) => { + + const url = api+'/api/edit/'+id+'/'+name+'/'+known; + const res = await (await fetch(url)).json(); + + return res; }; \ No newline at end of file diff --git a/frontend/src/functions/exports.ts b/frontend/src/functions/exports.ts index dc80b58..e1006a0 100644 --- a/frontend/src/functions/exports.ts +++ b/frontend/src/functions/exports.ts @@ -13,17 +13,17 @@ export interface Host { Now: number; }; -export const emptyHost: Host = { - ID: 0, - Name: "", - DNS: "", - Iface: "", - IP: "", - Mac: "", - Hw: "", - Date: "", - Known: 0, - Now: 0, +export interface Conf { + Color: string; + Timeout: number; }; -export const [allHosts, setAllHosts] = createSignal([]); \ No newline at end of file +export const [allHosts, setAllHosts] = createSignal([]); + +export const [appConfig, setAppConfig] = createSignal(); + +export const [editNames, setEditNames] = createSignal(false); + +// export const [store, setStore] = createStore({ hosts: allHosts() }); + +// export const [updBody, setUpdBody] = createSignal(false); \ No newline at end of file diff --git a/frontend/src/functions/sort.ts b/frontend/src/functions/sort.ts new file mode 100644 index 0000000..6fc6561 --- /dev/null +++ b/frontend/src/functions/sort.ts @@ -0,0 +1,51 @@ +import { allHosts, Host, setAllHosts } from "./exports"; + +let down = false; +let oldField = "Name"; + +export function sortByAnyField(field: keyof Host) { + + if (field != oldField) { + oldField = field; + down = !down; + } else { + oldField = ''; + down = !down; + } + + // localStorage.setItem("sortDown", down); + // localStorage.setItem("sortField", field); + // checkNotEmpty(addrsArray); + + let someArray = allHosts(); + if (field == 'IP') { + someArray.sort((a, b) => sortIP(a, b, down)); + } else { + someArray.sort((a, b) => byField(a, b, field, down)); + } + + setAllHosts([]); + setAllHosts(someArray); +} + +function byField(a:Host, b:Host, fieldName: keyof Host, down:boolean){ + if (a[fieldName] > b[fieldName]) { + return down ? 1 : -1; + } else { + return !down ? 1 : -1; + } +} + +function sortIP(a:Host, b:Host, down: boolean) { + const num1 = numIP(a); + const num2 = numIP(b); + if (down) { + return num1-num2; + } else { + return num2-num1; + } +} + +function numIP(a:Host) { + return Number(a.IP.split(".").map((num) => (`000${num}`).slice(-3) ).join("")); +} \ No newline at end of file diff --git a/frontend/src/pages/Body.tsx b/frontend/src/pages/Body.tsx index 261053b..ac5ec4c 100644 --- a/frontend/src/pages/Body.tsx +++ b/frontend/src/pages/Body.tsx @@ -1,42 +1,20 @@ -import { onMount } from "solid-js"; -import { allHosts, setAllHosts } from "../functions/exports"; -import { getAllHosts } from "../functions/api"; +import { allHosts } from "../functions/exports"; import { For } from "solid-js"; import TableRow from "../components/TableRow"; +import CardHead from "../components/CardHead"; +import TableHead from "../components/TableHead"; function Body() { - const handleSort = (sortBy: string) => { - console.log("SORT BY", sortBy); - }; - - onMount(async () => { - - setAllHosts(await getAllHosts()); - }); - return (
- Header +
-
Name Iface IP MAC Hardware Date Known Online
{_props.index}.{_props.host.Name} + + handleInput(e.target.value)}> + + {_props.host.Iface} {_props.host.IP} {_props.host.Mac}{_props.host.Date}
- +
{now}
- - - - - - - - - - - - - - +
Name Iface IP MAC Hardware Date Known Online
+ {(host, index) => From 745dd0c2b16dc68f38c4a81cace7a35f58e0dfd4 Mon Sep 17 00:00:00 2001 From: aceberg <1502200+aceberg@users.noreply.github.com> Date: Tue, 18 Mar 2025 21:29:58 +0700 Subject: [PATCH 06/10] Host page --- .../web/public/assets/HostPage-BkN2pMDv.js | 1 + backend/internal/web/public/assets/index.js | 2 +- backend/internal/web/templates/header.html | 4 +- backend/internal/web/webgui.go | 4 +- frontend/package-lock.json | 9 ++ frontend/package.json | 1 + frontend/src/App.tsx | 24 +++-- frontend/src/components/BodyCardHead.tsx | 28 +++++ frontend/src/components/CardHead.tsx | 20 ---- frontend/src/components/Filter.tsx | 38 +++++++ frontend/src/components/HostPageHost.tsx | 101 ++++++++++++++++++ frontend/src/components/HostPagePing.tsx | 78 ++++++++++++++ frontend/src/components/Search.tsx | 14 +++ frontend/src/components/TableRow.tsx | 5 +- frontend/src/functions/api.ts | 24 +++++ frontend/src/functions/atstart.ts | 37 +++++++ frontend/src/functions/exports.ts | 27 +++-- frontend/src/functions/filter.ts | 40 +++++++ frontend/src/functions/search.ts | 37 +++++++ frontend/src/functions/sort.ts | 14 ++- frontend/src/pages/Body.tsx | 11 +- frontend/src/pages/HostPage.tsx | 30 ++++++ 22 files changed, 499 insertions(+), 50 deletions(-) create mode 100644 backend/internal/web/public/assets/HostPage-BkN2pMDv.js create mode 100644 frontend/src/components/BodyCardHead.tsx delete mode 100644 frontend/src/components/CardHead.tsx create mode 100644 frontend/src/components/Filter.tsx create mode 100644 frontend/src/components/HostPageHost.tsx create mode 100644 frontend/src/components/HostPagePing.tsx create mode 100644 frontend/src/components/Search.tsx create mode 100644 frontend/src/functions/atstart.ts create mode 100644 frontend/src/functions/filter.ts create mode 100644 frontend/src/functions/search.ts create mode 100644 frontend/src/pages/HostPage.tsx diff --git a/backend/internal/web/public/assets/HostPage-BkN2pMDv.js b/backend/internal/web/public/assets/HostPage-BkN2pMDv.js new file mode 100644 index 0000000..041c8e6 --- /dev/null +++ b/backend/internal/web/public/assets/HostPage-BkN2pMDv.js @@ -0,0 +1 @@ +import{t as o,i as l,c as t,a as K,b as x,s as O,d as A,e as et,f as B,g as v,h as I,F as lt,j as it,o as nt,u as rt,k as at,l as st}from"./index.js";var dt=o('
Host
ID
Name
DNS name
Iface
IP
MAC
Hardware
Date
Known
Online
'),_t=o('
Scanning port: '),ut=o("");function ft(){let e=!1;const[s,$]=v(""),[C,b]=v(""),[_,y]=v(""),[u,w]=v([]),f=async()=>{e=!1;let n=Number(s());(Number.isNaN(n)||n<1||n>65535)&&(n=1);let r=Number(C());(Number.isNaN(r)||r<1||r>65535)&&(r=65535);let c;for(let a=n;a<=r&&!e;a++)y(a.toString()),c=await it(t().IP,a),c&&w([...u(),a])},P=()=>{e?($(_()),f()):e=!0};return(()=>{var n=bt(),r=n.firstChild,c=r.nextSibling,a=c.firstChild,g=a.firstChild,h=g.nextSibling,k=h.nextSibling,S=a.nextSibling;return g.$$input=i=>$(i.target.value),h.$$input=i=>b(i.target.value),k.$$click=f,l(c,(()=>{var i=K(()=>_()!="");return()=>i()?(()=>{var d=_t(),m=d.firstChild,p=m.nextSibling;return p.firstChild,m.$$click=P,l(p,_,null),d})():[]})(),S),l(S,I(lt,{get each(){return u()},children:i=>(()=>{var d=ut();return l(d,i),x(()=>O(d,"href","http://"+t().IP+":"+i)),d})()})),n})()}B(["input","click"]);var gt=o("
");function pt(){return nt(async()=>{const e=rt(),s=await at(e.id);st(s)}),(()=>{var e=gt(),s=e.firstChild,$=s.nextSibling;return l(s,I($t,{})),l($,I(ft,{})),e})()}export{pt as default}; diff --git a/backend/internal/web/public/assets/index.js b/backend/internal/web/public/assets/index.js index f2a40a3..a117471 100644 --- a/backend/internal/web/public/assets/index.js +++ b/backend/internal/web/public/assets/index.js @@ -1 +1 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))l(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&l(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function l(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();const Se=!1,_e=(e,t)=>e===t,xe=Symbol("solid-track"),U={equals:_e};let ce=de;const I=1,F=2,fe={owned:null,cleanups:null,context:null,owner:null};var h=null;let W=null,ve=null,d=null,g=null,k=null,G=0;function H(e,t){const n=d,l=h,i=e.length===0,s=t===void 0?l:t,o=i?fe:{owned:null,cleanups:null,context:s?s.context:null,owner:s},r=i?e:()=>e(()=>T(()=>O(o)));h=o,d=null;try{return M(r,!0)}finally{d=n,h=l}}function L(e,t){t=t?Object.assign({},U,t):U;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},l=i=>(typeof i=="function"&&(i=i(n.value)),ue(n,i));return[ae.bind(n),l]}function K(e,t,n){const l=Z(e,t,!1,I);B(l)}function Ce(e,t,n){ce=Ie;const l=Z(e,t,!1,I);l.user=!0,k?k.push(l):B(l)}function j(e,t,n){n=n?Object.assign({},U,n):U;const l=Z(e,t,!0,0);return l.observers=null,l.observerSlots=null,l.comparator=n.equals||void 0,B(l),ae.bind(l)}function T(e){if(d===null)return e();const t=d;d=null;try{return e()}finally{d=t}}function Ae(e){Ce(()=>T(e))}function ke(e){return h===null||(h.cleanups===null?h.cleanups=[e]:h.cleanups.push(e)),e}function ae(){if(this.sources&&this.state)if(this.state===I)B(this);else{const e=g;g=null,M(()=>V(this),!1),g=e}if(d){const e=this.observers?this.observers.length:0;d.sources?(d.sources.push(this),d.sourceSlots.push(e)):(d.sources=[this],d.sourceSlots=[e]),this.observers?(this.observers.push(d),this.observerSlots.push(d.sources.length-1)):(this.observers=[d],this.observerSlots=[d.sources.length-1])}return this.value}function ue(e,t,n){let l=e.value;return(!e.comparator||!e.comparator(l,t))&&(e.value=t,e.observers&&e.observers.length&&M(()=>{for(let i=0;i1e6)throw g=[],new Error},!1)),t}function B(e){if(!e.fn)return;O(e);const t=G;Ee(e,e.value,t)}function Ee(e,t,n){let l;const i=h,s=d;d=h=e;try{l=e.fn(t)}catch(o){return e.pure&&(e.state=I,e.owned&&e.owned.forEach(O),e.owned=null),e.updatedAt=n+1,be(o)}finally{d=s,h=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?ue(e,l):e.value=l,e.updatedAt=n)}function Z(e,t,n,l=I,i){const s={fn:e,state:l,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:h,context:h?h.context:null,pure:n};return h===null||h!==fe&&(h.owned?h.owned.push(s):h.owned=[s]),s}function R(e){if(e.state===0)return;if(e.state===F)return V(e);if(e.suspense&&T(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt=0;n--)if(e=t[n],e.state===I)B(e);else if(e.state===F){const l=g;g=null,M(()=>V(e,t[0]),!1),g=l}}function M(e,t){if(g)return e();let n=!1;t||(g=[]),k?n=!0:k=[],G++;try{const l=e();return Ne(n),l}catch(l){n||(k=null),g=null,be(l)}}function Ne(e){if(g&&(de(g),g=null),e)return;const t=k;k=null,t.length&&M(()=>ce(t),!1)}function de(e){for(let t=0;t=0;t--)O(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)O(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function Te(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function be(e,t=h){throw Te(e)}const De=Symbol("fallback");function ne(e){for(let t=0;t1?[]:null;return ke(()=>ne(s)),()=>{let f=e()||[],a=f.length,u,c;return f[xe],T(()=>{let b,_,m,v,A,$,p,w,x;if(a===0)o!==0&&(ne(s),s=[],l=[],i=[],o=0,r&&(r=[])),n.fallback&&(l=[De],i[0]=H(E=>(s[0]=E,n.fallback())),o=1);else if(o===0){for(i=new Array(a),c=0;c=$&&w>=$&&l[p]===f[w];p--,w--)m[w]=i[p],v[w]=s[p],r&&(A[w]=r[p]);for(b=new Map,_=new Array(w+1),c=w;c>=$;c--)x=f[c],u=b.get(x),_[c]=u===void 0?-1:u,b.set(x,c);for(u=$;u<=p;u++)x=l[u],c=b.get(x),c!==void 0&&c!==-1?(m[c]=i[u],v[c]=s[u],r&&(A[c]=r[u]),c=_[c],b.set(x,c)):s[u]();for(c=$;ce(t||{}))}const Oe=e=>`Stale read from <${e}>.`;function Le(e){const t="fallback"in e&&{fallback:()=>e.fallback};return j(Pe(()=>e.each,e.children,t||void 0))}function $e(e){const t=e.keyed,n=j(()=>e.when,void 0,void 0),l=t?n:j(n,void 0,{equals:(i,s)=>!i==!s});return j(()=>{const i=l();if(i){const s=e.children;return typeof s=="function"&&s.length>0?T(()=>s(t?i:()=>{if(!T(l))throw Oe("Show");return n()})):s}return e.fallback},void 0,void 0)}function Be(e,t,n){let l=n.length,i=t.length,s=l,o=0,r=0,f=t[i-1].nextSibling,a=null;for(;ou-r){const _=t[o];for(;r{i=s,t===document?e():y(t,e(),t.firstChild?null:void 0,n)},l.owner),()=>{i(),t.textContent=""}}function C(e,t,n,l){let i;const s=()=>{const r=document.createElement("template");return r.innerHTML=e,r.content.firstChild},o=()=>(i||(i=s())).cloneNode(!0);return o.cloneNode=o,o}function z(e,t=window.document){const n=t[le]||(t[le]=new Set);for(let l=0,i=e.length;lq(e,t(),i,n),l)}function je(e){let t=e.target;const n=`$$${e.type}`,l=e.target,i=e.currentTarget,s=f=>Object.defineProperty(e,"target",{configurable:!0,value:f}),o=()=>{const f=t[n];if(f&&!t.disabled){const a=t[`${n}Data`];if(a!==void 0?f.call(t,a,e):f.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&s(t.host),!0},r=()=>{for(;o()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),e.composedPath){const f=e.composedPath();s(f[0]);for(let a=0;a{let r=t();for(;typeof r=="function";)r=r();n=q(e,r,n,l)}),()=>n;if(Array.isArray(t)){const r=[],f=n&&Array.isArray(n);if(J(r,t,n,i))return K(()=>n=q(e,r,n,l,!0)),()=>n;if(r.length===0){if(n=D(e,n,l),o)return n}else f?n.length===0?ie(e,r,l):Be(e,n,r):(n&&D(e),ie(e,r));n=r}else if(t.nodeType){if(Array.isArray(n)){if(o)return n=D(e,n,l,t);D(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function J(e,t,n,l){let i=!1;for(let s=0,o=t.length;s=0;o--){const r=t[o];if(i!==r){const f=r.parentNode===e;!s&&!o?f?e.replaceChild(i,r):e.insertBefore(i,n):f&&r.remove()}else s=!0}}else e.insertBefore(i,n);return[i]}const ge="",Ue=async()=>{const e=ge+"/api/all";return await(await fetch(e)).json()},se=async(e,t,n)=>{const l=ge+"/api/edit/"+e+"/"+t+"/"+n;return await(await fetch(l)).json()},[pe,Y]=L([]);L();const[we,re]=L(!1);var Fe=C(''),Ke=C(''),Re=C(""),Ve=C('
.
');function qe(e){const[t,n]=L(e.host.Name),l="http://"+e.host.IP;let i=Fe();e.host.Now==1&&(i=Ke());let s=!1;e.host.Known==1&&(s=!0);const o=async f=>{n(f),await se(e.host.ID,t(),"")},r=async()=>{await se(e.host.ID,t(),"toggle")};return(()=>{var f=Ve(),a=f.firstChild,u=a.firstChild,c=a.nextSibling,S=c.nextSibling,b=S.nextSibling,_=b.firstChild,m=b.nextSibling,v=m.nextSibling,A=v.nextSibling,$=A.nextSibling,p=$.firstChild,w=p.firstChild,x=$.nextSibling;return y(a,()=>e.index,u),y(c,N($e,{get when(){return we()},get fallback(){return t()},get children(){var E=Re();return E.$$input=Q=>o(Q.target.value),K(()=>E.value=t()),E}})),y(S,()=>e.host.Iface),He(_,"href",l),y(_,()=>e.host.IP),y(m,()=>e.host.Mac),y(v,()=>e.host.Hw),y(A,()=>e.host.Date),w.$$click=r,w.checked=s,y(x,i),f})()}z(["input","click"]);var Ge=C('
Name Iface IP MAC Hardware Date Known Online ');function et(){const e=t=>{Je(t)};return(()=>{var t=ze(),n=t.firstChild,l=n.firstChild,i=l.nextSibling,s=i.firstChild,o=s.nextSibling,r=i.nextSibling,f=r.firstChild,a=f.nextSibling,u=r.nextSibling,c=u.firstChild,S=c.nextSibling,b=u.nextSibling,_=b.firstChild,m=_.nextSibling,v=b.nextSibling,A=v.firstChild,$=A.nextSibling,p=v.nextSibling,w=p.firstChild,x=w.nextSibling,E=p.nextSibling,Q=E.firstChild,ee=Q.nextSibling,ye=E.nextSibling,me=ye.firstChild,te=me.nextSibling;return o.$$click=e,o.$$clickData="Name",a.$$click=e,a.$$clickData="Iface",S.$$click=e,S.$$clickData="IP",m.$$click=e,m.$$clickData="Mac",$.$$click=e,$.$$clickData="Hw",x.$$click=e,x.$$clickData="Date",ee.$$click=e,ee.$$clickData="Known",te.$$click=e,te.$$clickData="Now",t})()}z(["click"]);var tt=C('
');function nt(){return(()=>{var e=tt(),t=e.firstChild,n=t.nextSibling,l=n.firstChild,i=l.firstChild;return y(t,N(Xe,{})),y(l,N(et,{}),i),y(i,N(Le,{get each(){return pe()},children:(s,o)=>N(qe,{host:s,index:o})})),e})()}var lt=C('
');function it(){return Ae(async()=>{const e=await Ue();Y(e)}),(()=>{var e=lt(),t=e.firstChild,n=t.firstChild;return y(n,N(nt,{})),e})()}const st=document.getElementById("root");Me(()=>N(it,{}),st); +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();const w={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return He(this.context.count)},getNextContextId(){return He(this.context.count++)}};function He(e){const t=String(e),n=t.length-1;return w.context.id+(n?String.fromCharCode(96+n):"")+t}function te(e){w.context=e}const Ze=!1,xt=(e,t)=>e===t,Ce=Symbol("solid-proxy"),_t=typeof Proxy=="function",At=Symbol("solid-track"),ue={equals:xt};let ze=lt;const V=1,fe=2,et={owned:null,cleanups:null,context:null,owner:null},$e={};var $=null;let ve=null,Ct=null,v=null,N=null,q=null,pe=0;function ne(e,t){const n=v,r=$,s=e.length===0,o=t===void 0?r:t,i=s?et:{owned:null,cleanups:null,context:o?o.context:null,owner:o},l=s?e:()=>e(()=>T(()=>se(i)));$=i,v=null;try{return K(l,!0)}finally{v=n,$=r}}function R(e,t){t=t?Object.assign({},ue,t):ue;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=s=>(typeof s=="function"&&(s=s(n.value)),it(n,s));return[ot.bind(n),r]}function Pt(e,t,n){const r=me(e,t,!0,V);Z(r)}function Q(e,t,n){const r=me(e,t,!1,V);Z(r)}function kt(e,t,n){ze=Ft;const r=me(e,t,!1,V);r.user=!0,q?q.push(r):Z(r)}function L(e,t,n){n=n?Object.assign({},ue,n):ue;const r=me(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Z(r),ot.bind(r)}function Et(e){return e&&typeof e=="object"&&"then"in e}function It(e,t,n){let r,s,o;r=!0,s=e,o={};let i=null,l=$e,a=null,c=!1,f="initialValue"in o,u=typeof r=="function"&&L(r);const g=new Set,[h,b]=(o.storage||R)(o.initialValue),[d,p]=R(void 0),[y,m]=R(void 0,{equals:!1}),[S,x]=R(f?"ready":"unresolved");w.context&&(a=w.getNextContextId(),o.ssrLoadFrom==="initial"?l=o.initialValue:w.load&&w.has(a)&&(l=w.load(a)));function _(k,C,E,W){return i===k&&(i=null,W!==void 0&&(f=!0),(k===l||C===l)&&o.onHydrated&&queueMicrotask(()=>o.onHydrated(W,{value:C})),l=$e,D(C,E)),C}function D(k,C){K(()=>{C===void 0&&b(()=>k),x(C!==void 0?"errored":f?"ready":"unresolved"),p(C);for(const E of g.keys())E.decrement();g.clear()},!1)}function H(){const k=Nt,C=h(),E=d();if(E!==void 0&&!i)throw E;return v&&v.user,C}function U(k=!0){if(k!==!1&&c)return;c=!1;const C=u?u():r;if(C==null||C===!1){_(i,T(h));return}const E=l!==$e?l:T(()=>s(C,{value:h(),refetching:k}));return Et(E)?(i=E,"value"in E?(E.status==="success"?_(i,E.value,void 0,C):_(i,void 0,Pe(E.value),C),E):(c=!0,queueMicrotask(()=>c=!1),K(()=>{x(f?"refreshing":"pending"),m()},!1),E.then(W=>_(E,W,void 0,C),W=>_(E,void 0,Pe(W),C)))):(_(i,E,void 0,C),E)}return Object.defineProperties(H,{state:{get:()=>S()},error:{get:()=>d()},loading:{get(){const k=S();return k==="pending"||k==="refreshing"}},latest:{get(){if(!f)return H();const k=d();if(k&&!i)throw k;return h()}}}),u?Pt(()=>U(!1)):U(!1),[H,{refetch:U,mutate:b}]}function Lt(e){return K(e,!1)}function T(e){if(v===null)return e();const t=v;v=null;try{return e()}finally{v=t}}function Re(e,t,n){const r=Array.isArray(e);let s,o=n&&n.defer;return i=>{let l;if(r){l=Array(e.length);for(let c=0;ct(l,s,i));return s=l,a}}function Rt(e){kt(()=>T(e))}function Oe(e){return $===null||($.cleanups===null?$.cleanups=[e]:$.cleanups.push(e)),e}function tt(){return $}function nt(e,t){const n=$,r=v;$=e,v=null;try{return K(t,!0)}catch(s){De(s)}finally{$=n,v=r}}function Ot(e){const t=v,n=$;return Promise.resolve().then(()=>{v=t,$=n;let r;return K(e,!1),v=$=null,r?r.done:void 0})}const[ir,lr]=R(!1);function rt(e,t){const n=Symbol("context");return{id:n,Provider:jt(n),defaultValue:e}}function st(e){let t;return $&&$.context&&(t=$.context[e.id])!==void 0?t:e.defaultValue}function Ne(e){const t=L(e),n=L(()=>ke(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}let Nt;function ot(){if(this.sources&&this.state)if(this.state===V)Z(this);else{const e=N;N=null,K(()=>he(this),!1),N=e}if(v){const e=this.observers?this.observers.length:0;v.sources?(v.sources.push(this),v.sourceSlots.push(e)):(v.sources=[this],v.sourceSlots=[e]),this.observers?(this.observers.push(v),this.observerSlots.push(v.sources.length-1)):(this.observers=[v],this.observerSlots=[v.sources.length-1])}return this.value}function it(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&K(()=>{for(let s=0;s1e6)throw N=[],new Error},!1)),t}function Z(e){if(!e.fn)return;se(e);const t=pe;Dt(e,e.value,t)}function Dt(e,t,n){let r;const s=$,o=v;v=$=e;try{r=e.fn(t)}catch(i){return e.pure&&(e.state=V,e.owned&&e.owned.forEach(se),e.owned=null),e.updatedAt=n+1,De(i)}finally{v=o,$=s}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?it(e,r):e.value=r,e.updatedAt=n)}function me(e,t,n,r=V,s){const o={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:$,context:$?$.context:null,pure:n};return $===null||$!==et&&($.owned?$.owned.push(o):$.owned=[o]),o}function de(e){if(e.state===0)return;if(e.state===fe)return he(e);if(e.suspense&&T(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt=0;n--)if(e=t[n],e.state===V)Z(e);else if(e.state===fe){const r=N;N=null,K(()=>he(e,t[0]),!1),N=r}}function K(e,t){if(N)return e();let n=!1;t||(N=[]),q?n=!0:q=[],pe++;try{const r=e();return Tt(n),r}catch(r){n||(q=null),N=null,De(r)}}function Tt(e){if(N&&(lt(N),N=null),e)return;const t=q;q=null,t.length&&K(()=>ze(t),!1)}function lt(e){for(let t=0;t=0;t--)se(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)se(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function Pe(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function De(e,t=$){throw Pe(e)}function ke(e){if(typeof e=="function"&&!e.length)return ke(e());if(Array.isArray(e)){const t=[];for(let n=0;ns=T(()=>($.context={...$.context,[e]:r.value},Ne(()=>r.children))),void 0),s}}const Ht=Symbol("fallback");function Ue(e){for(let t=0;t1?[]:null;return Oe(()=>Ue(o)),()=>{let a=e()||[],c=a.length,f,u;return a[At],T(()=>{let h,b,d,p,y,m,S,x,_;if(c===0)i!==0&&(Ue(o),o=[],r=[],s=[],i=0,l&&(l=[])),n.fallback&&(r=[Ht],s[0]=ne(D=>(o[0]=D,n.fallback())),i=1);else if(i===0){for(s=new Array(c),u=0;u=m&&x>=m&&r[S]===a[x];S--,x--)d[x]=s[S],p[x]=o[S],l&&(y[x]=l[S]);for(h=new Map,b=new Array(x+1),u=x;u>=m;u--)_=a[u],f=h.get(_),b[u]=f===void 0?-1:f,h.set(_,u);for(f=m;f<=S;f++)_=r[f],u=h.get(_),u!==void 0&&u!==-1?(d[u]=s[f],p[u]=o[f],l&&(y[u]=l[f]),u=b[u],h.set(_,u)):o[f]();for(u=m;ue(t||{}))}function ae(){return!0}const Bt={get(e,t,n){return t===Ce?n:e.get(t)},has(e,t){return t===Ce?!0:e.has(t)},set:ae,deleteProperty:ae,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:ae,deleteProperty:ae}},ownKeys(e){return e.keys()}};function Se(e){return(e=typeof e=="function"?e():e)?e:{}}function Kt(){for(let e=0,t=this.length;e=0;l--){const a=Se(e[l])[i];if(a!==void 0)return a}},has(i){for(let l=e.length-1;l>=0;l--)if(i in Se(e[l]))return!0;return!1},keys(){const i=[];for(let l=0;l=0;i--){const l=e[i];if(!l)continue;const a=Object.getOwnPropertyNames(l);for(let c=a.length-1;c>=0;c--){const f=a[c];if(f==="__proto__"||f==="constructor")continue;const u=Object.getOwnPropertyDescriptor(l,f);if(!r[f])r[f]=u.get?{enumerable:!0,configurable:!0,get:Kt.bind(n[f]=[u.get.bind(l)])}:u.value!==void 0?u:void 0;else{const g=n[f];g&&(u.get?g.push(u.get.bind(l)):u.value!==void 0&&g.push(()=>u.value))}}}const s={},o=Object.keys(r);for(let i=o.length-1;i>=0;i--){const l=o[i],a=r[l];a&&a.get?Object.defineProperty(s,l,a):s[l]=a?a.value:void 0}return s}function qt(e){let t,n;const r=s=>{const o=w.context;if(o){const[l,a]=R();w.count||(w.count=0),w.count++,(n||(n=e())).then(c=>{!w.done&&te(o),w.count--,a(()=>c.default),te()}),t=l}else if(!t){const[l]=It(()=>(n||(n=e())).then(a=>a.default));t=l}let i;return L(()=>(i=t())?T(()=>{if(!o||w.done)return i(s);const l=w.context;te(o);const a=i(s);return te(l),a}):"")};return r.preload=()=>n||((n=e()).then(s=>t=()=>s.default),n),r}const Vt=e=>`Stale read from <${e}>.`;function ct(e){const t="fallback"in e&&{fallback:()=>e.fallback};return L(Ut(()=>e.each,e.children,t||void 0))}function we(e){const t=e.keyed,n=L(()=>e.when,void 0,void 0),r=t?n:L(n,void 0,{equals:(s,o)=>!s==!o});return L(()=>{const s=r();if(s){const o=e.children;return typeof o=="function"&&o.length>0?T(()=>o(t?s:()=>{if(!T(r))throw Vt("Show");return n()})):o}return e.fallback},void 0,void 0)}function Wt(e,t,n){let r=n.length,s=t.length,o=r,i=0,l=0,a=t[s-1].nextSibling,c=null;for(;if-l){const b=t[i];for(;l{s=o,t===document?e():O(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{s(),t.textContent=""}}function j(e,t,n,r){let s;const o=()=>{const l=document.createElement("template");return l.innerHTML=e,l.content.firstChild},i=()=>(s||(s=o())).cloneNode(!0);return i.cloneNode=i,i}function z(e,t=window.document){const n=t[Be]||(t[Be]=new Set);for(let r=0,s=e.length;rge(e,t(),s,n),r)}function ut(e){return!!w.context&&!w.done&&(!e||e.isConnected)}function Xt(e){if(w.registry&&w.events&&w.events.find(([a,c])=>c===e))return;let t=e.target;const n=`$$${e.type}`,r=e.target,s=e.currentTarget,o=a=>Object.defineProperty(e,"target",{configurable:!0,value:a}),i=()=>{const a=t[n];if(a&&!t.disabled){const c=t[`${n}Data`];if(c!==void 0?a.call(t,c,e):a.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&o(t.host),!0},l=()=>{for(;i()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),w.registry&&!w.done&&(w.done=_$HY.done=!0),e.composedPath){const a=e.composedPath();o(a[0]);for(let c=0;c{let a=t();for(;typeof a=="function";)a=a();n=ge(e,a,n,r)}),()=>n;if(Array.isArray(t)){const a=[],c=n&&Array.isArray(n);if(Ee(a,t,n,s))return Q(()=>n=ge(e,a,n,r,!0)),()=>n;if(o){if(!a.length)return n;if(r===void 0)return n=[...e.childNodes];let f=a[0];if(f.parentNode!==e)return n;const u=[f];for(;(f=f.nextSibling)!==r;)u.push(f);return n=u}if(a.length===0){if(n=J(e,n,r),l)return n}else c?n.length===0?Me(e,a,r):Wt(e,n,a):(n&&J(e),Me(e,a));n=a}else if(t.nodeType){if(o&&t.parentNode)return n=l?[t]:t;if(Array.isArray(n)){if(l)return n=J(e,n,r,t);J(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function Ee(e,t,n,r){let s=!1;for(let o=0,i=t.length;o=0;i--){const l=t[i];if(s!==l){const a=l.parentNode===e;!o&&!i?a?e.replaceChild(s,l):e.insertBefore(s,n):a&&l.remove()}else o=!0}}else e.insertBefore(s,n);return[s]}const Yt=!1,Jt="modulepreload",Qt=function(e){return"/"+e},qe={},Zt=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),l=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));s=Promise.allSettled(n.map(a=>{if(a=Qt(a),a in qe)return;qe[a]=!0;const c=a.endsWith(".css"),f=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${f}`))return;const u=document.createElement("link");if(u.rel=c?"stylesheet":Jt,c||(u.as="script"),u.crossOrigin="",u.href=a,l&&u.setAttribute("nonce",l),document.head.appendChild(u),c)return new Promise((g,h)=>{u.addEventListener("load",g),u.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${a}`)))})}))}function o(i){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=i,window.dispatchEvent(l),!l.defaultPrevented)throw i}return s.then(i=>{for(const l of i||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})};function ft(){let e=new Set;function t(s){return e.add(s),()=>e.delete(s)}let n=!1;function r(s,o){if(n)return!(n=!1);const i={to:s,options:o,defaultPrevented:!1,preventDefault:()=>i.defaultPrevented=!0};for(const l of e)l.listener({...i,from:l.location,retry:a=>{a&&(n=!0),l.navigate(s,{...o,resolve:!1})}});return!i.defaultPrevented}return{subscribe:t,confirm:r}}let Ie;function Te(){(!window.history.state||window.history.state._depth==null)&&window.history.replaceState({...window.history.state,_depth:window.history.length-1},""),Ie=window.history.state._depth}Te();function zt(e){return{...e,_depth:window.history.state&&window.history.state._depth}}function en(e,t){let n=!1;return()=>{const r=Ie;Te();const s=r==null?null:Ie-r;if(n){n=!1;return}s&&t(s)?(n=!0,window.history.go(-s)):e()}}const tn=/^(?:[a-z0-9]+:)?\/\//i,nn=/^\/+|(\/)\/+$/g,dt="http://sr";function re(e,t=!1){const n=e.replace(nn,"$1");return n?t||/^[?#]/.test(n)?n:"/"+n:""}function ce(e,t,n){if(tn.test(t))return;const r=re(e),s=n&&re(n);let o="";return!s||t.startsWith("/")?o=r:s.toLowerCase().indexOf(r.toLowerCase())!==0?o=r+s:o=s,(o||"/")+re(t,!o)}function rn(e,t){if(e==null)throw new Error(t);return e}function sn(e,t){return re(e).replace(/\/*(\*.*)?$/g,"")+re(t)}function ht(e){const t={};return e.searchParams.forEach((n,r)=>{r in t?Array.isArray(t[r])?t[r].push(n):t[r]=[t[r],n]:t[r]=n}),t}function on(e,t,n){const[r,s]=e.split("/*",2),o=r.split("/").filter(Boolean),i=o.length;return l=>{const a=l.split("/").filter(Boolean),c=a.length-i;if(c<0||c>0&&s===void 0&&!t)return null;const f={path:i?"":"/",params:{}},u=g=>n===void 0?void 0:n[g];for(let g=0;gr===e;return t===void 0?!0:typeof t=="string"?n(t):typeof t=="function"?t(e):Array.isArray(t)?t.some(n):t instanceof RegExp?t.test(e):!1}function ln(e){const[t,n]=e.pattern.split("/*",2),r=t.split("/").filter(Boolean);return r.reduce((s,o)=>s+(o.startsWith(":")?2:3),r.length-(n===void 0?0:1))}function gt(e){const t=new Map,n=tt();return new Proxy({},{get(r,s){return t.has(s)||nt(n,()=>t.set(s,L(()=>e()[s]))),t.get(s)()},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}},ownKeys(){return Reflect.ownKeys(e())}})}function pt(e){let t=/(\/?\:[^\/]+)\?/.exec(e);if(!t)return[e];let n=e.slice(0,t.index),r=e.slice(t.index+t[0].length);const s=[n,n+=t[1]];for(;t=/^(\/\:[^\/]+)\?/.exec(r);)s.push(n+=t[1]),r=r.slice(t[0].length);return pt(r).reduce((o,i)=>[...o,...s.map(l=>l+i)],[])}const an=100,mt=rt(),wt=rt(),cn=()=>rn(st(mt)," and 'use' router primitives can be only used inside a Route."),ar=()=>cn().params;function un(e,t=""){const{component:n,preload:r,load:s,children:o,info:i}=e,l=!o||Array.isArray(o)&&!o.length,a={key:e,component:n,preload:r||s,info:i};return bt(e.path).reduce((c,f)=>{for(const u of pt(f)){const g=sn(t,u);let h=l?g:g.split("/*",1)[0];h=h.split("/").map(b=>b.startsWith(":")||b.startsWith("*")?b:encodeURIComponent(b)).join("/"),c.push({...a,originalPath:f,pattern:h,matcher:on(h,!l,e.matchFilters)})}return c},[])}function fn(e,t=0){return{routes:e,score:ln(e[e.length-1])*1e4-t,matcher(n){const r=[];for(let s=e.length-1;s>=0;s--){const o=e[s],i=o.matcher(n);if(!i)return null;r.unshift({...i,route:o})}return r}}}function bt(e){return Array.isArray(e)?e:[e]}function yt(e,t="",n=[],r=[]){const s=bt(e);for(let o=0,i=s.length;oi.score-o.score)}function _e(e,t){for(let n=0,r=e.length;n{const u=e();try{return new URL(u,r)}catch{return console.error(`Invalid path ${u}`),f}},r,{equals:(f,u)=>f.href===u.href}),o=L(()=>s().pathname),i=L(()=>s().search,!0),l=L(()=>s().hash),a=()=>"",c=Re(i,()=>ht(s()));return{get pathname(){return o()},get search(){return i()},get hash(){return l()},get state(){return t()},get key(){return a()},query:n?n(c):gt(c)}}let G;function hn(){return G}function gn(e,t,n,r={}){const{signal:[s,o],utils:i={}}=e,l=i.parsePath||(A=>A),a=i.renderPath||(A=>A),c=i.beforeLeave||ft(),f=ce("",r.base||"");if(f===void 0)throw new Error(`${f} is not a valid base path`);f&&!s().value&&o({value:f,replace:!0,scroll:!1});const[u,g]=R(!1);let h;const b=(A,P)=>{P.value===d()&&P.state===y()||(h===void 0&&g(!0),G=A,h=P,Ot(()=>{h===P&&(p(h.value),m(h.state),_[1](F=>F.filter(X=>X.pending)))}).finally(()=>{h===P&&Lt(()=>{G=void 0,A==="navigate"&&W(h),g(!1),h=void 0})}))},[d,p]=R(s().value),[y,m]=R(s().state),S=dn(d,y,i.queryWrapper),x=[],_=R([]),D=L(()=>typeof r.transformUrl=="function"?_e(t(),r.transformUrl(S.pathname)):_e(t(),S.pathname)),H=()=>{const A=D(),P={};for(let F=0;Ff,outlet:()=>null,resolvePath(A){return ce(f,A)}};return Q(Re(s,A=>b("native",A),{defer:!0})),{base:k,location:S,params:U,isRouting:u,renderPath:a,parsePath:l,navigatorFactory:E,matches:D,beforeLeave:c,preloadRoute:St,singleFlight:r.singleFlight===void 0?!0:r.singleFlight,submissions:_};function C(A,P,F){T(()=>{if(typeof P=="number"){P&&(i.go?i.go(P):console.warn("Router integration does not support relative routing"));return}const X=!P||P[0]==="?",{replace:be,resolve:Y,scroll:ye,state:ee}={replace:!1,resolve:!X,scroll:!0,...F},le=Y?A.resolvePath(P):ce(X&&S.pathname||"",P);if(le===void 0)throw new Error(`Path '${P}' is not a routable path`);if(x.length>=an)throw new Error("Too many redirects");const je=d();(le!==je||ee!==y())&&(Yt||c.confirm(le,F)&&(x.push({value:je,replace:be,scroll:ye,state:y()}),b("navigate",{value:le,state:ee})))})}function E(A){return A=A||st(wt)||k,(P,F)=>C(A,P,F)}function W(A){const P=x[0];P&&(o({...A,replace:P.replace,scroll:P.scroll}),x.length=0)}function St(A,P){const F=_e(t(),A.pathname),X=G;G="preload";for(let be in F){const{route:Y,params:ye}=F[be];Y.component&&Y.component.preload&&Y.component.preload();const{preload:ee}=Y;P&&ee&&nt(n(),()=>ee({params:ye,location:{pathname:A.pathname,search:A.search,hash:A.hash,query:ht(A),state:null,key:""},intent:"preload"}))}G=X}}function pn(e,t,n,r){const{base:s,location:o,params:i}=e,{pattern:l,component:a,preload:c}=r().route,f=L(()=>r().path);a&&a.preload&&a.preload();const u=c?c({params:i,location:o,intent:G||"initial"}):void 0;return{parent:t,pattern:l,path:f,outlet:()=>a?I(a,{params:i,location:o,data:u,get children(){return n()}}):n(),resolvePath(h){return ce(s.path(),h,f())}}}const mn=e=>t=>{const{base:n}=t,r=Ne(()=>t.children),s=L(()=>yt(r(),t.base||""));let o;const i=gn(e,s,()=>o,{base:n,singleFlight:t.singleFlight,transformUrl:t.transformUrl});return e.create&&e.create(i),I(mt.Provider,{value:i,get children(){return I(wn,{routerState:i,get root(){return t.root},get preload(){return t.rootPreload||t.rootLoad},get children(){return[L(()=>(o=tt())&&null),I(bn,{routerState:i,get branches(){return s()}})]}})}})};function wn(e){const t=e.routerState.location,n=e.routerState.params,r=L(()=>e.preload&&T(()=>{e.preload({params:n,location:t,intent:hn()||"initial"})}));return I(we,{get when(){return e.root},keyed:!0,get fallback(){return e.children},children:s=>I(s,{params:n,location:t,get data(){return r()},get children(){return e.children}})})}function bn(e){const t=[];let n;const r=L(Re(e.routerState.matches,(s,o,i)=>{let l=o&&s.length===o.length;const a=[];for(let c=0,f=s.length;c{t[c]=h,a[c]=pn(e.routerState,a[c-1]||e.routerState.base,Ve(()=>r()[c+1]),()=>e.routerState.matches()[c])}))}return t.splice(s.length).forEach(c=>c()),i&&l?i:(n=a[0],a)}));return Ve(()=>r()&&n)()}const Ve=e=>()=>I(we,{get when(){return e()},keyed:!0,children:t=>I(wt.Provider,{value:t,get children(){return t.outlet()}})}),We=e=>{const t=Ne(()=>e.children);return Mt(e,{get children(){return t()}})};function yn([e,t],n,r){return[e,r?s=>t(r(s)):t]}function $n(e){let t=!1;const n=s=>typeof s=="string"?{value:s}:s,r=yn(R(n(e.get()),{equals:(s,o)=>s.value===o.value&&s.state===o.state}),void 0,s=>(!t&&e.set(s),w.registry&&!w.done&&(w.done=!0),s));return e.init&&Oe(e.init((s=e.get())=>{t=!0,r[1](n(s)),t=!1})),mn({signal:r,create:e.create,utils:e.utils})}function vn(e,t,n){return e.addEventListener(t,n),()=>e.removeEventListener(t,n)}function Sn(e,t){const n=e&&document.getElementById(e);n?n.scrollIntoView():t&&window.scrollTo(0,0)}const xn=new Map;function _n(e=!0,t=!1,n="/_server",r){return s=>{const o=s.base.path(),i=s.navigatorFactory(s.base);let l,a;function c(d){return d.namespaceURI==="http://www.w3.org/2000/svg"}function f(d){if(d.defaultPrevented||d.button!==0||d.metaKey||d.altKey||d.ctrlKey||d.shiftKey)return;const p=d.composedPath().find(D=>D instanceof Node&&D.nodeName.toUpperCase()==="A");if(!p||t&&!p.hasAttribute("link"))return;const y=c(p),m=y?p.href.baseVal:p.href;if((y?p.target.baseVal:p.target)||!m&&!p.hasAttribute("state"))return;const x=(p.getAttribute("rel")||"").split(/\s+/);if(p.hasAttribute("download")||x&&x.includes("external"))return;const _=y?new URL(m,document.baseURI):new URL(m);if(!(_.origin!==window.location.origin||o&&_.pathname&&!_.pathname.toLowerCase().startsWith(o.toLowerCase())))return[p,_]}function u(d){const p=f(d);if(!p)return;const[y,m]=p,S=s.parsePath(m.pathname+m.search+m.hash),x=y.getAttribute("state");d.preventDefault(),i(S,{resolve:!1,replace:y.hasAttribute("replace"),scroll:!y.hasAttribute("noscroll"),state:x?JSON.parse(x):void 0})}function g(d){const p=f(d);if(!p)return;const[y,m]=p;r&&(m.pathname=r(m.pathname)),s.preloadRoute(m,y.getAttribute("preload")!=="false")}function h(d){clearTimeout(l);const p=f(d);if(!p)return a=null;const[y,m]=p;a!==y&&(r&&(m.pathname=r(m.pathname)),l=setTimeout(()=>{s.preloadRoute(m,y.getAttribute("preload")!=="false"),a=y},20))}function b(d){if(d.defaultPrevented)return;let p=d.submitter&&d.submitter.hasAttribute("formaction")?d.submitter.getAttribute("formaction"):d.target.getAttribute("action");if(!p)return;if(!p.startsWith("https://action/")){const m=new URL(p,dt);if(p=s.parsePath(m.pathname+m.search),!p.startsWith(n))return}if(d.target.method.toUpperCase()!=="POST")throw new Error("Only POST forms are supported for Actions");const y=xn.get(p);if(y){d.preventDefault();const m=new FormData(d.target,d.submitter);y.call({r:s,f:d.target},d.target.enctype==="multipart/form-data"?m:new URLSearchParams(m))}}z(["click","submit"]),document.addEventListener("click",u),e&&(document.addEventListener("mousemove",h,{passive:!0}),document.addEventListener("focusin",g,{passive:!0}),document.addEventListener("touchstart",g,{passive:!0})),document.addEventListener("submit",b),Oe(()=>{document.removeEventListener("click",u),e&&(document.removeEventListener("mousemove",h),document.removeEventListener("focusin",g),document.removeEventListener("touchstart",g)),document.removeEventListener("submit",b)})}}function An(e){const t=()=>{const r=window.location.pathname.replace(/^\/+/,"/")+window.location.search,s=window.history.state&&window.history.state._depth&&Object.keys(window.history.state).length===1?void 0:window.history.state;return{value:r+window.location.hash,state:s}},n=ft();return $n({get:t,set({value:r,replace:s,scroll:o,state:i}){s?window.history.replaceState(zt(i),"",r):window.history.pushState(i,"",r),Sn(decodeURIComponent(window.location.hash.slice(1)),o),Te()},init:r=>vn(window,"popstate",en(r,s=>{if(s&&s<0)return!n.confirm(s);{const o=t();return!n.confirm(o.value,{state:o.state})}})),create:_n(e.preload,e.explicitLinks,e.actionBase,e.transformUrl),utils:{go:r=>window.history.go(r),beforeLeave:n}})(e)}const oe="",Cn=async()=>{const e=oe+"/api/all";return await(await fetch(e)).json()},Ge=async(e,t,n)=>{const r=oe+"/api/edit/"+e+"/"+t+"/"+n;return await(await fetch(r)).json()},cr=async e=>{const t=oe+"/api/host/"+e;return await(await fetch(t)).json()},ur=async e=>{const t=oe+"/api/host/del/"+e;return await(await fetch(t)).json()},fr=async(e,t)=>{const n=oe+"/api/port/"+e+"/"+t;return await(await fetch(n)).json()},Pn={ID:0,Name:"",DNS:"",Iface:"",IP:"",Mac:"",Hw:"",Date:"",Known:0,Now:0},[ie,M]=R([]),[Le,kn]=R([]),[En,In]=R([]),[dr,hr]=R(),[$t,Xe]=R(!1),[gr,pr]=R(Pn);let Ye="ID";function Ln(){const e=localStorage.getItem("filterField"),t=localStorage.getItem("filterValue");Fe(e,t)}function Fe(e,t){let n=ie();switch(Ye==e&&(n=Le()),Ye=e,localStorage.setItem("filterField",e),localStorage.setItem("filterValue",t),e){case"Iface":n=n.filter(r=>r.Iface==t);break;case"Known":n=n.filter(r=>r.Known==t);break;case"Now":n=n.filter(r=>r.Now==t);break;default:n=Le()}M([]),M(n)}let B=!1,Ae="";function Rn(){const e=localStorage.getItem("sortField");B=JSON.parse(localStorage.getItem("sortDown")),B=!B,vt(e)}function vt(e){e!=Ae?(Ae=e,B=!B):(Ae="",B=!B),localStorage.setItem("sortDown",B.toString()),localStorage.setItem("sortField",e);let t=ie();e=="IP"?t.sort((n,r)=>Nn(n,r,B)):t.sort((n,r)=>On(n,r,e,B)),M([]),M(t)}function On(e,t,n,r){return e[n]>t[n]?r?1:-1:r?-1:1}function Nn(e,t,n){const r=Je(e),s=Je(t);return n?r-s:s-r}function Je(e){return Number(e.IP.split(".").map(t=>`000${t}`.slice(-3)).join(""))}function Dn(){Qe(),Fe("ID",0),setInterval(()=>{Qe()},6e4)}async function Qe(){const e=await Cn();M(e),kn(e),Rn(),Ln(),Tn()}function Tn(){let e=[];for(let t of ie())e.includes(t.Iface)||e.push(t.Iface);In(e)}var Fn=j(''),jn=j(''),Hn=j(""),Un=j('
- + ) } diff --git a/frontend/src/functions/api.ts b/frontend/src/functions/api.ts index c79f743..4e679f0 100644 --- a/frontend/src/functions/api.ts +++ b/frontend/src/functions/api.ts @@ -12,5 +12,29 @@ export const apiEditHost = async (id:number, name:string, known:string) => { const url = api+'/api/edit/'+id+'/'+name+'/'+known; const res = await (await fetch(url)).json(); + return res; +}; + +export const apiGetHost = async (id:string) => { + + const url = api+'/api/host/'+id; + const res = await (await fetch(url)).json(); + + return res; +}; + +export const apiDelHost = async (id:number) => { + + const url = api+'/api/host/del/'+id; + const res = await (await fetch(url)).json(); + + return res; +}; + +export const apiPortScan = async (ip:string, port:number) => { + + const url = api+'/api/port/'+ip+'/'+port; + const res = await (await fetch(url)).json(); + return res; }; \ No newline at end of file diff --git a/frontend/src/functions/atstart.ts b/frontend/src/functions/atstart.ts new file mode 100644 index 0000000..2e9eefa --- /dev/null +++ b/frontend/src/functions/atstart.ts @@ -0,0 +1,37 @@ +import { apiGetAllHosts } from "./api"; +import { allHosts, setAllHosts, setBkpHosts, setIfaces } from "./exports"; +import { filterAtStart, filterFunc } from "./filter"; +import { sortAtStart } from "./sort"; + +export function runAtStart() { + getHosts(); + filterFunc("ID", 0); // reset filter + + setInterval(() => { + getHosts(); + }, 60000); // 60000 ms = 1 minute +} + +async function getHosts() { + const hosts = await apiGetAllHosts(); + setAllHosts(hosts); + setBkpHosts(hosts); + + sortAtStart(); + filterAtStart(); + listIfaces(); + // console.log("UPD"); +} + +function listIfaces() { + + let ifaces:string[] = []; + + for (let host of allHosts()) { + if (!ifaces.includes(host.Iface)) { + ifaces.push(host.Iface); + } + } + + setIfaces(ifaces); +} \ No newline at end of file diff --git a/frontend/src/functions/exports.ts b/frontend/src/functions/exports.ts index e1006a0..46f7d4a 100644 --- a/frontend/src/functions/exports.ts +++ b/frontend/src/functions/exports.ts @@ -13,17 +13,32 @@ export interface Host { Now: number; }; -export interface Conf { - Color: string; - Timeout: number; +export const emptyHost:Host = { + ID: 0, + Name: "", + DNS: "", + Iface: "", + IP: "", + Mac: "", + Hw: "", + Date: "", + Known: 0, + Now: 0, }; +export interface Conf { + Color: string; + Timeout: number; +}; + + export const [allHosts, setAllHosts] = createSignal([]); +export const [bkpHosts, setBkpHosts] = createSignal([]); + +export const [ifaces, setIfaces] = createSignal([]); export const [appConfig, setAppConfig] = createSignal(); export const [editNames, setEditNames] = createSignal(false); -// export const [store, setStore] = createStore({ hosts: allHosts() }); - -// export const [updBody, setUpdBody] = createSignal(false); \ No newline at end of file +export const [currentHost, setCurrentHost] = createSignal(emptyHost); \ No newline at end of file diff --git a/frontend/src/functions/filter.ts b/frontend/src/functions/filter.ts new file mode 100644 index 0000000..6034563 --- /dev/null +++ b/frontend/src/functions/filter.ts @@ -0,0 +1,40 @@ +import { allHosts, bkpHosts, Host, setAllHosts } from "./exports"; + +let oldFilter = 'ID'; + +export function filterAtStart() { + const field = localStorage.getItem("filterField") as keyof Host; + const value = localStorage.getItem("filterValue"); + + filterFunc(field, value); +} + +export function filterFunc(field: keyof Host, value: any) { + + let addrsArray = allHosts(); + + if (oldFilter == field) { + addrsArray = bkpHosts(); + } + oldFilter = field; + + localStorage.setItem("filterField", field); + localStorage.setItem("filterValue", value); + + switch (field) { + case 'Iface': + addrsArray = addrsArray.filter((item) => item.Iface == value); + break; + case 'Known': + addrsArray = addrsArray.filter((item) => item.Known == value); + break; + case 'Now': + addrsArray = addrsArray.filter((item) => item.Now == value); + break; + default: + addrsArray = bkpHosts(); + } + + setAllHosts([]); + setAllHosts(addrsArray); +} \ No newline at end of file diff --git a/frontend/src/functions/search.ts b/frontend/src/functions/search.ts new file mode 100644 index 0000000..91e6369 --- /dev/null +++ b/frontend/src/functions/search.ts @@ -0,0 +1,37 @@ +import { allHosts, bkpHosts, Host, setAllHosts } from "./exports"; + +export function searchFunc(s: string) { + + if (s != "") { + + const sl = s.toLowerCase(); + let newArray:Host[] = []; + + for (let item of allHosts()) { + + if (searchItem(item, sl)) { + newArray.push(item); + } + } + + setAllHosts([]); + setAllHosts(newArray); + + } else { + setAllHosts([]); + setAllHosts(bkpHosts()); + } +} + +function searchItem(item:Host, sl:string) { + + const name = item.Name.toLowerCase(); + const hw = item.Hw.toLowerCase(); + const mac = item.Mac.toLowerCase(); + + if ((name.includes(sl)) || (item.Iface.includes(sl)) || (item.IP.includes(sl)) || (mac.includes(sl)) || (hw.includes(sl)) || (item.Date.includes(sl))) { + return true; + } else { + return false; + } +} \ No newline at end of file diff --git a/frontend/src/functions/sort.ts b/frontend/src/functions/sort.ts index 6fc6561..70c4c53 100644 --- a/frontend/src/functions/sort.ts +++ b/frontend/src/functions/sort.ts @@ -1,7 +1,15 @@ import { allHosts, Host, setAllHosts } from "./exports"; let down = false; -let oldField = "Name"; +let oldField = ''; + +export function sortAtStart() { + const field = localStorage.getItem("sortField") as keyof Host; + down = JSON.parse(localStorage.getItem("sortDown") as string); + down = !down; + + sortByAnyField(field); +} export function sortByAnyField(field: keyof Host) { @@ -13,8 +21,8 @@ export function sortByAnyField(field: keyof Host) { down = !down; } - // localStorage.setItem("sortDown", down); - // localStorage.setItem("sortField", field); + localStorage.setItem("sortDown", down.toString()); + localStorage.setItem("sortField", field); // checkNotEmpty(addrsArray); let someArray = allHosts(); diff --git a/frontend/src/pages/Body.tsx b/frontend/src/pages/Body.tsx index ac5ec4c..e7e6305 100644 --- a/frontend/src/pages/Body.tsx +++ b/frontend/src/pages/Body.tsx @@ -1,16 +1,17 @@ -import { allHosts } from "../functions/exports"; import { For } from "solid-js"; -import TableRow from "../components/TableRow"; -import CardHead from "../components/CardHead"; -import TableHead from "../components/TableHead"; +import { allHosts } from "../functions/exports"; + +import TableRow from "../components/TableRow"; +import TableHead from "../components/TableHead"; +import BodyCardHead from "../components/BodyCardHead"; function Body() { return (
- +
.
');function Bn(e){const[t,n]=R(e.host.Name),r="http://"+e.host.IP,s="/host/"+e.host.ID;let o=Fn();e.host.Now==1&&(o=jn());let i=!1;e.host.Known==1&&(i=!0);const l=async c=>{n(c),await Ge(e.host.ID,t(),"")},a=async()=>{await Ge(e.host.ID,t(),"toggle")};return(()=>{var c=Un(),f=c.firstChild,u=f.firstChild,g=f.nextSibling,h=g.nextSibling,b=h.nextSibling,d=b.firstChild,p=b.nextSibling,y=p.nextSibling,m=y.nextSibling,S=m.nextSibling,x=S.firstChild,_=x.firstChild,D=S.nextSibling,H=D.nextSibling,U=H.firstChild;return O(f,()=>e.index,u),O(g,I(we,{get when(){return $t()},get fallback(){return t()},get children(){var k=Hn();return k.$$input=C=>l(C.target.value),Q(()=>k.value=t()),k}})),O(h,()=>e.host.Iface),Ke(d,"href",r),O(d,()=>e.host.IP),O(p,()=>e.host.Mac),O(y,()=>e.host.Hw),O(m,()=>e.host.Date),_.$$click=a,_.checked=i,O(D,o),Ke(U,"href",s),c})()}z(["input","click"]);var Kn=j('
Name Iface IP MAC Hardware Date Known Online ');function Mn(){const e=t=>{vt(t)};return(()=>{var t=Kn(),n=t.firstChild,r=n.firstChild,s=r.nextSibling,o=s.firstChild,i=o.nextSibling,l=s.nextSibling,a=l.firstChild,c=a.nextSibling,f=l.nextSibling,u=f.firstChild,g=u.nextSibling,h=f.nextSibling,b=h.firstChild,d=b.nextSibling,p=h.nextSibling,y=p.firstChild,m=y.nextSibling,S=p.nextSibling,x=S.firstChild,_=x.nextSibling,D=S.nextSibling,H=D.firstChild,U=H.nextSibling,k=D.nextSibling,C=k.firstChild,E=C.nextSibling;return i.$$click=e,i.$$clickData="Name",c.$$click=e,c.$$clickData="Iface",g.$$click=e,g.$$clickData="IP",d.$$click=e,d.$$clickData="Mac",m.$$click=e,m.$$clickData="Hw",_.$$click=e,_.$$clickData="Date",U.$$click=e,U.$$clickData="Known",E.$$click=e,E.$$clickData="Now",t})()}z(["click"]);var qn=j('
Filter by +
+
+ ) +} + +export default HostPageHost \ No newline at end of file diff --git a/frontend/src/components/HostPagePing.tsx b/frontend/src/components/HostPagePing.tsx new file mode 100644 index 0000000..0be37fd --- /dev/null +++ b/frontend/src/components/HostPagePing.tsx @@ -0,0 +1,78 @@ +import { createSignal, For } from "solid-js"; +import { apiPortScan } from "../functions/api"; +import { currentHost } from "../functions/exports"; + + +function HostPagePing() { + + let stop = false; + + const [beginStr, setBegin] = createSignal(""); + const [endStr, setEnd] = createSignal(""); + const [curPort, setCurPort] = createSignal(""); + const [foundPorts, setFoundPorts] = createSignal([]); + + const handleScan = async () => { + stop = false; + + let begin = Number(beginStr()); + if (Number.isNaN(begin) || begin < 1 || begin > 65535) { + begin = 1; + } + let end = Number(endStr()); + if (Number.isNaN(end) || end < 1 || end > 65535) { + end = 65535; + } + + let portOpened:boolean; + for (let i = begin ; i <= end; i++) { + + if (stop) { + break; + } + setCurPort(i.toString()); + portOpened = await apiPortScan(currentHost().IP, i); + if (portOpened) { + setFoundPorts([...foundPorts(), i]); + } + } + }; + + const handleStop = () => { + if (stop) { + setBegin(curPort()); + handleScan(); + } else { + stop = true; + } + } + + return ( +
+
Port Scan
+
+
+ setBegin(e.target.value)}> + setEnd(e.target.value)}> + +
+ {curPort() != "" + ?
+ +
Scanning port: {curPort()}
+
+ : <> + } +
+ {(port) => + {port} + } +
+
+
+ ) +} + +export default HostPagePing \ No newline at end of file diff --git a/frontend/src/components/Search.tsx b/frontend/src/components/Search.tsx new file mode 100644 index 0000000..8b462e0 --- /dev/null +++ b/frontend/src/components/Search.tsx @@ -0,0 +1,14 @@ +import { searchFunc } from "../functions/search"; + +function Search() { + + const handleSearch = (s: string) => { + searchFunc(s); + }; + + return ( + handleSearch(e.target.value)} class="form-control" placeholder="Search" style="max-width: 10em;"> + ) +} + +export default Search diff --git a/frontend/src/components/TableRow.tsx b/frontend/src/components/TableRow.tsx index fdfa118..070ad10 100644 --- a/frontend/src/components/TableRow.tsx +++ b/frontend/src/components/TableRow.tsx @@ -7,6 +7,7 @@ function TableRow(_props: any) { const [name, setName] = createSignal(_props.host.Name); const link = "http://" + _props.host.IP; + const edit = "/host/" + _props.host.ID; let now = ; if (_props.host.Now == 1) { @@ -51,7 +52,9 @@ function TableRow(_props: any) {
{now} + +
diff --git a/frontend/src/pages/HostPage.tsx b/frontend/src/pages/HostPage.tsx new file mode 100644 index 0000000..6ad2627 --- /dev/null +++ b/frontend/src/pages/HostPage.tsx @@ -0,0 +1,30 @@ +import { useParams } from "@solidjs/router"; +import { apiGetHost } from "../functions/api"; + +import HostPageHost from "../components/HostPageHost"; +import { setCurrentHost } from "../functions/exports"; +import { onMount } from "solid-js"; +import HostPagePing from "../components/HostPagePing"; + +function HostPage() { + + onMount(async () => { + const params = useParams(); + const host = await apiGetHost(params.id); + + setCurrentHost(host); + }); + + return ( +
+
+ +
+
+ +
+
+ ) +} + +export default HostPage \ No newline at end of file From 6e57809d975350837a3f3d3cca1d4f87d4fb4a44 Mon Sep 17 00:00:00 2001 From: aceberg <1502200+aceberg@users.noreply.github.com> Date: Tue, 18 Mar 2025 22:04:12 +0700 Subject: [PATCH 07/10] Move backend to root --- backend/.goreleaser.yaml => .goreleaser.yaml | 0 backend/Makefile => Makefile | 0 {backend/cmd => cmd}/WatchYourLAN/main.go | 0 {backend/configs => configs}/install.sh | 0 {backend/configs => configs}/postinstall.sh | 0 {backend/configs => configs}/watchyourlan.service | 0 backend/go.mod => go.mod | 0 backend/go.sum => go.sum | 0 {backend/internal => internal}/arp/arpscan.go | 0 {backend/internal => internal}/check/error.go | 0 {backend/internal => internal}/check/file.go | 0 {backend/internal => internal}/conf/getconfig.go | 0 {backend/internal => internal}/db/choose_db.go | 0 {backend/internal => internal}/db/connect.go | 0 {backend/internal => internal}/db/edit.go | 0 {backend/internal => internal}/db/quote_str.go | 0 {backend/internal => internal}/db/select-exec.go | 0 {backend/internal => internal}/influx/influx.go | 0 {backend/internal => internal}/models/models.go | 0 {backend/internal => internal}/notify/shout.go | 0 {backend/internal => internal}/portscan/scan.go | 0 {backend/internal => internal}/web/api.go | 0 {backend/internal => internal}/web/config.go | 0 {backend/internal => internal}/web/const-var.go | 0 {backend/internal => internal}/web/functions.go | 0 {backend/internal => internal}/web/host.go | 0 {backend/internal => internal}/web/index.go | 0 .../web/public/assets/HostPage-BkN2pMDv.js | 0 .../web/public/assets/index.css | 0 .../web/public/assets/index.js | 0 {backend/internal => internal}/web/public/box.svg | 0 .../internal => internal}/web/public/css/index.css | 0 .../internal => internal}/web/public/favicon.png | Bin .../web/public/js/filter-search.js | 0 .../web/public/js/hist-html.js | 0 .../internal => internal}/web/public/js/history.js | 0 .../web/public/js/host-scan.js | 0 .../internal => internal}/web/public/js/host.js | 0 .../internal => internal}/web/public/js/index.js | 0 .../internal => internal}/web/public/js/notify.js | 0 .../internal => internal}/web/public/js/refresh.js | 0 .../internal => internal}/web/public/js/sort.js | 0 {backend/internal => internal}/web/public/version | 0 {backend/internal => internal}/web/routines-upd.go | 0 {backend/internal => internal}/web/scan-routine.go | 0 .../internal => internal}/web/templates/config.html | 0 .../internal => internal}/web/templates/footer.html | 0 .../internal => internal}/web/templates/header.html | 0 .../web/templates/history.html | 0 .../internal => internal}/web/templates/host.html | 0 .../internal => internal}/web/templates/index.html | 0 .../web/templates/old_index.html | 0 {backend/internal => internal}/web/trim-history.go | 0 {backend/internal => internal}/web/webgui.go | 0 54 files changed, 0 insertions(+), 0 deletions(-) rename backend/.goreleaser.yaml => .goreleaser.yaml (100%) rename backend/Makefile => Makefile (100%) rename {backend/cmd => cmd}/WatchYourLAN/main.go (100%) rename {backend/configs => configs}/install.sh (100%) rename {backend/configs => configs}/postinstall.sh (100%) rename {backend/configs => configs}/watchyourlan.service (100%) rename backend/go.mod => go.mod (100%) rename backend/go.sum => go.sum (100%) rename {backend/internal => internal}/arp/arpscan.go (100%) rename {backend/internal => internal}/check/error.go (100%) rename {backend/internal => internal}/check/file.go (100%) rename {backend/internal => internal}/conf/getconfig.go (100%) rename {backend/internal => internal}/db/choose_db.go (100%) rename {backend/internal => internal}/db/connect.go (100%) rename {backend/internal => internal}/db/edit.go (100%) rename {backend/internal => internal}/db/quote_str.go (100%) rename {backend/internal => internal}/db/select-exec.go (100%) rename {backend/internal => internal}/influx/influx.go (100%) rename {backend/internal => internal}/models/models.go (100%) rename {backend/internal => internal}/notify/shout.go (100%) rename {backend/internal => internal}/portscan/scan.go (100%) rename {backend/internal => internal}/web/api.go (100%) rename {backend/internal => internal}/web/config.go (100%) rename {backend/internal => internal}/web/const-var.go (100%) rename {backend/internal => internal}/web/functions.go (100%) rename {backend/internal => internal}/web/host.go (100%) rename {backend/internal => internal}/web/index.go (100%) rename {backend/internal => internal}/web/public/assets/HostPage-BkN2pMDv.js (100%) rename {backend/internal => internal}/web/public/assets/index.css (100%) rename {backend/internal => internal}/web/public/assets/index.js (100%) rename {backend/internal => internal}/web/public/box.svg (100%) rename {backend/internal => internal}/web/public/css/index.css (100%) rename {backend/internal => internal}/web/public/favicon.png (100%) rename {backend/internal => internal}/web/public/js/filter-search.js (100%) rename {backend/internal => internal}/web/public/js/hist-html.js (100%) rename {backend/internal => internal}/web/public/js/history.js (100%) rename {backend/internal => internal}/web/public/js/host-scan.js (100%) rename {backend/internal => internal}/web/public/js/host.js (100%) rename {backend/internal => internal}/web/public/js/index.js (100%) rename {backend/internal => internal}/web/public/js/notify.js (100%) rename {backend/internal => internal}/web/public/js/refresh.js (100%) rename {backend/internal => internal}/web/public/js/sort.js (100%) rename {backend/internal => internal}/web/public/version (100%) rename {backend/internal => internal}/web/routines-upd.go (100%) rename {backend/internal => internal}/web/scan-routine.go (100%) rename {backend/internal => internal}/web/templates/config.html (100%) rename {backend/internal => internal}/web/templates/footer.html (100%) rename {backend/internal => internal}/web/templates/header.html (100%) rename {backend/internal => internal}/web/templates/history.html (100%) rename {backend/internal => internal}/web/templates/host.html (100%) rename {backend/internal => internal}/web/templates/index.html (100%) rename {backend/internal => internal}/web/templates/old_index.html (100%) rename {backend/internal => internal}/web/trim-history.go (100%) rename {backend/internal => internal}/web/webgui.go (100%) diff --git a/backend/.goreleaser.yaml b/.goreleaser.yaml similarity index 100% rename from backend/.goreleaser.yaml rename to .goreleaser.yaml diff --git a/backend/Makefile b/Makefile similarity index 100% rename from backend/Makefile rename to Makefile diff --git a/backend/cmd/WatchYourLAN/main.go b/cmd/WatchYourLAN/main.go similarity index 100% rename from backend/cmd/WatchYourLAN/main.go rename to cmd/WatchYourLAN/main.go diff --git a/backend/configs/install.sh b/configs/install.sh similarity index 100% rename from backend/configs/install.sh rename to configs/install.sh diff --git a/backend/configs/postinstall.sh b/configs/postinstall.sh similarity index 100% rename from backend/configs/postinstall.sh rename to configs/postinstall.sh diff --git a/backend/configs/watchyourlan.service b/configs/watchyourlan.service similarity index 100% rename from backend/configs/watchyourlan.service rename to configs/watchyourlan.service diff --git a/backend/go.mod b/go.mod similarity index 100% rename from backend/go.mod rename to go.mod diff --git a/backend/go.sum b/go.sum similarity index 100% rename from backend/go.sum rename to go.sum diff --git a/backend/internal/arp/arpscan.go b/internal/arp/arpscan.go similarity index 100% rename from backend/internal/arp/arpscan.go rename to internal/arp/arpscan.go diff --git a/backend/internal/check/error.go b/internal/check/error.go similarity index 100% rename from backend/internal/check/error.go rename to internal/check/error.go diff --git a/backend/internal/check/file.go b/internal/check/file.go similarity index 100% rename from backend/internal/check/file.go rename to internal/check/file.go diff --git a/backend/internal/conf/getconfig.go b/internal/conf/getconfig.go similarity index 100% rename from backend/internal/conf/getconfig.go rename to internal/conf/getconfig.go diff --git a/backend/internal/db/choose_db.go b/internal/db/choose_db.go similarity index 100% rename from backend/internal/db/choose_db.go rename to internal/db/choose_db.go diff --git a/backend/internal/db/connect.go b/internal/db/connect.go similarity index 100% rename from backend/internal/db/connect.go rename to internal/db/connect.go diff --git a/backend/internal/db/edit.go b/internal/db/edit.go similarity index 100% rename from backend/internal/db/edit.go rename to internal/db/edit.go diff --git a/backend/internal/db/quote_str.go b/internal/db/quote_str.go similarity index 100% rename from backend/internal/db/quote_str.go rename to internal/db/quote_str.go diff --git a/backend/internal/db/select-exec.go b/internal/db/select-exec.go similarity index 100% rename from backend/internal/db/select-exec.go rename to internal/db/select-exec.go diff --git a/backend/internal/influx/influx.go b/internal/influx/influx.go similarity index 100% rename from backend/internal/influx/influx.go rename to internal/influx/influx.go diff --git a/backend/internal/models/models.go b/internal/models/models.go similarity index 100% rename from backend/internal/models/models.go rename to internal/models/models.go diff --git a/backend/internal/notify/shout.go b/internal/notify/shout.go similarity index 100% rename from backend/internal/notify/shout.go rename to internal/notify/shout.go diff --git a/backend/internal/portscan/scan.go b/internal/portscan/scan.go similarity index 100% rename from backend/internal/portscan/scan.go rename to internal/portscan/scan.go diff --git a/backend/internal/web/api.go b/internal/web/api.go similarity index 100% rename from backend/internal/web/api.go rename to internal/web/api.go diff --git a/backend/internal/web/config.go b/internal/web/config.go similarity index 100% rename from backend/internal/web/config.go rename to internal/web/config.go diff --git a/backend/internal/web/const-var.go b/internal/web/const-var.go similarity index 100% rename from backend/internal/web/const-var.go rename to internal/web/const-var.go diff --git a/backend/internal/web/functions.go b/internal/web/functions.go similarity index 100% rename from backend/internal/web/functions.go rename to internal/web/functions.go diff --git a/backend/internal/web/host.go b/internal/web/host.go similarity index 100% rename from backend/internal/web/host.go rename to internal/web/host.go diff --git a/backend/internal/web/index.go b/internal/web/index.go similarity index 100% rename from backend/internal/web/index.go rename to internal/web/index.go diff --git a/backend/internal/web/public/assets/HostPage-BkN2pMDv.js b/internal/web/public/assets/HostPage-BkN2pMDv.js similarity index 100% rename from backend/internal/web/public/assets/HostPage-BkN2pMDv.js rename to internal/web/public/assets/HostPage-BkN2pMDv.js diff --git a/backend/internal/web/public/assets/index.css b/internal/web/public/assets/index.css similarity index 100% rename from backend/internal/web/public/assets/index.css rename to internal/web/public/assets/index.css diff --git a/backend/internal/web/public/assets/index.js b/internal/web/public/assets/index.js similarity index 100% rename from backend/internal/web/public/assets/index.js rename to internal/web/public/assets/index.js diff --git a/backend/internal/web/public/box.svg b/internal/web/public/box.svg similarity index 100% rename from backend/internal/web/public/box.svg rename to internal/web/public/box.svg diff --git a/backend/internal/web/public/css/index.css b/internal/web/public/css/index.css similarity index 100% rename from backend/internal/web/public/css/index.css rename to internal/web/public/css/index.css diff --git a/backend/internal/web/public/favicon.png b/internal/web/public/favicon.png similarity index 100% rename from backend/internal/web/public/favicon.png rename to internal/web/public/favicon.png diff --git a/backend/internal/web/public/js/filter-search.js b/internal/web/public/js/filter-search.js similarity index 100% rename from backend/internal/web/public/js/filter-search.js rename to internal/web/public/js/filter-search.js diff --git a/backend/internal/web/public/js/hist-html.js b/internal/web/public/js/hist-html.js similarity index 100% rename from backend/internal/web/public/js/hist-html.js rename to internal/web/public/js/hist-html.js diff --git a/backend/internal/web/public/js/history.js b/internal/web/public/js/history.js similarity index 100% rename from backend/internal/web/public/js/history.js rename to internal/web/public/js/history.js diff --git a/backend/internal/web/public/js/host-scan.js b/internal/web/public/js/host-scan.js similarity index 100% rename from backend/internal/web/public/js/host-scan.js rename to internal/web/public/js/host-scan.js diff --git a/backend/internal/web/public/js/host.js b/internal/web/public/js/host.js similarity index 100% rename from backend/internal/web/public/js/host.js rename to internal/web/public/js/host.js diff --git a/backend/internal/web/public/js/index.js b/internal/web/public/js/index.js similarity index 100% rename from backend/internal/web/public/js/index.js rename to internal/web/public/js/index.js diff --git a/backend/internal/web/public/js/notify.js b/internal/web/public/js/notify.js similarity index 100% rename from backend/internal/web/public/js/notify.js rename to internal/web/public/js/notify.js diff --git a/backend/internal/web/public/js/refresh.js b/internal/web/public/js/refresh.js similarity index 100% rename from backend/internal/web/public/js/refresh.js rename to internal/web/public/js/refresh.js diff --git a/backend/internal/web/public/js/sort.js b/internal/web/public/js/sort.js similarity index 100% rename from backend/internal/web/public/js/sort.js rename to internal/web/public/js/sort.js diff --git a/backend/internal/web/public/version b/internal/web/public/version similarity index 100% rename from backend/internal/web/public/version rename to internal/web/public/version diff --git a/backend/internal/web/routines-upd.go b/internal/web/routines-upd.go similarity index 100% rename from backend/internal/web/routines-upd.go rename to internal/web/routines-upd.go diff --git a/backend/internal/web/scan-routine.go b/internal/web/scan-routine.go similarity index 100% rename from backend/internal/web/scan-routine.go rename to internal/web/scan-routine.go diff --git a/backend/internal/web/templates/config.html b/internal/web/templates/config.html similarity index 100% rename from backend/internal/web/templates/config.html rename to internal/web/templates/config.html diff --git a/backend/internal/web/templates/footer.html b/internal/web/templates/footer.html similarity index 100% rename from backend/internal/web/templates/footer.html rename to internal/web/templates/footer.html diff --git a/backend/internal/web/templates/header.html b/internal/web/templates/header.html similarity index 100% rename from backend/internal/web/templates/header.html rename to internal/web/templates/header.html diff --git a/backend/internal/web/templates/history.html b/internal/web/templates/history.html similarity index 100% rename from backend/internal/web/templates/history.html rename to internal/web/templates/history.html diff --git a/backend/internal/web/templates/host.html b/internal/web/templates/host.html similarity index 100% rename from backend/internal/web/templates/host.html rename to internal/web/templates/host.html diff --git a/backend/internal/web/templates/index.html b/internal/web/templates/index.html similarity index 100% rename from backend/internal/web/templates/index.html rename to internal/web/templates/index.html diff --git a/backend/internal/web/templates/old_index.html b/internal/web/templates/old_index.html similarity index 100% rename from backend/internal/web/templates/old_index.html rename to internal/web/templates/old_index.html diff --git a/backend/internal/web/trim-history.go b/internal/web/trim-history.go similarity index 100% rename from backend/internal/web/trim-history.go rename to internal/web/trim-history.go diff --git a/backend/internal/web/webgui.go b/internal/web/webgui.go similarity index 100% rename from backend/internal/web/webgui.go rename to internal/web/webgui.go From b31107bc421cc56ef049698970c9b8aea4888ed3 Mon Sep 17 00:00:00 2001 From: Gabe Cook Date: Mon, 17 Mar 2025 00:32:48 -0500 Subject: [PATCH 08/10] Remove `time/tzdata` dependency --- cmd/WatchYourLAN/main.go | 1 - 1 file changed, 1 deletion(-) diff --git a/cmd/WatchYourLAN/main.go b/cmd/WatchYourLAN/main.go index 40acd6d..263ac60 100644 --- a/cmd/WatchYourLAN/main.go +++ b/cmd/WatchYourLAN/main.go @@ -5,7 +5,6 @@ import ( // "net/http" // _ "net/http/pprof" - _ "time/tzdata" "github.com/aceberg/WatchYourLAN/internal/web" ) From d17b324e6eebc7e7edb4066d440bd852119ef7a7 Mon Sep 17 00:00:00 2001 From: aceberg <1502200+aceberg@users.noreply.github.com> Date: Wed, 19 Mar 2025 00:46:23 +0700 Subject: [PATCH 09/10] Makefile upd --- backend/LICENSE | 21 --------------------- frontend/Makefile | 10 ++++++---- 2 files changed, 6 insertions(+), 25 deletions(-) delete mode 100644 backend/LICENSE diff --git a/backend/LICENSE b/backend/LICENSE deleted file mode 100644 index aaaff2c..0000000 --- a/backend/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2022 aceberg - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/frontend/Makefile b/frontend/Makefile index f7abe33..9c94538 100644 --- a/frontend/Makefile +++ b/frontend/Makefile @@ -3,13 +3,15 @@ USR_NAME=aceberg build: npm run build && \ - rm ../backend/internal/web/public/assets/* && \ - cp -r dist/assets ../backend/internal/web/public + rm ../internal/web/public/assets/* && \ + cp -r dist/assets ../internal/web/public replace: - cd ../backend/internal/web/public/assets/ && \ + cd ../internal/web/public/assets/ && \ cat index-*.js | sed 's/assets/fs\/public\/assets/g;s/http:\/\/0.0.0.0:8840//' > index.js && \ cat index-*.css | sed 's/assets/fs\/public\/assets/g' > index.css && \ - rm index-* + cat HostPage-*.js | sed 's/index-.*\.js/index.js/g' > tmp && \ + cp tmp HostPage-*.js && \ + rm tmp index-* all: build replace \ No newline at end of file From 545eac368e8ea3df8d0e38f8e360da05428d4845 Mon Sep 17 00:00:00 2001 From: aceberg <1502200+aceberg@users.noreply.github.com> Date: Fri, 21 Mar 2025 15:34:49 +0700 Subject: [PATCH 10/10] Header --- frontend/index.html | 3 - frontend/src/App.tsx | 4 + .../{BodyCardHead.tsx => Body/CardHead.tsx} | 10 +-- .../src/components/{ => Body}/TableHead.tsx | 4 +- .../src/components/{ => Body}/TableRow.tsx | 4 +- frontend/src/components/Header.tsx | 73 +++++++++++++++++++ .../HostCard.tsx} | 8 +- .../{HostPagePing.tsx => HostPage/Ping.tsx} | 8 +- frontend/src/functions/exports.ts | 2 + frontend/src/pages/Body.tsx | 8 +- frontend/src/pages/HostPage.tsx | 15 ++-- internal/web/api.go | 1 + internal/web/host.go | 22 ------ internal/web/index.go | 2 - ...tPage-BkN2pMDv.js => HostPage-CDE6gnSf.js} | 2 +- internal/web/public/assets/index.js | 2 +- internal/web/templates/index.html | 17 ++++- 17 files changed, 124 insertions(+), 61 deletions(-) rename frontend/src/components/{BodyCardHead.tsx => Body/CardHead.tsx} (76%) rename frontend/src/components/{ => Body}/TableHead.tsx (90%) rename frontend/src/components/{ => Body}/TableRow.tsx (94%) create mode 100644 frontend/src/components/Header.tsx rename frontend/src/components/{HostPageHost.tsx => HostPage/HostCard.tsx} (93%) rename frontend/src/components/{HostPagePing.tsx => HostPage/Ping.tsx} (93%) delete mode 100644 internal/web/host.go rename internal/web/public/assets/{HostPage-BkN2pMDv.js => HostPage-CDE6gnSf.js} (84%) diff --git a/frontend/index.html b/frontend/index.html index a6b893d..a786211 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -5,9 +5,6 @@ WatchYourLAN - - -
diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 10ce092..77b3d93 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -4,6 +4,7 @@ import './App.css'; import { runAtStart } from './functions/atstart'; import Body from './pages/Body'; +import Header from './components/Header'; function App() { @@ -14,6 +15,8 @@ function App() { const HostPage = lazy(() => import("./pages/HostPage")); return ( + <> +
@@ -24,6 +27,7 @@ function App() {
+ ) } diff --git a/frontend/src/components/BodyCardHead.tsx b/frontend/src/components/Body/CardHead.tsx similarity index 76% rename from frontend/src/components/BodyCardHead.tsx rename to frontend/src/components/Body/CardHead.tsx index 7a6523b..ebf8c02 100644 --- a/frontend/src/components/BodyCardHead.tsx +++ b/frontend/src/components/Body/CardHead.tsx @@ -1,9 +1,9 @@ import { Show } from "solid-js"; -import { editNames, setEditNames } from "../functions/exports"; -import Filter from "./Filter"; -import Search from "./Search"; +import { editNames, setEditNames } from "../../functions/exports"; +import Filter from "../Filter"; +import Search from "../Search"; -function BodyCardHead() { +function CardHead() { return (
@@ -25,4 +25,4 @@ function BodyCardHead() { ) } -export default BodyCardHead +export default CardHead diff --git a/frontend/src/components/TableHead.tsx b/frontend/src/components/Body/TableHead.tsx similarity index 90% rename from frontend/src/components/TableHead.tsx rename to frontend/src/components/Body/TableHead.tsx index f769b1a..4b91d44 100644 --- a/frontend/src/components/TableHead.tsx +++ b/frontend/src/components/Body/TableHead.tsx @@ -1,5 +1,5 @@ -import { Host } from "../functions/exports"; -import { sortByAnyField } from "../functions/sort"; +import { Host } from "../../functions/exports"; +import { sortByAnyField } from "../../functions/sort"; function TableHead() { diff --git a/frontend/src/components/TableRow.tsx b/frontend/src/components/Body/TableRow.tsx similarity index 94% rename from frontend/src/components/TableRow.tsx rename to frontend/src/components/Body/TableRow.tsx index 070ad10..2959734 100644 --- a/frontend/src/components/TableRow.tsx +++ b/frontend/src/components/Body/TableRow.tsx @@ -1,6 +1,6 @@ import { createSignal, Show } from "solid-js"; -import { editNames } from "../functions/exports"; -import { apiEditHost } from "../functions/api"; +import { editNames } from "../../functions/exports"; +import { apiEditHost } from "../../functions/api"; function TableRow(_props: any) { diff --git a/frontend/src/components/Header.tsx b/frontend/src/components/Header.tsx new file mode 100644 index 0000000..164df66 --- /dev/null +++ b/frontend/src/components/Header.tsx @@ -0,0 +1,73 @@ +import { createSignal } from "solid-js"; +import { Conf } from "../functions/exports"; + +function Header() { + + const [themePath, setThemePath] = createSignal(''); + const [iconsPath, setIconsPath] = createSignal(''); + + const setCurrentTheme = (appConfig:Conf) => { + const theme = appConfig.Theme?appConfig.Theme:"sand"; + const color = appConfig.Color?appConfig.Color:"dark"; + + if (appConfig.NodePath == '') { + setThemePath("https://cdn.jsdelivr.net/npm/aceberg-bootswatch-fork@v5.3.3-2/dist/"+theme+"/bootstrap.min.css"); + setIconsPath("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.css"); + } else { + setThemePath(appConfig.NodePath+"/node_modules/bootswatch/dist/"+theme+"/bootstrap.min.css"); + setIconsPath(appConfig.NodePath+"/node_modules/bootstrap-icons/font/bootstrap-icons.css"); + } + + document.documentElement.setAttribute("data-bs-theme", color); + color === "dark" + ? document.documentElement.style.setProperty('--transparent-light', '#ffffff15') + : document.documentElement.style.setProperty('--transparent-light', '#00000015'); + } + setCurrentTheme({ + Theme: "sand", + Color: "dark", + Timeout: 120, + NodePath: "", + }); + + return ( + <> + {/* icons */} + {/* theme */} + + + ) +}; + +export default Header diff --git a/frontend/src/components/HostPageHost.tsx b/frontend/src/components/HostPage/HostCard.tsx similarity index 93% rename from frontend/src/components/HostPageHost.tsx rename to frontend/src/components/HostPage/HostCard.tsx index 4ba0fa5..47b1e42 100644 --- a/frontend/src/components/HostPageHost.tsx +++ b/frontend/src/components/HostPage/HostCard.tsx @@ -1,7 +1,7 @@ -import { apiDelHost, apiEditHost } from "../functions/api"; -import { currentHost } from "../functions/exports"; +import { apiDelHost, apiEditHost } from "../../functions/api"; +import { currentHost } from "../../functions/exports"; -function HostPageHost() { +function HostCard() { let name:string = ""; @@ -98,4 +98,4 @@ function HostPageHost() { ) } -export default HostPageHost \ No newline at end of file +export default HostCard \ No newline at end of file diff --git a/frontend/src/components/HostPagePing.tsx b/frontend/src/components/HostPage/Ping.tsx similarity index 93% rename from frontend/src/components/HostPagePing.tsx rename to frontend/src/components/HostPage/Ping.tsx index 0be37fd..6799892 100644 --- a/frontend/src/components/HostPagePing.tsx +++ b/frontend/src/components/HostPage/Ping.tsx @@ -1,9 +1,9 @@ import { createSignal, For } from "solid-js"; -import { apiPortScan } from "../functions/api"; -import { currentHost } from "../functions/exports"; +import { apiPortScan } from "../../functions/api"; +import { currentHost } from "../../functions/exports"; -function HostPagePing() { +function Ping() { let stop = false; @@ -75,4 +75,4 @@ function HostPagePing() { ) } -export default HostPagePing \ No newline at end of file +export default Ping \ No newline at end of file diff --git a/frontend/src/functions/exports.ts b/frontend/src/functions/exports.ts index 46f7d4a..82d2079 100644 --- a/frontend/src/functions/exports.ts +++ b/frontend/src/functions/exports.ts @@ -27,8 +27,10 @@ export const emptyHost:Host = { }; export interface Conf { + Theme: string; Color: string; Timeout: number; + NodePath: string; }; diff --git a/frontend/src/pages/Body.tsx b/frontend/src/pages/Body.tsx index e7e6305..3cc2912 100644 --- a/frontend/src/pages/Body.tsx +++ b/frontend/src/pages/Body.tsx @@ -2,16 +2,16 @@ import { For } from "solid-js"; import { allHosts } from "../functions/exports"; -import TableRow from "../components/TableRow"; -import TableHead from "../components/TableHead"; -import BodyCardHead from "../components/BodyCardHead"; +import TableRow from "../components/Body/TableRow"; +import TableHead from "../components/Body/TableHead"; +import CardHead from "../components/Body/CardHead"; function Body() { return (
- +
diff --git a/frontend/src/pages/HostPage.tsx b/frontend/src/pages/HostPage.tsx index 6ad2627..c27aedd 100644 --- a/frontend/src/pages/HostPage.tsx +++ b/frontend/src/pages/HostPage.tsx @@ -1,10 +1,11 @@ import { useParams } from "@solidjs/router"; -import { apiGetHost } from "../functions/api"; - -import HostPageHost from "../components/HostPageHost"; -import { setCurrentHost } from "../functions/exports"; import { onMount } from "solid-js"; -import HostPagePing from "../components/HostPagePing"; + +import { apiGetHost } from "../functions/api"; +import { setCurrentHost } from "../functions/exports"; + +import HostCard from "../components/HostPage/HostCard"; +import Ping from "../components/HostPage/Ping"; function HostPage() { @@ -18,10 +19,10 @@ function HostPage() { return (
- +
- +
) diff --git a/internal/web/api.go b/internal/web/api.go index bd88f00..4eb998e 100644 --- a/internal/web/api.go +++ b/internal/web/api.go @@ -43,6 +43,7 @@ func apiHost(c *gin.Context) { idStr := c.Param("id") host := getHostByID(idStr, allHosts) // functions.go + _, host.DNS = updateDNS(host) c.IndentedJSON(http.StatusOK, host) } diff --git a/internal/web/host.go b/internal/web/host.go deleted file mode 100644 index bc22bf5..0000000 --- a/internal/web/host.go +++ /dev/null @@ -1,22 +0,0 @@ -package web - -import ( - "net/http" - - "github.com/gin-gonic/gin" - - "github.com/aceberg/WatchYourLAN/internal/models" -) - -func hostHandler(c *gin.Context) { - var guiData models.GuiData - guiData.Config = appConfig - - idStr := c.Param("id") - host := getHostByID(idStr, allHosts) - _, host.DNS = updateDNS(host) - guiData.Host = host - - c.HTML(http.StatusOK, "header.html", guiData) - c.HTML(http.StatusOK, "host.html", guiData) -} diff --git a/internal/web/index.go b/internal/web/index.go index 473bed1..4c1bc5a 100644 --- a/internal/web/index.go +++ b/internal/web/index.go @@ -13,7 +13,6 @@ func indexHandler(c *gin.Context) { guiData.Config = appConfig guiData.Themes = getAllIfaces(allHosts) - c.HTML(http.StatusOK, "header.html", guiData) c.HTML(http.StatusOK, "index.html", guiData) } @@ -21,6 +20,5 @@ func historyHandler(c *gin.Context) { var guiData models.GuiData guiData.Config = appConfig - c.HTML(http.StatusOK, "header.html", guiData) c.HTML(http.StatusOK, "history.html", guiData) } diff --git a/internal/web/public/assets/HostPage-BkN2pMDv.js b/internal/web/public/assets/HostPage-CDE6gnSf.js similarity index 84% rename from internal/web/public/assets/HostPage-BkN2pMDv.js rename to internal/web/public/assets/HostPage-CDE6gnSf.js index 041c8e6..1fa3e95 100644 --- a/internal/web/public/assets/HostPage-BkN2pMDv.js +++ b/internal/web/public/assets/HostPage-CDE6gnSf.js @@ -1 +1 @@ -import{t as o,i as l,c as t,a as K,b as x,s as O,d as A,e as et,f as B,g as v,h as I,F as lt,j as it,o as nt,u as rt,k as at,l as st}from"./index.js";var dt=o('
Host
ID
Name
DNS name
Iface
IP
MAC
Hardware
Date
Known
Online
'),_t=o('
Scanning port: '),ut=o("");function ft(){let e=!1;const[s,$]=v(""),[C,b]=v(""),[_,y]=v(""),[u,w]=v([]),f=async()=>{e=!1;let n=Number(s());(Number.isNaN(n)||n<1||n>65535)&&(n=1);let r=Number(C());(Number.isNaN(r)||r<1||r>65535)&&(r=65535);let c;for(let a=n;a<=r&&!e;a++)y(a.toString()),c=await it(t().IP,a),c&&w([...u(),a])},P=()=>{e?($(_()),f()):e=!0};return(()=>{var n=bt(),r=n.firstChild,c=r.nextSibling,a=c.firstChild,g=a.firstChild,h=g.nextSibling,k=h.nextSibling,S=a.nextSibling;return g.$$input=i=>$(i.target.value),h.$$input=i=>b(i.target.value),k.$$click=f,l(c,(()=>{var i=K(()=>_()!="");return()=>i()?(()=>{var d=_t(),m=d.firstChild,p=m.nextSibling;return p.firstChild,m.$$click=P,l(p,_,null),d})():[]})(),S),l(S,I(lt,{get each(){return u()},children:i=>(()=>{var d=ut();return l(d,i),x(()=>O(d,"href","http://"+t().IP+":"+i)),d})()})),n})()}B(["input","click"]);var gt=o("
");function pt(){return nt(async()=>{const e=rt(),s=await at(e.id);st(s)}),(()=>{var e=gt(),s=e.firstChild,$=s.nextSibling;return l(s,I($t,{})),l($,I(ft,{})),e})()}export{pt as default}; +import{t as o,i as l,c as t,a as K,b as x,s as O,d as A,e as et,f as B,g as v,h as I,F as lt,j as it,o as nt,u as rt,k as at,l as st}from"./index.js";var dt=o('
Host
ID
Name
DNS name
Iface
IP
MAC
Hardware
Date
Known
Online
'),_t=o('
Scanning port: '),ut=o("");function ft(){let e=!1;const[s,$]=v(""),[C,b]=v(""),[_,y]=v(""),[u,w]=v([]),f=async()=>{e=!1;let n=Number(s());(Number.isNaN(n)||n<1||n>65535)&&(n=1);let r=Number(C());(Number.isNaN(r)||r<1||r>65535)&&(r=65535);let c;for(let a=n;a<=r&&!e;a++)y(a.toString()),c=await it(t().IP,a),c&&w([...u(),a])},k=()=>{e?($(_()),f()):e=!0};return(()=>{var n=bt(),r=n.firstChild,c=r.nextSibling,a=c.firstChild,g=a.firstChild,h=g.nextSibling,N=h.nextSibling,S=a.nextSibling;return g.$$input=i=>$(i.target.value),h.$$input=i=>b(i.target.value),N.$$click=f,l(c,(()=>{var i=K(()=>_()!="");return()=>i()?(()=>{var d=_t(),m=d.firstChild,p=m.nextSibling;return p.firstChild,m.$$click=k,l(p,_,null),d})():[]})(),S),l(S,I(lt,{get each(){return u()},children:i=>(()=>{var d=ut();return l(d,i),x(()=>O(d,"href","http://"+t().IP+":"+i)),d})()})),n})()}B(["input","click"]);var gt=o("
");function pt(){return nt(async()=>{const e=rt(),s=await at(e.id);st(s)}),(()=>{var e=gt(),s=e.firstChild,$=s.nextSibling;return l(s,I($t,{})),l($,I(ft,{})),e})()}export{pt as default}; diff --git a/internal/web/public/assets/index.js b/internal/web/public/assets/index.js index a117471..aa9486a 100644 --- a/internal/web/public/assets/index.js +++ b/internal/web/public/assets/index.js @@ -1 +1 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();const w={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return He(this.context.count)},getNextContextId(){return He(this.context.count++)}};function He(e){const t=String(e),n=t.length-1;return w.context.id+(n?String.fromCharCode(96+n):"")+t}function te(e){w.context=e}const Ze=!1,xt=(e,t)=>e===t,Ce=Symbol("solid-proxy"),_t=typeof Proxy=="function",At=Symbol("solid-track"),ue={equals:xt};let ze=lt;const V=1,fe=2,et={owned:null,cleanups:null,context:null,owner:null},$e={};var $=null;let ve=null,Ct=null,v=null,N=null,q=null,pe=0;function ne(e,t){const n=v,r=$,s=e.length===0,o=t===void 0?r:t,i=s?et:{owned:null,cleanups:null,context:o?o.context:null,owner:o},l=s?e:()=>e(()=>T(()=>se(i)));$=i,v=null;try{return K(l,!0)}finally{v=n,$=r}}function R(e,t){t=t?Object.assign({},ue,t):ue;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=s=>(typeof s=="function"&&(s=s(n.value)),it(n,s));return[ot.bind(n),r]}function Pt(e,t,n){const r=me(e,t,!0,V);Z(r)}function Q(e,t,n){const r=me(e,t,!1,V);Z(r)}function kt(e,t,n){ze=Ft;const r=me(e,t,!1,V);r.user=!0,q?q.push(r):Z(r)}function L(e,t,n){n=n?Object.assign({},ue,n):ue;const r=me(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Z(r),ot.bind(r)}function Et(e){return e&&typeof e=="object"&&"then"in e}function It(e,t,n){let r,s,o;r=!0,s=e,o={};let i=null,l=$e,a=null,c=!1,f="initialValue"in o,u=typeof r=="function"&&L(r);const g=new Set,[h,b]=(o.storage||R)(o.initialValue),[d,p]=R(void 0),[y,m]=R(void 0,{equals:!1}),[S,x]=R(f?"ready":"unresolved");w.context&&(a=w.getNextContextId(),o.ssrLoadFrom==="initial"?l=o.initialValue:w.load&&w.has(a)&&(l=w.load(a)));function _(k,C,E,W){return i===k&&(i=null,W!==void 0&&(f=!0),(k===l||C===l)&&o.onHydrated&&queueMicrotask(()=>o.onHydrated(W,{value:C})),l=$e,D(C,E)),C}function D(k,C){K(()=>{C===void 0&&b(()=>k),x(C!==void 0?"errored":f?"ready":"unresolved"),p(C);for(const E of g.keys())E.decrement();g.clear()},!1)}function H(){const k=Nt,C=h(),E=d();if(E!==void 0&&!i)throw E;return v&&v.user,C}function U(k=!0){if(k!==!1&&c)return;c=!1;const C=u?u():r;if(C==null||C===!1){_(i,T(h));return}const E=l!==$e?l:T(()=>s(C,{value:h(),refetching:k}));return Et(E)?(i=E,"value"in E?(E.status==="success"?_(i,E.value,void 0,C):_(i,void 0,Pe(E.value),C),E):(c=!0,queueMicrotask(()=>c=!1),K(()=>{x(f?"refreshing":"pending"),m()},!1),E.then(W=>_(E,W,void 0,C),W=>_(E,void 0,Pe(W),C)))):(_(i,E,void 0,C),E)}return Object.defineProperties(H,{state:{get:()=>S()},error:{get:()=>d()},loading:{get(){const k=S();return k==="pending"||k==="refreshing"}},latest:{get(){if(!f)return H();const k=d();if(k&&!i)throw k;return h()}}}),u?Pt(()=>U(!1)):U(!1),[H,{refetch:U,mutate:b}]}function Lt(e){return K(e,!1)}function T(e){if(v===null)return e();const t=v;v=null;try{return e()}finally{v=t}}function Re(e,t,n){const r=Array.isArray(e);let s,o=n&&n.defer;return i=>{let l;if(r){l=Array(e.length);for(let c=0;ct(l,s,i));return s=l,a}}function Rt(e){kt(()=>T(e))}function Oe(e){return $===null||($.cleanups===null?$.cleanups=[e]:$.cleanups.push(e)),e}function tt(){return $}function nt(e,t){const n=$,r=v;$=e,v=null;try{return K(t,!0)}catch(s){De(s)}finally{$=n,v=r}}function Ot(e){const t=v,n=$;return Promise.resolve().then(()=>{v=t,$=n;let r;return K(e,!1),v=$=null,r?r.done:void 0})}const[ir,lr]=R(!1);function rt(e,t){const n=Symbol("context");return{id:n,Provider:jt(n),defaultValue:e}}function st(e){let t;return $&&$.context&&(t=$.context[e.id])!==void 0?t:e.defaultValue}function Ne(e){const t=L(e),n=L(()=>ke(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}let Nt;function ot(){if(this.sources&&this.state)if(this.state===V)Z(this);else{const e=N;N=null,K(()=>he(this),!1),N=e}if(v){const e=this.observers?this.observers.length:0;v.sources?(v.sources.push(this),v.sourceSlots.push(e)):(v.sources=[this],v.sourceSlots=[e]),this.observers?(this.observers.push(v),this.observerSlots.push(v.sources.length-1)):(this.observers=[v],this.observerSlots=[v.sources.length-1])}return this.value}function it(e,t,n){let r=e.value;return(!e.comparator||!e.comparator(r,t))&&(e.value=t,e.observers&&e.observers.length&&K(()=>{for(let s=0;s1e6)throw N=[],new Error},!1)),t}function Z(e){if(!e.fn)return;se(e);const t=pe;Dt(e,e.value,t)}function Dt(e,t,n){let r;const s=$,o=v;v=$=e;try{r=e.fn(t)}catch(i){return e.pure&&(e.state=V,e.owned&&e.owned.forEach(se),e.owned=null),e.updatedAt=n+1,De(i)}finally{v=o,$=s}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?it(e,r):e.value=r,e.updatedAt=n)}function me(e,t,n,r=V,s){const o={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:$,context:$?$.context:null,pure:n};return $===null||$!==et&&($.owned?$.owned.push(o):$.owned=[o]),o}function de(e){if(e.state===0)return;if(e.state===fe)return he(e);if(e.suspense&&T(e.suspense.inFallback))return e.suspense.effects.push(e);const t=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt=0;n--)if(e=t[n],e.state===V)Z(e);else if(e.state===fe){const r=N;N=null,K(()=>he(e,t[0]),!1),N=r}}function K(e,t){if(N)return e();let n=!1;t||(N=[]),q?n=!0:q=[],pe++;try{const r=e();return Tt(n),r}catch(r){n||(q=null),N=null,De(r)}}function Tt(e){if(N&&(lt(N),N=null),e)return;const t=q;q=null,t.length&&K(()=>ze(t),!1)}function lt(e){for(let t=0;t=0;t--)se(e.tOwned[t]);delete e.tOwned}if(e.owned){for(t=e.owned.length-1;t>=0;t--)se(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}e.state=0}function Pe(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function De(e,t=$){throw Pe(e)}function ke(e){if(typeof e=="function"&&!e.length)return ke(e());if(Array.isArray(e)){const t=[];for(let n=0;ns=T(()=>($.context={...$.context,[e]:r.value},Ne(()=>r.children))),void 0),s}}const Ht=Symbol("fallback");function Ue(e){for(let t=0;t1?[]:null;return Oe(()=>Ue(o)),()=>{let a=e()||[],c=a.length,f,u;return a[At],T(()=>{let h,b,d,p,y,m,S,x,_;if(c===0)i!==0&&(Ue(o),o=[],r=[],s=[],i=0,l&&(l=[])),n.fallback&&(r=[Ht],s[0]=ne(D=>(o[0]=D,n.fallback())),i=1);else if(i===0){for(s=new Array(c),u=0;u=m&&x>=m&&r[S]===a[x];S--,x--)d[x]=s[S],p[x]=o[S],l&&(y[x]=l[S]);for(h=new Map,b=new Array(x+1),u=x;u>=m;u--)_=a[u],f=h.get(_),b[u]=f===void 0?-1:f,h.set(_,u);for(f=m;f<=S;f++)_=r[f],u=h.get(_),u!==void 0&&u!==-1?(d[u]=s[f],p[u]=o[f],l&&(y[u]=l[f]),u=b[u],h.set(_,u)):o[f]();for(u=m;ue(t||{}))}function ae(){return!0}const Bt={get(e,t,n){return t===Ce?n:e.get(t)},has(e,t){return t===Ce?!0:e.has(t)},set:ae,deleteProperty:ae,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:ae,deleteProperty:ae}},ownKeys(e){return e.keys()}};function Se(e){return(e=typeof e=="function"?e():e)?e:{}}function Kt(){for(let e=0,t=this.length;e=0;l--){const a=Se(e[l])[i];if(a!==void 0)return a}},has(i){for(let l=e.length-1;l>=0;l--)if(i in Se(e[l]))return!0;return!1},keys(){const i=[];for(let l=0;l=0;i--){const l=e[i];if(!l)continue;const a=Object.getOwnPropertyNames(l);for(let c=a.length-1;c>=0;c--){const f=a[c];if(f==="__proto__"||f==="constructor")continue;const u=Object.getOwnPropertyDescriptor(l,f);if(!r[f])r[f]=u.get?{enumerable:!0,configurable:!0,get:Kt.bind(n[f]=[u.get.bind(l)])}:u.value!==void 0?u:void 0;else{const g=n[f];g&&(u.get?g.push(u.get.bind(l)):u.value!==void 0&&g.push(()=>u.value))}}}const s={},o=Object.keys(r);for(let i=o.length-1;i>=0;i--){const l=o[i],a=r[l];a&&a.get?Object.defineProperty(s,l,a):s[l]=a?a.value:void 0}return s}function qt(e){let t,n;const r=s=>{const o=w.context;if(o){const[l,a]=R();w.count||(w.count=0),w.count++,(n||(n=e())).then(c=>{!w.done&&te(o),w.count--,a(()=>c.default),te()}),t=l}else if(!t){const[l]=It(()=>(n||(n=e())).then(a=>a.default));t=l}let i;return L(()=>(i=t())?T(()=>{if(!o||w.done)return i(s);const l=w.context;te(o);const a=i(s);return te(l),a}):"")};return r.preload=()=>n||((n=e()).then(s=>t=()=>s.default),n),r}const Vt=e=>`Stale read from <${e}>.`;function ct(e){const t="fallback"in e&&{fallback:()=>e.fallback};return L(Ut(()=>e.each,e.children,t||void 0))}function we(e){const t=e.keyed,n=L(()=>e.when,void 0,void 0),r=t?n:L(n,void 0,{equals:(s,o)=>!s==!o});return L(()=>{const s=r();if(s){const o=e.children;return typeof o=="function"&&o.length>0?T(()=>o(t?s:()=>{if(!T(r))throw Vt("Show");return n()})):o}return e.fallback},void 0,void 0)}function Wt(e,t,n){let r=n.length,s=t.length,o=r,i=0,l=0,a=t[s-1].nextSibling,c=null;for(;if-l){const b=t[i];for(;l{s=o,t===document?e():O(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{s(),t.textContent=""}}function j(e,t,n,r){let s;const o=()=>{const l=document.createElement("template");return l.innerHTML=e,l.content.firstChild},i=()=>(s||(s=o())).cloneNode(!0);return i.cloneNode=i,i}function z(e,t=window.document){const n=t[Be]||(t[Be]=new Set);for(let r=0,s=e.length;rge(e,t(),s,n),r)}function ut(e){return!!w.context&&!w.done&&(!e||e.isConnected)}function Xt(e){if(w.registry&&w.events&&w.events.find(([a,c])=>c===e))return;let t=e.target;const n=`$$${e.type}`,r=e.target,s=e.currentTarget,o=a=>Object.defineProperty(e,"target",{configurable:!0,value:a}),i=()=>{const a=t[n];if(a&&!t.disabled){const c=t[`${n}Data`];if(c!==void 0?a.call(t,c,e):a.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&o(t.host),!0},l=()=>{for(;i()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),w.registry&&!w.done&&(w.done=_$HY.done=!0),e.composedPath){const a=e.composedPath();o(a[0]);for(let c=0;c{let a=t();for(;typeof a=="function";)a=a();n=ge(e,a,n,r)}),()=>n;if(Array.isArray(t)){const a=[],c=n&&Array.isArray(n);if(Ee(a,t,n,s))return Q(()=>n=ge(e,a,n,r,!0)),()=>n;if(o){if(!a.length)return n;if(r===void 0)return n=[...e.childNodes];let f=a[0];if(f.parentNode!==e)return n;const u=[f];for(;(f=f.nextSibling)!==r;)u.push(f);return n=u}if(a.length===0){if(n=J(e,n,r),l)return n}else c?n.length===0?Me(e,a,r):Wt(e,n,a):(n&&J(e),Me(e,a));n=a}else if(t.nodeType){if(o&&t.parentNode)return n=l?[t]:t;if(Array.isArray(n)){if(l)return n=J(e,n,r,t);J(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function Ee(e,t,n,r){let s=!1;for(let o=0,i=t.length;o=0;i--){const l=t[i];if(s!==l){const a=l.parentNode===e;!o&&!i?a?e.replaceChild(s,l):e.insertBefore(s,n):a&&l.remove()}else o=!0}}else e.insertBefore(s,n);return[s]}const Yt=!1,Jt="modulepreload",Qt=function(e){return"/"+e},qe={},Zt=function(t,n,r){let s=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),l=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));s=Promise.allSettled(n.map(a=>{if(a=Qt(a),a in qe)return;qe[a]=!0;const c=a.endsWith(".css"),f=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${f}`))return;const u=document.createElement("link");if(u.rel=c?"stylesheet":Jt,c||(u.as="script"),u.crossOrigin="",u.href=a,l&&u.setAttribute("nonce",l),document.head.appendChild(u),c)return new Promise((g,h)=>{u.addEventListener("load",g),u.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${a}`)))})}))}function o(i){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=i,window.dispatchEvent(l),!l.defaultPrevented)throw i}return s.then(i=>{for(const l of i||[])l.status==="rejected"&&o(l.reason);return t().catch(o)})};function ft(){let e=new Set;function t(s){return e.add(s),()=>e.delete(s)}let n=!1;function r(s,o){if(n)return!(n=!1);const i={to:s,options:o,defaultPrevented:!1,preventDefault:()=>i.defaultPrevented=!0};for(const l of e)l.listener({...i,from:l.location,retry:a=>{a&&(n=!0),l.navigate(s,{...o,resolve:!1})}});return!i.defaultPrevented}return{subscribe:t,confirm:r}}let Ie;function Te(){(!window.history.state||window.history.state._depth==null)&&window.history.replaceState({...window.history.state,_depth:window.history.length-1},""),Ie=window.history.state._depth}Te();function zt(e){return{...e,_depth:window.history.state&&window.history.state._depth}}function en(e,t){let n=!1;return()=>{const r=Ie;Te();const s=r==null?null:Ie-r;if(n){n=!1;return}s&&t(s)?(n=!0,window.history.go(-s)):e()}}const tn=/^(?:[a-z0-9]+:)?\/\//i,nn=/^\/+|(\/)\/+$/g,dt="http://sr";function re(e,t=!1){const n=e.replace(nn,"$1");return n?t||/^[?#]/.test(n)?n:"/"+n:""}function ce(e,t,n){if(tn.test(t))return;const r=re(e),s=n&&re(n);let o="";return!s||t.startsWith("/")?o=r:s.toLowerCase().indexOf(r.toLowerCase())!==0?o=r+s:o=s,(o||"/")+re(t,!o)}function rn(e,t){if(e==null)throw new Error(t);return e}function sn(e,t){return re(e).replace(/\/*(\*.*)?$/g,"")+re(t)}function ht(e){const t={};return e.searchParams.forEach((n,r)=>{r in t?Array.isArray(t[r])?t[r].push(n):t[r]=[t[r],n]:t[r]=n}),t}function on(e,t,n){const[r,s]=e.split("/*",2),o=r.split("/").filter(Boolean),i=o.length;return l=>{const a=l.split("/").filter(Boolean),c=a.length-i;if(c<0||c>0&&s===void 0&&!t)return null;const f={path:i?"":"/",params:{}},u=g=>n===void 0?void 0:n[g];for(let g=0;gr===e;return t===void 0?!0:typeof t=="string"?n(t):typeof t=="function"?t(e):Array.isArray(t)?t.some(n):t instanceof RegExp?t.test(e):!1}function ln(e){const[t,n]=e.pattern.split("/*",2),r=t.split("/").filter(Boolean);return r.reduce((s,o)=>s+(o.startsWith(":")?2:3),r.length-(n===void 0?0:1))}function gt(e){const t=new Map,n=tt();return new Proxy({},{get(r,s){return t.has(s)||nt(n,()=>t.set(s,L(()=>e()[s]))),t.get(s)()},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}},ownKeys(){return Reflect.ownKeys(e())}})}function pt(e){let t=/(\/?\:[^\/]+)\?/.exec(e);if(!t)return[e];let n=e.slice(0,t.index),r=e.slice(t.index+t[0].length);const s=[n,n+=t[1]];for(;t=/^(\/\:[^\/]+)\?/.exec(r);)s.push(n+=t[1]),r=r.slice(t[0].length);return pt(r).reduce((o,i)=>[...o,...s.map(l=>l+i)],[])}const an=100,mt=rt(),wt=rt(),cn=()=>rn(st(mt)," and 'use' router primitives can be only used inside a Route."),ar=()=>cn().params;function un(e,t=""){const{component:n,preload:r,load:s,children:o,info:i}=e,l=!o||Array.isArray(o)&&!o.length,a={key:e,component:n,preload:r||s,info:i};return bt(e.path).reduce((c,f)=>{for(const u of pt(f)){const g=sn(t,u);let h=l?g:g.split("/*",1)[0];h=h.split("/").map(b=>b.startsWith(":")||b.startsWith("*")?b:encodeURIComponent(b)).join("/"),c.push({...a,originalPath:f,pattern:h,matcher:on(h,!l,e.matchFilters)})}return c},[])}function fn(e,t=0){return{routes:e,score:ln(e[e.length-1])*1e4-t,matcher(n){const r=[];for(let s=e.length-1;s>=0;s--){const o=e[s],i=o.matcher(n);if(!i)return null;r.unshift({...i,route:o})}return r}}}function bt(e){return Array.isArray(e)?e:[e]}function yt(e,t="",n=[],r=[]){const s=bt(e);for(let o=0,i=s.length;oi.score-o.score)}function _e(e,t){for(let n=0,r=e.length;n{const u=e();try{return new URL(u,r)}catch{return console.error(`Invalid path ${u}`),f}},r,{equals:(f,u)=>f.href===u.href}),o=L(()=>s().pathname),i=L(()=>s().search,!0),l=L(()=>s().hash),a=()=>"",c=Re(i,()=>ht(s()));return{get pathname(){return o()},get search(){return i()},get hash(){return l()},get state(){return t()},get key(){return a()},query:n?n(c):gt(c)}}let G;function hn(){return G}function gn(e,t,n,r={}){const{signal:[s,o],utils:i={}}=e,l=i.parsePath||(A=>A),a=i.renderPath||(A=>A),c=i.beforeLeave||ft(),f=ce("",r.base||"");if(f===void 0)throw new Error(`${f} is not a valid base path`);f&&!s().value&&o({value:f,replace:!0,scroll:!1});const[u,g]=R(!1);let h;const b=(A,P)=>{P.value===d()&&P.state===y()||(h===void 0&&g(!0),G=A,h=P,Ot(()=>{h===P&&(p(h.value),m(h.state),_[1](F=>F.filter(X=>X.pending)))}).finally(()=>{h===P&&Lt(()=>{G=void 0,A==="navigate"&&W(h),g(!1),h=void 0})}))},[d,p]=R(s().value),[y,m]=R(s().state),S=dn(d,y,i.queryWrapper),x=[],_=R([]),D=L(()=>typeof r.transformUrl=="function"?_e(t(),r.transformUrl(S.pathname)):_e(t(),S.pathname)),H=()=>{const A=D(),P={};for(let F=0;Ff,outlet:()=>null,resolvePath(A){return ce(f,A)}};return Q(Re(s,A=>b("native",A),{defer:!0})),{base:k,location:S,params:U,isRouting:u,renderPath:a,parsePath:l,navigatorFactory:E,matches:D,beforeLeave:c,preloadRoute:St,singleFlight:r.singleFlight===void 0?!0:r.singleFlight,submissions:_};function C(A,P,F){T(()=>{if(typeof P=="number"){P&&(i.go?i.go(P):console.warn("Router integration does not support relative routing"));return}const X=!P||P[0]==="?",{replace:be,resolve:Y,scroll:ye,state:ee}={replace:!1,resolve:!X,scroll:!0,...F},le=Y?A.resolvePath(P):ce(X&&S.pathname||"",P);if(le===void 0)throw new Error(`Path '${P}' is not a routable path`);if(x.length>=an)throw new Error("Too many redirects");const je=d();(le!==je||ee!==y())&&(Yt||c.confirm(le,F)&&(x.push({value:je,replace:be,scroll:ye,state:y()}),b("navigate",{value:le,state:ee})))})}function E(A){return A=A||st(wt)||k,(P,F)=>C(A,P,F)}function W(A){const P=x[0];P&&(o({...A,replace:P.replace,scroll:P.scroll}),x.length=0)}function St(A,P){const F=_e(t(),A.pathname),X=G;G="preload";for(let be in F){const{route:Y,params:ye}=F[be];Y.component&&Y.component.preload&&Y.component.preload();const{preload:ee}=Y;P&&ee&&nt(n(),()=>ee({params:ye,location:{pathname:A.pathname,search:A.search,hash:A.hash,query:ht(A),state:null,key:""},intent:"preload"}))}G=X}}function pn(e,t,n,r){const{base:s,location:o,params:i}=e,{pattern:l,component:a,preload:c}=r().route,f=L(()=>r().path);a&&a.preload&&a.preload();const u=c?c({params:i,location:o,intent:G||"initial"}):void 0;return{parent:t,pattern:l,path:f,outlet:()=>a?I(a,{params:i,location:o,data:u,get children(){return n()}}):n(),resolvePath(h){return ce(s.path(),h,f())}}}const mn=e=>t=>{const{base:n}=t,r=Ne(()=>t.children),s=L(()=>yt(r(),t.base||""));let o;const i=gn(e,s,()=>o,{base:n,singleFlight:t.singleFlight,transformUrl:t.transformUrl});return e.create&&e.create(i),I(mt.Provider,{value:i,get children(){return I(wn,{routerState:i,get root(){return t.root},get preload(){return t.rootPreload||t.rootLoad},get children(){return[L(()=>(o=tt())&&null),I(bn,{routerState:i,get branches(){return s()}})]}})}})};function wn(e){const t=e.routerState.location,n=e.routerState.params,r=L(()=>e.preload&&T(()=>{e.preload({params:n,location:t,intent:hn()||"initial"})}));return I(we,{get when(){return e.root},keyed:!0,get fallback(){return e.children},children:s=>I(s,{params:n,location:t,get data(){return r()},get children(){return e.children}})})}function bn(e){const t=[];let n;const r=L(Re(e.routerState.matches,(s,o,i)=>{let l=o&&s.length===o.length;const a=[];for(let c=0,f=s.length;c{t[c]=h,a[c]=pn(e.routerState,a[c-1]||e.routerState.base,Ve(()=>r()[c+1]),()=>e.routerState.matches()[c])}))}return t.splice(s.length).forEach(c=>c()),i&&l?i:(n=a[0],a)}));return Ve(()=>r()&&n)()}const Ve=e=>()=>I(we,{get when(){return e()},keyed:!0,children:t=>I(wt.Provider,{value:t,get children(){return t.outlet()}})}),We=e=>{const t=Ne(()=>e.children);return Mt(e,{get children(){return t()}})};function yn([e,t],n,r){return[e,r?s=>t(r(s)):t]}function $n(e){let t=!1;const n=s=>typeof s=="string"?{value:s}:s,r=yn(R(n(e.get()),{equals:(s,o)=>s.value===o.value&&s.state===o.state}),void 0,s=>(!t&&e.set(s),w.registry&&!w.done&&(w.done=!0),s));return e.init&&Oe(e.init((s=e.get())=>{t=!0,r[1](n(s)),t=!1})),mn({signal:r,create:e.create,utils:e.utils})}function vn(e,t,n){return e.addEventListener(t,n),()=>e.removeEventListener(t,n)}function Sn(e,t){const n=e&&document.getElementById(e);n?n.scrollIntoView():t&&window.scrollTo(0,0)}const xn=new Map;function _n(e=!0,t=!1,n="/_server",r){return s=>{const o=s.base.path(),i=s.navigatorFactory(s.base);let l,a;function c(d){return d.namespaceURI==="http://www.w3.org/2000/svg"}function f(d){if(d.defaultPrevented||d.button!==0||d.metaKey||d.altKey||d.ctrlKey||d.shiftKey)return;const p=d.composedPath().find(D=>D instanceof Node&&D.nodeName.toUpperCase()==="A");if(!p||t&&!p.hasAttribute("link"))return;const y=c(p),m=y?p.href.baseVal:p.href;if((y?p.target.baseVal:p.target)||!m&&!p.hasAttribute("state"))return;const x=(p.getAttribute("rel")||"").split(/\s+/);if(p.hasAttribute("download")||x&&x.includes("external"))return;const _=y?new URL(m,document.baseURI):new URL(m);if(!(_.origin!==window.location.origin||o&&_.pathname&&!_.pathname.toLowerCase().startsWith(o.toLowerCase())))return[p,_]}function u(d){const p=f(d);if(!p)return;const[y,m]=p,S=s.parsePath(m.pathname+m.search+m.hash),x=y.getAttribute("state");d.preventDefault(),i(S,{resolve:!1,replace:y.hasAttribute("replace"),scroll:!y.hasAttribute("noscroll"),state:x?JSON.parse(x):void 0})}function g(d){const p=f(d);if(!p)return;const[y,m]=p;r&&(m.pathname=r(m.pathname)),s.preloadRoute(m,y.getAttribute("preload")!=="false")}function h(d){clearTimeout(l);const p=f(d);if(!p)return a=null;const[y,m]=p;a!==y&&(r&&(m.pathname=r(m.pathname)),l=setTimeout(()=>{s.preloadRoute(m,y.getAttribute("preload")!=="false"),a=y},20))}function b(d){if(d.defaultPrevented)return;let p=d.submitter&&d.submitter.hasAttribute("formaction")?d.submitter.getAttribute("formaction"):d.target.getAttribute("action");if(!p)return;if(!p.startsWith("https://action/")){const m=new URL(p,dt);if(p=s.parsePath(m.pathname+m.search),!p.startsWith(n))return}if(d.target.method.toUpperCase()!=="POST")throw new Error("Only POST forms are supported for Actions");const y=xn.get(p);if(y){d.preventDefault();const m=new FormData(d.target,d.submitter);y.call({r:s,f:d.target},d.target.enctype==="multipart/form-data"?m:new URLSearchParams(m))}}z(["click","submit"]),document.addEventListener("click",u),e&&(document.addEventListener("mousemove",h,{passive:!0}),document.addEventListener("focusin",g,{passive:!0}),document.addEventListener("touchstart",g,{passive:!0})),document.addEventListener("submit",b),Oe(()=>{document.removeEventListener("click",u),e&&(document.removeEventListener("mousemove",h),document.removeEventListener("focusin",g),document.removeEventListener("touchstart",g)),document.removeEventListener("submit",b)})}}function An(e){const t=()=>{const r=window.location.pathname.replace(/^\/+/,"/")+window.location.search,s=window.history.state&&window.history.state._depth&&Object.keys(window.history.state).length===1?void 0:window.history.state;return{value:r+window.location.hash,state:s}},n=ft();return $n({get:t,set({value:r,replace:s,scroll:o,state:i}){s?window.history.replaceState(zt(i),"",r):window.history.pushState(i,"",r),Sn(decodeURIComponent(window.location.hash.slice(1)),o),Te()},init:r=>vn(window,"popstate",en(r,s=>{if(s&&s<0)return!n.confirm(s);{const o=t();return!n.confirm(o.value,{state:o.state})}})),create:_n(e.preload,e.explicitLinks,e.actionBase,e.transformUrl),utils:{go:r=>window.history.go(r),beforeLeave:n}})(e)}const oe="",Cn=async()=>{const e=oe+"/api/all";return await(await fetch(e)).json()},Ge=async(e,t,n)=>{const r=oe+"/api/edit/"+e+"/"+t+"/"+n;return await(await fetch(r)).json()},cr=async e=>{const t=oe+"/api/host/"+e;return await(await fetch(t)).json()},ur=async e=>{const t=oe+"/api/host/del/"+e;return await(await fetch(t)).json()},fr=async(e,t)=>{const n=oe+"/api/port/"+e+"/"+t;return await(await fetch(n)).json()},Pn={ID:0,Name:"",DNS:"",Iface:"",IP:"",Mac:"",Hw:"",Date:"",Known:0,Now:0},[ie,M]=R([]),[Le,kn]=R([]),[En,In]=R([]),[dr,hr]=R(),[$t,Xe]=R(!1),[gr,pr]=R(Pn);let Ye="ID";function Ln(){const e=localStorage.getItem("filterField"),t=localStorage.getItem("filterValue");Fe(e,t)}function Fe(e,t){let n=ie();switch(Ye==e&&(n=Le()),Ye=e,localStorage.setItem("filterField",e),localStorage.setItem("filterValue",t),e){case"Iface":n=n.filter(r=>r.Iface==t);break;case"Known":n=n.filter(r=>r.Known==t);break;case"Now":n=n.filter(r=>r.Now==t);break;default:n=Le()}M([]),M(n)}let B=!1,Ae="";function Rn(){const e=localStorage.getItem("sortField");B=JSON.parse(localStorage.getItem("sortDown")),B=!B,vt(e)}function vt(e){e!=Ae?(Ae=e,B=!B):(Ae="",B=!B),localStorage.setItem("sortDown",B.toString()),localStorage.setItem("sortField",e);let t=ie();e=="IP"?t.sort((n,r)=>Nn(n,r,B)):t.sort((n,r)=>On(n,r,e,B)),M([]),M(t)}function On(e,t,n,r){return e[n]>t[n]?r?1:-1:r?-1:1}function Nn(e,t,n){const r=Je(e),s=Je(t);return n?r-s:s-r}function Je(e){return Number(e.IP.split(".").map(t=>`000${t}`.slice(-3)).join(""))}function Dn(){Qe(),Fe("ID",0),setInterval(()=>{Qe()},6e4)}async function Qe(){const e=await Cn();M(e),kn(e),Rn(),Ln(),Tn()}function Tn(){let e=[];for(let t of ie())e.includes(t.Iface)||e.push(t.Iface);In(e)}var Fn=j(''),jn=j(''),Hn=j(""),Un=j('
.
');function Bn(e){const[t,n]=R(e.host.Name),r="http://"+e.host.IP,s="/host/"+e.host.ID;let o=Fn();e.host.Now==1&&(o=jn());let i=!1;e.host.Known==1&&(i=!0);const l=async c=>{n(c),await Ge(e.host.ID,t(),"")},a=async()=>{await Ge(e.host.ID,t(),"toggle")};return(()=>{var c=Un(),f=c.firstChild,u=f.firstChild,g=f.nextSibling,h=g.nextSibling,b=h.nextSibling,d=b.firstChild,p=b.nextSibling,y=p.nextSibling,m=y.nextSibling,S=m.nextSibling,x=S.firstChild,_=x.firstChild,D=S.nextSibling,H=D.nextSibling,U=H.firstChild;return O(f,()=>e.index,u),O(g,I(we,{get when(){return $t()},get fallback(){return t()},get children(){var k=Hn();return k.$$input=C=>l(C.target.value),Q(()=>k.value=t()),k}})),O(h,()=>e.host.Iface),Ke(d,"href",r),O(d,()=>e.host.IP),O(p,()=>e.host.Mac),O(y,()=>e.host.Hw),O(m,()=>e.host.Date),_.$$click=a,_.checked=i,O(D,o),Ke(U,"href",s),c})()}z(["input","click"]);var Kn=j('
Name Iface IP MAC Hardware Date Known Online ');function Mn(){const e=t=>{vt(t)};return(()=>{var t=Kn(),n=t.firstChild,r=n.firstChild,s=r.nextSibling,o=s.firstChild,i=o.nextSibling,l=s.nextSibling,a=l.firstChild,c=a.nextSibling,f=l.nextSibling,u=f.firstChild,g=u.nextSibling,h=f.nextSibling,b=h.firstChild,d=b.nextSibling,p=h.nextSibling,y=p.firstChild,m=y.nextSibling,S=p.nextSibling,x=S.firstChild,_=x.nextSibling,D=S.nextSibling,H=D.firstChild,U=H.nextSibling,k=D.nextSibling,C=k.firstChild,E=C.nextSibling;return i.$$click=e,i.$$clickData="Name",c.$$click=e,c.$$clickData="Iface",g.$$click=e,g.$$clickData="IP",d.$$click=e,d.$$clickData="Mac",m.$$click=e,m.$$clickData="Hw",_.$$click=e,_.$$clickData="Date",U.$$click=e,U.$$clickData="Known",E.$$click=e,E.$$clickData="Now",t})()}z(["click"]);var qn=j('
Filter by