filecat 7.9.0 → 7.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -201
- package/README.md +173 -182
- package/build/dist/{4967.3fd3bd40a2b5a3b52428.js → 1060.198d91e2dfc174317c3a.js} +1 -1
- package/build/dist/1075.05eed88707339ca32044.js +1 -0
- package/build/dist/{1142.121454b1de53689b7367.js → 1142.bc43fae2e5e38d9359df.js} +1 -1
- package/build/dist/1384.edbad9c24d883a59724d.js +1 -0
- package/build/dist/1417.d390b18dd58ff5c28160.js +1 -0
- package/build/dist/1448.4db495e1389c0c8445b3.js +1 -0
- package/build/dist/{3324.22efcb1c431177b1cf5f.js → 1455.26a021eb94e5bdd5bec2.js} +1 -1
- package/build/dist/{1636.b6a17252dfd0d22f09a7.js → 1636.b80b1883358e132d3424.js} +1 -1
- package/build/dist/{1832.8ea5c3e8288df0b7fd5c.js → 1832.a01933ba5df99576ecc2.js} +1 -1
- package/build/dist/2300.c99b1dd4e752cdfd5e32.js +2 -0
- package/build/dist/{2300.9e1baa1c0368abe53d96.js.LICENSE.txt → 2300.c99b1dd4e752cdfd5e32.js.LICENSE.txt} +1 -1
- package/build/dist/239.f570f06d4b9c020f1013.js +1 -0
- package/build/dist/{2479.dcc88b3370f0f1d66e02.js → 2479.294792ef5d360ad64abc.js} +1 -1
- package/build/dist/2542.26cb302b60de23166227.js +1 -0
- package/build/dist/{259.81bb9e049e5ef587a96f.js → 259.3c0eb22e9b43ffb63c9c.js} +1 -1
- package/build/dist/2626.3bcfe1f26d9cb796a925.js +1 -0
- package/build/dist/2674.d1bf937289c51ddeceac.js +1 -0
- package/build/dist/3233.43bdd7c12ca829d56116.js +1 -0
- package/build/dist/3299.de79d172b41af93a8716.js +1 -0
- package/build/dist/{6992.f6a07311a638794c24f7.js → 3471.ef3b5dcfe37963034187.js} +1 -1
- package/build/dist/{3528.56eeefab6fca5884e2a6.js → 3528.0f8f34028d92fa87c518.js} +1 -1
- package/build/dist/{3659.8a31495bb8f38c0ffa7c.js → 3659.dd03dc2ac52a3ff19105.js} +1 -1
- package/build/dist/4004.f4c06b50348214eb2962.js +1 -0
- package/build/dist/{4560.8ef2e4b60cc86d019dd6.js → 4560.fd9f8cf2d6022b1d3a94.js} +1 -1
- package/build/dist/{4903.b5451ed0802b3f7c07b2.js → 4903.070aaa53a243baf05133.js} +1 -1
- package/build/dist/{4946.c95d4f426146e0180172.js → 4946.d578f6ba367a742d80bf.js} +2 -2
- package/build/dist/4986.f244efce9cf6be21f846.js +1 -0
- package/build/dist/5272.1f0dfac07ba202e7d323.js +1 -0
- package/build/dist/{5308.052f45c15785487b3766.js → 5308.d1e5ccb49396fc1b026d.js} +1 -1
- package/build/dist/{5516.645e4a900df9bdc1806c.js → 5516.88521f3a3c7101c46df3.js} +1 -1
- package/build/dist/5614.43bdd7c12ca829d56116.js +1 -0
- package/build/dist/{5139.adf9574d9b54a216e041.js → 5709.81f43e3c021fafdfe36f.js} +1 -1
- package/build/dist/{5744.e9f1efb88a617b05b709.js → 5744.0f8a0432b73b2eb0a7ff.js} +1 -1
- package/build/dist/{5877.ca081c4798194230243c.js → 5877.98d0475aaf4058b9a715.js} +1 -1
- package/build/dist/{6247.917e3fbef5dc5fbaf937.js → 6247.525b0b68872036ac2fa6.js} +1 -1
- package/build/dist/{7520.fbb0bc2a05cf94e15418.js → 6322.552511b5cb12cd0c821c.js} +1 -1
- package/build/dist/6492.17ecd8515fa512ce9306.js +1 -0
- package/build/dist/{676.a75318a8b598d8daadf0.js → 676.356039ef6f28f96b8c8b.js} +1 -1
- package/build/dist/{6805.bf0c964ab84f0fcc78be.js → 6805.373ac0e7d6555e4a6459.js} +1 -1
- package/build/dist/{6919.8cf13c01184b7148b28e.js → 6919.c7cc8617b658198d4924.js} +1 -1
- package/build/dist/{7038.4e4fc8e405c56d3080e2.js → 7038.166f915547d27e4dc5e4.js} +1 -1
- package/build/dist/{7759.0b68912ff9ef10869f59.js → 7759.7cd3fe8e5d37df25804c.js} +1 -1
- package/build/dist/7873.e3098bc6f510e5bea55f.js +1 -0
- package/build/dist/7923.d44556578af4d3d7cea3.js +2 -0
- package/build/dist/{7943.19d2de387eeb7f513d8e.js → 7943.acf25a5e98dd13290985.js} +1 -1
- package/build/dist/8090.8977224618a14ae42159.js +2 -0
- package/build/dist/8302.ce97557b7cf7c8387942.js +1 -0
- package/build/dist/8319.6a6b9651c87a1bb4cbb9.js +1 -0
- package/build/dist/{8603.4142ce42c1635f493eca.js → 8603.f1cbcfd64cde885f9809.js} +1 -1
- package/build/dist/8649.d6055ad75975b803bbc1.js +1 -0
- package/build/dist/{8727.3628c746061aed7a4077.js → 8727.8658835acb7e0b6e5acc.js} +1 -1
- package/build/dist/{8765.a5633d054abb67142fc3.js → 8765.8758c290a6b132f2ce7f.js} +1 -1
- package/build/dist/8772.2c35012c25ac9eb5f74d.js +2 -0
- package/build/dist/{8772.e8f9731c1c061f1cdf56.js.LICENSE.txt → 8772.2c35012c25ac9eb5f74d.js.LICENSE.txt} +1 -1
- package/build/dist/8781.6bd14487d172e004e3d3.js +1 -0
- package/build/dist/9299.76095cb6629c36ca3343.js +1 -0
- package/build/dist/9334.a25983aafdcbde63ae5e.js +1 -0
- package/build/dist/{9546.e7206c968e92371ae2b1.js → 9546.2cecad04cf676a6616cd.js} +1 -1
- package/build/dist/dark.css +839 -839
- package/build/dist/filerobot-image-editor.min.js +42445 -42445
- package/build/dist/google-dark.css +2032 -2032
- package/build/dist/google.css +1719 -1719
- package/build/dist/index.html +1 -1
- package/build/dist/main.26c2c54f6ab534513ebd.js +2 -0
- package/build/dist/{main.3a12152528aff6ae213a.js.LICENSE.txt → main.26c2c54f6ab534513ebd.js.LICENSE.txt} +1 -1
- package/build/dist/rle.js +17867 -17867
- package/build/main.js +1 -1
- package/build/plugin/core.type.d.ts +62 -0
- package/build/threads.work.filecat.js +1 -1
- package/env +26 -26
- package/package.json +211 -211
- package/shell/build.js +161 -161
- package/shell/config/.babelrc +14 -14
- package/shell/config/base.webpack.config.js +78 -78
- package/shell/config/common-bin.config.js +44 -44
- package/shell/config/env.js +10 -10
- package/shell/config/prebuild-file-path.js +17 -17
- package/shell/config/webpack.exe.config.js +36 -36
- package/shell/config/webpack.npm.config.js +44 -44
- package/shell/config/webpack.web.config.js +152 -152
- package/shell/dev.js +51 -51
- package/shell/docker-build.sh +2 -2
- package/shell/filecat +1 -1
- package/shell/filecat-watch +1 -1
- package/shell/install.js +48 -48
- package/shell/net-agent/git-clone.bat +23 -23
- package/shell/net-agent/git-pull.bat +17 -17
- package/shell/net-agent/git-push.bat +17 -17
- package/shell/pkg.ts +50 -50
- package/shell/postinstall-optional.js +29 -29
- package/shell/start/filecat-install.sh +22 -22
- package/shell/start/filecat-run.sh +2 -2
- package/shell/start/windows-install.js +178 -178
- package/shell/start/windows-uninstall.js +131 -131
- package/shell/util/file.js +46 -46
- package/build/dist/1075.40103ec059c6b23b056e.js +0 -1
- package/build/dist/1384.0d0fc5faa899c9eddcbe.js +0 -1
- package/build/dist/1417.7e511043474084a2a65b.js +0 -1
- package/build/dist/1448.0710f04bed1c52e6a5db.js +0 -1
- package/build/dist/2300.9e1baa1c0368abe53d96.js +0 -2
- package/build/dist/2542.23fb13b1623c9f7c3fc1.js +0 -1
- package/build/dist/2626.05d1faa293e0a3318b9b.js +0 -1
- package/build/dist/2674.7fd28dae86ccdb247851.js +0 -1
- package/build/dist/2851.2195b5906b2c224c7bf7.js +0 -1
- package/build/dist/3140.794a212da633caf38b3a.js +0 -2
- package/build/dist/3233.fb6bffd5e097e4ac9423.js +0 -1
- package/build/dist/3299.f37767d30b6999df4014.js +0 -1
- package/build/dist/4004.5d68418ad5c2321cb11f.js +0 -1
- package/build/dist/4986.78047106f3a0d2d71199.js +0 -1
- package/build/dist/5272.0b70ee8ec5f083fb9f5b.js +0 -1
- package/build/dist/5614.fb6bffd5e097e4ac9423.js +0 -1
- package/build/dist/6492.3ee4060598de873d8e8f.js +0 -1
- package/build/dist/7756.2f851693ba030c42dde8.js +0 -1
- package/build/dist/7873.11d04b741d2b499d9cb9.js +0 -1
- package/build/dist/7923.861345fd55941e8089a1.js +0 -2
- package/build/dist/8014.28b5cf8c3787dc829aa4.js +0 -1
- package/build/dist/8302.5ae5bfe8baa0084204bb.js +0 -1
- package/build/dist/8319.c15a3674ec7abc493595.js +0 -1
- package/build/dist/8772.e8f9731c1c061f1cdf56.js +0 -2
- package/build/dist/8781.58f0c51870d3dd2689d7.js +0 -1
- package/build/dist/9299.6c06dad1abe098b61766.js +0 -1
- package/build/dist/main.3a12152528aff6ae213a.js +0 -2
- /package/build/dist/{4946.c95d4f426146e0180172.js.LICENSE.txt → 4946.d578f6ba367a742d80bf.js.LICENSE.txt} +0 -0
- /package/build/dist/{7923.861345fd55941e8089a1.js.LICENSE.txt → 7923.d44556578af4d3d7cea3.js.LICENSE.txt} +0 -0
- /package/build/dist/{3140.794a212da633caf38b3a.js.LICENSE.txt → 8090.8977224618a14ae42159.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[8781],{4926(n,l,e){var t=e(31601),o=e.n(t),i=e(76314),r=e.n(i)()(o());r.push([n.id,'/* ../simple-mind-map/node_modules/quill/dist/quill.snow.css */\n.ql-container {\n box-sizing: border-box;\n font-family:\n Helvetica,\n Arial,\n sans-serif;\n font-size: 13px;\n height: 100%;\n margin: 0;\n position: relative;\n}\n.ql-container.ql-disabled .ql-tooltip {\n visibility: hidden;\n}\n.ql-container:not(.ql-disabled) li[data-list=checked] > .ql-ui,\n.ql-container:not(.ql-disabled) li[data-list=unchecked] > .ql-ui {\n cursor: pointer;\n}\n.ql-clipboard {\n left: -100000px;\n height: 1px;\n overflow-y: hidden;\n position: absolute;\n top: 50%;\n}\n.ql-clipboard p {\n margin: 0;\n padding: 0;\n}\n.ql-editor {\n box-sizing: border-box;\n counter-reset: list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n line-height: 1.42;\n height: 100%;\n outline: none;\n overflow-y: auto;\n padding: 12px 15px;\n tab-size: 4;\n -moz-tab-size: 4;\n text-align: left;\n white-space: pre-wrap;\n word-wrap: break-word;\n}\n.ql-editor > * {\n cursor: text;\n}\n.ql-editor p,\n.ql-editor ol,\n.ql-editor pre,\n.ql-editor blockquote,\n.ql-editor h1,\n.ql-editor h2,\n.ql-editor h3,\n.ql-editor h4,\n.ql-editor h5,\n.ql-editor h6 {\n margin: 0;\n padding: 0;\n}\n@supports (counter-set:none) {\n .ql-editor p,\n .ql-editor h1,\n .ql-editor h2,\n .ql-editor h3,\n .ql-editor h4,\n .ql-editor h5,\n .ql-editor h6 {\n counter-set: list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n }\n}\n@supports not (counter-set:none) {\n .ql-editor p,\n .ql-editor h1,\n .ql-editor h2,\n .ql-editor h3,\n .ql-editor h4,\n .ql-editor h5,\n .ql-editor h6 {\n counter-reset: list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n }\n}\n.ql-editor table {\n border-collapse: collapse;\n}\n.ql-editor td {\n border: 1px solid #000;\n padding: 2px 5px;\n}\n.ql-editor ol {\n padding-left: 1.5em;\n}\n.ql-editor li {\n list-style-type: none;\n padding-left: 1.5em;\n position: relative;\n}\n.ql-editor li > .ql-ui:before {\n display: inline-block;\n margin-left: -1.5em;\n margin-right: .3em;\n text-align: right;\n white-space: nowrap;\n width: 1.2em;\n}\n.ql-editor li[data-list=checked] > .ql-ui,\n.ql-editor li[data-list=unchecked] > .ql-ui {\n color: #777;\n}\n.ql-editor li[data-list=bullet] > .ql-ui:before {\n content: "\\2022";\n}\n.ql-editor li[data-list=checked] > .ql-ui:before {\n content: "\\2611";\n}\n.ql-editor li[data-list=unchecked] > .ql-ui:before {\n content: "\\2610";\n}\n@supports (counter-set:none) {\n .ql-editor li[data-list] {\n counter-set: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n }\n}\n@supports not (counter-set:none) {\n .ql-editor li[data-list] {\n counter-reset: list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n }\n}\n.ql-editor li[data-list=ordered] {\n counter-increment: list-0;\n}\n.ql-editor li[data-list=ordered] > .ql-ui:before {\n content: counter(list-0, decimal) ". ";\n}\n.ql-editor li[data-list=ordered].ql-indent-1 {\n counter-increment: list-1;\n}\n.ql-editor li[data-list=ordered].ql-indent-1 > .ql-ui:before {\n content: counter(list-1, lower-alpha) ". ";\n}\n@supports (counter-set:none) {\n .ql-editor li[data-list].ql-indent-1 {\n counter-set: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n }\n}\n@supports not (counter-set:none) {\n .ql-editor li[data-list].ql-indent-1 {\n counter-reset: list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n }\n}\n.ql-editor li[data-list=ordered].ql-indent-2 {\n counter-increment: list-2;\n}\n.ql-editor li[data-list=ordered].ql-indent-2 > .ql-ui:before {\n content: counter(list-2, lower-roman) ". ";\n}\n@supports (counter-set:none) {\n .ql-editor li[data-list].ql-indent-2 {\n counter-set: list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n }\n}\n@supports not (counter-set:none) {\n .ql-editor li[data-list].ql-indent-2 {\n counter-reset: list-3 list-4 list-5 list-6 list-7 list-8 list-9;\n }\n}\n.ql-editor li[data-list=ordered].ql-indent-3 {\n counter-increment: list-3;\n}\n.ql-editor li[data-list=ordered].ql-indent-3 > .ql-ui:before {\n content: counter(list-3, decimal) ". ";\n}\n@supports (counter-set:none) {\n .ql-editor li[data-list].ql-indent-3 {\n counter-set: list-4 list-5 list-6 list-7 list-8 list-9;\n }\n}\n@supports not (counter-set:none) {\n .ql-editor li[data-list].ql-indent-3 {\n counter-reset: list-4 list-5 list-6 list-7 list-8 list-9;\n }\n}\n.ql-editor li[data-list=ordered].ql-indent-4 {\n counter-increment: list-4;\n}\n.ql-editor li[data-list=ordered].ql-indent-4 > .ql-ui:before {\n content: counter(list-4, lower-alpha) ". ";\n}\n@supports (counter-set:none) {\n .ql-editor li[data-list].ql-indent-4 {\n counter-set: list-5 list-6 list-7 list-8 list-9;\n }\n}\n@supports not (counter-set:none) {\n .ql-editor li[data-list].ql-indent-4 {\n counter-reset: list-5 list-6 list-7 list-8 list-9;\n }\n}\n.ql-editor li[data-list=ordered].ql-indent-5 {\n counter-increment: list-5;\n}\n.ql-editor li[data-list=ordered].ql-indent-5 > .ql-ui:before {\n content: counter(list-5, lower-roman) ". ";\n}\n@supports (counter-set:none) {\n .ql-editor li[data-list].ql-indent-5 {\n counter-set: list-6 list-7 list-8 list-9;\n }\n}\n@supports not (counter-set:none) {\n .ql-editor li[data-list].ql-indent-5 {\n counter-reset: list-6 list-7 list-8 list-9;\n }\n}\n.ql-editor li[data-list=ordered].ql-indent-6 {\n counter-increment: list-6;\n}\n.ql-editor li[data-list=ordered].ql-indent-6 > .ql-ui:before {\n content: counter(list-6, decimal) ". ";\n}\n@supports (counter-set:none) {\n .ql-editor li[data-list].ql-indent-6 {\n counter-set: list-7 list-8 list-9;\n }\n}\n@supports not (counter-set:none) {\n .ql-editor li[data-list].ql-indent-6 {\n counter-reset: list-7 list-8 list-9;\n }\n}\n.ql-editor li[data-list=ordered].ql-indent-7 {\n counter-increment: list-7;\n}\n.ql-editor li[data-list=ordered].ql-indent-7 > .ql-ui:before {\n content: counter(list-7, lower-alpha) ". ";\n}\n@supports (counter-set:none) {\n .ql-editor li[data-list].ql-indent-7 {\n counter-set: list-8 list-9;\n }\n}\n@supports not (counter-set:none) {\n .ql-editor li[data-list].ql-indent-7 {\n counter-reset: list-8 list-9;\n }\n}\n.ql-editor li[data-list=ordered].ql-indent-8 {\n counter-increment: list-8;\n}\n.ql-editor li[data-list=ordered].ql-indent-8 > .ql-ui:before {\n content: counter(list-8, lower-roman) ". ";\n}\n@supports (counter-set:none) {\n .ql-editor li[data-list].ql-indent-8 {\n counter-set: list-9;\n }\n}\n@supports not (counter-set:none) {\n .ql-editor li[data-list].ql-indent-8 {\n counter-reset: list-9;\n }\n}\n.ql-editor li[data-list=ordered].ql-indent-9 {\n counter-increment: list-9;\n}\n.ql-editor li[data-list=ordered].ql-indent-9 > .ql-ui:before {\n content: counter(list-9, decimal) ". ";\n}\n.ql-editor .ql-indent-1:not(.ql-direction-rtl) {\n padding-left: 3em;\n}\n.ql-editor li.ql-indent-1:not(.ql-direction-rtl) {\n padding-left: 4.5em;\n}\n.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right {\n padding-right: 3em;\n}\n.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right {\n padding-right: 4.5em;\n}\n.ql-editor .ql-indent-2:not(.ql-direction-rtl) {\n padding-left: 6em;\n}\n.ql-editor li.ql-indent-2:not(.ql-direction-rtl) {\n padding-left: 7.5em;\n}\n.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right {\n padding-right: 6em;\n}\n.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right {\n padding-right: 7.5em;\n}\n.ql-editor .ql-indent-3:not(.ql-direction-rtl) {\n padding-left: 9em;\n}\n.ql-editor li.ql-indent-3:not(.ql-direction-rtl) {\n padding-left: 10.5em;\n}\n.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right {\n padding-right: 9em;\n}\n.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right {\n padding-right: 10.5em;\n}\n.ql-editor .ql-indent-4:not(.ql-direction-rtl) {\n padding-left: 12em;\n}\n.ql-editor li.ql-indent-4:not(.ql-direction-rtl) {\n padding-left: 13.5em;\n}\n.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right {\n padding-right: 12em;\n}\n.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right {\n padding-right: 13.5em;\n}\n.ql-editor .ql-indent-5:not(.ql-direction-rtl) {\n padding-left: 15em;\n}\n.ql-editor li.ql-indent-5:not(.ql-direction-rtl) {\n padding-left: 16.5em;\n}\n.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right {\n padding-right: 15em;\n}\n.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right {\n padding-right: 16.5em;\n}\n.ql-editor .ql-indent-6:not(.ql-direction-rtl) {\n padding-left: 18em;\n}\n.ql-editor li.ql-indent-6:not(.ql-direction-rtl) {\n padding-left: 19.5em;\n}\n.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right {\n padding-right: 18em;\n}\n.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right {\n padding-right: 19.5em;\n}\n.ql-editor .ql-indent-7:not(.ql-direction-rtl) {\n padding-left: 21em;\n}\n.ql-editor li.ql-indent-7:not(.ql-direction-rtl) {\n padding-left: 22.5em;\n}\n.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right {\n padding-right: 21em;\n}\n.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right {\n padding-right: 22.5em;\n}\n.ql-editor .ql-indent-8:not(.ql-direction-rtl) {\n padding-left: 24em;\n}\n.ql-editor li.ql-indent-8:not(.ql-direction-rtl) {\n padding-left: 25.5em;\n}\n.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right {\n padding-right: 24em;\n}\n.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right {\n padding-right: 25.5em;\n}\n.ql-editor .ql-indent-9:not(.ql-direction-rtl) {\n padding-left: 27em;\n}\n.ql-editor li.ql-indent-9:not(.ql-direction-rtl) {\n padding-left: 28.5em;\n}\n.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right {\n padding-right: 27em;\n}\n.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right {\n padding-right: 28.5em;\n}\n.ql-editor li.ql-direction-rtl {\n padding-right: 1.5em;\n}\n.ql-editor li.ql-direction-rtl > .ql-ui:before {\n margin-left: .3em;\n margin-right: -1.5em;\n text-align: left;\n}\n.ql-editor table {\n table-layout: fixed;\n width: 100%;\n}\n.ql-editor table td {\n outline: none;\n}\n.ql-editor .ql-code-block-container {\n font-family: monospace;\n}\n.ql-editor .ql-video {\n display: block;\n max-width: 100%;\n}\n.ql-editor .ql-video.ql-align-center {\n margin: 0 auto;\n}\n.ql-editor .ql-video.ql-align-right {\n margin: 0 0 0 auto;\n}\n.ql-editor .ql-bg-black {\n background-color: #000;\n}\n.ql-editor .ql-bg-red {\n background-color: #e60000;\n}\n.ql-editor .ql-bg-orange {\n background-color: #f90;\n}\n.ql-editor .ql-bg-yellow {\n background-color: #ff0;\n}\n.ql-editor .ql-bg-green {\n background-color: #008a00;\n}\n.ql-editor .ql-bg-blue {\n background-color: #06c;\n}\n.ql-editor .ql-bg-purple {\n background-color: #93f;\n}\n.ql-editor .ql-color-white {\n color: #fff;\n}\n.ql-editor .ql-color-red {\n color: #e60000;\n}\n.ql-editor .ql-color-orange {\n color: #f90;\n}\n.ql-editor .ql-color-yellow {\n color: #ff0;\n}\n.ql-editor .ql-color-green {\n color: #008a00;\n}\n.ql-editor .ql-color-blue {\n color: #06c;\n}\n.ql-editor .ql-color-purple {\n color: #93f;\n}\n.ql-editor .ql-font-serif {\n font-family:\n Georgia,\n Times New Roman,\n serif;\n}\n.ql-editor .ql-font-monospace {\n font-family:\n Monaco,\n Courier New,\n monospace;\n}\n.ql-editor .ql-size-small {\n font-size: .75em;\n}\n.ql-editor .ql-size-large {\n font-size: 1.5em;\n}\n.ql-editor .ql-size-huge {\n font-size: 2.5em;\n}\n.ql-editor .ql-direction-rtl {\n direction: rtl;\n text-align: inherit;\n}\n.ql-editor .ql-align-center {\n text-align: center;\n}\n.ql-editor .ql-align-justify {\n text-align: justify;\n}\n.ql-editor .ql-align-right {\n text-align: right;\n}\n.ql-editor .ql-ui {\n position: absolute;\n}\n.ql-editor.ql-blank::before {\n color: rgba(0, 0, 0, 0.6);\n content: attr(data-placeholder);\n font-style: italic;\n left: 15px;\n pointer-events: none;\n position: absolute;\n right: 15px;\n}\n.ql-snow.ql-toolbar:after,\n.ql-snow .ql-toolbar:after {\n clear: both;\n content: "";\n display: table;\n}\n.ql-snow.ql-toolbar button,\n.ql-snow .ql-toolbar button {\n background: none;\n border: none;\n cursor: pointer;\n display: inline-block;\n float: left;\n height: 24px;\n padding: 3px 5px;\n width: 28px;\n}\n.ql-snow.ql-toolbar button svg,\n.ql-snow .ql-toolbar button svg {\n float: left;\n height: 100%;\n}\n.ql-snow.ql-toolbar button:active:hover,\n.ql-snow .ql-toolbar button:active:hover {\n outline: none;\n}\n.ql-snow.ql-toolbar input.ql-image[type=file],\n.ql-snow .ql-toolbar input.ql-image[type=file] {\n display: none;\n}\n.ql-snow.ql-toolbar button:hover,\n.ql-snow .ql-toolbar button:hover,\n.ql-snow.ql-toolbar button:focus,\n.ql-snow .ql-toolbar button:focus,\n.ql-snow.ql-toolbar button.ql-active,\n.ql-snow .ql-toolbar button.ql-active,\n.ql-snow.ql-toolbar .ql-picker-label:hover,\n.ql-snow .ql-toolbar .ql-picker-label:hover,\n.ql-snow.ql-toolbar .ql-picker-label.ql-active,\n.ql-snow .ql-toolbar .ql-picker-label.ql-active,\n.ql-snow.ql-toolbar .ql-picker-item:hover,\n.ql-snow .ql-toolbar .ql-picker-item:hover,\n.ql-snow.ql-toolbar .ql-picker-item.ql-selected,\n.ql-snow .ql-toolbar .ql-picker-item.ql-selected {\n color: #06c;\n}\n.ql-snow.ql-toolbar button:hover .ql-fill,\n.ql-snow .ql-toolbar button:hover .ql-fill,\n.ql-snow.ql-toolbar button:focus .ql-fill,\n.ql-snow .ql-toolbar button:focus .ql-fill,\n.ql-snow.ql-toolbar button.ql-active .ql-fill,\n.ql-snow .ql-toolbar button.ql-active .ql-fill,\n.ql-snow.ql-toolbar .ql-picker-label:hover .ql-fill,\n.ql-snow .ql-toolbar .ql-picker-label:hover .ql-fill,\n.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,\n.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill,\n.ql-snow.ql-toolbar .ql-picker-item:hover .ql-fill,\n.ql-snow .ql-toolbar .ql-picker-item:hover .ql-fill,\n.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill,\n.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill,\n.ql-snow.ql-toolbar button:hover .ql-stroke.ql-fill,\n.ql-snow .ql-toolbar button:hover .ql-stroke.ql-fill,\n.ql-snow.ql-toolbar button:focus .ql-stroke.ql-fill,\n.ql-snow .ql-toolbar button:focus .ql-stroke.ql-fill,\n.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill,\n.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill,\n.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,\n.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke.ql-fill,\n.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,\n.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,\n.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,\n.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke.ql-fill,\n.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,\n.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill {\n fill: #06c;\n}\n.ql-snow.ql-toolbar button:hover .ql-stroke,\n.ql-snow .ql-toolbar button:hover .ql-stroke,\n.ql-snow.ql-toolbar button:focus .ql-stroke,\n.ql-snow .ql-toolbar button:focus .ql-stroke,\n.ql-snow.ql-toolbar button.ql-active .ql-stroke,\n.ql-snow .ql-toolbar button.ql-active .ql-stroke,\n.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke,\n.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke,\n.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,\n.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke,\n.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke,\n.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke,\n.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,\n.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,\n.ql-snow.ql-toolbar button:hover .ql-stroke-miter,\n.ql-snow .ql-toolbar button:hover .ql-stroke-miter,\n.ql-snow.ql-toolbar button:focus .ql-stroke-miter,\n.ql-snow .ql-toolbar button:focus .ql-stroke-miter,\n.ql-snow.ql-toolbar button.ql-active .ql-stroke-miter,\n.ql-snow .ql-toolbar button.ql-active .ql-stroke-miter,\n.ql-snow.ql-toolbar .ql-picker-label:hover .ql-stroke-miter,\n.ql-snow .ql-toolbar .ql-picker-label:hover .ql-stroke-miter,\n.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,\n.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,\n.ql-snow.ql-toolbar .ql-picker-item:hover .ql-stroke-miter,\n.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,\n.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,\n.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter {\n stroke: #06c;\n}\n@media (pointer:coarse) {\n .ql-snow.ql-toolbar button:hover:not(.ql-active),\n .ql-snow .ql-toolbar button:hover:not(.ql-active) {\n color: #444;\n }\n .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-fill,\n .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-fill,\n .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,\n .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill {\n fill: #444;\n }\n .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke,\n .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke,\n .ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,\n .ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter {\n stroke: #444;\n }\n}\n.ql-snow {\n box-sizing: border-box;\n}\n.ql-snow * {\n box-sizing: border-box;\n}\n.ql-snow .ql-hidden {\n display: none;\n}\n.ql-snow .ql-out-bottom,\n.ql-snow .ql-out-top {\n visibility: hidden;\n}\n.ql-snow .ql-tooltip {\n position: absolute;\n transform: translateY(10px);\n}\n.ql-snow .ql-tooltip a {\n cursor: pointer;\n text-decoration: none;\n}\n.ql-snow .ql-tooltip.ql-flip {\n transform: translateY(-10px);\n}\n.ql-snow .ql-formats {\n display: inline-block;\n vertical-align: middle;\n}\n.ql-snow .ql-formats:after {\n clear: both;\n content: "";\n display: table;\n}\n.ql-snow .ql-stroke {\n fill: none;\n stroke: #444;\n stroke-linecap: round;\n stroke-linejoin: round;\n stroke-width: 2;\n}\n.ql-snow .ql-stroke-miter {\n fill: none;\n stroke: #444;\n stroke-miterlimit: 10;\n stroke-width: 2;\n}\n.ql-snow .ql-fill,\n.ql-snow .ql-stroke.ql-fill {\n fill: #444;\n}\n.ql-snow .ql-empty {\n fill: none;\n}\n.ql-snow .ql-even {\n fill-rule: evenodd;\n}\n.ql-snow .ql-thin,\n.ql-snow .ql-stroke.ql-thin {\n stroke-width: 1;\n}\n.ql-snow .ql-transparent {\n opacity: .4;\n}\n.ql-snow .ql-direction svg:last-child {\n display: none;\n}\n.ql-snow .ql-direction.ql-active svg:last-child {\n display: inline;\n}\n.ql-snow .ql-direction.ql-active svg:first-child {\n display: none;\n}\n.ql-snow .ql-editor h1 {\n font-size: 2em;\n}\n.ql-snow .ql-editor h2 {\n font-size: 1.5em;\n}\n.ql-snow .ql-editor h3 {\n font-size: 1.17em;\n}\n.ql-snow .ql-editor h4 {\n font-size: 1em;\n}\n.ql-snow .ql-editor h5 {\n font-size: .83em;\n}\n.ql-snow .ql-editor h6 {\n font-size: .67em;\n}\n.ql-snow .ql-editor a {\n text-decoration: underline;\n}\n.ql-snow .ql-editor blockquote {\n border-left: 4px solid #ccc;\n margin-bottom: 5px;\n margin-top: 5px;\n padding-left: 16px;\n}\n.ql-snow .ql-editor code,\n.ql-snow .ql-editor .ql-code-block-container {\n background-color: #f0f0f0;\n border-radius: 3px;\n}\n.ql-snow .ql-editor .ql-code-block-container {\n margin-bottom: 5px;\n margin-top: 5px;\n padding: 5px 10px;\n}\n.ql-snow .ql-editor code {\n font-size: 85%;\n padding: 2px 4px;\n}\n.ql-snow .ql-editor .ql-code-block-container {\n background-color: #23241f;\n color: #f8f8f2;\n overflow: visible;\n}\n.ql-snow .ql-editor img {\n max-width: 100%;\n}\n.ql-snow .ql-picker {\n color: #444;\n display: inline-block;\n float: left;\n font-size: 14px;\n font-weight: 500;\n height: 24px;\n position: relative;\n vertical-align: middle;\n}\n.ql-snow .ql-picker-label {\n cursor: pointer;\n display: inline-block;\n height: 100%;\n padding-left: 8px;\n padding-right: 2px;\n position: relative;\n width: 100%;\n}\n.ql-snow .ql-picker-label::before {\n display: inline-block;\n line-height: 22px;\n}\n.ql-snow .ql-picker-options {\n background-color: #fff;\n display: none;\n min-width: 100%;\n padding: 4px 8px;\n position: absolute;\n white-space: nowrap;\n}\n.ql-snow .ql-picker-options .ql-picker-item {\n cursor: pointer;\n display: block;\n padding-bottom: 5px;\n padding-top: 5px;\n}\n.ql-snow .ql-picker.ql-expanded .ql-picker-label {\n color: #ccc;\n z-index: 2;\n}\n.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill {\n fill: #ccc;\n}\n.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke {\n stroke: #ccc;\n}\n.ql-snow .ql-picker.ql-expanded .ql-picker-options {\n display: block;\n margin-top: -1px;\n top: 100%;\n z-index: 1;\n}\n.ql-snow .ql-color-picker,\n.ql-snow .ql-icon-picker {\n width: 28px;\n}\n.ql-snow .ql-color-picker .ql-picker-label,\n.ql-snow .ql-icon-picker .ql-picker-label {\n padding: 2px 4px;\n}\n.ql-snow .ql-color-picker .ql-picker-label svg,\n.ql-snow .ql-icon-picker .ql-picker-label svg {\n right: 4px;\n}\n.ql-snow .ql-icon-picker .ql-picker-options {\n padding: 4px 0;\n}\n.ql-snow .ql-icon-picker .ql-picker-item {\n height: 24px;\n width: 24px;\n padding: 2px 4px;\n}\n.ql-snow .ql-color-picker .ql-picker-options {\n padding: 3px 5px;\n width: 152px;\n}\n.ql-snow .ql-color-picker .ql-picker-item {\n border: 1px solid transparent;\n float: left;\n height: 16px;\n margin: 2px;\n padding: 0;\n width: 16px;\n}\n.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg {\n position: absolute;\n margin-top: -9px;\n right: 0;\n top: 50%;\n width: 18px;\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=""])::before,\n.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=""])::before,\n.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=""])::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=""])::before,\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=""])::before,\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=""])::before {\n content: attr(data-label);\n}\n.ql-snow .ql-picker.ql-header {\n width: 98px;\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item::before {\n content: "Normal";\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {\n content: "Heading 1";\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {\n content: "Heading 2";\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {\n content: "Heading 3";\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {\n content: "Heading 4";\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {\n content: "Heading 5";\n}\n.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]::before,\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {\n content: "Heading 6";\n}\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]::before {\n font-size: 2em;\n}\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before {\n font-size: 1.5em;\n}\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before {\n font-size: 1.17em;\n}\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before {\n font-size: 1em;\n}\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]::before {\n font-size: .83em;\n}\n.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {\n font-size: .67em;\n}\n.ql-snow .ql-picker.ql-font {\n width: 108px;\n}\n.ql-snow .ql-picker.ql-font .ql-picker-label::before,\n.ql-snow .ql-picker.ql-font .ql-picker-item::before {\n content: "Sans Serif";\n}\n.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]::before,\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {\n content: "Serif";\n}\n.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]::before,\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {\n content: "Monospace";\n}\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]::before {\n font-family:\n Georgia,\n Times New Roman,\n serif;\n}\n.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]::before {\n font-family:\n Monaco,\n Courier New,\n monospace;\n}\n.ql-snow .ql-picker.ql-size {\n width: 98px;\n}\n.ql-snow .ql-picker.ql-size .ql-picker-label::before,\n.ql-snow .ql-picker.ql-size .ql-picker-item::before {\n content: "Normal";\n}\n.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]::before,\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before {\n content: "Small";\n}\n.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]::before,\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before {\n content: "Large";\n}\n.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]::before,\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {\n content: "Huge";\n}\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]::before {\n font-size: 10px;\n}\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]::before {\n font-size: 18px;\n}\n.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]::before {\n font-size: 32px;\n}\n.ql-snow .ql-color-picker.ql-background .ql-picker-item {\n background-color: #fff;\n}\n.ql-snow .ql-color-picker.ql-color .ql-picker-item {\n background-color: #000;\n}\n.ql-code-block-container {\n position: relative;\n}\n.ql-code-block-container .ql-ui {\n right: 5px;\n top: 5px;\n}\n.ql-toolbar.ql-snow {\n border: 1px solid #ccc;\n box-sizing: border-box;\n font-family:\n "Helvetica Neue",\n "Helvetica",\n "Arial",\n sans-serif;\n padding: 8px;\n}\n.ql-toolbar.ql-snow .ql-formats {\n margin-right: 15px;\n}\n.ql-toolbar.ql-snow .ql-picker-label {\n border: 1px solid transparent;\n}\n.ql-toolbar.ql-snow .ql-picker-options {\n border: 1px solid transparent;\n box-shadow: rgba(0, 0, 0, 0.2) 0 2px 8px;\n}\n.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label {\n border-color: #ccc;\n}\n.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options {\n border-color: #ccc;\n}\n.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected,\n.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover {\n border-color: #000;\n}\n.ql-toolbar.ql-snow + .ql-container.ql-snow {\n border-top: 0;\n}\n.ql-snow .ql-tooltip {\n background-color: #fff;\n border: 1px solid #ccc;\n box-shadow: 0 0 5px #ddd;\n color: #444;\n padding: 5px 12px;\n white-space: nowrap;\n}\n.ql-snow .ql-tooltip::before {\n content: "Visit URL:";\n line-height: 26px;\n margin-right: 8px;\n}\n.ql-snow .ql-tooltip input[type=text] {\n display: none;\n border: 1px solid #ccc;\n font-size: 13px;\n height: 26px;\n margin: 0;\n padding: 3px 5px;\n width: 170px;\n}\n.ql-snow .ql-tooltip a.ql-preview {\n display: inline-block;\n max-width: 200px;\n overflow-x: hidden;\n text-overflow: ellipsis;\n vertical-align: top;\n}\n.ql-snow .ql-tooltip a.ql-action::after {\n border-right: 1px solid #ccc;\n content: "Edit";\n margin-left: 16px;\n padding-right: 8px;\n}\n.ql-snow .ql-tooltip a.ql-remove::before {\n content: "Remove";\n margin-left: 8px;\n}\n.ql-snow .ql-tooltip a {\n line-height: 26px;\n}\n.ql-snow .ql-tooltip.ql-editing a.ql-preview,\n.ql-snow .ql-tooltip.ql-editing a.ql-remove {\n display: none;\n}\n.ql-snow .ql-tooltip.ql-editing input[type=text] {\n display: inline-block;\n}\n.ql-snow .ql-tooltip.ql-editing a.ql-action::after {\n border-right: 0;\n content: "Save";\n padding-right: 0;\n}\n.ql-snow .ql-tooltip[data-mode=link]::before {\n content: "Enter link:";\n}\n.ql-snow .ql-tooltip[data-mode=formula]::before {\n content: "Enter formula:";\n}\n.ql-snow .ql-tooltip[data-mode=video]::before {\n content: "Enter video:";\n}\n.ql-snow a {\n color: #06c;\n}\n.ql-container.ql-snow {\n border: 1px solid #ccc;\n}\n/*! Bundled license information:\n\nquill/dist/quill.snow.css:\n (*!\n * Quill Editor v2.0.3\n * https://quilljs.com\n * Copyright (c) 2017-2024, Slab\n * Copyright (c) 2014, Jason Chen\n * Copyright (c) 2013, salesforce.com\n *)\n*/\n',""]);const q=r;e.d(l,["A",0,q])},88781(n,l,e){e.r(l);var t=e(85072),o=e.n(t),i=e(97825),r=e.n(i),q=e(77659),a=e.n(q),s=e(55056),d=e.n(s),c=e(10540),p=e.n(c),b=e(41113),k=e.n(b),w=e(4926),f={};f.styleTagTransform=k(),f.setAttributes=d(),f.insert=a().bind(null,"head"),f.domAPI=r(),f.insertStyleElement=p();o()(w.A,f);const u=w.A&&w.A.locals?w.A.locals:void 0;e.d(l,["default",0,u])}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[9299],{47374(e,t,n){n.d(t,{e:()=>p});var i=n(96540),s=n(61973),o=n(64694),a=n(34289),l=n(61443),r=n(75725),c=n(22022),d=n(85997),_=n(74848);function p(e){let t=(0,s.zy)();const[n,p]=(0,i.useState)([]),[f,h]=(0,i.useState)("/"),[u,m]=(0,i.useState)(void 0),{t:w,i18n:v}=(0,c.Bd)();i.useEffect(()=>{let t="",n=(0,a.vX)().split("/");n=n.filter(e=>e);const i=n.indexOf(e.baseRoute),s=[];if(-1!=i){t=(0,o.IO)(n.slice(0,i),e.baseRoute);const a=n.slice(i+1);for(let e=0;e<a.length;e++){const n=a[e];s.push({value:n,href:0===e?`${t}${n}/`:(0,o.IO)(s[e-1].href,n)})}h(t),p(s)}},[t]);const g=t=>{t.stopPropagation(),e.clickFun(t)};return(0,_.jsx)("div",{className:"breadcrumbs",onClick:e=>{m(void 0!==u?void 0:"")},children:(0,_.jsx)(i.Fragment,{children:void 0===u?(0,_.jsxs)(i.Fragment,{children:[(0,_.jsx)("span",{className:"chevron",children:(0,_.jsx)(s.N_,{to:f,onClick:g,children:(0,_.jsx)(d.In,{icon:"home"})})}),n.map((e,t)=>(0,_.jsxs)("span",{className:"chevron",children:[(0,_.jsx)(d.In,{icon:"keyboard_arrow_right"}),(0,_.jsx)(s.N_,{to:e.href,onClick:g,children:decodeURIComponent(e.value)})]},t))]}):(0,_.jsx)(r.QM,{click:()=>{m(void 0)},children:(0,_.jsx)(l.Sm,{width:"100%",placeholder:w("输入跳转的目录"),handlerEnter:t=>{e.input_path_enter&&e.input_path_enter(t),m(void 0)}})})})})}},77481(e,t,n){n.d(t,{S:()=>l,X:()=>a});var i=n(96540),s=n(61443),o=n(74848);function a(e){const[t,n]=i.useState([]),a=(0,i.useRef)(-1),[l,r]=(0,i.useState)(-1),[c,d]=(0,i.useState)(-1);(0,i.useEffect)(()=>{e.children?n(Array.isArray(e.children)?e.children:[e.children]):n(e.rows)},[e.rows,e.children]);const _=()=>{a.current=-1,r(-1),d(-1)};return(0,o.jsxs)("table",{children:[(0,o.jsx)("thead",{children:(0,o.jsx)("tr",{children:e.headers?.map((t,n)=>{const i=!!e.filter&&(e.filter.column??0)===n;let a=t;if(i){const n=e.filter,i=n.options.find(e=>e.value===n.value);null!=n.value&&i&&(a=`${t} (${i.label})`)}return(0,o.jsx)("th",{className:i?"table-filter-col":"",children:i?(0,o.jsx)(s.l6,{value:e.filter.value,options:e.filter.options,onChange:e.filter.onChange,bare:!0,trigger_label:a}):t},n)})})}),(0,o.jsx)("tbody",{children:t.map((t,n)=>{const i=!!e.onRowDrag;return(0,o.jsx)("tr",{className:i?(l===n?"row-dragging":"")+(c===n?" row-drop-target":""):"",draggable:i,onContextMenu:()=>{e.handleContextMenu&&e.handleContextMenu(t)},onDragStart:e=>{i&&(a.current=n,r(n),e.dataTransfer.effectAllowed="move")},onDragOver:e=>{!i||a.current<0||(e.preventDefault(),e.dataTransfer.dropEffect="move",d(n))},onDrop:t=>{i&&(t.preventDefault(),(()=>{const t=a.current,n=c;_(),t<0||n<0||t===n||e.onRowDrag?.(t,n)})())},onDragEnd:_,children:t.map((n,i)=>{const s=i===t.length-1?"small":"";return(0,o.jsx)("td",{className:s,style:{width:e.width??"auto"},children:n},i)})},n)})})]})}function l(e){return(0,o.jsx)("div",{style:{display:e.isFlex?"flex":"block"},children:e.columns.map((e,t)=>(0,o.jsx)("div",{children:e},t))})}},19299(e,t,n){n.r(t),n.d(t,{default:()=>q});var i=n(96540),s=n(47374),o=n(34843),a=n(82893),l=n(14284),r=n(61973),c=n(4412),d=n(89824),_=n(34289),p=n(53459),f=n(99214),h=n(61443),u=n(47022),m=n(62042),w=n(22022),v=n(7523),g=n(78247),x=n(88815),y=n(6960),j=n(47071),k=n(14944),G=n(92275),A=n(23430);var b=n(34251),C=n(60096),S=n(87361),M=n(76559),$=n(85997),z=n(77481),D=n(70447),N=n(74848);const P=500;function E(e){const{t}=(0,w.Bd)(),n=(0,r.Zp)(),[,s]=(0,o.fp)(a.AG.prompt_card),[l,c]=(0,i.useState)(""),[d,_]=(0,i.useState)(!1),[p,f]=(0,i.useState)([]),[u,m]=(0,i.useState)(0),[v,g]=(0,i.useState)(!1),x=(0,i.useMemo)(()=>new M.I(window.location.host,"file_deep_search"),[]),y=(0,i.useRef)(!1),j=decodeURIComponent(e.base_path);(0,i.useEffect)(()=>{let e=[],t=null;const n=()=>{if(t=null,y.current||!e.length)return;const n=e;e=[],m(e=>e+n.length),f(e=>e.length>=P?e:[...e,...n].slice(0,P))},i=()=>{y.current||_(!1)};return x.addMsg(G.HK.file_deep_search_data,i=>{y.current||(e.push(...i.context??[]),null===t&&(t=setTimeout(n,100)))}),x.addMsg(G.HK.file_deep_search_end,()=>{y.current||(n(),_(!1))}),x.on_message("close",i),()=>{y.current=!0,clearTimeout(t),x.sendData(G.HK.file_deep_search_cancel,{}).catch(()=>{}),x.off_message("close",i),x.close()}},[]);const k=()=>{const t=l.trim();if(!t||d)return;f([]),m(0),g(!0),_(!0);const n={param_path:e.base_path,keyword:t};x.sendData(G.HK.file_deep_search,n).catch(()=>{})},A=e=>{let t=e.is_dir?e.path:e.path.slice(0,e.path.lastIndexOf("/")+1);t.endsWith("/")||(t+="/"),s({open:!1}),n(S.o.file+t.split("/").map(encodeURIComponent).join("/"))};return(0,N.jsxs)("div",{className:"file-deep-search",children:[(0,N.jsxs)("div",{className:"file-deep-search__bar",children:[(0,N.jsx)(h.$Z,{icon:"search",value:l,placeholder:t("搜文件名"),handleInputChange:e=>c(e),handleEnterPress:k}),(0,N.jsx)("button",{className:"button button--flat",onClick:d?()=>{x.sendData(G.HK.file_deep_search_cancel,{}).catch(()=>{}),_(!1)}:k,children:t(d?"取消":"搜索")})]}),(0,N.jsxs)("div",{className:"file-deep-search__hint",children:[(0,N.jsxs)("span",{children:[t("范围"),":",j]}),u>0&&(0,N.jsx)("span",{className:"file-deep-search__count",children:u>P?`${t("已显示")} 500 / ${u}`:`${u}`})]}),(0,N.jsxs)("div",{className:"file-deep-search__body",children:[p.length>0&&(0,N.jsx)(z.X,{headers:[t("名称"),t("路径"),""],rows:p.map(e=>{const n=e.path.slice(0,e.path.lastIndexOf("/")+1);return[e.is_dir?(0,N.jsx)("span",{className:"file-deep-search__dir",children:e.name}):e.name,(0,N.jsx)(D.xP,{context:n}),(0,N.jsx)($.rA,{icon:"folder_open",title:t("打开所在目录"),onClick:()=>A(e)})]})}),d&&(0,N.jsxs)("div",{className:"file-deep-search__empty",children:[(0,N.jsx)("span",{className:"chat-session-running",title:t("搜索中")}),t("搜索中")]}),!d&&u>P&&(0,N.jsx)("div",{className:"file-deep-search__more",children:t("结果过多")}),!d&&0===p.length&&(0,N.jsx)("div",{className:"file-deep-search__empty",children:t(v?"无匹配":"输入后搜")})]})]})}var F=n(23496),I=n(12730),X=n(75725),R=n(40505);let K={};function H(){const{t:e}=(0,w.Bd)();let t=(0,r.zy)();const n=(0,r.Zp)(),{check_user_auth:s}=(0,g.MH)(),[c,p]=(0,o.fp)(a.AG.nowFileList),[h,x]=(0,o.fp)(a.AG.uploadFiles),[y,j]=(0,o.fp)(a.AG.showPrompt),[C,M]=(0,o.fp)(a.AG.selectedFileList),[z,P]=(0,o.fp)(a.AG.copyedFileList),[E,F]=(0,o.fp)(a.AG.cutedFileList),[R,H]=(0,o.fp)(a.AG.selectedFileList),[L,U]=(0,o.fp)(a.AG.clickFileList),[Y,B]=(0,o.fp)(a.AG.fileShellShow),[O]=(0,o.fp)(a.AG.current_mount),[Z,W]=(0,o.fp)(a.AG.file_root_list),[T,V]=(0,o.fp)(a.AG.file_root_index),[q,J]=(0,i.useState)(void 0),[Q,ee]=(0,i.useState)(""),[te,ne]=(0,o.fp)(a.AG.workflow_show),[ie,se]=(0,o.fp)(a.AG.workflow_realtime_show),[oe,ae]=(0,o.fp)(a.AG.work_flow_show),{initUserInfo:le}=(0,i.useContext)(v.F),[re,ce]=(0,o.fp)(a.AG.user_base_info),{click_file:de}=(0,f.kZ)(),[_e,pe]=(0,o.fp)(a.AG.prompt_card),fe=(0,i.useMemo)(()=>c.files.reduce((e,t)=>e+(t.type!==u.Iw.folder?1:0),0),[c]),he=(0,i.useMemo)(()=>c.files.reduce((e,t)=>e+(t.type===u.Iw.folder?1:0),0)+(c.folders?.length??0),[c]);function ue(e){(0,m.SK)(e)}(0,i.useEffect)(()=>{K={}},[t]),(0,i.useEffect)(()=>()=>{B({show:!1,path:""})},[]);const me=(0,f.Vs)(),we=t=>{pe({open:!0,title:e("信息"),context_div:(0,N.jsxs)("div",{style:{maxWidth:"25rem"},children:[(0,N.jsx)(X.Yh,{left:e("挂载位置磁盘"),right:t?.total_size}),(0,N.jsx)(X.Yh,{left:`${e("磁盘剩余")}`,right:t?.left_size}),(0,N.jsx)(X.Yh,{left:`${e("文件系统")}`,right:t?.fs_type}),(0,N.jsx)(X.Yh,{left:`${e("文件夹数")}`,right:he}),(0,N.jsx)(X.Yh,{left:`${e("文件数")}`,right:fe}),(0,N.jsx)(X.Yh,{left:`${e("当前位置")}`,right:(0,N.jsx)(D.xP,{context:t?.now_absolute_path})})]}),cancel:()=>{k.ws.removeMsg(G.HK.file_info)}})};return(0,N.jsxs)(i.Fragment,{children:[C.length>0&&(0,N.jsx)($.rA,{icon:"delete",title:e("删除"),onClick:()=>{j({show:!0,type:d.PromptEnum.FilesDelete,overlay:!0,data:{}})}}),C.length>0&&(0,N.jsx)($.rA,{icon:"content_copy",title:e("复制"),onClick:function(){const e=(0,f.ib)(c,C);P(e.map(e=>(0,f.Ok)(e.name))),F([]),ue("已复制")}}),C.length>0&&(0,N.jsx)($.rA,{icon:"content_cut",title:e("剪切"),onClick:function(){const e=(0,f.ib)(c,C);F(e.map(e=>(0,f.Ok)(e.name))),P([]),ue("已剪切")}}),(z.length>0||E.length>0)&&(0,N.jsx)($.rA,{onClick:function(){j({show:!0,type:d.PromptEnum.Confirm,overlay:!0,data:{}})},icon:"content_paste",title:e("粘贴到此处"),tip:z.length+E.length}),C.length>0&&(0,N.jsx)($.rA,{icon:"download",title:e("下载"),onClick:function(){const e=(0,f.ib)(c,C);for(let t=0;t<e.length;t++){const n=e[t];e[t]=encodeURIComponent((0,f.Ok)(n.name))}const t=l.$M.getDownloadUrl(e);window.open(t)}}),C.length>0&&(0,N.jsx)($.rA,{icon:"compress",title:e("压缩"),onClick:function(){const e=(0,f.ib)(c,C);for(let t=0;t<e.length;t++){const n=e[t];e[t]=(0,f.Ok)(n.name)}e&&0!==e.length?j({show:!0,type:d.PromptEnum.Compress,overlay:!0,data:{files:e}}):(0,m.zN)("没有选中")}}),1===C.length&&(0,N.jsx)($.rA,{icon:"edit_attributes",title:e("重命名"),onClick:function(){j({show:!0,type:d.PromptEnum.FileRename,overlay:!0,data:{}})}}),oe&&(0,N.jsx)($.rA,{icon:"api",title:"workflow",onClick:()=>{ne(!te)}}),!O&&(0,N.jsx)($.rA,{icon:"terminal",title:"shell",onClick:function(){Y.show?B({show:!1,path:""}):B({show:!0,path:(0,_.GG)("file",(0,_.vX)())})}}),s(A.oV.share_file)&&(0,N.jsx)($.rA,{icon:"share",title:e("文件分享"),onClick:()=>{n(`${S.o.share_list_setting_page}`)}}),(0,N.jsx)($.rA,{icon:"grid_view",title:e("切换样式"),onClick:me}),(0,N.jsx)($.rA,{icon:"create_new_folder",title:e("创建文件夹"),onClick:function(){j({show:!0,type:d.PromptEnum.DirNew,overlay:!0,data:{dir:(0,_.GG)("file",(0,_.vX)())}})}}),(0,N.jsx)($.rA,{icon:"note_add",title:e("创建文本文件"),onClick:function(){j({show:!0,type:d.PromptEnum.FileNew,overlay:!0,data:{dir:(0,_.GG)("file",(0,_.vX)())}})}}),(0,N.jsx)($.rA,{icon:"upload_file",title:e("上传"),onClick:()=>{j({show:!0,type:d.PromptEnum.UploadFile,overlay:!0,data:{call:e=>{let t=e.currentTarget?.files;if(!t)return;let n=!!t[0].webkitRelativePath;const i=[],s=new Set;for(let e=0;e<t.length;e++){const o=t[e],a=n?o.webkitRelativePath:`${o.webkitRelativePath}${o.name}`;o.fullPath=a,n&&s.add((0,I.S)(a)),i.push(o)}const o=[];if(n)for(const e of s)o.push({isDir:!0,fullPath:e,name:e});o.push(...i),x(o),j({show:!0,type:d.PromptEnum.FilesUpload,overlay:!1,data:{}})}}})}}),(0,N.jsx)($.rA,{icon:"info",title:e("信息"),onClick:async()=>{let e;if(!K.now_absolute_path){k.ws.addMsg(G.HK.file_info,t=>{const n=t.context;e&&(K={...K,...n},k.ws.removeMsg(G.HK.file_info),we(K))});const t=await k.ws.sendData(G.HK.file_info,{type:u.Iw.folder,path:(0,_.GG)("file",(0,_.vX)())});e=t.context,K=e,we(K)}we(K)}}),(0,N.jsx)($.rA,{icon:"more_vert",title:e("切换目录"),onClick:t=>{const i=new b.ik;i.x=t.clientX,i.y=t.clientY,i.type=u.Iw.directory,i.items=Z,i.item_pre_value=T,i.textClick=async t=>{if(-1===t)return n(`${S.o.setting_private_env_setting}`),j({data:void 0,overlay:!1,type:"",show:!1}),void(0,m.N9)(e("请配置 文件夹路径"));(async e=>{V(e),await l.$M.post("base_switch",{root_index:e}),await le(),n("/file/"),H([]),U([])})(t),j({data:void 0,overlay:!1,type:"",show:!1})},j({show:!0,type:d.PromptEnum.FileMenu,overlay:!1,data:i})}})]})}var L=n(2543),U=n(21499),Y=n(64694),B=n(17903);const O=i.lazy(()=>Promise.all([n.e(7856),n.e(6349),n.e(3659)]).then(n.bind(n,63659))),Z=i.lazy(()=>Promise.all([n.e(7856),n.e(1636)]).then(n.bind(n,81636))),W=i.lazy(()=>Promise.all([n.e(4946),n.e(2626),n.e(9334),n.e(4004)]).then(n.bind(n,95733)));let T,V="";function q(){const[e,t]=(0,o.fp)(a.AG.editorSetting),[,n]=(0,o.fp)(a.AG.md_editor),[,m]=(0,o.fp)(a.AG.log_viewer),[,M]=(0,o.fp)(a.AG.image_editor),[,z]=(0,o.fp)(a.AG.markdown),[,D]=(0,o.fp)(a.AG.excalidraw_editor),[,P]=(0,o.fp)(a.AG.mind_editor),[I,X]=(0,o.fp)(a.AG.file_preview),{t:K}=(0,w.Bd)();let q=(0,r.zy)();const J=(0,r.Zp)(),[Q,ee]=(0,o.fp)(a.AG.nowFileList),[te]=(0,o.fp)(a.AG.file_list_refresh),[ne]=(0,o.fp)(a.AG.mount_enabled),[ie,se]=(0,o.fp)(a.AG.current_mount),[oe,ae]=(0,o.fp)(a.AG.showPrompt),[le,re]=(0,o.fp)(a.AG.selectedFileList),[ce,de]=(0,o.fp)(a.AG.clickFileList),[_e,pe]=(0,o.fp)(a.AG.fileShellShow),[fe,he]=(0,i.useState)(""),[ue,me]=(0,o.fp)(a.AG.workflow_show),[we,ve]=(0,o.fp)(a.AG.workflow_realtime_show),[ge,xe]=(0,o.fp)(a.AG.work_flow_show),{initUserInfo:ye}=(0,i.useContext)(v.F),[je,ke]=(0,o.fp)(a.AG.user_base_info),{check_user_auth:Ge}=(0,g.MH)(),{click_file:Ae}=(0,f.kZ)(),[be]=(0,r.ok)(),Ce=(0,f._A)(),Se=i.useRef(null),[Me,$e]=(0,o.fp)(a.AG.to_running_files),[ze,De]=(0,o.fp)(a.AG.file_page),[Ne]=(0,o.fp)(a.AG.blank_search_mode),[,Pe]=(0,o.fp)(a.AG.prompt_card),[Ee,Fe]=(0,o.fp)(a.AG.blank_search_mode_for_temp),Ie=(0,f.oT)(),Xe="1"===be.get("chat_open"),Re=Ge(A.oV.ai_agent_page);(0,i.useEffect)(()=>{je?.user_data&&Xe&&!Re&&Ie("chat_open",null)},[Xe,Re,je]);const[Ke,He]=(0,o.fp)(a.AG.studio_chat_width),Le=i.useRef(null),[Ue,Ye]=(0,i.useState)(!1),[Be,Oe]=(0,i.useState)(void 0),Ze=(0,f.dN)(),[We,Te]=(0,o.fp)(a.AG.ai_chat_session_by_cwd),Ve=function(){const[e,t]=(0,o.fp)(a.AG.user_base_info),{t:n}=(0,w.Bd)(),{check_user_auth:s}=(0,g.MH)(),[c,p]=(0,o.fp)(a.AG.router_jump),h=(0,r.Zp)(),{initUserInfo:m}=(0,i.useContext)(v.F),[x,y]=(0,o.fp)(a.AG.nowFileList),[j,C]=(0,o.fp)(a.AG.showPrompt),[M,$]=(0,o.fp)(a.AG.fileShellShow),[z,D]=(0,o.fp)(a.AG.blank_search_mode);return t=>{t.preventDefault(),t.stopPropagation();const i=new b.ik;i.x=t.clientX,i.y=t.clientY,i.type=u.Iw.directory;const o=[{r:(0,N.jsx)("span",{style:(0,R.ok)(e.user_data.dir_show_type===A.t8.time_minx_max),children:n("时间逆序")}),v:A.t8.time_minx_max},{r:(0,N.jsx)("span",{style:(0,R.ok)(e.user_data.dir_show_type===A.t8.time_max_min),children:n("时间顺序")}),v:A.t8.time_max_min}],a=[{r:(0,N.jsx)("span",{style:(0,R.ok)(e.user_data.dir_show_type===A.t8.size_min_max),children:n("大小顺序")}),v:A.t8.size_min_max},{r:(0,N.jsx)("span",{style:(0,R.ok)(e.user_data.dir_show_type===A.t8.size_max_min),children:n("大小逆序")}),v:A.t8.size_max_min}],r=[{r:(0,N.jsx)("span",{style:(0,R.ok)(!e.user_data.file_list_pagination_mode||e.user_data.file_list_pagination_mode===A.yM.all),children:n("全部加载文件")}),v:A.yM.all},{r:(0,N.jsx)("span",{style:(0,R.ok)(e.user_data.file_list_pagination_mode===A.yM.pagination),children:n("scrll_l")}),v:A.yM.pagination}],c=[{r:(0,N.jsx)("span",{style:(0,R.ok)(!e.user_data.file_time_show_type||e.user_data.file_time_show_type===A.KD.current),children:n("最近时间")}),v:A.KD.current},{r:(0,N.jsx)("span",{style:(0,R.ok)(e.user_data.file_time_show_type===A.KD.time),children:n("准确时间")}),v:A.KD.time}],w=[{r:n("文件列表展示"),items:[{r:n("文件排序"),v:"",items:[{r:(0,N.jsx)("span",{style:(0,R.ok)(!e.user_data.dir_show_type),children:n("系统默认")}),v:A.t8.defualt},{r:(0,N.jsx)("span",{style:(0,R.ok)(e.user_data.dir_show_type===A.t8.name),children:n("名字")}),v:A.t8.name},{r:(0,N.jsx)("span",{style:(0,R.ok)(e.user_data.dir_show_type===A.t8.time_minx_max||e.user_data.dir_show_type===A.t8.time_max_min),children:n("修改时间")}),v:!1,items:o},{r:(0,N.jsx)("span",{style:(0,R.ok)(e.user_data.dir_show_type===A.t8.size_min_max||e.user_data.dir_show_type===A.t8.size_max_min),children:n("文件大小")}),v:!1,items:a}]},{r:n("文件加载方式"),v:"",items:r},{r:n("时间展示"),v:"",items:c},{r:n("缩放调整"),v:"zoom_adjust"},{r:(0,N.jsx)("span",{style:(0,R.ok)(z),children:n("srchbln")}),v:"blank_search_mode"}]}];x?.folders?.find(e=>".git"===e.name)&&w.push({r:n("查看Git提交"),v:"git_page"}),s(A.oV.code_resource)&&w.push({r:n("add_rot"),v:"code_resource"}),s(A.oV.http_proxy)&&w.push({r:n("dl_here"),v:"http_resource"}),e?.user_data?.quick_cmd&&(0,f.LL)([...e.user_data.quick_cmd],w),i.items=w,i.textClick=async e=>{if(console.log(e),!1===e)return;const t={};if("gcfg_dir_config"===e){const e=(0,_.GG)("file",(0,_.vX)());return C({data:void 0,overlay:!1,type:"",show:!1}),void h(`${S.o.gcfg_page}/${encodeURIComponent(e)}`)}if("git_page"===e){const e=(0,_.GG)("file",(0,_.vX)());return C({data:void 0,overlay:!1,type:"",show:!1}),void h(`${S.o.git_page}/${encodeURIComponent(e)}`)}if("code_resource"===e){const e=await k.ws.sendData(G.HK.file_info,{path:(0,_.GG)("file",(0,_.vX)())});return p({page_self_router_api_data:[`/api/${Date.now()}`,e.context.now_absolute_path]}),C({data:void 0,overlay:!1,type:"",show:!1}),void h("/setting/customer_router/")}if("http_resource"===e){const e=await k.ws.sendData(G.HK.file_info,{path:(0,_.GG)("file",(0,_.vX)())});return p({http_download_map_path:e.context.now_absolute_path}),C({data:void 0,overlay:!1,type:"",show:!1}),void h("/proxy/http/")}if("zoom_adjust"===e)return C({data:void 0,overlay:!1,type:"",show:!1}),void setTimeout(()=>{C({show:!0,type:d.PromptEnum.ZoomAdjust,overlay:!1,data:{}})},0);if("object"==typeof e&&"quick_cmd"===e.tag){let t=e.cmd;t&&(t.endsWith("\r")||(t+="\r",$({show:!0,path:(0,_.GG)("file",(0,_.vX)()),cmd:t})))}else{if("blank_search_mode"===e)return D(!z),void C({data:void 0,overlay:!1,type:"",show:!1});if(e===A.yM.all||e===A.yM.pagination)t.is_pagination_mode=!0;else if(e===A.KD.current||e===A.KD.time)t.is_file_show_type=!0;else{if(e!==A.t8.defualt&&e!==A.t8.name&&e!==A.t8.size_max_min&&e!==A.t8.size_min_max&&e!==A.t8.time_max_min&&e!==A.t8.time_minx_max)return;t.is_dir_list_type=!0}}await l.wm.post(F.s.user_save_private_attr,{type:e,...t}),await m(),C({data:void 0,overlay:!1,type:"",show:!1}),h((0,_.vX)())},C({show:!0,type:d.PromptEnum.FileMenu,overlay:!1,data:i})}}(),qe=async()=>{const e=new j.Nd;e.dir_path=`${(0,_.GG)("file",(0,_.vX)())}`,k.ws.addMsg(G.HK.workflow_realtime,e=>{const t=e.context;if(e.context){for(const e of t.sucess_file_list)(0,f.Ys)(e);for(const e of t.failed_file_list)(0,f.V$)(e);$e(new Set(t.running_file_list))}}),await k.ws.sendData(G.HK.workflow_realtime,e)},Je=async e=>{let t=!1;for(const n of e.files??[])n.origin_size=n.size,n.size=(0,x.v7)(n.size),je.user_data.file_time_show_type===A.KD.time?n.show_mtime=n.mtime?(0,U.Yq)(n.mtime):"":n.show_mtime=n.mtime?(0,y.s)(n.mtime):"",t||!n.name.endsWith(".workflow.yml")&&!n.name.endsWith(".act")||(t=!0,Promise.resolve().then(()=>{qe()})),n.name===j.SB&&(t=!0);for(const n of e.folders??[])je.user_data.file_time_show_type===A.KD.time?n.show_mtime=n.mtime?(0,U.Yq)(n.mtime):"":n.show_mtime=n.mtime?(0,y.s)(n.mtime):"",n.name===j.SB&&(t=!0);xe(t)},Qe=i.useRef(null),et=async e=>{if(!0===ne){if(Qe.current!==e){Qe.current=e;try{const t=await l.$M.post("file/mount_info",{param_path:e});se(t?.data??null)}catch(e){se(null)}}}else se(null)},tt=async()=>{const e=(0,_.GG)("file",(0,_.vX)());if(Ne||Ee)return;let t;if(et(e),je.user_data.file_list_pagination_mode===A.yM.pagination){if(V!==e){if(V=e,1!==ze.page_num)return void De({page_size:ze.page_size,page_num:1})}else if(ze.page_num<0)return;if(t=await l.$M.post("file_get_page",{param_path:e,page_num:ze.page_num,page_size:ze.page_size}),t.code!==p.m.Success)return;const n=t.data;return Je(n),n.files?.length?(ee(e=>{const t=(0,L.cloneDeep)(1===ze.page_num?n.files:[...e?.files??[],...n.files]),i={...e,files:t};return(0,f.yC)(i,je.user_data.dir_show_type),i}),void(T=t.data)):void De({page_size:ze.page_size,page_num:-1})}if(t=await l.$M.get(e),t.code!==p.m.Success)return;const n=t.data;(0,f.yC)(n,je.user_data.dir_show_type),Je(t.data),ee(t.data),T=t.data};(0,i.useEffect)(()=>async()=>{$e(new Set)},[]);const nt=()=>{xe(!1),(()=>{const e=be.get("preview_file_name"),t=be.get("preview_mode");if(!e||!t)return!1;const i=(0,_.GG)("file",(0,_.vX)());if(Se.current===i+e)return!0;Se.current=i+e;const s=()=>Ce(null);return"md"===t?(n({url:l.$M.getDownloadUrl(`${encodeURIComponent(i)}${e}`),path:`${i}${e}`,name:e,close:s}),!0):"log"===t?(m({show:!0,fileName:e,encoding:be.get("preview_log_enc")??"utf8",wrap:be.get("preview_log_wrap")??"wrap",close:s}),!0):"image_edit"===t?(M({path:(0,Y.IO)((0,_.vX)(),e),name:e,close:s}),!0):(Ae({name:e,opt_shell:!0,..."text"===t?{model:"text"}:{},close:s}),!0)})()||(t({open:!1}),X({open:!1}),n({}),m({show:!1}),M({}),z({}),D({}),P({}),tt())};(0,i.useEffect)(()=>{nt()},[q,ze]),(0,i.useEffect)(()=>{te>0&&tt()},[te]);const it=i.useRef(!1);(0,i.useEffect)(()=>{if(null!==ne)return it.current?void(!0===ne?et((0,_.GG)("file",(0,_.vX)())):se(null)):(it.current=!0,void(!0===ne&&null===ie&&et((0,_.GG)("file",(0,_.vX)()))))},[ne]);const st=e=>{e.target===e.currentTarget&&(re([]),de([]))},ot=i.useCallback((0,L.throttle)(e=>{const t=Le.current;if(!t||!t.parentElement)return;const n=parseFloat(getComputedStyle(t).fontSize),i=t.parentElement.getBoundingClientRect(),s=i.right-e.clientX,o=Math.min(Math.max(s,320),.7*i.width);He(parseFloat((o/n).toFixed(2)))},32),[]),at=()=>{Ye(!1),document.removeEventListener("pointermove",ot)},lt=(0,N.jsxs)("div",{className:"file-list-main",children:[(0,N.jsx)(s.e,{baseRoute:"file",clickFun:function(){if(re([]),de([]),je.user_data.file_list_pagination_mode===A.yM.pagination){const e=document.getElementById("listing");e&&(e.scrollTop=0),De({page_size:ze.page_size,page_num:1})}},input_path_enter:e=>{var t;re([]),de([]),ee({files:[],folders:[]}),!function(e){return"string"==typeof e&&0!==e.length&&(/^[a-zA-Z]:[\\\/]/.test(e)||/^\\\\[^\\/]+[\\/]/.test(e)||/^\//.test(e))}(e)?J(function(e,t){let n=function(e){let t="\\";for(const n of e)if("/"===n||"\\"===n){t=n;break}return t}(e);if("."===t)return e;if(".."===t){if(e.length>1){let t=e[e.length-1]===n?1:0;for(let i=e.length-1-t;i>=0;i--)if(e[i]===n)return e.substring(0,i+1)}return e}return e.endsWith(n)&&t.startsWith(n)?e.slice(0,-1)+t:e.endsWith(n)||t.startsWith(n)?e+t:e+n+t}((0,_.vX)(),e)):(e=e.replace(0===(t=je.user_data).folder_item_now||void 0===t.folder_item_now?t.cwd:t.folder_items[t.folder_item_now-1].path,""),J(e))}}),ie&&(0,N.jsxs)("div",{className:"mount-tip-bar",style:{borderLeftColor:ie.color},children:[(0,N.jsx)("span",{className:"material-icons",style:{color:ie.color},children:"cloud"}),(0,N.jsx)("span",{children:[ie.credential_note,ie.account_note||(B.C1.find(e=>e.value===ie.driver)?.title??ie.driver),ie.name].filter(Boolean).join(" - ")}),ie.readonly&&(0,N.jsx)("span",{className:"mount-readonly-tag",children:K("只读")})]}),je.user_data.file_list_pagination_mode===A.yM.pagination?(0,N.jsx)(C.$J,{handleContextMenu:Ve,clickBlank:st,list:Q.files}):(0,N.jsx)(C.t$,{handleContextMenu:Ve,file_list:Q.files,folder_list:Q.folders,clickBlank:st})]});return(0,N.jsxs)(i.Fragment,{children:[(0,N.jsx)(c.aZ,{children:(0,N.jsx)(h.$Z,{handleEnterPress:async()=>{if(Ne||Ee){if(re([]),de([]),!fe||!fe.trim())return void ee({files:[],folders:[]});const e=(0,_.GG)("file",(0,_.vX)()),t=await l.$M.post("file_get_page",{param_path:e,page_num:1,page_size:1e4,search:fe.trim()});if(t.code!==p.m.Success)return;const n=t.data;return(0,f.yC)(n,je.user_data.dir_show_type),Je(n),ee(n),void(T=n)}if(!T)return;re([]),de([]);const e=[],t=[];for(const t of T.files??[])t.name.includes(fe)&&e.push(t);for(const e of T.folders??[])e.name.includes(fe)&&t.push(e);ee({files:e,folders:t})},placeholder:K("搜索当前目录"),icon:"search",value:"",mobile_hidden:!0,handleIconClick:()=>{const e=(0,_.GG)("file",(0,_.vX)());Pe({open:!0,title:K("深搜"),context_div:(0,N.jsx)(E,{base_path:e})})},handleInputChange:e=>{he(e)},max_width:"25em"})}),(0,N.jsxs)(c.aZ,{position:"right",children:[Ge(A.oV.ai_agent_page)&&(0,N.jsx)($.rA,{icon:"smart_toy",title:K("AI 聊天"),selected:Xe,onClick:()=>Ie("chat_open",!Xe?"1":null)}),(0,N.jsx)("div",{className:"mobile-context-btn",children:(0,N.jsx)($.rA,{icon:"more_horiz",title:K("右键"),onClick:()=>{const e=le[le.length-1];if(void 0!==e){const t=[...Q.folders??[],...Q.files??[]][e];if(t){const n=document.querySelectorAll(".item")[e],i=n?n.getBoundingClientRect():{left:window.innerWidth/2,bottom:100},s={preventDefault:()=>{},stopPropagation:()=>{},clientX:i.left+10,clientY:i.bottom??100},o=new b.ik;o.path=(0,Y.IO)((0,_.vX)(),t.name),o.filename=t.name,o.x=s.clientX,o.y=s.clientY,o.type=t.type===u.Iw.folder?u.Iw.folder:(0,b.uL)(t.name),o.size=t.origin_size,ae({show:!0,type:d.PromptEnum.FileMenu,overlay:!1,data:o})}}else{const e={preventDefault:()=>{},stopPropagation:()=>{},clientX:window.innerWidth/2,clientY:window.innerHeight/2};Ve(e)}}})}),(0,N.jsx)(H,{})]}),(0,N.jsxs)("div",{className:"file-list-split"+(Xe?" file-list-split--chat":""),children:[lt,Xe&&(0,N.jsxs)(i.Fragment,{children:[(0,N.jsx)("div",{className:"studio__divider studio__divider--chat",ref:Le,onPointerDown:e=>{e.preventDefault(),Ye(!0),document.addEventListener("pointermove",ot),document.addEventListener("pointerup",at,{once:!0})}}),(0,N.jsx)("div",{className:"studio-chat-panel",style:{width:`${Ke}em`},children:(0,N.jsx)(i.Suspense,{fallback:null,children:(0,N.jsx)(W,{inline_header:!0,sync_url:!1,file_cwd_path:Ze(),session_id:Be??(rt=Ze(),a.AG.get_ai_chat_session(We,rt)),on_session_change:e=>{Oe(e),((e,t)=>{Te({...We,[e]:t})})(Ze(),e)}})})})]})]}),Ue&&(0,N.jsx)("div",{className:"shell__overlay",onPointerUp:at}),ue&&(0,N.jsx)(O,{}),we.open&&(0,N.jsx)(Z,{})]});var rt}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[9334],{89117(t,e,n){n.d(e,{Hm:()=>s,U6:()=>c});const r=["mermaid","svg"];function s(t){return r.includes(t)}let o=null;let i=0;async function a(t){const e=t.trim();if(!e)return{svg:"",error:null};const r=await(o||(o=n.e(2300).then(n.bind(n,62300)).then(t=>{const e=t.default;return e.initialize({startOnLoad:!1,securityLevel:"loose",theme:"default",fontFamily:"inherit",suppressErrorRendering:!0}),e})),o),s="md-mermaid-"+ ++i;try{const{svg:t}=await r.render(s,e);return{svg:t,error:null}}catch(t){return document.getElementById(s)?.remove(),document.getElementById(`d${s}`)?.remove(),{svg:"",error:t?.message??String(t)}}}async function c(t,e){return"svg"===t?function(t){const e=t.trim();if(!e)return{svg:"",error:null};const n=(new DOMParser).parseFromString(e,"image/svg+xml").querySelector("parsererror");return n?{svg:"",error:n.textContent?.trim()||"SVG 解析失败"}:{svg:e,error:null}}(e):a(e)}},41105(t,e,n){n.d(e,{KR:()=>u,Ne:()=>c,op:()=>b,pC:()=>a,sL:()=>d});var r=n(14284),s=n(19878),o=n(89117),i=n(86063);function a(t){return btoa(unescape(encodeURIComponent(t)))}function c(t){return decodeURIComponent(escape(atob(t)))}let l="";function d(t){l=t||""}function u(t){if(/^(https?:|data:|blob:|\/\/|\/)/i.test(t))return t;const e=t.replace(/^\.\//,"");return r.$M.getDownloadUrl(l+e)}const h=new Set(["a","abbr","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","li","mark","ol","p","pre","q","s","samp","small","span","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","u","ul","var","wbr"]),m=new Set(["align","alt","border","cellpadding","cellspacing","class","colspan","height","href","id","rowspan","src","style","target","title","valign","width"]);function p(t){const e=(new DOMParser).parseFromString(`<div>${t}</div>`,"text/html").body.firstElementChild,n=document.createDocumentFragment();if(!e)return n;const r=(t,e)=>{t.childNodes.forEach(t=>{if(t.nodeType===Node.TEXT_NODE)return void e.appendChild(document.createTextNode(t.textContent??""));if(t.nodeType!==Node.ELEMENT_NODE)return;const n=t;if(!h.has(n.tagName.toLowerCase()))return void r(n,e);const s=document.createElement(n.tagName.toLowerCase());for(const t of Array.from(n.attributes)){const e=t.name.toLowerCase();e.startsWith("on")||(m.has(e)||e.startsWith("data-"))&&("href"!==e&&"src"!==e||!/^\s*javascript:/i.test(t.value))&&("src"!==e?s.setAttribute(e,t.value):s.setAttribute(e,u(t.value)))}r(n,s),e.appendChild(s)})};return r(e,n),n}class f{dom;node;view;get_pos;render_box;source_box;source_input;source_hl;source_hl_code;mode="preview";draft=null;constructor(t,e,n){this.node=t,this.view=e,this.get_pos=n,this.dom=document.createElement("div"),this.dom.className="md-html-block",this.dom.setAttribute("data-mode","preview"),this.render_box=document.createElement("div"),this.render_box.className="md-html-block__render",this.source_box=document.createElement("div"),this.source_box.className="md-html-block__source",this.source_input=document.createElement("textarea"),this.source_input.className="md-html-block__input",this.source_input.setAttribute("spellcheck","false"),this.source_input.setAttribute("wrap","off"),this.source_hl=document.createElement("pre"),this.source_hl.className="md-html-block__highlight",this.source_hl.setAttribute("aria-hidden","true");const r=document.createElement("code");this.source_hl.appendChild(r),this.source_hl_code=r,this.source_box.append(this.source_hl,this.source_input);const s=document.createElement("span");s.className="md-html-block__toggle",s.setAttribute("contenteditable","false"),s.textContent="HTML",s.addEventListener("mousedown",t=>{t.preventDefault(),t.stopPropagation(),this.toggle_mode()}),this.source_input.addEventListener("blur",()=>this.commit()),this.source_input.addEventListener("keydown",t=>{"Escape"===t.key&&(t.preventDefault(),this.draft=null,this.toggle_mode()),t.stopPropagation()}),this.source_input.addEventListener("input",()=>{this.draft=this.source_input.value,this.paint_highlight(),this.source_hl.scrollLeft=this.source_input.scrollLeft}),this.source_hl.addEventListener("scroll",()=>{this.source_input.scrollLeft=this.source_hl.scrollLeft});for(const t of["beforeinput","paste","input","keyup","keypress"])this.source_input.addEventListener(t,t=>t.stopPropagation());this.dom.append(this.render_box,this.source_box,s),this.render_box.replaceChildren(p(t.attrs.value)),this.set_source_value(t.attrs.value)}set_source_value(t){this.source_input.value=t,this.paint_highlight()}paint_highlight(){const t=this.source_input.value;this.source_hl_code.innerHTML=s.A.highlight(t+"\n",{language:"xml",ignoreIllegals:!0}).value}toggle_mode(){if("source"===this.mode)return this.commit(),this.mode="preview",void this.dom.setAttribute("data-mode","preview");this.mode="source",this.dom.setAttribute("data-mode","source"),this.set_source_value(this.node.attrs.value),this.draft=null,this.source_input.focus()}commit(){if(null===this.draft)return;const t=this.draft;if(this.draft=null,t===this.node.attrs.value)return;const e=this.get_pos(),n=this.view.state.doc.nodeAt(e);n&&this.view.dispatch(this.view.state.tr.setNodeMarkup(e,void 0,{...n.attrs,value:t}))}update(t){return t.type===this.node.type&&(this.node=t,null===this.draft&&(this.render_box.replaceChildren(p(t.attrs.value)),"preview"===this.mode&&this.set_source_value(t.attrs.value)),!0)}stopEvent(t){return this.dom.contains(t.target)}ignoreMutation(){return!0}}class g{dom;node;view;get_pos;constructor(t,e,n){this.node=t,this.view=e,this.get_pos=n,this.dom=document.createElement("span"),this.dom.className="md-html-inline",this.dom.setAttribute("contenteditable","true"),this.dom.textContent=t.attrs.value,this.dom.addEventListener("blur",()=>this.commit());for(const t of["beforeinput","paste","input"])this.dom.addEventListener(t,t=>t.stopPropagation())}commit(){const t=this.dom.textContent??"";if(t===this.node.attrs.value)return;const e=this.get_pos(),n=this.view.state.doc.nodeAt(e);n&&this.view.dispatch(this.view.state.tr.setNodeMarkup(e,void 0,{...n.attrs,value:t}))}update(t){return t.type===this.node.type&&(this.node=t,!0)}stopEvent(t){return this.dom.contains(t.target)}ignoreMutation(){return!0}}function _(t){const e=t.split(/[?#]/)[0].toLowerCase();return e.endsWith(".mermaid")?"mermaid":e.endsWith(".mind")?"mind":null}class v{dom;node;kind;src;mind_unmount=null;constructor(t){this.node=t,this.src=t.attrs.src,this.kind=_(this.src),this.dom=this.kind?this.build_graph():this.build_image()}build_image(){const t=document.createElement("img");t.src=u(this.src),t.alt=this.node.attrs.alt??"";const e=this.node.attrs.title;return e&&(t.title=e),t}build_graph(){const t=document.createElement("span");t.className="md-graph md-graph--file",t.setAttribute("contenteditable","false");const e=document.createElement("span");return e.className="md-graph__body",t.append(e),this.render_graph_body(e),t}render_graph_body(t){const e=u(this.src);t.textContent="loading",fetch(e).then(t=>t.text()).then(async e=>{if(!this.dom.isConnected)return;if("mermaid"===this.kind){const n=await(0,o.U6)("mermaid",e);if(!t.isConnected)return;return n.error?(this.dom.classList.add("md-graph--error"),void(t.textContent=n.error)):void(t.innerHTML=n.svg)}const n=await(0,i.Hn)(e);if(!this.dom.isConnected)return;this.dom.classList.add("md-graph--mind"),t.remove(),this.dom.textContent="";const r=await n.mount(this.dom);this.mind_unmount=()=>r.destroy()}).catch(()=>{t.isConnected&&(this.dom.classList.add("md-graph--error"),t.textContent="load failed")})}update(t){if(t.type!==this.node.type)return!1;this.node=t;const e=t.attrs.src;if(e!==this.src){this.destroy_instance(),this.src=e,this.kind=_(e);const t=this.kind?this.build_graph():this.build_image();this.dom.replaceWith(t),this.dom=t}else if(!this.kind){const e=this.dom;e.alt=t.attrs.alt??"";const n=t.attrs.title;n&&(e.title=n)}return!0}destroy_instance(){this.mind_unmount?.(),this.mind_unmount=null}destroy(){this.destroy_instance()}stopEvent(t){return!!this.kind&&this.dom.contains(t.target)}ignoreMutation(){return!0}}function b(){return{html_block:(t,e,n)=>new f(t,e,n),html_inline:(t,e,n)=>new g(t,e,n),image:t=>new v(t)}}},89334(t,e,n){n.d(e,{Rh:()=>p,V:()=>a,lG:()=>o,rg:()=>f,z$:()=>u});var r=n(41105);n(6704);const s=["math","latex","katex"];function o(t){return s.includes(t.toLowerCase())}const i=[{open:"$$",close:"$$",mode:"block"},{open:"\\[",close:"\\]",mode:"block"},{open:"\\(",close:"\\)",mode:"inline"},{open:"$",close:"$",mode:"inline"}];function a(t){const e=t.trim();if(!e)return null;for(const t of i){if(e.length<=t.open.length+t.close.length)continue;if(!e.startsWith(t.open)||!e.endsWith(t.close))continue;const n=e.slice(t.open.length,e.length-t.close.length);if(("$"!==t.open||!e.startsWith("$$"))&&n.trim())return{tex:n,mode:t.mode,raw:e}}return null}let c=null;const l=new Map;async function d(t,e){const r=t.trim();if(!r)return{html:"",error:null};const s=`${e}\0${r}`,o=l.get(s);if(o)return o;let i;try{const{renderToString:t}=await(c||(c=n.e(2130).then(n.bind(n,99749))),c);i={html:t(r,{displayMode:"block"===e,throwOnError:!1,strict:!1,trust:!1,output:"html"}),error:null}}catch(t){i={html:"",error:t?.message??String(t)}}return l.size>=500&&l.clear(),l.set(s,i),i}async function u(t,e,n,r){const s=await d(e,n);if(t.isConnected){if(t.classList.remove("md-math--loading","md-math--error"),s.error)return t.classList.add("md-math--error"),t.textContent=r,void(t.title=s.error);t.innerHTML=s.html}}function h(t,e){const n=t.pos,r=t.src;if(r.startsWith("$$",n))return!1;const s=[{open:"\\(",close:"\\)"},{open:"$",close:"$"}];for(const o of s){if(!r.startsWith(o.open,n))continue;const s=n+o.open.length,i=r.indexOf(o.close,s);if(i<0)continue;const a=r.slice(s,i);if(a.trim()){if("$"===o.open){const t=r[i+1];if(void 0!==t&&/\d/.test(t))continue}if(!e){const e=t.push("math_inline","span",0);e.content=a,e.markup=o.open,e.meta={raw:r.slice(n,i+o.close.length)}}return t.pos=i+o.close.length,!0}}return!1}function m(t,e,n,r){const s=t.bMarks[e]+t.tShift[e],o=t.eMarks[e],i=t.src.slice(s,o).trim(),a=[{open:"\\[",close:"\\]"},{open:"$$",close:"$$"}];for(const o of a){if(!i.startsWith(o.open))continue;if(i.endsWith(o.close)&&i.length>o.open.length+o.close.length){if(r)return!0;const n=t.push("math_block","div",0);return n.content=i.slice(o.open.length,i.length-o.close.length),n.markup=o.open,n.meta={raw:i},n.map=[e,e+1],t.line=e+1,!0}const a=i.slice(o.open.length);for(let i=e+1;i<n;i++){const n=t.bMarks[i]+t.tShift[i],c=t.eMarks[i],l=t.src.slice(n,c);if(!l.trimEnd().endsWith(o.close))continue;if(r)return!0;const d=[];a.trim()&&d.push(a),t.getLines(e+1,i,t.tShift[e],!1).split("\n").forEach(t=>d.push(t)),d.push(l.trimEnd().slice(0,-o.close.length));const u=t.push("math_block","div",0);return u.content=d.join("\n").trim(),u.markup=o.open,u.meta={raw:t.src.slice(s,t.eMarks[i]).trimEnd()},u.map=[e,i+1],t.line=i+1,!0}}return!1}function p(t,e){t.inline.ruler.before("escape","math_inline",h),t.block.ruler.before("fence","math_block",m,{alt:["paragraph","reference","blockquote","list"]}),t.renderer.rules.math_inline=(t,n)=>`<span data-math-inline="${e(t[n].meta.raw)}"></span>`,t.renderer.rules.math_block=(t,n)=>`<div data-math-block="${e(t[n].meta.raw)}"></div>`;const n=t.renderer.rules.fence||function(t,e,n,r,s){return s.renderToken(t,e,n)};t.renderer.rules.fence=(t,r,s,i,a)=>o(t[r].info.trim())?`<div data-math-block="${e(`$$\n${t[r].content.trim()}\n$$`)}"></div>`:n(t,r,s,i,a)}async function f(t){const e=t.querySelectorAll("[data-math-inline], [data-math-block]");for(const t of Array.from(e)){const e=t.getAttribute("data-math-inline"),n=t.getAttribute("data-math-block"),s=e??n;if(null===s)continue;const o=a((0,r.Ne)(s));if(!o)continue;const i=null!==e?"inline":"block";t.classList.add("md-math","block"===i?"md-math--block":"md-math--inline"),await u(t,o.tex,i,o.raw)}}},86063(t,e,n){function r(t){return"smm-mind"===t}n.d(e,{Hn:()=>d,hj:()=>r,tW:()=>i});const s={mousewheelMoveStep:35,scaleRatio:.08};let o=null;function i(t){return t&&"object"==typeof t?t.data?.nodeData?a(t.data.nodeData):t.root&&"object"==typeof t.root?t.root.data?t.root:c(t.root):t.data&&"object"==typeof t.data?t:c(t):null}function a(t){return{data:{text:"string"==typeof t?.topic?t.topic:"string"==typeof t?.data?.text?t.data.text:""},children:Array.isArray(t?.children)?t.children.map(a):[]}}function c(t){return{data:{text:"string"==typeof t?.text?t.text:"",...t?.note?{note:t.note}:{}},children:Array.isArray(t?.children)?t.children.map(c):[]}}function l(t){t.stopPropagation()}async function d(t){const e=function(t){const e=t.trim();if(!e)return null;let n=null;try{n=JSON.parse(e)}catch{return null}return i(n)}(t),r=await(o||(o=Promise.all([n.e(1417).then(n.bind(n,21417)),n.e(8781).then(n.bind(n,88781))]).then(([t])=>t.default)),o);return{data:e,async mount(t,n){let o=!1;const i=await function(t,e){return new Promise(n=>{const r=()=>{e()?n(!1):t.isConnected&&t.clientWidth&&t.clientHeight?n(!0):window.setTimeout(r,16)};r()})}(t,()=>o);if(!i)return{destroy:()=>{},get_data:()=>null};const a=document.createElement("div");a.className="md-graph__mind-host",!1!==n?.release_wheel&&t.addEventListener("wheel",l,{capture:!0,passive:!0}),t.append(a);const c=new r({el:a,data:e??{data:{text:""}},readonly:!n?.editable,fit:!0,...s});return{destroy:()=>{o=!0,t.removeEventListener("wheel",l,{capture:!0}),c?.destroy?.()},get_data:()=>c?.getData?.(!1)}}}}n.d(e,["k$",0,s])}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[9546],{75007(e,t,s){s.d(t,{h:()=>r});s(96540);var n=s(85997),i=s(74848);function r(e){return(0,i.jsxs)("h2",{className:"message",children:[(0,i.jsx)(n.In,{icon:"sentiment_dissatisfied"}),(0,i.jsx)("span",{children:e.context})]})}},22081(e,t,s){s.d(t,{A:()=>o});var n=s(96540),i=s(16349),r=s(74848);const o=({percentage:e})=>{const t=(0,n.useRef)(null),[s,o]=(0,n.useState)(null);return(0,n.useEffect)(()=>{const s=t.current.getContext("2d"),n=new i.Ay(s,{type:"doughnut",data:{labels:["use","left"],datasets:[{data:[e,100-e],backgroundColor:["#007bff","#f0f0f0"],borderWidth:0}]},options:{plugins:{legend:{display:!1},tooltip:{enabled:!1}},elements:{arc:{borderWidth:0}}}});return o(n),()=>{n.destroy()}},[]),(0,n.useEffect)(()=>{s&&(s.data.datasets[0].data=[e,100-e],s.update())},[e]),(0,r.jsx)("div",{style:{width:"8rem",overflow:"hidden"},children:(0,r.jsx)("canvas",{ref:t})})}},77481(e,t,s){s.d(t,{S:()=>c,X:()=>o});var n=s(96540),i=s(61443),r=s(74848);function o(e){const[t,s]=n.useState([]),o=(0,n.useRef)(-1),[c,l]=(0,n.useState)(-1),[a,d]=(0,n.useState)(-1);(0,n.useEffect)(()=>{e.children?s(Array.isArray(e.children)?e.children:[e.children]):s(e.rows)},[e.rows,e.children]);const u=()=>{o.current=-1,l(-1),d(-1)};return(0,r.jsxs)("table",{children:[(0,r.jsx)("thead",{children:(0,r.jsx)("tr",{children:e.headers?.map((t,s)=>{const n=!!e.filter&&(e.filter.column??0)===s;let o=t;if(n){const s=e.filter,n=s.options.find(e=>e.value===s.value);null!=s.value&&n&&(o=`${t} (${n.label})`)}return(0,r.jsx)("th",{className:n?"table-filter-col":"",children:n?(0,r.jsx)(i.l6,{value:e.filter.value,options:e.filter.options,onChange:e.filter.onChange,bare:!0,trigger_label:o}):t},s)})})}),(0,r.jsx)("tbody",{children:t.map((t,s)=>{const n=!!e.onRowDrag;return(0,r.jsx)("tr",{className:n?(c===s?"row-dragging":"")+(a===s?" row-drop-target":""):"",draggable:n,onContextMenu:()=>{e.handleContextMenu&&e.handleContextMenu(t)},onDragStart:e=>{n&&(o.current=s,l(s),e.dataTransfer.effectAllowed="move")},onDragOver:e=>{!n||o.current<0||(e.preventDefault(),e.dataTransfer.dropEffect="move",d(s))},onDrop:t=>{n&&(t.preventDefault(),(()=>{const t=o.current,s=a;u(),t<0||s<0||t===s||e.onRowDrag?.(t,s)})())},onDragEnd:u,children:t.map((s,n)=>{const i=n===t.length-1?"small":"";return(0,r.jsx)("td",{className:i,style:{width:e.width??"auto"},children:s},n)})},s)})})]})}function c(e){return(0,r.jsx)("div",{style:{display:e.isFlex?"flex":"block"},children:e.columns.map((e,t)=>(0,r.jsx)("div",{children:e},t))})}},88062(e,t,s){s.d(t,{A:()=>o});s(96540),s(47022);var n=s(74848);function i(e){return(0,n.jsx)("div",{className:"black-tip",onClick:()=>{e.click&&e.click(e)},onContextMenu:t=>{t.stopPropagation(),t.nativeEvent.stopImmediatePropagation(),e.onContextMenu&&e.onContextMenu(t,e)},children:e.name})}const r=e=>(0,n.jsxs)("li",{children:[e.click?(0,n.jsx)(i,{...e.node,name:e.render?e.render(e.node):e.node.name,click:e.click,onContextMenu:e.onContextMenu}):(0,n.jsx)("div",{children:e.render?e.render(e.node):e.node.name}),e.node.children&&e.node.children.length>0&&(0,n.jsx)("ul",{children:e.node.children.map((t,s)=>(0,n.jsx)(r,{node:t,click:e.click,onContextMenu:e.onContextMenu,render:e.render},s))})]}),o=e=>(0,n.jsx)("div",{className:"card-tree-view",children:(0,n.jsx)("ul",{children:e.list&&e.list.map((t,s)=>(0,n.jsx)(r,{node:t,click:e.click,onContextMenu:e.onContextMenu,render:e.render},s))})})},59546(e,t,s){s.r(t),s.d(t,{default:()=>le});var n=s(96540),i=s(75725),r=s(70447),o=s(22081),c=s(92275),l=s(14944),a=s(14284),d=s(4412),u=s(85997),h=s(77481),x=s(53459),p=s(22022),m=s(34843),j=s(82893),f=s(74777),_=s(62042),g=s(61443),w=s(74848);function y(e){const{t}=(0,p.Bd)(),[s,o]=(0,m.fp)(j.AG.disk),[c,l]=(0,n.useState)({}),[f,_]=(0,n.useState)([]),g=[t("名字"),t("当前值"),t("历史最低"),t("临界值")];return(0,n.useEffect)(()=>{(async()=>{const s=await a.Yu.post("sys/disk/info",{name:e.name});if(s.code===x.m.Success){const e=[];for(const n of s.data.ata_smart_attributes??[]){let s;n[1]>=n[2]?s="var(--icon-green)":n[1]<=n[3]&&(s="var(--icon-red)"),n[0]=(0,w.jsx)("span",{style:{color:s},children:t(n[0])}),e.push(n)}_(s.data.ata_smart_attributes),l(s.data)}})()},[]),(0,w.jsxs)("div",{children:[(0,w.jsx)(d.aZ,{position:"right",children:(0,w.jsx)(u.rA,{icon:"close",title:t("关闭"),onClick:()=>{o({})}})}),(0,w.jsx)(i.jW,{isFull:!0,more:!0,children:(0,w.jsx)(i.NN,{children:(0,w.jsxs)(i.fI,{children:[(0,w.jsxs)(i.VP,{widthPer:30,children:[(0,w.jsx)(i.xh,{children:(0,w.jsxs)(r.Zp,{title:t("基本信息"),children:[(0,w.jsx)(i.Yh,{left:t("名字"),right:e.name}),(0,w.jsx)(i.Yh,{left:t("厂商名称"),right:e.typeName}),(0,w.jsx)(i.Yh,{left:t("类型"),right:e.type}),(0,w.jsx)(i.Yh,{left:t("容量"),right:e.total})]})}),(0,w.jsx)(i.xh,{children:(0,w.jsxs)(r.Zp,{title:t("物理信息"),children:[(0,w.jsx)(i.Yh,{left:t("是否健康"),right:!0===c.smart_status?"是":"否"}),(0,w.jsx)(i.Yh,{left:t("设备型号"),right:c.model_name}),(0,w.jsx)(i.Yh,{left:t("序列号"),right:c.serial_number}),(0,w.jsx)(i.Yh,{left:t("固件版本"),right:c.firmware_version}),(0,w.jsx)(i.Yh,{left:t("转速(每分钟)"),right:c.rotation_rate}),(0,w.jsx)(i.Yh,{left:t("通电时长(小时)"),right:c.power_on_time_hours}),(0,w.jsx)(i.Yh,{left:t("通电次数"),right:c.power_cycle_count}),(0,w.jsx)(i.Yh,{left:t("温度(°C)"),right:c.temperature}),(0,w.jsx)(i.Yh,{left:t("通信协议"),right:c.device_protocol})]})})]}),(0,w.jsx)(i.VP,{widthPer:50,children:(0,w.jsxs)(i.xh,{children:[f?.length?(0,w.jsx)(r.uF,{title:t("ATA/SATA详细信息"),children:(0,w.jsx)(h.X,{headers:g,rows:f,width:"10rem"})}):(0,w.jsx)(w.Fragment,{}),c.nvme_smart?(0,w.jsxs)(r.Zp,{title:t("NVME详细信息"),children:[(0,w.jsx)(i.Yh,{left:t("NVMe 可用备用块(%)"),right:c.nvme_smart.available_spare}),(0,w.jsx)(i.Yh,{left:t("NVMe 已使用寿命(%)"),right:c.nvme_smart.percentage_used}),(0,w.jsx)(i.Yh,{left:t("NVMe 读取量"),right:c.nvme_smart.data_units_read}),(0,w.jsx)(i.Yh,{left:t("NVMe 写入量"),right:c.nvme_smart.data_units_written}),(0,w.jsx)(i.Yh,{left:t("NVMe 通电次数"),right:c.nvme_smart.power_cycles}),(0,w.jsx)(i.Yh,{left:t("NVMe 通电时长(小时)"),right:c.nvme_smart.power_on_hours}),(0,w.jsx)(i.Yh,{left:t("NVMe 非正常关机"),right:c.nvme_smart.unsafe_shutdowns}),(0,w.jsx)(i.Yh,{left:t("NVMe 媒体错误"),right:c.nvme_smart.media_errors}),(0,w.jsx)(i.Yh,{left:t("NVMe 错误日志数"),right:c.nvme_smart.num_err_log_entries})]}):(0,w.jsx)(w.Fragment,{})]})})]})})})]})}let v=function(e){return e[e.mount=0]="mount",e}({});var k=s(88062),S=s(78247),b=s(23430),C=s(99214);const A=e=>(0,w.jsxs)("div",{style:{border:"2px solid black",padding:"10px",width:"300px",height:"300px",position:"relative"},children:[e.name,e.lvms.map((e,t)=>(0,w.jsx)("div",{style:{margin:"5px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid "},children:e.name},t))]});function P(){return(0,w.jsx)("div",{style:{position:"relative",height:"300px",margin:"10px",width:"30px",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,w.jsx)("div",{style:{width:0,height:0,borderTop:"10px solid transparent",borderBottom:"10px solid transparent",borderLeft:"10px solid black"}})})}function V(){const{t:e}=(0,p.Bd)(),[t,s]=(0,m.fp)(j.AG.disk),[o,c]=(0,n.useState)({}),[l,f]=(0,n.useState)([]),[g,y]=(0,n.useState)([]),[V,Y]=(0,m.fp)(j.AG.showPrompt),{check_user_auth:$}=(0,S.MH)(),[F,I]=(0,n.useState)([]),{click_file:M}=(0,C.kZ)(),[N,E]=(0,m.fp)(j.AG.prompt_card),K=[e("挂载点"),"uuid",e("类型"),e("文件系统类型"),e("文件系统容量"),e("卷容量"),e("设备路径"),e("分区表类型")],B=async()=>{const e=await a.Yu.get("disk/blk");return e.code===x.m.Success&&f(e.data),e.code};(0,n.useEffect)(()=>{(async()=>{B()})()},[]);const H=[(0,w.jsx)(u.rA,{icon:"info",title:e("提示"),onClick:async()=>{E({open:!0,title:"信息",context_div:(0,w.jsx)("div",{children:(0,w.jsxs)("ul",{children:[(0,w.jsxs)("li",{children:["通用格式:","<文件系统> <挂载点> <类型> <挂载选项> <dump> <fsck> "]}),(0,w.jsxs)("li",{children:["文件系统,有多种格式",(0,w.jsxs)("ul",{children:[(0,w.jsx)("li",{children:"1(usb口默认名称)./dev/sda1"}),(0,w.jsx)("li",{children:"2(唯一Id).UUID=123e4567-e89b-12d3-a456-426614174000"}),(0,w.jsx)("li",{children:"3.LABEL=DATA"})]})]}),(0,w.jsx)("li",{children:"挂载点,就是文件路径,例如 /mnt/data ,这个目录要提前创建,且为空"}),(0,w.jsx)("li",{children:"类型,就是文件系统类型,对于系统不支持的类型,例如ntfs需要额外前提安装ntfs-3g(linux 5.15内核以后自带 ntfs)"}),(0,w.jsxs)("li",{children:['挂载选项的值只能是以下这些,可以用 "," 同时使用多个选项',(0,w.jsxs)("ul",{children:[(0,w.jsx)("li",{children:"defaults:使用默认挂载选项"}),(0,w.jsx)("li",{children:"noatime:不更新访问时间,提高性能"}),(0,w.jsx)("li",{children:"auto:系统启动时自动挂载"}),(0,w.jsx)("li",{children:"rw:以读写方式挂载"}),(0,w.jsx)("li",{children:"nofail:防止启动阻塞,挂载失败系统继续执行"}),(0,w.jsx)("li",{children:"...等"})]})]}),(0,w.jsx)("li",{children:"dump 0是需要备份 1是不需要备份"}),(0,w.jsx)("li",{children:"Fsck 整数值0是不检查,文件系统检查顺序越小越先检查"}),(0,w.jsx)("li",{children:"提示:只有含有文件系统的逻辑卷,或者分区才可以进行挂载。"})]})})})}}),(0,w.jsx)(u.rA,{icon:"update",title:e("更新挂载"),onClick:async()=>{(await a.Yu.post("cmd/exe",{type:v.mount})).code===x.m.Success&&(0,_.SK)("挂载文件已生效")}},1)],Z=async()=>(await a.Yu.get("get_fstab")).data,G=async e=>{await a.Yu.post("save_fstab",{content:e})};return(0,w.jsxs)("div",{children:[(0,w.jsx)(d.aZ,{position:"right",children:(0,w.jsx)(u.rA,{icon:"close",title:e("关闭"),onClick:()=>{s({})}})}),(0,w.jsx)(i.jW,{isFull:!0,more:!0,children:(0,w.jsx)(i.NN,{children:(0,w.jsxs)(i.fI,{children:[(0,w.jsx)(i.VP,{widthPer:40,children:(0,w.jsxs)(r.Zp,{title:e("物理块(硬盘)设备、逻辑卷、物理卷"),titleCom:(0,w.jsxs)("div",{children:[$(b.oV.sys_disk_mount)&&(0,w.jsx)(u.rA,{icon:"file_open",title:e("打开挂载文件"),onClick:async()=>{M({name:"fstab(谨慎修改,内容错误会导致系统无法启动)",model:"text",get_file_fun:Z,save_file_fun:G,menu_list:H})}}),(0,w.jsx)(u.rA,{icon:"update",title:e("刷新"),onClick:async()=>{await B()===x.m.Success&&(0,_.SK)("刷新成功")}})]}),children:[(0,w.jsx)(h.X,{headers:K,rows:g,width:"10rem"}),(0,w.jsx)(k.A,{list:l,render:e=>{let t=e.name;return e.label&&(t+=`(${e.label})`),e.mountpoint?(0,w.jsxs)("span",{children:[t,(0,w.jsx)("span",{style:{color:"green"},children:"(已挂载)"})]}):t},onContextMenu:(e,t)=>{e.preventDefault()},click:t=>{let s="";if(t.mountpoint)for(let e=0;e<t.mountpoints.length;e++)s+=t.mountpoints[e]+";";y([[(0,w.jsx)(r.xP,{children:s}),(0,w.jsx)(r.xP,{children:t.uuid}),e(t.type),e(t.fstype),t.fssize,t.size,(0,w.jsx)(r.xP,{children:t.path}),t.pttype]])}})]})}),(0,w.jsx)(i.VP,{widthPer:60,children:F.map((t,s)=>{const n=[];for(const e of t.pv_list)n.push({name:`${e.name}---(${e.size})---(${e.free_size})`});const o=[];for(const e of t.lv_list)o.push({name:`${e.name}---(${e.size})`});return(0,w.jsx)(r.Zp,{children:(0,w.jsxs)(i.n5,{children:[(0,w.jsx)(A,{name:e("物理卷"),lvms:n}),(0,w.jsx)(P,{}),(0,w.jsx)(A,{name:`${e("逻辑卷")}---(${t.name})---size(${t.size})`,lvms:[]}),(0,w.jsx)(P,{}),(0,w.jsx)(A,{name:e("逻辑卷"),lvms:o})]})},s)})})]})})})]})}var Y=s(88815);let $=!0;function F(e){const{t}=(0,p.Bd)(),s=[t("名字"),t("厂商名称"),t("类型"),t("容量")],g=[t("名字"),t("物理硬盘"),t("文件系统类型"),t("挂载位置"),t("总容量"),t("剩余容量")],[v,k]=(0,m.fp)(j.AG.user_base_info),[S,C]=(0,n.useState)(0),[A,P]=(0,n.useState)(0),[F,I]=(0,n.useState)(0),[M,N]=(0,n.useState)(0),[E,K]=(0,n.useState)(0),[B,H]=(0,n.useState)({}),[Z,G]=(0,n.useState)(!1),[D,z]=(0,n.useState)(!1),[W,T]=(0,n.useState)(!1),[X,U]=(0,n.useState)($),[q,L]=(0,n.useState)(null),[R,O]=(0,n.useState)([]),[J,Q]=(0,n.useState)([]),[ee,te]=(0,m.fp)(j.AG.user_base_info),[se,ne]=(0,m.fp)(j.AG.disk),ie=async()=>{if(!$)return;const e=new c.hf(c.HK.sys_get);await l.ws.send(e),l.ws.addMsg(c.HK.sys_getting,e=>{N(e.context?.cpu_currentLoad);const t=e.context?.memLeft,s=e.context?.memTotal;P(t),I(s),C((s-t)/s*100),L(e.context?.node_memory_usage),K(e.context?.node_cpu_usage)})};return(0,n.useEffect)(()=>((async()=>{await ie()})(),()=>{l.ws.sendData(c.HK.sys_cancel,{})}),[]),(0,w.jsxs)("div",{children:[(0,w.jsxs)(d.aZ,{position:"right",children:[v.sys===b.XM.linux&&(0,w.jsx)(u.rA,{icon:"sd_card",title:"硬盘挂载",onClick:()=>{ne({type:"mount"})}}),(0,w.jsx)(u.Z$,{defaultStatus:!1,text:t("基本信息"),clickFun:e=>{G(e),e&&(async()=>{const e=await a.Yu.get("base");if(e.code===x.m.Success){const t=e.data;H(t)}})()}}),(0,w.jsx)(u.Z$,{defaultStatus:!1,text:t("物理硬盘"),clickFun:e=>{z(e),e&&(async()=>{const e=await a.Yu.get("disk");if(e.code===x.m.Success){const s=e.data,n=[];let i=!0;ee.sysSoftWare&&ee.sysSoftWare[f.jk.smartmontools]&&ee.sysSoftWare[f.jk.smartmontools].installed||(i=!1);for(const e of s??[])n.push([(0,w.jsx)(r.xP,{context:e.name}),e.typeName,e.type,e.total,(0,w.jsx)(u.rA,{icon:"health_and_safety",title:t("查看健康信息"),onClick:()=>{i?ne({type:"check",data:e}):(0,_.zN)("没有安装smartmontools")}})]);O(n)}})()}}),(0,w.jsx)(u.Z$,{defaultStatus:!1,text:t("文件硬盘"),clickFun:e=>{T(e),e&&(async()=>{const e=await a.Yu.get("filedisk");if(e.code===x.m.Success){const t=e.data,s=[];for(const e of t??[])s.push([(0,w.jsx)(r.xP,{context:e.name}),(0,w.jsx)(r.xP,{context:e.device_name}),e.fsType,(0,w.jsx)(r.xP,{context:e.mount}),e.total,e.available]);Q(s)}})()}}),(0,w.jsx)(u.Z$,{defaultStatus:X,text:t("实时信息"),clickFun:e=>{U(e),$=e,ie()}})]}),(0,w.jsxs)(i.xh,{children:[X&&(0,w.jsxs)(i.fI,{children:[(0,w.jsx)(i.VP,{widthPer:33,maxWidth:"30rem",children:(0,w.jsx)(r.Zp,{title:"Sys "+t("内存"),children:(0,w.jsxs)(i.fI,{children:[(0,w.jsx)(i.VP,{children:(0,w.jsx)(o.A,{percentage:S})}),(0,w.jsx)(i.VP,{children:(0,w.jsxs)(i.fI,{children:[(0,w.jsx)(i.VP,{widthPer:100,children:(0,w.jsx)("div",{children:(0,w.jsx)(i.Yh,{left:t("总容量"),center:`${F}G`})})}),(0,w.jsx)(i.VP,{widthPer:100,children:(0,w.jsx)(i.Yh,{left:t("剩余"),center:`${A}G`})})]})})]})})}),(0,w.jsx)(i.VP,{widthPer:33,maxWidth:"30rem",children:(0,w.jsx)(r.Zp,{title:"Sys cpu",children:(0,w.jsxs)(i.fI,{children:[(0,w.jsx)(i.VP,{children:(0,w.jsx)(o.A,{percentage:M})}),(0,w.jsx)(i.VP,{children:(0,w.jsx)(i.fI,{children:(0,w.jsx)(i.Yh,{left:t("使用率"),center:M})})})]})})}),(0,w.jsx)(i.VP,{widthPer:33,maxWidth:"30rem",children:(0,w.jsx)(r.Zp,{title:"FileCat",children:(0,w.jsxs)(i.fI,{children:[(0,w.jsxs)(i.VP,{children:[(0,w.jsx)(i.qV,{content:t("内存")}),(0,w.jsx)(i.qV,{content:"total: "+(0,Y.v7)(q?.rss)}),(0,w.jsx)(i.qV,{content:"object: "+(0,Y.v7)(q?.heapTotal)}),(0,w.jsx)(i.qV,{content:"obj-use: "+(0,Y.v7)(q?.heapUsed)}),(0,w.jsx)(i.qV,{content:"external: "+(0,Y.v7)(q?.external)}),(0,w.jsx)(i.qV,{content:"buffer: "+(0,Y.v7)(q?.arrayBuffers)})]}),(0,w.jsx)(i.VP,{children:(0,w.jsx)(i.qV,{content:"cpu growth rate: "+E})})]})})})]}),(0,w.jsxs)(i.fI,{children:[Z&&(0,w.jsx)(i.VP,{children:(0,w.jsxs)(r.Zp,{title:t("基本信息"),children:[(0,w.jsx)(i.Yh,{left:t("总内存"),right:B.mem_total}),(0,w.jsx)(i.Yh,{left:`cpu ${t("制造商")}`,right:B.cpu_manufacturer}),(0,w.jsx)(i.Yh,{left:`cpu ${t("品牌")}`,right:B.cpu_brand}),(0,w.jsx)(i.Yh,{left:`cpu ${t("逻辑核心")}`,right:B.cpu_core_num}),(0,w.jsx)(i.Yh,{left:`cpu ${t("物理核心")}`,right:B.cpu_phy_core_num}),(0,w.jsx)(i.Yh,{left:`cpu ${t("最大")}hz`,right:B.cpu_speed_hz}),(0,w.jsx)(i.Yh,{left:`${t("当前系统")}:pid;ppid`,right:B.pid_ppid}),(0,w.jsx)(i.Yh,{left:t("运行用户"),right:B.user})]})}),D&&(0,w.jsx)(i.VP,{children:(0,w.jsx)(r.uF,{title:t("物理硬盘"),children:(0,w.jsx)(h.X,{headers:s,rows:R,width:"10rem"})})}),W&&(0,w.jsx)(i.VP,{children:(0,w.jsx)(r.uF,{title:t("文件硬盘"),children:(0,w.jsx)(h.X,{headers:g,rows:J,width:"10rem"})})})]})]}),se&&"check"===se.type&&(0,w.jsx)(y,{...se.data}),se&&"mount"===se.type&&(0,w.jsx)(V,{})]})}var I=s(75007),M=s(97856),N=s(64405);const E=n.lazy(()=>Promise.all([s.e(4924),s.e(5614)]).then(s.bind(s,85614)));function K(e){const[t,s]=(0,n.useState)(null),[i,r]=(0,m.fp)(j.AG.dockerShellShow),[o,a]=(0,m.fp)(j.AG.user_base_info),d=o.user_data.theme?.includes("dark")?"#FFFFFF":"#000000",u=()=>{(async()=>{t&&(t.writeln("[38;2;29;153;243mclose![0m "),t.dispose(),s(null))})()};(0,n.useEffect)(()=>{i.show?(async()=>{const e=new M.Terminal({fontFamily:"Monaco, Menlo, Consolas, 'Courier New', monospace",theme:{background:"#FFFFFF",foreground:d,cursor:d,selectionBackground:"#a6d2ff"},cursorBlink:!0,cursorStyle:"bar",scrollback:1e3,scrollSensitivity:1,tabStopWidth:4,convertEol:!0});let t;l.ws.subscribeUnconnect(u);const n=t=>{e.write(t)};t=s=>{e.clear(),e.write(s),t=n},l.ws.addMsg("logs"===i.type?c.HK.docker_shell_logs_getting:c.HK.docker_shell_exec_getting,e=>{"error"===e.context&&u(),t(e.context)}),"exec"===i.type&&e.onData(async e=>{const t=new c.hf(c.HK.docker_shell_exec);t.context=e,await l.ws.send(t)}),s(e)})():u()},[i]),(0,n.useEffect)(()=>()=>{u()},[]);return(0,w.jsx)(E,{show:i.show,terminal:t,init:(e,s)=>{t.writeln("[38;2;29;153;243mconnect...[0m ");const n=new N.n;let r;n.rows=e,n.cols=s,n.dockerId=i.dockerId,r="logs"===i.type?new c.hf(c.HK.docker_shell_logs):new c.hf(c.HK.docker_shell_exec_open),r.context=n,l.ws.send(r)}})}var B=s(83529),H=s(52671),Z=s(87361);let G="",D=[],z=!1;function W(e){const{t}=(0,p.Bd)(),s=(0,H.Zp)(),[o]=(0,m.fp)(j.AG.user_base_info),[f,y]=(0,n.useState)({}),[v,k]=(0,n.useState)([]),[C,A]=(0,n.useState)([]),{check_user_auth:P}=(0,S.MH)(),[V,Y]=(0,m.fp)(j.AG.dockerShellShow),[$,F]=(0,m.fp)(j.AG.showPrompt),[M,N]=(0,m.fp)(j.AG.confirm),[E,W]=(0,n.useState)(G),[T,X]=(0,n.useState)(["id",t("名字"),t("镜像"),t("命令"),t("状态"),t("内存"),"cpu%",t("选择")]),[U,q]=(0,n.useState)([]),[L,R]=(0,n.useState)(void 0),[O,J]=(0,n.useState)(!1),Q=["id",t("name"),t("create时间"),t("大小"),(0,w.jsxs)("span",{children:["选中",(0,w.jsx)(u.rA,{icon:"check_box",title:"全选",onClick:()=>{z=!z;const e={};for(let t=0;t<C.length&&z;t++)e[C[t][0].props.context]=1;y(e)}})]})],ee=async()=>{k([]),q([]);const e=new c.hf(c.HK.docker_get);await l.ws.send(e),l.ws.addMsg(c.HK.docker_getting,e=>{const t=[];if(G){for(const s of e.context)for(const e of s)if(`${e}`.includes(G)){t.push(s);break}}else t.push(...e.context);k(t.map(e=>{const t=e.map(e=>(0,w.jsx)(r.xP,{context:e}));return t.push((0,w.jsx)(u.rA,{icon:"place",title:"选中",onClick:()=>{q(t)}})),t}))})};(0,n.useEffect)(()=>(W(G),ee(),()=>{(async()=>{Y({show:!1,type:"",dockerId:""})})()}),[]),(0,n.useEffect)(()=>{G=E},[E]);const te=()=>{const e=new c.hf("logs"===V.type?c.HK.docker_shell_logs_cancel:c.HK.docker_shell_exec_cancel);e.context="",l.ws.send(e)},se=e=>{const t=new c.hf(c.HK.docker_switch);t.context={type:e,dockerId:U[0].props.context},q([]),l.ws.send(t)},ne=async()=>{const e=await a.Yu.get("docker/images");if(e.code===x.m.Success){const t=e.data??[],s=[];for(let e=0;e<t.length;e++){const n=t[e],i=[(0,w.jsx)(r.xP,{context:n[0]}),(0,w.jsx)(r.xP,{context:n[1]}),n[2],n[3],""];s.push(i)}D=s,A(s)}};return(0,w.jsxs)("div",{children:[(0,w.jsx)(d.aZ,{children:(0,w.jsx)(u.Z$,{defaultStatus:!1,text:t("doc_img"),clickFun:e=>{J(e),e?(ne(),q([])):(ee(),A([]),y({}))}})}),(0,w.jsxs)(d.aZ,{position:"right",children:[o.sys===b.XM.linux&&(0,w.jsx)(u.rA,{icon:"settings",title:t("doc_cfg"),onClick:()=>s(Z.o.docker_setting_page)}),Object.keys(f).length>0&&(0,w.jsx)(u.rA,{icon:"delete",title:t("删除镜像"),onClick:async()=>{N({open:!0,title:t("doc_icf"),handle:async()=>{const e=Object.keys(f),t=await a.Yu.post("docker/check/delete",{ids:e});if(t.code===x.m.Success)if(0===t.data.length){(await a.Yu.post("docker/delete",{ids:e})).code===x.m.Success&&((0,_.SK)("删除完成"),ne(),N({open:!1,handle:null}))}else(0,_.N9)(`有镜像正在运行${JSON.stringify(t.data)}`)}})}}),U.length>0&&(0,w.jsx)("div",{children:U[1].props.context}),U.length>0&&(0,w.jsxs)("div",{children:[P(b.oV.docker_container_update)&&(0,w.jsx)(u.rA,{icon:"delete",title:t("删除容器"),onClick:()=>{F({show:!0,overlay:!0,type:B.PromptEnum.DockerDel,data:{dockerId:U[0].props.context,name:U[1].props.context}})}}),(0,w.jsx)(u.rA,{icon:"print",title:t("打印日志"),onClick:()=>{V.show?(Y({show:!1,type:"",dockerId:""}),te()):Y({show:!0,dockerId:U[0].props.context,type:"logs"})}}),P(b.oV.docker_container_update)&&(0,w.jsx)(u.rA,{icon:"personal_video",title:t("执行命令"),onClick:()=>{V.show?(Y({show:!1,type:"",dockerId:""}),te()):Y({show:!0,dockerId:U[0].props.context,type:"exec"})}}),P(b.oV.docker_container_update)&&U[4].props.context.includes("Up")&&(0,w.jsx)(u.rA,{icon:"stop",title:t("停止"),onClick:()=>se("stop")}),P(b.oV.docker_container_update)&&!U[4].props.context.includes("Up")&&(0,w.jsx)(u.rA,{icon:"play_arrow",title:t("开启"),onClick:()=>{se("start")}})]}),(0!==v.length||E)&&!O&&(0,w.jsx)(u.rA,{icon:"refresh",title:t("列表更新"),onClick:async()=>{const e=new c.hf(c.HK.docker_get);await l.ws.send(e)}})]}),(0,w.jsxs)(i.xh,{children:[O&&(0,w.jsx)(i.fI,{children:(0,w.jsx)(i.VP,{widthPer:80,children:(0,w.jsx)(r.uF,{title:`${t("镜像")} (${C.length})`,titleCom:(0,w.jsx)(g.Sm,{placeholder:t("过滤镜像"),value:L,handleInputChange:e=>{R(e)},handlerEnter:()=>{const e=[];if(L){for(const t of C)(t[0].props.context.includes(L)||t[1].props.context.includes(L))&&e.push(t);A(e)}else A(D)}}),children:(0,w.jsx)(h.X,{headers:Q,rows:C.map((e,s)=>(e[4]=(0,w.jsx)(g.GL,{context:t(""),selected:f[e[0].props.context],onchange:()=>{(e=>{const t={};Object.assign(t,f),t[e]?delete t[e]:t[e]=1,y(t)})(e[0].props.context)}}),e)),width:"10rem"})})})}),0===v.length&&!E&&!O&&(0,w.jsx)(I.h,{context:t("dc_nne")}),(0!==v.length||E)&&!O&&(0,w.jsx)(i.fI,{children:(0,w.jsx)(i.VP,{widthPer:80,children:(0,w.jsx)(r.uF,{title:`${t("容器")} (${v.length})`,titleCom:(0,w.jsx)(g.Sm,{placeholder:t("过滤"),value:E,handleInputChange:e=>{W(e)}}),children:(0,w.jsx)(h.X,{headers:T,rows:v,width:"10rem"})})})})]}),(0,w.jsx)(K,{})]})}var T=s(64694);let X="",U=!1,q=!1;function L(e){const{t}=(0,p.Bd)(),[s,o]=(0,n.useState)([]),[a,x]=(0,n.useState)([]),[m,j]=(0,n.useState)(0),[f,_]=(0,n.useState)(""),[y,v]=(0,n.useState)(["pid",t("名字"),t("创建用户"),(0,w.jsxs)("span",{children:[t("内存"),(0,w.jsx)(u.rA,{icon:"sort",title:t("升序"),onClick:()=>{U=!U}})]}),(0,w.jsxs)("span",{children:["cpu%",(0,w.jsx)(u.rA,{icon:"sort",title:t("升序"),onClick:()=>{q=!q}})]}),t("选择")]),{check_user_auth:k}=(0,S.MH)();(0,n.useEffect)(()=>{_(X),(async()=>{o([]),j(0),x([]);const e=new c.hf(c.HK.process_get);await l.ws.send(e),l.ws.addMsg(c.HK.process_getting,e=>{const s=[];if(X){for(const t of e.context)for(const e of t)if(`${e}`.includes(X)){s.push(t);break}}else s.push(...e.context);U&&(0,T.di)(s,e=>e[3],!1),q&&(0,T.di)(s,e=>e[4],!1);const n=s.map(e=>{const s=e.map((e,t)=>(0,w.jsx)(r.xP,{context:3===t?(0,Y.v7)(e):e}));return s.push((0,w.jsx)(u.rA,{icon:"place",title:t("选中"),onClick:()=>{x(s)}})),s});j(s.length),o(n)})})()},[]),(0,n.useEffect)(()=>{X=f},[f]);return(0,w.jsxs)("div",{children:[(0,w.jsxs)(d.aZ,{position:"right",children:[a.length>0&&(0,w.jsx)("div",{children:a[1].props.context}),a.length>0&&k(b.oV.sys_process_close)&&(0,w.jsx)("div",{children:(0,w.jsx)(u.rA,{icon:"stop",title:t("停止"),onClick:()=>{const e=new c.hf(c.HK.process_close);e.context={pid:a[0].props.context},x([]),l.ws.send(e)}})})]}),(0,w.jsx)(i.xh,{children:0!==s.length||X?(0,w.jsx)(i.fI,{children:(0,w.jsx)(i.VP,{widthPer:80,children:(0,w.jsx)(r.uF,{title:`${t("进程")} (${m})`,titleCom:(0,w.jsx)(g.Sm,{placeholder:t("过滤"),value:f,handleInputChange:e=>{_(e)}}),children:(0,w.jsx)(h.X,{headers:y,rows:s,width:"10rem"})})})}):(0,w.jsx)(I.h,{context:t("ld_wait")})})]})}const R=n.lazy(()=>Promise.all([s.e(4924),s.e(5614)]).then(s.bind(s,85614)));function O(e){const[t,s]=(0,n.useState)(null),[i,r]=(0,m.fp)(j.AG.systemd_shell_show),[o,a]=(0,m.fp)(j.AG.user_base_info),d=o.user_data.theme?.includes("dark")?"#FFFFFF":"#000000",u=()=>{(async()=>{t&&(t.writeln("[38;2;29;153;243mclose![0m "),t.dispose(),s(null))})()};(0,n.useEffect)(()=>{if(!i.show)return void u();(async()=>{const e=new M.Terminal({fontFamily:"Monaco, Menlo, Consolas, 'Courier New', monospace",theme:{background:"#FFFFFF",foreground:d,cursor:d,selectionBackground:"#a6d2ff"},cursorBlink:!0,cursorStyle:"bar",scrollback:1e3,scrollSensitivity:1,tabStopWidth:4,convertEol:!0});l.ws.subscribeUnconnect(u),l.ws.addMsg(c.HK.systemd_logs_getting,t=>{"error"===t.context&&u(),e.write(t.context)}),s(e)})();const e=e=>{};return document.addEventListener("cancel_systemd_logs",e),()=>{document.removeEventListener("cancel_systemd_logs",e)}},[i]),(0,n.useEffect)(()=>()=>{u()},[]);return(0,w.jsx)(R,{show:i.show,terminal:t,init:(e,s)=>{t.writeln("[38;2;29;153;243mconnect...[0m ");const n={unit_name:i.unit_name},r=new c.hf(c.HK.systemd_logs_get);r.context=n,l.ws.send(r)}})}const J=[{title:"no(不自动重启)",value:"no"},{title:"always(总是重启)",value:"always"},{title:"on-failure(失败才重启)",value:"on-failure"},{title:"on-abnormal(异常才重启)",value:"on-abnormal"}],Q=[{title:"simple",value:"simple"},{title:"forking",value:"forking"},{title:"oneshot",value:"oneshot"},{title:"notify",value:"notify"}],ee=[{title:"multi-user.target",value:"multi-user.target"},{title:"network.target",value:"network.target"}];function te(e,t){const s=[];return s.push("[Unit]"),t.description.trim()?s.push(`Description=${t.description.trim()}`):s.push(`Description=${e}`),s.push(""),s.push("[Service]"),s.push(`Type=${t.type.trim()||"simple"}`),t.exec_start.trim()&&s.push(`ExecStart=${t.exec_start.trim()}`),t.working_dir.trim()&&s.push(`WorkingDirectory=${t.working_dir.trim()}`),t.user_.trim()&&s.push(`User=${t.user_.trim()}`),t.restart&&"no"!==t.restart&&s.push(`Restart=${t.restart.trim()}`),s.push(""),s.push("[Install]"),s.push(`WantedBy=${t.wanted.trim()||"multi-user.target"}`),s.push(""),s.join("\n")}function se(e){const t={description:"",type:"simple",exec_start:"",working_dir:"",user_:"root",restart:"no",wanted:"multi-user.target"},s=(t,s)=>{const n=e.split(/\r?\n/);let i=!1;for(const e of n){const n=e.trim(),r=n.match(/^\[(.*)\]$/);if(r){i=(r[1]||"").trim()===t;continue}if(!i)continue;const o=n.match(new RegExp(`^${s}\\s*=\\s*(.*)$`,"i"));if(o)return o[1].trim()}return""};return t.description=s("Unit","Description"),t.type=s("Service","Type")||"simple",t.exec_start=s("Service","ExecStart"),t.working_dir=s("Service","WorkingDirectory"),t.user_=s("Service","User"),t.restart=s("Service","Restart")||"no",t.wanted=s("Install","WantedBy")||"multi-user.target",t}function ne(e){const{t}=(0,p.Bd)(),[s,i]=(0,n.useState)("form"),[r,o]=(0,n.useState)(()=>(e.unit_name||"").replace(/\.service$/i,"")),[c,l]=(0,n.useState)({description:"",type:"simple",exec_start:"",working_dir:"",user_:"root",restart:"no",wanted:"multi-user.target"}),[d,u]=(0,n.useState)(""),[h,m]=(0,n.useState)(""),[j,f]=(0,n.useState)(!1);(0,n.useEffect)(()=>{"edit"===e.mode&&e.unit_name&&(async()=>{f(!0);try{const t=await a.Yu.post("systemd/get/context",{unit_name:e.unit_name});if(t.code!==x.m.Success)return;const s=t.data.context??"",n=t.data.path??"";m(n),u(s),l(se(s))}finally{f(!1)}})()},[e.mode,e.unit_name]);const y=e=>{e!==s&&("text"===e?u(te(r,c)):l(se(d)),i(e))},v=e=>t=>{l(s=>({...s,[e]:t}))};return(0,w.jsxs)("div",{children:[(0,w.jsxs)("div",{style:{display:"flex",gap:"0.4rem",marginBottom:"0.6rem"},children:[(0,w.jsx)("button",{className:"button button--flat "+("form"===s?"":"button--grey"),onClick:()=>y("form"),children:t("表单")}),(0,w.jsx)("button",{className:"button button--flat "+("text"===s?"":"button--grey"),onClick:()=>y("text"),children:t("文本")})]}),j?(0,w.jsx)("div",{children:t("加载中...")}):"form"===s?(0,w.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"0.6rem"},children:[(0,w.jsx)(g.BC,{label:t("服务名称"),children:(0,w.jsx)(g.Sm,{placeholder:t("服务名称"),value:r,disabled:"edit"===e.mode,handleInputChange:e=>o(e),width:"100%"})}),(0,w.jsx)(g.BC,{label:t("服务描述"),children:(0,w.jsx)(g.Sm,{placeholder:t("服务描述"),value:c.description,handleInputChange:v("description"),width:"100%"})}),(0,w.jsx)(g.BC,{label:t("启动命令"),required:!0,children:(0,w.jsx)(g.Sm,{placeholder:t("ExecStart 启动命令,必填"),value:c.exec_start,handleInputChange:v("exec_start"),width:"100%"})}),(0,w.jsx)(g.BC,{label:t("运行类型"),children:(0,w.jsx)(g.l6,{options:Q,value:c.type,onChange:v("type")})}),(0,w.jsx)(g.BC,{label:t("工作目录"),children:(0,w.jsx)(g.Sm,{placeholder:t("工作目录(可选)"),value:c.working_dir,handleInputChange:v("working_dir"),width:"100%"})}),(0,w.jsx)(g.BC,{label:t("运行用户"),children:(0,w.jsx)(g.Sm,{placeholder:t("运行用户(可选)"),value:c.user_,handleInputChange:v("user_"),width:"100%"})}),(0,w.jsx)(g.BC,{label:t("重启策略"),children:(0,w.jsx)(g.l6,{options:J,value:c.restart,onChange:v("restart")})}),(0,w.jsx)(g.BC,{label:t("安装目标"),children:(0,w.jsx)(g.l6,{options:ee,value:c.wanted,onChange:v("wanted")})})]}):(0,w.jsx)("textarea",{className:"input--textarea input--no_border",style:{width:"100%",minHeight:"16rem",fontFamily:"monospace",fontSize:"0.85rem",boxSizing:"border-box"},value:d,onChange:e=>u(e.target.value),spellCheck:!1}),(0,w.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"0.4rem",marginTop:"0.6rem"},children:[(0,w.jsx)("button",{className:"button button--flat button--grey",disabled:j,onClick:e.onClose,children:t("取消")}),(0,w.jsx)("button",{className:"button button--flat",disabled:j,onClick:async()=>{if(!r.trim())return void(0,_.zN)(t("请填写服务名称"));const n=(i=r).trim().endsWith(".service")?i.trim():`${i.trim()}.service`;var i;const o="text"===s?d:te(n,c);if(o.includes("ExecStart=")){f(!0);try{if("create"===e.mode){const e=`/etc/systemd/system/${n}`;await a.Yu.post("systemd/sys/save",{unit_name:n,path:e,context:o}),await a.Yu.post("systemd/sys/enable",{unit_name:n}),await a.Yu.post("systemd/add",{unit_name:n}),(0,_.SK)(t("添加成功"))}else await a.Yu.post("systemd/sys/save",{unit_name:n,path:h,context:o}),(0,_.SK)(t("保存成功"));e.onClose(),e.onDone?.()}catch(e){console.error("systemd 保存失败",e)}finally{f(!1)}}else(0,_.zN)(t("请至少填写 ExecStart 启动命令"))},children:t("保存")})]})]})}let ie,re="";function oe(e){const{t}=(0,p.Bd)(),{check_user_auth:s}=(0,S.MH)(),[o,f]=(0,m.fp)(j.AG.systemd_shell_show),[y,v]=(0,m.fp)(j.AG.confirm),[k,C]=(0,n.useState)(["pid","name","process",t("创建用户"),t("内存"),t("cpu%"),t("active状态"),t("选择")]),[A,P]=(0,n.useState)(["单元名字","加载状态",t("active(sub)状态"),t("描述"),t("选择")]),[V,$]=(0,n.useState)([]),[F,M]=(0,n.useState)([]),[N,E]=(0,n.useState)([]),[K,B]=(0,n.useState)(!1),[H,Z]=(0,n.useState)([]),[G,D]=(0,n.useState)(""),[z,W]=(0,n.useState)(""),[T,X]=(0,n.useState)(new Set),[U,q]=(0,m.fp)(j.AG.editorSetting),[L,R]=(0,m.fp)(j.AG.prompt_card);(0,n.useEffect)(()=>{W(re),(async()=>{$([]),E([]);const e=new c.hf(c.HK.systemd_inside_get);await l.ws.send(e),l.ws.addMsg(c.HK.systemd_inside_getting,e=>{const t=[];if(re){for(const s of e.context)for(const e of s)if(`${e}`.includes(re)){t.push(s);break}}else t.push(...e.context);$(t.map(e=>{const t=e.map((e,t)=>(0,w.jsx)(r.xP,{context:4===t?(0,Y.v7)(e):e}));return t.push((0,w.jsx)(u.rA,{icon:"place",title:"选中",onClick:()=>{E(t)}})),t}))})})()},[]),(0,n.useEffect)(()=>{re=z},[z]);const J=e=>{if(o.show){f({show:!1,unit_name:""});const e=new CustomEvent("cancel_systemd_logs",{detail:{}});document.dispatchEvent(e)}else f({show:!0,unit_name:e})},Q=async()=>{M([]),Z([]);const e=await a.Yu.get("systemd/inside/all");if(e.code!==x.m.Success)return;X(new Set(e.data));const t=await a.Yu.get("systemd/allget");if(t.code===x.m.Success){const e=t.data,s=[];for(const t of e??[]){const e=[(0,w.jsx)(r.xP,{context:t.unit}),t.load,`${t.active}(${t.sub})`,(0,w.jsx)(r.xP,{context:t.description})];s.push([...e,(0,w.jsx)(u.rA,{icon:"place",title:"添加",onClick:()=>{Z([...e])}})])}ie=s,M(s)}},ee=(e,s)=>{R({open:!0,title:t("create"===e?"新建 systemd 服务":"编辑 systemd 服务"),context_div:(0,w.jsx)(ne,{mode:e,unit_name:s,onClose:()=>R({open:!1}),onDone:()=>{R({open:!1}),l.ws.send(new c.hf(c.HK.systemd_inside_get)),K&&Q(),E([]),Z([])}})})};return(0,w.jsxs)("div",{children:[(0,w.jsx)(d.aZ,{children:(0,w.jsx)(u.Z$,{defaultStatus:!1,text:t("系统systemd单元"),clickFun:e=>{B(e),e?(Q(),E([])):Z([])}})}),(0,w.jsxs)(d.aZ,{position:"right",children:[s(b.oV.systemd)&&(0,w.jsx)("div",{children:(0,w.jsx)(u.rA,{icon:"add_circle",title:t("添加 systemd"),onClick:()=>{ee("create")}})}),N.length>0&&(0,w.jsx)("div",{children:N[1].props.context}),H.length>0&&(0,w.jsx)("div",{children:H[0].props.context}),N.length>0&&(0,w.jsxs)("div",{children:[s(b.oV.systemd)&&(0,w.jsx)(u.rA,{icon:"remove",title:"从实时监控删除",onClick:()=>{(async e=>{v({open:!0,handle:async()=>{(await a.Yu.post("systemd/delete",{unit_name:e})).code===x.m.Success&&((0,_.SK)("删除成功"),v({open:!1,handle:null}))}})})(N[1].props.context)}}),s(b.oV.systemd)&&(0,w.jsx)(u.rA,{icon:"edit",title:"可视化编辑",onClick:()=>{ee("edit",N[1].props.context)}}),(0,w.jsx)(u.rA,{icon:"print",title:"打印日志",onClick:()=>{J(N[1].props.context)}})]}),H.length>0&&(0,w.jsxs)("div",{children:[s(b.oV.systemd)&&(0,w.jsx)(u.rA,{icon:"delete",title:"删除系统上的sytemd",onClick:()=>{(async e=>{v({open:!0,handle:async()=>{(await a.Yu.post("systemd/sys/delete",{unit_name:e})).code===x.m.Success&&((0,_.SK)("删除成功"),v({open:!1,handle:null}))}})})(H[0].props.context)}}),(0,w.jsx)(u.rA,{icon:"print",title:"打印日志",onClick:()=>{J(H[0].props.context)}}),s(b.oV.systemd)&&(0,w.jsx)(u.rA,{icon:"text_fields",title:"sytemd文件内容",onClick:()=>{(async t=>{const s=await a.Yu.post("systemd/get/context",{unit_name:t});s.code===x.m.Success&&(q({model:"text",open:!0,fileName:e.name,save:async e=>{const n={unit_name:t,path:s.data.path,context:e};(await a.Yu.post("systemd/sys/save",n)).code===x.m.Success&&(S.xK.set_value_temp(""),q({open:!1,model:"",fileName:"",save:null}))}}),S.xK.set_value_temp(s.data.context))})(H[0].props.context)}}),s(b.oV.systemd)&&!T.has(H[0].props.context)&&(0,w.jsx)(u.rA,{icon:"plus_one",title:"添加到管理",onClick:()=>(async e=>{const t=await a.Yu.post("systemd/add",{unit_name:e});t.code===x.m.Success&&(X(new Set(t.data)),(0,_.SK)("添加成功"))})(H[0].props.context)})]})]}),(0,w.jsxs)(i.xh,{children:[K&&(0,w.jsx)(i.fI,{children:(0,w.jsx)(i.VP,{widthPer:80,children:(0,w.jsx)(r.uF,{title:`systemd系统单元(${F.length})`,titleCom:(0,w.jsx)(g.Sm,{placeholder:"过滤单元",value:G,handleInputChange:e=>{D(e)},handlerEnter:()=>{const e=[];if(G){for(const t of ie)(t[0].props.context.includes(G)||t[3].props.context.includes(G))&&e.push(t);M(e)}else M(ie)}}),children:(0,w.jsx)(h.X,{headers:A,rows:F,width:"10rem"})})})}),0===V.length&&!K&&(0,w.jsx)(I.h,{context:"没有管理的单元 or 加载中请等待..."}),0!==V.length&&!K&&(0,w.jsx)(i.fI,{children:(0,w.jsx)(i.VP,{widthPer:80,children:(0,w.jsx)(r.uF,{title:`filecat监控单元(${V.length})`,titleCom:(0,w.jsx)(g.Sm,{placeholder:"过滤单元",value:z,handleInputChange:e=>{W(e)}}),children:(0,w.jsx)(h.X,{headers:k,rows:V,width:"10rem"})})})})]}),(0,w.jsx)(O,{})]})}function ce(){const{t:e}=(0,p.Bd)(),t=[{title:e("放行"),value:"allow"},{title:e("拒绝"),value:"deny"},{title:e("限速"),value:"limit"},{title:e("拒绝响应"),value:"reject"}],s=[{title:e("入站"),value:"in"},{title:e("出站"),value:"out"}],[o,c]=(0,n.useState)(null),[l,f]=(0,n.useState)("allow"),[y,v]=(0,n.useState)("in"),[k,S]=(0,n.useState)("tcp"),[b,C]=(0,n.useState)(""),[A,P]=(0,n.useState)(""),[V,Y]=(0,n.useState)("list"),[$,F]=(0,n.useState)([]),[M,N]=(0,n.useState)(""),[E,K]=(0,n.useState)(!1),[B,H]=(0,m.fp)(j.AG.confirm),Z=async()=>{try{const e=await a.V_.get("status");e.code===x.m.Success&&c(e.data)}catch(e){}},G=async()=>{K(!0);try{const e=await a.V_.get("rules");if(e.code===x.m.Success){const t=e.data;F(t?.rules??[]),N(t?.raw??"")}}catch(e){F([]),N("")}finally{K(!1)}};(0,n.useEffect)(()=>{Z(),G()},[]);const D=!0===o?.installed,z=!0===o?.active;return(0,w.jsxs)("div",{children:[(0,w.jsxs)(d.aZ,{position:"right",children:[(0,w.jsxs)("div",{children:[e("已安装"),": ",D?(0,w.jsx)("span",{style:{color:"green"},children:"✓"}):(0,w.jsx)("span",{style:{color:"red"},children:"✗"})]}),(0,w.jsxs)("div",{children:[e("已启用"),": ",z?(0,w.jsx)("span",{style:{color:"green"},children:"✓"}):(0,w.jsx)("span",{style:{color:"gray"},children:"✗"})]}),D&&(0,w.jsx)(u.rA,{icon:"power_settings_new",title:e(z?"停用":"启用"),onClick:()=>(async t=>{try{const s=await a.V_.post("enable",{enabled:t});if(s.code!==x.m.Success)return void(0,_.zN)(s.message||e("操作失败"));(0,_.SK)(s.data||e(t?"已启用":"已停用")),Z(),G()}catch(e){}})(!z)}),(0,w.jsx)(u.rA,{icon:"refresh",title:e("刷新规则"),onClick:G})]}),(0,w.jsxs)(i.xh,{children:[(0,w.jsx)(i.fI,{children:(0,w.jsx)(i.VP,{widthPer:35,children:(0,w.jsxs)(r.uF,{title:e("添加ufw规则"),titleCom:(0,w.jsx)(u.rA,{icon:"add",title:e("添加"),onClick:async()=>{if(b.trim())try{const t=await a.V_.post("rule/add",{action:l,direction:y,proto:k,port:b.trim(),from:"in"===y&&A.trim()||void 0});if(t.code!==x.m.Success)return void(0,_.zN)(t.message||e("操作失败"));(0,_.SK)(t.data||e("已添加")),G()}catch(e){}else(0,_.zN)(e("请填写端口号"))}}),children:[(0,w.jsx)(g.BC,{label:e("动作"),label_width:"4rem",input_max_width:"8rem",children:(0,w.jsx)(g.l6,{options:t,value:l,onChange:e=>f(e),defaultValue:"allow"})}),(0,w.jsx)(g.BC,{label:e("方向"),label_width:"4rem",input_max_width:"8rem",children:(0,w.jsx)(g.l6,{options:s,value:y,onChange:e=>v(e),defaultValue:"in"})}),(0,w.jsx)(g.BC,{label:e("协议"),label_width:"4rem",input_max_width:"8rem",children:(0,w.jsx)(g.l6,{options:[{title:"tcp",value:"tcp"},{title:"udp",value:"udp"}],value:k,onChange:e=>S(e),defaultValue:"tcp"})}),(0,w.jsx)(g.BC,{label:e("端口"),label_width:"4rem",required:!0,children:(0,w.jsx)(g.Sm,{maxWidth:"20rem",placeholder:e("可填范围如 1000:2000"),value:b,handleInputChange:e=>C(e)})}),"in"===y&&(0,w.jsx)(g.BC,{label:e("来源"),label_width:"4rem",children:(0,w.jsx)(g.Sm,{maxWidth:"20rem",placeholder:e("IP/网段,可选"),value:A,handleInputChange:e=>P(e)})})]})})}),(0,w.jsx)(i.fI,{children:(0,w.jsx)(i.VP,{widthPer:80,children:(0,w.jsxs)(r.uF,{title:e("规则列表"),titleCom:(0,w.jsxs)("div",{style:{display:"flex",gap:"0.4rem"},children:[(0,w.jsx)(u.C3,{text:e("名单视图"),clickFun:()=>Y("list")}),(0,w.jsx)(u.C3,{text:e("文本视图"),clickFun:()=>Y("text")})]}),children:[E&&(0,w.jsx)(I.h,{context:e("加载中...")}),!E&&"list"===V&&(0===$.length?(0,w.jsx)(I.h,{context:e("暂无规则")}):(0,w.jsx)(h.X,{headers:[e("编号"),e("目标(To)"),e("动作"),e("fw_from"),e("备注"),e("操作")],rows:$.map(t=>[t.number,(0,w.jsx)(r.xP,{context:t.to,tip_context:t.to}),t.action,t.from?(0,w.jsx)(r.xP,{context:t.from,tip_context:t.from}):"",t.description||"",(0,w.jsx)(u.rA,{icon:"delete",title:e("删除规则"),onClick:()=>(async(t,s,n)=>{H({open:!0,title:e("确定删除吗?"),sub_title:e(`${s} ${n}`),handle:async()=>{try{const s=await a.V_.post("ufw/rule/del",{number:t});if(s.code!==x.m.Success)return void(0,_.zN)(s.message||e("操作失败"));(0,_.SK)(s.data||e("规则已删除")),H({open:!1,handle:null}),G()}catch(e){}}})})(t.number,t.to,t.from)})]),width:"8rem"})),!E&&"text"===V&&(M?(0,w.jsx)("pre",{style:{whiteSpace:"pre-wrap",wordBreak:"break-all",fontSize:"0.85rem",margin:0},children:M}):(0,w.jsx)(I.h,{context:e("暂无规则")}))]})})})]})]})}function le(e){const{t}=(0,p.Bd)(),[s,n]=(0,m.fp)(j.AG.user_base_info),r=[{index:1,name:t("系统性能"),rto:"sys/",component:(0,w.jsx)(F,{})},{index:2,name:t("系统进程"),rto:"process/",component:(0,w.jsx)(L,{})},{index:3,name:t("doc_ct"),rto:"docker/",component:(0,w.jsx)(W,{})}];if(s.sys===b.XM.linux){(s.user_data?.is_root||(s.user_data?.auth_list??[]).includes(b.oV.systemd))&&r.push({index:4,name:t("systemd"),rto:"systemd/",component:(0,w.jsx)(oe,{})});(s.user_data?.is_root||(s.user_data?.auth_list??[]).includes(b.oV.firewall))&&s.sysSoftWare?.[f.jk.ufw]?.installed&&r.push({index:5,name:t("防火墙"),rto:"firewall/",component:(0,w.jsx)(ce,{})})}return(0,w.jsx)(i.W1,{optionList:r,father_route:Z.o.info})}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[9546],{75007(e,t,s){s.d(t,{h:()=>r});s(96540);var n=s(85997),i=s(74848);function r(e){return(0,i.jsxs)("h2",{className:"message",children:[(0,i.jsx)(n.In,{icon:"sentiment_dissatisfied"}),(0,i.jsx)("span",{children:e.context})]})}},22081(e,t,s){var n=s(96540),i=s(16349),r=s(74848);const o=({percentage:e})=>{const t=(0,n.useRef)(null),[s,o]=(0,n.useState)(null);return(0,n.useEffect)(()=>{const s=t.current.getContext("2d"),n=new i.Ay(s,{type:"doughnut",data:{labels:["use","left"],datasets:[{data:[e,100-e],backgroundColor:["#007bff","#f0f0f0"],borderWidth:0}]},options:{plugins:{legend:{display:!1},tooltip:{enabled:!1}},elements:{arc:{borderWidth:0}}}});return o(n),()=>{n.destroy()}},[]),(0,n.useEffect)(()=>{s&&(s.data.datasets[0].data=[e,100-e],s.update())},[e]),(0,r.jsx)("div",{style:{width:"8rem",overflow:"hidden"},children:(0,r.jsx)("canvas",{ref:t})})};s.d(t,["A",0,o])},77481(e,t,s){s.d(t,{S:()=>c,X:()=>o});var n=s(96540),i=s(61443),r=s(74848);function o(e){const[t,s]=n.useState([]),o=(0,n.useRef)(-1),[c,l]=(0,n.useState)(-1),[a,d]=(0,n.useState)(-1);(0,n.useEffect)(()=>{e.children?s(Array.isArray(e.children)?e.children:[e.children]):s(e.rows)},[e.rows,e.children]);const u=()=>{o.current=-1,l(-1),d(-1)};return(0,r.jsxs)("table",{children:[(0,r.jsx)("thead",{children:(0,r.jsx)("tr",{children:e.headers?.map((t,s)=>{const n=!!e.filter&&(e.filter.column??0)===s;let o=t;if(n){const s=e.filter,n=s.options.find(e=>e.value===s.value);null!=s.value&&n&&(o=`${t} (${n.label})`)}return(0,r.jsx)("th",{className:n?"table-filter-col":"",children:n?(0,r.jsx)(i.l6,{value:e.filter.value,options:e.filter.options,onChange:e.filter.onChange,bare:!0,trigger_label:o}):t},s)})})}),(0,r.jsx)("tbody",{children:t.map((t,s)=>{const n=!!e.onRowDrag;return(0,r.jsx)("tr",{className:n?(c===s?"row-dragging":"")+(a===s?" row-drop-target":""):"",draggable:n,onContextMenu:()=>{e.handleContextMenu&&e.handleContextMenu(t)},onDragStart:e=>{n&&(o.current=s,l(s),e.dataTransfer.effectAllowed="move")},onDragOver:e=>{!n||o.current<0||(e.preventDefault(),e.dataTransfer.dropEffect="move",d(s))},onDrop:t=>{n&&(t.preventDefault(),(()=>{const t=o.current,s=a;u(),t<0||s<0||t===s||e.onRowDrag?.(t,s)})())},onDragEnd:u,children:t.map((s,n)=>{const i=n===t.length-1?"small":"";return(0,r.jsx)("td",{className:i,style:{width:e.width??"auto"},children:s},n)})},s)})})]})}function c(e){return(0,r.jsx)("div",{style:{display:e.isFlex?"flex":"block"},children:e.columns.map((e,t)=>(0,r.jsx)("div",{children:e},t))})}},88062(e,t,s){s(96540),s(47022);var n=s(74848);function i(e){return(0,n.jsx)("div",{className:"black-tip",onClick:()=>{e.click&&e.click(e)},onContextMenu:t=>{t.stopPropagation(),t.nativeEvent.stopImmediatePropagation(),e.onContextMenu&&e.onContextMenu(t,e)},children:e.name})}const r=e=>(0,n.jsxs)("li",{children:[e.click?(0,n.jsx)(i,{...e.node,name:e.render?e.render(e.node):e.node.name,click:e.click,onContextMenu:e.onContextMenu}):(0,n.jsx)("div",{children:e.render?e.render(e.node):e.node.name}),e.node.children&&e.node.children.length>0&&(0,n.jsx)("ul",{children:e.node.children.map((t,s)=>(0,n.jsx)(r,{node:t,click:e.click,onContextMenu:e.onContextMenu,render:e.render},s))})]}),o=e=>(0,n.jsx)("div",{className:"card-tree-view",children:(0,n.jsx)("ul",{children:e.list&&e.list.map((t,s)=>(0,n.jsx)(r,{node:t,click:e.click,onContextMenu:e.onContextMenu,render:e.render},s))})});s.d(t,["A",0,o])},59546(e,t,s){s.r(t),s.d(t,{default:()=>le});var n=s(96540),i=s(75725),r=s(70447),o=s(22081),c=s(92275),l=s(14944),a=s(14284),d=s(4412),u=s(85997),h=s(77481),x=s(53459),p=s(22022),m=s(34843),j=s(82893),f=s(74777),_=s(62042),g=s(61443),w=s(74848);function y(e){const{t}=(0,p.Bd)(),[s,o]=(0,m.fp)(j.AG.disk),[c,l]=(0,n.useState)({}),[f,_]=(0,n.useState)([]),g=[t("名字"),t("当前值"),t("历史最低"),t("临界值")];return(0,n.useEffect)(()=>{(async()=>{const s=await a.Yu.post("sys/disk/info",{name:e.name});if(s.code===x.m.Success){const e=[];for(const n of s.data.ata_smart_attributes??[]){let s;n[1]>=n[2]?s="var(--icon-green)":n[1]<=n[3]&&(s="var(--icon-red)"),n[0]=(0,w.jsx)("span",{style:{color:s},children:t(n[0])}),e.push(n)}_(s.data.ata_smart_attributes),l(s.data)}})()},[]),(0,w.jsxs)("div",{children:[(0,w.jsx)(d.aZ,{position:"right",children:(0,w.jsx)(u.rA,{icon:"close",title:t("关闭"),onClick:()=>{o({})}})}),(0,w.jsx)(i.jW,{isFull:!0,more:!0,children:(0,w.jsx)(i.NN,{children:(0,w.jsxs)(i.fI,{children:[(0,w.jsxs)(i.VP,{widthPer:30,children:[(0,w.jsx)(i.xh,{children:(0,w.jsxs)(r.Zp,{title:t("基本信息"),children:[(0,w.jsx)(i.Yh,{left:t("名字"),right:e.name}),(0,w.jsx)(i.Yh,{left:t("厂商名称"),right:e.typeName}),(0,w.jsx)(i.Yh,{left:t("类型"),right:e.type}),(0,w.jsx)(i.Yh,{left:t("容量"),right:e.total})]})}),(0,w.jsx)(i.xh,{children:(0,w.jsxs)(r.Zp,{title:t("物理信息"),children:[(0,w.jsx)(i.Yh,{left:t("是否健康"),right:!0===c.smart_status?"是":"否"}),(0,w.jsx)(i.Yh,{left:t("设备型号"),right:c.model_name}),(0,w.jsx)(i.Yh,{left:t("序列号"),right:c.serial_number}),(0,w.jsx)(i.Yh,{left:t("固件版本"),right:c.firmware_version}),(0,w.jsx)(i.Yh,{left:t("转速(每分钟)"),right:c.rotation_rate}),(0,w.jsx)(i.Yh,{left:t("通电时长(小时)"),right:c.power_on_time_hours}),(0,w.jsx)(i.Yh,{left:t("通电次数"),right:c.power_cycle_count}),(0,w.jsx)(i.Yh,{left:t("温度(°C)"),right:c.temperature}),(0,w.jsx)(i.Yh,{left:t("通信协议"),right:c.device_protocol})]})})]}),(0,w.jsx)(i.VP,{widthPer:50,children:(0,w.jsxs)(i.xh,{children:[f?.length?(0,w.jsx)(r.uF,{title:t("ATA/SATA详细信息"),children:(0,w.jsx)(h.X,{headers:g,rows:f,width:"10rem"})}):(0,w.jsx)(w.Fragment,{}),c.nvme_smart?(0,w.jsxs)(r.Zp,{title:t("NVME详细信息"),children:[(0,w.jsx)(i.Yh,{left:t("NVMe 可用备用块(%)"),right:c.nvme_smart.available_spare}),(0,w.jsx)(i.Yh,{left:t("NVMe 已使用寿命(%)"),right:c.nvme_smart.percentage_used}),(0,w.jsx)(i.Yh,{left:t("NVMe 读取量"),right:c.nvme_smart.data_units_read}),(0,w.jsx)(i.Yh,{left:t("NVMe 写入量"),right:c.nvme_smart.data_units_written}),(0,w.jsx)(i.Yh,{left:t("NVMe 通电次数"),right:c.nvme_smart.power_cycles}),(0,w.jsx)(i.Yh,{left:t("NVMe 通电时长(小时)"),right:c.nvme_smart.power_on_hours}),(0,w.jsx)(i.Yh,{left:t("NVMe 非正常关机"),right:c.nvme_smart.unsafe_shutdowns}),(0,w.jsx)(i.Yh,{left:t("NVMe 媒体错误"),right:c.nvme_smart.media_errors}),(0,w.jsx)(i.Yh,{left:t("NVMe 错误日志数"),right:c.nvme_smart.num_err_log_entries})]}):(0,w.jsx)(w.Fragment,{})]})})]})})})]})}let v=function(e){return e[e.mount=0]="mount",e}({});var k=s(88062),S=s(78247),b=s(23430),C=s(99214);const A=e=>(0,w.jsxs)("div",{style:{border:"2px solid black",padding:"10px",width:"300px",height:"300px",position:"relative"},children:[e.name,e.lvms.map((e,t)=>(0,w.jsx)("div",{style:{margin:"5px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid "},children:e.name},t))]});function P(){return(0,w.jsx)("div",{style:{position:"relative",height:"300px",margin:"10px",width:"30px",display:"flex",alignItems:"center",justifyContent:"center"},children:(0,w.jsx)("div",{style:{width:0,height:0,borderTop:"10px solid transparent",borderBottom:"10px solid transparent",borderLeft:"10px solid black"}})})}function V(){const{t:e}=(0,p.Bd)(),[t,s]=(0,m.fp)(j.AG.disk),[o,c]=(0,n.useState)({}),[l,f]=(0,n.useState)([]),[g,y]=(0,n.useState)([]),[V,Y]=(0,m.fp)(j.AG.showPrompt),{check_user_auth:$}=(0,S.MH)(),[F,I]=(0,n.useState)([]),{click_file:M}=(0,C.kZ)(),[N,E]=(0,m.fp)(j.AG.prompt_card),K=[e("挂载点"),"uuid",e("类型"),e("文件系统类型"),e("文件系统容量"),e("卷容量"),e("设备路径"),e("分区表类型")],B=async()=>{const e=await a.Yu.get("disk/blk");return e.code===x.m.Success&&f(e.data),e.code};(0,n.useEffect)(()=>{(async()=>{B()})()},[]);const H=[(0,w.jsx)(u.rA,{icon:"info",title:e("提示"),onClick:async()=>{E({open:!0,title:"信息",context_div:(0,w.jsx)("div",{children:(0,w.jsxs)("ul",{children:[(0,w.jsxs)("li",{children:["通用格式:","<文件系统> <挂载点> <类型> <挂载选项> <dump> <fsck> "]}),(0,w.jsxs)("li",{children:["文件系统,有多种格式",(0,w.jsxs)("ul",{children:[(0,w.jsx)("li",{children:"1(usb口默认名称)./dev/sda1"}),(0,w.jsx)("li",{children:"2(唯一Id).UUID=123e4567-e89b-12d3-a456-426614174000"}),(0,w.jsx)("li",{children:"3.LABEL=DATA"})]})]}),(0,w.jsx)("li",{children:"挂载点,就是文件路径,例如 /mnt/data ,这个目录要提前创建,且为空"}),(0,w.jsx)("li",{children:"类型,就是文件系统类型,对于系统不支持的类型,例如ntfs需要额外前提安装ntfs-3g(linux 5.15内核以后自带 ntfs)"}),(0,w.jsxs)("li",{children:['挂载选项的值只能是以下这些,可以用 "," 同时使用多个选项',(0,w.jsxs)("ul",{children:[(0,w.jsx)("li",{children:"defaults:使用默认挂载选项"}),(0,w.jsx)("li",{children:"noatime:不更新访问时间,提高性能"}),(0,w.jsx)("li",{children:"auto:系统启动时自动挂载"}),(0,w.jsx)("li",{children:"rw:以读写方式挂载"}),(0,w.jsx)("li",{children:"nofail:防止启动阻塞,挂载失败系统继续执行"}),(0,w.jsx)("li",{children:"...等"})]})]}),(0,w.jsx)("li",{children:"dump 0是需要备份 1是不需要备份"}),(0,w.jsx)("li",{children:"Fsck 整数值0是不检查,文件系统检查顺序越小越先检查"}),(0,w.jsx)("li",{children:"提示:只有含有文件系统的逻辑卷,或者分区才可以进行挂载。"})]})})})}}),(0,w.jsx)(u.rA,{icon:"update",title:e("更新挂载"),onClick:async()=>{(await a.Yu.post("cmd/exe",{type:v.mount})).code===x.m.Success&&(0,_.SK)("挂载文件已生效")}},1)],Z=async()=>(await a.Yu.get("get_fstab")).data,G=async e=>{await a.Yu.post("save_fstab",{content:e})};return(0,w.jsxs)("div",{children:[(0,w.jsx)(d.aZ,{position:"right",children:(0,w.jsx)(u.rA,{icon:"close",title:e("关闭"),onClick:()=>{s({})}})}),(0,w.jsx)(i.jW,{isFull:!0,more:!0,children:(0,w.jsx)(i.NN,{children:(0,w.jsxs)(i.fI,{children:[(0,w.jsx)(i.VP,{widthPer:40,children:(0,w.jsxs)(r.Zp,{title:e("物理块(硬盘)设备、逻辑卷、物理卷"),titleCom:(0,w.jsxs)("div",{children:[$(b.oV.sys_disk_mount)&&(0,w.jsx)(u.rA,{icon:"file_open",title:e("打开挂载文件"),onClick:async()=>{M({name:"fstab(谨慎修改,内容错误会导致系统无法启动)",model:"text",get_file_fun:Z,save_file_fun:G,menu_list:H})}}),(0,w.jsx)(u.rA,{icon:"update",title:e("刷新"),onClick:async()=>{await B()===x.m.Success&&(0,_.SK)("刷新成功")}})]}),children:[(0,w.jsx)(h.X,{headers:K,rows:g,width:"10rem"}),(0,w.jsx)(k.A,{list:l,render:e=>{let t=e.name;return e.label&&(t+=`(${e.label})`),e.mountpoint?(0,w.jsxs)("span",{children:[t,(0,w.jsx)("span",{style:{color:"green"},children:"(已挂载)"})]}):t},onContextMenu:(e,t)=>{e.preventDefault()},click:t=>{let s="";if(t.mountpoint)for(let e=0;e<t.mountpoints.length;e++)s+=t.mountpoints[e]+";";y([[(0,w.jsx)(r.xP,{children:s}),(0,w.jsx)(r.xP,{children:t.uuid}),e(t.type),e(t.fstype),t.fssize,t.size,(0,w.jsx)(r.xP,{children:t.path}),t.pttype]])}})]})}),(0,w.jsx)(i.VP,{widthPer:60,children:F.map((t,s)=>{const n=[];for(const e of t.pv_list)n.push({name:`${e.name}---(${e.size})---(${e.free_size})`});const o=[];for(const e of t.lv_list)o.push({name:`${e.name}---(${e.size})`});return(0,w.jsx)(r.Zp,{children:(0,w.jsxs)(i.n5,{children:[(0,w.jsx)(A,{name:e("物理卷"),lvms:n}),(0,w.jsx)(P,{}),(0,w.jsx)(A,{name:`${e("逻辑卷")}---(${t.name})---size(${t.size})`,lvms:[]}),(0,w.jsx)(P,{}),(0,w.jsx)(A,{name:e("逻辑卷"),lvms:o})]})},s)})})]})})})]})}var Y=s(88815);let $=!0;function F(e){const{t}=(0,p.Bd)(),s=[t("名字"),t("厂商名称"),t("类型"),t("容量")],g=[t("名字"),t("物理硬盘"),t("文件系统类型"),t("挂载位置"),t("总容量"),t("剩余容量")],[v,k]=(0,m.fp)(j.AG.user_base_info),[S,C]=(0,n.useState)(0),[A,P]=(0,n.useState)(0),[F,I]=(0,n.useState)(0),[M,N]=(0,n.useState)(0),[E,K]=(0,n.useState)(0),[B,H]=(0,n.useState)({}),[Z,G]=(0,n.useState)(!1),[D,z]=(0,n.useState)(!1),[W,T]=(0,n.useState)(!1),[X,U]=(0,n.useState)($),[q,L]=(0,n.useState)(null),[R,O]=(0,n.useState)([]),[J,Q]=(0,n.useState)([]),[ee,te]=(0,m.fp)(j.AG.user_base_info),[se,ne]=(0,m.fp)(j.AG.disk),ie=async()=>{if(!$)return;const e=new c.hf(c.HK.sys_get);await l.ws.send(e),l.ws.addMsg(c.HK.sys_getting,e=>{N(e.context?.cpu_currentLoad);const t=e.context?.memLeft,s=e.context?.memTotal;P(t),I(s),C((s-t)/s*100),L(e.context?.node_memory_usage),K(e.context?.node_cpu_usage)})};return(0,n.useEffect)(()=>((async()=>{await ie()})(),()=>{l.ws.sendData(c.HK.sys_cancel,{})}),[]),(0,w.jsxs)("div",{children:[(0,w.jsxs)(d.aZ,{position:"right",children:[v.sys===b.XM.linux&&(0,w.jsx)(u.rA,{icon:"sd_card",title:"硬盘挂载",onClick:()=>{ne({type:"mount"})}}),(0,w.jsx)(u.Z$,{defaultStatus:!1,text:t("基本信息"),clickFun:e=>{G(e),e&&(async()=>{const e=await a.Yu.get("base");if(e.code===x.m.Success){const t=e.data;H(t)}})()}}),(0,w.jsx)(u.Z$,{defaultStatus:!1,text:t("物理硬盘"),clickFun:e=>{z(e),e&&(async()=>{const e=await a.Yu.get("disk");if(e.code===x.m.Success){const s=e.data,n=[];let i=!0;ee.sysSoftWare&&ee.sysSoftWare[f.jk.smartmontools]&&ee.sysSoftWare[f.jk.smartmontools].installed||(i=!1);for(const e of s??[])n.push([(0,w.jsx)(r.xP,{context:e.name}),e.typeName,e.type,e.total,(0,w.jsx)(u.rA,{icon:"health_and_safety",title:t("查看健康信息"),onClick:()=>{i?ne({type:"check",data:e}):(0,_.zN)("没有安装smartmontools")}})]);O(n)}})()}}),(0,w.jsx)(u.Z$,{defaultStatus:!1,text:t("文件硬盘"),clickFun:e=>{T(e),e&&(async()=>{const e=await a.Yu.get("filedisk");if(e.code===x.m.Success){const t=e.data,s=[];for(const e of t??[])s.push([(0,w.jsx)(r.xP,{context:e.name}),(0,w.jsx)(r.xP,{context:e.device_name}),e.fsType,(0,w.jsx)(r.xP,{context:e.mount}),e.total,e.available]);Q(s)}})()}}),(0,w.jsx)(u.Z$,{defaultStatus:X,text:t("实时信息"),clickFun:e=>{U(e),$=e,ie()}})]}),(0,w.jsxs)(i.xh,{children:[X&&(0,w.jsxs)(i.fI,{children:[(0,w.jsx)(i.VP,{widthPer:33,maxWidth:"30rem",children:(0,w.jsx)(r.Zp,{title:"Sys "+t("内存"),children:(0,w.jsxs)(i.fI,{children:[(0,w.jsx)(i.VP,{children:(0,w.jsx)(o.A,{percentage:S})}),(0,w.jsx)(i.VP,{children:(0,w.jsxs)(i.fI,{children:[(0,w.jsx)(i.VP,{widthPer:100,children:(0,w.jsx)("div",{children:(0,w.jsx)(i.Yh,{left:t("总容量"),center:`${F}G`})})}),(0,w.jsx)(i.VP,{widthPer:100,children:(0,w.jsx)(i.Yh,{left:t("剩余"),center:`${A}G`})})]})})]})})}),(0,w.jsx)(i.VP,{widthPer:33,maxWidth:"30rem",children:(0,w.jsx)(r.Zp,{title:"Sys cpu",children:(0,w.jsxs)(i.fI,{children:[(0,w.jsx)(i.VP,{children:(0,w.jsx)(o.A,{percentage:M})}),(0,w.jsx)(i.VP,{children:(0,w.jsx)(i.fI,{children:(0,w.jsx)(i.Yh,{left:t("使用率"),center:M})})})]})})}),(0,w.jsx)(i.VP,{widthPer:33,maxWidth:"30rem",children:(0,w.jsx)(r.Zp,{title:"FileCat",children:(0,w.jsxs)(i.fI,{children:[(0,w.jsxs)(i.VP,{children:[(0,w.jsx)(i.qV,{content:t("内存")}),(0,w.jsx)(i.qV,{content:"total: "+(0,Y.v7)(q?.rss)}),(0,w.jsx)(i.qV,{content:"object: "+(0,Y.v7)(q?.heapTotal)}),(0,w.jsx)(i.qV,{content:"obj-use: "+(0,Y.v7)(q?.heapUsed)}),(0,w.jsx)(i.qV,{content:"external: "+(0,Y.v7)(q?.external)}),(0,w.jsx)(i.qV,{content:"buffer: "+(0,Y.v7)(q?.arrayBuffers)})]}),(0,w.jsx)(i.VP,{children:(0,w.jsx)(i.qV,{content:"cpu growth rate: "+E})})]})})})]}),(0,w.jsxs)(i.fI,{children:[Z&&(0,w.jsx)(i.VP,{children:(0,w.jsxs)(r.Zp,{title:t("基本信息"),children:[(0,w.jsx)(i.Yh,{left:t("总内存"),right:B.mem_total}),(0,w.jsx)(i.Yh,{left:`cpu ${t("制造商")}`,right:B.cpu_manufacturer}),(0,w.jsx)(i.Yh,{left:`cpu ${t("品牌")}`,right:B.cpu_brand}),(0,w.jsx)(i.Yh,{left:`cpu ${t("逻辑核心")}`,right:B.cpu_core_num}),(0,w.jsx)(i.Yh,{left:`cpu ${t("物理核心")}`,right:B.cpu_phy_core_num}),(0,w.jsx)(i.Yh,{left:`cpu ${t("最大")}hz`,right:B.cpu_speed_hz}),(0,w.jsx)(i.Yh,{left:`${t("当前系统")}:pid;ppid`,right:B.pid_ppid}),(0,w.jsx)(i.Yh,{left:t("运行用户"),right:B.user})]})}),D&&(0,w.jsx)(i.VP,{children:(0,w.jsx)(r.uF,{title:t("物理硬盘"),children:(0,w.jsx)(h.X,{headers:s,rows:R,width:"10rem"})})}),W&&(0,w.jsx)(i.VP,{children:(0,w.jsx)(r.uF,{title:t("文件硬盘"),children:(0,w.jsx)(h.X,{headers:g,rows:J,width:"10rem"})})})]})]}),se&&"check"===se.type&&(0,w.jsx)(y,{...se.data}),se&&"mount"===se.type&&(0,w.jsx)(V,{})]})}var I=s(75007),M=s(97856),N=s(64405);const E=n.lazy(()=>Promise.all([s.e(4924),s.e(5614)]).then(s.bind(s,85614)));function K(e){const[t,s]=(0,n.useState)(null),[i,r]=(0,m.fp)(j.AG.dockerShellShow),[o,a]=(0,m.fp)(j.AG.user_base_info),d=o.user_data.theme?.includes("dark")?"#FFFFFF":"#000000",u=()=>{(async()=>{t&&(t.writeln("[38;2;29;153;243mclose![0m "),t.dispose(),s(null))})()};(0,n.useEffect)(()=>{i.show?(async()=>{const e=new M.Terminal({fontFamily:"Monaco, Menlo, Consolas, 'Courier New', monospace",theme:{background:"#FFFFFF",foreground:d,cursor:d,selectionBackground:"#a6d2ff"},cursorBlink:!0,cursorStyle:"bar",scrollback:1e3,scrollSensitivity:1,tabStopWidth:4,convertEol:!0});let t;l.ws.subscribeUnconnect(u);const n=t=>{e.write(t)};t=s=>{e.clear(),e.write(s),t=n},l.ws.addMsg("logs"===i.type?c.HK.docker_shell_logs_getting:c.HK.docker_shell_exec_getting,e=>{"error"===e.context&&u(),t(e.context)}),"exec"===i.type&&e.onData(async e=>{const t=new c.hf(c.HK.docker_shell_exec);t.context=e,await l.ws.send(t)}),s(e)})():u()},[i]),(0,n.useEffect)(()=>()=>{u()},[]);return(0,w.jsx)(E,{show:i.show,terminal:t,init:(e,s)=>{t.writeln("[38;2;29;153;243mconnect...[0m ");const n=new N.n;let r;n.rows=e,n.cols=s,n.dockerId=i.dockerId,r="logs"===i.type?new c.hf(c.HK.docker_shell_logs):new c.hf(c.HK.docker_shell_exec_open),r.context=n,l.ws.send(r)}})}var B=s(89824),H=s(61973),Z=s(87361);let G="",D=[],z=!1;function W(e){const{t}=(0,p.Bd)(),s=(0,H.Zp)(),[o]=(0,m.fp)(j.AG.user_base_info),[f,y]=(0,n.useState)({}),[v,k]=(0,n.useState)([]),[C,A]=(0,n.useState)([]),{check_user_auth:P}=(0,S.MH)(),[V,Y]=(0,m.fp)(j.AG.dockerShellShow),[$,F]=(0,m.fp)(j.AG.showPrompt),[M,N]=(0,m.fp)(j.AG.confirm),[E,W]=(0,n.useState)(G),[T,X]=(0,n.useState)(["id",t("名字"),t("镜像"),t("命令"),t("状态"),t("内存"),"cpu%",t("选择")]),[U,q]=(0,n.useState)([]),[L,R]=(0,n.useState)(void 0),[O,J]=(0,n.useState)(!1),Q=["id",t("name"),t("create时间"),t("大小"),(0,w.jsxs)("span",{children:["选中",(0,w.jsx)(u.rA,{icon:"check_box",title:"全选",onClick:()=>{z=!z;const e={};for(let t=0;t<C.length&&z;t++)e[C[t][0].props.context]=1;y(e)}})]})],ee=async()=>{k([]),q([]);const e=new c.hf(c.HK.docker_get);await l.ws.send(e),l.ws.addMsg(c.HK.docker_getting,e=>{const t=[];if(G){for(const s of e.context)for(const e of s)if(`${e}`.includes(G)){t.push(s);break}}else t.push(...e.context);k(t.map(e=>{const t=e.map(e=>(0,w.jsx)(r.xP,{context:e}));return t.push((0,w.jsx)(u.rA,{icon:"place",title:"选中",onClick:()=>{q(t)}})),t}))})};(0,n.useEffect)(()=>(W(G),ee(),()=>{(async()=>{Y({show:!1,type:"",dockerId:""})})()}),[]),(0,n.useEffect)(()=>{G=E},[E]);const te=()=>{const e=new c.hf("logs"===V.type?c.HK.docker_shell_logs_cancel:c.HK.docker_shell_exec_cancel);e.context="",l.ws.send(e)},se=e=>{const t=new c.hf(c.HK.docker_switch);t.context={type:e,dockerId:U[0].props.context},q([]),l.ws.send(t)},ne=async()=>{const e=await a.Yu.get("docker/images");if(e.code===x.m.Success){const t=e.data??[],s=[];for(let e=0;e<t.length;e++){const n=t[e],i=[(0,w.jsx)(r.xP,{context:n[0]}),(0,w.jsx)(r.xP,{context:n[1]}),n[2],n[3],""];s.push(i)}D=s,A(s)}};return(0,w.jsxs)("div",{children:[(0,w.jsx)(d.aZ,{children:(0,w.jsx)(u.Z$,{defaultStatus:!1,text:t("doc_img"),clickFun:e=>{J(e),e?(ne(),q([])):(ee(),A([]),y({}))}})}),(0,w.jsxs)(d.aZ,{position:"right",children:[o.sys===b.XM.linux&&(0,w.jsx)(u.rA,{icon:"settings",title:t("doc_cfg"),onClick:()=>s(Z.o.docker_setting_page)}),Object.keys(f).length>0&&(0,w.jsx)(u.rA,{icon:"delete",title:t("删除镜像"),onClick:async()=>{N({open:!0,title:t("doc_icf"),handle:async()=>{const e=Object.keys(f),t=await a.Yu.post("docker/check/delete",{ids:e});if(t.code===x.m.Success)if(0===t.data.length){(await a.Yu.post("docker/delete",{ids:e})).code===x.m.Success&&((0,_.SK)("删除完成"),ne(),N({open:!1,handle:null}))}else(0,_.N9)(`有镜像正在运行${JSON.stringify(t.data)}`)}})}}),U.length>0&&(0,w.jsx)("div",{children:U[1].props.context}),U.length>0&&(0,w.jsxs)("div",{children:[P(b.oV.docker_container_update)&&(0,w.jsx)(u.rA,{icon:"delete",title:t("删除容器"),onClick:()=>{F({show:!0,overlay:!0,type:B.PromptEnum.DockerDel,data:{dockerId:U[0].props.context,name:U[1].props.context}})}}),(0,w.jsx)(u.rA,{icon:"print",title:t("打印日志"),onClick:()=>{V.show?(Y({show:!1,type:"",dockerId:""}),te()):Y({show:!0,dockerId:U[0].props.context,type:"logs"})}}),P(b.oV.docker_container_update)&&(0,w.jsx)(u.rA,{icon:"personal_video",title:t("执行命令"),onClick:()=>{V.show?(Y({show:!1,type:"",dockerId:""}),te()):Y({show:!0,dockerId:U[0].props.context,type:"exec"})}}),P(b.oV.docker_container_update)&&U[4].props.context.includes("Up")&&(0,w.jsx)(u.rA,{icon:"stop",title:t("停止"),onClick:()=>se("stop")}),P(b.oV.docker_container_update)&&!U[4].props.context.includes("Up")&&(0,w.jsx)(u.rA,{icon:"play_arrow",title:t("开启"),onClick:()=>{se("start")}})]}),(0!==v.length||E)&&!O&&(0,w.jsx)(u.rA,{icon:"refresh",title:t("列表更新"),onClick:async()=>{const e=new c.hf(c.HK.docker_get);await l.ws.send(e)}})]}),(0,w.jsxs)(i.xh,{children:[O&&(0,w.jsx)(i.fI,{children:(0,w.jsx)(i.VP,{widthPer:80,children:(0,w.jsx)(r.uF,{title:`${t("镜像")} (${C.length})`,titleCom:(0,w.jsx)(g.Sm,{placeholder:t("过滤镜像"),value:L,handleInputChange:e=>{R(e)},handlerEnter:()=>{const e=[];if(L){for(const t of C)(t[0].props.context.includes(L)||t[1].props.context.includes(L))&&e.push(t);A(e)}else A(D)}}),children:(0,w.jsx)(h.X,{headers:Q,rows:C.map((e,s)=>(e[4]=(0,w.jsx)(g.GL,{context:t(""),selected:f[e[0].props.context],onchange:()=>{(e=>{const t={};Object.assign(t,f),t[e]?delete t[e]:t[e]=1,y(t)})(e[0].props.context)}}),e)),width:"10rem"})})})}),0===v.length&&!E&&!O&&(0,w.jsx)(I.h,{context:t("dc_nne")}),(0!==v.length||E)&&!O&&(0,w.jsx)(i.fI,{children:(0,w.jsx)(i.VP,{widthPer:80,children:(0,w.jsx)(r.uF,{title:`${t("容器")} (${v.length})`,titleCom:(0,w.jsx)(g.Sm,{placeholder:t("过滤"),value:E,handleInputChange:e=>{W(e)}}),children:(0,w.jsx)(h.X,{headers:T,rows:v,width:"10rem"})})})})]}),(0,w.jsx)(K,{})]})}var T=s(64694);let X="",U=!1,q=!1;function L(e){const{t}=(0,p.Bd)(),[s,o]=(0,n.useState)([]),[a,x]=(0,n.useState)([]),[m,j]=(0,n.useState)(0),[f,_]=(0,n.useState)(""),[y,v]=(0,n.useState)(["pid",t("名字"),t("创建用户"),(0,w.jsxs)("span",{children:[t("内存"),(0,w.jsx)(u.rA,{icon:"sort",title:t("升序"),onClick:()=>{U=!U}})]}),(0,w.jsxs)("span",{children:["cpu%",(0,w.jsx)(u.rA,{icon:"sort",title:t("升序"),onClick:()=>{q=!q}})]}),t("选择")]),{check_user_auth:k}=(0,S.MH)();(0,n.useEffect)(()=>{_(X),(async()=>{o([]),j(0),x([]);const e=new c.hf(c.HK.process_get);await l.ws.send(e),l.ws.addMsg(c.HK.process_getting,e=>{const s=[];if(X){for(const t of e.context)for(const e of t)if(`${e}`.includes(X)){s.push(t);break}}else s.push(...e.context);U&&(0,T.di)(s,e=>e[3],!1),q&&(0,T.di)(s,e=>e[4],!1);const n=s.map(e=>{const s=e.map((e,t)=>(0,w.jsx)(r.xP,{context:3===t?(0,Y.v7)(e):e}));return s.push((0,w.jsx)(u.rA,{icon:"place",title:t("选中"),onClick:()=>{x(s)}})),s});j(s.length),o(n)})})()},[]),(0,n.useEffect)(()=>{X=f},[f]);return(0,w.jsxs)("div",{children:[(0,w.jsxs)(d.aZ,{position:"right",children:[a.length>0&&(0,w.jsx)("div",{children:a[1].props.context}),a.length>0&&k(b.oV.sys_process_close)&&(0,w.jsx)("div",{children:(0,w.jsx)(u.rA,{icon:"stop",title:t("停止"),onClick:()=>{const e=new c.hf(c.HK.process_close);e.context={pid:a[0].props.context},x([]),l.ws.send(e)}})})]}),(0,w.jsx)(i.xh,{children:0!==s.length||X?(0,w.jsx)(i.fI,{children:(0,w.jsx)(i.VP,{widthPer:80,children:(0,w.jsx)(r.uF,{title:`${t("进程")} (${m})`,titleCom:(0,w.jsx)(g.Sm,{placeholder:t("过滤"),value:f,handleInputChange:e=>{_(e)}}),children:(0,w.jsx)(h.X,{headers:y,rows:s,width:"10rem"})})})}):(0,w.jsx)(I.h,{context:t("ld_wait")})})]})}const R=n.lazy(()=>Promise.all([s.e(4924),s.e(5614)]).then(s.bind(s,85614)));function O(e){const[t,s]=(0,n.useState)(null),[i,r]=(0,m.fp)(j.AG.systemd_shell_show),[o,a]=(0,m.fp)(j.AG.user_base_info),d=o.user_data.theme?.includes("dark")?"#FFFFFF":"#000000",u=()=>{(async()=>{t&&(t.writeln("[38;2;29;153;243mclose![0m "),t.dispose(),s(null))})()};(0,n.useEffect)(()=>{if(!i.show)return void u();(async()=>{const e=new M.Terminal({fontFamily:"Monaco, Menlo, Consolas, 'Courier New', monospace",theme:{background:"#FFFFFF",foreground:d,cursor:d,selectionBackground:"#a6d2ff"},cursorBlink:!0,cursorStyle:"bar",scrollback:1e3,scrollSensitivity:1,tabStopWidth:4,convertEol:!0});l.ws.subscribeUnconnect(u),l.ws.addMsg(c.HK.systemd_logs_getting,t=>{"error"===t.context&&u(),e.write(t.context)}),s(e)})();const e=e=>{};return document.addEventListener("cancel_systemd_logs",e),()=>{document.removeEventListener("cancel_systemd_logs",e)}},[i]),(0,n.useEffect)(()=>()=>{u()},[]);return(0,w.jsx)(R,{show:i.show,terminal:t,init:(e,s)=>{t.writeln("[38;2;29;153;243mconnect...[0m ");const n={unit_name:i.unit_name},r=new c.hf(c.HK.systemd_logs_get);r.context=n,l.ws.send(r)}})}const J=[{title:"no(不自动重启)",value:"no"},{title:"always(总是重启)",value:"always"},{title:"on-failure(失败才重启)",value:"on-failure"},{title:"on-abnormal(异常才重启)",value:"on-abnormal"}],Q=[{title:"simple",value:"simple"},{title:"forking",value:"forking"},{title:"oneshot",value:"oneshot"},{title:"notify",value:"notify"}],ee=[{title:"multi-user.target",value:"multi-user.target"},{title:"network.target",value:"network.target"}];function te(e,t){const s=[];return s.push("[Unit]"),t.description.trim()?s.push(`Description=${t.description.trim()}`):s.push(`Description=${e}`),s.push(""),s.push("[Service]"),s.push(`Type=${t.type.trim()||"simple"}`),t.exec_start.trim()&&s.push(`ExecStart=${t.exec_start.trim()}`),t.working_dir.trim()&&s.push(`WorkingDirectory=${t.working_dir.trim()}`),t.user_.trim()&&s.push(`User=${t.user_.trim()}`),t.restart&&"no"!==t.restart&&s.push(`Restart=${t.restart.trim()}`),s.push(""),s.push("[Install]"),s.push(`WantedBy=${t.wanted.trim()||"multi-user.target"}`),s.push(""),s.join("\n")}function se(e){const t={description:"",type:"simple",exec_start:"",working_dir:"",user_:"root",restart:"no",wanted:"multi-user.target"},s=(t,s)=>{const n=e.split(/\r?\n/);let i=!1;for(const e of n){const n=e.trim(),r=n.match(/^\[(.*)\]$/);if(r){i=(r[1]||"").trim()===t;continue}if(!i)continue;const o=n.match(new RegExp(`^${s}\\s*=\\s*(.*)$`,"i"));if(o)return o[1].trim()}return""};return t.description=s("Unit","Description"),t.type=s("Service","Type")||"simple",t.exec_start=s("Service","ExecStart"),t.working_dir=s("Service","WorkingDirectory"),t.user_=s("Service","User"),t.restart=s("Service","Restart")||"no",t.wanted=s("Install","WantedBy")||"multi-user.target",t}function ne(e){const{t}=(0,p.Bd)(),[s,i]=(0,n.useState)("form"),[r,o]=(0,n.useState)(()=>(e.unit_name||"").replace(/\.service$/i,"")),[c,l]=(0,n.useState)({description:"",type:"simple",exec_start:"",working_dir:"",user_:"root",restart:"no",wanted:"multi-user.target"}),[d,u]=(0,n.useState)(""),[h,m]=(0,n.useState)(""),[j,f]=(0,n.useState)(!1);(0,n.useEffect)(()=>{"edit"===e.mode&&e.unit_name&&(async()=>{f(!0);try{const t=await a.Yu.post("systemd/get/context",{unit_name:e.unit_name});if(t.code!==x.m.Success)return;const s=t.data.context??"",n=t.data.path??"";m(n),u(s),l(se(s))}finally{f(!1)}})()},[e.mode,e.unit_name]);const y=e=>{e!==s&&("text"===e?u(te(r,c)):l(se(d)),i(e))},v=e=>t=>{l(s=>({...s,[e]:t}))};return(0,w.jsxs)("div",{children:[(0,w.jsxs)("div",{style:{display:"flex",gap:"0.4rem",marginBottom:"0.6rem"},children:[(0,w.jsx)("button",{className:"button button--flat "+("form"===s?"":"button--grey"),onClick:()=>y("form"),children:t("表单")}),(0,w.jsx)("button",{className:"button button--flat "+("text"===s?"":"button--grey"),onClick:()=>y("text"),children:t("文本")})]}),j?(0,w.jsx)("div",{children:t("加载中...")}):"form"===s?(0,w.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:"0.6rem"},children:[(0,w.jsx)(g.BC,{label:t("服务名称"),children:(0,w.jsx)(g.Sm,{placeholder:t("服务名称"),value:r,disabled:"edit"===e.mode,handleInputChange:e=>o(e),width:"100%"})}),(0,w.jsx)(g.BC,{label:t("服务描述"),children:(0,w.jsx)(g.Sm,{placeholder:t("服务描述"),value:c.description,handleInputChange:v("description"),width:"100%"})}),(0,w.jsx)(g.BC,{label:t("启动命令"),required:!0,children:(0,w.jsx)(g.Sm,{placeholder:t("ExecStart 启动命令,必填"),value:c.exec_start,handleInputChange:v("exec_start"),width:"100%"})}),(0,w.jsx)(g.BC,{label:t("运行类型"),children:(0,w.jsx)(g.l6,{options:Q,value:c.type,onChange:v("type")})}),(0,w.jsx)(g.BC,{label:t("工作目录"),children:(0,w.jsx)(g.Sm,{placeholder:t("工作目录(可选)"),value:c.working_dir,handleInputChange:v("working_dir"),width:"100%"})}),(0,w.jsx)(g.BC,{label:t("运行用户"),children:(0,w.jsx)(g.Sm,{placeholder:t("运行用户(可选)"),value:c.user_,handleInputChange:v("user_"),width:"100%"})}),(0,w.jsx)(g.BC,{label:t("重启策略"),children:(0,w.jsx)(g.l6,{options:J,value:c.restart,onChange:v("restart")})}),(0,w.jsx)(g.BC,{label:t("安装目标"),children:(0,w.jsx)(g.l6,{options:ee,value:c.wanted,onChange:v("wanted")})})]}):(0,w.jsx)("textarea",{className:"input--textarea input--no_border",style:{width:"100%",minHeight:"16rem",fontFamily:"monospace",fontSize:"0.85rem",boxSizing:"border-box"},value:d,onChange:e=>u(e.target.value),spellCheck:!1}),(0,w.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",gap:"0.4rem",marginTop:"0.6rem"},children:[(0,w.jsx)("button",{className:"button button--flat button--grey",disabled:j,onClick:e.onClose,children:t("取消")}),(0,w.jsx)("button",{className:"button button--flat",disabled:j,onClick:async()=>{if(!r.trim())return void(0,_.zN)(t("请填写服务名称"));const n=(i=r).trim().endsWith(".service")?i.trim():`${i.trim()}.service`;var i;const o="text"===s?d:te(n,c);if(o.includes("ExecStart=")){f(!0);try{if("create"===e.mode){const e=`/etc/systemd/system/${n}`;await a.Yu.post("systemd/sys/save",{unit_name:n,path:e,context:o}),await a.Yu.post("systemd/sys/enable",{unit_name:n}),await a.Yu.post("systemd/add",{unit_name:n}),(0,_.SK)(t("添加成功"))}else await a.Yu.post("systemd/sys/save",{unit_name:n,path:h,context:o}),(0,_.SK)(t("保存成功"));e.onClose(),e.onDone?.()}catch(e){console.error("systemd 保存失败",e)}finally{f(!1)}}else(0,_.zN)(t("请至少填写 ExecStart 启动命令"))},children:t("保存")})]})]})}let ie,re="";function oe(e){const{t}=(0,p.Bd)(),{check_user_auth:s}=(0,S.MH)(),[o,f]=(0,m.fp)(j.AG.systemd_shell_show),[y,v]=(0,m.fp)(j.AG.confirm),[k,C]=(0,n.useState)(["pid","name","process",t("创建用户"),t("内存"),t("cpu%"),t("active状态"),t("选择")]),[A,P]=(0,n.useState)(["单元名字","加载状态",t("active(sub)状态"),t("描述"),t("选择")]),[V,$]=(0,n.useState)([]),[F,M]=(0,n.useState)([]),[N,E]=(0,n.useState)([]),[K,B]=(0,n.useState)(!1),[H,Z]=(0,n.useState)([]),[G,D]=(0,n.useState)(""),[z,W]=(0,n.useState)(""),[T,X]=(0,n.useState)(new Set),[U,q]=(0,m.fp)(j.AG.editorSetting),[L,R]=(0,m.fp)(j.AG.prompt_card);(0,n.useEffect)(()=>{W(re),(async()=>{$([]),E([]);const e=new c.hf(c.HK.systemd_inside_get);await l.ws.send(e),l.ws.addMsg(c.HK.systemd_inside_getting,e=>{const t=[];if(re){for(const s of e.context)for(const e of s)if(`${e}`.includes(re)){t.push(s);break}}else t.push(...e.context);$(t.map(e=>{const t=e.map((e,t)=>(0,w.jsx)(r.xP,{context:4===t?(0,Y.v7)(e):e}));return t.push((0,w.jsx)(u.rA,{icon:"place",title:"选中",onClick:()=>{E(t)}})),t}))})})()},[]),(0,n.useEffect)(()=>{re=z},[z]);const J=e=>{if(o.show){f({show:!1,unit_name:""});const e=new CustomEvent("cancel_systemd_logs",{detail:{}});document.dispatchEvent(e)}else f({show:!0,unit_name:e})},Q=async()=>{M([]),Z([]);const e=await a.Yu.get("systemd/inside/all");if(e.code!==x.m.Success)return;X(new Set(e.data));const t=await a.Yu.get("systemd/allget");if(t.code===x.m.Success){const e=t.data,s=[];for(const t of e??[]){const e=[(0,w.jsx)(r.xP,{context:t.unit}),t.load,`${t.active}(${t.sub})`,(0,w.jsx)(r.xP,{context:t.description})];s.push([...e,(0,w.jsx)(u.rA,{icon:"place",title:"添加",onClick:()=>{Z([...e])}})])}ie=s,M(s)}},ee=(e,s)=>{R({open:!0,title:t("create"===e?"新建 systemd 服务":"编辑 systemd 服务"),context_div:(0,w.jsx)(ne,{mode:e,unit_name:s,onClose:()=>R({open:!1}),onDone:()=>{R({open:!1}),l.ws.send(new c.hf(c.HK.systemd_inside_get)),K&&Q(),E([]),Z([])}})})};return(0,w.jsxs)("div",{children:[(0,w.jsx)(d.aZ,{children:(0,w.jsx)(u.Z$,{defaultStatus:!1,text:t("系统systemd单元"),clickFun:e=>{B(e),e?(Q(),E([])):Z([])}})}),(0,w.jsxs)(d.aZ,{position:"right",children:[s(b.oV.systemd)&&(0,w.jsx)("div",{children:(0,w.jsx)(u.rA,{icon:"add_circle",title:t("添加 systemd"),onClick:()=>{ee("create")}})}),N.length>0&&(0,w.jsx)("div",{children:N[1].props.context}),H.length>0&&(0,w.jsx)("div",{children:H[0].props.context}),N.length>0&&(0,w.jsxs)("div",{children:[s(b.oV.systemd)&&(0,w.jsx)(u.rA,{icon:"remove",title:"从实时监控删除",onClick:()=>{(async e=>{v({open:!0,handle:async()=>{(await a.Yu.post("systemd/delete",{unit_name:e})).code===x.m.Success&&((0,_.SK)("删除成功"),v({open:!1,handle:null}))}})})(N[1].props.context)}}),s(b.oV.systemd)&&(0,w.jsx)(u.rA,{icon:"edit",title:"可视化编辑",onClick:()=>{ee("edit",N[1].props.context)}}),(0,w.jsx)(u.rA,{icon:"print",title:"打印日志",onClick:()=>{J(N[1].props.context)}})]}),H.length>0&&(0,w.jsxs)("div",{children:[s(b.oV.systemd)&&(0,w.jsx)(u.rA,{icon:"delete",title:"删除系统上的sytemd",onClick:()=>{(async e=>{v({open:!0,handle:async()=>{(await a.Yu.post("systemd/sys/delete",{unit_name:e})).code===x.m.Success&&((0,_.SK)("删除成功"),v({open:!1,handle:null}))}})})(H[0].props.context)}}),(0,w.jsx)(u.rA,{icon:"print",title:"打印日志",onClick:()=>{J(H[0].props.context)}}),s(b.oV.systemd)&&(0,w.jsx)(u.rA,{icon:"text_fields",title:"sytemd文件内容",onClick:()=>{(async t=>{const s=await a.Yu.post("systemd/get/context",{unit_name:t});s.code===x.m.Success&&(q({model:"text",open:!0,fileName:e.name,save:async e=>{const n={unit_name:t,path:s.data.path,context:e};(await a.Yu.post("systemd/sys/save",n)).code===x.m.Success&&(S.xK.set_value_temp(""),q({open:!1,model:"",fileName:"",save:null}))}}),S.xK.set_value_temp(s.data.context))})(H[0].props.context)}}),s(b.oV.systemd)&&!T.has(H[0].props.context)&&(0,w.jsx)(u.rA,{icon:"plus_one",title:"添加到管理",onClick:()=>(async e=>{const t=await a.Yu.post("systemd/add",{unit_name:e});t.code===x.m.Success&&(X(new Set(t.data)),(0,_.SK)("添加成功"))})(H[0].props.context)})]})]}),(0,w.jsxs)(i.xh,{children:[K&&(0,w.jsx)(i.fI,{children:(0,w.jsx)(i.VP,{widthPer:80,children:(0,w.jsx)(r.uF,{title:`systemd系统单元(${F.length})`,titleCom:(0,w.jsx)(g.Sm,{placeholder:"过滤单元",value:G,handleInputChange:e=>{D(e)},handlerEnter:()=>{const e=[];if(G){for(const t of ie)(t[0].props.context.includes(G)||t[3].props.context.includes(G))&&e.push(t);M(e)}else M(ie)}}),children:(0,w.jsx)(h.X,{headers:A,rows:F,width:"10rem"})})})}),0===V.length&&!K&&(0,w.jsx)(I.h,{context:"没有管理的单元 or 加载中请等待..."}),0!==V.length&&!K&&(0,w.jsx)(i.fI,{children:(0,w.jsx)(i.VP,{widthPer:80,children:(0,w.jsx)(r.uF,{title:`filecat监控单元(${V.length})`,titleCom:(0,w.jsx)(g.Sm,{placeholder:"过滤单元",value:z,handleInputChange:e=>{W(e)}}),children:(0,w.jsx)(h.X,{headers:k,rows:V,width:"10rem"})})})})]}),(0,w.jsx)(O,{})]})}function ce(){const{t:e}=(0,p.Bd)(),t=[{title:e("放行"),value:"allow"},{title:e("拒绝"),value:"deny"},{title:e("限速"),value:"limit"},{title:e("拒绝响应"),value:"reject"}],s=[{title:e("入站"),value:"in"},{title:e("出站"),value:"out"}],[o,c]=(0,n.useState)(null),[l,f]=(0,n.useState)("allow"),[y,v]=(0,n.useState)("in"),[k,S]=(0,n.useState)("tcp"),[b,C]=(0,n.useState)(""),[A,P]=(0,n.useState)(""),[V,Y]=(0,n.useState)("list"),[$,F]=(0,n.useState)([]),[M,N]=(0,n.useState)(""),[E,K]=(0,n.useState)(!1),[B,H]=(0,m.fp)(j.AG.confirm),Z=async()=>{try{const e=await a.V_.get("status");e.code===x.m.Success&&c(e.data)}catch(e){}},G=async()=>{K(!0);try{const e=await a.V_.get("rules");if(e.code===x.m.Success){const t=e.data;F(t?.rules??[]),N(t?.raw??"")}}catch(e){F([]),N("")}finally{K(!1)}};(0,n.useEffect)(()=>{Z(),G()},[]);const D=!0===o?.installed,z=!0===o?.active;return(0,w.jsxs)("div",{children:[(0,w.jsxs)(d.aZ,{position:"right",children:[(0,w.jsxs)("div",{children:[e("已安装"),": ",D?(0,w.jsx)("span",{style:{color:"green"},children:"✓"}):(0,w.jsx)("span",{style:{color:"red"},children:"✗"})]}),(0,w.jsxs)("div",{children:[e("已启用"),": ",z?(0,w.jsx)("span",{style:{color:"green"},children:"✓"}):(0,w.jsx)("span",{style:{color:"gray"},children:"✗"})]}),D&&(0,w.jsx)(u.rA,{icon:"power_settings_new",title:e(z?"停用":"启用"),onClick:()=>(async t=>{try{const s=await a.V_.post("enable",{enabled:t});if(s.code!==x.m.Success)return void(0,_.zN)(s.message||e("操作失败"));(0,_.SK)(s.data||e(t?"已启用":"已停用")),Z(),G()}catch(e){}})(!z)}),(0,w.jsx)(u.rA,{icon:"refresh",title:e("刷新规则"),onClick:G})]}),(0,w.jsxs)(i.xh,{children:[(0,w.jsx)(i.fI,{children:(0,w.jsx)(i.VP,{widthPer:35,children:(0,w.jsxs)(r.uF,{title:e("添加ufw规则"),titleCom:(0,w.jsx)(u.rA,{icon:"add",title:e("添加"),onClick:async()=>{if(b.trim())try{const t=await a.V_.post("rule/add",{action:l,direction:y,proto:k,port:b.trim(),from:"in"===y&&A.trim()||void 0});if(t.code!==x.m.Success)return void(0,_.zN)(t.message||e("操作失败"));(0,_.SK)(t.data||e("已添加")),G()}catch(e){}else(0,_.zN)(e("请填写端口号"))}}),children:[(0,w.jsx)(g.BC,{label:e("动作"),label_width:"4rem",input_max_width:"8rem",children:(0,w.jsx)(g.l6,{options:t,value:l,onChange:e=>f(e),defaultValue:"allow"})}),(0,w.jsx)(g.BC,{label:e("方向"),label_width:"4rem",input_max_width:"8rem",children:(0,w.jsx)(g.l6,{options:s,value:y,onChange:e=>v(e),defaultValue:"in"})}),(0,w.jsx)(g.BC,{label:e("协议"),label_width:"4rem",input_max_width:"8rem",children:(0,w.jsx)(g.l6,{options:[{title:"tcp",value:"tcp"},{title:"udp",value:"udp"}],value:k,onChange:e=>S(e),defaultValue:"tcp"})}),(0,w.jsx)(g.BC,{label:e("端口"),label_width:"4rem",required:!0,children:(0,w.jsx)(g.Sm,{maxWidth:"20rem",placeholder:e("可填范围如 1000:2000"),value:b,handleInputChange:e=>C(e)})}),"in"===y&&(0,w.jsx)(g.BC,{label:e("来源"),label_width:"4rem",children:(0,w.jsx)(g.Sm,{maxWidth:"20rem",placeholder:e("IP/网段,可选"),value:A,handleInputChange:e=>P(e)})})]})})}),(0,w.jsx)(i.fI,{children:(0,w.jsx)(i.VP,{widthPer:80,children:(0,w.jsxs)(r.uF,{title:e("规则列表"),titleCom:(0,w.jsxs)("div",{style:{display:"flex",gap:"0.4rem"},children:[(0,w.jsx)(u.C3,{text:e("名单视图"),clickFun:()=>Y("list")}),(0,w.jsx)(u.C3,{text:e("文本视图"),clickFun:()=>Y("text")})]}),children:[E&&(0,w.jsx)(I.h,{context:e("加载中...")}),!E&&"list"===V&&(0===$.length?(0,w.jsx)(I.h,{context:e("暂无规则")}):(0,w.jsx)(h.X,{headers:[e("编号"),e("目标(To)"),e("动作"),e("fw_from"),e("备注"),e("操作")],rows:$.map(t=>[t.number,(0,w.jsx)(r.xP,{context:t.to,tip_context:t.to}),t.action,t.from?(0,w.jsx)(r.xP,{context:t.from,tip_context:t.from}):"",t.description||"",(0,w.jsx)(u.rA,{icon:"delete",title:e("删除规则"),onClick:()=>(async(t,s,n)=>{H({open:!0,title:e("确定删除吗?"),sub_title:e(`${s} ${n}`),handle:async()=>{try{const s=await a.V_.post("ufw/rule/del",{number:t});if(s.code!==x.m.Success)return void(0,_.zN)(s.message||e("操作失败"));(0,_.SK)(s.data||e("规则已删除")),H({open:!1,handle:null}),G()}catch(e){}}})})(t.number,t.to,t.from)})]),width:"8rem"})),!E&&"text"===V&&(M?(0,w.jsx)("pre",{style:{whiteSpace:"pre-wrap",wordBreak:"break-all",fontSize:"0.85rem",margin:0},children:M}):(0,w.jsx)(I.h,{context:e("暂无规则")}))]})})})]})]})}function le(e){const{t}=(0,p.Bd)(),[s,n]=(0,m.fp)(j.AG.user_base_info),r=[{index:1,name:t("系统性能"),rto:"sys/",component:(0,w.jsx)(F,{})},{index:2,name:t("系统进程"),rto:"process/",component:(0,w.jsx)(L,{})},{index:3,name:t("doc_ct"),rto:"docker/",component:(0,w.jsx)(W,{})}];if(s.sys===b.XM.linux){(s.user_data?.is_root||(s.user_data?.auth_list??[]).includes(b.oV.systemd))&&r.push({index:4,name:t("systemd"),rto:"systemd/",component:(0,w.jsx)(oe,{})});(s.user_data?.is_root||(s.user_data?.auth_list??[]).includes(b.oV.firewall))&&s.sysSoftWare?.[f.jk.ufw]?.installed&&r.push({index:5,name:t("防火墙"),rto:"firewall/",component:(0,w.jsx)(ce,{})})}return(0,w.jsx)(i.W1,{optionList:r,father_route:Z.o.info})}}}]);
|