filecat 5.2.0 → 5.3.1

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.
Files changed (97) hide show
  1. package/build/dist/{100.64207a3b8bb7ea9a4a8c.js → 100.1100f03272726dcab961.js} +2 -2
  2. package/build/dist/100.1100f03272726dcab961.js.LICENSE.txt +1 -0
  3. package/build/dist/181.4bf3187d0433c2a35a2c.js +2 -0
  4. package/build/dist/181.4bf3187d0433c2a35a2c.js.LICENSE.txt +1 -0
  5. package/build/dist/29.ccb6a0c1c28df0b823c0.js +2 -0
  6. package/build/dist/29.ccb6a0c1c28df0b823c0.js.LICENSE.txt +1 -0
  7. package/build/dist/308.21e5d8bdfde58f421c2b.js +2 -0
  8. package/build/dist/308.21e5d8bdfde58f421c2b.js.LICENSE.txt +1 -0
  9. package/build/dist/402.483375aaa84fbee09bcb.js +2 -0
  10. package/build/dist/402.483375aaa84fbee09bcb.js.LICENSE.txt +1 -0
  11. package/build/dist/432.74539b8dfd4e8aea0158.js +2 -0
  12. package/build/dist/432.74539b8dfd4e8aea0158.js.LICENSE.txt +1 -0
  13. package/build/dist/441.19783532a702634c183f.js +2 -0
  14. package/build/dist/441.19783532a702634c183f.js.LICENSE.txt +1 -0
  15. package/build/dist/445.ea569bbb50cbe31fb4a2.js +2 -0
  16. package/build/dist/445.ea569bbb50cbe31fb4a2.js.LICENSE.txt +1 -0
  17. package/build/dist/467.a025d464933983a76b97.js +2 -0
  18. package/build/dist/467.a025d464933983a76b97.js.LICENSE.txt +1 -0
  19. package/build/dist/502.b0d5f9cf08dcf45c68a7.js +2 -0
  20. package/build/dist/502.b0d5f9cf08dcf45c68a7.js.LICENSE.txt +1 -0
  21. package/build/dist/523.d9bbb4528eb21c7e082a.js +2 -0
  22. package/build/dist/523.d9bbb4528eb21c7e082a.js.LICENSE.txt +1 -0
  23. package/build/dist/542.052ecfb0f594fd6f1e80.js +2 -0
  24. package/build/dist/542.052ecfb0f594fd6f1e80.js.LICENSE.txt +1 -0
  25. package/build/dist/567.8f2c4230393161c4dab4.js +2 -0
  26. package/build/dist/567.8f2c4230393161c4dab4.js.LICENSE.txt +1 -0
  27. package/build/dist/602.966769eb0cb217e4dbdc.js +2 -0
  28. package/build/dist/602.966769eb0cb217e4dbdc.js.LICENSE.txt +1 -0
  29. package/build/dist/636.5848f3ff3c0a6b3ef049.js +2 -0
  30. package/build/dist/636.5848f3ff3c0a6b3ef049.js.LICENSE.txt +1 -0
  31. package/build/dist/654.51eee04a7329fc954a5d.js +2 -0
  32. package/build/dist/654.51eee04a7329fc954a5d.js.LICENSE.txt +1 -0
  33. package/build/dist/659.e1276f69cfeff679a4dd.js +2 -0
  34. package/build/dist/659.e1276f69cfeff679a4dd.js.LICENSE.txt +1 -0
  35. package/build/dist/674.80d6f27efa6cb21990a5.js +2 -0
  36. package/build/dist/674.80d6f27efa6cb21990a5.js.LICENSE.txt +1 -0
  37. package/build/dist/811.46c14bd0ce878cab02b4.js +2 -0
  38. package/build/dist/811.46c14bd0ce878cab02b4.js.LICENSE.txt +1 -0
  39. package/build/dist/892.c600dcee81bf6ce19af3.js +2 -0
  40. package/build/dist/892.c600dcee81bf6ce19af3.js.LICENSE.txt +1 -0
  41. package/build/dist/{943.821adfd29386d0becda0.js → 943.870059ca86debec3f57a.js} +2 -2
  42. package/build/dist/960.049f733aaff457c68626.js +2 -0
  43. package/build/dist/995.d9b2e463276f4ca88318.js +2 -0
  44. package/build/dist/995.d9b2e463276f4ca88318.js.LICENSE.txt +1 -0
  45. package/build/dist/998.2810c4409485d9c5b459.js +2 -0
  46. package/build/dist/998.2810c4409485d9c5b459.js.LICENSE.txt +1 -0
  47. package/build/dist/index.html +1 -1
  48. package/build/dist/{main.dc30e7fa7919ed14c7fe.js → main.0a3c4438e514a9450b41.js} +2 -2
  49. package/build/dist/{main.dc30e7fa7919ed14c7fe.js.LICENSE.txt → main.0a3c4438e514a9450b41.js.LICENSE.txt} +1 -1
  50. package/build/main.js +1 -1
  51. package/package.json +1 -1
  52. package/build/dist/100.64207a3b8bb7ea9a4a8c.js.LICENSE.txt +0 -1
  53. package/build/dist/181.128390508f49f2ff3de6.js +0 -2
  54. package/build/dist/181.128390508f49f2ff3de6.js.LICENSE.txt +0 -1
  55. package/build/dist/29.afc5801d3e4eba212a81.js +0 -2
  56. package/build/dist/29.afc5801d3e4eba212a81.js.LICENSE.txt +0 -1
  57. package/build/dist/308.fdab4f1b09a9556bbcfd.js +0 -2
  58. package/build/dist/308.fdab4f1b09a9556bbcfd.js.LICENSE.txt +0 -1
  59. package/build/dist/402.f5aaf020a2e40c98e45a.js +0 -2
  60. package/build/dist/402.f5aaf020a2e40c98e45a.js.LICENSE.txt +0 -1
  61. package/build/dist/432.348849454ef22be7b914.js +0 -2
  62. package/build/dist/432.348849454ef22be7b914.js.LICENSE.txt +0 -1
  63. package/build/dist/441.8196626aec2941142764.js +0 -2
  64. package/build/dist/441.8196626aec2941142764.js.LICENSE.txt +0 -1
  65. package/build/dist/445.5acc66a00dd5b30defcf.js +0 -2
  66. package/build/dist/445.5acc66a00dd5b30defcf.js.LICENSE.txt +0 -1
  67. package/build/dist/467.eaae8d396d50288623e1.js +0 -2
  68. package/build/dist/467.eaae8d396d50288623e1.js.LICENSE.txt +0 -1
  69. package/build/dist/502.8b581e7886286567121e.js +0 -2
  70. package/build/dist/502.8b581e7886286567121e.js.LICENSE.txt +0 -1
  71. package/build/dist/523.54b06a9f2e958469519a.js +0 -2
  72. package/build/dist/523.54b06a9f2e958469519a.js.LICENSE.txt +0 -1
  73. package/build/dist/542.4bf1399e457da8a76668.js +0 -2
  74. package/build/dist/542.4bf1399e457da8a76668.js.LICENSE.txt +0 -1
  75. package/build/dist/567.7ae59d8dfeb8890c5fc8.js +0 -2
  76. package/build/dist/567.7ae59d8dfeb8890c5fc8.js.LICENSE.txt +0 -1
  77. package/build/dist/602.2b2ee33c90538c42bcac.js +0 -2
  78. package/build/dist/602.2b2ee33c90538c42bcac.js.LICENSE.txt +0 -1
  79. package/build/dist/636.dff6c9cb7d0fb7032a93.js +0 -2
  80. package/build/dist/636.dff6c9cb7d0fb7032a93.js.LICENSE.txt +0 -1
  81. package/build/dist/654.eb0c8a3032d47a77c5a6.js +0 -2
  82. package/build/dist/654.eb0c8a3032d47a77c5a6.js.LICENSE.txt +0 -1
  83. package/build/dist/659.c5a239c2f8f8872cfed0.js +0 -2
  84. package/build/dist/659.c5a239c2f8f8872cfed0.js.LICENSE.txt +0 -1
  85. package/build/dist/674.d9572e2ef61fbb679acc.js +0 -2
  86. package/build/dist/674.d9572e2ef61fbb679acc.js.LICENSE.txt +0 -1
  87. package/build/dist/811.b0f9ed14de495ca7759c.js +0 -2
  88. package/build/dist/811.b0f9ed14de495ca7759c.js.LICENSE.txt +0 -1
  89. package/build/dist/892.8e4fcfe49693b220c83e.js +0 -2
  90. package/build/dist/892.8e4fcfe49693b220c83e.js.LICENSE.txt +0 -1
  91. package/build/dist/960.f1dde940c5a55787e620.js +0 -2
  92. package/build/dist/995.6eccaa83ff5c78010a01.js +0 -2
  93. package/build/dist/995.6eccaa83ff5c78010a01.js.LICENSE.txt +0 -1
  94. package/build/dist/998.cc16015411a639e6206a.js +0 -2
  95. package/build/dist/998.cc16015411a639e6206a.js.LICENSE.txt +0 -1
  96. /package/build/dist/{943.821adfd29386d0becda0.js.LICENSE.txt → 943.870059ca86debec3f57a.js.LICENSE.txt} +0 -0
  97. /package/build/dist/{960.f1dde940c5a55787e620.js.LICENSE.txt → 960.049f733aaff457c68626.js.LICENSE.txt} +0 -0
@@ -1,2 +0,0 @@
1
- /*! For license information please see 441.8196626aec2941142764.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[441],{3441:(t,e,r)=>{r.r(e),r.d(e,{default:()=>se});var n=r(6540),o=r(5725),a=r(447),i=r(6349);function c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return u(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}const l=function(t){var e=t.percentage,r=(0,n.useRef)(null),o=c((0,n.useState)(null),2),a=o[0],u=o[1];return(0,n.useEffect)((function(){var t=r.current.getContext("2d"),n=new i.Ay(t,{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 u(n),function(){n.destroy()}}),[]),(0,n.useEffect)((function(){a&&(a.data.datasets[0].data=[e,100-e],a.update())}),[e]),n.createElement("div",{style:{width:"8rem",overflow:"hidden"}},n.createElement("canvas",{ref:r}))};var s=r(4238),f=r(4944),h=r(6007),p=r(7952),y=r(5997),d=r(7481),m=r(3459),v=r(2389),g=r(7444),w=r(6417),b=r(4777),E=r(2042);function x(t){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},x(t)}function _(){_=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new C(n||[]);return o(i,"_invoke",{value:j(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var E=Object.getPrototypeOf,S=E&&E(E(F([])));S&&S!==r&&n.call(S,i)&&(b=S);var k=w.prototype=v.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==x(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function j(e,r,n){var o=h;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function F(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(x(e)+" is not iterable")}return g.prototype=w,o(k,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},L(A.prototype),l(A.prototype,c,(function(){return this})),e.AsyncIterator=A,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new A(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(k),l(k,u,"Generator"),l(k,i,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=F,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(I),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;I(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:F(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function S(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=A(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function k(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function L(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||A(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(t,e){if(t){if("string"==typeof t)return j(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?j(t,e):void 0}}function j(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function O(t){var e=(0,v.Bd)().t,r=L((0,g.L4)(w.A.disk),2),i=(r[0],r[1]),c=L((0,n.useState)({}),2),u=c[0],l=c[1],s=L((0,n.useState)([]),2),f=s[0],b=s[1],E=[e("名字"),e("当前值"),e("历史最低"),e("临界值")],x=function(){var r,o=(r=_().mark((function r(){var o,a,i,c,u,s,f;return _().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,h.Yu.post("sys/disk/info",{name:t.name});case 2:if((o=r.sent).code===m.m.Sucess){i=[],c=S(null!==(a=o.data.ata_smart_attributes)&&void 0!==a?a:[]);try{for(c.s();!(u=c.n()).done;)s=u.value,f=void 0,s[1]>=s[2]?f="var(--icon-green)":s[1]<=s[3]&&(f="var(--icon-red)"),s[0]=n.createElement("span",{style:{color:f}},e(s[0])),i.push(s)}catch(t){c.e(t)}finally{c.f()}b(o.data.ata_smart_attributes),l(o.data)}case 4:case"end":return r.stop()}}),r)})),function(){var t=this,e=arguments;return new Promise((function(n,o){var a=r.apply(t,e);function i(t){k(a,n,o,i,c,"next",t)}function c(t){k(a,n,o,i,c,"throw",t)}i(void 0)}))});return function(){return o.apply(this,arguments)}}();return(0,n.useEffect)((function(){x()}),[u]),n.createElement("div",null,n.createElement(p.A,null,n.createElement(y.rA,{icon:"close",title:e("关闭"),onClick:function(){i({})}})),n.createElement(o.jW,{isFull:!0,more:!0},n.createElement(o.NN,null,n.createElement(o.fI,null,n.createElement(o.VP,{widthPer:30},n.createElement(o.xh,null,n.createElement(a.Zp,{title:e("基本信息")},n.createElement(o.Yh,{left:e("名字"),right:t.name}),n.createElement(o.Yh,{left:e("厂商名称"),right:t.typeName}),n.createElement(o.Yh,{left:e("类型"),right:t.type}),n.createElement(o.Yh,{left:e("容量"),right:t.total}))),n.createElement(o.xh,null,n.createElement(a.Zp,{title:e("物理信息")},n.createElement(o.Yh,{left:e("是否健康"),right:!0===u.smart_status?"是":"否"}),n.createElement(o.Yh,{left:e("设备型号"),right:u.model_name}),n.createElement(o.Yh,{left:e("序列号"),right:u.serial_number}),n.createElement(o.Yh,{left:e("固件版本"),right:u.firmware_version}),n.createElement(o.Yh,{left:e("转速(每分钟)"),right:u.rotation_rate}),n.createElement(o.Yh,{left:e("通电时长(小时)"),right:u.power_on_time_hours}),n.createElement(o.Yh,{left:e("通电次数"),right:u.power_cycle_count}),n.createElement(o.Yh,{left:e("温度(°C)"),right:u.temperature}),n.createElement(o.Yh,{left:e("通信协议"),right:u.device_protocol})))),n.createElement(o.VP,{widthPer:50},n.createElement(o.xh,null,n.createElement(a.uF,{title:e("SMART详细信息")},n.createElement(d.X,{headers:E,rows:f,width:"10rem"}))))))))}var P=function(t){return t[t.mount=0]="mount",t}({}),I=r(8062),C=r(8247),F=r(3430);function N(t){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},N(t)}function T(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=H(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function G(){G=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:L(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(I([])));x&&x!==r&&n.call(x,i)&&(b=x);var _=w.prototype=v.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==N(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function L(e,r,n){var o=h;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=A(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function A(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(N(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},S(k.prototype),l(k.prototype,c,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new k(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},S(_),l(_,u,"Generator"),l(_,i,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function Y(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function M(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){Y(a,n,o,i,c,"next",t)}function c(t){Y(a,n,o,i,c,"throw",t)}i(void 0)}))}}function V(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||H(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function H(t,e){if(t){if("string"==typeof t)return K(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?K(t,e):void 0}}function K(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var $=function(t){return n.createElement("div",{style:{border:"2px solid black",padding:"10px",width:"300px",height:"300px",position:"relative"}},t.name,t.lvms.map((function(t,e){return n.createElement("div",{key:e,style:{margin:"5px",height:"".concat(40,"px"),display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid "}},t.name)})))};function U(){return n.createElement("div",{style:{position:"relative",height:"300px",margin:"10px",width:"30px",display:"flex",alignItems:"center",justifyContent:"center"}},n.createElement("div",{style:{width:0,height:0,borderTop:"10px solid transparent",borderBottom:"10px solid transparent",borderLeft:"10px solid black"}}))}function W(){var t=(0,v.Bd)().t,e=V((0,g.L4)(w.A.disk),2),r=(e[0],e[1]),i=V((0,n.useState)({}),2),c=i[0],u=(i[1],V((0,n.useState)([]),2)),l=u[0],s=u[1],f=V((0,n.useState)([]),2),b=f[0],x=f[1],_=V((0,g.L4)(w.A.showPrompt),2),S=(_[0],_[1],(0,C.MH)().check_user_auth),k=V((0,n.useState)([]),2),L=k[0],A=(k[1],(0,C.kZ)().click_file),j=V((0,g.L4)(w.A.prompt_card),2),O=(j[0],j[1]),N=[t("挂载点"),"uuid",t("类型"),t("文件系统类型"),t("文件系统容量"),t("卷容量"),t("设备路径"),t("分区表类型")],Y=function(){var t=M(G().mark((function t(){var e;return G().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,h.Yu.get("disk/blk");case 2:return(e=t.sent).code===m.m.Sucess&&s(e.data),t.abrupt("return",e.code);case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),H=function(){var t=M(G().mark((function t(){return G().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:Y();case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();(0,n.useEffect)((function(){H()}),[c]);return n.createElement("div",null,n.createElement(p.A,null,n.createElement(y.rA,{icon:"close",title:t("关闭"),onClick:function(){r({})}})),n.createElement(o.jW,{isFull:!0,more:!0},n.createElement(o.NN,null,n.createElement(o.fI,null,n.createElement(o.VP,{widthPer:40},n.createElement(a.Zp,{title:t("物理块(硬盘)设备、逻辑卷、物理卷"),titleCom:n.createElement("div",null,S(F.oV.sys_disk_mount)&&n.createElement(y.rA,{icon:"file_open",title:t("打开挂载文件"),onClick:M(G().mark((function e(){return G().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:A({name:"fstab(谨慎修改,内容错误会导致系统无法启动)",model:"text",sys_path:"/etc/fstab",menu_list:[n.createElement(y.rA,{icon:"info",title:t("提示"),onClick:M(G().mark((function t(){return G().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:O({open:!0,title:"信息",context_div:n.createElement("div",null,n.createElement("ul",null,n.createElement("li",null,"通用格式:","<文件系统> <挂载点> <类型> <挂载选项> <dump> <fsck> "),n.createElement("li",null,"文件系统,有多种格式",n.createElement("ul",null,n.createElement("li",null,"1(usb口默认名称)./dev/sda1"),n.createElement("li",null,"2(唯一Id).UUID=123e4567-e89b-12d3-a456-426614174000"),n.createElement("li",null,"3.LABEL=DATA"))),n.createElement("li",null,"挂载点,就是文件路径,例如 /mnt/data ,这个目录要提前创建,且为空"),n.createElement("li",null,"类型,就是文件系统类型,对于系统不支持的类型,例如ntfs需要额外前提安装ntfs-3g"),n.createElement("li",null,'挂载选项的值只能是以下这些,可以用 "," 同时使用多个选项',n.createElement("ul",null,n.createElement("li",null,"defaults:使用默认挂载选项"),n.createElement("li",null,"noatime:不更新访问时间,提高性能"),n.createElement("li",null,"auto:系统启动时自动挂载"),n.createElement("li",null,"rw:以读写方式挂载"),n.createElement("li",null,"nofail:防止启动阻塞,挂载失败系统继续执行"),n.createElement("li",null,"...等"))),n.createElement("li",null,"dump 0是需要备份 1是不需要备份"),n.createElement("li",null,"Fsck 整数值0是不检查,文件系统检查顺序越小越先检查"),n.createElement("li",null,"提示:只有含有文件系统的逻辑卷,或者分区才可以进行挂载。")))});case 1:case"end":return t.stop()}}),t)})))}),n.createElement(y.rA,{key:1,icon:"update",title:t("更新挂载"),onClick:M(G().mark((function t(){return G().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,h.Yu.post("cmd/exe",{type:P.mount});case 2:t.sent.code===m.m.Sucess&&(0,E.LW)("挂载文件已生效");case 4:case"end":return t.stop()}}),t)})))})]});case 1:case"end":return e.stop()}}),e)})))}),n.createElement(y.rA,{icon:"update",title:t("刷新"),onClick:M(G().mark((function t(){return G().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Y();case 2:if(t.t0=t.sent,t.t1=m.m.Sucess,t.t0!==t.t1){t.next=6;break}(0,E.LW)("刷新成功");case 6:case"end":return t.stop()}}),t)})))}))},n.createElement(d.X,{headers:N,rows:b,width:"10rem"}),n.createElement(I.A,{list:l,render:function(t){var e=t.name;return t.label&&(e+="(".concat(t.label,")")),t.mountpoint?n.createElement("span",null,e,n.createElement("span",{style:{color:"green"}},"(已挂载)")):e},onContextMenu:function(t,e){t.preventDefault()},click:function(e){var r="";if(e.mountpoint)for(var o=0;o<e.mountpoints.length;o++)r+=e.mountpoints[o]+";";x([[n.createElement(a.xP,null,r),n.createElement(a.xP,null,e.uuid),t(e.type),t(e.fstype),e.fssize,e.size,n.createElement(a.xP,null,e.path),e.pttype]])}}))),n.createElement(o.VP,{widthPer:60},L.map((function(e,r){var i,c=[],u=T(e.pv_list);try{for(u.s();!(i=u.n()).done;){var l=i.value;c.push({name:"".concat(l.name,"---(").concat(l.size,")---(").concat(l.free_size,")")})}}catch(t){u.e(t)}finally{u.f()}var s,f=[],h=T(e.lv_list);try{for(h.s();!(s=h.n()).done;){var p=s.value;f.push({name:"".concat(p.name,"---(").concat(p.size,")")})}}catch(t){h.e(t)}finally{h.f()}return n.createElement(a.Zp,{key:r},n.createElement(o.n5,null,n.createElement($,{name:t("物理卷"),lvms:c}),n.createElement(U,null),n.createElement($,{name:"".concat(t("逻辑卷"),"---(").concat(e.name,")---size(").concat(e.size,")"),lvms:[]}),n.createElement(U,null),n.createElement($,{name:t("逻辑卷"),lvms:f})))})))))))}function Z(t){return Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Z(t)}function B(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=J(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function z(){z=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:L(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(I([])));x&&x!==r&&n.call(x,i)&&(b=x);var _=w.prototype=v.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==Z(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function L(e,r,n){var o=h;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=A(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function A(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(Z(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},S(k.prototype),l(k.prototype,c,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new k(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},S(_),l(_,u,"Generator"),l(_,i,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function X(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function D(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){X(a,n,o,i,c,"next",t)}function c(t){X(a,n,o,i,c,"throw",t)}i(void 0)}))}}function R(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||J(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function J(t,e){if(t){if("string"==typeof t)return q(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?q(t,e):void 0}}function q(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var Q=!0;function tt(t){var e=(0,v.Bd)().t,r=[e("名字"),e("厂商名称"),e("类型"),e("容量")],i=[e("名字"),e("物理硬盘"),e("文件系统类型"),e("挂载位置"),e("总容量"),e("剩余容量")],c=R((0,g.L4)(w.A.user_base_info),2),u=c[0],x=(c[1],R((0,n.useState)(0),2)),_=x[0],S=x[1],k=R((0,n.useState)(0),2),L=k[0],A=k[1],j=R((0,n.useState)(0),2),P=j[0],I=j[1],C=R((0,n.useState)(0),2),N=C[0],T=C[1],G=R((0,n.useState)({}),2),Y=G[0],M=G[1],V=R((0,n.useState)(!1),2),H=V[0],K=V[1],$=R((0,n.useState)(!1),2),U=$[0],Z=$[1],X=R((0,n.useState)(!1),2),J=X[0],q=X[1],tt=R((0,n.useState)(Q),2),et=tt[0],rt=tt[1],nt=R((0,n.useState)([]),2),ot=nt[0],at=nt[1],it=R((0,n.useState)([]),2),ct=it[0],ut=it[1],lt=R((0,g.L4)(w.A.user_base_info),2),st=lt[0],ft=(lt[1],R((0,g.L4)(w.A.disk),2)),ht=ft[0],pt=ft[1],yt=function(){var t=D(z().mark((function t(){var e;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Q){t.next=3;break}return f.ws.unConnect(),t.abrupt("return");case 3:return e=new s.hf(s.HK.sys_get),t.next=6,f.ws.send(e);case 6:f.ws.addMsg(s.HK.sys_getting,(function(t){var e,r,n;T(null===(e=t.context)||void 0===e?void 0:e.cpu_currentLoad);var o=null===(r=t.context)||void 0===r?void 0:r.memLeft,a=null===(n=t.context)||void 0===n?void 0:n.memTotal;A(o),I(a),S((a-o)/a*100)}));case 7:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),dt=function(){var t=D(z().mark((function t(){return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,yt();case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),mt=function(){var t=D(z().mark((function t(){var e,r;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,h.Yu.get("base");case 2:(e=t.sent).code===m.m.Sucess&&(r=e.data,M(r));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),vt=function(){var t=D(z().mark((function t(){var r,o,i,c,u,l,s;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,h.Yu.get("disk");case 2:if((r=t.sent).code!==m.m.Sucess){t.next=25;break}o=r.data,i=[],c=!0,st.sysSoftWare&&st.sysSoftWare[b.jk.smartmontools]&&st.sysSoftWare[b.jk.smartmontools].installed||(c=!1),u=B(null!=o?o:[]),t.prev=9,s=z().mark((function t(){var r;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=l.value,i.push([n.createElement(a.xP,{context:r.name}),r.typeName,r.type,r.total,n.createElement(y.rA,{icon:"health_and_safety",title:e("查看健康信息"),onClick:function(){c?pt({type:"check",data:r}):(0,E.zN)("没有安装smartmontools")}})]);case 2:case"end":return t.stop()}}),t)})),u.s();case 12:if((l=u.n()).done){t.next=16;break}return t.delegateYield(s(),"t0",14);case 14:t.next=12;break;case 16:t.next=21;break;case 18:t.prev=18,t.t1=t.catch(9),u.e(t.t1);case 21:return t.prev=21,u.f(),t.finish(21);case 24:at(i);case 25:case"end":return t.stop()}}),t,null,[[9,18,21,24]])})));return function(){return t.apply(this,arguments)}}(),gt=function(){var t=D(z().mark((function t(){var e,r,o,i,c,u;return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,h.Yu.get("filedisk");case 2:if((e=t.sent).code===m.m.Sucess){r=e.data,o=[],i=B(null!=r?r:[]);try{for(i.s();!(c=i.n()).done;)u=c.value,o.push([n.createElement(a.xP,{context:u.name}),n.createElement(a.xP,{context:u.device_name}),u.fsType,n.createElement(a.xP,{context:u.mount}),u.total,u.available])}catch(t){i.e(t)}finally{i.f()}ut(o)}case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return(0,n.useEffect)((function(){return dt(),function(){D(z().mark((function t(){return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:f.ws.isAilive()&&f.ws.setPromise(function(){var t=D(z().mark((function t(e){return z().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,f.ws.unConnect();case 2:e();case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 1:case"end":return t.stop()}}),t)})))()}}),[]),n.createElement("div",null,n.createElement(p.A,null,u.sys===F.XM.linux&&n.createElement(y.rA,{icon:"sd_card",title:"硬盘挂载",onClick:function(){pt({type:"mount"})}}),n.createElement(y.Z$,{defaultStatus:!1,text:e("基本信息"),clickFun:function(t){K(t),t&&mt()}}),n.createElement(y.Z$,{defaultStatus:!1,text:e("物理硬盘"),clickFun:function(t){Z(t),t&&vt()}}),n.createElement(y.Z$,{defaultStatus:!1,text:e("文件硬盘"),clickFun:function(t){q(t),t&&gt()}}),n.createElement(y.Z$,{defaultStatus:et,text:e("实时信息"),clickFun:function(t){rt(t),Q=t,yt()}})),n.createElement(o.xh,null,et&&n.createElement(o.fI,null,n.createElement(o.VP,{widthPer:33},n.createElement(a.Zp,{title:e("内存")},n.createElement(o.fI,null,n.createElement(o.VP,null,n.createElement(l,{percentage:_})),n.createElement(o.VP,null,n.createElement(o.fI,null,n.createElement(o.VP,{widthPer:100},n.createElement("div",null,n.createElement(o.Yh,{left:e("总容量"),center:"".concat(P,"G")}))),n.createElement(o.VP,{widthPer:100},n.createElement(o.Yh,{left:e("剩余"),center:"".concat(L,"G")}))))))),n.createElement(o.VP,{widthPer:33},n.createElement(a.Zp,{title:"cpu"},n.createElement(o.fI,null,n.createElement(o.VP,null,n.createElement(l,{percentage:N})),n.createElement(o.VP,null,n.createElement(o.fI,null,n.createElement(o.Yh,{left:e("使用率"),center:N}))))))),n.createElement(o.fI,null,H&&n.createElement(o.VP,null,n.createElement(a.Zp,{title:e("基本信息")},n.createElement(o.Yh,{left:e("总内存"),right:Y.mem_total}),n.createElement(o.Yh,{left:"cpu ".concat(e("制造商")),right:Y.cpu_manufacturer}),n.createElement(o.Yh,{left:"cpu ".concat(e("品牌")),right:Y.cpu_brand}),n.createElement(o.Yh,{left:"cpu ".concat(e("逻辑核心")),right:Y.cpu_core_num}),n.createElement(o.Yh,{left:"cpu ".concat(e("物理核心")),right:Y.cpu_phy_core_num}),n.createElement(o.Yh,{left:"cpu ".concat(e("最大"),"hz"),right:Y.cpu_speed_hz}),n.createElement(o.Yh,{left:"".concat(e("当前系统"),":pid;ppid"),right:Y.pid_ppid}),n.createElement(o.Yh,{left:e("运行用户"),right:Y.user}))),U&&n.createElement(o.VP,null,n.createElement(a.uF,{title:e("物理硬盘")},n.createElement(d.X,{headers:r,rows:ot,width:"10rem"}))),J&&n.createElement(o.VP,null,n.createElement(a.uF,{title:e("文件硬盘")},n.createElement(d.X,{headers:i,rows:ct,width:"10rem"}))))),ht&&"check"===ht.type&&n.createElement(O,ht.data),ht&&"mount"===ht.type&&n.createElement(W,null))}function et(t){return n.createElement("h2",{className:"message"},n.createElement("i",{className:"material-icons"},"sentiment_dissatisfied"),n.createElement("span",null,t.context))}var rt=r(3033),nt=r(7856),ot=r(4405);function at(t){return at="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},at(t)}function it(){it=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:L(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(I([])));x&&x!==r&&n.call(x,i)&&(b=x);var _=w.prototype=v.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==at(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function L(e,r,n){var o=h;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=A(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function A(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(at(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},S(k.prototype),l(k.prototype,c,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new k(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},S(_),l(_,u,"Generator"),l(_,i,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function ct(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function ut(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){ct(a,n,o,i,c,"next",t)}function c(t){ct(a,n,o,i,c,"throw",t)}i(void 0)}))}}function lt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return st(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?st(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function st(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var ft=n.lazy((function(){return r.e(614).then(r.bind(r,5614))}));function ht(t){var e=lt((0,n.useState)(null),2),r=e[0],o=e[1],a=lt((0,g.L4)(w.A.dockerShellShow),2),i=a[0],c=(a[1],lt((0,g.L4)(w.A.user_base_info),2)),u=c[0],l=(c[1],"dark"===u.user_data.theme?"#FFFFFF":"#000000"),h=function(){var t=ut(it().mark((function t(){var e,r,n;return it().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=new nt.Terminal({fontFamily:"Monaco, Menlo, Consolas, 'Courier New', monospace",theme:{background:"#FFFFFF",foreground:l,cursor:l,selectionBackground:"#a6d2ff"},cursorBlink:!0,cursorStyle:"bar",scrollback:1e3,scrollSensitivity:1,tabStopWidth:4,convertEol:!0}),f.ws.subscribeUnconnect(p),n=function(t){e.write(t)},r=function(t){e.clear(),e.write(t),r=n},f.ws.addMsg("logs"===i.type?s.HK.docker_shell_logs_getting:s.HK.docker_shell_exec_getting,(function(t){"error"===t.context&&p(),r(t.context)})),"exec"===i.type&&e.onData(function(){var t=ut(it().mark((function t(e){var r;return it().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new s.hf(s.HK.docker_shell_exec)).context=e,t.next=4,f.ws.send(r);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),o(e);case 7:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),p=function(){ut(it().mark((function t(){return it().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r&&(r.writeln("close! "),r.dispose(),o(null));case 1:case"end":return t.stop()}}),t)})))()};(0,n.useEffect)((function(){i.show?h():p()}),[i]),(0,n.useEffect)((function(){return function(){p()}}),[]);return n.createElement(ft,{show:i.show,terminal:r,init:function(t,e){r.writeln("connect... ");var n,o=new ot.n;o.rows=t,o.cols=e,o.dockerId=i.dockerId,(n="logs"===i.type?new s.hf(s.HK.docker_shell_logs):new s.hf(s.HK.docker_shell_exec_open)).context=o,f.ws.send(n)}})}var pt=r(7567);function yt(t){return yt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yt(t)}function dt(){dt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:L(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(I([])));x&&x!==r&&n.call(x,i)&&(b=x);var _=w.prototype=v.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==yt(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function L(e,r,n){var o=h;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=A(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function A(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(yt(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},S(k.prototype),l(k.prototype,c,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new k(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},S(_),l(_,u,"Generator"),l(_,i,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function mt(t){return function(t){if(Array.isArray(t))return xt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Et(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vt(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Et(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function gt(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function wt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){gt(a,n,o,i,c,"next",t)}function c(t){gt(a,n,o,i,c,"throw",t)}i(void 0)}))}}function bt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||Et(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Et(t,e){if(t){if("string"==typeof t)return xt(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?xt(t,e):void 0}}function xt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var _t="",St=[],kt=!1;function Lt(t){var e=(0,v.Bd)().t,r=bt((0,n.useState)({}),2),i=r[0],c=r[1],u=bt((0,n.useState)([]),2),l=u[0],b=u[1],x=bt((0,n.useState)([]),2),_=x[0],S=x[1],k=(0,C.MH)().check_user_auth,L=bt((0,g.L4)(w.A.dockerShellShow),2),A=L[0],j=L[1],O=bt((0,g.L4)(w.A.showPrompt),2),P=(O[0],O[1]),I=bt((0,g.L4)(w.A.confirm),2),N=(I[0],I[1]),T=bt((0,n.useState)(_t),2),G=T[0],Y=T[1],M=bt((0,n.useState)(["id",e("名字"),e("镜像"),e("命令"),e("状态"),e("内存"),"cpu%",e("选择")]),2),V=M[0],H=(M[1],bt((0,n.useState)([]),2)),K=H[0],$=H[1],U=bt((0,n.useState)(void 0),2),W=U[0],Z=U[1],B=bt((0,n.useState)(!1),2),z=B[0],X=B[1],D=["id",e("name"),e("create时间"),e("大小"),n.createElement("span",null,"选中",n.createElement(y.rA,{icon:"check_box",title:"全选",onClick:function(){kt=!kt;for(var t={},e=0;e<_.length&&kt;e++)t[_[e][0].props.context]=1;c(t)}}))],R=function(){var t=wt(dt().mark((function t(){var e;return dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new s.hf(s.HK.docker_get),t.next=3,f.ws.send(e);case 3:f.ws.addMsg(s.HK.docker_getting,(function(t){var e=[];if(_t){var r,o=vt(t.context);try{for(o.s();!(r=o.n()).done;){var i,c=r.value,u=vt(c);try{for(u.s();!(i=u.n()).done;){var l=i.value;if("".concat(l).includes(_t)){e.push(c);break}}}catch(t){u.e(t)}finally{u.f()}}}catch(t){o.e(t)}finally{o.f()}}else e.push.apply(e,mt(t.context));for(var s=function(){for(var t=e[f],r=0;r<t.length;r++)t[r]=n.createElement(a.xP,{context:t[r]});t.push(n.createElement(y.rA,{icon:"place",title:"选中",onClick:function(){$(t)}}))},f=0;f<e.length;f++)s();b(e)}));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();(0,n.useEffect)((function(){return Y(_t),R(),function(){wt(dt().mark((function t(){return dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:j({show:!1,type:"",dockerId:""}),f.ws.isAilive()&&f.ws.setPromise(function(){var t=wt(dt().mark((function t(e){return dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,f.ws.unConnect();case 2:e();case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 2:case"end":return t.stop()}}),t)})))()}}),[]),(0,n.useEffect)((function(){_t=G}),[G]);var J=function(){f.ws.isAilive()&&f.ws.setPromise(function(){var t=wt(dt().mark((function t(e){var r;return dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new s.hf("logs"===A.type?s.HK.docker_shell_logs_cancel:s.HK.docker_shell_exec_cancel)).context="",t.next=4,f.ws.send(r);case 4:e();case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},q=function(t){var e=new s.hf(s.HK.docker_switch);e.context={type:t,dockerId:K[0].props.context},$([]),f.ws.send(e)},Q=function(){var t=wt(dt().mark((function t(){var e,r,o,i,c,u,l;return dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,h.Yu.get("docker/images");case 2:if((e=t.sent).code===m.m.Sucess){for(o=null!==(r=e.data)&&void 0!==r?r:[],i=[],c=0;c<o.length;c++)u=o[c],l=[n.createElement(a.xP,{context:u[0]}),n.createElement(a.xP,{context:u[1]}),u[2],u[3],""],i.push(l);St=i,S(i)}case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),tt=function(){var t=wt(dt().mark((function t(){return dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:N({open:!0,title:e("确定删除选中的镜像吗"),handle:function(){var t=wt(dt().mark((function t(){var e,r;return dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=Object.keys(i),t.next=3,h.Yu.post("docker/check/delete",{ids:e});case 3:if((r=t.sent).code!==m.m.Sucess){t.next=13;break}if(0!==r.data.length){t.next=12;break}return t.next=8,h.Yu.post("docker/delete",{ids:e});case 8:t.sent.code===m.m.Sucess&&((0,E.LW)("删除完成"),Q(),N({open:!1,handle:null})),t.next=13;break;case 12:(0,E.N9)("有镜像正在运行".concat(JSON.stringify(r.data)));case 13:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()});case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),nt=function(){var t=wt(dt().mark((function t(){var e;return dt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new s.hf(s.HK.docker_get),t.next=3,f.ws.send(e);case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(p.A,{left_children:n.createElement(y.Z$,{defaultStatus:!1,text:e("docker镜像"),clickFun:function(t){X(t),t?(f.ws.unConnect(),Q(),$([])):(R(),S([]),c({}))}})},Object.keys(i).length>0&&n.createElement(y.rA,{icon:"delete",title:e("删除镜像"),onClick:tt}),K.length>0&&n.createElement("div",null,K[1].props.context),K.length>0&&n.createElement("div",null,k(F.oV.docker_container_update)&&n.createElement(y.rA,{icon:"delete",title:e("删除容器"),onClick:function(){P({show:!0,overlay:!0,type:pt.PromptEnum.DockerDel,data:{dockerId:K[0].props.context,name:K[1].props.context}})}}),n.createElement(y.rA,{icon:"print",title:e("打印日志"),onClick:function(){A.show?(j({show:!1,type:"",dockerId:""}),J()):j({show:!0,dockerId:K[0].props.context,type:"logs"})}}),k(F.oV.docker_container_update)&&n.createElement(y.rA,{icon:"personal_video",title:e("执行命令"),onClick:function(){A.show?(j({show:!1,type:"",dockerId:""}),J()):j({show:!0,dockerId:K[0].props.context,type:"exec"})}}),k(F.oV.docker_container_update)&&K[4].props.context.includes("Up")&&n.createElement(y.rA,{icon:"stop",title:e("停止"),onClick:function(){return q("stop")}}),k(F.oV.docker_container_update)&&!K[4].props.context.includes("Up")&&n.createElement(y.rA,{icon:"play_arrow",title:e("开启"),onClick:function(){q("start")}})),(0!==l.length||G)&&!z&&n.createElement(y.rA,{icon:"refresh",title:e("列表更新"),onClick:nt})),n.createElement(o.xh,null,z&&n.createElement(o.fI,null,n.createElement(o.VP,{widthPer:80},n.createElement(a.uF,{title:"".concat(e("镜像")," (").concat(_.length,")"),titleCom:n.createElement(rt.Sm,{placeholder:e("过滤镜像"),value:W,handleInputChange:function(t){Z(t)},handlerEnter:function(){var t=[];if(W){var e,r=vt(_);try{for(r.s();!(e=r.n()).done;){var n=e.value;(n[0].props.context.includes(W)||n[1].props.context.includes(W))&&t.push(n)}}catch(t){r.e(t)}finally{r.f()}S(t)}else S(St)}})},n.createElement(d.X,{headers:D,rows:_.map((function(t,r){return t[4]=n.createElement(rt.GL,{context:e(""),selected:i[t[0].props.context],onchange:function(){var e,r;e=t[0].props.context,r={},Object.assign(r,i),r[e]?delete r[e]:r[e]=1,c(r)}}),t})),width:"10rem"})))),0===l.length&&!G&&!z&&n.createElement(et,{context:e("检测不到docker,主机可能没有安装docker or 容器为空")}),(0!==l.length||G)&&!z&&n.createElement(o.fI,null,n.createElement(o.VP,{widthPer:80},n.createElement(a.uF,{title:"".concat(e("容器")," (").concat(l.length,")"),titleCom:n.createElement(rt.Sm,{placeholder:e("过滤"),value:G,handleInputChange:function(t){Y(t)}})},n.createElement(d.X,{headers:V,rows:l,width:"10rem"}))))),n.createElement(ht,null))}var At=r(8815),jt=r(4694);function Ot(t){return Ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ot(t)}function Pt(){Pt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:L(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(I([])));x&&x!==r&&n.call(x,i)&&(b=x);var _=w.prototype=v.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==Ot(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function L(e,r,n){var o=h;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=A(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function A(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(Ot(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},S(k.prototype),l(k.prototype,c,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new k(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},S(_),l(_,u,"Generator"),l(_,i,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function It(t){return function(t){if(Array.isArray(t))return Yt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Gt(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ct(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Gt(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function Ft(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function Nt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){Ft(a,n,o,i,c,"next",t)}function c(t){Ft(a,n,o,i,c,"throw",t)}i(void 0)}))}}function Tt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||Gt(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gt(t,e){if(t){if("string"==typeof t)return Yt(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Yt(t,e):void 0}}function Yt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var Mt="",Vt=!1,Ht=!1;function Kt(t){var e=(0,v.Bd)().t,r=Tt((0,n.useState)([]),2),i=r[0],c=r[1],u=Tt((0,n.useState)([]),2),l=u[0],h=u[1],m=Tt((0,n.useState)(0),2),g=m[0],w=m[1],b=Tt((0,n.useState)(""),2),E=b[0],x=b[1],_=Tt((0,n.useState)(["pid",e("名字"),e("创建用户"),n.createElement("span",null,e("内存"),n.createElement(y.rA,{icon:"sort",title:e("升序"),onClick:function(){Vt=!Vt}})),n.createElement("span",null,"cpu%",n.createElement(y.rA,{icon:"sort",title:e("升序"),onClick:function(){Ht=!Ht}})),e("选择")]),2),S=_[0],k=(_[1],(0,C.MH)().check_user_auth),L=function(){var t=Nt(Pt().mark((function t(){var r;return Pt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=new s.hf(s.HK.process_get),t.next=3,f.ws.send(r);case 3:f.ws.addMsg(s.HK.process_getting,(function(t){var r=[];if(Mt){var o,i=Ct(t.context);try{for(i.s();!(o=i.n()).done;){var u,l=o.value,s=Ct(l);try{for(s.s();!(u=s.n()).done;){var f=u.value;if("".concat(f).includes(Mt)){r.push(l);break}}}catch(t){s.e(t)}finally{s.f()}}}catch(t){i.e(t)}finally{i.f()}}else r.push.apply(r,It(t.context));Vt&&(0,jt.di)(r,(function(t){return t[3]}),!1),Ht&&(0,jt.di)(r,(function(t){return t[4]}),!1);for(var p=function(){for(var t=r[d],o=0;o<t.length;o++)t[o]=n.createElement(a.xP,{context:3===o?(0,At.v7)(t[o]):t[o]});t.push(n.createElement(y.rA,{icon:"place",title:e("选中"),onClick:function(){h(t)}}))},d=0;d<r.length;d++)p();w(r.length),c(r)}));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();(0,n.useEffect)((function(){return x(Mt),L(),function(){Nt(Pt().mark((function t(){return Pt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:f.ws.isAilive()&&f.ws.setPromise(function(){var t=Nt(Pt().mark((function t(e){return Pt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,f.ws.unConnect();case 2:e();case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 1:case"end":return t.stop()}}),t)})))()}}),[]),(0,n.useEffect)((function(){Mt=E}),[E]);return n.createElement("div",null,n.createElement(p.A,null,l.length>0&&n.createElement("div",null,l[1].props.context),l.length>0&&k(F.oV.sys_process_close)&&n.createElement("div",null,n.createElement(y.rA,{icon:"stop",title:e("停止"),onClick:function(){var t=new s.hf(s.HK.process_close);t.context={pid:l[0].props.context},h([]),f.ws.send(t)}}))),n.createElement(o.xh,null,0!==i.length||Mt?n.createElement(o.fI,null,n.createElement(o.VP,{widthPer:80},n.createElement(a.uF,{title:"".concat(e("进程")," (").concat(g,")"),titleCom:n.createElement(rt.Sm,{placeholder:e("过滤"),value:E,handleInputChange:function(t){x(t)}})},n.createElement(d.X,{headers:S,rows:i,width:"10rem"})))):n.createElement(et,{context:e("加载中请等待...")})))}function $t(t){return $t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$t(t)}function Ut(){Ut=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:L(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(I([])));x&&x!==r&&n.call(x,i)&&(b=x);var _=w.prototype=v.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==$t(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function L(e,r,n){var o=h;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=A(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function A(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError($t(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},S(k.prototype),l(k.prototype,c,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new k(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},S(_),l(_,u,"Generator"),l(_,i,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function Wt(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function Zt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){Wt(a,n,o,i,c,"next",t)}function c(t){Wt(a,n,o,i,c,"throw",t)}i(void 0)}))}}function Bt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return zt(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?zt(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var Xt=n.lazy((function(){return r.e(614).then(r.bind(r,5614))}));function Dt(t){var e=Bt((0,n.useState)(null),2),r=e[0],o=e[1],a=Bt((0,g.L4)(w.A.systemd_shell_show),2),i=a[0],c=(a[1],Bt((0,g.L4)(w.A.user_base_info),2)),u=c[0],l=(c[1],"dark"===u.user_data.theme?"#FFFFFF":"#000000"),h=function(){var t=Zt(Ut().mark((function t(){var e;return Ut().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=new nt.Terminal({fontFamily:"Monaco, Menlo, Consolas, 'Courier New', monospace",theme:{background:"#FFFFFF",foreground:l,cursor:l,selectionBackground:"#a6d2ff"},cursorBlink:!0,cursorStyle:"bar",scrollback:1e3,scrollSensitivity:1,tabStopWidth:4,convertEol:!0}),f.ws.subscribeUnconnect(p),f.ws.addMsg(s.HK.systemd_logs_getting,(function(t){"error"===t.context&&p(),e.write(t.context)})),o(e);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),p=function(){Zt(Ut().mark((function t(){return Ut().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r&&(r.writeln("close! "),r.dispose(),o(null));case 1:case"end":return t.stop()}}),t)})))()};(0,n.useEffect)((function(){if(i.show){h();var t=function(t){f.ws.unConnect()};return document.addEventListener("cancel_systemd_logs",t),function(){document.removeEventListener("cancel_systemd_logs",t)}}p()}),[i]),(0,n.useEffect)((function(){return function(){p()}}),[]);return n.createElement(Xt,{show:i.show,terminal:r,init:function(t,e){r.writeln("connect... ");var n={unit_name:i.unit_name},o=new s.hf(s.HK.systemd_logs_get);o.context=n,f.ws.send(o)}})}function Rt(t){return Rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rt(t)}function Jt(){Jt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:L(t,r,c)}),i}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function w(){}var b={};l(b,i,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(I([])));x&&x!==r&&n.call(x,i)&&(b=x);var _=w.prototype=v.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,a,i,c){var u=f(t[o],t,a);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==Rt(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(s).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function L(e,r,n){var o=h;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=A(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function A(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=f(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(Rt(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},S(k.prototype),l(k.prototype,c,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new k(s(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},S(_),l(_,u,"Generator"),l(_,i,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(O),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function qt(t){return function(t){if(Array.isArray(t))return oe(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||ne(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qt(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=ne(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function te(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function ee(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){te(a,n,o,i,c,"next",t)}function c(t){te(a,n,o,i,c,"throw",t)}i(void 0)}))}}function re(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||ne(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ne(t,e){if(t){if("string"==typeof t)return oe(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?oe(t,e):void 0}}function oe(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var ae,ie="";function ce(t){var e=(0,v.Bd)().t,r=(0,C.MH)().check_user_auth,i=re((0,g.L4)(w.A.systemd_shell_show),2),c=i[0],u=i[1],l=re((0,g.L4)(w.A.confirm),2),b=(l[0],l[1]),x=re((0,n.useState)(["pid","name","process",e("创建用户"),e("内存"),e("cpu%"),e("active状态"),e("选择")]),2),_=x[0],S=(x[1],re((0,n.useState)(["单元名字","加载状态",e("active(sub)状态"),e("描述"),e("选择")]),2)),k=S[0],L=(S[1],re((0,n.useState)([]),2)),A=L[0],j=L[1],O=re((0,n.useState)([]),2),P=O[0],I=O[1],N=re((0,n.useState)([]),2),T=N[0],G=N[1],Y=re((0,n.useState)(!1),2),M=Y[0],V=Y[1],H=re((0,n.useState)([]),2),K=H[0],$=H[1],U=re((0,n.useState)(""),2),W=U[0],Z=U[1],B=re((0,n.useState)(""),2),z=B[0],X=B[1],D=re((0,n.useState)(new Set),2),R=D[0],J=D[1],q=re((0,g.L4)(w.A.editorSetting),2),Q=(q[0],q[1]),tt=function(){var t=ee(Jt().mark((function t(){var e;return Jt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new s.hf(s.HK.systemd_inside_get),t.next=3,f.ws.send(e);case 3:f.ws.addMsg(s.HK.systemd_inside_getting,(function(t){var e=[];if(ie){var r,o=Qt(t.context);try{for(o.s();!(r=o.n()).done;){var i,c=r.value,u=Qt(c);try{for(u.s();!(i=u.n()).done;){var l=i.value;if("".concat(l).includes(ie)){e.push(c);break}}}catch(t){u.e(t)}finally{u.f()}}}catch(t){o.e(t)}finally{o.f()}}else e.push.apply(e,qt(t.context));for(var s=function(){for(var t=e[f],r=0;r<t.length;r++)t[r]=n.createElement(a.xP,{context:4===r?(0,At.v7)(t[r]):t[r]});t.push(n.createElement(y.rA,{icon:"place",title:"选中",onClick:function(){G(t)}}))},f=0;f<e.length;f++)s();j(e)}));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();(0,n.useEffect)((function(){return X(ie),tt(),function(){ee(Jt().mark((function t(){return Jt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:f.ws.isAilive()&&f.ws.setPromise(function(){var t=ee(Jt().mark((function t(e){return Jt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,f.ws.unConnect();case 2:e();case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 1:case"end":return t.stop()}}),t)})))()}}),[]),(0,n.useEffect)((function(){ie=z}),[z]);var nt=function(t){if(c.show){u({show:!1,unit_name:""});var e=new CustomEvent("cancel_systemd_logs",{detail:{}});document.dispatchEvent(e)}else u({show:!0,unit_name:t})},ot=function(){var t=ee(Jt().mark((function t(e){return Jt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:b({open:!0,handle:function(){var t=ee(Jt().mark((function t(){return Jt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,h.Yu.post("systemd/sys/delete",{unit_name:e});case 2:t.sent.code===m.m.Sucess&&((0,E.LW)("删除成功"),b({open:!1,handle:null}));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()});case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),at=function(){var t=ee(Jt().mark((function t(e){return Jt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:b({open:!0,handle:function(){var t=ee(Jt().mark((function t(){return Jt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,h.Yu.post("systemd/delete",{unit_name:e});case 2:t.sent.code===m.m.Sucess&&((0,E.LW)("删除成功"),b({open:!1,handle:null}));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()});case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),it=function(){var t=ee(Jt().mark((function t(){var e,r,o,i,c,u,l;return Jt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,h.Yu.get("systemd/inside/all");case 2:if((e=t.sent).code===m.m.Sucess){t.next=5;break}return t.abrupt("return");case 5:return J(new Set(e.data)),t.next=8,h.Yu.get("systemd/allget");case 8:if((r=t.sent).code!==m.m.Sucess){t.next=30;break}o=r.data,i=[],c=Qt(null!=o?o:[]),t.prev=13,l=Jt().mark((function t(){var e,r;return Jt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=u.value,(r=[n.createElement(a.xP,{context:e.unit}),e.load,"".concat(e.active,"(").concat(e.sub,")"),n.createElement(a.xP,{context:e.description})]).push(n.createElement(y.rA,{icon:"place",title:"添加",onClick:function(){$(r)}})),i.push(r);case 4:case"end":return t.stop()}}),t)})),c.s();case 16:if((u=c.n()).done){t.next=20;break}return t.delegateYield(l(),"t0",18);case 18:t.next=16;break;case 20:t.next=25;break;case 22:t.prev=22,t.t1=t.catch(13),c.e(t.t1);case 25:return t.prev=25,c.f(),t.finish(25);case 28:ae=i,I(i);case 30:case"end":return t.stop()}}),t,null,[[13,22,25,28]])})));return function(){return t.apply(this,arguments)}}(),ct=function(){var t=ee(Jt().mark((function t(e){var r;return Jt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,h.Yu.post("systemd/add",{unit_name:e});case 2:(r=t.sent).code===m.m.Sucess&&(J(new Set(r.data)),(0,E.LW)("添加成功"));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),ut=function(){var e=ee(Jt().mark((function e(r){var n;return Jt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.Yu.post("systemd/get/context",{unit_name:r});case 2:(n=e.sent).code===m.m.Sucess&&(Q({model:"text",open:!0,fileName:t.name,save:function(){var t=ee(Jt().mark((function t(e){var r;return Jt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={context:e},"/"===n.data.path[0]&&(n.data.path=n.data.path.slice(1)),t.next=4,h.$M.post("save/".concat(n.data.path,"?is_sys_path=1"),r);case 4:t.sent.code===m.m.Sucess&&(C.xK.set_value_temp(""),Q({open:!1,model:"",fileName:"",save:null}));case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()}),C.xK.set_value_temp(n.data.context));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(p.A,{left_children:n.createElement(y.Z$,{defaultStatus:!1,text:e("系统systemd单元"),clickFun:function(t){V(t),t?(it(),G([])):$([])}})},T.length>0&&n.createElement("div",null,T[1].props.context),K.length>0&&n.createElement("div",null,K[0].props.context),T.length>0&&n.createElement("div",null,r(F.oV.systemd_update)&&n.createElement(y.rA,{icon:"delete",title:"从实时监控删除",onClick:function(){at(T[1].props.context)}}),n.createElement(y.rA,{icon:"print",title:"打印日志",onClick:function(){nt(T[1].props.context)}})),K.length>0&&n.createElement("div",null,r(F.oV.systemd_update)&&n.createElement(y.rA,{icon:"delete",title:"删除系统上的sytemd",onClick:function(){ot(K[0].props.context)}}),n.createElement(y.rA,{icon:"print",title:"打印日志",onClick:function(){nt(K[0].props.context)}}),r(F.oV.systemd_update)&&n.createElement(y.rA,{icon:"text_fields",title:"sytemd文件内容",onClick:function(){ut(K[0].props.context)}}),r(F.oV.systemd_update)&&!R.has(K[0].props.context)&&n.createElement(y.rA,{icon:"plus_one",title:"添加到管理",onClick:function(){return ct(K[0].props.context)}}))),n.createElement(o.xh,null,M&&n.createElement(o.fI,null,n.createElement(o.VP,{widthPer:80},n.createElement(a.uF,{title:"systemd系统单元(".concat(P.length,")"),titleCom:n.createElement(rt.Sm,{placeholder:"过滤单元",value:W,handleInputChange:function(t){Z(t)},handlerEnter:function(){var t=[];if(W){var e,r=Qt(ae);try{for(r.s();!(e=r.n()).done;){var n=e.value;(n[0].props.context.includes(W)||n[3].props.context.includes(W))&&t.push(n)}}catch(t){r.e(t)}finally{r.f()}I(t)}else I(ae)}})},n.createElement(d.X,{headers:k,rows:P,width:"10rem"})))),0===A.length&&!M&&n.createElement(et,{context:"没有管理的单元 or 加载中请等待..."}),0!==A.length&&!M&&n.createElement(o.fI,null,n.createElement(o.VP,{widthPer:80},n.createElement(a.uF,{title:"filecat监控单元(".concat(A.length,")"),titleCom:n.createElement(rt.Sm,{placeholder:"过滤单元",value:z,handleInputChange:function(t){X(t)}})},n.createElement(d.X,{headers:_,rows:A,width:"10rem"}))))),n.createElement(Dt,null))}function ue(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return le(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?le(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function le(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function se(t){var e=(0,v.Bd)().t,r=ue((0,g.L4)(w.A.user_base_info),2),a=r[0],i=(r[1],[{index:1,name:e("系统性能"),rto:"sys/"},{index:2,name:e("系统进程"),rto:"process/"},{index:3,name:e("docker容器"),rto:"docker/"}]);return a.sys===F.XM.linux&&i.push({index:4,name:e("systemd"),rto:"systemd/"}),n.createElement(o.W1,{optionList:i},n.createElement(tt,null),n.createElement(Kt,null),n.createElement(Lt,null),n.createElement(ce,null))}},7481:(t,e,r)=>{r.d(e,{S:()=>c,X:()=>i});var n=r(6540);function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function i(t){var e,r=o(n.useState([]),2),a=r[0],i=r[1];return(0,n.useEffect)((function(){t.children?i(Array.isArray(t.children)?t.children:[t.children]):i(t.rows)}),[t.rows,t.children]),n.createElement("table",null,n.createElement("thead",null,n.createElement("tr",null,null===(e=t.headers)||void 0===e?void 0:e.map((function(t,e){return n.createElement("th",{key:e},t)})))),n.createElement("tbody",null,a.map((function(e,r){return n.createElement("tr",{key:r,onContextMenu:function(){t.handleContextMenu&&t.handleContextMenu(e)}},e.map((function(e,r){var o;return n.createElement("td",{style:{width:null!==(o=t.width)&&void 0!==o?o:"auto"},key:r,className:r===a.length-1?"small":""},e)})))}))))}function c(t){return n.createElement("div",{style:{display:t.isFlex?"flex":"block"}},t.columns.map((function(t,e){return n.createElement("div",{key:e},t)})))}},8062:(t,e,r)=>{r.d(e,{A:()=>c});var n=r(6540);function o(){return o=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},o.apply(null,arguments)}function a(t){return n.createElement("div",{className:"black-tip",onClick:function(){t.click&&t.click(t)},onContextMenu:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),t.onContextMenu&&t.onContextMenu(e,t)}},t.name)}var i=function(t){return n.createElement("li",null,t.click?n.createElement(a,o({},t.node,{name:t.render?t.render(t.node):t.node.name,click:t.click,onContextMenu:t.onContextMenu})):n.createElement("div",null,t.render?t.render(t.node):t.node.name),t.node.children&&t.node.children.length>0&&n.createElement("ul",null,t.node.children.map((function(e,r){return n.createElement(i,{key:r,node:e,click:t.click,onContextMenu:t.onContextMenu,render:t.render})}))))};const c=function(t){return n.createElement("div",{className:"card-tree-view"},n.createElement("ul",null,t.list&&t.list.map((function(e,r){return n.createElement(i,{key:r,node:e,click:t.click,onContextMenu:t.onContextMenu,render:t.render})}))))}}}]);
@@ -1 +0,0 @@
1
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
@@ -1,2 +0,0 @@
1
- /*! For license information please see 445.5acc66a00dd5b30defcf.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[445],{7445:(t,e,r)=>{r.r(e),r.d(e,{default:()=>W});var n=r(6540),o=r(5725),a=r(447),i=r(5997),c=r(7481),u=r(3033),l=r(6007),f=r(3459),s=r(2726),h=r(3413),p=r.n(h),y=r(2389),d=r(7952),m=r(7567),v=r(7444),g=r(6417),b=r(2042);function w(t){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},w(t)}function E(t){return function(t){if(Array.isArray(t))return _(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||O(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(){x=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new P(n||[]);return o(i,"_invoke",{value:_(t,r,c)}),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function b(){}var E={};l(E,i,(function(){return this}));var S=Object.getPrototypeOf,L=S&&S(S(T([])));L&&L!==r&&n.call(L,i)&&(E=L);var k=b.prototype=v.prototype=Object.create(E);function A(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,a,i,c){var u=s(t[o],t,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==w(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(f).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function _(e,r,n){var o=h;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=j(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function j(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,j(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=s(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function C(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(w(e)+" is not iterable")}return g.prototype=b,o(k,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=l(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,u,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},A(O.prototype),l(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},A(k),l(k,u,"Generator"),l(k,i,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),C(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function S(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=O(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function L(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function k(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){L(a,n,o,i,c,"next",t)}function c(t){L(a,n,o,i,c,"throw",t)}i(void 0)}))}}function A(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||O(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(t,e){if(t){if("string"==typeof t)return _(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_(t,e):void 0}}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function j(t){var e=(0,y.Bd)().t,r=A((0,n.useState)([]),2),h=r[0],w=r[1],L=A((0,n.useState)([]),2),O=L[0],_=L[1],j=A((0,n.useState)(""),2),I=j[0],C=j[1],P=A((0,n.useState)(""),2),T=P[0],N=P[1],F=A((0,n.useState)(!1),2),G=F[0],H=F[1],Z=A((0,v.L4)(g.A.showPrompt),2),U=(Z[0],Z[1]),W=A((0,v.L4)(g.A.confirm),2),z=(W[0],W[1]);(0,n.useEffect)((function(){k(x().mark((function t(){var e,r,n,o,a,i,c;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.ez.get("ips/dnspod");case 2:if((e=t.sent).code===f.m.Sucess){t.next=5;break}return t.abrupt("return");case 5:r=e.data,n=[],o=[],a=S(r.ips);try{for(a.s();!(i=a.n()).done;)(c=i.value).isIPv4?n.push(c):o.push(c)}catch(t){a.e(t)}finally{a.f()}w(n),_(o),r.account&&(C(r.account.id),N(r.account.token)),H(r.isOpen);case 14:case"end":return t.stop()}}),t)})))()}),[]);var M=function(){var t=k(x().mark((function t(){var e,r,n,o,a,i;return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!G||I&&T){t.next=3;break}return new(p())({type:"error",text:"id和token都不能为空",timeout:1e3,layout:"bottomLeft"}).show(),t.abrupt("return");case 3:for(e=new s.yL,r=[],n=0,o=[].concat(E(h),E(O));n<o.length;n++)(a=o[n]).ddnsHost&&r.push(a);return e.ips=r,e.account={id:I,token:T},e.isOpen=G,e.ddnsType=s.E2.dnspod,t.next=12,l.ez.post("save",e);case 12:(i=t.sent).code===f.m.DdnsAuthFail?new(p())({type:"error",text:i.data,timeout:1e3,layout:"bottomLeft"}).show():new(p())({type:"success",text:i.data,timeout:1e3,layout:"bottomLeft"}).show();case 14:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),B=function(){var t=k(x().mark((function t(e){return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:z({open:!0,handle:function(){var t=k(x().mark((function t(){return x().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.ez.post("http/del",e);case 2:0===t.sent.code&&(0,b.LW)("删除成功,稍后请刷新"),z({open:!1,handle:null});case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),title:"确定删除吗?"});case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(d.A,null,n.createElement(i.rA,{icon:"add",title:e("添加http获取ip"),onClick:function(){U({show:!0,type:m.PromptEnum.DdnsAddHttp,overlay:!0,data:{}})}})),n.createElement(o.fI,null,n.createElement(o.VP,null,n.createElement(a.Zp,{title:"ipv4"},h.length>0&&h.map((function(t,r){return n.createElement("div",{key:r},"".concat(t.ifaceOrWww,"(").concat(t.ip,")"),n.createElement(u.Sm,{right_placeholder:n.createElement("div",null,t.source_type,t.source_type===s.tC.http_get&&n.createElement(i.rA,{icon:"delete",title:e("删除"),onClick:function(){B(t)}})),placeholder:"a.abc.com b.abc.com ...",value:t.ddnsHost,handleInputChange:function(e){t.ddnsHost=e}}))}))),n.createElement(a.Zp,{title:"ipv6"},O.length>0&&O.map((function(t,r){return n.createElement("div",{key:r},"".concat(t.ifaceOrWww,"(").concat(t.ip,")"),n.createElement(u.Sm,{right_placeholder:n.createElement("div",null,t.source_type,t.source_type===s.tC.http_get&&n.createElement(i.rA,{icon:"delete",title:e("删除"),onClick:function(){B(t)}})),placeholder:"a.abc.com b.abc.com ...",value:t.ddnsHost,handleInputChange:function(e){t.ddnsHost=e}}))})))),n.createElement(o.VP,null,n.createElement(a.Zp,{title:e("账号设置"),rightBottomCom:n.createElement(i.C3,{text:e("保存"),clickFun:M})},n.createElement(u.Sm,{placeholder:"ID",value:I,handleInputChange:function(t){C(t)}}),n.createElement(u.Sm,{placeholder:"TOKEN",value:T,handleInputChange:function(t){N(t)}}),n.createElement(c.S,{isFlex:!0,columns:[n.createElement(u.U6,{value:1,context:e("开启"),selected:G,onchange:function(){H(!G)}}),n.createElement(u.U6,{value:1,context:e("关闭"),selected:!G,onchange:function(){H(!G)}})]})),n.createElement(a.Zp,{title:e("说明")},"域名如果不存在会自动创建,空子域名是@,ip6和ipv4可以互相切换。"))))}function I(t){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},I(t)}function C(t){return function(t){if(Array.isArray(t))return Z(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||H(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(){P=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof v?e:v,i=Object.create(a.prototype),c=new C(n||[]);return o(i,"_invoke",{value:A(t,r,c)}),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",y="executing",d="completed",m={};function v(){}function g(){}function b(){}var w={};l(w,i,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(T([])));x&&x!==r&&n.call(x,i)&&(w=x);var S=b.prototype=v.prototype=Object.create(w);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,a,i,c){var u=s(t[o],t,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==I(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(f).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function A(e,r,n){var o=h;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===d){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=s(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function T(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(I(e)+" is not iterable")}return g.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=l(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},L(k.prototype),l(k.prototype,c,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new k(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},L(S),l(S,u,"Generator"),l(S,i,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=T,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:T(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function T(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=H(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function N(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function F(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){N(a,n,o,i,c,"next",t)}function c(t){N(a,n,o,i,c,"throw",t)}i(void 0)}))}}function G(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||H(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function H(t,e){if(t){if("string"==typeof t)return Z(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Z(t,e):void 0}}function Z(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function U(t){var e=(0,y.Bd)().t,r=G((0,n.useState)([]),2),h=r[0],w=r[1],E=G((0,n.useState)([]),2),x=E[0],S=E[1],L=G((0,n.useState)(""),2),k=L[0],A=L[1],O=G((0,n.useState)(""),2),_=O[0],j=O[1],I=G((0,n.useState)(!1),2),N=I[0],H=I[1],Z=G((0,v.L4)(g.A.showPrompt),2),U=(Z[0],Z[1]),W=G((0,v.L4)(g.A.confirm),2),z=(W[0],W[1]);(0,n.useEffect)((function(){F(P().mark((function t(){var e,r,n,o,a,i,c;return P().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.ez.get("ips/tx");case 2:if((e=t.sent).code===f.m.Sucess){t.next=5;break}return t.abrupt("return");case 5:r=e.data,n=[],o=[],a=T(r.ips);try{for(a.s();!(i=a.n()).done;)(c=i.value).isIPv4?n.push(c):o.push(c)}catch(t){a.e(t)}finally{a.f()}w(n),S(o),r.account&&(A(r.account.secretid),j(r.account.secretkey)),H(r.isOpen);case 14:case"end":return t.stop()}}),t)})))()}),[]);var M=function(){var t=F(P().mark((function t(){var e,r,n,o,a,i;return P().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!N||k&&_){t.next=3;break}return new(p())({type:"error",text:"SecretId和SecretKey都不能为空",timeout:1e3,layout:"bottomLeft"}).show(),t.abrupt("return");case 3:for(e=new s.yL,r=[],n=0,o=[].concat(C(h),C(x));n<o.length;n++)(a=o[n]).ddnsHost&&r.push(a);return e.ips=r,e.account={secretid:k,secretkey:_},e.isOpen=N,e.ddnsType=s.E2.tengxun,t.next=12,l.ez.post("save",e);case 12:(i=t.sent).code===f.m.DdnsAuthFail?new(p())({type:"error",text:i.data,timeout:1e3,layout:"bottomLeft"}).show():new(p())({type:"success",text:i.data,timeout:1e3,layout:"bottomLeft"}).show();case 14:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),B=function(){var t=F(P().mark((function t(e){return P().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:z({open:!0,handle:function(){var t=F(P().mark((function t(){return P().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l.ez.post("http/del",e);case 2:0===t.sent.code&&(0,b.LW)("删除成功,稍后请刷新"),z({open:!1,handle:null});case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),title:"确定删除吗?"});case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(d.A,null,n.createElement(i.rA,{icon:"add",title:e("添加http获取ip"),onClick:function(){U({show:!0,type:m.PromptEnum.DdnsAddHttp,overlay:!0,data:{}})}})),n.createElement(o.fI,null,n.createElement(o.VP,null,n.createElement(a.Zp,{title:"ipv4"},h.length>0&&h.map((function(t,r){return n.createElement("div",{key:r},"".concat(t.ifaceOrWww,"(").concat(t.ip,")"),n.createElement(u.Sm,{right_placeholder:n.createElement("div",null,t.source_type,t.source_type===s.tC.http_get&&n.createElement(i.rA,{icon:"delete",title:e("删除"),onClick:function(){B(t)}})),placeholder:"a.abc.com b.abc.com ...",value:t.ddnsHost,handleInputChange:function(e){t.ddnsHost=e}}))}))),n.createElement(a.Zp,{title:"ipv6"},x.length>0&&x.map((function(t,r){return n.createElement("div",{key:r},"".concat(t.ifaceOrWww,"(").concat(t.ip,")"),n.createElement(u.Sm,{right_placeholder:n.createElement("div",null,t.source_type,t.source_type===s.tC.http_get&&n.createElement(i.rA,{icon:"delete",title:e("删除"),onClick:function(){B(t)}})),placeholder:"a.abc.com b.abc.com ...",value:t.ddnsHost,handleInputChange:function(e){t.ddnsHost=e}}))})))),n.createElement(o.VP,null,n.createElement(a.Zp,{title:e("账号设置"),rightBottomCom:n.createElement(i.C3,{text:e("保存"),clickFun:M})},n.createElement(u.Sm,{placeholder:"SecretId",value:k,handleInputChange:function(t){A(t)}}),n.createElement(u.Sm,{placeholder:"SecretKey",value:_,handleInputChange:function(t){j(t)}}),n.createElement(c.S,{isFlex:!0,columns:[n.createElement(u.U6,{value:1,context:e("开启"),selected:N,onchange:function(){H(!N)}}),n.createElement(u.U6,{value:1,context:e("关闭"),selected:!N,onchange:function(){H(!N)}})]})),n.createElement(a.Zp,{title:e("说明")},"域名如果不存在会自动创建,空子域名是@,ip6和ipv4可以互相切换。"))))}function W(){var t=(0,y.Bd)().t,e=[{index:1,name:"dnspod(".concat(t("腾讯"),")"),rto:"dnspod/"},{index:2,name:"".concat(t("腾讯")).concat(t("云")),rto:"tengxun/"}];return n.createElement(o.W1,{optionList:e},n.createElement(j,null),n.createElement(U,null))}},7481:(t,e,r)=>{r.d(e,{S:()=>c,X:()=>i});var n=r(6540);function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function i(t){var e,r=o(n.useState([]),2),a=r[0],i=r[1];return(0,n.useEffect)((function(){t.children?i(Array.isArray(t.children)?t.children:[t.children]):i(t.rows)}),[t.rows,t.children]),n.createElement("table",null,n.createElement("thead",null,n.createElement("tr",null,null===(e=t.headers)||void 0===e?void 0:e.map((function(t,e){return n.createElement("th",{key:e},t)})))),n.createElement("tbody",null,a.map((function(e,r){return n.createElement("tr",{key:r,onContextMenu:function(){t.handleContextMenu&&t.handleContextMenu(e)}},e.map((function(e,r){var o;return n.createElement("td",{style:{width:null!==(o=t.width)&&void 0!==o?o:"auto"},key:r,className:r===a.length-1?"small":""},e)})))}))))}function c(t){return n.createElement("div",{style:{display:t.isFlex?"flex":"block"}},t.columns.map((function(t,e){return n.createElement("div",{key:e},t)})))}}}]);
@@ -1 +0,0 @@
1
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
@@ -1,2 +0,0 @@
1
- /*! For license information please see 467.eaae8d396d50288623e1.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[467],{7481:(t,e,r)=>{r.d(e,{S:()=>c,X:()=>i});var n=r(6540);function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function i(t){var e,r=o(n.useState([]),2),a=r[0],i=r[1];return(0,n.useEffect)((function(){t.children?i(Array.isArray(t.children)?t.children:[t.children]):i(t.rows)}),[t.rows,t.children]),n.createElement("table",null,n.createElement("thead",null,n.createElement("tr",null,null===(e=t.headers)||void 0===e?void 0:e.map((function(t,e){return n.createElement("th",{key:e},t)})))),n.createElement("tbody",null,a.map((function(e,r){return n.createElement("tr",{key:r,onContextMenu:function(){t.handleContextMenu&&t.handleContextMenu(e)}},e.map((function(e,r){var o;return n.createElement("td",{style:{width:null!==(o=t.width)&&void 0!==o?o:"auto"},key:r,className:r===a.length-1?"small":""},e)})))}))))}function c(t){return n.createElement("div",{style:{display:t.isFlex?"flex":"block"}},t.columns.map((function(t,e){return n.createElement("div",{key:e},t)})))}},8467:(t,e,r)=>{r.r(e),r.d(e,{default:()=>M});var n=r(6540),o=r(5725),a=r(6007),i=r(2042),c=r(3459),u=r(447),l=r(3033),f=r(5997),s=r(7481),h=r(8694),p=r(4944),y=r(4238),v=r(2389),m=r(7952);function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function g(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function b(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=d(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==d(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function w(t){return function(t){if(Array.isArray(t))return k(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||j(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(){E=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof g?e:g,i=Object.create(a.prototype),c=new C(n||[]);return o(i,"_invoke",{value:L(t,r,c)}),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",y="executing",v="completed",m={};function g(){}function b(){}function w(){}var x={};l(x,i,(function(){return this}));var S=Object.getPrototypeOf,_=S&&S(S(N([])));_&&_!==r&&n.call(_,i)&&(x=_);var j=w.prototype=g.prototype=Object.create(x);function k(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,a,i,c){var u=s(t[o],t,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==d(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(f).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function L(e,r,n){var o=h;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===v){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=I(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?v:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function I(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,I(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=s(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(d(e)+" is not iterable")}return b.prototype=w,o(j,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:b,configurable:!0}),b.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},k(O.prototype),l(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new O(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},k(j),l(j,u,"Generator"),l(j,i,(function(){return this})),l(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function x(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function S(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){x(a,n,o,i,c,"next",t)}function c(t){x(a,n,o,i,c,"throw",t)}i(void 0)}))}}function _(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||j(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function j(t,e){if(t){if("string"==typeof t)return k(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?k(t,e):void 0}}function k(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function O(t){var e=(0,v.Bd)().t,r=_((0,n.useState)(void 0),2),d=r[0],x=r[1],j=_((0,n.useState)(!1),2),k=j[0],O=j[1],L=_((0,n.useState)(""),2),I=L[0],P=L[1],A=_((0,n.useState)([e("".concat(e("名称"))),e("".concat(e("虚拟"),"ip")),"".concat(e("物理"),"信息"),e("在线状态"),e("选择")]),2),C=A[0],N=(A[1],_((0,n.useState)([]),2)),T=N[0],G=N[1],F=_((0,n.useState)({}),2),U=F[0],M=F[1],B=_((0,n.useState)(!1),2),K=B[0],$=B[1];(0,n.useEffect)((function(){var t=function(){var t=S(E().mark((function t(){var e,r;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new y.hf(y.HK.vir_net_serverIno_get),t.next=3,p.ws.send(e);case 3:(r=t.sent)&&(G(r.context),p.ws.addMsg(y.HK.vir_net_serverIno_get,(function(t){G(t.context)})));case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();t();var e=function(){var t=S(E().mark((function t(){var e,r;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a._U.get("vir/server/get");case 2:if((e=t.sent).code===c.m.Sucess){t.next=5;break}return t.abrupt("return");case 5:r=e.data,x(r.port),P(r.key),O(r.open);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return e(),function(){p.ws.unConnect()}}),[]);var D=function(){var t=S(E().mark((function t(){var e;return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=new h.$K).open=k,e.key=I,K&&(e.async_ips=Object.keys(U)),d&&(e.port=parseInt(d)),t.next=7,a._U.post("vir/server/save",e);case 7:if(t.sent.code===c.m.Sucess){t.next=11;break}return(0,i.zN)("网络错误"),t.abrupt("return");case 11:(0,i.LW)("保存成功"),$(!1);case 13:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),H=function(){var t=S(E().mark((function t(){return E().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a._U.post("vir/server/delete/client",{ips:Object.keys(U)});case 2:M({});case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(m.A,null,!!Object.keys(U).length&&U[0],!!Object.keys(U).length&&n.createElement(f.rA,{icon:"delete",title:"删除",onClick:H})),n.createElement(o.fI,null,n.createElement(o.VP,null,n.createElement(u.Zp,{title:"",rightBottomCom:n.createElement(f.C3,{text:e("保存"),clickFun:D})},n.createElement(l.Sm,{placeholder:"port",value:d,handleInputChange:function(t){x(t)}}),n.createElement(l.Sm,{placeholder:"key ",value:I,handleInputChange:function(t){P(t)}}),n.createElement("form",null,e("状态"),":",n.createElement(s.S,{isFlex:!0,columns:[n.createElement(l.U6,{value:1,context:e("开启"),selected:k,onchange:function(){O(!k)}}),n.createElement(l.U6,{value:1,context:e("关闭"),selected:!k,onchange:function(){O(!k)}})]})),!!Object.keys(U).length&&n.createElement(l.GL,{context:e("同步信息给选中服务器"),selected:K,onchange:function(){$(!K)}})),n.createElement(u.Zp,{title:""},n.createElement(s.X,{headers:C,rows:T.map((function(t){for(var r=0;r<t.length;r++)t[r]=n.createElement(u.xP,{context:t[r],tip_context:t[r]});return[].concat(w(t),[n.createElement(l.GL,{context:e(""),selected:U[t[1]],onchange:function(){var e=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?g(Object(r),!0).forEach((function(e){b(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},U);e[t[1]]?delete e[t[1]]:e[t[1]]=t,M(e)}})])})),width:"10rem"})))))}function L(t){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},L(t)}function I(t){return function(t){if(Array.isArray(t))return F(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||G(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(){P=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var a=e&&e.prototype instanceof d?e:d,i=Object.create(a.prototype),c=new C(n||[]);return o(i,"_invoke",{value:k(t,r,c)}),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var h="suspendedStart",p="suspendedYield",y="executing",v="completed",m={};function d(){}function g(){}function b(){}var w={};l(w,i,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(N([])));x&&x!==r&&n.call(x,i)&&(w=x);var S=b.prototype=d.prototype=Object.create(w);function _(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function r(o,a,i,c){var u=s(t[o],t,a);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==L(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,c)}),(function(t){r("throw",t,i,c)})):e.resolve(f).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,c)}))}c(u.arg)}var a;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return a=a?a.then(o,o):o()}})}function k(e,r,n){var o=h;return function(a,i){if(o===y)throw Error("Generator is already running");if(o===v){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===m)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?v:p,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var a=s(o,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,m;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(L(e)+" is not iterable")}return g.prototype=b,o(S,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=l(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,u,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},_(j.prototype),l(j.prototype,c,(function(){return this})),e.AsyncIterator=j,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new j(f(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},_(S),l(S,u,"Generator"),l(S,i,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var u=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(u&&l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=t,i.arg=e,a?(this.method="next",this.next=a.finallyLoc,m):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function A(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=G(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return i=t.done,t},e:function(t){c=!0,a=t},f:function(){try{i||null==r.return||r.return()}finally{if(c)throw a}}}}function C(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function N(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){C(a,n,o,i,c,"next",t)}function c(t){C(a,n,o,i,c,"throw",t)}i(void 0)}))}}function T(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,i,c=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return c}}(t,e)||G(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G(t,e){if(t){if("string"==typeof t)return F(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?F(t,e):void 0}}function F(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function U(t){var e=(0,v.Bd)().t,r=T((0,n.useState)(""),2),m=r[0],d=r[1],g=T((0,n.useState)(void 0),2),b=g[0],w=g[1],E=T((0,n.useState)(""),2),x=E[0],S=E[1],_=T((0,n.useState)(""),2),j=_[0],k=_[1],O=T((0,n.useState)(void 0),2),L=O[0],C=O[1],G=T((0,n.useState)(!1),2),F=G[0],U=G[1],M=T((0,n.useState)(""),2),B=M[0],K=M[1],$=T((0,n.useState)(!1),2),D=$[0],H=$[1],W=[e("端口"),e("目标地址"),e("目标端口"),e("开启"),e("备注"),e("状态"),e("删除")],Y=T((0,n.useState)([]),2),Z=Y[0],q=Y[1],V=T((0,n.useState)({}),2),X=V[0],z=V[1];(0,n.useEffect)((function(){var t=function(){var t=N(P().mark((function t(){var e,r,n,o,i,u,l,f,s,h,v;return P().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a._U.get("vir/client/get");case 2:if((e=t.sent).code===c.m.Sucess){t.next=5;break}return t.abrupt("return");case 5:if(r=e.data,C(r.serverPort),S(r.serverIp),d(r.ip),w(r.mask),K(r.key),U(r.open),k(r.client_name),!r.open){t.next=25;break}return o=new y.hf(y.HK.vir_net_client_get),t.next=17,p.ws.send(o);case 17:i=t.sent,u=i.context.state,H(u),l={},f=A(null!==(n=i.context.tcp_proxy_list_status)&&void 0!==n?n:[]);try{for(f.s();!(s=f.n()).done;)h=s.value,l[h.param]=h.status}catch(t){f.e(t)}finally{f.f()}z(l),p.ws.addMsg(y.HK.vir_net_client_get,(function(t){var e;H(t.context.state),l={};var r,n=A(null!==(e=t.context.tcp_proxy_list_status)&&void 0!==e?e:[]);try{for(n.s();!(r=n.n()).done;){var o=r.value;l[o.param]=o.status}}catch(t){n.e(t)}finally{n.f()}z(l)}));case 25:return t.next=27,a._U.post("vir/client/tcp_proxy/get");case 27:(v=t.sent).code===c.m.Sucess&&q(v.data);case 29:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();t()}),[]);var R=function(){var t=N(P().mark((function t(){var e;return P().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=new h.vo).ip=m,e.mask=parseInt(b),e.key=B,e.serverIp=x,e.serverPort=parseInt(L),e.open=F,e.client_name=j,t.next=10,a._U.post("vir/client/save",e);case 10:if(t.sent.code===c.m.Sucess){t.next=14;break}return(0,i.zN)("网络错误"),t.abrupt("return");case 14:(0,i.LW)("保存成功");case 15:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),J=function(){var t=N(P().mark((function t(){var e,r;return P().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:for(e=[],r=0;r<Z.length;r++)Z[r].index=r,e.push(Z[r]);return t.next=4,a._U.post("vir/client/tcp_proxy/save",e);case 4:t.sent.code===c.m.Sucess&&(0,i.LW)("保存成功");case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(o.fI,null,n.createElement(o.VP,null,n.createElement(u.Zp,{title:"",rightBottomCom:n.createElement(f.C3,{text:e("保存"),clickFun:R}),titleCom:n.createElement("div",null,e("连接状态"),n.createElement(u.fq,{ok:D}))},n.createElement(l.Sm,{placeholder:"ip ",value:m,handleInputChange:function(t){d(t)}}),n.createElement(l.Sm,{placeholder:"mask",value:b,handleInputChange:function(t){w(t)}}),n.createElement(l.Sm,{placeholder:"".concat(e("服务器"),"ip"),value:x,handleInputChange:function(t){S(t)}}),n.createElement(l.Sm,{placeholder:"".concat(e("服务器"),"part"),value:L,handleInputChange:function(t){C(t)}}),n.createElement(l.Sm,{placeholder:"名称 ",value:j,handleInputChange:function(t){k(t)}}),n.createElement(l.Sm,{placeholder:"key ",value:B,handleInputChange:function(t){K(t)}}),n.createElement("form",null,e("状态"),n.createElement(s.S,{isFlex:!0,columns:[n.createElement(l.U6,{value:1,context:e("开启"),selected:F,onchange:function(){U(!F)}}),n.createElement(l.U6,{value:1,context:e("关闭"),selected:!F,onchange:function(){U(!F)}})]}))),n.createElement(u.Zp,{title:""},n.createElement("div",null,"ip: 虚拟ip, “10.0.0.0 - 10.255.255.255”和“172.16.0.0 - 172.31.255.255”和“192.168.0.0 - 192.168.255.255”这三个网段属于内网ip"),n.createElement("div",null,"mask: 一些常见的子网掩码网段/8:255.0.0.0;/16:255.255.0.0 ;/24:255.255.255.0"),n.createElement("div",null,"key:用于验证身份信息并加密的和服务器设置的一样"))),n.createElement(o.VP,null,n.createElement(u.uF,{self_title:n.createElement("span",{className:" div-row "},n.createElement("h2",null,e("Tcp Proxy"))," "),titleCom:n.createElement("div",null,n.createElement(f.rA,{icon:"add",title:e("添加"),onClick:function(){q([].concat(I(Z),[{note:"",open:!1,port:0,target_port:0,target_ip:""}]))}}),n.createElement(f.rA,{icon:"save",title:e("保存"),onClick:J}))},n.createElement(s.X,{headers:W,rows:Z.map((function(t,r){var o=[n.createElement(l.Sm,{value:t.port,handleInputChange:function(e){t.port=parseInt(e)},no_border:!0}),n.createElement(l.Sm,{value:t.target_ip,handleInputChange:function(e){t.target_ip=e},no_border:!0}),n.createElement(l.Sm,{value:t.target_port,handleInputChange:function(e){t.target_port=parseInt(e)},no_border:!0}),n.createElement(l.l6,{value:t.open,onChange:function(t){!function(t,e,r){for(var n=[],o=0;o<Z.length;o++)Z[o].open=o===r&&"true"===e,n.push(Z[o]);q(n)}(0,t,r)},options:[{title:e("是"),value:!0},{title:e("否"),value:!1}],no_border:!0}),n.createElement(l.Sm,{value:t.note,handleInputChange:function(e){t.note=e},no_border:!0}),n.createElement(u.fq,{ok:X[t.index]}),n.createElement("div",null,n.createElement(f.rA,{icon:"delete",title:e("删除"),onClick:function(){return function(t){Z.splice(t,1),q(I(Z))}(r)}}))];return o})),width:"10rem"})))))}function M(){var t=(0,v.Bd)().t,e=[{index:2,name:t("服务端"),rto:"server/"},{index:1,name:t("客户端"),rto:"client/"}];return n.createElement(o.W1,{optionList:e},n.createElement(U,null),n.createElement(O,null))}},8694:(t,e,r)=>{function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t,e,r){return(e=c(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,c(n.key),n)}}function i(t,e,r){return e&&a(t.prototype,e),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(t){var e=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==n(e)?e:e+""}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}r.d(e,{$K:()=>s,RB:()=>p,qB:()=>l,vo:()=>h,vr:()=>y});var l=i((function t(){u(this,t)})),f=function(t){return t[t.tcp=0]="tcp",t[t.udp=1]="udp",t}({}),s=i((function t(){u(this,t),o(this,"open",!1),o(this,"key",""),o(this,"async_ips",[])})),h=i((function t(){u(this,t),o(this,"open",!1),o(this,"key",""),o(this,"model",f.udp)})),p=function(t){return t[t.row=1]="row",t[t.json=2]="json",t[t.form=3]="form",t}({}),y=i((function t(){u(this,t)}))}}]);
@@ -1 +0,0 @@
1
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
@@ -1,2 +0,0 @@
1
- /*! For license information please see 502.8b581e7886286567121e.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[502],{2502:(t,e,r)=>{r.r(e),r.d(e,{default:()=>H});var n=r(6540),o=r(4238),i=r(4944),a=r(7444),c=r(6417),l=r(7952),u=r(5997),s=r(7022),f=r(4289),h=r(2042),p=r(3033),v=r(2389),y=r(4694),d=r(447);function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}function g(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=E(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function x(t){return function(t){if(Array.isArray(t))return L(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||E(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(){_=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),c=new O(n||[]);return o(a,"_invoke",{value:T(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",v="executing",y="completed",d={};function g(){}function x(){}function w(){}var b={};u(b,a,(function(){return this}));var k=Object.getPrototypeOf,E=k&&k(k(N([])));E&&E!==r&&n.call(E,a)&&(b=E);var L=w.prototype=g.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function A(t,e){function r(o,i,a,c){var l=f(t[o],t,i);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==m(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){u.value=t,a(u)}),(function(t){return r("throw",t,a,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function T(e,r,n){var o=h;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var l=C(c,n);if(l){if(l===d)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var u=f(e,r,n);if("normal"===u.type){if(o=n.done?y:p,u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=y,n.method="throw",n.arg=u.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function I(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function O(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(I,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(m(e)+" is not iterable")}return x.prototype=w,o(L,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:x,configurable:!0}),x.displayName=u(w,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===x||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,u(t,l,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},S(A.prototype),u(A.prototype,c,(function(){return this})),e.AsyncIterator=A,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new A(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(L),u(L,l,"Generator"),u(L,a,(function(){return this})),u(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(j),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function w(t,e,r,n,o,i,a){try{var c=t[i](a),l=c.value}catch(t){return void r(t)}c.done?e(l):Promise.resolve(l).then(n,o)}function b(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){w(i,n,o,a,c,"next",t)}function c(t){w(i,n,o,a,c,"throw",t)}a(void 0)}))}}function k(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],l=!0,u=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);l=!0);}catch(t){u=!0,o=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(t,e)||E(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(t,e){if(t){if("string"==typeof t)return L(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?L(t,e):void 0}}function L(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var S,A=300,T=!1,C=0,I=!0,j=[],O=-1,N=[];function H(t){var e=k((0,a.L4)(c.A.log_viewer),2),r=e[0],m=e[1],w=(0,n.useRef)(null),E=k((0,n.useState)(0),2),L=E[0],H=E[1],z=k((0,n.useState)(100),2),G=z[0],P=z[1],M=k((0,n.useState)(!1),2),K=M[0],F=M[1],D=k((0,n.useState)(""),2),Y=D[0],$=D[1],q=k((0,n.useState)(0),2),B=q[0],R=q[1],W=k((0,n.useState)(0),2),Z=W[0],U=W[1],X=k((0,n.useState)(0),2),J=(X[0],X[1]),Q=(0,v.Bd)().t,V=function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0,i=document.createElement("div");return-1===O?i.textContent=t:i.innerHTML=t,i.style.whiteSpace="pre-wrap",i.style.overflowWrap="break-word",i.setAttribute("position","".concat(e)),i.setAttribute("start_position","".concat(r)),n?(w.current.insertBefore(i,o),j.unshift(i)):(w.current.appendChild(i),j.push(i)),i},tt=function(t){var e=(0,y.I)(j,(function(e){return e===t}));e&&w.current.removeChild(e)},et=function(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(t){var o=Array.isArray(t)?t:t.split("\n");if(n){for(var i,a=0;a<o.length;a++)i=V(o[a],e[a],r[a],!0,0===a?w.current.firstChild:i);if(j.length>A)for(var c=j.length-1;c>=A;)tt(j[j.length-1]),c--}else{for(var l=0;l<o.length;l++)V(o[l],e[l],r[l]);if(j.length>A)for(var u=j.length-A;u>0;)tt(j[0]),u--}}},rt=function(){var t=b(_().mark((function t(){var e,r,n,a,c;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return S.context="",t.next=3,i.ws.sendData(o.HK.log_viewer,S);case 3:if(e=t.sent){if(r=e.context,S=r,r.find_back_enter_index&&r.context_list.length>0)for(n=0;n<r.context_list.length;n++)a=new RegExp(r.query_text,"g"),r.context_list[n]=r.context_list[n].replace(a,'<span style="color: blue;">'.concat(r.query_text,"</span>"));S.find_back_enter_index=!1,et(r.context_list,r.context_position_list,r.context_start_position_list,S.back),S.context_list.length>0&&(S.back&&j.length>0?(S.context_list.length>j.length?H(Math.floor(100*parseInt(j[S.context_list.length-j.length].getAttribute("position"))/S.max_size)):H(Math.floor(100*parseInt(j[j.length-S.context_list.length].getAttribute("position"))/S.max_size)),I=!1):H(Math.floor(100*(null!==(c=S.context_position_list[S.context_position_list.length-1])&&void 0!==c?c:0)/S.max_size))),w.current.clientHeight===w.current.scrollHeight&&nt(S.max_size)}case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),nt=function(t){T||(T=!0,H(100),i.ws.addMsg(o.HK.log_viewer_watch,(function(t){var e=t.context;e&&(S=e,et(e.context_list,e.context_position_list,e.context_start_position_list,!1),w.current.scrollTop=w.current.scrollHeight)})),S.context="",S.context_list=[],S.context_position_list=[],S.context_start_position_list=[],S.position=t,i.ws.sendData(o.HK.log_viewer_watch,S),F(!0))},ot=function(){var t=b(_().mark((function t(){var e,n;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=function(){var t=b(_().mark((function t(){var e,r,n;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e=w.current)){t.next=38;break}if(C>e.scrollTop&&T&&(T=!1,i.ws.unConnect(),F(!1)),!T){t.next=6;break}return C=e.scrollTop,t.abrupt("return");case 6:if(!(C<e.scrollTop&&j.length>0&&e.scrollTop+e.clientHeight+500>=e.scrollHeight)){t.next=22;break}if(!((r=parseInt(j[j.length-1].getAttribute("position")))>=S.max_size)){t.next=11;break}return nt(r),t.abrupt("return");case 11:return S.line=20,S.context="",S.context_list=[],S.context_position_list=[],S.context_start_position_list=[],S.back=!1,S.position=r,t.next=20,rt();case 20:t.next=37;break;case 22:if(!(C>e.scrollTop&&j.length>0&&e.scrollTop-300<=0)){t.next=37;break}if(!((n=parseInt(j[0].getAttribute("start_position")))<=0)){t.next=28;break}return I||(I=!0,(0,h.N9)("到达顶部")),C=e.scrollTop,t.abrupt("return");case 28:return S.line=10,S.context="",S.context_list=[],S.context_position_list=[],S.context_start_position_list=[],S.back=!0,S.position=n,t.next=37,rt();case 37:C=e.scrollTop;case 38:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),w.current.addEventListener("scroll",e),n=function(t){var e=w.current;if(e){t.preventDefault();t.deltaY>0?e.scrollTop+=20:e.scrollTop-=20}},w.current.addEventListener("wheel",n,{passive:!1}),F(!1),R(0),U(0),$(""),T=!1,J(0),C=0,N=[],O=-1,j=[],(S=new s.d2).line=A,S.path="".concat((0,f.GG)("file",(0,f.vX)())).concat(r.fileName),S.token=localStorage.getItem("token"),t.next=20,rt();case 20:i.ws.addMsg(o.HK.search_file_progress,(function(t){try{R(parseInt(t.context))}catch(t){(0,h.zN)(t.message)}})),i.ws.addMsg(o.HK.search_file_index,(function(t){try{var e;(e=N).push.apply(e,x(t.context)),J(t.context.length)}catch(t){(0,h.zN)(t.message)}}));case 22:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),it=function(){var t=b(_().mark((function t(){return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return w.current&&w.current.remove(),t.next=3,i.ws.unConnect();case 3:j=[];case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();if((0,n.useEffect)((function(){r.show?ot():it()}),[r]),(0,n.useEffect)((function(){return function(){it()}}),[]),r.show){var at=function(){var t=b(_().mark((function t(){var e,r,n,o;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(S.line=A,S.context="",S.context_list=[],S.context_position_list=[],S.context_start_position_list=[],e=0,t.prev=6,!((e=parseInt(G))>100||e<0)){t.next=11;break}throw(0,h.zN)("范围在0-100"),"超过最大范围";case 11:r=g(j);try{for(r.s();!(n=r.n()).done;)o=n.value,w.current.removeChild(o)}catch(t){r.e(t)}finally{r.f()}j=[],t.next=20;break;case 16:return t.prev=16,t.t0=t.catch(6),(0,h.N9)(t.t0),t.abrupt("return");case 20:return S.back=e>=100,S.position=Math.floor(S.max_size*(e/100)),t.next=24,rt();case 24:case"end":return t.stop()}}),t,null,[[6,16]])})));return function(){return t.apply(this,arguments)}}(),ct=function(){var t=b(_().mark((function t(){var e,r,n;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!T){t.next=2;break}return t.abrupt("return");case 2:S.line=A,S.context="",S.context_list=[],S.context_position_list=[],S.context_start_position_list=[],e=g(j);try{for(e.s();!(r=e.n()).done;)n=r.value,w.current.removeChild(n)}catch(t){e.e(t)}finally{e.f()}return j=[],S.back=!0,S.position=S.max_size,t.next=14,rt();case 14:w.current.scrollTop=w.current.scrollHeight,nt(S.max_size);case 16:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),lt=function(){var t=b(_().mark((function t(){return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Y){t.next=2;break}return t.abrupt("return");case 2:R(.1),U(0),J(0),O=-1,N=[],S.query_text=Y,i.ws.sendData(o.HK.search_file,S);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),ut=function(){var t=b(_().mark((function t(){var e,r,n,o;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0!==N.length){t.next=2;break}return t.abrupt("return");case 2:S.line=A,S.context="",S.context_list=[],S.context_position_list=[],S.context_start_position_list=[],e=g(j);try{for(e.s();!(r=e.n()).done;)n=r.value,w.current.removeChild(n)}catch(t){e.e(t)}finally{e.f()}return j=[],o=O+1>=N.length?0:O+1,U(o+1),O=o,S.find_back_enter_index=!0,S.back=!1,S.position=N[O],t.next=18,rt();case 18:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),st=function(){var t=b(_().mark((function t(){var e,r,n,o;return _().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(0!==N.length){t.next=2;break}return t.abrupt("return");case 2:S.line=A,S.context="",S.context_list=[],S.context_position_list=[],S.context_start_position_list=[],e=g(j);try{for(e.s();!(r=e.n()).done;)n=r.value,w.current.removeChild(n)}catch(t){e.e(t)}finally{e.f()}return j=[],o=O-1<0?N.length-1:O-1,U(o+1),O=o,S.back=!1,S.find_back_enter_index=!0,S.position=N[O],t.next=18,rt();case 18:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return n.createElement("div",{id:"editor-container"},n.createElement(l.A,{ignore_tags:!0,left_children:[n.createElement(u.rA,{key:1,title:Q("取消"),icon:"close",onClick:function(){m({show:!1})}}),n.createElement("div",{key:2,style:{width:"4rem"}},n.createElement(d.WA,{context:r.fileName})),n.createElement(n.Fragment,{key:3}," ",n.createElement(p.$Z,{handleEnterPress:lt,placeholder:Q("回车搜索整个文件"),icon:"search",value:Y,handleInputChange:function(t){$(t)},max_width:"25em"})),Y&&n.createElement("div",{key:5,style:{paddingLeft:"1.5rem",cursor:"pointer"},onClick:ut},"↓"),Y&&n.createElement("div",{key:6,style:{paddingLeft:"1.5rem",cursor:"pointer"},onClick:st},"↑"),Y&&n.createElement("div",{key:7,style:{paddingLeft:"1.5rem"}},Z,"/",N.length),Y&&n.createElement("div",{key:8,style:{paddingLeft:"1.5rem"}},"搜索进度$",B,"%"),0!==B&&100!==B&&n.createElement(u.rA,{key:4,title:Q("取消"),icon:"cancel",onClick:function(){i.ws.sendData(o.HK.search_file_cancel,{}),$(""),R(0)}})]},K&&n.createElement("span",{style:{color:"var(--icon-green)",whiteSpace:"pre"}},"正在实时监听 "),n.createElement("span",null,"当前加载进度",L),n.createElement(p.$Z,{max_width:"10rem",placeholder:Q("跳转进度"),icon:"percent",value:G,handleInputChange:function(t){P(t)}}),n.createElement(u.rA,{icon:"play_arrow",title:Q("跳转进度"),onClick:at}),n.createElement(u.rA,{icon:"text_rotate_vertical",title:Q("滑动到文件最底部,实时输出"),onClick:ct})),n.createElement("div",{style:{height:"100%"}},n.createElement("div",{ref:w,style:{overflowY:"auto",height:"100%"}})))}}}}]);
@@ -1 +0,0 @@
1
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */