filecat 5.23.2 → 5.23.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +9 -14
  2. package/build/dist/{247.caa8949b54e0e6e17263.js → 247.07dcc62d939135ff2ff0.js} +2 -2
  3. package/build/dist/{296.8bf13981adcd77166067.js → 296.2154e83f3a83e66369a2.js} +2 -2
  4. package/build/dist/325.f785a768ed8797f36d13.js +2 -0
  5. package/build/dist/40.fdaea34513bd946cb7b9.js +2 -0
  6. package/build/dist/{431.42a8e3504f0c20be00d1.js → 431.331917a6a61c011a6913.js} +2 -2
  7. package/build/dist/441.8521ebb38d1e47d62e83.js +2 -0
  8. package/build/dist/523.3f09d3995b6297f56584.js +2 -0
  9. package/build/dist/{584.f22527c5682876656491.js → 584.290015da9108003d6516.js} +2 -2
  10. package/build/dist/{603.b62d89c74f6f2ee1b855.js → 603.d5f0009883fa046cfeb3.js} +2 -2
  11. package/build/dist/{661.efab620607f961304682.js → 661.6c2de327ed192c0ebbc2.js} +2 -2
  12. package/build/dist/{704.15054b9c67a80f07d723.js → 704.34dad7edba053566d627.js} +2 -2
  13. package/build/dist/759.ac0d69796668d718026d.js +2 -0
  14. package/build/dist/{943.6360059826b561a14949.js → 943.5983a1e59b1db14dc7d8.js} +2 -2
  15. package/build/dist/{962.9eb90de9218581df0fb5.js → 962.b2b57a20cfd5de5bae6f.js} +2 -2
  16. package/build/dist/963.4a7c8fe0dce67f1fbc98.js +2 -0
  17. package/build/dist/{984.49d1aa99333900fa09f5.js → 984.79f020a2cbd6a02d5c12.js} +2 -2
  18. package/build/dist/998.735c4789e7c198fdc79c.js +2 -0
  19. package/build/dist/index.html +1 -1
  20. package/build/dist/main.2e25aa585083497591a3.js +2 -0
  21. package/build/main.js +1 -1
  22. package/build/threads.work.filecat.js +1 -1
  23. package/package.json +1 -1
  24. package/shell/build.js +12 -7
  25. package/shell/dev.js +1 -1
  26. package/shell/pkg.ts +2 -1
  27. package/shell/start/windows-install.js +58 -11
  28. package/shell/start/windows-uninstall.js +44 -5
  29. package/shell/util/file.js +46 -0
  30. package/build/dist/325.c7b42884ca3f90a3e23b.js +0 -2
  31. package/build/dist/40.72defafe55e426b283c6.js +0 -2
  32. package/build/dist/441.f4e3fa7218cff39d8f36.js +0 -2
  33. package/build/dist/523.e773ebf3ccfcf3d84c73.js +0 -2
  34. package/build/dist/759.215c1d5fe9327751a35d.js +0 -2
  35. package/build/dist/963.1ed6e8e5938babda8a80.js +0 -2
  36. package/build/dist/998.b067c11e6c3ec563f01f.js +0 -2
  37. package/build/dist/main.b2c4cedb05c5a34a2565.js +0 -2
  38. package/shell/config/webpack.worker.get.js +0 -42
  39. /package/build/dist/{247.caa8949b54e0e6e17263.js.LICENSE.txt → 247.07dcc62d939135ff2ff0.js.LICENSE.txt} +0 -0
  40. /package/build/dist/{296.8bf13981adcd77166067.js.LICENSE.txt → 296.2154e83f3a83e66369a2.js.LICENSE.txt} +0 -0
  41. /package/build/dist/{325.c7b42884ca3f90a3e23b.js.LICENSE.txt → 325.f785a768ed8797f36d13.js.LICENSE.txt} +0 -0
  42. /package/build/dist/{40.72defafe55e426b283c6.js.LICENSE.txt → 40.fdaea34513bd946cb7b9.js.LICENSE.txt} +0 -0
  43. /package/build/dist/{431.42a8e3504f0c20be00d1.js.LICENSE.txt → 431.331917a6a61c011a6913.js.LICENSE.txt} +0 -0
  44. /package/build/dist/{441.f4e3fa7218cff39d8f36.js.LICENSE.txt → 441.8521ebb38d1e47d62e83.js.LICENSE.txt} +0 -0
  45. /package/build/dist/{523.e773ebf3ccfcf3d84c73.js.LICENSE.txt → 523.3f09d3995b6297f56584.js.LICENSE.txt} +0 -0
  46. /package/build/dist/{584.f22527c5682876656491.js.LICENSE.txt → 584.290015da9108003d6516.js.LICENSE.txt} +0 -0
  47. /package/build/dist/{603.b62d89c74f6f2ee1b855.js.LICENSE.txt → 603.d5f0009883fa046cfeb3.js.LICENSE.txt} +0 -0
  48. /package/build/dist/{661.efab620607f961304682.js.LICENSE.txt → 661.6c2de327ed192c0ebbc2.js.LICENSE.txt} +0 -0
  49. /package/build/dist/{704.15054b9c67a80f07d723.js.LICENSE.txt → 704.34dad7edba053566d627.js.LICENSE.txt} +0 -0
  50. /package/build/dist/{759.215c1d5fe9327751a35d.js.LICENSE.txt → 759.ac0d69796668d718026d.js.LICENSE.txt} +0 -0
  51. /package/build/dist/{943.6360059826b561a14949.js.LICENSE.txt → 943.5983a1e59b1db14dc7d8.js.LICENSE.txt} +0 -0
  52. /package/build/dist/{962.9eb90de9218581df0fb5.js.LICENSE.txt → 962.b2b57a20cfd5de5bae6f.js.LICENSE.txt} +0 -0
  53. /package/build/dist/{963.1ed6e8e5938babda8a80.js.LICENSE.txt → 963.4a7c8fe0dce67f1fbc98.js.LICENSE.txt} +0 -0
  54. /package/build/dist/{984.49d1aa99333900fa09f5.js.LICENSE.txt → 984.79f020a2cbd6a02d5c12.js.LICENSE.txt} +0 -0
  55. /package/build/dist/{998.b067c11e6c3ec563f01f.js.LICENSE.txt → 998.735c4789e7c198fdc79c.js.LICENSE.txt} +0 -0
  56. /package/build/dist/{main.b2c4cedb05c5a34a2565.js.LICENSE.txt → main.2e25aa585083497591a3.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
- /*! For license information please see 431.42a8e3504f0c20be00d1.js.LICENSE.txt */
2
- (self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[431,627],{5219(t){!function(){var e=function(t,n){var r=this;e.count=(e.count||0)+1,this.count=e.count,this.isOpened=!1,this.input=i(t),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("aria-autocomplete","list"),this.input.setAttribute("aria-expanded","false"),this.input.setAttribute("aria-controls","awesomplete_list_"+this.count),this.input.setAttribute("aria-owns","awesomplete_list_"+this.count),this.input.setAttribute("role","combobox"),this.options=n=n||{},function(t,e,n){for(var r in e){var i=e[r],o=t.input.getAttribute("data-"+r.toLowerCase());t[r]="number"==typeof i?parseInt(o):!1===i?null!==o:i instanceof Function?null:o,t[r]||0===t[r]||(t[r]=r in n?n[r]:i)}}(this,{minChars:2,maxItems:10,autoFirst:!1,data:e.DATA,filter:e.FILTER_CONTAINS,sort:!1!==n.sort&&e.SORT_BYLENGTH,container:e.CONTAINER,item:e.ITEM,replace:e.REPLACE,tabSelect:!1,listLabel:"Results List",statusNoResults:"No results found",statusXResults:"{0} results found",statusTypeXChar:"Type {0} or more characters for results"},n),this.index=-1,this.container=this.container(t),this.ul=i.create("ul",{hidden:"hidden",role:"listbox",id:"awesomplete_list_"+this.count,inside:this.container,"aria-label":this.listLabel}),this.status=i.create("span",{className:"visually-hidden",role:"status","aria-live":"assertive","aria-atomic":!0,inside:this.container,textContent:""}),this._events={input:{input:this.evaluate.bind(this),blur:this.close.bind(this,{reason:"blur"}),keydown:function(t){var e=t.keyCode;r.opened&&(13===e&&r.selected||9===e&&r.selected&&r.tabSelect?(t.preventDefault(),r.select(void 0,void 0,t)):27===e?r.close({reason:"esc"}):38!==e&&40!==e||(t.preventDefault(),r[38===e?"previous":"next"]()))}},form:{submit:this.close.bind(this,{reason:"submit"})},ul:{mousedown:function(t){t.preventDefault()},click:function(t){var e=t.target;if(e!==this){for(;e&&!/li/i.test(e.nodeName);)e=e.parentNode;e&&0===t.button&&(t.preventDefault(),r.select(e,t.target,t))}}}},i.bind(this.input,this._events.input),i.bind(this.input.form,this._events.form),i.bind(this.ul,this._events.ul),this.input.hasAttribute("list")?(this.list="#"+this.input.getAttribute("list"),this.input.removeAttribute("list")):this.list=this.input.getAttribute("data-list")||n.list||[],e.all.push(this)};function n(t){var e=Array.isArray(t)?{label:t[0],value:t[1]}:"object"==typeof t&&"label"in t&&"value"in t?t:{label:t,value:t};this.label=e.label||e.value,this.value=e.value}e.prototype={set list(t){if(Array.isArray(t))this._list=t;else if("string"==typeof t&&t.indexOf(",")>-1)this._list=t.split(/\s*,\s*/);else if((t=i(t))&&t.children){var e=[];r.apply(t.children).forEach(function(t){if(!t.disabled){var n=t.textContent.trim(),r=t.value||n,i=t.label||n;""!==r&&e.push({label:i,value:r})}}),this._list=e}document.activeElement===this.input&&this.evaluate()},get selected(){return this.index>-1},get opened(){return this.isOpened},close:function(t){this.opened&&(this.input.setAttribute("aria-expanded","false"),this.ul.setAttribute("hidden",""),this.isOpened=!1,this.index=-1,this.status.setAttribute("hidden",""),this.input.setAttribute("aria-activedescendant",""),i.fire(this.input,"awesomplete-close",t||{}))},open:function(){this.input.setAttribute("aria-expanded","true"),this.ul.removeAttribute("hidden"),this.isOpened=!0,this.status.removeAttribute("hidden"),this.autoFirst&&-1===this.index&&this.goto(0),i.fire(this.input,"awesomplete-open")},destroy:function(){if(i.unbind(this.input,this._events.input),i.unbind(this.input.form,this._events.form),!this.options.container){var t=this.container.parentNode;t.insertBefore(this.input,this.container),t.removeChild(this.container)}this.input.removeAttribute("autocomplete"),this.input.removeAttribute("aria-autocomplete"),this.input.removeAttribute("aria-expanded"),this.input.removeAttribute("aria-controls"),this.input.removeAttribute("aria-owns"),this.input.removeAttribute("role");var n=e.all.indexOf(this);-1!==n&&e.all.splice(n,1)},next:function(){var t=this.ul.children.length;this.goto(this.index<t-1?this.index+1:t?0:-1)},previous:function(){var t=this.ul.children.length,e=this.index-1;this.goto(this.selected&&-1!==e?e:t-1)},goto:function(t){var e=this.ul.children;this.selected&&e[this.index].setAttribute("aria-selected","false"),this.index=t,t>-1&&e.length>0&&(e[t].setAttribute("aria-selected","true"),this.input.setAttribute("aria-activedescendant",this.ul.id+"_item_"+this.index),this.ul.scrollTop=e[t].offsetTop-this.ul.clientHeight+e[t].clientHeight,i.fire(this.input,"awesomplete-highlight",{text:this.suggestions[this.index]}))},select:function(t,e,n){if(t?this.index=i.siblingIndex(t):t=this.ul.children[this.index],t){var r=this.suggestions[this.index];i.fire(this.input,"awesomplete-select",{text:r,origin:e||t,originalEvent:n})&&(this.replace(r),this.close({reason:"select"}),i.fire(this.input,"awesomplete-selectcomplete",{text:r,originalEvent:n}))}},evaluate:function(){var t=this,e=this.input.value;e.length>=this.minChars&&this._list&&this._list.length>0?(this.index=-1,this.ul.innerHTML="",this.suggestions=this._list.map(function(r){return new n(t.data(r,e))}).filter(function(n){return t.filter(n,e)}),!1!==this.sort&&(this.suggestions=this.suggestions.sort(this.sort)),this.suggestions=this.suggestions.slice(0,this.maxItems),this.suggestions.forEach(function(n,r){t.ul.appendChild(t.item(n,e,r))}),0===this.ul.children.length?(this.status.textContent=this.statusNoResults,this.close({reason:"nomatches"})):(this.input.setAttribute("aria-activedescendant",""),this.open(),this.status.textContent=this.statusXResults.replaceAll("{0}",this.ul.children.length))):(this.close({reason:"nomatches"}),this.minChar<=1||e.length>=this.minChars?this.status.textContent=this.statusNoResults:this.status.textContent=this.statusTypeXChar.replaceAll("{0}",this.minChars))}},e.all=[],e.FILTER_CONTAINS=function(t,e){return RegExp(i.regExpEscape(e.trim()),"i").test(t)},e.FILTER_STARTSWITH=function(t,e){return RegExp("^"+i.regExpEscape(e.trim()),"i").test(t)},e.SORT_BYLENGTH=function(t,e){return t.length!==e.length?t.length-e.length:t<e?-1:1},e.CONTAINER=function(t){return i.create("div",{className:"awesomplete",around:t})},e.ITEM=function(t,e,n){var r=""===e.trim()?t:t.replace(RegExp(i.regExpEscape(e.trim()),"gi"),"<mark>$&</mark>");return i.create("li",{innerHTML:r,role:"option","aria-selected":"false",tabindex:"-1",id:"awesomplete_list_"+this.count+"_item_"+n})},e.REPLACE=function(t){this.input.value=t.value},e.DATA=function(t){return t},Object.defineProperty(n.prototype=Object.create(String.prototype),"length",{get:function(){return this.label.length}}),n.prototype.toString=n.prototype.valueOf=function(){return""+this.label};var r=Array.prototype.slice;function i(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function o(t,e){return r.call((e||document).querySelectorAll(t))}function a(){o("input.awesomplete").forEach(function(t){new e(t)})}i.create=function(t,e){var n=document.createElement(t);for(var r in e){var o=e[r];if("inside"===r)i(o).appendChild(n);else if("around"===r){var a=i(o);a.parentNode.insertBefore(n,a),n.appendChild(a),null!=a.getAttribute("autofocus")&&a.focus()}else r in n?n[r]=o:n.setAttribute(r,o)}return n},i.bind=function(t,e){if(t)for(var n in e){var r=e[n];n.split(/\s+/).forEach(function(e){t.addEventListener(e,r)})}},i.unbind=function(t,e){if(t)for(var n in e){var r=e[n];n.split(/\s+/).forEach(function(e){t.removeEventListener(e,r)})}},i.fire=function(t,e,n){var r=document.createEvent("HTMLEvents");for(var i in r.initEvent(e,!0,!0),n)r[i]=n[i];return t.dispatchEvent(r)},i.regExpEscape=function(t){return t.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")},i.siblingIndex=function(t){for(var e=0;t=t.previousElementSibling;e++);return e},"undefined"!=typeof self&&(self.Awesomplete=e),"undefined"!=typeof Document&&("loading"!==document.readyState?a():document.addEventListener("DOMContentLoaded",a)),e.$=i,e.$$=o,t.exports&&(t.exports=e)}()},7481(t,e,n){"use strict";n.d(e,{S:()=>u,X:()=>a});var r=n(6540);function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,u=[],s=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(u.push(r.value),u.length!==e);s=!0);}catch(t){l=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(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 o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function a(t){var e,n=i(r.useState([]),2),o=n[0],a=n[1];return(0,r.useEffect)(function(){t.children?a(Array.isArray(t.children)?t.children:[t.children]):a(t.rows)},[t.rows,t.children]),r.createElement("table",null,r.createElement("thead",null,r.createElement("tr",null,null===(e=t.headers)||void 0===e?void 0:e.map(function(t,e){return r.createElement("th",{key:e},t)}))),r.createElement("tbody",null,o.map(function(e,n){return r.createElement("tr",{key:n,onContextMenu:function(){t.handleContextMenu&&t.handleContextMenu(e)}},e.map(function(e,n){var i;return r.createElement("td",{style:{width:null!==(i=t.width)&&void 0!==i?i:"auto"},key:n,className:n===o.length-1?"small":""},e)}))})))}function u(t){return r.createElement("div",{style:{display:t.isFlex?"flex":"block"}},t.columns.map(function(t,e){return r.createElement("div",{key:e},t)}))}},7445(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>D});var r=n(6540),i=n(5725),o=n(447),a=n(5997),u=n(7481),s=n(3033),l=n(4284),c=n(3459),f=n(2726),h=n(3413),d=n.n(h),p=n(2389),m=n(7952),v=n(6325),b=n(7444),y=n(6417);n(2042);function g(t){return function(t){if(Array.isArray(t))return T(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 w(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof u?r:u,l=Object.create(s.prototype);return E(l,"_invoke",function(n,r,i){var o,u,s,l=0,c=i||[],f=!1,h={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,n){return o=e,u=0,s=t,h.n=n,a}};function d(n,r){for(u=n,s=r,e=0;!f&&l&&!i&&e<c.length;e++){var i,o=c[e],d=h.p,p=o[2];n>3?(i=p===r)&&(s=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=t):o[0]<=d&&((i=n<2&&d<o[1])?(u=0,h.v=r,h.n=o[1]):d<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,c,p){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&d(c,p),u=c,s=p;(e=u<2?t:s)||!f;){o||(u?u<3?(u>1&&(h.n=-1),d(u,s)):h.n=s:h.v=s);try{if(l=2,o){if(u||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,u<2&&(u=0)}else 1===u&&(e=o.return)&&e.call(o),u<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=t}else if((e=(f=h.n<0)?s:n.call(r,h))!==a)break}catch(e){o=t,u=1,s=e}finally{l=1}}return{value:e,done:f}}}(n,i,o),!0),l}var a={};function u(){}function s(){}function l(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(E(e={},r,function(){return this}),e),f=l.prototype=u.prototype=Object.create(c);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,E(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return s.prototype=l,E(f,"constructor",l),E(l,"constructor",s),s.displayName="GeneratorFunction",E(l,i,"GeneratorFunction"),E(f),E(f,i,"Generator"),E(f,r,function(){return this}),E(f,"toString",function(){return"[object Generator]"}),(w=function(){return{w:o,m:h}})()}function E(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}E=function(t,e,n,r){function o(e,n){E(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},E(t,e,n,r)}function A(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=O(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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 o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function x(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function S(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){x(o,r,i,a,u,"next",t)}function u(t){x(o,r,i,a,u,"throw",t)}a(void 0)})}}function k(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,u=[],s=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(u.push(r.value),u.length!==e);s=!0);}catch(t){l=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return u}}(t,e)||O(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(t,e){if(t){if("string"==typeof t)return T(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(t,e):void 0}}function T(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function C(t){var e=(0,p.Bd)().t,n=k((0,r.useState)([]),2),h=n[0],E=n[1],x=k((0,r.useState)([]),2),O=x[0],T=x[1],C=k((0,r.useState)(""),2),I=C[0],_=C[1],j=k((0,r.useState)(""),2),L=j[0],P=j[1],N=k((0,r.useState)(!1),2),H=N[0],F=N[1],R=k((0,b.L4)(y.A.showPrompt),2),G=(R[0],R[1]),D=k((0,b.L4)(y.A.confirm),2);D[0],D[1];(0,r.useEffect)(function(){S(w().m(function t(){var e,n,r,i,o,a,u;return w().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,l.ez.get("ips/dnspod");case 1:if((e=t.v).code===c.m.Sucess){t.n=2;break}return t.a(2);case 2:n=e.data,r=[],i=[],o=A(n.ips);try{for(o.s();!(a=o.n()).done;)(u=a.value).isIPv4?r.push(u):i.push(u)}catch(t){o.e(t)}finally{o.f()}E(r),T(i),n.account&&(_(n.account.id),P(n.account.token)),F(n.isOpen);case 3:return t.a(2)}},t)}))()},[]);var M=function(){var t=S(w().m(function t(){var e,n,r,i,o,a;return w().w(function(t){for(;;)switch(t.n){case 0:if(!H||I&&L){t.n=1;break}return new(d())({type:"error",text:"id和token都不能为空",timeout:1e3,layout:"bottomLeft"}).show(),t.a(2);case 1:for(e=new f.yL,n=[],r=0,i=[].concat(g(h),g(O));r<i.length;r++)(o=i[r]).ddnsHost&&n.push(o);return e.ips=n,e.account={id:I,token:L},e.isOpen=H,e.ddnsType=f.E2.dnspod,t.n=2,l.ez.post("save",e);case 2:(a=t.v).code===c.m.DdnsAuthFail?new(d())({type:"error",text:a.data,timeout:1e3,layout:"bottomLeft"}).show():new(d())({type:"success",text:a.data,timeout:1e3,layout:"bottomLeft"}).show();case 3:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();return r.createElement("div",null,r.createElement(m.A,null,r.createElement(a.rA,{icon:"add",title:e("添加http获取ip"),onClick:function(){G({show:!0,type:v.PromptEnum.DdnsAddHttp,overlay:!0,data:{}})}})),r.createElement(i.fI,null,r.createElement(i.VP,null,r.createElement(o.Zp,{title:"ipv4"},h.length>0&&h.map(function(t,e){return r.createElement("div",{key:e},"".concat(t.ifaceOrWww,"(").concat(t.ip,")"),r.createElement(s.Sm,{placeholder:"a.abc.com b.abc.com ...",value:t.ddnsHost,handleInputChange:function(e){t.ddnsHost=e}}))})),r.createElement(o.Zp,{title:"ipv6"},O.length>0&&O.map(function(t,e){return r.createElement("div",{key:e},"".concat(t.ifaceOrWww,"(").concat(t.ip,")"),r.createElement(s.Sm,{placeholder:"a.abc.com b.abc.com ...",value:t.ddnsHost,handleInputChange:function(e){t.ddnsHost=e}}))}))),r.createElement(i.VP,null,r.createElement(o.Zp,{title:e("账号设置"),rightBottomCom:r.createElement(a.C3,{text:e("保存"),clickFun:M})},r.createElement(s.Sm,{placeholder:"ID",value:I,handleInputChange:function(t){_(t)}}),r.createElement(s.Sm,{placeholder:"TOKEN",value:L,handleInputChange:function(t){P(t)}}),r.createElement(u.S,{isFlex:!0,columns:[r.createElement(s.U6,{value:1,context:e("开启"),selected:H,onchange:function(){F(!H)}}),r.createElement(s.U6,{value:1,context:e("关闭"),selected:!H,onchange:function(){F(!H)}})]})),r.createElement(o.Zp,{title:e("说明")},"域名如果不存在会自动创建,空子域名是@,ip6和ipv4可以互相切换。"))))}function I(t){return function(t){if(Array.isArray(t))return R(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||F(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 _(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof u?r:u,l=Object.create(s.prototype);return j(l,"_invoke",function(n,r,i){var o,u,s,l=0,c=i||[],f=!1,h={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,n){return o=e,u=0,s=t,h.n=n,a}};function d(n,r){for(u=n,s=r,e=0;!f&&l&&!i&&e<c.length;e++){var i,o=c[e],d=h.p,p=o[2];n>3?(i=p===r)&&(s=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=t):o[0]<=d&&((i=n<2&&d<o[1])?(u=0,h.v=r,h.n=o[1]):d<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,c,p){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&d(c,p),u=c,s=p;(e=u<2?t:s)||!f;){o||(u?u<3?(u>1&&(h.n=-1),d(u,s)):h.n=s:h.v=s);try{if(l=2,o){if(u||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,u<2&&(u=0)}else 1===u&&(e=o.return)&&e.call(o),u<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=t}else if((e=(f=h.n<0)?s:n.call(r,h))!==a)break}catch(e){o=t,u=1,s=e}finally{l=1}}return{value:e,done:f}}}(n,i,o),!0),l}var a={};function u(){}function s(){}function l(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(j(e={},r,function(){return this}),e),f=l.prototype=u.prototype=Object.create(c);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,j(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return s.prototype=l,j(f,"constructor",l),j(l,"constructor",s),s.displayName="GeneratorFunction",j(l,i,"GeneratorFunction"),j(f),j(f,i,"Generator"),j(f,r,function(){return this}),j(f,"toString",function(){return"[object Generator]"}),(_=function(){return{w:o,m:h}})()}function j(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}j=function(t,e,n,r){function o(e,n){j(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},j(t,e,n,r)}function L(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=F(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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 o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function P(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function N(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){P(o,r,i,a,u,"next",t)}function u(t){P(o,r,i,a,u,"throw",t)}a(void 0)})}}function H(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,u=[],s=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(u.push(r.value),u.length!==e);s=!0);}catch(t){l=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return u}}(t,e)||F(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 F(t,e){if(t){if("string"==typeof t)return R(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?R(t,e):void 0}}function R(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function G(t){var e=(0,p.Bd)().t,n=H((0,r.useState)([]),2),h=n[0],g=n[1],w=H((0,r.useState)([]),2),E=w[0],A=w[1],x=H((0,r.useState)(""),2),S=x[0],k=x[1],O=H((0,r.useState)(""),2),T=O[0],C=O[1],j=H((0,r.useState)(!1),2),P=j[0],F=j[1],R=H((0,b.L4)(y.A.showPrompt),2),G=(R[0],R[1]),D=H((0,b.L4)(y.A.confirm),2);D[0],D[1];(0,r.useEffect)(function(){N(_().m(function t(){var e,n,r,i,o,a,u;return _().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,l.ez.get("ips/tx");case 1:if((e=t.v).code===c.m.Sucess){t.n=2;break}return t.a(2);case 2:n=e.data,r=[],i=[],o=L(n.ips);try{for(o.s();!(a=o.n()).done;)(u=a.value).isIPv4?r.push(u):i.push(u)}catch(t){o.e(t)}finally{o.f()}g(r),A(i),n.account&&(k(n.account.secretid),C(n.account.secretkey)),F(n.isOpen);case 3:return t.a(2)}},t)}))()},[]);var M=function(){var t=N(_().m(function t(){var e,n,r,i,o,a;return _().w(function(t){for(;;)switch(t.n){case 0:if(!P||S&&T){t.n=1;break}return new(d())({type:"error",text:"SecretId和SecretKey都不能为空",timeout:1e3,layout:"bottomLeft"}).show(),t.a(2);case 1:for(e=new f.yL,n=[],r=0,i=[].concat(I(h),I(E));r<i.length;r++)(o=i[r]).ddnsHost&&n.push(o);return e.ips=n,e.account={secretid:S,secretkey:T},e.isOpen=P,e.ddnsType=f.E2.tengxun,t.n=2,l.ez.post("save",e);case 2:(a=t.v).code===c.m.DdnsAuthFail?new(d())({type:"error",text:a.data,timeout:1e3,layout:"bottomLeft"}).show():new(d())({type:"success",text:a.data,timeout:1e3,layout:"bottomLeft"}).show();case 3:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();return r.createElement("div",null,r.createElement(m.A,null,r.createElement(a.rA,{icon:"add",title:e("添加http获取ip"),onClick:function(){G({show:!0,type:v.PromptEnum.DdnsAddHttp,overlay:!0,data:{}})}})),r.createElement(i.fI,null,r.createElement(i.VP,null,r.createElement(o.Zp,{title:"ipv4"},h.length>0&&h.map(function(t,e){return r.createElement("div",{key:e},"".concat(t.ifaceOrWww,"(").concat(t.ip,")"),r.createElement(s.Sm,{placeholder:"a.abc.com b.abc.com ...",value:t.ddnsHost,handleInputChange:function(e){t.ddnsHost=e}}))})),r.createElement(o.Zp,{title:"ipv6"},E.length>0&&E.map(function(t,e){return r.createElement("div",{key:e},"".concat(t.ifaceOrWww,"(").concat(t.ip,")"),r.createElement(s.Sm,{placeholder:"a.abc.com b.abc.com ...",value:t.ddnsHost,handleInputChange:function(e){t.ddnsHost=e}}))}))),r.createElement(i.VP,null,r.createElement(o.Zp,{title:e("账号设置"),rightBottomCom:r.createElement(a.C3,{text:e("保存"),clickFun:M})},r.createElement(s.Sm,{placeholder:"SecretId",value:S,handleInputChange:function(t){k(t)}}),r.createElement(s.Sm,{placeholder:"SecretKey",value:T,handleInputChange:function(t){C(t)}}),r.createElement(u.S,{isFlex:!0,columns:[r.createElement(s.U6,{value:1,context:e("开启"),selected:P,onchange:function(){F(!P)}}),r.createElement(s.U6,{value:1,context:e("关闭"),selected:!P,onchange:function(){F(!P)}})]})),r.createElement(o.Zp,{title:e("说明")},"域名如果不存在会自动创建,空子域名是@,ip6和ipv4可以互相切换。"))))}function D(){var t=(0,p.Bd)().t,e=[{index:1,name:"dnspod(".concat(t("腾讯"),")"),rto:"dnspod/"},{index:2,name:"".concat(t("腾讯")).concat(t("云")),rto:"tengxun/"}];return r.createElement(i.W1,{optionList:e},r.createElement(C,null),r.createElement(G,null))}},1028(t,e,n){"use strict";n.d(e,{A:()=>u});var r=n(1601),i=n.n(r),o=n(6314),a=n.n(o)()(i());a.push([t.id,'.awesomplete [hidden] {\n display: none;\n}\n\n.awesomplete .visually-hidden {\n position: absolute;\n clip: rect(0, 0, 0, 0);\n}\n\n.awesomplete {\n display: inline-block;\n position: relative;\n}\n\n.awesomplete > input {\n display: block;\n}\n\n.awesomplete > ul {\n position: absolute;\n left: 0;\n z-index: 1;\n min-width: 100%;\n box-sizing: border-box;\n list-style: none;\n padding: 0;\n margin: 0;\n background: #fff;\n}\n\n.awesomplete > ul:empty {\n display: none;\n}\n\n.awesomplete > ul {\n\tborder-radius: .3em;\n\tmargin: .2em 0 0;\n\tbackground: hsla(0,0%,100%,.9);\n\tbackground: linear-gradient(to bottom right, white, hsla(0,0%,100%,.8));\n\tborder: 1px solid rgba(0,0,0,.3);\n\tbox-shadow: .05em .2em .6em rgba(0,0,0,.2);\n\ttext-shadow: none;\n}\n\n@supports (transform: scale(0)) {\n\t.awesomplete > ul {\n\t\ttransition: .3s cubic-bezier(.4,.2,.5,1.4);\n\t\ttransform-origin: 1.43em -.43em;\n\t}\n\t\n\t.awesomplete > ul[hidden],\n\t.awesomplete > ul:empty {\n\t\topacity: 0;\n\t\ttransform: scale(0);\n\t\tdisplay: block;\n\t\tvisibility: hidden;\n\t\ttransition-timing-function: ease;\n\t}\n}\n\n\t/* Pointer */\n\t.awesomplete > ul:before {\n\t\tcontent: "";\n\t\tposition: absolute;\n\t\ttop: -.43em;\n\t\tleft: 1em;\n\t\twidth: 0; height: 0;\n\t\tpadding: .4em;\n\t\tbackground: white;\n\t\tborder: inherit;\n\t\tborder-right: 0;\n\t\tborder-bottom: 0;\n\t\t-webkit-transform: rotate(45deg);\n\t\ttransform: rotate(45deg);\n\t}\n\n\t.awesomplete > ul > li {\n\t\tposition: relative;\n\t\tpadding: .2em .5em;\n\t\tcursor: pointer;\n\t}\n\t\n\t.awesomplete > ul > li:hover {\n\t\tbackground: hsl(200, 40%, 80%);\n\t\tcolor: black;\n\t}\n\t\n\t.awesomplete > ul > li[aria-selected="true"] {\n\t\tbackground: hsl(205, 40%, 40%);\n\t\tcolor: white;\n\t}\n\t\n\t\t.awesomplete mark {\n\t\t\tbackground: hsl(65, 100%, 50%);\n\t\t}\n\t\t\n\t\t.awesomplete li:hover mark {\n\t\t\tbackground: hsl(68, 100%, 41%);\n\t\t}\n\t\t\n\t\t.awesomplete li[aria-selected="true"] mark {\n\t\t\tbackground: hsl(86, 100%, 21%);\n\t\t\tcolor: inherit;\n\t\t}\n',""]);const u=a},9145(t,e,n){"use strict";var r=n(5072),i=n.n(r),o=n(7825),a=n.n(o),u=n(7659),s=n.n(u),l=n(5056),c=n.n(l),f=n(540),h=n.n(f),d=n(1113),p=n.n(d),m=n(1028),v={};v.styleTagTransform=p(),v.setAttributes=c(),v.insert=s().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=h();i()(m.A,v),m.A&&m.A.locals&&m.A.locals}}]);
1
+ /*! For license information please see 431.331917a6a61c011a6913.js.LICENSE.txt */
2
+ (self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[431,627],{5219(t){!function(){var e=function(t,n){var r=this;e.count=(e.count||0)+1,this.count=e.count,this.isOpened=!1,this.input=i(t),this.input.setAttribute("autocomplete","off"),this.input.setAttribute("aria-autocomplete","list"),this.input.setAttribute("aria-expanded","false"),this.input.setAttribute("aria-controls","awesomplete_list_"+this.count),this.input.setAttribute("aria-owns","awesomplete_list_"+this.count),this.input.setAttribute("role","combobox"),this.options=n=n||{},function(t,e,n){for(var r in e){var i=e[r],o=t.input.getAttribute("data-"+r.toLowerCase());t[r]="number"==typeof i?parseInt(o):!1===i?null!==o:i instanceof Function?null:o,t[r]||0===t[r]||(t[r]=r in n?n[r]:i)}}(this,{minChars:2,maxItems:10,autoFirst:!1,data:e.DATA,filter:e.FILTER_CONTAINS,sort:!1!==n.sort&&e.SORT_BYLENGTH,container:e.CONTAINER,item:e.ITEM,replace:e.REPLACE,tabSelect:!1,listLabel:"Results List",statusNoResults:"No results found",statusXResults:"{0} results found",statusTypeXChar:"Type {0} or more characters for results"},n),this.index=-1,this.container=this.container(t),this.ul=i.create("ul",{hidden:"hidden",role:"listbox",id:"awesomplete_list_"+this.count,inside:this.container,"aria-label":this.listLabel}),this.status=i.create("span",{className:"visually-hidden",role:"status","aria-live":"assertive","aria-atomic":!0,inside:this.container,textContent:""}),this._events={input:{input:this.evaluate.bind(this),blur:this.close.bind(this,{reason:"blur"}),keydown:function(t){var e=t.keyCode;r.opened&&(13===e&&r.selected||9===e&&r.selected&&r.tabSelect?(t.preventDefault(),r.select(void 0,void 0,t)):27===e?r.close({reason:"esc"}):38!==e&&40!==e||(t.preventDefault(),r[38===e?"previous":"next"]()))}},form:{submit:this.close.bind(this,{reason:"submit"})},ul:{mousedown:function(t){t.preventDefault()},click:function(t){var e=t.target;if(e!==this){for(;e&&!/li/i.test(e.nodeName);)e=e.parentNode;e&&0===t.button&&(t.preventDefault(),r.select(e,t.target,t))}}}},i.bind(this.input,this._events.input),i.bind(this.input.form,this._events.form),i.bind(this.ul,this._events.ul),this.input.hasAttribute("list")?(this.list="#"+this.input.getAttribute("list"),this.input.removeAttribute("list")):this.list=this.input.getAttribute("data-list")||n.list||[],e.all.push(this)};function n(t){var e=Array.isArray(t)?{label:t[0],value:t[1]}:"object"==typeof t&&"label"in t&&"value"in t?t:{label:t,value:t};this.label=e.label||e.value,this.value=e.value}e.prototype={set list(t){if(Array.isArray(t))this._list=t;else if("string"==typeof t&&t.indexOf(",")>-1)this._list=t.split(/\s*,\s*/);else if((t=i(t))&&t.children){var e=[];r.apply(t.children).forEach(function(t){if(!t.disabled){var n=t.textContent.trim(),r=t.value||n,i=t.label||n;""!==r&&e.push({label:i,value:r})}}),this._list=e}document.activeElement===this.input&&this.evaluate()},get selected(){return this.index>-1},get opened(){return this.isOpened},close:function(t){this.opened&&(this.input.setAttribute("aria-expanded","false"),this.ul.setAttribute("hidden",""),this.isOpened=!1,this.index=-1,this.status.setAttribute("hidden",""),this.input.setAttribute("aria-activedescendant",""),i.fire(this.input,"awesomplete-close",t||{}))},open:function(){this.input.setAttribute("aria-expanded","true"),this.ul.removeAttribute("hidden"),this.isOpened=!0,this.status.removeAttribute("hidden"),this.autoFirst&&-1===this.index&&this.goto(0),i.fire(this.input,"awesomplete-open")},destroy:function(){if(i.unbind(this.input,this._events.input),i.unbind(this.input.form,this._events.form),!this.options.container){var t=this.container.parentNode;t.insertBefore(this.input,this.container),t.removeChild(this.container)}this.input.removeAttribute("autocomplete"),this.input.removeAttribute("aria-autocomplete"),this.input.removeAttribute("aria-expanded"),this.input.removeAttribute("aria-controls"),this.input.removeAttribute("aria-owns"),this.input.removeAttribute("role");var n=e.all.indexOf(this);-1!==n&&e.all.splice(n,1)},next:function(){var t=this.ul.children.length;this.goto(this.index<t-1?this.index+1:t?0:-1)},previous:function(){var t=this.ul.children.length,e=this.index-1;this.goto(this.selected&&-1!==e?e:t-1)},goto:function(t){var e=this.ul.children;this.selected&&e[this.index].setAttribute("aria-selected","false"),this.index=t,t>-1&&e.length>0&&(e[t].setAttribute("aria-selected","true"),this.input.setAttribute("aria-activedescendant",this.ul.id+"_item_"+this.index),this.ul.scrollTop=e[t].offsetTop-this.ul.clientHeight+e[t].clientHeight,i.fire(this.input,"awesomplete-highlight",{text:this.suggestions[this.index]}))},select:function(t,e,n){if(t?this.index=i.siblingIndex(t):t=this.ul.children[this.index],t){var r=this.suggestions[this.index];i.fire(this.input,"awesomplete-select",{text:r,origin:e||t,originalEvent:n})&&(this.replace(r),this.close({reason:"select"}),i.fire(this.input,"awesomplete-selectcomplete",{text:r,originalEvent:n}))}},evaluate:function(){var t=this,e=this.input.value;e.length>=this.minChars&&this._list&&this._list.length>0?(this.index=-1,this.ul.innerHTML="",this.suggestions=this._list.map(function(r){return new n(t.data(r,e))}).filter(function(n){return t.filter(n,e)}),!1!==this.sort&&(this.suggestions=this.suggestions.sort(this.sort)),this.suggestions=this.suggestions.slice(0,this.maxItems),this.suggestions.forEach(function(n,r){t.ul.appendChild(t.item(n,e,r))}),0===this.ul.children.length?(this.status.textContent=this.statusNoResults,this.close({reason:"nomatches"})):(this.input.setAttribute("aria-activedescendant",""),this.open(),this.status.textContent=this.statusXResults.replaceAll("{0}",this.ul.children.length))):(this.close({reason:"nomatches"}),this.minChar<=1||e.length>=this.minChars?this.status.textContent=this.statusNoResults:this.status.textContent=this.statusTypeXChar.replaceAll("{0}",this.minChars))}},e.all=[],e.FILTER_CONTAINS=function(t,e){return RegExp(i.regExpEscape(e.trim()),"i").test(t)},e.FILTER_STARTSWITH=function(t,e){return RegExp("^"+i.regExpEscape(e.trim()),"i").test(t)},e.SORT_BYLENGTH=function(t,e){return t.length!==e.length?t.length-e.length:t<e?-1:1},e.CONTAINER=function(t){return i.create("div",{className:"awesomplete",around:t})},e.ITEM=function(t,e,n){var r=""===e.trim()?t:t.replace(RegExp(i.regExpEscape(e.trim()),"gi"),"<mark>$&</mark>");return i.create("li",{innerHTML:r,role:"option","aria-selected":"false",tabindex:"-1",id:"awesomplete_list_"+this.count+"_item_"+n})},e.REPLACE=function(t){this.input.value=t.value},e.DATA=function(t){return t},Object.defineProperty(n.prototype=Object.create(String.prototype),"length",{get:function(){return this.label.length}}),n.prototype.toString=n.prototype.valueOf=function(){return""+this.label};var r=Array.prototype.slice;function i(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function o(t,e){return r.call((e||document).querySelectorAll(t))}function a(){o("input.awesomplete").forEach(function(t){new e(t)})}i.create=function(t,e){var n=document.createElement(t);for(var r in e){var o=e[r];if("inside"===r)i(o).appendChild(n);else if("around"===r){var a=i(o);a.parentNode.insertBefore(n,a),n.appendChild(a),null!=a.getAttribute("autofocus")&&a.focus()}else r in n?n[r]=o:n.setAttribute(r,o)}return n},i.bind=function(t,e){if(t)for(var n in e){var r=e[n];n.split(/\s+/).forEach(function(e){t.addEventListener(e,r)})}},i.unbind=function(t,e){if(t)for(var n in e){var r=e[n];n.split(/\s+/).forEach(function(e){t.removeEventListener(e,r)})}},i.fire=function(t,e,n){var r=document.createEvent("HTMLEvents");for(var i in r.initEvent(e,!0,!0),n)r[i]=n[i];return t.dispatchEvent(r)},i.regExpEscape=function(t){return t.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")},i.siblingIndex=function(t){for(var e=0;t=t.previousElementSibling;e++);return e},"undefined"!=typeof self&&(self.Awesomplete=e),"undefined"!=typeof Document&&("loading"!==document.readyState?a():document.addEventListener("DOMContentLoaded",a)),e.$=i,e.$$=o,t.exports&&(t.exports=e)}()},7481(t,e,n){"use strict";n.d(e,{S:()=>u,X:()=>a});var r=n(6540);function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,u=[],s=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(u.push(r.value),u.length!==e);s=!0);}catch(t){l=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(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 o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function a(t){var e,n=i(r.useState([]),2),o=n[0],a=n[1];return(0,r.useEffect)(function(){t.children?a(Array.isArray(t.children)?t.children:[t.children]):a(t.rows)},[t.rows,t.children]),r.createElement("table",null,r.createElement("thead",null,r.createElement("tr",null,null===(e=t.headers)||void 0===e?void 0:e.map(function(t,e){return r.createElement("th",{key:e},t)}))),r.createElement("tbody",null,o.map(function(e,n){return r.createElement("tr",{key:n,onContextMenu:function(){t.handleContextMenu&&t.handleContextMenu(e)}},e.map(function(e,n){var i;return r.createElement("td",{style:{width:null!==(i=t.width)&&void 0!==i?i:"auto"},key:n,className:n===o.length-1?"small":""},e)}))})))}function u(t){return r.createElement("div",{style:{display:t.isFlex?"flex":"block"}},t.columns.map(function(t,e){return r.createElement("div",{key:e},t)}))}},7445(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>D});var r=n(6540),i=n(5725),o=n(447),a=n(5997),u=n(7481),s=n(3033),l=n(4284),c=n(3459),f=n(2726),h=n(3413),d=n.n(h),p=n(2389),m=n(7952),v=n(6325),b=n(7444),y=n(6417);n(2042);function g(t){return function(t){if(Array.isArray(t))return T(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 w(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof u?r:u,l=Object.create(s.prototype);return E(l,"_invoke",function(n,r,i){var o,u,s,l=0,c=i||[],f=!1,h={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,n){return o=e,u=0,s=t,h.n=n,a}};function d(n,r){for(u=n,s=r,e=0;!f&&l&&!i&&e<c.length;e++){var i,o=c[e],d=h.p,p=o[2];n>3?(i=p===r)&&(s=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=t):o[0]<=d&&((i=n<2&&d<o[1])?(u=0,h.v=r,h.n=o[1]):d<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,c,p){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&d(c,p),u=c,s=p;(e=u<2?t:s)||!f;){o||(u?u<3?(u>1&&(h.n=-1),d(u,s)):h.n=s:h.v=s);try{if(l=2,o){if(u||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,u<2&&(u=0)}else 1===u&&(e=o.return)&&e.call(o),u<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=t}else if((e=(f=h.n<0)?s:n.call(r,h))!==a)break}catch(e){o=t,u=1,s=e}finally{l=1}}return{value:e,done:f}}}(n,i,o),!0),l}var a={};function u(){}function s(){}function l(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(E(e={},r,function(){return this}),e),f=l.prototype=u.prototype=Object.create(c);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,E(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return s.prototype=l,E(f,"constructor",l),E(l,"constructor",s),s.displayName="GeneratorFunction",E(l,i,"GeneratorFunction"),E(f),E(f,i,"Generator"),E(f,r,function(){return this}),E(f,"toString",function(){return"[object Generator]"}),(w=function(){return{w:o,m:h}})()}function E(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}E=function(t,e,n,r){function o(e,n){E(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},E(t,e,n,r)}function A(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=O(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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 o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function x(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function S(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){x(o,r,i,a,u,"next",t)}function u(t){x(o,r,i,a,u,"throw",t)}a(void 0)})}}function k(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,u=[],s=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(u.push(r.value),u.length!==e);s=!0);}catch(t){l=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return u}}(t,e)||O(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function O(t,e){if(t){if("string"==typeof t)return T(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(t,e):void 0}}function T(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function C(t){var e=(0,p.Bd)().t,n=k((0,r.useState)([]),2),h=n[0],E=n[1],x=k((0,r.useState)([]),2),O=x[0],T=x[1],C=k((0,r.useState)(""),2),I=C[0],_=C[1],j=k((0,r.useState)(""),2),L=j[0],P=j[1],N=k((0,r.useState)(!1),2),H=N[0],F=N[1],R=k((0,b.L4)(y.A.showPrompt),2),G=(R[0],R[1]),D=k((0,b.L4)(y.A.confirm),2);D[0],D[1];(0,r.useEffect)(function(){S(w().m(function t(){var e,n,r,i,o,a,u;return w().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,l.ez.get("ips/dnspod");case 1:if((e=t.v).code===c.m.Success){t.n=2;break}return t.a(2);case 2:n=e.data,r=[],i=[],o=A(n.ips);try{for(o.s();!(a=o.n()).done;)(u=a.value).isIPv4?r.push(u):i.push(u)}catch(t){o.e(t)}finally{o.f()}E(r),T(i),n.account&&(_(n.account.id),P(n.account.token)),F(n.isOpen);case 3:return t.a(2)}},t)}))()},[]);var M=function(){var t=S(w().m(function t(){var e,n,r,i,o,a;return w().w(function(t){for(;;)switch(t.n){case 0:if(!H||I&&L){t.n=1;break}return new(d())({type:"error",text:"id和token都不能为空",timeout:1e3,layout:"bottomLeft"}).show(),t.a(2);case 1:for(e=new f.yL,n=[],r=0,i=[].concat(g(h),g(O));r<i.length;r++)(o=i[r]).ddnsHost&&n.push(o);return e.ips=n,e.account={id:I,token:L},e.isOpen=H,e.ddnsType=f.E2.dnspod,t.n=2,l.ez.post("save",e);case 2:(a=t.v).code===c.m.DdnsAuthFail?new(d())({type:"error",text:a.data,timeout:1e3,layout:"bottomLeft"}).show():new(d())({type:"success",text:a.data,timeout:1e3,layout:"bottomLeft"}).show();case 3:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();return r.createElement("div",null,r.createElement(m.A,null,r.createElement(a.rA,{icon:"add",title:e("添加http获取ip"),onClick:function(){G({show:!0,type:v.PromptEnum.DdnsAddHttp,overlay:!0,data:{}})}})),r.createElement(i.fI,null,r.createElement(i.VP,null,r.createElement(o.Zp,{title:"ipv4"},h.length>0&&h.map(function(t,e){return r.createElement("div",{key:e},"".concat(t.ifaceOrWww,"(").concat(t.ip,")"),r.createElement(s.Sm,{placeholder:"a.abc.com b.abc.com ...",value:t.ddnsHost,handleInputChange:function(e){t.ddnsHost=e}}))})),r.createElement(o.Zp,{title:"ipv6"},O.length>0&&O.map(function(t,e){return r.createElement("div",{key:e},"".concat(t.ifaceOrWww,"(").concat(t.ip,")"),r.createElement(s.Sm,{placeholder:"a.abc.com b.abc.com ...",value:t.ddnsHost,handleInputChange:function(e){t.ddnsHost=e}}))}))),r.createElement(i.VP,null,r.createElement(o.Zp,{title:e("账号设置"),rightBottomCom:r.createElement(a.C3,{text:e("保存"),clickFun:M})},r.createElement(s.Sm,{placeholder:"ID",value:I,handleInputChange:function(t){_(t)}}),r.createElement(s.Sm,{placeholder:"TOKEN",value:L,handleInputChange:function(t){P(t)}}),r.createElement(u.S,{isFlex:!0,columns:[r.createElement(s.U6,{value:1,context:e("开启"),selected:H,onchange:function(){F(!H)}}),r.createElement(s.U6,{value:1,context:e("关闭"),selected:!H,onchange:function(){F(!H)}})]})),r.createElement(o.Zp,{title:e("说明")},"域名如果不存在会自动创建,空子域名是@,ip6和ipv4可以互相切换。"))))}function I(t){return function(t){if(Array.isArray(t))return R(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||F(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 _(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var s=r&&r.prototype instanceof u?r:u,l=Object.create(s.prototype);return j(l,"_invoke",function(n,r,i){var o,u,s,l=0,c=i||[],f=!1,h={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,n){return o=e,u=0,s=t,h.n=n,a}};function d(n,r){for(u=n,s=r,e=0;!f&&l&&!i&&e<c.length;e++){var i,o=c[e],d=h.p,p=o[2];n>3?(i=p===r)&&(s=o[(u=o[4])?5:(u=3,3)],o[4]=o[5]=t):o[0]<=d&&((i=n<2&&d<o[1])?(u=0,h.v=r,h.n=o[1]):d<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,h.n=p,u=0))}if(i||n>1)return a;throw f=!0,r}return function(i,c,p){if(l>1)throw TypeError("Generator is already running");for(f&&1===c&&d(c,p),u=c,s=p;(e=u<2?t:s)||!f;){o||(u?u<3?(u>1&&(h.n=-1),d(u,s)):h.n=s:h.v=s);try{if(l=2,o){if(u||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,u<2&&(u=0)}else 1===u&&(e=o.return)&&e.call(o),u<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),u=1);o=t}else if((e=(f=h.n<0)?s:n.call(r,h))!==a)break}catch(e){o=t,u=1,s=e}finally{l=1}}return{value:e,done:f}}}(n,i,o),!0),l}var a={};function u(){}function s(){}function l(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(j(e={},r,function(){return this}),e),f=l.prototype=u.prototype=Object.create(c);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,j(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return s.prototype=l,j(f,"constructor",l),j(l,"constructor",s),s.displayName="GeneratorFunction",j(l,i,"GeneratorFunction"),j(f),j(f,i,"Generator"),j(f,r,function(){return this}),j(f,"toString",function(){return"[object Generator]"}),(_=function(){return{w:o,m:h}})()}function j(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}j=function(t,e,n,r){function o(e,n){j(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},j(t,e,n,r)}function L(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=F(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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 o,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw o}}}}function P(t,e,n,r,i,o,a){try{var u=t[o](a),s=u.value}catch(t){return void n(t)}u.done?e(s):Promise.resolve(s).then(r,i)}function N(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){P(o,r,i,a,u,"next",t)}function u(t){P(o,r,i,a,u,"throw",t)}a(void 0)})}}function H(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,u=[],s=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=o.call(n)).done)&&(u.push(r.value),u.length!==e);s=!0);}catch(t){l=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return u}}(t,e)||F(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 F(t,e){if(t){if("string"==typeof t)return R(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?R(t,e):void 0}}function R(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function G(t){var e=(0,p.Bd)().t,n=H((0,r.useState)([]),2),h=n[0],g=n[1],w=H((0,r.useState)([]),2),E=w[0],A=w[1],x=H((0,r.useState)(""),2),S=x[0],k=x[1],O=H((0,r.useState)(""),2),T=O[0],C=O[1],j=H((0,r.useState)(!1),2),P=j[0],F=j[1],R=H((0,b.L4)(y.A.showPrompt),2),G=(R[0],R[1]),D=H((0,b.L4)(y.A.confirm),2);D[0],D[1];(0,r.useEffect)(function(){N(_().m(function t(){var e,n,r,i,o,a,u;return _().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,l.ez.get("ips/tx");case 1:if((e=t.v).code===c.m.Success){t.n=2;break}return t.a(2);case 2:n=e.data,r=[],i=[],o=L(n.ips);try{for(o.s();!(a=o.n()).done;)(u=a.value).isIPv4?r.push(u):i.push(u)}catch(t){o.e(t)}finally{o.f()}g(r),A(i),n.account&&(k(n.account.secretid),C(n.account.secretkey)),F(n.isOpen);case 3:return t.a(2)}},t)}))()},[]);var M=function(){var t=N(_().m(function t(){var e,n,r,i,o,a;return _().w(function(t){for(;;)switch(t.n){case 0:if(!P||S&&T){t.n=1;break}return new(d())({type:"error",text:"SecretId和SecretKey都不能为空",timeout:1e3,layout:"bottomLeft"}).show(),t.a(2);case 1:for(e=new f.yL,n=[],r=0,i=[].concat(I(h),I(E));r<i.length;r++)(o=i[r]).ddnsHost&&n.push(o);return e.ips=n,e.account={secretid:S,secretkey:T},e.isOpen=P,e.ddnsType=f.E2.tengxun,t.n=2,l.ez.post("save",e);case 2:(a=t.v).code===c.m.DdnsAuthFail?new(d())({type:"error",text:a.data,timeout:1e3,layout:"bottomLeft"}).show():new(d())({type:"success",text:a.data,timeout:1e3,layout:"bottomLeft"}).show();case 3:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();return r.createElement("div",null,r.createElement(m.A,null,r.createElement(a.rA,{icon:"add",title:e("添加http获取ip"),onClick:function(){G({show:!0,type:v.PromptEnum.DdnsAddHttp,overlay:!0,data:{}})}})),r.createElement(i.fI,null,r.createElement(i.VP,null,r.createElement(o.Zp,{title:"ipv4"},h.length>0&&h.map(function(t,e){return r.createElement("div",{key:e},"".concat(t.ifaceOrWww,"(").concat(t.ip,")"),r.createElement(s.Sm,{placeholder:"a.abc.com b.abc.com ...",value:t.ddnsHost,handleInputChange:function(e){t.ddnsHost=e}}))})),r.createElement(o.Zp,{title:"ipv6"},E.length>0&&E.map(function(t,e){return r.createElement("div",{key:e},"".concat(t.ifaceOrWww,"(").concat(t.ip,")"),r.createElement(s.Sm,{placeholder:"a.abc.com b.abc.com ...",value:t.ddnsHost,handleInputChange:function(e){t.ddnsHost=e}}))}))),r.createElement(i.VP,null,r.createElement(o.Zp,{title:e("账号设置"),rightBottomCom:r.createElement(a.C3,{text:e("保存"),clickFun:M})},r.createElement(s.Sm,{placeholder:"SecretId",value:S,handleInputChange:function(t){k(t)}}),r.createElement(s.Sm,{placeholder:"SecretKey",value:T,handleInputChange:function(t){C(t)}}),r.createElement(u.S,{isFlex:!0,columns:[r.createElement(s.U6,{value:1,context:e("开启"),selected:P,onchange:function(){F(!P)}}),r.createElement(s.U6,{value:1,context:e("关闭"),selected:!P,onchange:function(){F(!P)}})]})),r.createElement(o.Zp,{title:e("说明")},"域名如果不存在会自动创建,空子域名是@,ip6和ipv4可以互相切换。"))))}function D(){var t=(0,p.Bd)().t,e=[{index:1,name:"dnspod(".concat(t("腾讯"),")"),rto:"dnspod/"},{index:2,name:"".concat(t("腾讯")).concat(t("云")),rto:"tengxun/"}];return r.createElement(i.W1,{optionList:e},r.createElement(C,null),r.createElement(G,null))}},1028(t,e,n){"use strict";n.d(e,{A:()=>u});var r=n(1601),i=n.n(r),o=n(6314),a=n.n(o)()(i());a.push([t.id,'.awesomplete [hidden] {\n display: none;\n}\n\n.awesomplete .visually-hidden {\n position: absolute;\n clip: rect(0, 0, 0, 0);\n}\n\n.awesomplete {\n display: inline-block;\n position: relative;\n}\n\n.awesomplete > input {\n display: block;\n}\n\n.awesomplete > ul {\n position: absolute;\n left: 0;\n z-index: 1;\n min-width: 100%;\n box-sizing: border-box;\n list-style: none;\n padding: 0;\n margin: 0;\n background: #fff;\n}\n\n.awesomplete > ul:empty {\n display: none;\n}\n\n.awesomplete > ul {\n\tborder-radius: .3em;\n\tmargin: .2em 0 0;\n\tbackground: hsla(0,0%,100%,.9);\n\tbackground: linear-gradient(to bottom right, white, hsla(0,0%,100%,.8));\n\tborder: 1px solid rgba(0,0,0,.3);\n\tbox-shadow: .05em .2em .6em rgba(0,0,0,.2);\n\ttext-shadow: none;\n}\n\n@supports (transform: scale(0)) {\n\t.awesomplete > ul {\n\t\ttransition: .3s cubic-bezier(.4,.2,.5,1.4);\n\t\ttransform-origin: 1.43em -.43em;\n\t}\n\t\n\t.awesomplete > ul[hidden],\n\t.awesomplete > ul:empty {\n\t\topacity: 0;\n\t\ttransform: scale(0);\n\t\tdisplay: block;\n\t\tvisibility: hidden;\n\t\ttransition-timing-function: ease;\n\t}\n}\n\n\t/* Pointer */\n\t.awesomplete > ul:before {\n\t\tcontent: "";\n\t\tposition: absolute;\n\t\ttop: -.43em;\n\t\tleft: 1em;\n\t\twidth: 0; height: 0;\n\t\tpadding: .4em;\n\t\tbackground: white;\n\t\tborder: inherit;\n\t\tborder-right: 0;\n\t\tborder-bottom: 0;\n\t\t-webkit-transform: rotate(45deg);\n\t\ttransform: rotate(45deg);\n\t}\n\n\t.awesomplete > ul > li {\n\t\tposition: relative;\n\t\tpadding: .2em .5em;\n\t\tcursor: pointer;\n\t}\n\t\n\t.awesomplete > ul > li:hover {\n\t\tbackground: hsl(200, 40%, 80%);\n\t\tcolor: black;\n\t}\n\t\n\t.awesomplete > ul > li[aria-selected="true"] {\n\t\tbackground: hsl(205, 40%, 40%);\n\t\tcolor: white;\n\t}\n\t\n\t\t.awesomplete mark {\n\t\t\tbackground: hsl(65, 100%, 50%);\n\t\t}\n\t\t\n\t\t.awesomplete li:hover mark {\n\t\t\tbackground: hsl(68, 100%, 41%);\n\t\t}\n\t\t\n\t\t.awesomplete li[aria-selected="true"] mark {\n\t\t\tbackground: hsl(86, 100%, 21%);\n\t\t\tcolor: inherit;\n\t\t}\n',""]);const u=a},9145(t,e,n){"use strict";var r=n(5072),i=n.n(r),o=n(7825),a=n.n(o),u=n(7659),s=n.n(u),l=n(5056),c=n.n(l),f=n(540),h=n.n(f),d=n(1113),p=n.n(d),m=n(1028),v={};v.styleTagTransform=p(),v.setAttributes=c(),v.insert=s().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=h();i()(m.A,v),m.A&&m.A.locals&&m.A.locals}}]);
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 441.8521ebb38d1e47d62e83.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[441],{7481(e,t,n){n.d(t,{S:()=>i,X:()=>c});var r=n(6540);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,c,i=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(e,t)||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(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function c(e){var t,n=o(r.useState([]),2),a=n[0],c=n[1];return(0,r.useEffect)(function(){e.children?c(Array.isArray(e.children)?e.children:[e.children]):c(e.rows)},[e.rows,e.children]),r.createElement("table",null,r.createElement("thead",null,r.createElement("tr",null,null===(t=e.headers)||void 0===t?void 0:t.map(function(e,t){return r.createElement("th",{key:t},e)}))),r.createElement("tbody",null,a.map(function(t,n){return r.createElement("tr",{key:n,onContextMenu:function(){e.handleContextMenu&&e.handleContextMenu(t)}},t.map(function(t,n){var o;return r.createElement("td",{style:{width:null!==(o=e.width)&&void 0!==o?o:"auto"},key:n,className:n===a.length-1?"small":""},t)}))})))}function i(e){return r.createElement("div",{style:{display:e.isFlex?"flex":"block"}},e.columns.map(function(e,t){return r.createElement("div",{key:t},e)}))}},8062(e,t,n){n.d(t,{A:()=>i});var r=n(6540);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(null,arguments)}function a(e){return r.createElement("div",{className:"black-tip",onClick:function(){e.click&&e.click(e)},onContextMenu:function(t){t.stopPropagation(),t.nativeEvent.stopImmediatePropagation(),e.onContextMenu&&e.onContextMenu(t,e)}},e.name)}var c=function(e){return r.createElement("li",null,e.click?r.createElement(a,o({},e.node,{name:e.render?e.render(e.node):e.node.name,click:e.click,onContextMenu:e.onContextMenu})):r.createElement("div",null,e.render?e.render(e.node):e.node.name),e.node.children&&e.node.children.length>0&&r.createElement("ul",null,e.node.children.map(function(t,n){return r.createElement(c,{key:n,node:t,click:e.click,onContextMenu:e.onContextMenu,render:e.render})})))};const i=function(e){return r.createElement("div",{className:"card-tree-view"},r.createElement("ul",null,e.list&&e.list.map(function(t,n){return r.createElement(c,{key:n,node:t,click:e.click,onContextMenu:e.onContextMenu,render:e.render})})))}},3441(e,t,n){n.r(t),n.d(t,{default:()=>dt});var r=n(6540),o=n(5725),a=n(447),c=n(6349);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,c,i=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}const l=function(e){var t=e.percentage,n=(0,r.useRef)(null),o=i((0,r.useState)(null),2),a=o[0],u=o[1];return(0,r.useEffect)(function(){var e=n.current.getContext("2d"),r=new c.Ay(e,{type:"doughnut",data:{labels:["use","left"],datasets:[{data:[t,100-t],backgroundColor:["#007bff","#f0f0f0"],borderWidth:0}]},options:{plugins:{legend:{display:!1},tooltip:{enabled:!1}},elements:{arc:{borderWidth:0}}}});return u(r),function(){r.destroy()}},[]),(0,r.useEffect)(function(){a&&(a.data.datasets[0].data=[t,100-t],a.update())},[t]),r.createElement("div",{style:{width:"8rem",overflow:"hidden"}},r.createElement("canvas",{ref:n}))};var f=n(4188),s=n(4944),m=n(4284),d=n(7952),p=n(5997),h=n(7481),y=n(3459),v=n(2389),b=n(7444),E=n(6417),w=n(4777),g=n(2042);function S(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var u=r&&r.prototype instanceof i?r:i,l=Object.create(u.prototype);return _(l,"_invoke",function(n,r,o){var a,i,u,l=0,f=o||[],s=!1,m={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return a=t,i=0,u=e,m.n=n,c}};function d(n,r){for(i=n,u=r,t=0;!s&&l&&!o&&t<f.length;t++){var o,a=f[t],d=m.p,p=a[2];n>3?(o=p===r)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=d&&((o=n<2&&d<a[1])?(i=0,m.v=r,m.n=a[1]):d<p&&(o=n<3||a[0]>r||r>p)&&(a[4]=n,a[5]=r,m.n=p,i=0))}if(o||n>1)return c;throw s=!0,r}return function(o,f,p){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&d(f,p),i=f,u=p;(t=i<2?e:u)||!s;){a||(i?i<3?(i>1&&(m.n=-1),d(i,u)):m.n=u:m.v=u);try{if(l=2,a){if(i||(o="next"),t=a[o]){if(!(t=t.call(a,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,i<2&&(i=0)}else 1===i&&(t=a.return)&&t.call(a),i<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=e}else if((t=(s=m.n<0)?u:n.call(r,m))!==c)break}catch(t){a=e,i=1,u=t}finally{l=1}}return{value:t,done:s}}}(n,o,a),!0),l}var c={};function i(){}function u(){}function l(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(_(t={},r,function(){return this}),t),s=l.prototype=i.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,_(e,o,"GeneratorFunction")),e.prototype=Object.create(s),e}return u.prototype=l,_(s,"constructor",l),_(l,"constructor",u),u.displayName="GeneratorFunction",_(l,o,"GeneratorFunction"),_(s),_(s,o,"Generator"),_(s,r,function(){return this}),_(s,"toString",function(){return"[object Generator]"}),(S=function(){return{w:a,m}})()}function _(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}_=function(e,t,n,r){function a(t,n){_(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},_(e,t,n,r)}function x(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=j(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,c=!0,i=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){i=!0,a=e},f:function(){try{c||null==n.return||n.return()}finally{if(i)throw a}}}}function k(e,t,n,r,o,a,c){try{var i=e[a](c),u=i.value}catch(e){return void n(e)}i.done?t(u):Promise.resolve(u).then(r,o)}function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,c,i=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(l)throw o}}return i}}(e,t)||j(e,t)||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(e,t){if(e){if("string"==typeof e)return O(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?O(e,t):void 0}}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function P(e){var t=(0,v.Bd)().t,n=A((0,b.L4)(E.A.disk),2),c=(n[0],n[1]),i=A((0,r.useState)({}),2),u=i[0],l=i[1],f=A((0,r.useState)([]),2),s=f[0],w=f[1],g=[t("名字"),t("当前值"),t("历史最低"),t("临界值")],_=function(){var n,o=(n=S().m(function n(){var o,a,c,i,u,f,s;return S().w(function(n){for(;;)switch(n.n){case 0:return n.n=1,m.Yu.post("sys/disk/info",{name:e.name});case 1:if((o=n.v).code===y.m.Success){c=[],i=x(null!==(a=o.data.ata_smart_attributes)&&void 0!==a?a:[]);try{for(i.s();!(u=i.n()).done;)f=u.value,s=void 0,f[1]>=f[2]?s="var(--icon-green)":f[1]<=f[3]&&(s="var(--icon-red)"),f[0]=r.createElement("span",{style:{color:s}},t(f[0])),c.push(f)}catch(e){i.e(e)}finally{i.f()}w(o.data.ata_smart_attributes),l(o.data)}case 2:return n.a(2)}},n)}),function(){var e=this,t=arguments;return new Promise(function(r,o){var a=n.apply(e,t);function c(e){k(a,r,o,c,i,"next",e)}function i(e){k(a,r,o,c,i,"throw",e)}c(void 0)})});return function(){return o.apply(this,arguments)}}();return(0,r.useEffect)(function(){_()},[]),r.createElement("div",null,r.createElement(d.A,null,r.createElement(p.rA,{icon:"close",title:t("关闭"),onClick:function(){c({})}})),r.createElement(o.jW,{isFull:!0,more:!0},r.createElement(o.NN,null,r.createElement(o.fI,null,r.createElement(o.VP,{widthPer:30},r.createElement(o.xh,null,r.createElement(a.Zp,{title:t("基本信息")},r.createElement(o.Yh,{left:t("名字"),right:e.name}),r.createElement(o.Yh,{left:t("厂商名称"),right:e.typeName}),r.createElement(o.Yh,{left:t("类型"),right:e.type}),r.createElement(o.Yh,{left:t("容量"),right:e.total}))),r.createElement(o.xh,null,r.createElement(a.Zp,{title:t("物理信息")},r.createElement(o.Yh,{left:t("是否健康"),right:!0===u.smart_status?"是":"否"}),r.createElement(o.Yh,{left:t("设备型号"),right:u.model_name}),r.createElement(o.Yh,{left:t("序列号"),right:u.serial_number}),r.createElement(o.Yh,{left:t("固件版本"),right:u.firmware_version}),r.createElement(o.Yh,{left:t("转速(每分钟)"),right:u.rotation_rate}),r.createElement(o.Yh,{left:t("通电时长(小时)"),right:u.power_on_time_hours}),r.createElement(o.Yh,{left:t("通电次数"),right:u.power_cycle_count}),r.createElement(o.Yh,{left:t("温度(°C)"),right:u.temperature}),r.createElement(o.Yh,{left:t("通信协议"),right:u.device_protocol})))),r.createElement(o.VP,{widthPer:50},r.createElement(o.xh,null,null!=s&&s.length?r.createElement(a.uF,{title:t("ATA/SATA详细信息")},r.createElement(h.X,{headers:g,rows:s,width:"10rem"})):r.createElement(r.Fragment,null),u.nvme_smart?r.createElement(a.Zp,{title:t("NVME详细信息")},r.createElement(o.Yh,{left:t("NVMe 可用备用块(%)"),right:u.nvme_smart.available_spare}),r.createElement(o.Yh,{left:t("NVMe 已使用寿命(%)"),right:u.nvme_smart.percentage_used}),r.createElement(o.Yh,{left:t("NVMe 读取量"),right:u.nvme_smart.data_units_read}),r.createElement(o.Yh,{left:t("NVMe 写入量"),right:u.nvme_smart.data_units_written}),r.createElement(o.Yh,{left:t("NVMe 通电次数"),right:u.nvme_smart.power_cycles}),r.createElement(o.Yh,{left:t("NVMe 通电时长(小时)"),right:u.nvme_smart.power_on_hours}),r.createElement(o.Yh,{left:t("NVMe 非正常关机"),right:u.nvme_smart.unsafe_shutdowns}),r.createElement(o.Yh,{left:t("NVMe 媒体错误"),right:u.nvme_smart.media_errors}),r.createElement(o.Yh,{left:t("NVMe 错误日志数"),right:u.nvme_smart.num_err_log_entries})):r.createElement(r.Fragment,null)))))))}var I=function(e){return e[e.mount=0]="mount",e}({}),T=n(8062),C=n(8247),F=n(3430);function G(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=H(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,c=!0,i=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){i=!0,a=e},f:function(){try{c||null==n.return||n.return()}finally{if(i)throw a}}}}function M(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var u=r&&r.prototype instanceof i?r:i,l=Object.create(u.prototype);return V(l,"_invoke",function(n,r,o){var a,i,u,l=0,f=o||[],s=!1,m={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return a=t,i=0,u=e,m.n=n,c}};function d(n,r){for(i=n,u=r,t=0;!s&&l&&!o&&t<f.length;t++){var o,a=f[t],d=m.p,p=a[2];n>3?(o=p===r)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=d&&((o=n<2&&d<a[1])?(i=0,m.v=r,m.n=a[1]):d<p&&(o=n<3||a[0]>r||r>p)&&(a[4]=n,a[5]=r,m.n=p,i=0))}if(o||n>1)return c;throw s=!0,r}return function(o,f,p){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&d(f,p),i=f,u=p;(t=i<2?e:u)||!s;){a||(i?i<3?(i>1&&(m.n=-1),d(i,u)):m.n=u:m.v=u);try{if(l=2,a){if(i||(o="next"),t=a[o]){if(!(t=t.call(a,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,i<2&&(i=0)}else 1===i&&(t=a.return)&&t.call(a),i<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=e}else if((t=(s=m.n<0)?u:n.call(r,m))!==c)break}catch(t){a=e,i=1,u=t}finally{l=1}}return{value:t,done:s}}}(n,o,a),!0),l}var c={};function i(){}function u(){}function l(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(V(t={},r,function(){return this}),t),s=l.prototype=i.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,V(e,o,"GeneratorFunction")),e.prototype=Object.create(s),e}return u.prototype=l,V(s,"constructor",l),V(l,"constructor",u),u.displayName="GeneratorFunction",V(l,o,"GeneratorFunction"),V(s),V(s,o,"Generator"),V(s,r,function(){return this}),V(s,"toString",function(){return"[object Generator]"}),(M=function(){return{w:a,m}})()}function V(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}V=function(e,t,n,r){function a(t,n){V(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},V(e,t,n,r)}function Y(e,t,n,r,o,a,c){try{var i=e[a](c),u=i.value}catch(e){return void n(e)}i.done?t(u):Promise.resolve(u).then(r,o)}function N(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function c(e){Y(a,r,o,c,i,"next",e)}function i(e){Y(a,r,o,c,i,"throw",e)}c(void 0)})}}function L(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,c,i=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(l)throw o}}return i}}(e,t)||H(e,t)||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(e,t){if(e){if("string"==typeof e)return K(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?K(e,t):void 0}}function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var U=function(e){return r.createElement("div",{style:{border:"2px solid black",padding:"10px",width:"300px",height:"300px",position:"relative"}},e.name,e.lvms.map(function(e,t){return r.createElement("div",{key:t,style:{margin:"5px",height:"".concat(40,"px"),display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid "}},e.name)}))};function $(){return r.createElement("div",{style:{position:"relative",height:"300px",margin:"10px",width:"30px",display:"flex",alignItems:"center",justifyContent:"center"}},r.createElement("div",{style:{width:0,height:0,borderTop:"10px solid transparent",borderBottom:"10px solid transparent",borderLeft:"10px solid black"}}))}function W(){var e=(0,v.Bd)().t,t=L((0,b.L4)(E.A.disk),2),n=(t[0],t[1]),c=L((0,r.useState)({}),2),i=(c[0],c[1],L((0,r.useState)([]),2)),u=i[0],l=i[1],f=L((0,r.useState)([]),2),s=f[0],w=f[1],S=L((0,b.L4)(E.A.showPrompt),2),_=(S[0],S[1],(0,C.MH)().check_user_auth),x=L((0,r.useState)([]),2),k=x[0],A=(x[1],(0,C.kZ)().click_file),j=L((0,b.L4)(E.A.prompt_card),2),O=(j[0],j[1]),P=[e("挂载点"),"uuid",e("类型"),e("文件系统类型"),e("文件系统容量"),e("卷容量"),e("设备路径"),e("分区表类型")],V=function(){var e=N(M().m(function e(){var t;return M().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,m.Yu.get("disk/blk");case 1:return(t=e.v).code===y.m.Success&&l(t.data),e.a(2,t.code)}},e)}));return function(){return e.apply(this,arguments)}}(),Y=function(){var e=N(M().m(function e(){return M().w(function(e){for(;;)switch(e.n){case 0:V();case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();(0,r.useEffect)(function(){Y()},[]);var H=[r.createElement(p.rA,{icon:"info",title:e("提示"),onClick:N(M().m(function e(){return M().w(function(e){for(;;)switch(e.n){case 0:O({open:!0,title:"信息",context_div:r.createElement("div",null,r.createElement("ul",null,r.createElement("li",null,"通用格式:","<文件系统> <挂载点> <类型> <挂载选项> <dump> <fsck> "),r.createElement("li",null,"文件系统,有多种格式",r.createElement("ul",null,r.createElement("li",null,"1(usb口默认名称)./dev/sda1"),r.createElement("li",null,"2(唯一Id).UUID=123e4567-e89b-12d3-a456-426614174000"),r.createElement("li",null,"3.LABEL=DATA"))),r.createElement("li",null,"挂载点,就是文件路径,例如 /mnt/data ,这个目录要提前创建,且为空"),r.createElement("li",null,"类型,就是文件系统类型,对于系统不支持的类型,例如ntfs需要额外前提安装ntfs-3g"),r.createElement("li",null,'挂载选项的值只能是以下这些,可以用 "," 同时使用多个选项',r.createElement("ul",null,r.createElement("li",null,"defaults:使用默认挂载选项"),r.createElement("li",null,"noatime:不更新访问时间,提高性能"),r.createElement("li",null,"auto:系统启动时自动挂载"),r.createElement("li",null,"rw:以读写方式挂载"),r.createElement("li",null,"nofail:防止启动阻塞,挂载失败系统继续执行"),r.createElement("li",null,"...等"))),r.createElement("li",null,"dump 0是需要备份 1是不需要备份"),r.createElement("li",null,"Fsck 整数值0是不检查,文件系统检查顺序越小越先检查"),r.createElement("li",null,"提示:只有含有文件系统的逻辑卷,或者分区才可以进行挂载。")))});case 1:return e.a(2)}},e)}))}),r.createElement(p.rA,{key:1,icon:"update",title:e("更新挂载"),onClick:N(M().m(function e(){return M().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,m.Yu.post("cmd/exe",{type:I.mount});case 1:e.v.code===y.m.Success&&(0,g.LW)("挂载文件已生效");case 2:return e.a(2)}},e)}))})],K=function(){var e=N(M().m(function e(){var t;return M().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,m.Yu.get("get_fstab");case 1:return t=e.v,e.a(2,t.data)}},e)}));return function(){return e.apply(this,arguments)}}(),W=function(){var e=N(M().m(function e(t){return M().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,m.Yu.post("save_fstab",{content:t});case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}();return r.createElement("div",null,r.createElement(d.A,null,r.createElement(p.rA,{icon:"close",title:e("关闭"),onClick:function(){n({})}})),r.createElement(o.jW,{isFull:!0,more:!0},r.createElement(o.NN,null,r.createElement(o.fI,null,r.createElement(o.VP,{widthPer:40},r.createElement(a.Zp,{title:e("物理块(硬盘)设备、逻辑卷、物理卷"),titleCom:r.createElement("div",null,_(F.oV.sys_disk_mount)&&r.createElement(p.rA,{icon:"file_open",title:e("打开挂载文件"),onClick:N(M().m(function e(){return M().w(function(e){for(;;)switch(e.n){case 0:A({name:"fstab(谨慎修改,内容错误会导致系统无法启动)",model:"text",get_file_fun:K,save_file_fun:W,menu_list:H});case 1:return e.a(2)}},e)}))}),r.createElement(p.rA,{icon:"update",title:e("刷新"),onClick:N(M().m(function e(){var t,n;return M().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,V();case 1:if(t=e.v,n=y.m.Success,t!==n){e.n=2;break}(0,g.LW)("刷新成功");case 2:return e.a(2)}},e)}))}))},r.createElement(h.X,{headers:P,rows:s,width:"10rem"}),r.createElement(T.A,{list:u,render:function(e){var t=e.name;return e.label&&(t+="(".concat(e.label,")")),e.mountpoint?r.createElement("span",null,t,r.createElement("span",{style:{color:"green"}},"(已挂载)")):t},onContextMenu:function(e,t){e.preventDefault()},click:function(t){var n="";if(t.mountpoint)for(var o=0;o<t.mountpoints.length;o++)n+=t.mountpoints[o]+";";w([[r.createElement(a.xP,null,n),r.createElement(a.xP,null,t.uuid),e(t.type),e(t.fstype),t.fssize,t.size,r.createElement(a.xP,null,t.path),t.pttype]])}}))),r.createElement(o.VP,{widthPer:60},k.map(function(t,n){var c,i=[],u=G(t.pv_list);try{for(u.s();!(c=u.n()).done;){var l=c.value;i.push({name:"".concat(l.name,"---(").concat(l.size,")---(").concat(l.free_size,")")})}}catch(e){u.e(e)}finally{u.f()}var f,s=[],m=G(t.lv_list);try{for(m.s();!(f=m.n()).done;){var d=f.value;s.push({name:"".concat(d.name,"---(").concat(d.size,")")})}}catch(e){m.e(e)}finally{m.f()}return r.createElement(a.Zp,{key:n},r.createElement(o.n5,null,r.createElement(U,{name:e("物理卷"),lvms:i}),r.createElement($,null),r.createElement(U,{name:"".concat(e("逻辑卷"),"---(").concat(t.name,")---size(").concat(t.size,")"),lvms:[]}),r.createElement($,null),r.createElement(U,{name:e("逻辑卷"),lvms:s})))}))))))}var Z=n(8815);function B(e){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},B(e)}function z(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(B(e)+" is not iterable")}function X(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=ee(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,c=!0,i=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){i=!0,a=e},f:function(){try{c||null==n.return||n.return()}finally{if(i)throw a}}}}function q(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var u=r&&r.prototype instanceof i?r:i,l=Object.create(u.prototype);return D(l,"_invoke",function(n,r,o){var a,i,u,l=0,f=o||[],s=!1,m={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return a=t,i=0,u=e,m.n=n,c}};function d(n,r){for(i=n,u=r,t=0;!s&&l&&!o&&t<f.length;t++){var o,a=f[t],d=m.p,p=a[2];n>3?(o=p===r)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=d&&((o=n<2&&d<a[1])?(i=0,m.v=r,m.n=a[1]):d<p&&(o=n<3||a[0]>r||r>p)&&(a[4]=n,a[5]=r,m.n=p,i=0))}if(o||n>1)return c;throw s=!0,r}return function(o,f,p){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&d(f,p),i=f,u=p;(t=i<2?e:u)||!s;){a||(i?i<3?(i>1&&(m.n=-1),d(i,u)):m.n=u:m.v=u);try{if(l=2,a){if(i||(o="next"),t=a[o]){if(!(t=t.call(a,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,i<2&&(i=0)}else 1===i&&(t=a.return)&&t.call(a),i<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=e}else if((t=(s=m.n<0)?u:n.call(r,m))!==c)break}catch(t){a=e,i=1,u=t}finally{l=1}}return{value:t,done:s}}}(n,o,a),!0),l}var c={};function i(){}function u(){}function l(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(D(t={},r,function(){return this}),t),s=l.prototype=i.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,D(e,o,"GeneratorFunction")),e.prototype=Object.create(s),e}return u.prototype=l,D(s,"constructor",l),D(l,"constructor",u),u.displayName="GeneratorFunction",D(l,o,"GeneratorFunction"),D(s),D(s,o,"Generator"),D(s,r,function(){return this}),D(s,"toString",function(){return"[object Generator]"}),(q=function(){return{w:a,m}})()}function D(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}D=function(e,t,n,r){function a(t,n){D(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},D(e,t,n,r)}function J(e,t,n,r,o,a,c){try{var i=e[a](c),u=i.value}catch(e){return void n(e)}i.done?t(u):Promise.resolve(u).then(r,o)}function R(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function c(e){J(a,r,o,c,i,"next",e)}function i(e){J(a,r,o,c,i,"throw",e)}c(void 0)})}}function Q(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,c,i=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(l)throw o}}return i}}(e,t)||ee(e,t)||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 ee(e,t){if(e){if("string"==typeof e)return te(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?te(e,t):void 0}}function te(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ne=!0;function re(e){var t=(0,v.Bd)().t,n=[t("名字"),t("厂商名称"),t("类型"),t("容量")],c=[t("名字"),t("物理硬盘"),t("文件系统类型"),t("挂载位置"),t("总容量"),t("剩余容量")],i=Q((0,b.L4)(E.A.user_base_info),2),u=i[0],S=(i[1],Q((0,r.useState)(0),2)),_=S[0],x=S[1],k=Q((0,r.useState)(0),2),A=k[0],j=k[1],O=Q((0,r.useState)(0),2),I=O[0],T=O[1],C=Q((0,r.useState)(0),2),G=C[0],M=C[1],V=Q((0,r.useState)(0),2),Y=V[0],N=V[1],L=Q((0,r.useState)({}),2),H=L[0],K=L[1],U=Q((0,r.useState)(!1),2),$=U[0],B=U[1],D=Q((0,r.useState)(!1),2),J=D[0],ee=D[1],te=Q((0,r.useState)(!1),2),re=te[0],oe=te[1],ae=Q((0,r.useState)(ne),2),ce=ae[0],ie=ae[1],ue=Q((0,r.useState)(null),2),le=ue[0],fe=ue[1],se=Q((0,r.useState)([]),2),me=se[0],de=se[1],pe=Q((0,r.useState)([]),2),he=pe[0],ye=pe[1],ve=Q((0,b.L4)(E.A.user_base_info),2),be=ve[0],Ee=(ve[1],Q((0,b.L4)(E.A.disk),2)),we=Ee[0],ge=Ee[1],Se=function(){var e=R(q().m(function e(){var t;return q().w(function(e){for(;;)switch(e.n){case 0:if(ne){e.n=1;break}return e.a(2);case 1:return t=new f.hf(f.HK.sys_get),e.n=2,s.ws.send(t);case 2:s.ws.addMsg(f.HK.sys_getting,function(e){var t,n,r,o,a;M(null===(t=e.context)||void 0===t?void 0:t.cpu_currentLoad);var c=null===(n=e.context)||void 0===n?void 0:n.memLeft,i=null===(r=e.context)||void 0===r?void 0:r.memTotal;j(c),T(i),x((i-c)/i*100),fe(null===(o=e.context)||void 0===o?void 0:o.node_memory_usage),N(null===(a=e.context)||void 0===a?void 0:a.node_cpu_usage)});case 3:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),_e=function(){var e=R(q().m(function e(){return q().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,Se();case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),xe=function(){var e=R(q().m(function e(){var t,n;return q().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,m.Yu.get("base");case 1:(t=e.v).code===y.m.Success&&(n=t.data,K(n));case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),ke=function(){var e=R(q().m(function e(){var n,o,c,i,u,l,f,s;return q().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.n=1,m.Yu.get("disk");case 1:if((n=e.v).code!==y.m.Success){e.n=9;break}o=n.data,c=[],i=!0,be.sysSoftWare&&be.sysSoftWare[w.jk.smartmontools]&&be.sysSoftWare[w.jk.smartmontools].installed||(i=!1),u=X(null!=o?o:[]),e.p=2,f=q().m(function e(){var n;return q().w(function(e){for(;;)switch(e.n){case 0:n=l.value,c.push([r.createElement(a.xP,{context:n.name}),n.typeName,n.type,n.total,r.createElement(p.rA,{icon:"health_and_safety",title:t("查看健康信息"),onClick:function(){i?ge({type:"check",data:n}):(0,g.zN)("没有安装smartmontools")}})]);case 1:return e.a(2)}},e)}),u.s();case 3:if((l=u.n()).done){e.n=5;break}return e.d(z(f()),4);case 4:e.n=3;break;case 5:e.n=7;break;case 6:e.p=6,s=e.v,u.e(s);case 7:return e.p=7,u.f(),e.f(7);case 8:de(c);case 9:return e.a(2)}},e,null,[[2,6,7,8]])}));return function(){return e.apply(this,arguments)}}(),Ae=function(){var e=R(q().m(function e(){var t,n,o,c,i,u;return q().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,m.Yu.get("filedisk");case 1:if((t=e.v).code===y.m.Success){n=t.data,o=[],c=X(null!=n?n:[]);try{for(c.s();!(i=c.n()).done;)u=i.value,o.push([r.createElement(a.xP,{context:u.name}),r.createElement(a.xP,{context:u.device_name}),u.fsType,r.createElement(a.xP,{context:u.mount}),u.total,u.available])}catch(e){c.e(e)}finally{c.f()}ye(o)}case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return(0,r.useEffect)(function(){return _e(),function(){s.ws.sendData(f.HK.sys_cancel,{})}},[]),r.createElement("div",null,r.createElement(d.A,null,u.sys===F.XM.linux&&r.createElement(p.rA,{icon:"sd_card",title:"硬盘挂载",onClick:function(){ge({type:"mount"})}}),r.createElement(p.Z$,{defaultStatus:!1,text:t("基本信息"),clickFun:function(e){B(e),e&&xe()}}),r.createElement(p.Z$,{defaultStatus:!1,text:t("物理硬盘"),clickFun:function(e){ee(e),e&&ke()}}),r.createElement(p.Z$,{defaultStatus:!1,text:t("文件硬盘"),clickFun:function(e){oe(e),e&&Ae()}}),r.createElement(p.Z$,{defaultStatus:ce,text:t("实时信息"),clickFun:function(e){ie(e),ne=e,Se()}})),r.createElement(o.xh,null,ce&&r.createElement(o.fI,null,r.createElement(o.VP,{widthPer:33},r.createElement(a.Zp,{title:"Sys "+t("内存")},r.createElement(o.fI,null,r.createElement(o.VP,null,r.createElement(l,{percentage:_})),r.createElement(o.VP,null,r.createElement(o.fI,null,r.createElement(o.VP,{widthPer:100},r.createElement("div",null,r.createElement(o.Yh,{left:t("总容量"),center:"".concat(I,"G")}))),r.createElement(o.VP,{widthPer:100},r.createElement(o.Yh,{left:t("剩余"),center:"".concat(A,"G")}))))))),r.createElement(o.VP,{widthPer:33},r.createElement(a.Zp,{title:"Sys cpu"},r.createElement(o.fI,null,r.createElement(o.VP,null,r.createElement(l,{percentage:G})),r.createElement(o.VP,null,r.createElement(o.fI,null,r.createElement(o.Yh,{left:t("使用率"),center:G})))))),r.createElement(o.VP,{widthPer:33},r.createElement(a.Zp,{title:"FileCat"},r.createElement(o.fI,null,r.createElement(o.VP,null,r.createElement(o.qV,{content:t("内存")}),r.createElement(o.qV,{content:"total: "+(0,Z.v7)(null==le?void 0:le.rss)}),r.createElement(o.qV,{content:"object: "+(0,Z.v7)(null==le?void 0:le.heapTotal)}),r.createElement(o.qV,{content:"obj-use: "+(0,Z.v7)(null==le?void 0:le.heapUsed)}),r.createElement(o.qV,{content:"external: "+(0,Z.v7)(null==le?void 0:le.external)}),r.createElement(o.qV,{content:"buffer: "+(0,Z.v7)(null==le?void 0:le.arrayBuffers)})),r.createElement(o.VP,null,r.createElement(o.qV,{content:"cpu growth rate: "+Y})))))),r.createElement(o.fI,null,$&&r.createElement(o.VP,null,r.createElement(a.Zp,{title:t("基本信息")},r.createElement(o.Yh,{left:t("总内存"),right:H.mem_total}),r.createElement(o.Yh,{left:"cpu ".concat(t("制造商")),right:H.cpu_manufacturer}),r.createElement(o.Yh,{left:"cpu ".concat(t("品牌")),right:H.cpu_brand}),r.createElement(o.Yh,{left:"cpu ".concat(t("逻辑核心")),right:H.cpu_core_num}),r.createElement(o.Yh,{left:"cpu ".concat(t("物理核心")),right:H.cpu_phy_core_num}),r.createElement(o.Yh,{left:"cpu ".concat(t("最大"),"hz"),right:H.cpu_speed_hz}),r.createElement(o.Yh,{left:"".concat(t("当前系统"),":pid;ppid"),right:H.pid_ppid}),r.createElement(o.Yh,{left:t("运行用户"),right:H.user}))),J&&r.createElement(o.VP,null,r.createElement(a.uF,{title:t("物理硬盘")},r.createElement(h.X,{headers:n,rows:me,width:"10rem"}))),re&&r.createElement(o.VP,null,r.createElement(a.uF,{title:t("文件硬盘")},r.createElement(h.X,{headers:c,rows:he,width:"10rem"}))))),we&&"check"===we.type&&r.createElement(P,we.data),we&&"mount"===we.type&&r.createElement(W,null))}function oe(e){return r.createElement("h2",{className:"message"},r.createElement("i",{className:"material-icons"},"sentiment_dissatisfied"),r.createElement("span",null,e.context))}var ae=n(3033),ce=n(7856),ie=n(4405);function ue(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var u=r&&r.prototype instanceof i?r:i,l=Object.create(u.prototype);return le(l,"_invoke",function(n,r,o){var a,i,u,l=0,f=o||[],s=!1,m={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return a=t,i=0,u=e,m.n=n,c}};function d(n,r){for(i=n,u=r,t=0;!s&&l&&!o&&t<f.length;t++){var o,a=f[t],d=m.p,p=a[2];n>3?(o=p===r)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=d&&((o=n<2&&d<a[1])?(i=0,m.v=r,m.n=a[1]):d<p&&(o=n<3||a[0]>r||r>p)&&(a[4]=n,a[5]=r,m.n=p,i=0))}if(o||n>1)return c;throw s=!0,r}return function(o,f,p){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&d(f,p),i=f,u=p;(t=i<2?e:u)||!s;){a||(i?i<3?(i>1&&(m.n=-1),d(i,u)):m.n=u:m.v=u);try{if(l=2,a){if(i||(o="next"),t=a[o]){if(!(t=t.call(a,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,i<2&&(i=0)}else 1===i&&(t=a.return)&&t.call(a),i<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=e}else if((t=(s=m.n<0)?u:n.call(r,m))!==c)break}catch(t){a=e,i=1,u=t}finally{l=1}}return{value:t,done:s}}}(n,o,a),!0),l}var c={};function i(){}function u(){}function l(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(le(t={},r,function(){return this}),t),s=l.prototype=i.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,le(e,o,"GeneratorFunction")),e.prototype=Object.create(s),e}return u.prototype=l,le(s,"constructor",l),le(l,"constructor",u),u.displayName="GeneratorFunction",le(l,o,"GeneratorFunction"),le(s),le(s,o,"Generator"),le(s,r,function(){return this}),le(s,"toString",function(){return"[object Generator]"}),(ue=function(){return{w:a,m}})()}function le(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}le=function(e,t,n,r){function a(t,n){le(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},le(e,t,n,r)}function fe(e,t,n,r,o,a,c){try{var i=e[a](c),u=i.value}catch(e){return void n(e)}i.done?t(u):Promise.resolve(u).then(r,o)}function se(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function c(e){fe(a,r,o,c,i,"next",e)}function i(e){fe(a,r,o,c,i,"throw",e)}c(void 0)})}}function me(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,c,i=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return de(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?de(e,t):void 0}}(e,t)||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 de(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var pe=r.lazy(function(){return n.e(614).then(n.bind(n,5614))});function he(e){var t=me((0,r.useState)(null),2),n=t[0],o=t[1],a=me((0,b.L4)(E.A.dockerShellShow),2),c=a[0],i=(a[1],me((0,b.L4)(E.A.user_base_info),2)),u=i[0],l=(i[1],"dark"===u.user_data.theme?"#FFFFFF":"#000000"),m=function(){var e=se(ue().m(function e(){var t,n,r;return ue().w(function(e){for(;;)switch(e.n){case 0:t=new ce.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}),s.ws.subscribeUnconnect(d),r=function(e){t.write(e)},n=function(e){t.clear(),t.write(e),n=r},s.ws.addMsg("logs"===c.type?f.HK.docker_shell_logs_getting:f.HK.docker_shell_exec_getting,function(e){"error"===e.context&&d(),n(e.context)}),"exec"===c.type&&t.onData(function(){var e=se(ue().m(function e(t){var n;return ue().w(function(e){for(;;)switch(e.n){case 0:return(n=new f.hf(f.HK.docker_shell_exec)).context=t,e.n=1,s.ws.send(n);case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}()),o(t);case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),d=function(){se(ue().m(function e(){return ue().w(function(e){for(;;)switch(e.n){case 0:n&&(n.writeln("close! "),n.dispose(),o(null));case 1:return e.a(2)}},e)}))()};(0,r.useEffect)(function(){c.show?m():d()},[c]),(0,r.useEffect)(function(){return function(){d()}},[]);return r.createElement(pe,{show:c.show,terminal:n,init:function(e,t){n.writeln("connect... ");var r,o=new ie.n;o.rows=e,o.cols=t,o.dockerId=c.dockerId,(r="logs"===c.type?new f.hf(f.HK.docker_shell_logs):new f.hf(f.HK.docker_shell_exec_open)).context=o,s.ws.send(r)}})}var ye=n(6325);function ve(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var u=r&&r.prototype instanceof i?r:i,l=Object.create(u.prototype);return be(l,"_invoke",function(n,r,o){var a,i,u,l=0,f=o||[],s=!1,m={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return a=t,i=0,u=e,m.n=n,c}};function d(n,r){for(i=n,u=r,t=0;!s&&l&&!o&&t<f.length;t++){var o,a=f[t],d=m.p,p=a[2];n>3?(o=p===r)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=d&&((o=n<2&&d<a[1])?(i=0,m.v=r,m.n=a[1]):d<p&&(o=n<3||a[0]>r||r>p)&&(a[4]=n,a[5]=r,m.n=p,i=0))}if(o||n>1)return c;throw s=!0,r}return function(o,f,p){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&d(f,p),i=f,u=p;(t=i<2?e:u)||!s;){a||(i?i<3?(i>1&&(m.n=-1),d(i,u)):m.n=u:m.v=u);try{if(l=2,a){if(i||(o="next"),t=a[o]){if(!(t=t.call(a,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,i<2&&(i=0)}else 1===i&&(t=a.return)&&t.call(a),i<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=e}else if((t=(s=m.n<0)?u:n.call(r,m))!==c)break}catch(t){a=e,i=1,u=t}finally{l=1}}return{value:t,done:s}}}(n,o,a),!0),l}var c={};function i(){}function u(){}function l(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(be(t={},r,function(){return this}),t),s=l.prototype=i.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,be(e,o,"GeneratorFunction")),e.prototype=Object.create(s),e}return u.prototype=l,be(s,"constructor",l),be(l,"constructor",u),u.displayName="GeneratorFunction",be(l,o,"GeneratorFunction"),be(s),be(s,o,"Generator"),be(s,r,function(){return this}),be(s,"toString",function(){return"[object Generator]"}),(ve=function(){return{w:a,m}})()}function be(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}be=function(e,t,n,r){function a(t,n){be(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},be(e,t,n,r)}function Ee(e){return function(e){if(Array.isArray(e))return ke(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||xe(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function we(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=xe(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,c=!0,i=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){i=!0,a=e},f:function(){try{c||null==n.return||n.return()}finally{if(i)throw a}}}}function ge(e,t,n,r,o,a,c){try{var i=e[a](c),u=i.value}catch(e){return void n(e)}i.done?t(u):Promise.resolve(u).then(r,o)}function Se(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function c(e){ge(a,r,o,c,i,"next",e)}function i(e){ge(a,r,o,c,i,"throw",e)}c(void 0)})}}function _e(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,c,i=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(l)throw o}}return i}}(e,t)||xe(e,t)||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 xe(e,t){if(e){if("string"==typeof e)return ke(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ke(e,t):void 0}}function ke(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Ae="",je=[],Oe=!1;function Pe(e){var t=(0,v.Bd)().t,n=_e((0,r.useState)({}),2),c=n[0],i=n[1],u=_e((0,r.useState)([]),2),l=u[0],w=u[1],S=_e((0,r.useState)([]),2),_=S[0],x=S[1],k=(0,C.MH)().check_user_auth,A=_e((0,b.L4)(E.A.dockerShellShow),2),j=A[0],O=A[1],P=_e((0,b.L4)(E.A.showPrompt),2),I=(P[0],P[1]),T=_e((0,b.L4)(E.A.confirm),2),G=(T[0],T[1]),M=_e((0,r.useState)(Ae),2),V=M[0],Y=M[1],N=_e((0,r.useState)(["id",t("名字"),t("镜像"),t("命令"),t("状态"),t("内存"),"cpu%",t("选择")]),2),L=N[0],H=(N[1],_e((0,r.useState)([]),2)),K=H[0],U=H[1],$=_e((0,r.useState)(void 0),2),W=$[0],Z=$[1],B=_e((0,r.useState)(!1),2),z=B[0],X=B[1],q=["id",t("name"),t("create时间"),t("大小"),r.createElement("span",null,"选中",r.createElement(p.rA,{icon:"check_box",title:"全选",onClick:function(){Oe=!Oe;for(var e={},t=0;t<_.length&&Oe;t++)e[_[t][0].props.context]=1;i(e)}}))],D=function(){var e=Se(ve().m(function e(){var t;return ve().w(function(e){for(;;)switch(e.n){case 0:return t=new f.hf(f.HK.docker_get),e.n=1,s.ws.send(t);case 1:s.ws.addMsg(f.HK.docker_getting,function(e){var t=[];if(Ae){var n,o=we(e.context);try{for(o.s();!(n=o.n()).done;){var c,i=n.value,u=we(i);try{for(u.s();!(c=u.n()).done;){var l=c.value;if("".concat(l).includes(Ae)){t.push(i);break}}}catch(e){u.e(e)}finally{u.f()}}}catch(e){o.e(e)}finally{o.f()}}else t.push.apply(t,Ee(e.context));for(var f=function(){for(var e=t[s],n=0;n<e.length;n++)e[n]=r.createElement(a.xP,{context:e[n]});e.push(r.createElement(p.rA,{icon:"place",title:"选中",onClick:function(){U(e)}}))},s=0;s<t.length;s++)f();w(t)});case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();(0,r.useEffect)(function(){return Y(Ae),D(),function(){Se(ve().m(function e(){return ve().w(function(e){for(;;)switch(e.n){case 0:O({show:!1,type:"",dockerId:""});case 1:return e.a(2)}},e)}))()}},[]),(0,r.useEffect)(function(){Ae=V},[V]);var J=function(){var e=new f.hf("logs"===j.type?f.HK.docker_shell_logs_cancel:f.HK.docker_shell_exec_cancel);e.context="",s.ws.send(e)},R=function(e){var t=new f.hf(f.HK.docker_switch);t.context={type:e,dockerId:K[0].props.context},U([]),s.ws.send(t)},Q=function(){var e=Se(ve().m(function e(){var t,n,o,c,i,u,l;return ve().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,m.Yu.get("docker/images");case 1:if((t=e.v).code===y.m.Success){for(o=null!==(n=t.data)&&void 0!==n?n:[],c=[],i=0;i<o.length;i++)u=o[i],l=[r.createElement(a.xP,{context:u[0]}),r.createElement(a.xP,{context:u[1]}),u[2],u[3],""],c.push(l);je=c,x(c)}case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),ee=function(){var e=Se(ve().m(function e(){return ve().w(function(e){for(;;)switch(e.n){case 0:G({open:!0,title:t("确定删除选中的镜像吗"),handle:function(){var e=Se(ve().m(function e(){var t,n;return ve().w(function(e){for(;;)switch(e.n){case 0:return t=Object.keys(c),e.n=1,m.Yu.post("docker/check/delete",{ids:t});case 1:if((n=e.v).code!==y.m.Success){e.n=4;break}if(0!==n.data.length){e.n=3;break}return e.n=2,m.Yu.post("docker/delete",{ids:t});case 2:e.v.code===y.m.Success&&((0,g.LW)("删除完成"),Q(),G({open:!1,handle:null})),e.n=4;break;case 3:(0,g.N9)("有镜像正在运行".concat(JSON.stringify(n.data)));case 4:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}()});case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),te=function(){var e=Se(ve().m(function e(){var t;return ve().w(function(e){for(;;)switch(e.n){case 0:return t=new f.hf(f.HK.docker_get),e.n=1,s.ws.send(t);case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return r.createElement("div",null,r.createElement(d.A,{left_children:r.createElement(p.Z$,{defaultStatus:!1,text:t("docker镜像"),clickFun:function(e){X(e),e?(Q(),U([])):(D(),x([]),i({}))}})},Object.keys(c).length>0&&r.createElement(p.rA,{icon:"delete",title:t("删除镜像"),onClick:ee}),K.length>0&&r.createElement("div",null,K[1].props.context),K.length>0&&r.createElement("div",null,k(F.oV.docker_container_update)&&r.createElement(p.rA,{icon:"delete",title:t("删除容器"),onClick:function(){I({show:!0,overlay:!0,type:ye.PromptEnum.DockerDel,data:{dockerId:K[0].props.context,name:K[1].props.context}})}}),r.createElement(p.rA,{icon:"print",title:t("打印日志"),onClick:function(){j.show?(O({show:!1,type:"",dockerId:""}),J()):O({show:!0,dockerId:K[0].props.context,type:"logs"})}}),k(F.oV.docker_container_update)&&r.createElement(p.rA,{icon:"personal_video",title:t("执行命令"),onClick:function(){j.show?(O({show:!1,type:"",dockerId:""}),J()):O({show:!0,dockerId:K[0].props.context,type:"exec"})}}),k(F.oV.docker_container_update)&&K[4].props.context.includes("Up")&&r.createElement(p.rA,{icon:"stop",title:t("停止"),onClick:function(){return R("stop")}}),k(F.oV.docker_container_update)&&!K[4].props.context.includes("Up")&&r.createElement(p.rA,{icon:"play_arrow",title:t("开启"),onClick:function(){R("start")}})),(0!==l.length||V)&&!z&&r.createElement(p.rA,{icon:"refresh",title:t("列表更新"),onClick:te})),r.createElement(o.xh,null,z&&r.createElement(o.fI,null,r.createElement(o.VP,{widthPer:80},r.createElement(a.uF,{title:"".concat(t("镜像")," (").concat(_.length,")"),titleCom:r.createElement(ae.Sm,{placeholder:t("过滤镜像"),value:W,handleInputChange:function(e){Z(e)},handlerEnter:function(){var e=[];if(W){var t,n=we(_);try{for(n.s();!(t=n.n()).done;){var r=t.value;(r[0].props.context.includes(W)||r[1].props.context.includes(W))&&e.push(r)}}catch(e){n.e(e)}finally{n.f()}x(e)}else x(je)}})},r.createElement(h.X,{headers:q,rows:_.map(function(e,n){return e[4]=r.createElement(ae.GL,{context:t(""),selected:c[e[0].props.context],onchange:function(){var t,n;t=e[0].props.context,n={},Object.assign(n,c),n[t]?delete n[t]:n[t]=1,i(n)}}),e}),width:"10rem"})))),0===l.length&&!V&&!z&&r.createElement(oe,{context:t("检测不到docker,主机可能没有安装docker or 容器为空")}),(0!==l.length||V)&&!z&&r.createElement(o.fI,null,r.createElement(o.VP,{widthPer:80},r.createElement(a.uF,{title:"".concat(t("容器")," (").concat(l.length,")"),titleCom:r.createElement(ae.Sm,{placeholder:t("过滤"),value:V,handleInputChange:function(e){Y(e)}})},r.createElement(h.X,{headers:L,rows:l,width:"10rem"}))))),r.createElement(he,null))}var Ie=n(4694);function Te(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var u=r&&r.prototype instanceof i?r:i,l=Object.create(u.prototype);return Ce(l,"_invoke",function(n,r,o){var a,i,u,l=0,f=o||[],s=!1,m={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return a=t,i=0,u=e,m.n=n,c}};function d(n,r){for(i=n,u=r,t=0;!s&&l&&!o&&t<f.length;t++){var o,a=f[t],d=m.p,p=a[2];n>3?(o=p===r)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=d&&((o=n<2&&d<a[1])?(i=0,m.v=r,m.n=a[1]):d<p&&(o=n<3||a[0]>r||r>p)&&(a[4]=n,a[5]=r,m.n=p,i=0))}if(o||n>1)return c;throw s=!0,r}return function(o,f,p){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&d(f,p),i=f,u=p;(t=i<2?e:u)||!s;){a||(i?i<3?(i>1&&(m.n=-1),d(i,u)):m.n=u:m.v=u);try{if(l=2,a){if(i||(o="next"),t=a[o]){if(!(t=t.call(a,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,i<2&&(i=0)}else 1===i&&(t=a.return)&&t.call(a),i<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=e}else if((t=(s=m.n<0)?u:n.call(r,m))!==c)break}catch(t){a=e,i=1,u=t}finally{l=1}}return{value:t,done:s}}}(n,o,a),!0),l}var c={};function i(){}function u(){}function l(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(Ce(t={},r,function(){return this}),t),s=l.prototype=i.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,Ce(e,o,"GeneratorFunction")),e.prototype=Object.create(s),e}return u.prototype=l,Ce(s,"constructor",l),Ce(l,"constructor",u),u.displayName="GeneratorFunction",Ce(l,o,"GeneratorFunction"),Ce(s),Ce(s,o,"Generator"),Ce(s,r,function(){return this}),Ce(s,"toString",function(){return"[object Generator]"}),(Te=function(){return{w:a,m}})()}function Ce(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}Ce=function(e,t,n,r){function a(t,n){Ce(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},Ce(e,t,n,r)}function Fe(e){return function(e){if(Array.isArray(e))return Ne(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ye(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ge(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Ye(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,c=!0,i=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){i=!0,a=e},f:function(){try{c||null==n.return||n.return()}finally{if(i)throw a}}}}function Me(e,t,n,r,o,a,c){try{var i=e[a](c),u=i.value}catch(e){return void n(e)}i.done?t(u):Promise.resolve(u).then(r,o)}function Ve(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,c,i=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(l)throw o}}return i}}(e,t)||Ye(e,t)||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 Ye(e,t){if(e){if("string"==typeof e)return Ne(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ne(e,t):void 0}}function Ne(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Le="",He=!1,Ke=!1;function Ue(e){var t=(0,v.Bd)().t,n=Ve((0,r.useState)([]),2),c=n[0],i=n[1],u=Ve((0,r.useState)([]),2),l=u[0],m=u[1],y=Ve((0,r.useState)(0),2),b=y[0],E=y[1],w=Ve((0,r.useState)(""),2),g=w[0],S=w[1],_=Ve((0,r.useState)(["pid",t("名字"),t("创建用户"),r.createElement("span",null,t("内存"),r.createElement(p.rA,{icon:"sort",title:t("升序"),onClick:function(){He=!He}})),r.createElement("span",null,"cpu%",r.createElement(p.rA,{icon:"sort",title:t("升序"),onClick:function(){Ke=!Ke}})),t("选择")]),2),x=_[0],k=(_[1],(0,C.MH)().check_user_auth),A=function(){var e,n=(e=Te().m(function e(){var n;return Te().w(function(e){for(;;)switch(e.n){case 0:return n=new f.hf(f.HK.process_get),e.n=1,s.ws.send(n);case 1:s.ws.addMsg(f.HK.process_getting,function(e){var n=[];if(Le){var o,c=Ge(e.context);try{for(c.s();!(o=c.n()).done;){var u,l=o.value,f=Ge(l);try{for(f.s();!(u=f.n()).done;){var s=u.value;if("".concat(s).includes(Le)){n.push(l);break}}}catch(e){f.e(e)}finally{f.f()}}}catch(e){c.e(e)}finally{c.f()}}else n.push.apply(n,Fe(e.context));He&&(0,Ie.di)(n,function(e){return e[3]},!1),Ke&&(0,Ie.di)(n,function(e){return e[4]},!1);for(var d=function(){for(var e=n[h],o=0;o<e.length;o++)e[o]=r.createElement(a.xP,{context:3===o?(0,Z.v7)(e[o]):e[o]});e.push(r.createElement(p.rA,{icon:"place",title:t("选中"),onClick:function(){m(e)}}))},h=0;h<n.length;h++)d();E(n.length),i(n)});case 2:return e.a(2)}},e)}),function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function c(e){Me(a,r,o,c,i,"next",e)}function i(e){Me(a,r,o,c,i,"throw",e)}c(void 0)})});return function(){return n.apply(this,arguments)}}();(0,r.useEffect)(function(){S(Le),A()},[]),(0,r.useEffect)(function(){Le=g},[g]);return r.createElement("div",null,r.createElement(d.A,null,l.length>0&&r.createElement("div",null,l[1].props.context),l.length>0&&k(F.oV.sys_process_close)&&r.createElement("div",null,r.createElement(p.rA,{icon:"stop",title:t("停止"),onClick:function(){var e=new f.hf(f.HK.process_close);e.context={pid:l[0].props.context},m([]),s.ws.send(e)}}))),r.createElement(o.xh,null,0!==c.length||Le?r.createElement(o.fI,null,r.createElement(o.VP,{widthPer:80},r.createElement(a.uF,{title:"".concat(t("进程")," (").concat(b,")"),titleCom:r.createElement(ae.Sm,{placeholder:t("过滤"),value:g,handleInputChange:function(e){S(e)}})},r.createElement(h.X,{headers:x,rows:c,width:"10rem"})))):r.createElement(oe,{context:t("加载中请等待...")})))}function $e(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var u=r&&r.prototype instanceof i?r:i,l=Object.create(u.prototype);return We(l,"_invoke",function(n,r,o){var a,i,u,l=0,f=o||[],s=!1,m={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return a=t,i=0,u=e,m.n=n,c}};function d(n,r){for(i=n,u=r,t=0;!s&&l&&!o&&t<f.length;t++){var o,a=f[t],d=m.p,p=a[2];n>3?(o=p===r)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=d&&((o=n<2&&d<a[1])?(i=0,m.v=r,m.n=a[1]):d<p&&(o=n<3||a[0]>r||r>p)&&(a[4]=n,a[5]=r,m.n=p,i=0))}if(o||n>1)return c;throw s=!0,r}return function(o,f,p){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&d(f,p),i=f,u=p;(t=i<2?e:u)||!s;){a||(i?i<3?(i>1&&(m.n=-1),d(i,u)):m.n=u:m.v=u);try{if(l=2,a){if(i||(o="next"),t=a[o]){if(!(t=t.call(a,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,i<2&&(i=0)}else 1===i&&(t=a.return)&&t.call(a),i<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=e}else if((t=(s=m.n<0)?u:n.call(r,m))!==c)break}catch(t){a=e,i=1,u=t}finally{l=1}}return{value:t,done:s}}}(n,o,a),!0),l}var c={};function i(){}function u(){}function l(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(We(t={},r,function(){return this}),t),s=l.prototype=i.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,We(e,o,"GeneratorFunction")),e.prototype=Object.create(s),e}return u.prototype=l,We(s,"constructor",l),We(l,"constructor",u),u.displayName="GeneratorFunction",We(l,o,"GeneratorFunction"),We(s),We(s,o,"Generator"),We(s,r,function(){return this}),We(s,"toString",function(){return"[object Generator]"}),($e=function(){return{w:a,m}})()}function We(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}We=function(e,t,n,r){function a(t,n){We(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},We(e,t,n,r)}function Ze(e,t,n,r,o,a,c){try{var i=e[a](c),u=i.value}catch(e){return void n(e)}i.done?t(u):Promise.resolve(u).then(r,o)}function Be(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function c(e){Ze(a,r,o,c,i,"next",e)}function i(e){Ze(a,r,o,c,i,"throw",e)}c(void 0)})}}function ze(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,c,i=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Xe(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Xe(e,t):void 0}}(e,t)||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 Xe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var qe=r.lazy(function(){return n.e(614).then(n.bind(n,5614))});function De(e){var t=ze((0,r.useState)(null),2),n=t[0],o=t[1],a=ze((0,b.L4)(E.A.systemd_shell_show),2),c=a[0],i=(a[1],ze((0,b.L4)(E.A.user_base_info),2)),u=i[0],l=(i[1],"dark"===u.user_data.theme?"#FFFFFF":"#000000"),m=function(){var e=Be($e().m(function e(){var t;return $e().w(function(e){for(;;)switch(e.n){case 0:t=new ce.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}),s.ws.subscribeUnconnect(d),s.ws.addMsg(f.HK.systemd_logs_getting,function(e){"error"===e.context&&d(),t.write(e.context)}),o(t);case 1:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),d=function(){Be($e().m(function e(){return $e().w(function(e){for(;;)switch(e.n){case 0:n&&(n.writeln("close! "),n.dispose(),o(null));case 1:return e.a(2)}},e)}))()};(0,r.useEffect)(function(){if(c.show){m();var e=function(e){};return document.addEventListener("cancel_systemd_logs",e),function(){document.removeEventListener("cancel_systemd_logs",e)}}d()},[c]),(0,r.useEffect)(function(){return function(){d()}},[]);return r.createElement(qe,{show:c.show,terminal:n,init:function(e,t){n.writeln("connect... ");var r={unit_name:c.unit_name},o=new f.hf(f.HK.systemd_logs_get);o.context=r,s.ws.send(o)}})}function Je(e){return Je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Je(e)}function Re(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(Je(e)+" is not iterable")}function Qe(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var u=r&&r.prototype instanceof i?r:i,l=Object.create(u.prototype);return et(l,"_invoke",function(n,r,o){var a,i,u,l=0,f=o||[],s=!1,m={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return a=t,i=0,u=e,m.n=n,c}};function d(n,r){for(i=n,u=r,t=0;!s&&l&&!o&&t<f.length;t++){var o,a=f[t],d=m.p,p=a[2];n>3?(o=p===r)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=d&&((o=n<2&&d<a[1])?(i=0,m.v=r,m.n=a[1]):d<p&&(o=n<3||a[0]>r||r>p)&&(a[4]=n,a[5]=r,m.n=p,i=0))}if(o||n>1)return c;throw s=!0,r}return function(o,f,p){if(l>1)throw TypeError("Generator is already running");for(s&&1===f&&d(f,p),i=f,u=p;(t=i<2?e:u)||!s;){a||(i?i<3?(i>1&&(m.n=-1),d(i,u)):m.n=u:m.v=u);try{if(l=2,a){if(i||(o="next"),t=a[o]){if(!(t=t.call(a,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,i<2&&(i=0)}else 1===i&&(t=a.return)&&t.call(a),i<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=e}else if((t=(s=m.n<0)?u:n.call(r,m))!==c)break}catch(t){a=e,i=1,u=t}finally{l=1}}return{value:t,done:s}}}(n,o,a),!0),l}var c={};function i(){}function u(){}function l(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(et(t={},r,function(){return this}),t),s=l.prototype=i.prototype=Object.create(f);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,et(e,o,"GeneratorFunction")),e.prototype=Object.create(s),e}return u.prototype=l,et(s,"constructor",l),et(l,"constructor",u),u.displayName="GeneratorFunction",et(l,o,"GeneratorFunction"),et(s),et(s,o,"Generator"),et(s,r,function(){return this}),et(s,"toString",function(){return"[object Generator]"}),(Qe=function(){return{w:a,m}})()}function et(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}et=function(e,t,n,r){function a(t,n){et(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},et(e,t,n,r)}function tt(e){return function(e){if(Array.isArray(e))return it(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||ct(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=ct(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,c=!0,i=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){i=!0,a=e},f:function(){try{c||null==n.return||n.return()}finally{if(i)throw a}}}}function rt(e,t,n,r,o,a,c){try{var i=e[a](c),u=i.value}catch(e){return void n(e)}i.done?t(u):Promise.resolve(u).then(r,o)}function ot(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function c(e){rt(a,r,o,c,i,"next",e)}function i(e){rt(a,r,o,c,i,"throw",e)}c(void 0)})}}function at(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,c,i=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(l)throw o}}return i}}(e,t)||ct(e,t)||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 ct(e,t){if(e){if("string"==typeof e)return it(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?it(e,t):void 0}}function it(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ut,lt="";function ft(e){var t=(0,v.Bd)().t,n=(0,C.MH)().check_user_auth,c=at((0,b.L4)(E.A.systemd_shell_show),2),i=c[0],u=c[1],l=at((0,b.L4)(E.A.confirm),2),w=(l[0],l[1]),S=at((0,r.useState)(["pid","name","process",t("创建用户"),t("内存"),t("cpu%"),t("active状态"),t("选择")]),2),_=S[0],x=(S[1],at((0,r.useState)(["单元名字","加载状态",t("active(sub)状态"),t("描述"),t("选择")]),2)),k=x[0],A=(x[1],at((0,r.useState)([]),2)),j=A[0],O=A[1],P=at((0,r.useState)([]),2),I=P[0],T=P[1],G=at((0,r.useState)([]),2),M=G[0],V=G[1],Y=at((0,r.useState)(!1),2),N=Y[0],L=Y[1],H=at((0,r.useState)([]),2),K=H[0],U=H[1],$=at((0,r.useState)(""),2),W=$[0],B=$[1],z=at((0,r.useState)(""),2),X=z[0],q=z[1],D=at((0,r.useState)(new Set),2),J=D[0],R=D[1],Q=at((0,b.L4)(E.A.editorSetting),2),ee=(Q[0],Q[1]),te=function(){var e=ot(Qe().m(function e(){var t;return Qe().w(function(e){for(;;)switch(e.n){case 0:return t=new f.hf(f.HK.systemd_inside_get),e.n=1,s.ws.send(t);case 1:s.ws.addMsg(f.HK.systemd_inside_getting,function(e){var t=[];if(lt){var n,o=nt(e.context);try{for(o.s();!(n=o.n()).done;){var c,i=n.value,u=nt(i);try{for(u.s();!(c=u.n()).done;){var l=c.value;if("".concat(l).includes(lt)){t.push(i);break}}}catch(e){u.e(e)}finally{u.f()}}}catch(e){o.e(e)}finally{o.f()}}else t.push.apply(t,tt(e.context));for(var f=function(){for(var e=t[s],n=0;n<e.length;n++)e[n]=r.createElement(a.xP,{context:4===n?(0,Z.v7)(e[n]):e[n]});e.push(r.createElement(p.rA,{icon:"place",title:"选中",onClick:function(){V(e)}}))},s=0;s<t.length;s++)f();O(t)});case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();(0,r.useEffect)(function(){q(lt),te()},[]),(0,r.useEffect)(function(){lt=X},[X]);var ne=function(e){if(i.show){u({show:!1,unit_name:""});var t=new CustomEvent("cancel_systemd_logs",{detail:{}});document.dispatchEvent(t)}else u({show:!0,unit_name:e})},re=function(){var e=ot(Qe().m(function e(t){return Qe().w(function(e){for(;;)switch(e.n){case 0:w({open:!0,handle:function(){var e=ot(Qe().m(function e(){return Qe().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,m.Yu.post("systemd/sys/delete",{unit_name:t});case 1:e.v.code===y.m.Success&&((0,g.LW)("删除成功"),w({open:!1,handle:null}));case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}()});case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),ce=function(){var e=ot(Qe().m(function e(t){return Qe().w(function(e){for(;;)switch(e.n){case 0:w({open:!0,handle:function(){var e=ot(Qe().m(function e(){return Qe().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,m.Yu.post("systemd/delete",{unit_name:t});case 1:e.v.code===y.m.Success&&((0,g.LW)("删除成功"),w({open:!1,handle:null}));case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}()});case 1:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),ie=function(){var e=ot(Qe().m(function e(){var t,n,o,c,i,u,l,f;return Qe().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.n=1,m.Yu.get("systemd/inside/all");case 1:if((t=e.v).code===y.m.Success){e.n=2;break}return e.a(2);case 2:return R(new Set(t.data)),e.n=3,m.Yu.get("systemd/allget");case 3:if((n=e.v).code!==y.m.Success){e.n=11;break}o=n.data,c=[],i=nt(null!=o?o:[]),e.p=4,l=Qe().m(function e(){var t,n;return Qe().w(function(e){for(;;)switch(e.n){case 0:t=u.value,(n=[r.createElement(a.xP,{context:t.unit}),t.load,"".concat(t.active,"(").concat(t.sub,")"),r.createElement(a.xP,{context:t.description})]).push(r.createElement(p.rA,{icon:"place",title:"添加",onClick:function(){U(n)}})),c.push(n);case 1:return e.a(2)}},e)}),i.s();case 5:if((u=i.n()).done){e.n=7;break}return e.d(Re(l()),6);case 6:e.n=5;break;case 7:e.n=9;break;case 8:e.p=8,f=e.v,i.e(f);case 9:return e.p=9,i.f(),e.f(9);case 10:ut=c,T(c);case 11:return e.a(2)}},e,null,[[4,8,9,10]])}));return function(){return e.apply(this,arguments)}}(),ue=function(){var e=ot(Qe().m(function e(t){var n;return Qe().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,m.Yu.post("systemd/add",{unit_name:t});case 1:(n=e.v).code===y.m.Success&&(R(new Set(n.data)),(0,g.LW)("添加成功"));case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),le=function(){var t=ot(Qe().m(function t(n){var r;return Qe().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,m.Yu.post("systemd/get/context",{unit_name:n});case 1:(r=t.v).code===y.m.Success&&(ee({model:"text",open:!0,fileName:e.name,save:function(){var e=ot(Qe().m(function e(t){var n;return Qe().w(function(e){for(;;)switch(e.n){case 0:return n={context:t},"/"===r.data.path[0]&&(r.data.path=r.data.path.slice(1)),e.n=1,m.$M.post("save/".concat(r.data.path),n);case 1:e.v.code===y.m.Success&&(C.xK.set_value_temp(""),ee({open:!1,model:"",fileName:"",save:null}));case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}()}),C.xK.set_value_temp(r.data.context));case 2:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}();return r.createElement("div",null,r.createElement(d.A,{left_children:r.createElement(p.Z$,{defaultStatus:!1,text:t("系统systemd单元"),clickFun:function(e){L(e),e?(ie(),V([])):U([])}})},M.length>0&&r.createElement("div",null,M[1].props.context),K.length>0&&r.createElement("div",null,K[0].props.context),M.length>0&&r.createElement("div",null,n(F.oV.systemd_update)&&r.createElement(p.rA,{icon:"delete",title:"从实时监控删除",onClick:function(){ce(M[1].props.context)}}),r.createElement(p.rA,{icon:"print",title:"打印日志",onClick:function(){ne(M[1].props.context)}})),K.length>0&&r.createElement("div",null,n(F.oV.systemd_update)&&r.createElement(p.rA,{icon:"delete",title:"删除系统上的sytemd",onClick:function(){re(K[0].props.context)}}),r.createElement(p.rA,{icon:"print",title:"打印日志",onClick:function(){ne(K[0].props.context)}}),n(F.oV.systemd_update)&&r.createElement(p.rA,{icon:"text_fields",title:"sytemd文件内容",onClick:function(){le(K[0].props.context)}}),n(F.oV.systemd_update)&&!J.has(K[0].props.context)&&r.createElement(p.rA,{icon:"plus_one",title:"添加到管理",onClick:function(){return ue(K[0].props.context)}}))),r.createElement(o.xh,null,N&&r.createElement(o.fI,null,r.createElement(o.VP,{widthPer:80},r.createElement(a.uF,{title:"systemd系统单元(".concat(I.length,")"),titleCom:r.createElement(ae.Sm,{placeholder:"过滤单元",value:W,handleInputChange:function(e){B(e)},handlerEnter:function(){var e=[];if(W){var t,n=nt(ut);try{for(n.s();!(t=n.n()).done;){var r=t.value;(r[0].props.context.includes(W)||r[3].props.context.includes(W))&&e.push(r)}}catch(e){n.e(e)}finally{n.f()}T(e)}else T(ut)}})},r.createElement(h.X,{headers:k,rows:I,width:"10rem"})))),0===j.length&&!N&&r.createElement(oe,{context:"没有管理的单元 or 加载中请等待..."}),0!==j.length&&!N&&r.createElement(o.fI,null,r.createElement(o.VP,{widthPer:80},r.createElement(a.uF,{title:"filecat监控单元(".concat(j.length,")"),titleCom:r.createElement(ae.Sm,{placeholder:"过滤单元",value:X,handleInputChange:function(e){q(e)}})},r.createElement(h.X,{headers:_,rows:j,width:"10rem"}))))),r.createElement(De,null))}function st(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,c,i=[],u=!0,l=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return mt(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?mt(e,t):void 0}}(e,t)||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 mt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function dt(e){var t=(0,v.Bd)().t,n=st((0,b.L4)(E.A.user_base_info),2),a=n[0],c=(n[1],[{index:1,name:t("系统性能"),rto:"sys/"},{index:2,name:t("系统进程"),rto:"process/"},{index:3,name:t("docker容器"),rto:"docker/"}]);return a.sys===F.XM.linux&&c.push({index:4,name:t("systemd"),rto:"systemd/"}),r.createElement(o.W1,{optionList:c},r.createElement(re,null),r.createElement(Ue,null),r.createElement(Pe,null),r.createElement(ft,null))}}}]);