filecat 5.4.2 → 5.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/dist/{100.1100f03272726dcab961.js → 100.8ebdf32f93ebb89fd5a9.js} +2 -2
- package/build/dist/181.31a1ee669b1ed24fc18b.js +2 -0
- package/build/dist/209.f1a40bd227438c6b6d52.js +2 -0
- package/build/dist/29.32ef9d7ae7852a43f56c.js +2 -0
- package/build/dist/308.ae38e35cffd396a547c8.js +2 -0
- package/build/dist/402.f1c3549907e68dd44141.js +2 -0
- package/build/dist/441.75ad05e9094d7e4988b4.js +2 -0
- package/build/dist/445.435d91c360ea1eff3335.js +2 -0
- package/build/dist/467.1d9a78f736c194dee524.js +2 -0
- package/build/dist/502.90aaa83acd526e7dbcc4.js +2 -0
- package/build/dist/523.98924862563ceccea472.js +2 -0
- package/build/dist/542.1a50f0139e70cfd968cc.js +2 -0
- package/build/dist/567.8000d6e03db0ce0cc9ae.js +2 -0
- package/build/dist/602.75ab14d4601f1adb427b.js +2 -0
- package/build/dist/636.4179d693832acf72881b.js +2 -0
- package/build/dist/659.91897ba31bcbaaf376bf.js +2 -0
- package/build/dist/674.d3efa9ef8434d58f023b.js +2 -0
- package/build/dist/759.deb9c1d4f58040bc8816.js +2 -0
- package/build/dist/811.148ebc3a727004dfa32a.js +2 -0
- package/build/dist/827.c175a16183659c8d162d.js +2 -0
- package/build/dist/892.fd015e3e3451c95aacca.js +2 -0
- package/build/dist/{943.12995fba0356b60bb9f6.js → 943.09b30670ce9eacb614e4.js} +2 -2
- package/build/dist/995.06d930af0980ee592fbc.js +2 -0
- package/build/dist/{998.f2156cc57002a7152d6f.js → 998.65cab2e5f11705458d1a.js} +2 -2
- package/build/dist/index.html +1 -1
- package/build/dist/main.a6dc1190b635d4719a46.js +2 -0
- package/build/main.js +1 -1
- package/package.json +1 -1
- package/build/dist/181.4bf3187d0433c2a35a2c.js +0 -2
- package/build/dist/209.1ecaa08cb4cc07771467.js +0 -2
- package/build/dist/29.8305e49e9fa37531b3aa.js +0 -2
- package/build/dist/308.21e5d8bdfde58f421c2b.js +0 -2
- package/build/dist/402.483375aaa84fbee09bcb.js +0 -2
- package/build/dist/441.19783532a702634c183f.js +0 -2
- package/build/dist/445.ea569bbb50cbe31fb4a2.js +0 -2
- package/build/dist/467.abc573f49d7e12706b11.js +0 -2
- package/build/dist/502.b0d5f9cf08dcf45c68a7.js +0 -2
- package/build/dist/523.8fe7ce5a3163ccfb36f9.js +0 -2
- package/build/dist/542.69a3eb07e1e7c4d9c530.js +0 -2
- package/build/dist/567.8f2c4230393161c4dab4.js +0 -2
- package/build/dist/602.966769eb0cb217e4dbdc.js +0 -2
- package/build/dist/636.5848f3ff3c0a6b3ef049.js +0 -2
- package/build/dist/659.e1276f69cfeff679a4dd.js +0 -2
- package/build/dist/674.80d6f27efa6cb21990a5.js +0 -2
- package/build/dist/759.216bb31e36dee7c79e64.js +0 -2
- package/build/dist/811.46c14bd0ce878cab02b4.js +0 -2
- package/build/dist/827.2c0606e22646864b8e4b.js +0 -2
- package/build/dist/892.c600dcee81bf6ce19af3.js +0 -2
- package/build/dist/995.31a6c682896502655d5f.js +0 -2
- package/build/dist/main.089e9c8f20df7c8c4e36.js +0 -2
- /package/build/dist/{100.1100f03272726dcab961.js.LICENSE.txt → 100.8ebdf32f93ebb89fd5a9.js.LICENSE.txt} +0 -0
- /package/build/dist/{181.4bf3187d0433c2a35a2c.js.LICENSE.txt → 181.31a1ee669b1ed24fc18b.js.LICENSE.txt} +0 -0
- /package/build/dist/{209.1ecaa08cb4cc07771467.js.LICENSE.txt → 209.f1a40bd227438c6b6d52.js.LICENSE.txt} +0 -0
- /package/build/dist/{29.8305e49e9fa37531b3aa.js.LICENSE.txt → 29.32ef9d7ae7852a43f56c.js.LICENSE.txt} +0 -0
- /package/build/dist/{308.21e5d8bdfde58f421c2b.js.LICENSE.txt → 308.ae38e35cffd396a547c8.js.LICENSE.txt} +0 -0
- /package/build/dist/{402.483375aaa84fbee09bcb.js.LICENSE.txt → 402.f1c3549907e68dd44141.js.LICENSE.txt} +0 -0
- /package/build/dist/{441.19783532a702634c183f.js.LICENSE.txt → 441.75ad05e9094d7e4988b4.js.LICENSE.txt} +0 -0
- /package/build/dist/{445.ea569bbb50cbe31fb4a2.js.LICENSE.txt → 445.435d91c360ea1eff3335.js.LICENSE.txt} +0 -0
- /package/build/dist/{467.abc573f49d7e12706b11.js.LICENSE.txt → 467.1d9a78f736c194dee524.js.LICENSE.txt} +0 -0
- /package/build/dist/{502.b0d5f9cf08dcf45c68a7.js.LICENSE.txt → 502.90aaa83acd526e7dbcc4.js.LICENSE.txt} +0 -0
- /package/build/dist/{523.8fe7ce5a3163ccfb36f9.js.LICENSE.txt → 523.98924862563ceccea472.js.LICENSE.txt} +0 -0
- /package/build/dist/{542.69a3eb07e1e7c4d9c530.js.LICENSE.txt → 542.1a50f0139e70cfd968cc.js.LICENSE.txt} +0 -0
- /package/build/dist/{567.8f2c4230393161c4dab4.js.LICENSE.txt → 567.8000d6e03db0ce0cc9ae.js.LICENSE.txt} +0 -0
- /package/build/dist/{602.966769eb0cb217e4dbdc.js.LICENSE.txt → 602.75ab14d4601f1adb427b.js.LICENSE.txt} +0 -0
- /package/build/dist/{636.5848f3ff3c0a6b3ef049.js.LICENSE.txt → 636.4179d693832acf72881b.js.LICENSE.txt} +0 -0
- /package/build/dist/{659.e1276f69cfeff679a4dd.js.LICENSE.txt → 659.91897ba31bcbaaf376bf.js.LICENSE.txt} +0 -0
- /package/build/dist/{674.80d6f27efa6cb21990a5.js.LICENSE.txt → 674.d3efa9ef8434d58f023b.js.LICENSE.txt} +0 -0
- /package/build/dist/{759.216bb31e36dee7c79e64.js.LICENSE.txt → 759.deb9c1d4f58040bc8816.js.LICENSE.txt} +0 -0
- /package/build/dist/{811.46c14bd0ce878cab02b4.js.LICENSE.txt → 811.148ebc3a727004dfa32a.js.LICENSE.txt} +0 -0
- /package/build/dist/{827.2c0606e22646864b8e4b.js.LICENSE.txt → 827.c175a16183659c8d162d.js.LICENSE.txt} +0 -0
- /package/build/dist/{892.c600dcee81bf6ce19af3.js.LICENSE.txt → 892.fd015e3e3451c95aacca.js.LICENSE.txt} +0 -0
- /package/build/dist/{943.12995fba0356b60bb9f6.js.LICENSE.txt → 943.09b30670ce9eacb614e4.js.LICENSE.txt} +0 -0
- /package/build/dist/{995.31a6c682896502655d5f.js.LICENSE.txt → 995.06d930af0980ee592fbc.js.LICENSE.txt} +0 -0
- /package/build/dist/{998.f2156cc57002a7152d6f.js.LICENSE.txt → 998.65cab2e5f11705458d1a.js.LICENSE.txt} +0 -0
- /package/build/dist/{main.089e9c8f20df7c8c4e36.js.LICENSE.txt → main.a6dc1190b635d4719a46.js.LICENSE.txt} +0 -0
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 181.4bf3187d0433c2a35a2c.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[91,181],{4091:(t,e,r)=>{r.r(e),r.d(e,{default:()=>d});var n=r(6540),o=r(952),i=(r(2327),r(1766),r(4854),r(8),r(846),r(975),r(4286),r(766),r(1234),r(7507),r(4522)),a=r.n(i),u=r(7444),c=r(6417),l=r(8247);function f(t){return f="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},f(t)}function s(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 h(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=f(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==f(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function p(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,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return y(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)?y(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 y(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 d(t){var e=(0,n.useRef)(null),r=p((0,u.L4)(c.A.user_base_info),2),i=r[0],f=(r[1],"dark"===i.user_data.theme?"cloud_editor_dark":"cloud9_day");return(0,n.useEffect)((function(){var r,n,i=o.edit(e.current,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach((function(e){h(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({value:l.xK.get_value_temp(t.editor_id),showPrintMargin:!1,theme:"ace/theme/".concat(f),mode:null!==(r=t.model)&&void 0!==r?r:a().getModeForPath(null!==(n=t.name)&&void 0!==n?n:"").mode,wrap:!1,highlightActiveLine:!1,fontSize:14},t.options));return i.setOptions({enableBasicAutocompletion:!0,enableSnippets:!0,enableLiveAutocompletion:!0}),i.container.addEventListener("wheel",(function(t){t.preventDefault()})),i.focus(),i.on("change",(function(e){t.on_change&&t.on_change()})),e.current=i,l.xK.set_editor_temp(i,t.editor_id),function(){l.xK.delete_editor_temp(t.editor_id),i.destroy()}}),[]),n.createElement("div",{ref:e,style:{height:"100%",width:"100%"}})}o.config.set("basePath","https://gcore.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/")),o.config.set("modePath","https://gcore.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/")),o.config.set("themePath","https://gcore.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/")),o.config.set("workerPath","https://gcore.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/"))},7181:(t,e,r)=>{r.r(e),r.d(e,{default:()=>v});var n=r(6540),o=r(5997),i=r(7952),a=r(7444),u=r(6417),c=r(8247),l=r(4091),f=r(4289);function s(t){return s="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},s(t)}function h(){h=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r,n){return Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var i=r&&r.prototype instanceof y?r:y,a=Object.create(i.prototype);return c(a,"_invoke",function(e,r,n){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=j(u,n);if(c){if(c===p)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?4:2,l.arg===p)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=4,n.method="throw",n.arg=l.arg)}}}(e,n,new x(o||[])),!0),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var p={};function y(){}function d(){}function v(){}var m={};c(m,i,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(k([])));b&&b!==r&&n.call(b,i)&&(m=b);var w=v.prototype=y.prototype=Object.create(m);function _(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==s(h)&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(h).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}),!0)}function j(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.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")),p;var i=f(o,e.i,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,p;var a=i.arg;return a?a.done?(r[e.r]=a.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,p):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,p)}function O(t){this.tryEntries.push(t)}function S(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function x(t){this.tryEntries=[[-1]],t.forEach(O,this),this.reset(!0)}function k(e){if(null!=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(s(e)+" is not iterable")}return d.prototype=v,c(w,"constructor",v),c(v,"constructor",d),d.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(w),t},e.awrap=function(t){return{__await:t}},_(E.prototype),c(E.prototype,a,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new E(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(w),c(w,u,"Generator"),c(w,i,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=k,x.prototype={constructor:x,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(S),!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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){a.type="throw",a.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],u=this.prev,c=i[1],l=i[2];if(-1===i[0])return n("end"),!1;if(!c&&!l)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<l)return n(l),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o[2],p):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),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),S(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;S(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:k(e),r,n},"next"===this.method&&(this.arg=t),p}},e}function p(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function y(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,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return d(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)?d(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 d(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 v(){var t=y((0,a.L4)(u.A.editorSetting),2),e=t[0],r=t[1],s=y((0,n.useState)(!1),2),d=s[0],v=s[1],m=y((0,a.L4)(u.A.fileShellShow),2),g=m[0],b=m[1],w=y((0,a.L4)(u.A.file_shell_hidden),2),_=w[0],E=w[1];function j(){return O.apply(this,arguments)}function O(){var t;return t=h().mark((function t(){return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.save||!d){t.next=5;break}return t.next=3,e.save(c.xK.get_editor_value());case 3:c.xK.set_value_temp(""),v(!1);case 5:case"end":return t.stop()}}),t)})),O=function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){p(i,n,o,a,u,"next",t)}function u(t){p(i,n,o,a,u,"throw",t)}a(void 0)}))},O.apply(this,arguments)}var S=function(t){t.ctrlKey&&"s"===t.key&&(t.preventDefault(),e.save&&d&&j())};(0,n.useEffect)((function(){return function(){v(!1)}}),[e]),(0,n.useEffect)((function(){return document.addEventListener("keydown",S),function(){document.removeEventListener("keydown",S)}}),[d,e]);var x=n.createElement("div",{id:"editor-container"},n.createElement(i.A,{ignore_tags:!0,left_children:[n.createElement(o.rA,{key:1,title:"取消",icon:"close",onClick:function(){c.xK.set_value_temp(""),r({open:!1,model:"",fileName:"",save:null})}}),n.createElement("title",{key:2},e.fileName)]},e.menu_list&&e.menu_list,e.opt_shell&&n.createElement(o.rA,{icon:"terminal",title:"shell",onClick:function(){g.show?E(!_):b({show:!0,path:(0,f.GG)("file",(0,f.vX)())})}}),d&&n.createElement(o.rA,{title:"保存",icon:"save",onClick:j})),n.createElement(l.default,{name:e.fileName,model:e.model,on_change:function(){d||v(!0)}}));return e.open&&x}}}]);
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 209.1ecaa08cb4cc07771467.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[209],{447:(t,e,r)=>{r.d(e,{WA:()=>m,ZI:()=>d,Zp:()=>f,fq:()=>v,gz:()=>y,uF:()=>h,xP:()=>p});var n=r(6540),o=r(3413),a=r.n(o),i=r(505);function u(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,u=[],c=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return c(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)?c(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 c(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 l=function(t){return t[t.common=0]="common",t[t.full=1]="full",t}(l||{});function s(t,e){var r=e===l.common?"card-content":e===l.full?"card-content full":"";return n.createElement("div",{className:"card",style:{}},n.createElement("div",{className:"card-title"},t.self_title?t.self_title:n.createElement("h2",null,t.title),n.createElement("div",{className:"not-select-div"},t.titleCom&&t.titleCom)),n.createElement("div",{className:r},t.children),n.createElement("div",{className:"card-action card-action-bottom-right"},t.rightBottomCom))}function f(t){return s(t,l.common)}function h(t){return s(t,l.full)}function p(t){var e,r,o,u=(0,n.useRef)(null);return n.createElement("div",{className:"card-text"},n.createElement("div",{className:"card-text-context"},null!==(e=t.context)&&void 0!==e?e:t.children),n.createElement("div",{className:"card-text-tip",ref:u,onClick:function(){var e,r;(0,i.l)(null!==(e=null!==(r=t.tip_context)&&void 0!==r?r:t.context)&&void 0!==e?e:t.children),new(a())({type:"info",text:"复制完成",timeout:1e3,layout:"bottomLeft"}).show()}},null!==(r=null!==(o=t.tip_context)&&void 0!==o?o:t.context)&&void 0!==r?r:t.children))}function m(t){var e,r;return n.createElement("div",{className:"card-text"},n.createElement("div",{className:"card-text-context"},null!==(e=t.context)&&void 0!==e?e:t.children),n.createElement("div",{className:"card-text-tip"},null!==(r=t.context)&&void 0!==r?r:t.children))}function d(t){var e,r;return n.createElement("div",{className:"card floating",onKeyPress:function(e){"Enter"===e.key&&t.confirm_enter&&t.confirm_enter()}},n.createElement("div",{className:"card-title"},n.createElement("h2",null,t.title)),n.createElement("div",{className:"card-content"},t.context&&t.context.map((function(t,e){return n.createElement("div",{key:e},t)}))),n.createElement("div",{className:"card-action"},n.createElement("button",{className:"button button--flat button--grey",onClick:t.cancel},null!==(e=t.cancel_t)&&void 0!==e?e:"cancel"),n.createElement("button",{className:"button button--flat",onClick:t.confirm},null!==(r=t.confirm_t)&&void 0!==r?r:"confirm")))}function y(t){return n.createElement("div",{className:"progress-card"},n.createElement("div",{className:"progress-per"},n.createElement("div",{style:{width:"".concat(t.progress,"%")}})))}var v=function(t){var e=u((0,n.useState)("var(--iconTertiary)"),2),r=e[0],o=e[1];(0,n.useEffect)((function(){void 0===t.ok?void 0===t.success?void 0!==t.running&&o("var(--icon-yellow)"):!0===t.success?o("var(--icon-green)"):!1===t.success&&o("var(--icon-red)"):o(t.ok?"var(--icon-green)":"var(--iconTertiary)")}),[t]);var a={width:"10px",height:"10px",borderRadius:"50%",backgroundColor:r,display:"inline-block"};return n.createElement("div",{style:a})}},3033:(t,e,r)=>{r.d(e,{$Z:()=>l,GL:()=>d,Sm:()=>f,U6:()=>m,cA:()=>h,l6:()=>p});var n=r(6540);function o(t){return o="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},o(t)}function a(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 i(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=o(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==o(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function u(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,u=[],c=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return c(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)?c(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 c(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 l(t){var e=(0,n.useRef)(null),r=u(n.useState(""),2),o=r[0],a=r[1];return(0,n.useEffect)((function(){var r=t.value;null==r&&(r=""),e.current.value=r,a(t.value||"")}),[t.value]),n.createElement("div",{id:"search",className:"",style:{maxWidth:t.max_width,display:t.not_mobile?"block":void 0}},n.createElement("div",{id:"input"},n.createElement("i",{className:"material-icons"},t.icon),n.createElement("input",{type:"text",ref:e,placeholder:o||t.placeholder,onChange:function(e){t.handleInputChange&&t.handleInputChange(e.target.value,e.target),a(e.target.value)},onKeyPress:function(e){"Enter"===e.key&&t.handleEnterPress&&t.handleEnterPress()}})))}function s(t){var e=(0,n.useRef)(null),r=u(n.useState(""),2),o=r[0],a=r[1],i=u(n.useState("input input--block"),2),c=i[0],l=i[1];return(0,n.useEffect)((function(){a(void 0===t.value||null===t.value?"":t.value),t.focus&&e.current.focus(),t.no_border&&l("".concat(c," input--no_border"))}),[t.value]),n.createElement(n.Fragment,null,t.placeholderOut&&n.createElement("p",null,t.placeholderOut),n.createElement("div",{style:{display:"flex",alignItems:"center",width:t.width,maxWidth:t.maxWidth}},t.left_placeholder&&n.createElement("div",{style:{paddingRight:".3rem",width:"auto",whiteSpace:"nowrap"}},t.left_placeholder),n.createElement("input",{onClick:function(t){t.stopPropagation()},disabled:!!t.disabled,className:c,type:t.type,placeholder:o||t.placeholder,onChange:function(e){t.handleInputChange&&t.handleInputChange(e.target.value,e.target),a(e.target.value)},onKeyPress:function(e){"Enter"===e.key&&t.handlerEnter&&t.handlerEnter(e.target.value)},value:o,ref:e}),t.right_placeholder&&n.createElement("div",{style:{paddingLeft:".3rem",width:"auto",whiteSpace:"nowrap"}},t.right_placeholder)))}function f(t){return s(function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?a(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},t))}function h(t){return s({placeholder:t.placeholder,type:"password",handleInputChange:t.handleInputChange,handlerEnter:t.handleEnterPress,maxWidth:t.maxWidth,width:t.width})}function p(t){return n.createElement("div",{style:{display:"flex"}},t.tip&&n.createElement("p",{className:"input input_left "},t.tip),n.createElement("select",{defaultValue:t.defaultValue,value:t.value,style:{width:t.width},disabled:!!t.disabled,className:"input input--block ".concat(t.no_border?"input--no_border":""),onChange:function(e){return t.onChange(e.target.value)}},t.options.map((function(t,e){return n.createElement("option",{key:e,value:t.value},t.title)}))))}function m(t){var e;return n.createElement("div",{className:"input_radio_row"},n.createElement("input",{type:"radio",checked:t.selected,name:null!==(e=t.name)&&void 0!==e?e:"common_name",value:t.value,className:"input_radio",onChange:function(){t.onchange&&t.onchange(t.value)}}),t.context)}function d(t){var e,r=u((0,n.useState)(!1),2),o=r[0],a=r[1];return(0,n.useEffect)((function(){a(!!t.selected)}),[t.selected]),n.createElement("div",{className:"input_radio_row"},n.createElement("input",{type:"checkbox",disabled:null!==(e=t.is_disable)&&void 0!==e&&e,checked:o,onChange:function(){t.onchange&&t.onchange()}}),t.context)}},7209:(t,e,r)=>{r.r(e),r.d(e,{default:()=>$});var n=r(6540),o=r(5725),a=r(3033),i=r(447),u=r(5997),c=r(4289),l=r(2389),s=r(2042),f=r(6007),h=r(3459);function p(t){return p="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},p(t)}function m(){m=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r,n){return Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var a=r&&r.prototype instanceof h?r:h,i=Object.create(a.prototype);return c(i,"_invoke",function(e,r,n){var o=1;return function(a,i){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var u=n.delegate;if(u){var c=S(u,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?4:2,l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=4,n.method="throw",n.arg=l.arg)}}}(e,n,new O(o||[])),!0),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f={};function h(){}function d(){}function y(){}var v={};c(v,a,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(j([])));b&&b!==r&&n.call(b,a)&&(v=b);var w=y.prototype=h.prototype=Object.create(v);function E(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(o,a,i,u){var c=s(t[o],t,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==p(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,u)}),(function(t){r("throw",t,i,u)})):e.resolve(f).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}),!0)}function S(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var a=s(o,e.i,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,f;var i=a.arg;return i?i.done?(r[e.r]=i.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,f):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function _(t){this.tryEntries.push(t)}function k(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function O(t){this.tryEntries=[[-1]],t.forEach(_,this),this.reset(!0)}function j(e){if(null!=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(p(e)+" is not iterable")}return d.prototype=y,c(w,"constructor",y),c(y,"constructor",d),d.displayName=c(y,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,c(t,u,"GeneratorFunction")),t.prototype=Object.create(w),t},e.awrap=function(t){return{__await:t}},E(x.prototype),c(x.prototype,i,(function(){return this})),e.AsyncIterator=x,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new x(l(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},E(w),c(w,u,"Generator"),c(w,a,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=j,O.prototype={constructor:O,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(k),!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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){i.type="throw",i.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a[4],u=this.prev,c=a[1],l=a[2];if(-1===a[0])return n("end"),!1;if(!c&&!l)throw Error("try statement without catch or finally");if(null!=a[0]&&a[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<l)return n(l),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var a=o?o[4]:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o[2],f):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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),k(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;k(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:j(e),r,n},"next"===this.method&&(this.arg=t),f}},e}function d(t,e,r,n,o,a,i){try{var u=t[a](i),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function y(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,u=[],c=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return v(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)?v(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 v(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 g(t){var e=(0,l.Bd)().t,r=y((0,n.useState)(e("毫秒")),2),p=r[0],v=r[1],g=y((0,n.useState)(""),2),b=g[0],w=g[1],E=y((0,n.useState)(""),2),x=E[0],S=E[1],_=y((0,n.useState)(null),2),k=_[0],O=_[1],j=y((0,n.useState)(null),2),N=j[0],A=j[1],C=y((0,n.useState)(Date.now()),2),P=C[0],I=C[1];var T=function(){var t,e=(t=m().mark((function t(){var e,r;return m().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,f.Yu.get("sys_time/get");case 2:if((e=t.sent).code!==h.m.Sucess){t.next=10;break}return t.next=6,e.data;case 6:r=t.sent,O(r.timestamp),A(r.timezone),I(Date.now());case 10:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){d(a,n,o,i,u,"next",t)}function u(t){d(a,n,o,i,u,"throw",t)}i(void 0)}))});return function(){return e.apply(this,arguments)}}();return(0,n.useEffect)((function(){T();var t=setInterval((function(){I((function(t){return t+1e3}))}),1e3);return function(){return clearInterval(t)}}),[]),n.createElement(o.fI,null,n.createElement(o.VP,null,n.createElement(i.Zp,{title:e("时间转换器"),rightBottomCom:n.createElement(u.C3,{text:e("确定"),clickFun:function(){if(b||x){var t=0,e=""!==b&&0!==b;if(e){if(!(0,c.kf)(b))return void(0,s.zN)("must be number !");t=parseInt(b),"分秒"===p&&(t*=1e3)}var r=new Date(e?t:x),n=new Intl.DateTimeFormat("zh-CN",{year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).format(r);if(S(n),!b){var o=r.getTime();w("毫秒"===p?o:o/1e3)}}else new Noty({type:"error",text:"不能都为空",timeout:1e3,layout:"bottomLeft"}).show()}})},n.createElement(a.l6,{options:[{title:e("毫秒"),value:"毫秒"},{title:e("分秒"),value:"分秒"}],onChange:function(t){v(t)}}),n.createElement(a.Sm,{placeholder:p,value:b,handleInputChange:function(t){w(t)}}),n.createElement(a.Sm,{placeholder:e("格式化时间"),value:x,handleInputChange:function(t){S(t)}}))),n.createElement(o.VP,null,null!==k&&null!==N&&n.createElement(i.Zp,{title:e("服务器时间")},n.createElement("h1",null,e("时区"),": ",N),n.createElement("h1",null,e("时间"),": ",new Date(P).toLocaleString(navigator.language,{timeZone:N})))))}var b=r(3413),w=r.n(b),E=r(7952),x=r(3029),S=r(8247),_=r(3430);function k(t){return k="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},k(t)}function O(){O=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r,n){return Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var a=r&&r.prototype instanceof h?r:h,i=Object.create(a.prototype);return c(i,"_invoke",function(e,r,n){var o=1;return function(a,i){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var u=n.delegate;if(u){var c=E(u,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?4:2,l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=4,n.method="throw",n.arg=l.arg)}}}(e,n,new _(o||[])),!0),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f={};function h(){}function p(){}function m(){}var d={};c(d,a,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(j([])));v&&v!==r&&n.call(v,a)&&(d=v);var g=m.prototype=h.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function r(o,a,i,u){var c=s(t[o],t,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==k(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,u)}),(function(t){r("throw",t,i,u)})):e.resolve(f).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}),!0)}function E(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var a=s(o,e.i,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,f;var i=a.arg;return i?i.done?(r[e.r]=i.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,f):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function x(t){this.tryEntries.push(t)}function S(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function _(t){this.tryEntries=[[-1]],t.forEach(x,this),this.reset(!0)}function j(e){if(null!=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(k(e)+" is not iterable")}return p.prototype=m,c(g,"constructor",m),c(m,"constructor",p),p.displayName=c(m,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,c(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},e.awrap=function(t){return{__await:t}},b(w.prototype),c(w.prototype,i,(function(){return this})),e.AsyncIterator=w,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new w(l(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},b(g),c(g,u,"Generator"),c(g,a,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=j,_.prototype={constructor:_,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(S),!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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){i.type="throw",i.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a[4],u=this.prev,c=a[1],l=a[2];if(-1===a[0])return n("end"),!1;if(!c&&!l)throw Error("try statement without catch or finally");if(null!=a[0]&&a[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<l)return n(l),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var a=o?o[4]:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o[2],f):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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),S(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;S(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:j(e),r,n},"next"===this.method&&(this.arg=t),f}},e}function j(t,e,r,n,o,a,i){try{var u=t[a](i),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).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){j(a,n,o,i,u,"next",t)}function u(t){j(a,n,o,i,u,"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,u=[],c=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return C(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)?C(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 C(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 P(t){var e=(0,l.Bd)().t,r=(0,S.MH)().check_user_auth,o=A((0,n.useState)(""),2),i=o[0],c=o[1],s=function(){var t=N(O().mark((function t(e){var r;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=e||i){t.next=4;break}return new(w())({type:"error",text:"mac地址不能为空",timeout:1e3,layout:"bottomLeft"}).show(),t.abrupt("return");case 4:return t.next=6,f._U.post("wol/exec",{mac:r});case 6:if(t.sent.code===h.m.Sucess){t.next=9;break}return t.abrupt("return");case 9:new(w())({type:"success",text:"发送唤醒命令成功",timeout:1e3,layout:"bottomLeft"}).show();case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),p=function(){var t=N(O().mark((function t(){var e;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,f._U.get("wol/tag");case 2:if((e=t.sent).code!==h.m.Sucess){t.next=5;break}return t.abrupt("return",e.data);case 5:return t.abrupt("return",[]);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),m=function(){var t=N(O().mark((function t(e){return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,f._U.post("wol/tag/save",e);case 2:t.sent.code!==h.m.Sucess&&new(w())({type:"error",text:"网络错误",timeout:1e3,layout:"bottomLeft"}).show();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),d=function(){var t=N(O().mark((function t(e){return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:c(e.mac),s(e.mac);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(E.A,null,n.createElement(u.rA,{icon:"play_arrow",title:e("发送"),onClick:function(){s()}}),n.createElement(a.$Z,{placeholder:e("目标设备mac地址"),icon:"laptop_mac",value:i,handleInputChange:function(t){return c(t)}})),n.createElement(x.N,{have_auth_edit:r(_.oV.wol_proxy_tag_update),getItems:p,save:m,clickItem:d,items:[{key:"name",preName:e("名字")},{key:"mac",preName:"mac"+e("地址")},{key:"color",preName:"color"}]}))}var I,T=r(7481),G=r(7444),F=r(6417),D=r(505);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 M(){M=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r,n){return Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var a=r&&r.prototype instanceof h?r:h,i=Object.create(a.prototype);return c(i,"_invoke",function(e,r,n){var o=1;return function(a,i){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===a)throw i;return{value:t,done:!0}}for(n.method=a,n.arg=i;;){var u=n.delegate;if(u){var c=E(u,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?4:2,l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=4,n.method="throw",n.arg=l.arg)}}}(e,n,new _(o||[])),!0),i}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f={};function h(){}function p(){}function m(){}var d={};c(d,a,(function(){return this}));var y=Object.getPrototypeOf,v=y&&y(y(k([])));v&&v!==r&&n.call(v,a)&&(d=v);var g=m.prototype=h.prototype=Object.create(d);function b(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){function r(o,a,i,u){var c=s(t[o],t,a);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==L(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,i,u)}),(function(t){r("throw",t,i,u)})):e.resolve(f).then((function(t){l.value=t,i(l)}),(function(t){return r("throw",t,i,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}),!0)}function E(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var a=s(o,e.i,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,f;var i=a.arg;return i?i.done?(r[e.r]=i.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,f):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function x(t){this.tryEntries.push(t)}function S(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function _(t){this.tryEntries=[[-1]],t.forEach(x,this),this.reset(!0)}function k(e){if(null!=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(L(e)+" is not iterable")}return p.prototype=m,c(g,"constructor",m),c(m,"constructor",p),p.displayName=c(m,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,c(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},e.awrap=function(t){return{__await:t}},b(w.prototype),c(w.prototype,i,(function(){return this})),e.AsyncIterator=w,e.async=function(t,r,n,o,a){void 0===a&&(a=Promise);var i=new w(l(t,r,n,o),a);return e.isGeneratorFunction(r)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},b(g),c(g,u,"Generator"),c(g,a,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=k,_.prototype={constructor:_,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(S),!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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){i.type="throw",i.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a[4],u=this.prev,c=a[1],l=a[2];if(-1===a[0])return n("end"),!1;if(!c&&!l)throw Error("try statement without catch or finally");if(null!=a[0]&&a[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<l)return n(l),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var a=o?o[4]:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o[2],f):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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),S(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;S(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:k(e),r,n},"next"===this.method&&(this.arg=t),f}},e}function U(t,e,r,n,o,a,i){try{var u=t[a](i),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function W(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){U(a,n,o,i,u,"next",t)}function u(t){U(a,n,o,i,u,"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,u=[],c=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(t,e)||function(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}}(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 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 B(){var t=V((0,n.useState)("rsa"),2),e=t[0],r=t[1],c=V((0,n.useState)("pem"),2),p=c[0],m=c[1],d=(0,l.Bd)(),y=d.t,v=(d.i18n,V((0,G.L4)(F.A.confirm),2)),g=(v[0],v[1]),b=V((0,n.useState)(""),2),w=b[0],x=b[1],S=V((0,n.useState)(""),2),_=S[0],k=S[1],O=function(){var t=W(M().mark((function t(){var r;return M().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,f.cD.post("generate",{type:e,form:p});case 2:(r=t.sent).code===h.m.Sucess&&(x(r.data.public_key),k(r.data.private_key),I=r.data.home_path);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),j=function(){var t=W(M().mark((function t(r){var n;return M().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(_&&w){t.next=3;break}return(0,s.zN)("密钥不能为空"),t.abrupt("return");case 3:n="id_"+e,"pub"===r&&(n+=".pub"),g({open:!0,title:y("将覆盖密钥文件"),sub_title:"之前的密钥将作废。 将会作为 ".concat(n,' 文件保存到系统上的"').concat(I,'"目录下,此目录会作为openssh(git)所使用的默认目录。'),handle:function(){var t=W(M().mark((function t(){return M().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,f.cD.post("save_openssh",{name:n,context:"pub"===r?w:_});case 2:t.sent.code===h.m.Sucess&&((0,s.LW)("完成"),g({open:!1,handle:null}));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()});case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(o.xh,null,n.createElement(E.A,null,n.createElement(T.S,{isFlex:!0,columns:[n.createElement(a.l6,{tip:"加密算法",value:e,width:"auto",onChange:function(t){r(t)},options:[{title:y("RSA"),value:"rsa"},{title:y("DSA"),value:"dsa"},{title:y("ECDSA"),value:"ecdsa"}]}),n.createElement(a.l6,{tip:"输出格式",value:p,width:"auto",onChange:function(t){m(t)},options:[{title:y("普通PEM"),value:"pem"},{title:y("opensshPEM"),value:"openssh_pem"}]}),n.createElement(u.rA,{icon:"play_arrow",title:y("生成"),onClick:function(){O()}})]})),n.createElement(o.fI,null,n.createElement(o.VP,null,n.createElement(i.Zp,{title:"公钥",titleCom:n.createElement(u.rA,{title:"复制",icon:"copy_all",onClick:function(){w&&((0,D.l)(w),(0,s.LW)("完成"))}}),rightBottomCom:"openssh_pem"===p&&n.createElement(u.C3,{text:y("保存到.ssh目录"),clickFun:function(){j("pub")}})},n.createElement("textarea",{className:"input--textarea input--no_border",style:{width:"100%",height:"270px"},onChange:function(t){x(t.target.value)},value:w}))),n.createElement(o.VP,null,n.createElement(i.Zp,{title:"私钥",titleCom:n.createElement(u.rA,{title:"复制",icon:"copy_all",onClick:function(){_&&((0,D.l)(_),(0,s.LW)("成功"))}}),rightBottomCom:"openssh_pem"===p&&n.createElement(u.C3,{text:y("保存到.ssh目录"),clickFun:function(){j("pri")}})},n.createElement("textarea",{className:"input--textarea input--no_border",style:{width:"100%",height:"270px"},value:_,onChange:function(t){k(t.target.value)}}))))))}function $(t){var e=(0,l.Bd)().t,r=(0,S.MH)().check_user_auth,a=[];return a.push.apply(a,[{index:1,name:e("时间工具"),rto:"timeutil/"},{index:1,name:e("非对称密钥"),rto:"crypto/"}]),r(_.oV.wol_proxy)&&a.push({index:1,name:e("网络唤醒"),rto:"netwol/"}),n.createElement(o.W1,{optionList:a},n.createElement(g,null),n.createElement(B,null),r(_.oV.wol_proxy)&&n.createElement(P,null))}},7481:(t,e,r)=>{r.d(e,{S:()=>u,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,u=[],c=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(l)throw o}}return u}}(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 u(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,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 29.8305e49e9fa37531b3aa.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[29],{3029:(t,e,r)=>{r.d(e,{N:()=>C});var n=r(6540),o=r(7444),i=r(6417);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,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.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&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return c(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)?c(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 c(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=a((0,o.L4)(i.A.user_base_info),2),r=e[0];e[1];return n.createElement("div",null,t.div?n.createElement("div",{className:"nav_list_a",style:{background:"dark"!==r.user_data.theme?t.color:null}},t.name):t.clickItem||"dir"===t._type?n.createElement("div",{className:"nav_list_a",style:{background:"dark"!==r.user_data.theme?t.color:null},onClick:function(){"dir"!==t._type?t.clickItem&&t.clickItem(t):t.click_dir(t.item)}},t.name):n.createElement("a",{href:t.url,target:t.target,className:"nav_list_a",style:{background:"dark"!==r.user_data.theme?t.color:null}},t.name))}var l=r(4694),f=r(3033),s=r(5997),h=r(7767),p=r(2389);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 y(){return y=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},y.apply(null,arguments)}function v(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 m(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?v(Object(r),!0).forEach((function(e){b(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}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 g(){g=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,r,n){return Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var i=r&&r.prototype instanceof h?r:h,a=Object.create(i.prototype);return u(a,"_invoke",function(e,r,n){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=k(c,n);if(u){if(u===s)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?4:2,l.arg===s)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=4,n.method="throw",n.arg=l.arg)}}}(e,n,new j(o||[])),!0),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var s={};function h(){}function p(){}function y(){}var v={};u(v,i,(function(){return this}));var m=Object.getPrototypeOf,b=m&&m(m(S([])));b&&b!==r&&n.call(b,i)&&(v=b);var w=y.prototype=h.prototype=Object.create(v);function _(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==d(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){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var o;u(this,"_invoke",(function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}),!0)}function k(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,k(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),s;var i=f(o,e.i,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,s;var a=i.arg;return a?a.done?(r[e.r]=a.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,s):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,s)}function O(t){this.tryEntries.push(t)}function x(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function j(t){this.tryEntries=[[-1]],t.forEach(O,this),this.reset(!0)}function S(e){if(null!=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 p.prototype=y,u(w,"constructor",y),u(y,"constructor",p),p.displayName=u(y,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,u(t,c,"GeneratorFunction")),t.prototype=Object.create(w),t},e.awrap=function(t){return{__await:t}},_(E.prototype),u(E.prototype,a,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new E(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},_(w),u(w,c,"Generator"),u(w,i,(function(){return this})),u(w,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=S,j.prototype={constructor:j,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(x),!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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){a.type="throw",a.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],c=this.prev,u=i[1],l=i[2];if(-1===i[0])return n("end"),!1;if(!u&&!l)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=c){if(c<u)return this.method="next",this.arg=t,n(u),!0;if(c<l)return n(l),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o[2],s):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),s},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),x(r),s}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;x(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:S(e),r,n},"next"===this.method&&(this.arg=t),s}},e}function w(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function _(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 E(t){return function(t){if(Array.isArray(t))return x(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 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=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.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&&(a=r.return(),Object(a)!==a))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 x(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)?x(t,e):void 0}}function x(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 j,S,A=["#ffffff","#fefff8","#fcfdf1","#d3d2dc","#f8f9fd","#ebf4fe","#ebebeb","#e8f7eb","#eaf2f9"],I=[],P=[];function C(t){var e=k((0,n.useState)([]),2),r=e[0],a=e[1],c=k((0,n.useState)(-1),2),d=c[0],v=c[1],b=(0,h.zy)(),w=k((0,n.useState)(!1),2),O=w[0],x=w[1],C=k((0,n.useState)(!1),2),N=C[0],T=C[1],F=(0,p.Bd)().t,D=k((0,n.useState)([]),2),G=D[0],L=D[1],M=k((0,o.L4)(i.A.nav_index_add_item_by_now_list),2),U=M[0],$=M[1],z=function(t){-1!==d?P[d]._children=t:I=t};(0,n.useEffect)((function(){var e=function(){var e=_(g().mark((function e(){var r;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.getItems){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,t.getItems();case 4:r=e.sent,a(I=r);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}),[b]);var B=function(){var e=_(g().mark((function e(){return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!O){e.next=6;break}if(!t.save){e.next=4;break}return e.next=4,t.save(I);case 4:e.next=7;break;case 6:S=r;case 7:x(!O);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Y=function(){var e=_(g().mark((function e(){var n;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=[],e.t1=E(r),e.t2=m,e.t3={name:"",color:(0,l.Lr)(A)},e.t4=t.get_pre_add_item,!e.t4){e.next=9;break}return e.next=8,t.get_pre_add_item();case 8:e.t4=e.sent;case 9:e.t5=e.t4,e.t6=(0,e.t2)(e.t3,e.t5),e.t7=[e.t6],n=e.t0.concat.call(e.t0,e.t1,e.t7),z(n),a(n);case 15:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,n.useEffect)((function(){if(U){var t=[].concat(E(r),[m({name:"",color:(0,l.Lr)(A)},U)]);z(t),a(t),x(!0),$(void 0)}}),[U]);var q=function(t){v(d+1),a(t._children),P.push(t)};return n.createElement("div",{className:"nav_list_div"},-1!==d&&n.createElement(s.rA,{title:"返回",icon:"arrow_back",onClick:function(){a(0===d?I:P[d-1]._children),v(d-1),P.pop()}}),r.map((function(e,o){return n.createElement("div",{key:o,draggable:!0,onDragOver:function(t){t.preventDefault()},onDragStart:function(t){return function(t,e){j=e}(0,o)},onDrop:function(t){return function(t,e){var n=E(r),o=n[j];n.splice(j,1),n.splice(e,0,o),z(n),a(n)}(0,o)},style:{cursor:O?"move":"pointer"}},n.createElement(u,y({name:e.name,item:e},e,{div:O,target:"_blank",click_dir:q,clickItem:t.clickItem})),O&&(void 0!==G.find((function(t){return t===o}))||N)&&n.createElement("div",{className:N?"":" site_edit "},"dir"===e._type?n.createElement(n.Fragment,null,n.createElement(f.Sm,{value:e.name,handleInputChange:function(t){e.name=t},placeholder:F("输入类目名"),no_border:!0}),n.createElement(f.Sm,{value:e.color,handleInputChange:function(t){e.color=t},placeholder:"color",no_border:!0})):t.items.map((function(t,r){return n.createElement("div",{key:r},n.createElement(f.Sm,{value:e[t.key],handleInputChange:function(r){e[t.key]=r},placeholder:t.preName,no_border:!0}))})),!N&&n.createElement(s.C3,{text:F("折叠"),clickFun:function(){L((0,l.P1)(G,o))}})),O&&n.createElement("div",{style:{display:"block"}},n.createElement("span",{className:"div-row "},n.createElement(s.C3,{text:F("删除"),clickFun:function(){var t,e;t=o,(e=E(r)).splice(t,1),z(e),a(e)}}),n.createElement(s.C3,{text:F("编辑"),clickFun:function(){void 0===G.find((function(t){return t===o}))&&L([].concat(E(G),[o]))}}))))})),O&&n.createElement("div",{style:{display:"block"}},n.createElement(s.rA,{title:F("取消"),icon:"cancel",onClick:function(){L([]),x(!1),S&&(a(S),z(S)),T(!1)}}),n.createElement(s.rA,{title:F("添加"),icon:"add",onClick:Y}),n.createElement(s.rA,{title:F("添加类目"),icon:"add_box",onClick:function(){var t=[].concat(E(r),[{name:"",_type:"dir",_children:[],color:"#c1edfb"}]);z(t),a(t)}}),n.createElement(s.rA,{title:F("全部编辑"),icon:N?"unfold_less":"unfold_more",onClick:function(){T(!N)}})),(void 0===t.have_auth_edit||!0===t.have_auth_edit)&&n.createElement(s.rA,{icon:O?"save":"edit",title:F(O?"保存":"编辑"),onClick:B}))}}}]);
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 308.21e5d8bdfde58f421c2b.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[308],{5308:(t,e,r)=>{r.r(e),r.d(e,{default:()=>E});var n=r(6540),o=r(7444),i=r(6417),a=r(4289),u=r(6007),c=r(5726),f=r(2042),s=r(7022),l=r(8247),h=r(7767);function p(t){return p="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},p(t)}function y(){y=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r,n){return Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function f(e,r,n,o){var i=r&&r.prototype instanceof h?r:h,a=Object.create(i.prototype);return c(a,"_invoke",function(e,r,n){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=S(u,n);if(c){if(c===l)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var f=s(e,r,n);if("normal"===f.type){if(o=n.done?4:2,f.arg===l)continue;return{value:f.arg,done:n.done}}"throw"===f.type&&(o=4,n.method="throw",n.arg=f.arg)}}}(e,n,new O(o||[])),!0),a}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 l={};function h(){}function d(){}function v(){}var m={};c(m,i,(function(){return this}));var g=Object.getPrototypeOf,b=g&&g(g(_([])));b&&b!==r&&n.call(b,i)&&(m=b);var w=v.prototype=h.prototype=Object.create(m);function x(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var f=c.arg,l=f.value;return l&&"object"==p(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}),!0)}function S(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,S(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),l;var i=s(o,e.i,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,l;var a=i.arg;return a?a.done?(r[e.r]=a.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,l):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,l)}function k(t){this.tryEntries.push(t)}function A(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function O(t){this.tryEntries=[[-1]],t.forEach(k,this),this.reset(!0)}function _(e){if(null!=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(p(e)+" is not iterable")}return d.prototype=v,c(w,"constructor",v),c(v,"constructor",d),d.displayName=c(v,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,u,"GeneratorFunction")),t.prototype=Object.create(w),t},e.awrap=function(t){return{__await:t}},x(E.prototype),c(E.prototype,a,(function(){return this})),e.AsyncIterator=E,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new E(f(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},x(w),c(w,u,"Generator"),c(w,i,(function(){return this})),c(w,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=_,O.prototype={constructor:O,reset:function(e){if(this.prev=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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){a.type="throw",a.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],u=this.prev,c=i[1],f=i[2];if(-1===i[0])return n("end"),!1;if(!c&&!f)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<f)return n(f),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o[2],l):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),l},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),A(r),l}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];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={i:_(e),r,n},"next"===this.method&&(this.arg=t),l}},e}function d(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function v(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){d(i,n,o,a,u,"next",t)}function u(t){d(i,n,o,a,u,"throw",t)}a(void 0)}))}}function m(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,u=[],c=!0,f=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){f=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(f)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return g(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)?g(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 g(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 b,w=!1,x=1024e3;function E(){var t=m((0,o.L4)(i.A.image_editor),2),e=t[0],r=t[1],p=(0,h.Zp)(),d=((0,h.zy)(),function(){var t=v(y().mark((function t(){var n,o,i,h,d;return y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(w){t.next=11;break}return t.prev=1,t.next=4,(0,c.J)("filerobot-image-editor.min.js");case 4:w=!0,t.next=11;break;case 7:return t.prev=7,t.t0=t.catch(1),(0,f.zN)("加载资源失败"),t.abrupt("return");case 11:n=(0,a.GG)("file",e.path),o=window.FilerobotImageEditor,i=o.TABS,h=o.TOOLS,d={defaultSavedImageName:e.name,source:u.$M.getDownloadUrl(n),onSave:function(){var t=v(y().mark((function t(r,o){var i,c,h,p,d,v,m,g,b;return y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(c=r.imageBase64.split(",")[1],r.mimeType,h=r.extension,p=null!==(i=r.name)&&void 0!==i?i:e.name,d="base64/save/".concat(encodeURIComponent("".concat((0,a.Yp)(n)).concat(p,".").concat(h))),!(c.length<=x)){t.next=11;break}return v={base64_context:c,type:s.t7.all},t.next=9,u.$M.post(d,v);case 9:t.next=24;break;case 11:return m=(0,l.L6)(c,x),(g={base64_context:m[0],type:s.t7.start}).type=s.t7.part,t.next=16,u.$M.post(d+"?type".concat(s.t7.start),g);case 16:b=1;case 17:if(!(b<m.length)){t.next=24;break}return g.base64_context=m[b],t.next=21,u.$M.post(d,g);case 21:b++,t.next=17;break;case 24:(0,f.LW)("保存成功");case 25:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),annotationsCommon:{fill:"#151717",stroke:"#ec0f42",shadowColor:"#151717"},Text:{text:""},Rotate:{angle:90,componentType:"slider"},tabsIds:[Object.values(i)],defaultTabId:i.ANNOTATE,defaultToolId:h.ANNOTATE},(b=new o(document.querySelector("#editor_container"),d)).render({onClose:function(t){b.terminate(),r({}),p((0,a.vX)())}});case 17:case"end":return t.stop()}}),t,null,[[1,7]])})));return function(){return t.apply(this,arguments)}}());return(0,n.useEffect)((function(){return d(),function(){b&&b.terminate()}}),[]),n.createElement("div",{id:"image-editor-container"},n.createElement("div",{className:"image-editor-context"},n.createElement("div",{id:"editor_container",className:"image-editor-context"})))}},5726:(t,e,r)=>{function n(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return o(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)?o(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}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,u=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){c=!0,a=t},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}function o(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){return new Promise((function(e){var r=0,o=[];if(void 0!==t.items){var i,a=n(t.items);try{for(a.s();!(i=a.n()).done;){var u=i.value;if("file"===u.kind&&"function"==typeof u.webkitGetAsEntry)c(u.webkitGetAsEntry())}}catch(t){a.e(t)}finally{a.f()}}else e(t.files);function c(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(t.isFile)r++,t.file((function(t){r--,t.fullPath="".concat(n).concat(t.name),o.push(t),0===r&&e(o)}));else if(t.isDirectory){var i={isDir:!0,size:0,fullPath:"".concat(n).concat(t.name),name:t.name};o.push(i),f(t.createReader(),"".concat(n).concat(t.name))}}function f(t,i){r++,t.readEntries((function(a){if(r--,a.length>0){var u,s=n(a);try{for(s.s();!(u=s.n()).done;){c(u.value,"".concat(i,"/"))}}catch(t){s.e(t)}finally{s.f()}f(t,"".concat(i,"/"))}0===r&&e(o)}))}}))}function a(t){return new Promise((function(e,r){var n=document.createElement("script");n.src=t,n.async=!0,n.onload=function(){e(null),console.log("脚本加载完成")},n.onerror=function(){r(r),console.error("脚本加载失败")},document.body.appendChild(n)}))}r.d(e,{J:()=>a,T:()=>i})}}]);
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 402.483375aaa84fbee09bcb.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[402],{3402:(t,r,e)=>{e.r(r),e.d(r,{default:()=>g});var n=e(6540),o=e(7856),i=e(4238),a=e(4944),u=e(7444),c=e(6417),s=e(4405),f=e(505);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 h(){h=function(){return r};var t,r={},e=Object.prototype,n=e.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,r,e,n){return Object.defineProperty(t,r,{value:e,enumerable:!n,configurable:!n,writable:!n})}try{c({},"")}catch(t){c=function(t,r,e){return t[r]=e}}function s(r,e,n,o){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype);return c(a,"_invoke",function(r,e,n){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=E(u,n);if(c){if(c===p)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var s=f(r,e,n);if("normal"===s.type){if(o=n.done?4:2,s.arg===p)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=4,n.method="throw",n.arg=s.arg)}}}(r,n,new F(o||[])),!0),a}function f(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}r.wrap=s;var p={};function y(){}function v(){}function d(){}var w={};c(w,i,(function(){return this}));var g=Object.getPrototypeOf,m=g&&g(g(j([])));m&&m!==e&&n.call(m,i)&&(w=m);var b=d.prototype=y.prototype=Object.create(w);function x(t){["next","throw","return"].forEach((function(r){c(t,r,(function(t){return this._invoke(r,t)}))}))}function _(t,r){function e(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var s=c.arg,h=s.value;return h&&"object"==l(h)&&n.call(h,"__await")?r.resolve(h.__await).then((function(t){e("next",t,a,u)}),(function(t){e("throw",t,a,u)})):r.resolve(h).then((function(t){s.value=t,a(s)}),(function(t){return e("throw",t,a,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,n){function i(){return new r((function(r,o){e(t,n,r,o)}))}return o=o?o.then(i,i):i()}),!0)}function E(r,e){var n=e.method,o=r.i[n];if(o===t)return e.delegate=null,"throw"===n&&r.i.return&&(e.method="return",e.arg=t,E(r,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),p;var i=f(o,r.i,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,p;var a=i.arg;return a?a.done?(e[r.r]=a.value,e.next=r.n,"return"!==e.method&&(e.method="next",e.arg=t),e.delegate=null,p):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function k(t){this.tryEntries.push(t)}function S(r){var e=r[4]||{};e.type="normal",e.arg=t,r[4]=e}function F(t){this.tryEntries=[[-1]],t.forEach(k,this),this.reset(!0)}function j(r){if(null!=r){var e=r[i];if(e)return e.call(r);if("function"==typeof r.next)return r;if(!isNaN(r.length)){var o=-1,a=function e(){for(;++o<r.length;)if(n.call(r,o))return e.value=r[o],e.done=!1,e;return e.value=t,e.done=!0,e};return a.next=a}}throw new TypeError(l(r)+" is not iterable")}return v.prototype=d,c(b,"constructor",d),c(d,"constructor",v),v.displayName=c(d,u,"GeneratorFunction"),r.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===v||"GeneratorFunction"===(r.displayName||r.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,u,"GeneratorFunction")),t.prototype=Object.create(b),t},r.awrap=function(t){return{__await:t}},x(_.prototype),c(_.prototype,a,(function(){return this})),r.AsyncIterator=_,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},x(b),c(b,u,"Generator"),c(b,i,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var r=Object(t),e=[];for(var n in r)e.unshift(n);return function t(){for(;e.length;)if((n=e.pop())in r)return t.value=n,t.done=!1,t;return t.done=!0,t}},r.values=j,F.prototype={constructor:F,reset:function(r){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(S),!r)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(r){if(this.done)throw r;var e=this;function n(t){a.type="throw",a.arg=r,e.next=t}for(var o=e.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],u=this.prev,c=i[1],s=i[2];if(-1===i[0])return n("end"),!1;if(!c&&!s)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<s)return n(s),!1}}},abrupt:function(t,r){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=r&&r<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=t,i.arg=r,o?(this.method="next",this.next=o[2],p):this.complete(i)},complete:function(t,r){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&&r&&(this.next=r),p},finish:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e[2]===t)return this.complete(e[4],e[3]),S(e),p}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e[0]===t){var n=e[4];if("throw"===n.type){var o=n.arg;S(e)}return o}}throw Error("illegal catch attempt")},delegateYield:function(r,e,n){return this.delegate={i:j(r),r:e,n},"next"===this.method&&(this.arg=t),p}},r}function p(t,r,e,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void e(t)}u.done?r(c):Promise.resolve(c).then(n,o)}function y(t){return function(){var r=this,e=arguments;return new Promise((function(n,o){var i=t.apply(r,e);function a(t){p(i,n,o,a,u,"next",t)}function u(t){p(i,n,o,a,u,"throw",t)}a(void 0)}))}}function v(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var n,o,i,a,u=[],c=!0,s=!1;try{if(i=(e=e.call(t)).next,0===r){if(Object(e)!==e)return;c=!1}else for(;!(c=(n=i.call(e)).done)&&(u.push(n.value),u.length!==r);c=!0);}catch(t){s=!0,o=t}finally{try{if(!c&&null!=e.return&&(a=e.return(),Object(a)!==a))return}finally{if(s)throw o}}return u}}(t,r)||function(t,r){if(t){if("string"==typeof t)return d(t,r);var e={}.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?d(t,r):void 0}}(t,r)||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 d(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=Array(r);e<r;e++)n[e]=t[e];return n}var w=n.lazy((function(){return e.e(614).then(e.bind(e,5614))}));function g(t){var r=v((0,n.useState)(null),2),e=r[0],l=r[1],p=v((0,u.L4)(c.A.fileShellShow),2),d=p[0],g=(p[1],v((0,u.L4)(c.A.file_shell_hidden),2)),m=g[0],b=(g[1],v((0,n.useState)(!1),2)),x=b[0],_=b[1],E=v((0,u.L4)(c.A.user_base_info),2),k=E[0],S=(E[1],"dark"===k.user_data.theme?"#FFFFFF":"#000000"),F=function(){var t=y(h().mark((function t(){var r,e,n;return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=new o.Terminal({fontFamily:"Monaco, Menlo, Consolas, 'Courier New', monospace",theme:{background:"#FFFFFF",foreground:S,cursor:S,selectionBackground:"#a6d2ff"},cursorBlink:!0,cursorStyle:"bar",scrollback:1e3,scrollSensitivity:1,tabStopWidth:4}),n=function(t){r.write(t)},e=function(t){r.clear(),r.write(t),e=n},a.ws.addMsg(i.HK.shell_getting,(function(t){e(t.context)})),a.ws.addMsg(i.HK.shell_copy,(function(t){t.context&&(0,f.l)(t.context),r.focus()})),r.onData(function(){var t=y(h().mark((function t(r){var e;return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=new i.hf(i.HK.shell_send)).context=r,t.next=4,a.ws.send(e);case 4:case"end":return t.stop()}}),t)})));return function(r){return t.apply(this,arguments)}}()),l(r);case 7:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),j=function(){y(h().mark((function t(){return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e&&(e.dispose(),l(null)),a.ws.isAilive()&&a.ws.setPromise(function(){var t=y(h().mark((function t(r){return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,a.ws.unConnect();case 2:r();case 3:case"end":return t.stop()}}),t)})));return function(r){return t.apply(this,arguments)}}());case 2:case"end":return t.stop()}}),t)})))()};(0,n.useEffect)((function(){return function(){j()}}),[]),(0,n.useEffect)((function(){if(d.show)if(e){if(x){var t=new i.hf(i.HK.shell_cd),r=new s.n;r.init_path=d.path,r.http_token=localStorage.getItem("token"),t.context=r,a.ws.send(t)}}else F(),_(!0);else j()}),[d]);return n.createElement(w,{show:d.show,file_shell_hidden:m,terminal:e,init:function(t,r){e.writeln("[38;2;29;153;243mopen shell...[0m ");var n=new i.hf(i.HK.shell_open),o=new s.n;o.init_path=d.path,o.rows=t,o.cols=r,o.http_token=localStorage.getItem("token"),n.context=o,a.ws.send(n)}})}}}]);
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 441.19783532a702634c183f.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),i=r(447),a=r(6349);function u(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,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return c(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)?c(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 c(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=u((0,n.useState)(null),2),i=o[0],c=o[1];return(0,n.useEffect)((function(){var t=r.current.getContext("2d"),n=new a.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 c(n),function(){n.destroy()}}),[]),(0,n.useEffect)((function(){i&&(i.data.datasets[0].data=[e,100-e],i.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),d=r(5997),y=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="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r,n){return Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var i=r&&r.prototype instanceof h?r:h,a=Object.create(i.prototype);return c(a,"_invoke",function(e,r,n){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=E(u,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?4:2,l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=4,n.method="throw",n.arg=l.arg)}}}(e,n,new A(o||[])),!0),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f={};function h(){}function p(){}function d(){}var y={};c(y,i,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(j([])));v&&v!==r&&n.call(v,i)&&(y=v);var g=d.prototype=h.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==x(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}),!0)}function E(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=s(o,e.i,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,f;var a=i.arg;return a?a.done?(r[e.r]=a.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,f):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function k(t){this.tryEntries.push(t)}function S(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function A(t){this.tryEntries=[[-1]],t.forEach(k,this),this.reset(!0)}function j(e){if(null!=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 p.prototype=d,c(g,"constructor",d),c(d,"constructor",p),p.displayName=c(d,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},e.awrap=function(t){return{__await:t}},w(b.prototype),c(b.prototype,a,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new b(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(g),c(g,u,"Generator"),c(g,i,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=j,A.prototype={constructor:A,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(S),!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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){a.type="throw",a.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],u=this.prev,c=i[1],l=i[2];if(-1===i[0])return n("end"),!1;if(!c&&!l)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<l)return n(l),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o[2],f):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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),S(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;S(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:j(e),r,n},"next"===this.method&&(this.arg=t),f}},e}function k(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 i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function S(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}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,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(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 O(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)?O(t,e):void 0}}function O(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 P(t){var e=(0,v.Bd)().t,r=A((0,g.L4)(w.A.disk),2),a=(r[0],r[1]),u=A((0,n.useState)({}),2),c=u[0],l=u[1],s=A((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,i,a,u,c,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){a=[],u=k(null!==(i=o.data.ata_smart_attributes)&&void 0!==i?i:[]);try{for(u.s();!(c=u.n()).done;)s=c.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])),a.push(s)}catch(t){u.e(t)}finally{u.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 i=r.apply(t,e);function a(t){S(i,n,o,a,u,"next",t)}function u(t){S(i,n,o,a,u,"throw",t)}a(void 0)}))});return function(){return o.apply(this,arguments)}}();return(0,n.useEffect)((function(){x()}),[c]),n.createElement("div",null,n.createElement(p.A,null,n.createElement(d.rA,{icon:"close",title:e("关闭"),onClick:function(){a({})}})),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(i.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(i.Zp,{title:e("物理信息")},n.createElement(o.Yh,{left:e("是否健康"),right:!0===c.smart_status?"是":"否"}),n.createElement(o.Yh,{left:e("设备型号"),right:c.model_name}),n.createElement(o.Yh,{left:e("序列号"),right:c.serial_number}),n.createElement(o.Yh,{left:e("固件版本"),right:c.firmware_version}),n.createElement(o.Yh,{left:e("转速(每分钟)"),right:c.rotation_rate}),n.createElement(o.Yh,{left:e("通电时长(小时)"),right:c.power_on_time_hours}),n.createElement(o.Yh,{left:e("通电次数"),right:c.power_cycle_count}),n.createElement(o.Yh,{left:e("温度(°C)"),right:c.temperature}),n.createElement(o.Yh,{left:e("通信协议"),right:c.device_protocol})))),n.createElement(o.VP,{widthPer:50},n.createElement(o.xh,null,n.createElement(i.uF,{title:e("SMART详细信息")},n.createElement(y.X,{headers:E,rows:f,width:"10rem"}))))))))}var I=function(t){return t[t.mount=0]="mount",t}({}),C=r(8062),F=r(8247),T=r(3430);function G(t){return G="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},G(t)}function N(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 i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Y(){Y=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r,n){return Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var i=r&&r.prototype instanceof h?r:h,a=Object.create(i.prototype);return c(a,"_invoke",function(e,r,n){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=E(u,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?4:2,l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=4,n.method="throw",n.arg=l.arg)}}}(e,n,new k(o||[])),!0),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f={};function h(){}function p(){}function d(){}var y={};c(y,i,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(S([])));v&&v!==r&&n.call(v,i)&&(y=v);var g=d.prototype=h.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==G(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}),!0)}function E(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=s(o,e.i,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,f;var a=i.arg;return a?a.done?(r[e.r]=a.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,f):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function x(t){this.tryEntries.push(t)}function _(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function k(t){this.tryEntries=[[-1]],t.forEach(x,this),this.reset(!0)}function S(e){if(null!=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(G(e)+" is not iterable")}return p.prototype=d,c(g,"constructor",d),c(d,"constructor",p),p.displayName=c(d,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},e.awrap=function(t){return{__await:t}},w(b.prototype),c(b.prototype,a,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new b(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(g),c(g,u,"Generator"),c(g,i,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=S,k.prototype={constructor:k,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){a.type="throw",a.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],u=this.prev,c=i[1],l=i[2];if(-1===i[0])return n("end"),!1;if(!c&&!l)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<l)return n(l),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o[2],f):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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;_(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:S(e),r,n},"next"===this.method&&(this.arg=t),f}},e}function M(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function L(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){M(i,n,o,a,u,"next",t)}function u(t){M(i,n,o,a,u,"throw",t)}a(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,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(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]),a=V((0,n.useState)({}),2),u=a[0],c=(a[1],V((0,n.useState)([]),2)),l=c[0],s=c[1],f=V((0,n.useState)([]),2),b=f[0],x=f[1],_=V((0,g.L4)(w.A.showPrompt),2),k=(_[0],_[1],(0,F.MH)().check_user_auth),S=V((0,n.useState)([]),2),A=S[0],j=(S[1],(0,F.kZ)().click_file),O=V((0,g.L4)(w.A.prompt_card),2),P=(O[0],O[1]),G=[t("挂载点"),"uuid",t("类型"),t("文件系统类型"),t("文件系统容量"),t("卷容量"),t("设备路径"),t("分区表类型")],M=function(){var t=L(Y().mark((function t(){var e;return Y().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=L(Y().mark((function t(){return Y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:M();case 1:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();(0,n.useEffect)((function(){H()}),[u]);return n.createElement("div",null,n.createElement(p.A,null,n.createElement(d.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(i.Zp,{title:t("物理块(硬盘)设备、逻辑卷、物理卷"),titleCom:n.createElement("div",null,k(T.oV.sys_disk_mount)&&n.createElement(d.rA,{icon:"file_open",title:t("打开挂载文件"),onClick:L(Y().mark((function e(){return Y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:j({name:"fstab(谨慎修改,内容错误会导致系统无法启动)",model:"text",sys_path:"/etc/fstab",menu_list:[n.createElement(d.rA,{icon:"info",title:t("提示"),onClick:L(Y().mark((function t(){return Y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:P({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(d.rA,{key:1,icon:"update",title:t("更新挂载"),onClick:L(Y().mark((function t(){return Y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,h.Yu.post("cmd/exe",{type:I.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(d.rA,{icon:"update",title:t("刷新"),onClick:L(Y().mark((function t(){return Y().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,M();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(y.X,{headers:G,rows:b,width:"10rem"}),n.createElement(C.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(i.xP,null,r),n.createElement(i.xP,null,e.uuid),t(e.type),t(e.fstype),e.fssize,e.size,n.createElement(i.xP,null,e.path),e.pttype]])}}))),n.createElement(o.VP,{widthPer:60},A.map((function(e,r){var a,u=[],c=N(e.pv_list);try{for(c.s();!(a=c.n()).done;){var l=a.value;u.push({name:"".concat(l.name,"---(").concat(l.size,")---(").concat(l.free_size,")")})}}catch(t){c.e(t)}finally{c.f()}var s,f=[],h=N(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(i.Zp,{key:r},n.createElement(o.n5,null,n.createElement($,{name:t("物理卷"),lvms:u}),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 i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function z(){z=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r,n){return Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var i=r&&r.prototype instanceof h?r:h,a=Object.create(i.prototype);return c(a,"_invoke",function(e,r,n){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=E(u,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?4:2,l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=4,n.method="throw",n.arg=l.arg)}}}(e,n,new k(o||[])),!0),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f={};function h(){}function p(){}function d(){}var y={};c(y,i,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(S([])));v&&v!==r&&n.call(v,i)&&(y=v);var g=d.prototype=h.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==Z(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}),!0)}function E(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=s(o,e.i,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,f;var a=i.arg;return a?a.done?(r[e.r]=a.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,f):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function x(t){this.tryEntries.push(t)}function _(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function k(t){this.tryEntries=[[-1]],t.forEach(x,this),this.reset(!0)}function S(e){if(null!=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 p.prototype=d,c(g,"constructor",d),c(d,"constructor",p),p.displayName=c(d,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},e.awrap=function(t){return{__await:t}},w(b.prototype),c(b.prototype,a,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new b(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(g),c(g,u,"Generator"),c(g,i,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=S,k.prototype={constructor:k,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){a.type="throw",a.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],u=this.prev,c=i[1],l=i[2];if(-1===i[0])return n("end"),!1;if(!c&&!l)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<l)return n(l),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o[2],f):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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;_(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:S(e),r,n},"next"===this.method&&(this.arg=t),f}},e}function X(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function D(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){X(i,n,o,a,u,"next",t)}function u(t){X(i,n,o,a,u,"throw",t)}a(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,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(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("容量")],a=[e("名字"),e("物理硬盘"),e("文件系统类型"),e("挂载位置"),e("总容量"),e("剩余容量")],u=R((0,g.L4)(w.A.user_base_info),2),c=u[0],x=(u[1],R((0,n.useState)(0),2)),_=x[0],k=x[1],S=R((0,n.useState)(0),2),A=S[0],j=S[1],O=R((0,n.useState)(0),2),I=O[0],C=O[1],F=R((0,n.useState)(0),2),G=F[0],N=F[1],Y=R((0,n.useState)({}),2),M=Y[0],L=Y[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],it=nt[1],at=R((0,n.useState)([]),2),ut=at[0],ct=at[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],dt=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;N(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,i=null===(n=t.context)||void 0===n?void 0:n.memTotal;j(o),C(i),k((i-o)/i*100)}));case 7:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),yt=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,dt();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,L(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,a,u,c,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,a=[],u=!0,st.sysSoftWare&&st.sysSoftWare[b.jk.smartmontools]&&st.sysSoftWare[b.jk.smartmontools].installed||(u=!1),c=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,a.push([n.createElement(i.xP,{context:r.name}),r.typeName,r.type,r.total,n.createElement(d.rA,{icon:"health_and_safety",title:e("查看健康信息"),onClick:function(){u?pt({type:"check",data:r}):(0,E.zN)("没有安装smartmontools")}})]);case 2:case"end":return t.stop()}}),t)})),c.s();case 12:if((l=c.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),c.e(t.t1);case 21:return t.prev=21,c.f(),t.finish(21);case 24:it(a);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,a,u,c;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=[],a=B(null!=r?r:[]);try{for(a.s();!(u=a.n()).done;)c=u.value,o.push([n.createElement(i.xP,{context:c.name}),n.createElement(i.xP,{context:c.device_name}),c.fsType,n.createElement(i.xP,{context:c.mount}),c.total,c.available])}catch(t){a.e(t)}finally{a.f()}ct(o)}case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return(0,n.useEffect)((function(){return yt(),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,c.sys===T.XM.linux&&n.createElement(d.rA,{icon:"sd_card",title:"硬盘挂载",onClick:function(){pt({type:"mount"})}}),n.createElement(d.Z$,{defaultStatus:!1,text:e("基本信息"),clickFun:function(t){K(t),t&&mt()}}),n.createElement(d.Z$,{defaultStatus:!1,text:e("物理硬盘"),clickFun:function(t){Z(t),t&&vt()}}),n.createElement(d.Z$,{defaultStatus:!1,text:e("文件硬盘"),clickFun:function(t){q(t),t&>()}}),n.createElement(d.Z$,{defaultStatus:et,text:e("实时信息"),clickFun:function(t){rt(t),Q=t,dt()}})),n.createElement(o.xh,null,et&&n.createElement(o.fI,null,n.createElement(o.VP,{widthPer:33},n.createElement(i.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(I,"G")}))),n.createElement(o.VP,{widthPer:100},n.createElement(o.Yh,{left:e("剩余"),center:"".concat(A,"G")}))))))),n.createElement(o.VP,{widthPer:33},n.createElement(i.Zp,{title:"cpu"},n.createElement(o.fI,null,n.createElement(o.VP,null,n.createElement(l,{percentage:G})),n.createElement(o.VP,null,n.createElement(o.fI,null,n.createElement(o.Yh,{left:e("使用率"),center:G}))))))),n.createElement(o.fI,null,H&&n.createElement(o.VP,null,n.createElement(i.Zp,{title:e("基本信息")},n.createElement(o.Yh,{left:e("总内存"),right:M.mem_total}),n.createElement(o.Yh,{left:"cpu ".concat(e("制造商")),right:M.cpu_manufacturer}),n.createElement(o.Yh,{left:"cpu ".concat(e("品牌")),right:M.cpu_brand}),n.createElement(o.Yh,{left:"cpu ".concat(e("逻辑核心")),right:M.cpu_core_num}),n.createElement(o.Yh,{left:"cpu ".concat(e("物理核心")),right:M.cpu_phy_core_num}),n.createElement(o.Yh,{left:"cpu ".concat(e("最大"),"hz"),right:M.cpu_speed_hz}),n.createElement(o.Yh,{left:"".concat(e("当前系统"),":pid;ppid"),right:M.pid_ppid}),n.createElement(o.Yh,{left:e("运行用户"),right:M.user}))),U&&n.createElement(o.VP,null,n.createElement(i.uF,{title:e("物理硬盘")},n.createElement(y.X,{headers:r,rows:ot,width:"10rem"}))),J&&n.createElement(o.VP,null,n.createElement(i.uF,{title:e("文件硬盘")},n.createElement(y.X,{headers:a,rows:ut,width:"10rem"}))))),ht&&"check"===ht.type&&n.createElement(P,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 it(t){return it="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},it(t)}function at(){at=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r,n){return Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var i=r&&r.prototype instanceof h?r:h,a=Object.create(i.prototype);return c(a,"_invoke",function(e,r,n){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=E(u,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?4:2,l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=4,n.method="throw",n.arg=l.arg)}}}(e,n,new k(o||[])),!0),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f={};function h(){}function p(){}function d(){}var y={};c(y,i,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(S([])));v&&v!==r&&n.call(v,i)&&(y=v);var g=d.prototype=h.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==it(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}),!0)}function E(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=s(o,e.i,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,f;var a=i.arg;return a?a.done?(r[e.r]=a.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,f):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function x(t){this.tryEntries.push(t)}function _(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function k(t){this.tryEntries=[[-1]],t.forEach(x,this),this.reset(!0)}function S(e){if(null!=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(it(e)+" is not iterable")}return p.prototype=d,c(g,"constructor",d),c(d,"constructor",p),p.displayName=c(d,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},e.awrap=function(t){return{__await:t}},w(b.prototype),c(b.prototype,a,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new b(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(g),c(g,u,"Generator"),c(g,i,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=S,k.prototype={constructor:k,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){a.type="throw",a.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],u=this.prev,c=i[1],l=i[2];if(-1===i[0])return n("end"),!1;if(!c&&!l)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<l)return n(l),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o[2],f):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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;_(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:S(e),r,n},"next"===this.method&&(this.arg=t),f}},e}function ut(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function ct(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){ut(i,n,o,a,u,"next",t)}function u(t){ut(i,n,o,a,u,"throw",t)}a(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,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(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],i=lt((0,g.L4)(w.A.dockerShellShow),2),a=i[0],u=(i[1],lt((0,g.L4)(w.A.user_base_info),2)),c=u[0],l=(u[1],"dark"===c.user_data.theme?"#FFFFFF":"#000000"),h=function(){var t=ct(at().mark((function t(){var e,r,n;return at().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"===a.type?s.HK.docker_shell_logs_getting:s.HK.docker_shell_exec_getting,(function(t){"error"===t.context&&p(),r(t.context)})),"exec"===a.type&&e.onData(function(){var t=ct(at().mark((function t(e){var r;return at().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(){ct(at().mark((function t(){return at().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r&&(r.writeln("[38;2;29;153;243mclose![0m "),r.dispose(),o(null));case 1:case"end":return t.stop()}}),t)})))()};(0,n.useEffect)((function(){a.show?h():p()}),[a]),(0,n.useEffect)((function(){return function(){p()}}),[]);return n.createElement(ft,{show:a.show,terminal:r,init:function(t,e){r.writeln("[38;2;29;153;243mconnect...[0m ");var n,o=new ot.n;o.rows=t,o.cols=e,o.dockerId=a.dockerId,(n="logs"===a.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 dt(t){return dt="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},dt(t)}function yt(){yt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r,n){return Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var i=r&&r.prototype instanceof h?r:h,a=Object.create(i.prototype);return c(a,"_invoke",function(e,r,n){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=E(u,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?4:2,l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=4,n.method="throw",n.arg=l.arg)}}}(e,n,new k(o||[])),!0),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f={};function h(){}function p(){}function d(){}var y={};c(y,i,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(S([])));v&&v!==r&&n.call(v,i)&&(y=v);var g=d.prototype=h.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==dt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}),!0)}function E(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=s(o,e.i,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,f;var a=i.arg;return a?a.done?(r[e.r]=a.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,f):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function x(t){this.tryEntries.push(t)}function _(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function k(t){this.tryEntries=[[-1]],t.forEach(x,this),this.reset(!0)}function S(e){if(null!=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(dt(e)+" is not iterable")}return p.prototype=d,c(g,"constructor",d),c(d,"constructor",p),p.displayName=c(d,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},e.awrap=function(t){return{__await:t}},w(b.prototype),c(b.prototype,a,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new b(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(g),c(g,u,"Generator"),c(g,i,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=S,k.prototype={constructor:k,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){a.type="throw",a.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],u=this.prev,c=i[1],l=i[2];if(-1===i[0])return n("end"),!1;if(!c&&!l)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<l)return n(l),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o[2],f):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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;_(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:S(e),r,n},"next"===this.method&&(this.arg=t),f}},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 i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function gt(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function wt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){gt(i,n,o,a,u,"next",t)}function u(t){gt(i,n,o,a,u,"throw",t)}a(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,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(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="",kt=[],St=!1;function At(t){var e=(0,v.Bd)().t,r=bt((0,n.useState)({}),2),a=r[0],u=r[1],c=bt((0,n.useState)([]),2),l=c[0],b=c[1],x=bt((0,n.useState)([]),2),_=x[0],k=x[1],S=(0,F.MH)().check_user_auth,A=bt((0,g.L4)(w.A.dockerShellShow),2),j=A[0],O=A[1],P=bt((0,g.L4)(w.A.showPrompt),2),I=(P[0],P[1]),C=bt((0,g.L4)(w.A.confirm),2),G=(C[0],C[1]),N=bt((0,n.useState)(_t),2),Y=N[0],M=N[1],L=bt((0,n.useState)(["id",e("名字"),e("镜像"),e("命令"),e("状态"),e("内存"),"cpu%",e("选择")]),2),V=L[0],H=(L[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(d.rA,{icon:"check_box",title:"全选",onClick:function(){St=!St;for(var t={},e=0;e<_.length&&St;e++)t[_[e][0].props.context]=1;u(t)}}))],R=function(){var t=wt(yt().mark((function t(){var e;return yt().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 a,u=r.value,c=vt(u);try{for(c.s();!(a=c.n()).done;){var l=a.value;if("".concat(l).includes(_t)){e.push(u);break}}}catch(t){c.e(t)}finally{c.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(i.xP,{context:t[r]});t.push(n.createElement(d.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 M(_t),R(),function(){wt(yt().mark((function t(){return yt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:O({show:!1,type:"",dockerId:""}),f.ws.isAilive()&&f.ws.setPromise(function(){var t=wt(yt().mark((function t(e){return yt().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=Y}),[Y]);var J=function(){f.ws.isAilive()&&f.ws.setPromise(function(){var t=wt(yt().mark((function t(e){var r;return yt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new s.hf("logs"===j.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(yt().mark((function t(){var e,r,o,a,u,c,l;return yt().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:[],a=[],u=0;u<o.length;u++)c=o[u],l=[n.createElement(i.xP,{context:c[0]}),n.createElement(i.xP,{context:c[1]}),c[2],c[3],""],a.push(l);kt=a,k(a)}case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),tt=function(){var t=wt(yt().mark((function t(){return yt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:G({open:!0,title:e("确定删除选中的镜像吗"),handle:function(){var t=wt(yt().mark((function t(){var e,r;return yt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=Object.keys(a),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(),G({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(yt().mark((function t(){var e;return yt().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(d.Z$,{defaultStatus:!1,text:e("docker镜像"),clickFun:function(t){X(t),t?(f.ws.unConnect(),Q(),$([])):(R(),k([]),u({}))}})},Object.keys(a).length>0&&n.createElement(d.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,S(T.oV.docker_container_update)&&n.createElement(d.rA,{icon:"delete",title:e("删除容器"),onClick:function(){I({show:!0,overlay:!0,type:pt.PromptEnum.DockerDel,data:{dockerId:K[0].props.context,name:K[1].props.context}})}}),n.createElement(d.rA,{icon:"print",title:e("打印日志"),onClick:function(){j.show?(O({show:!1,type:"",dockerId:""}),J()):O({show:!0,dockerId:K[0].props.context,type:"logs"})}}),S(T.oV.docker_container_update)&&n.createElement(d.rA,{icon:"personal_video",title:e("执行命令"),onClick:function(){j.show?(O({show:!1,type:"",dockerId:""}),J()):O({show:!0,dockerId:K[0].props.context,type:"exec"})}}),S(T.oV.docker_container_update)&&K[4].props.context.includes("Up")&&n.createElement(d.rA,{icon:"stop",title:e("停止"),onClick:function(){return q("stop")}}),S(T.oV.docker_container_update)&&!K[4].props.context.includes("Up")&&n.createElement(d.rA,{icon:"play_arrow",title:e("开启"),onClick:function(){q("start")}})),(0!==l.length||Y)&&!z&&n.createElement(d.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(i.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()}k(t)}else k(kt)}})},n.createElement(y.X,{headers:D,rows:_.map((function(t,r){return t[4]=n.createElement(rt.GL,{context:e(""),selected:a[t[0].props.context],onchange:function(){var e,r;e=t[0].props.context,r={},Object.assign(r,a),r[e]?delete r[e]:r[e]=1,u(r)}}),t})),width:"10rem"})))),0===l.length&&!Y&&!z&&n.createElement(et,{context:e("检测不到docker,主机可能没有安装docker or 容器为空")}),(0!==l.length||Y)&&!z&&n.createElement(o.fI,null,n.createElement(o.VP,{widthPer:80},n.createElement(i.uF,{title:"".concat(e("容器")," (").concat(l.length,")"),titleCom:n.createElement(rt.Sm,{placeholder:e("过滤"),value:Y,handleInputChange:function(t){M(t)}})},n.createElement(y.X,{headers:V,rows:l,width:"10rem"}))))),n.createElement(ht,null))}var jt=r(8815),Ot=r(4694);function Pt(t){return Pt="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},Pt(t)}function It(){It=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r,n){return Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var i=r&&r.prototype instanceof h?r:h,a=Object.create(i.prototype);return c(a,"_invoke",function(e,r,n){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=E(u,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?4:2,l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=4,n.method="throw",n.arg=l.arg)}}}(e,n,new k(o||[])),!0),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f={};function h(){}function p(){}function d(){}var y={};c(y,i,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(S([])));v&&v!==r&&n.call(v,i)&&(y=v);var g=d.prototype=h.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==Pt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}),!0)}function E(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=s(o,e.i,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,f;var a=i.arg;return a?a.done?(r[e.r]=a.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,f):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function x(t){this.tryEntries.push(t)}function _(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function k(t){this.tryEntries=[[-1]],t.forEach(x,this),this.reset(!0)}function S(e){if(null!=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(Pt(e)+" is not iterable")}return p.prototype=d,c(g,"constructor",d),c(d,"constructor",p),p.displayName=c(d,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},e.awrap=function(t){return{__await:t}},w(b.prototype),c(b.prototype,a,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new b(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(g),c(g,u,"Generator"),c(g,i,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=S,k.prototype={constructor:k,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){a.type="throw",a.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],u=this.prev,c=i[1],l=i[2];if(-1===i[0])return n("end"),!1;if(!c&&!l)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<l)return n(l),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o[2],f):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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;_(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:S(e),r,n},"next"===this.method&&(this.arg=t),f}},e}function Ct(t){return function(t){if(Array.isArray(t))return Mt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Yt(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 Ft(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Yt(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,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Tt(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function Gt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Tt(i,n,o,a,u,"next",t)}function u(t){Tt(i,n,o,a,u,"throw",t)}a(void 0)}))}}function Nt(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,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||Yt(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 Yt(t,e){if(t){if("string"==typeof t)return Mt(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)?Mt(t,e):void 0}}function Mt(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 Lt="",Vt=!1,Ht=!1;function Kt(t){var e=(0,v.Bd)().t,r=Nt((0,n.useState)([]),2),a=r[0],u=r[1],c=Nt((0,n.useState)([]),2),l=c[0],h=c[1],m=Nt((0,n.useState)(0),2),g=m[0],w=m[1],b=Nt((0,n.useState)(""),2),E=b[0],x=b[1],_=Nt((0,n.useState)(["pid",e("名字"),e("创建用户"),n.createElement("span",null,e("内存"),n.createElement(d.rA,{icon:"sort",title:e("升序"),onClick:function(){Vt=!Vt}})),n.createElement("span",null,"cpu%",n.createElement(d.rA,{icon:"sort",title:e("升序"),onClick:function(){Ht=!Ht}})),e("选择")]),2),k=_[0],S=(_[1],(0,F.MH)().check_user_auth),A=function(){var t=Gt(It().mark((function t(){var r;return It().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(Lt){var o,a=Ft(t.context);try{for(a.s();!(o=a.n()).done;){var c,l=o.value,s=Ft(l);try{for(s.s();!(c=s.n()).done;){var f=c.value;if("".concat(f).includes(Lt)){r.push(l);break}}}catch(t){s.e(t)}finally{s.f()}}}catch(t){a.e(t)}finally{a.f()}}else r.push.apply(r,Ct(t.context));Vt&&(0,Ot.di)(r,(function(t){return t[3]}),!1),Ht&&(0,Ot.di)(r,(function(t){return t[4]}),!1);for(var p=function(){for(var t=r[y],o=0;o<t.length;o++)t[o]=n.createElement(i.xP,{context:3===o?(0,jt.v7)(t[o]):t[o]});t.push(n.createElement(d.rA,{icon:"place",title:e("选中"),onClick:function(){h(t)}}))},y=0;y<r.length;y++)p();w(r.length),u(r)}));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();(0,n.useEffect)((function(){return x(Lt),A(),function(){Gt(It().mark((function t(){return It().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:f.ws.isAilive()&&f.ws.setPromise(function(){var t=Gt(It().mark((function t(e){return It().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(){Lt=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&&S(T.oV.sys_process_close)&&n.createElement("div",null,n.createElement(d.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!==a.length||Lt?n.createElement(o.fI,null,n.createElement(o.VP,{widthPer:80},n.createElement(i.uF,{title:"".concat(e("进程")," (").concat(g,")"),titleCom:n.createElement(rt.Sm,{placeholder:e("过滤"),value:E,handleInputChange:function(t){x(t)}})},n.createElement(y.X,{headers:k,rows:a,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="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r,n){return Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var i=r&&r.prototype instanceof h?r:h,a=Object.create(i.prototype);return c(a,"_invoke",function(e,r,n){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=E(u,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?4:2,l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=4,n.method="throw",n.arg=l.arg)}}}(e,n,new k(o||[])),!0),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f={};function h(){}function p(){}function d(){}var y={};c(y,i,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(S([])));v&&v!==r&&n.call(v,i)&&(y=v);var g=d.prototype=h.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==$t(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}),!0)}function E(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=s(o,e.i,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,f;var a=i.arg;return a?a.done?(r[e.r]=a.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,f):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function x(t){this.tryEntries.push(t)}function _(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function k(t){this.tryEntries=[[-1]],t.forEach(x,this),this.reset(!0)}function S(e){if(null!=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 p.prototype=d,c(g,"constructor",d),c(d,"constructor",p),p.displayName=c(d,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},e.awrap=function(t){return{__await:t}},w(b.prototype),c(b.prototype,a,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new b(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(g),c(g,u,"Generator"),c(g,i,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=S,k.prototype={constructor:k,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){a.type="throw",a.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],u=this.prev,c=i[1],l=i[2];if(-1===i[0])return n("end"),!1;if(!c&&!l)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<l)return n(l),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o[2],f):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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;_(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:S(e),r,n},"next"===this.method&&(this.arg=t),f}},e}function Wt(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function Zt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Wt(i,n,o,a,u,"next",t)}function u(t){Wt(i,n,o,a,u,"throw",t)}a(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,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(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],i=Bt((0,g.L4)(w.A.systemd_shell_show),2),a=i[0],u=(i[1],Bt((0,g.L4)(w.A.user_base_info),2)),c=u[0],l=(u[1],"dark"===c.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("[38;2;29;153;243mclose![0m "),r.dispose(),o(null));case 1:case"end":return t.stop()}}),t)})))()};(0,n.useEffect)((function(){if(a.show){h();var t=function(t){f.ws.unConnect()};return document.addEventListener("cancel_systemd_logs",t),function(){document.removeEventListener("cancel_systemd_logs",t)}}p()}),[a]),(0,n.useEffect)((function(){return function(){p()}}),[]);return n.createElement(Xt,{show:a.show,terminal:r,init:function(t,e){r.writeln("[38;2;29;153;243mconnect...[0m ");var n={unit_name:a.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="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function c(t,e,r,n){return Object.defineProperty(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n})}try{c({},"")}catch(t){c=function(t,e,r){return t[e]=r}}function l(e,r,n,o){var i=r&&r.prototype instanceof h?r:h,a=Object.create(i.prototype);return c(a,"_invoke",function(e,r,n){var o=1;return function(i,a){if(3===o)throw Error("Generator is already running");if(4===o){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=E(u,n);if(c){if(c===f)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(1===o)throw o=4,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=3;var l=s(e,r,n);if("normal"===l.type){if(o=n.done?4:2,l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=4,n.method="throw",n.arg=l.arg)}}}(e,n,new k(o||[])),!0),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f={};function h(){}function p(){}function d(){}var y={};c(y,i,(function(){return this}));var m=Object.getPrototypeOf,v=m&&m(m(S([])));v&&v!==r&&n.call(v,i)&&(y=v);var g=d.prototype=h.prototype=Object.create(y);function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){function r(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==Rt(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var o;c(this,"_invoke",(function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}),!0)}function E(e,r){var n=r.method,o=e.i[n];if(o===t)return r.delegate=null,"throw"===n&&e.i.return&&(r.method="return",r.arg=t,E(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var i=s(o,e.i,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,f;var a=i.arg;return a?a.done?(r[e.r]=a.value,r.next=e.n,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,f):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)}function x(t){this.tryEntries.push(t)}function _(e){var r=e[4]||{};r.type="normal",r.arg=t,e[4]=r}function k(t){this.tryEntries=[[-1]],t.forEach(x,this),this.reset(!0)}function S(e){if(null!=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 p.prototype=d,c(g,"constructor",d),c(d,"constructor",p),p.displayName=c(d,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,c(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t},e.awrap=function(t){return{__await:t}},w(b.prototype),c(b.prototype,a,(function(){return this})),e.AsyncIterator=b,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new b(l(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(g),c(g,u,"Generator"),c(g,i,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function t(){for(;r.length;)if((n=r.pop())in e)return t.value=n,t.done=!1,t;return t.done=!0,t}},e.values=S,k.prototype={constructor:k,reset:function(e){if(this.prev=this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(_),!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][4];if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function n(t){a.type="throw",a.arg=e,r.next=t}for(var o=r.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i[4],u=this.prev,c=i[1],l=i[2];if(-1===i[0])return n("end"),!1;if(!c&&!l)throw Error("try statement without catch or finally");if(null!=i[0]&&i[0]<=u){if(u<c)return this.method="next",this.arg=t,n(c),!0;if(u<l)return n(l),!1}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n[0]>-1&&n[0]<=this.prev&&this.prev<n[2]){var o=n;break}}o&&("break"===t||"continue"===t)&&o[0]<=e&&e<=o[2]&&(o=null);var i=o?o[4]:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o[2],f):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),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[2]===t)return this.complete(r[4],r[3]),_(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r[0]===t){var n=r[4];if("throw"===n.type){var o=n.arg;_(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={i:S(e),r,n},"next"===this.method&&(this.arg=t),f}},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 i,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function te(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function ee(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){te(i,n,o,a,u,"next",t)}function u(t){te(i,n,o,a,u,"throw",t)}a(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,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(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 ie,ae="";function ue(t){var e=(0,v.Bd)().t,r=(0,F.MH)().check_user_auth,a=re((0,g.L4)(w.A.systemd_shell_show),2),u=a[0],c=a[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],k=(x[1],re((0,n.useState)(["单元名字","加载状态",e("active(sub)状态"),e("描述"),e("选择")]),2)),S=k[0],A=(k[1],re((0,n.useState)([]),2)),j=A[0],O=A[1],P=re((0,n.useState)([]),2),I=P[0],C=P[1],G=re((0,n.useState)([]),2),N=G[0],Y=G[1],M=re((0,n.useState)(!1),2),L=M[0],V=M[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(ae){var r,o=Qt(t.context);try{for(o.s();!(r=o.n()).done;){var a,u=r.value,c=Qt(u);try{for(c.s();!(a=c.n()).done;){var l=a.value;if("".concat(l).includes(ae)){e.push(u);break}}}catch(t){c.e(t)}finally{c.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(i.xP,{context:4===r?(0,jt.v7)(t[r]):t[r]});t.push(n.createElement(d.rA,{icon:"place",title:"选中",onClick:function(){Y(t)}}))},f=0;f<e.length;f++)s();O(e)}));case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();(0,n.useEffect)((function(){return X(ae),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(){ae=z}),[z]);var nt=function(t){if(u.show){c({show:!1,unit_name:""});var e=new CustomEvent("cancel_systemd_logs",{detail:{}});document.dispatchEvent(e)}else c({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)}}(),it=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)}}(),at=function(){var t=ee(Jt().mark((function t(){var e,r,o,a,u,c,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,a=[],u=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=c.value,(r=[n.createElement(i.xP,{context:e.unit}),e.load,"".concat(e.active,"(").concat(e.sub,")"),n.createElement(i.xP,{context:e.description})]).push(n.createElement(d.rA,{icon:"place",title:"添加",onClick:function(){$(r)}})),a.push(r);case 4:case"end":return t.stop()}}),t)})),u.s();case 16:if((c=u.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),u.e(t.t1);case 25:return t.prev=25,u.f(),t.finish(25);case 28:ie=a,C(a);case 30:case"end":return t.stop()}}),t,null,[[13,22,25,28]])})));return function(){return t.apply(this,arguments)}}(),ut=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)}}(),ct=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&&(F.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)}}()}),F.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(d.Z$,{defaultStatus:!1,text:e("系统systemd单元"),clickFun:function(t){V(t),t?(at(),Y([])):$([])}})},N.length>0&&n.createElement("div",null,N[1].props.context),K.length>0&&n.createElement("div",null,K[0].props.context),N.length>0&&n.createElement("div",null,r(T.oV.systemd_update)&&n.createElement(d.rA,{icon:"delete",title:"从实时监控删除",onClick:function(){it(N[1].props.context)}}),n.createElement(d.rA,{icon:"print",title:"打印日志",onClick:function(){nt(N[1].props.context)}})),K.length>0&&n.createElement("div",null,r(T.oV.systemd_update)&&n.createElement(d.rA,{icon:"delete",title:"删除系统上的sytemd",onClick:function(){ot(K[0].props.context)}}),n.createElement(d.rA,{icon:"print",title:"打印日志",onClick:function(){nt(K[0].props.context)}}),r(T.oV.systemd_update)&&n.createElement(d.rA,{icon:"text_fields",title:"sytemd文件内容",onClick:function(){ct(K[0].props.context)}}),r(T.oV.systemd_update)&&!R.has(K[0].props.context)&&n.createElement(d.rA,{icon:"plus_one",title:"添加到管理",onClick:function(){return ut(K[0].props.context)}}))),n.createElement(o.xh,null,L&&n.createElement(o.fI,null,n.createElement(o.VP,{widthPer:80},n.createElement(i.uF,{title:"systemd系统单元(".concat(I.length,")"),titleCom:n.createElement(rt.Sm,{placeholder:"过滤单元",value:W,handleInputChange:function(t){Z(t)},handlerEnter:function(){var t=[];if(W){var e,r=Qt(ie);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()}C(t)}else C(ie)}})},n.createElement(y.X,{headers:S,rows:I,width:"10rem"})))),0===j.length&&!L&&n.createElement(et,{context:"没有管理的单元 or 加载中请等待..."}),0!==j.length&&!L&&n.createElement(o.fI,null,n.createElement(o.VP,{widthPer:80},n.createElement(i.uF,{title:"filecat监控单元(".concat(j.length,")"),titleCom:n.createElement(rt.Sm,{placeholder:"过滤单元",value:z,handleInputChange:function(t){X(t)}})},n.createElement(y.X,{headers:_,rows:j,width:"10rem"}))))),n.createElement(Dt,null))}function ce(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,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(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=ce((0,g.L4)(w.A.user_base_info),2),i=r[0],a=(r[1],[{index:1,name:e("系统性能"),rto:"sys/"},{index:2,name:e("系统进程"),rto:"process/"},{index:3,name:e("docker容器"),rto:"docker/"}]);return i.sys===T.XM.linux&&a.push({index:4,name:e("systemd"),rto:"systemd/"}),n.createElement(o.W1,{optionList:a},n.createElement(tt,null),n.createElement(Kt,null),n.createElement(At,null),n.createElement(ue,null))}},7481:(t,e,r)=>{r.d(e,{S:()=>u,X:()=>a});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,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return i(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)?i(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 i(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 a(t){var e,r=o(n.useState([]),2),i=r[0],a=r[1];return(0,n.useEffect)((function(){t.children?a(Array.isArray(t.children)?t.children:[t.children]):a(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,i.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===i.length-1?"small":""},e)})))}))))}function u(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:()=>u});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 i(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 a=function(t){return n.createElement("li",null,t.click?n.createElement(i,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(a,{key:r,node:e,click:t.click,onContextMenu:t.onContextMenu,render:t.render})}))))};const u=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(a,{key:r,node:e,click:t.click,onContextMenu:t.onContextMenu,render:t.render})}))))}}}]);
|