filecat 5.60.6 → 5.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/dist/10.c2c625264a1bc27d0420.js +1 -0
- package/build/dist/{133.0f5c2b4b21220468364e.js → 133.a2e4dbfe2f646d472b98.js} +1 -1
- package/build/dist/181.b5b4f3c7c421b22bc3fa.js +2 -0
- package/build/dist/{214.b5982f0f1d367b0cf250.js → 214.c7b5e98c50aad2e909e8.js} +2 -2
- package/build/dist/{247.024df5bffa6d7d81409b.js → 247.b933248752fc7a237d5b.js} +2 -2
- package/build/dist/{27.53a424e0af4ae35c9d08.js → 27.400b810abd623461be7e.js} +2 -2
- package/build/dist/29.ee4b96cc9795a102c731.js +2 -0
- package/build/dist/{296.ca2ea54f4a612600255d.js → 296.952ce4abf5d35c8dc178.js} +2 -2
- package/build/dist/308.0f217c7d43edf05d3ac1.js +2 -0
- package/build/dist/377.32be51b7963ecf7b83f9.js +2 -0
- package/build/dist/{402.e6e6f416b6be3f9c0544.js → 402.dd9739c901620fca148e.js} +2 -2
- package/build/dist/441.d5fac54c44eebe3daf39.js +2 -0
- package/build/dist/488.905be404d0c56f0670d6.js +2 -0
- package/build/dist/{502.ca82d5437c1f450f77d7.js → 502.1a98387d7790e9366c86.js} +2 -2
- package/build/dist/{53.497b03335da0f0ae730a.js → 53.a0c838b8cd37589229d5.js} +2 -2
- package/build/dist/{542.ac5f498510943d96bd1a.js → 542.8bb8a93ba9aa1759d85e.js} +2 -2
- package/build/dist/584.6d8d1690fa1c518714b0.js +2 -0
- package/build/dist/603.7217c0bd2aed442c0820.js +2 -0
- package/build/dist/636.545a51ee06d7662cb778.js +2 -0
- package/build/dist/659.c986fbf168c86fa50dba.js +2 -0
- package/build/dist/{661.bbe2069c38534a919223.js → 661.a2ef7762262fae92e102.js} +2 -2
- package/build/dist/690.8598c948f49bdc4ca810.js +2 -0
- package/build/dist/692.8925f59f0d91334c080a.js +1 -0
- package/build/dist/{704.93dd342435087dfa4c10.js → 704.0e40582259e36e16846a.js} +2 -2
- package/build/dist/714.a7a84494f1e9af1591db.js +2 -0
- package/build/dist/759.34df0c3c4b1e16503c04.js +2 -0
- package/build/dist/{811.b651f0b78f8dc24da0ff.js → 811.34161e8c46d2cfbcfbee.js} +2 -2
- package/build/dist/84.767fd7469c802f1c80e8.js +2 -0
- package/build/dist/{903.90782cbd7ea1a83206e3.js → 903.2a636ed6c19c1ba80fa5.js} +1 -1
- package/build/dist/{91.85d2728c06c427bf4e25.js → 91.6bfd78afec8b2d3019c0.js} +1 -1
- package/build/dist/923.a891a3ec75714080e9aa.js +1 -0
- package/build/dist/931.f0add425e14d73f96d15.js +2 -0
- package/build/dist/{943.21f95e5852b774d5ea50.js → 943.fea147e0e3caf1edfa71.js} +2 -2
- package/build/dist/{962.b57a462fb415d5f3a8af.js → 962.a01d935236eddfcd5325.js} +2 -2
- package/build/dist/963.516a1438dea44de07374.js +2 -0
- package/build/dist/963.516a1438dea44de07374.js.LICENSE.txt +1 -0
- package/build/dist/index.html +1 -1
- package/build/dist/main.2ee3bb9c4631148448f6.js +2 -0
- package/build/main.js +1 -1
- package/package.json +1 -1
- package/build/dist/10.3cae34a0a51efbbdf037.js +0 -1
- package/build/dist/181.802385cb2535220f3821.js +0 -2
- package/build/dist/29.33dd0fc62ee34750a9a6.js +0 -2
- package/build/dist/308.4381e0f200ac6fa45936.js +0 -2
- package/build/dist/377.e2490b44f0ff85fdcb8c.js +0 -2
- package/build/dist/441.415bad44726b9147d451.js +0 -2
- package/build/dist/584.ed8e90c60b6bb075b893.js +0 -2
- package/build/dist/603.000b1e7fabd563443b56.js +0 -2
- package/build/dist/636.7baec6fc866ed96dab0d.js +0 -2
- package/build/dist/659.f7dbe6534e8eea39b69a.js +0 -2
- package/build/dist/690.86d5623d460512252951.js +0 -2
- package/build/dist/759.7e32f38374a01f5957ff.js +0 -2
- package/build/dist/84.b2f4bbd47cc661ac6c05.js +0 -2
- package/build/dist/916.9613bd081a0e66ce4683.js +0 -1
- package/build/dist/923.b91c334a82f869e8419e.js +0 -1
- package/build/dist/931.e442bfb7b59e3e241c55.js +0 -2
- package/build/dist/963.fbce0a4701e26f2746df.js +0 -2
- package/build/dist/984.a6ec3f5b3d39e3265ad7.js +0 -2
- package/build/dist/main.eed3c487b877c12bb0f8.js +0 -2
- /package/build/dist/{181.802385cb2535220f3821.js.LICENSE.txt → 181.b5b4f3c7c421b22bc3fa.js.LICENSE.txt} +0 -0
- /package/build/dist/{214.b5982f0f1d367b0cf250.js.LICENSE.txt → 214.c7b5e98c50aad2e909e8.js.LICENSE.txt} +0 -0
- /package/build/dist/{247.024df5bffa6d7d81409b.js.LICENSE.txt → 247.b933248752fc7a237d5b.js.LICENSE.txt} +0 -0
- /package/build/dist/{27.53a424e0af4ae35c9d08.js.LICENSE.txt → 27.400b810abd623461be7e.js.LICENSE.txt} +0 -0
- /package/build/dist/{29.33dd0fc62ee34750a9a6.js.LICENSE.txt → 29.ee4b96cc9795a102c731.js.LICENSE.txt} +0 -0
- /package/build/dist/{296.ca2ea54f4a612600255d.js.LICENSE.txt → 296.952ce4abf5d35c8dc178.js.LICENSE.txt} +0 -0
- /package/build/dist/{308.4381e0f200ac6fa45936.js.LICENSE.txt → 308.0f217c7d43edf05d3ac1.js.LICENSE.txt} +0 -0
- /package/build/dist/{377.e2490b44f0ff85fdcb8c.js.LICENSE.txt → 377.32be51b7963ecf7b83f9.js.LICENSE.txt} +0 -0
- /package/build/dist/{402.e6e6f416b6be3f9c0544.js.LICENSE.txt → 402.dd9739c901620fca148e.js.LICENSE.txt} +0 -0
- /package/build/dist/{441.415bad44726b9147d451.js.LICENSE.txt → 441.d5fac54c44eebe3daf39.js.LICENSE.txt} +0 -0
- /package/build/dist/{502.ca82d5437c1f450f77d7.js.LICENSE.txt → 488.905be404d0c56f0670d6.js.LICENSE.txt} +0 -0
- /package/build/dist/{53.497b03335da0f0ae730a.js.LICENSE.txt → 502.1a98387d7790e9366c86.js.LICENSE.txt} +0 -0
- /package/build/dist/{542.ac5f498510943d96bd1a.js.LICENSE.txt → 53.a0c838b8cd37589229d5.js.LICENSE.txt} +0 -0
- /package/build/dist/{584.ed8e90c60b6bb075b893.js.LICENSE.txt → 542.8bb8a93ba9aa1759d85e.js.LICENSE.txt} +0 -0
- /package/build/dist/{603.000b1e7fabd563443b56.js.LICENSE.txt → 584.6d8d1690fa1c518714b0.js.LICENSE.txt} +0 -0
- /package/build/dist/{636.7baec6fc866ed96dab0d.js.LICENSE.txt → 603.7217c0bd2aed442c0820.js.LICENSE.txt} +0 -0
- /package/build/dist/{659.f7dbe6534e8eea39b69a.js.LICENSE.txt → 636.545a51ee06d7662cb778.js.LICENSE.txt} +0 -0
- /package/build/dist/{661.bbe2069c38534a919223.js.LICENSE.txt → 659.c986fbf168c86fa50dba.js.LICENSE.txt} +0 -0
- /package/build/dist/{690.86d5623d460512252951.js.LICENSE.txt → 661.a2ef7762262fae92e102.js.LICENSE.txt} +0 -0
- /package/build/dist/{704.93dd342435087dfa4c10.js.LICENSE.txt → 690.8598c948f49bdc4ca810.js.LICENSE.txt} +0 -0
- /package/build/dist/{759.7e32f38374a01f5957ff.js.LICENSE.txt → 704.0e40582259e36e16846a.js.LICENSE.txt} +0 -0
- /package/build/dist/{811.b651f0b78f8dc24da0ff.js.LICENSE.txt → 714.a7a84494f1e9af1591db.js.LICENSE.txt} +0 -0
- /package/build/dist/{84.b2f4bbd47cc661ac6c05.js.LICENSE.txt → 759.34df0c3c4b1e16503c04.js.LICENSE.txt} +0 -0
- /package/build/dist/{931.e442bfb7b59e3e241c55.js.LICENSE.txt → 811.34161e8c46d2cfbcfbee.js.LICENSE.txt} +0 -0
- /package/build/dist/{962.b57a462fb415d5f3a8af.js.LICENSE.txt → 84.767fd7469c802f1c80e8.js.LICENSE.txt} +0 -0
- /package/build/dist/{963.fbce0a4701e26f2746df.js.LICENSE.txt → 931.f0add425e14d73f96d15.js.LICENSE.txt} +0 -0
- /package/build/dist/{943.21f95e5852b774d5ea50.js.LICENSE.txt → 943.fea147e0e3caf1edfa71.js.LICENSE.txt} +0 -0
- /package/build/dist/{984.a6ec3f5b3d39e3265ad7.js.LICENSE.txt → 962.a01d935236eddfcd5325.js.LICENSE.txt} +0 -0
- /package/build/dist/{main.eed3c487b877c12bb0f8.js.LICENSE.txt → main.2ee3bb9c4631148448f6.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 488.905be404d0c56f0670d6.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[91,488],{447(e,t,n){n.d(t,{WA:()=>v,ZI:()=>y,Zp:()=>f,fq:()=>b,gz:()=>p,uF:()=>m,xP:()=>d});var r=n(6540),o=n(3413),l=n.n(o),a=n(505);function c(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,l,a,c=[],i=!0,u=!1;try{if(l=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;i=!1}else for(;!(i=(r=l.call(n)).done)&&(c.push(r.value),c.length!==t);i=!0);}catch(e){u=!0,o=e}finally{try{if(!i&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(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)?i(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 i(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 e[e.common=0]="common",e[e.full=1]="full",e}(u||{});function s(e,t){var n=t===u.common?"card-content":t===u.full?"card-content full":"";return r.createElement("div",{className:"card",style:{}},r.createElement("div",{className:"card-title"},e.self_title?e.self_title:r.createElement("h2",null,e.title),r.createElement("div",{className:"not-select-div"},e.titleCom&&e.titleCom)),r.createElement("div",{className:n},e.children),r.createElement("div",{className:"card-action card-action-bottom-right"},e.rightBottomCom))}function f(e){return s(e,u.common)}function m(e){return s(e,u.full)}function d(e){var t,n,o,c=(0,r.useRef)(null);return r.createElement("div",{className:"card-text"},r.createElement("div",{className:"card-text-context"},null!==(t=e.context)&&void 0!==t?t:e.children),r.createElement("div",{className:"card-text-tip",ref:c,onClick:function(){var t,n;(0,a.lW)(null!==(t=null!==(n=e.tip_context)&&void 0!==n?n:e.context)&&void 0!==t?t:e.children),new(l())({type:"info",text:"复制完成",timeout:1e3,layout:"bottomLeft"}).show()}},null!==(n=null!==(o=e.tip_context)&&void 0!==o?o:e.context)&&void 0!==n?n:e.children))}function v(e){var t,n;return r.createElement("div",{className:"card-text"},r.createElement("div",{className:"card-text-context"},null!==(t=e.context)&&void 0!==t?t:e.children),r.createElement("div",{className:"card-text-tip"},null!==(n=e.context)&&void 0!==n?n:e.children))}function y(e){var t,n;return r.createElement("div",{className:"card floating",onKeyPress:function(t){"Enter"===t.key&&e.confirm_enter&&e.confirm_enter()}},r.createElement("div",{className:"card-title"},r.createElement("h2",null,e.title)),r.createElement("div",{className:"card-content"},e.context&&Array.isArray(e.context)?e.context.map(function(e,t){return r.createElement(r.Fragment,{key:t},e)}):e.context),r.createElement("div",{className:"card-action"},r.createElement("button",{className:"button button--flat button--grey",onClick:e.cancel},null!==(t=e.cancel_t)&&void 0!==t?t:"cancel"),r.createElement("button",{className:"button button--flat",onClick:e.confirm},null!==(n=e.confirm_t)&&void 0!==n?n:"confirm")))}function p(e){return r.createElement("div",{className:"progress-card"},r.createElement("div",{className:"progress-per"},r.createElement("div",{style:{width:"".concat(e.progress,"%")}})))}var b=function(e){var t=c((0,r.useState)("var(--iconTertiary)"),2),n=t[0],o=t[1];(0,r.useEffect)(function(){null==e.ok?null==e.success?null!=e.running&&o("var(--icon-yellow)"):!0===e.success?o("var(--icon-green)"):!1===e.success&&o("var(--icon-red)"):o(e.ok?"var(--icon-green)":"var(--iconTertiary)")},[e]);var l={width:"10px",height:"10px",borderRadius:"50%",backgroundColor:n,display:"inline-block"};return r.createElement("div",{style:l})}},7481(e,t,n){n.d(t,{S:()=>c,X:()=>a});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,l,a,c=[],i=!0,u=!1;try{if(l=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;i=!1}else for(;!(i=(r=l.call(n)).done)&&(c.push(r.value),c.length!==t);i=!0);}catch(e){u=!0,o=e}finally{try{if(!i&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(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)?l(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 l(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 a(e){var t,n=o(r.useState([]),2),l=n[0],a=n[1];return(0,r.useEffect)(function(){e.children?a(Array.isArray(e.children)?e.children:[e.children]):a(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,l.map(function(t,n){return r.createElement("tr",{key:n,onContextMenu:function(){e.handleContextMenu&&e.handleContextMenu(t)}},t.map(function(n,o){var l;return r.createElement("td",{style:{width:null!==(l=e.width)&&void 0!==l?l:"auto"},key:o,className:o===t.length-1?"small":""},n)}))})))}function c(e){return r.createElement("div",{style:{display:e.isFlex?"flex":"block"}},e.columns.map(function(e,t){return r.createElement("div",{key:t},e)}))}},4091(e,t,n){n.r(t),n.d(t,{default:()=>y});var r=n(6540),o=n(952),l=(n(2327),n(1766),n(4854),n(8),n(846),n(975),n(4286),n(766),n(1234),n(7507),n(7268),n(4522)),a=n.n(l),c=n(7444),i=n(6417),u=n(8247);function s(e){return s="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},s(e)}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function m(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==s(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(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,l,a,c=[],i=!0,u=!1;try{if(l=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;i=!1}else for(;!(i=(r=l.call(n)).done)&&(c.push(r.value),c.length!==t);i=!0);}catch(e){u=!0,o=e}finally{try{if(!i&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return v(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)?v(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 v(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 y(e){var t=(0,r.useRef)(null),n=d((0,c.L4)(i.AG.user_base_info),2),l=n[0],s=(n[1],"dark"===l.user_data.theme?"cloud_editor_dark":"cloud9_day");return(0,r.useEffect)(function(){var n,r,l=o.edit(t.current,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach(function(t){m(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({value:u.xK.get_value_temp(e.editor_id),showPrintMargin:!1,theme:"ace/theme/".concat(s),mode:null!==(n=e.model)&&void 0!==n?n:a().getModeForPath(null!==(r=e.name)&&void 0!==r?r:"").mode,wrap:!1,highlightActiveLine:!1,fontSize:14},e.options));return l.setOptions({}),l.container.addEventListener("wheel",function(e){e.preventDefault()}),l.focus(),l.on("change",function(t){e.on_change&&e.on_change()}),t.current=l,l.formatCode=function(){var e=o.require("ace/ext/beautify"),n=t.current;n&&e.beautify(n.session)},u.xK.set_editor_temp(l,e.editor_id),function(){u.xK.delete_editor_temp(e.editor_id),l.destroy()}},[]),r.createElement("div",{ref:t,style:{height:"100%",width:"100%"}})}o.config.set("basePath","https://gcore.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/")),o.config.set("modePath","https://gcore.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/")),o.config.set("themePath","https://gcore.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/")),o.config.set("workerPath","https://gcore.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/")),o.config.set("basePath","https://gcore.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/"))},4488(e,t,n){n.r(t),n.d(t,{default:()=>E});var r=n(6540),o=n(7952),l=n(5997),a=n(4284),c=n(7767),i=n(7481),u=n(447),s=n(7444),f=n(6417),m=n(4091),d=n(8247);function v(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function l(n,r,o,l){var i=r&&r.prototype instanceof c?r:c,u=Object.create(i.prototype);return y(u,"_invoke",function(n,r,o){var l,c,i,u=0,s=o||[],f=!1,m={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return l=t,c=0,i=e,m.n=n,a}};function d(n,r){for(c=n,i=r,t=0;!f&&u&&!o&&t<s.length;t++){var o,l=s[t],d=m.p,v=l[2];n>3?(o=v===r)&&(i=l[(c=l[4])?5:(c=3,3)],l[4]=l[5]=e):l[0]<=d&&((o=n<2&&d<l[1])?(c=0,m.v=r,m.n=l[1]):d<v&&(o=n<3||l[0]>r||r>v)&&(l[4]=n,l[5]=r,m.n=v,c=0))}if(o||n>1)return a;throw f=!0,r}return function(o,s,v){if(u>1)throw TypeError("Generator is already running");for(f&&1===s&&d(s,v),c=s,i=v;(t=c<2?e:i)||!f;){l||(c?c<3?(c>1&&(m.n=-1),d(c,i)):m.n=i:m.v=i);try{if(u=2,l){if(c||(o="next"),t=l[o]){if(!(t=t.call(l,i)))throw TypeError("iterator result is not an object");if(!t.done)return t;i=t.value,c<2&&(c=0)}else 1===c&&(t=l.return)&&t.call(l),c<2&&(i=TypeError("The iterator does not provide a '"+o+"' method"),c=1);l=e}else if((t=(f=m.n<0)?i:n.call(r,m))!==a)break}catch(t){l=e,c=1,i=t}finally{u=1}}return{value:t,done:f}}}(n,o,l),!0),u}var a={};function c(){}function i(){}function u(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(y(t={},r,function(){return this}),t),f=u.prototype=c.prototype=Object.create(s);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,y(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return i.prototype=u,y(f,"constructor",u),y(u,"constructor",i),i.displayName="GeneratorFunction",y(u,o,"GeneratorFunction"),y(f),y(f,o,"Generator"),y(f,r,function(){return this}),y(f,"toString",function(){return"[object Generator]"}),(v=function(){return{w:l,m}})()}function y(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}y=function(e,t,n,r){function l(t,n){y(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:(l("next",0),l("throw",1),l("return",2))},y(e,t,n,r)}function p(e,t,n,r,o,l,a){try{var c=e[l](a),i=c.value}catch(e){return void n(e)}c.done?t(i):Promise.resolve(i).then(r,o)}function b(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,l,a,c=[],i=!0,u=!1;try{if(l=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;i=!1}else for(;!(i=(r=l.call(n)).done)&&(c.push(r.value),c.length!==t);i=!0);}catch(e){u=!0,o=e}finally{try{if(!i&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return h(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)?h(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 h(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 g(e){return g="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},g(e)}function E(){var e,t,n,y,h=(0,c.Zp)(),E=b((0,s.L4)(f.AG.sqlite_query_context),1)[0],_=(0,r.useMemo)(function(){var e;return null!==(e=null==E?void 0:E.path)&&void 0!==e?e:""},[null==E?void 0:E.path]),w=(0,r.useMemo)(function(){return null!=E&&E.path?"".concat((null==E?void 0:E.name)||"数据库"," | ").concat(E.path):"未选择数据库"},[null==E?void 0:E.name,null==E?void 0:E.path]),S=97,x=b((0,r.useState)(""),2),j=x[0],O=x[1],k=b((0,r.useState)("table"),2),A=k[0],N=k[1],P=b((0,r.useState)(!1),2),C=P[0],q=P[1],I=b((0,r.useState)(""),2),M=I[0],T=I[1],F=b((0,r.useState)(null),2),K=F[0],G=F[1];(0,r.useEffect)(function(){d.xK.set_value_temp(j,S)},[j]),(0,r.useEffect)(function(){O(""),T(""),G(null),N("table"),d.xK.set_value_temp("",S),_||T("请先从文件右键打开一个数据库")},[_,null==E?void 0:E.open]);var L=function(){var e,t=(e=v().m(function e(){var t,n,r,o,l;return v().w(function(e){for(;;)switch(e.p=e.n){case 0:if(n=(null!==(t=d.xK.get_editor_value(S))&&void 0!==t?t:j).trim(),_){e.n=1;break}return T("请先从文件右键打开一个数据库"),G(null),e.a(2);case 1:if(n){e.n=2;break}return T("请输入 SQL 语句"),G(null),e.a(2);case 2:return q(!0),T(""),e.p=3,e.n=4,a.$M.post("sqlite/query",{path:_,sql:n});case 4:r=e.v,G(r.data),N("table"),e.n=6;break;case 5:e.p=5,l=e.v,T(null!==(o=null==l?void 0:l.message)&&void 0!==o?o:"".concat(l)),G(null);case 6:return e.p=6,q(!1),e.f(6);case 7:return e.a(2)}},e,null,[[3,5,6,7]])}),function(){var t=this,n=arguments;return new Promise(function(r,o){var l=e.apply(t,n);function a(e){p(l,r,o,a,c,"next",e)}function c(e){p(l,r,o,a,c,"throw",e)}a(void 0)})});return function(){return t.apply(this,arguments)}}(),D=null!=K&&null!==(e=K.columns)&&void 0!==e&&e.length?K.columns:Object.keys(null!==(t=null==K||null===(n=K.rows)||void 0===n?void 0:n[0])&&void 0!==t?t:{}),J=(null!==(y=null==K?void 0:K.rows)&&void 0!==y?y:[]).map(function(e){return D.map(function(t){return null==(n=e[t])?"":"object"===g(n)?JSON.stringify(n):"".concat(n);var n})});return r.createElement("div",{className:"db-query-page"},r.createElement(o.A,{ignore_tags:!0,left_children:[r.createElement(l.rA,{key:"back",icon:"arrow_back",title:"返回",onClick:function(){return h(-1)}}),r.createElement(l.rA,{key:"run",icon:"play_arrow",title:"执行",onClick:L}),r.createElement(l.rA,{key:"table",icon:"table_chart",title:"表格视图",onClick:function(){return N("table")}}),r.createElement(l.rA,{key:"json",icon:"data_object",title:"原 JSON",onClick:function(){return N("json")}})],children:r.createElement(u.xP,{context:w,tip_context:"点击复制数据库信息"})}),r.createElement("div",{className:"db-query-page__content"},r.createElement(u.Zp,{title:"SQL 查询",rightBottomCom:r.createElement("div",{className:"db-query-page__actions"},r.createElement(l.C3,{text:C?"查询中...":"执行查询",clickFun:L}),r.createElement(l.C3,{text:"清空",clickFun:function(){d.xK.set_value_temp("",S);var e=d.xK.get_editor(S);e&&e.setValue("",-1),O("")}}),r.createElement(l.C3,{text:"table"===A?"表格视图":"切换到表格",clickFun:function(){return N("table")}}),r.createElement(l.C3,{text:"json"===A?"原 JSON":"切换到 JSON",clickFun:function(){return N("json")}}))},r.createElement("div",{className:"db-query-page__editor"},r.createElement(m.default,{name:"sqlite.sql",editor_id:S,model:"ace/mode/sql",on_change:function(){var e,t=null!==(e=d.xK.get_editor_value(S))&&void 0!==e?e:"";O(t)},options:{showPrintMargin:!1,highlightActiveLine:!0,wrap:!0}})),M&&r.createElement("div",{className:"db-query-page__error"},M)),r.createElement(u.Zp,{title:"查询结果",titleCom:r.createElement("span",null,K?"".concat(K.row_count," 行"):"暂无结果")},K&&"table"===A&&r.createElement(i.X,{headers:D,rows:J}),K&&"json"===A&&r.createElement("pre",{className:"db-query-page__result-json"},JSON.stringify(K.rows,null,2)),!K&&!M&&r.createElement("div",{className:"db-query-page__hint"},"先输入查询语句,再执行。支持 `select`、`with`、`pragma`、`explain`。"),!K&&M&&r.createElement("div",{className:"db-query-page__hint"},M))))}}}]);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! For license information please see 502.
|
|
2
|
-
(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[502,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)}()},4694(t,e,n){"use strict";function r(t){return function(t){if(Array.isArray(t))return a(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 i(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 a,l=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return l=t.done,t},e:function(t){s=!0,a=t},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw a}}}}function o(t,e){if(t){if("string"==typeof t)return a(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)?a(t,e):void 0}}function a(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 l(t,e){var n=s(t,e);return null===n||n===t.length-1?t[0]:t[n+1]}function s(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return null}function c(t,e){var n=s(t,e);return null===n?null:t[n]}function u(t){if(!t)return{};var e,n,r,o=i(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;(void 0===e||e<a)&&(e=a),(void 0===n||n>a)&&(n=a)}}catch(t){o.e(t)}finally{o.f()}return{max:e,min:n}}function f(t,e){var n=t.indexOf(e),i=r(t);return i.splice(n,1),i}function h(){for(var t="",e=0;e<arguments.length;e++){var n=e<0||arguments.length<=e?void 0:arguments[e];0===e?("/"!==n[0]&&(n="/"+n),"/"!==n[n.length-1]&&(n+="/")):e===arguments.length-1?"/"!==n[n.list-1]&&-1===n.indexOf(".")&&(n+="/"):("/"===n[0]&&(n=n.slice(1,n.length-1)),"/"!==n[n.length-1]&&(n+="/")),t+=n}return t}function d(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(var r=e[0],i=1;i<e.length;i++)"/"!==e[i][e[i].length-1]?r+="/"+e[i]:r+=e[i];return r}function p(t,e){var n,r=[],o=i(e);try{for(o.s();!(n=o.n()).done;){var a=n.value;r.push(t[a])}}catch(t){o.e(t)}finally{o.f()}return r}function m(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t||0===t.length)return t;for(var r=0;r<t.length;r++)for(var i=t.length-1;i>r;i--){var o=e?e(t[i]):t[i],a=e?e(t[i-1]):t[i-1],l=t[i];o<a?n&&(t[i]=t[i-1],t[i-1]=l):o>a&&(n||(t[i]=t[i-1],t[i-1]=l))}return t}function v(t,e){if(0===t.length)return null;var n,r,i=(n=0,r=t.length,n===r?-1:Math.floor(Math.random()*(r-n))+n);return e&&i===e?v(t,e):t[i]}function b(t,e){if(e)for(var n=0;n<t.length;n++)if(e(t[n]))return t.splice(n,1)[0]}n.d(e,{Bd:()=>p,HS:()=>d,I:()=>b,IO:()=>h,Lr:()=>v,P1:()=>f,a7:()=>u,di:()=>m,jH:()=>l,kW:()=>c})},447(t,e,n){"use strict";n.d(e,{WA:()=>p,ZI:()=>m,Zp:()=>f,fq:()=>b,gz:()=>v,uF:()=>h,xP:()=>d});var r=n(6540),i=n(3413),o=n.n(i),a=n(505);function l(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,l=[],s=!0,c=!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)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return s(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)?s(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 s(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}var c=function(t){return t[t.common=0]="common",t[t.full=1]="full",t}(c||{});function u(t,e){var n=e===c.common?"card-content":e===c.full?"card-content full":"";return r.createElement("div",{className:"card",style:{}},r.createElement("div",{className:"card-title"},t.self_title?t.self_title:r.createElement("h2",null,t.title),r.createElement("div",{className:"not-select-div"},t.titleCom&&t.titleCom)),r.createElement("div",{className:n},t.children),r.createElement("div",{className:"card-action card-action-bottom-right"},t.rightBottomCom))}function f(t){return u(t,c.common)}function h(t){return u(t,c.full)}function d(t){var e,n,i,l=(0,r.useRef)(null);return r.createElement("div",{className:"card-text"},r.createElement("div",{className:"card-text-context"},null!==(e=t.context)&&void 0!==e?e:t.children),r.createElement("div",{className:"card-text-tip",ref:l,onClick:function(){var e,n;(0,a.lW)(null!==(e=null!==(n=t.tip_context)&&void 0!==n?n:t.context)&&void 0!==e?e:t.children),new(o())({type:"info",text:"复制完成",timeout:1e3,layout:"bottomLeft"}).show()}},null!==(n=null!==(i=t.tip_context)&&void 0!==i?i:t.context)&&void 0!==n?n:t.children))}function p(t){var e,n;return r.createElement("div",{className:"card-text"},r.createElement("div",{className:"card-text-context"},null!==(e=t.context)&&void 0!==e?e:t.children),r.createElement("div",{className:"card-text-tip"},null!==(n=t.context)&&void 0!==n?n:t.children))}function m(t){var e,n;return r.createElement("div",{className:"card floating",onKeyPress:function(e){"Enter"===e.key&&t.confirm_enter&&t.confirm_enter()}},r.createElement("div",{className:"card-title"},r.createElement("h2",null,t.title)),r.createElement("div",{className:"card-content"},t.context&&Array.isArray(t.context)?t.context.map(function(t,e){return r.createElement(r.Fragment,{key:e},t)}):t.context),r.createElement("div",{className:"card-action"},r.createElement("button",{className:"button button--flat button--grey",onClick:t.cancel},null!==(e=t.cancel_t)&&void 0!==e?e:"cancel"),r.createElement("button",{className:"button button--flat",onClick:t.confirm},null!==(n=t.confirm_t)&&void 0!==n?n:"confirm")))}function v(t){return r.createElement("div",{className:"progress-card"},r.createElement("div",{className:"progress-per"},r.createElement("div",{style:{width:"".concat(t.progress,"%")}})))}var b=function(t){var e=l((0,r.useState)("var(--iconTertiary)"),2),n=e[0],i=e[1];(0,r.useEffect)(function(){null==t.ok?null==t.success?null!=t.running&&i("var(--icon-yellow)"):!0===t.success?i("var(--icon-green)"):!1===t.success&&i("var(--icon-red)"):i(t.ok?"var(--icon-green)":"var(--iconTertiary)")},[t]);var o={width:"10px",height:"10px",borderRadius:"50%",backgroundColor:n,display:"inline-block"};return r.createElement("div",{style:o})}},3033(t,e,n){"use strict";n.d(e,{$Z:()=>f,GL:()=>b,Sm:()=>d,U6:()=>v,cA:()=>p,l6:()=>m});var r=n(6540),i=n(5219),o=n.n(i);n(9145);function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function l(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=s(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==s(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function c(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,l=[],s=!0,c=!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)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return u(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)?u(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function f(t){var e=(0,r.useRef)(null),n=c(r.useState(""),2),i=n[0],o=n[1];return(0,r.useEffect)(function(){var n=t.value;null==n&&(n=""),e.current.value=n,o(t.value||"")},[t.value]),r.createElement("div",{id:"search",className:"",style:{maxWidth:t.max_width,display:t.not_mobile?"block":void 0}},r.createElement("div",{id:"input"},r.createElement("i",{className:"material-icons"},t.icon),r.createElement("input",{type:"text",ref:e,placeholder:i||t.placeholder,onChange:function(e){t.handleInputChange&&t.handleInputChange(e.target.value,e.target),o(e.target.value)},onKeyPress:function(e){"Enter"===e.key&&t.handleEnterPress&&t.handleEnterPress()}})))}function h(t){var e=(0,r.useRef)(null),n=c(r.useState(""),2),i=n[0],a=n[1],l=c(r.useState("input input--block awesomplete"),2),u=l[0],f=l[1];(0,r.useEffect)(function(){a(null==t.value?"":t.value),t.focus&&e.current&&e.current.focus(),t.no_border&&f("input input--block awesomplete input--no_border")},[t.value,t.focus,t.no_border]);var h=(0,r.useRef)(t.handleInputChange);return(0,r.useEffect)(function(){h.current=t.handleInputChange},[t.handleInputChange]),(0,r.useEffect)(function(){if(null!=t.options&&e.current){var n=t.options.map(function(t){return"object"===s(t)&&null!==t?{label:t.label,value:t.value}:String(t)}),r=new(o())(e.current,{list:n,minChars:0,autoFirst:!0}),i=function(){var t;null===(t=e.current)||void 0===t||t.dispatchEvent(new Event("input"))},l=function(t){var n,r,i,o=null!==(n=null!==(r=t.text.label)&&void 0!==r?r:t.text.value)&&void 0!==n?n:t.text,l=null!==(i=t.text.value)&&void 0!==i?i:t.text;a(o),requestAnimationFrame(function(){e.current&&(e.current.value=o)}),h.current&&h.current(l,e.current)};return e.current.addEventListener("focus",i),e.current.addEventListener("awesomplete-selectcomplete",l),function(){e.current&&(e.current.removeEventListener("focus",i),e.current.removeEventListener("awesomplete-selectcomplete",l)),r.destroy()}}},[t.options]),r.createElement(r.Fragment,null,t.placeholderOut&&r.createElement("p",null,t.placeholderOut),r.createElement("div",{style:{display:"flex",alignItems:"center",width:t.width,maxWidth:t.maxWidth}},t.left_placeholder&&r.createElement("div",{style:{flex:"0 0 auto",marginRight:"4px"}},t.left_placeholder),r.createElement("input",{style:{flex:1,minWidth:0},onClick:function(t){return t.stopPropagation()},disabled:!!t.disabled,className:u,type:t.type,placeholder:t.placeholder,onChange:function(e){var n=e.target.value;a(n),t.handleInputChange&&t.handleInputChange(n,e.target)},onKeyPress:function(e){"Enter"===e.key&&t.handlerEnter&&t.handlerEnter(e.currentTarget.value)},value:i,ref:e}),t.right_placeholder&&r.createElement("div",{style:{flex:"0 0 auto",marginLeft:"4px"}},t.right_placeholder)))}function d(t){return h(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach(function(e){l(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},t))}function p(t){return h({placeholder:t.placeholder,type:"password",handleInputChange:t.handleInputChange,handlerEnter:t.handleEnterPress,maxWidth:t.maxWidth,width:t.width,value:t.value})}function m(t){return r.createElement("div",{style:{display:"flex"}},t.tip&&r.createElement("p",{className:"input input_left "},t.tip),r.createElement("select",{defaultValue:t.defaultValue,value:t.value,style:{width:t.width},disabled:!!t.disabled,className:"input input--block ".concat(t.no_border?"input--no_border":""),onChange:function(e){return t.onChange(e.target.value)}},t.options.map(function(t,e){return r.createElement("option",{key:e,value:t.value},t.title)})))}function v(t){var e;return r.createElement("div",{className:"input_radio_row"},r.createElement("input",{type:"radio",checked:t.selected,name:null!==(e=t.name)&&void 0!==e?e:"common_name",value:t.value,className:"input_radio",onChange:function(){t.onchange&&t.onchange(t.value)}}),t.context)}function b(t){var e,n=c((0,r.useState)(!1),2),i=n[0],o=n[1];return(0,r.useEffect)(function(){o(!!t.selected)},[t.selected]),r.createElement("div",{className:"input_radio_row"},r.createElement("input",{type:"checkbox",disabled:null!==(e=t.is_disable)&&void 0!==e&&e,checked:i,onChange:function(){t.onchange&&t.onchange()}}),t.context)}},2502(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>P});var r=n(6540),i=n(4188),o=n(4944),a=n(7444),l=n(6417),s=n(7952),c=n(5997),u=n(7022),f=n(4289),h=n(2042),d=n(3033),p=n(2389),m=n(4694),v=n(447);function b(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=A(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,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function g(t){return function(t){if(Array.isArray(t))return k(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||A(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 y(){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 l?r:l,c=Object.create(s.prototype);return x(c,"_invoke",function(n,r,i){var o,l,s,c=0,u=i||[],f=!1,h={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,n){return o=e,l=0,s=t,h.n=n,a}};function d(n,r){for(l=n,s=r,e=0;!f&&c&&!i&&e<u.length;e++){var i,o=u[e],d=h.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=d&&((i=n<2&&d<o[1])?(l=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,l=0))}if(i||n>1)return a;throw f=!0,r}return function(i,u,p){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&d(u,p),l=u,s=p;(e=l<2?t:s)||!f;){o||(l?l<3?(l>1&&(h.n=-1),d(l,s)):h.n=s:h.v=s);try{if(c=2,o){if(l||(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,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(f=h.n<0)?s:n.call(r,h))!==a)break}catch(e){o=t,l=1,s=e}finally{c=1}}return{value:e,done:f}}}(n,i,o),!0),c}var a={};function l(){}function s(){}function c(){}e=Object.getPrototypeOf;var u=[][r]?e(e([][r]())):(x(e={},r,function(){return this}),e),f=c.prototype=l.prototype=Object.create(u);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,x(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return s.prototype=c,x(f,"constructor",c),x(c,"constructor",s),s.displayName="GeneratorFunction",x(c,i,"GeneratorFunction"),x(f),x(f,i,"Generator"),x(f,r,function(){return this}),x(f,"toString",function(){return"[object Generator]"}),(y=function(){return{w:o,m:h}})()}function x(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}x=function(t,e,n,r){function o(e,n){x(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))},x(t,e,n,r)}function _(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function w(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){_(o,r,i,a,l,"next",t)}function l(t){_(o,r,i,a,l,"throw",t)}a(void 0)})}}function E(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,l=[],s=!0,c=!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)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(t,e)||A(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(t,e){if(t){if("string"==typeof t)return k(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)?k(t,e):void 0}}function k(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}var S,C=300,O=!1,I=0,T=!0,N=[],j=-1,L=[];function P(t){var e=E((0,a.L4)(l.A.log_viewer),2),n=e[0],x=e[1],_=(0,r.useRef)(null),A=E((0,r.useState)(0),2),k=A[0],P=A[1],R=E((0,r.useState)(100),2),H=R[0],M=R[1],D=E((0,r.useState)(!1),2),F=D[0],z=D[1],$=E((0,r.useState)(""),2),W=$[0],G=$[1],K=E((0,r.useState)(0),2),B=K[0],q=K[1],U=E((0,r.useState)(0),2),X=U[0],Z=U[1],Y=E((0,r.useState)(0),2),V=(Y[0],Y[1]),J=(0,p.Bd)().t,Q=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4?arguments[4]:void 0,o=document.createElement("div");return-1===j?o.textContent=t:o.innerHTML=t,o.style.whiteSpace="pre-wrap",o.style.overflowWrap="break-word",o.setAttribute("position","".concat(e)),o.setAttribute("start_position","".concat(n)),r?(_.current.insertBefore(o,i),N.unshift(o)):(_.current.appendChild(o),N.push(o)),o},tt=function(t){var e=(0,m.I)(N,function(e){return e===t});e&&_.current.removeChild(e)},et=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(t){var i=Array.isArray(t)?t:t.split("\n");if(r){for(var o,a=0;a<i.length;a++)o=Q(i[a],e[a],n[a],!0,0===a?_.current.firstChild:o);if(N.length>C)for(var l=N.length-1;l>=C;)tt(N[N.length-1]),l--}else{for(var s=0;s<i.length;s++)Q(i[s],e[s],n[s]);if(N.length>C)for(var c=N.length-C;c>0;)tt(N[0]),c--}}},nt=function(){var t=w(y().m(function t(){var e,r,a,l,s;return y().w(function(t){for(;;)switch(t.n){case 0:return S.encoding=n.encoding,S.context="",t.n=1,o.ws.sendData(i.HK.log_viewer,S);case 1:if(e=t.v){if(r=e.context,S=r,r.find_back_enter_index&&r.context_list.length>0)for(a=0;a<r.context_list.length;a++)l=new RegExp(r.query_text,"g"),r.context_list[a]=r.context_list[a].replace(l,'<span style="color: blue;">'.concat(r.query_text,"</span>"));S.find_back_enter_index=!1,et(r.context_list,r.context_position_list,r.context_start_position_list,S.back),S.context_list.length>0&&(S.back&&N.length>0?(S.context_list.length>N.length?P(Math.floor(100*parseInt(N[S.context_list.length-N.length].getAttribute("position"))/S.max_size)):P(Math.floor(100*parseInt(N[N.length-S.context_list.length].getAttribute("position"))/S.max_size)),T=!1):P(Math.floor(100*(null!==(s=S.context_position_list[S.context_position_list.length-1])&&void 0!==s?s:0)/S.max_size)))}case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),rt=function(t){O||(O=!0,P(100),o.ws.addMsg(i.HK.log_viewer_watch,function(t){var e=t.context;e&&(S=e,et(e.context_list,e.context_position_list,e.context_start_position_list,!1),_.current.scrollTop=_.current.scrollHeight)}),S.context="",S.context_list=[],S.context_position_list=[],S.context_start_position_list=[],S.position=t,o.ws.sendData(i.HK.log_viewer_watch,S),z(!0))},it=function(){var t=w(y().m(function t(){var e,r;return y().w(function(t){for(;;)switch(t.n){case 0:return e=function(){var t=w(y().m(function t(){var e,n,r;return y().w(function(t){for(;;)switch(t.n){case 0:if(!(e=_.current)){t.n=7;break}if(!O){t.n=1;break}return I=e.scrollTop,t.a(2);case 1:if(!(I<e.scrollTop&&N.length>0&&e.scrollTop+e.clientHeight+500>=e.scrollHeight)){t.n=4;break}if(!((n=parseInt(N[N.length-1].getAttribute("position")))>=S.max_size)){t.n=2;break}return rt(n),t.a(2);case 2:return S.line=20,S.context="",S.context_list=[],S.context_position_list=[],S.context_start_position_list=[],S.back=!1,S.position=n,t.n=3,nt();case 3:t.n=6;break;case 4:if(!(I>e.scrollTop&&N.length>0&&e.scrollTop-300<=0)){t.n=6;break}if(!((r=parseInt(N[0].getAttribute("start_position")))<=0)){t.n=5;break}return T||(T=!0,(0,h.N9)("到达顶部")),I=e.scrollTop,t.a(2);case 5:return S.line=10,S.context="",S.context_list=[],S.context_position_list=[],S.context_start_position_list=[],S.back=!0,S.position=r,t.n=6,nt();case 6:I=e.scrollTop;case 7:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),_.current.addEventListener("scroll",e),r=function(t){var e=_.current;if(e){t.preventDefault();t.deltaY>0?e.scrollTop+=20:e.scrollTop-=20}},_.current.addEventListener("wheel",r,{passive:!1}),z(!1),q(0),Z(0),G(""),O=!1,V(0),I=0,L=[],j=-1,N=[],(S=new u.d2).line=C,S.path="".concat((0,f.GG)("file",(0,f.vX)())).concat(n.fileName),S.token=localStorage.getItem("token"),t.n=1,nt();case 1:o.ws.addMsg(i.HK.search_file_progress,function(t){try{q(parseInt(t.context))}catch(t){(0,h.zN)(t.message)}}),o.ws.addMsg(i.HK.search_file_index,function(t){try{var e;(e=L).push.apply(e,g(t.context)),V(t.context.length)}catch(t){(0,h.zN)(t.message)}});case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),ot=function(){var t=w(y().m(function t(){return y().w(function(t){for(;;)switch(t.n){case 0:_.current&&_.current.remove(),N=[];case 1:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();if((0,r.useEffect)(function(){n.show?it():ot()},[n]),(0,r.useEffect)(function(){return function(){ot()}},[]),n.show){var at=function(){var t=w(y().m(function t(){var e,n,r,i,o;return y().w(function(t){for(;;)switch(t.p=t.n){case 0:if(S.line=C,S.context="",S.context_list=[],S.context_position_list=[],S.context_start_position_list=[],e=0,t.p=1,!((e=parseInt(H))>100||e<0)){t.n=2;break}throw(0,h.zN)("范围在0-100"),"超过最大范围";case 2:n=b(N);try{for(n.s();!(r=n.n()).done;)i=r.value,_.current.removeChild(i)}catch(t){n.e(t)}finally{n.f()}N=[],t.n=4;break;case 3:return t.p=3,o=t.v,(0,h.N9)(o),t.a(2);case 4:return S.back=e>=100,S.position=Math.floor(S.max_size*(e/100)),t.n=5,nt();case 5:return t.a(2)}},t,null,[[1,3]])}));return function(){return t.apply(this,arguments)}}(),lt=function(){var t=w(y().m(function t(){var e,n,r;return y().w(function(t){for(;;)switch(t.n){case 0:if(!O){t.n=1;break}return t.a(2);case 1:S.line=C,S.context="",S.context_list=[],S.context_position_list=[],S.context_start_position_list=[],e=b(N);try{for(e.s();!(n=e.n()).done;)r=n.value,_.current.removeChild(r)}catch(t){e.e(t)}finally{e.f()}return N=[],S.back=!0,S.position=S.max_size,t.n=2,nt();case 2:_.current.scrollTop=_.current.scrollHeight,rt(S.max_size);case 3:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),st=function(){var t=w(y().m(function t(){return y().w(function(t){for(;;)switch(t.n){case 0:if(W){t.n=1;break}return t.a(2);case 1:q(.1),Z(0),V(0),j=-1,L=[],S.query_text=W,S.encoding=n.encoding,o.ws.sendData(i.HK.search_file,S);case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),ct=function(){var t=w(y().m(function t(){var e,n,r,i;return y().w(function(t){for(;;)switch(t.n){case 0:if(0!==L.length){t.n=1;break}return t.a(2);case 1:S.line=C,S.context="",S.context_list=[],S.context_position_list=[],S.context_start_position_list=[],e=b(N);try{for(e.s();!(n=e.n()).done;)r=n.value,_.current.removeChild(r)}catch(t){e.e(t)}finally{e.f()}return N=[],i=j+1>=L.length?0:j+1,Z(i+1),j=i,S.find_back_enter_index=!0,S.back=!1,S.position=L[j],t.n=2,nt();case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),ut=function(){var t=w(y().m(function t(){var e,n,r,i;return y().w(function(t){for(;;)switch(t.n){case 0:if(0!==L.length){t.n=1;break}return t.a(2);case 1:S.line=C,S.context="",S.context_list=[],S.context_position_list=[],S.context_start_position_list=[],e=b(N);try{for(e.s();!(n=e.n()).done;)r=n.value,_.current.removeChild(r)}catch(t){e.e(t)}finally{e.f()}return N=[],i=j-1<0?L.length-1:j-1,Z(i+1),j=i,S.back=!1,S.find_back_enter_index=!0,S.position=L[j],t.n=2,nt();case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();return r.createElement("div",{id:"editor-container"},r.createElement(s.A,{ignore_tags:!0,left_children:[r.createElement(c.rA,{key:1,title:J("取消"),icon:"close",onClick:function(){x({show:!1})}}),r.createElement("div",{key:2,style:{width:"4rem"}},r.createElement(v.WA,{context:n.fileName})),r.createElement(r.Fragment,{key:3}," ",r.createElement(d.$Z,{handleEnterPress:st,placeholder:J("回车搜索整个文件"),icon:"search",value:W,handleInputChange:function(t){G(t)},max_width:"25em"})),W&&r.createElement("div",{key:5,style:{paddingLeft:"1.5rem",cursor:"pointer"},onClick:ct},"↓"),W&&r.createElement("div",{key:6,style:{paddingLeft:"1.5rem",cursor:"pointer"},onClick:ut},"↑"),W&&r.createElement("div",{key:7,style:{paddingLeft:"1.5rem"}},X,"/",L.length),W&&r.createElement("div",{key:8,style:{paddingLeft:"1.5rem"}},"搜索进度$",B,"%"),0!==B&&100!==B&&r.createElement(c.rA,{key:4,title:J("取消"),icon:"cancel",onClick:function(){o.ws.sendData(i.HK.search_file_cancel,{}),G(""),q(0)}})]},r.createElement("span",{style:{paddingRight:".5rem"}},n.encoding),F&&r.createElement(r.Fragment,null,r.createElement("span",{style:{color:"var(--icon-green)",whiteSpace:"pre"}},"正在实时监听 "),r.createElement(c.rA,{icon:"close",title:J("关闭实时"),onClick:function(){O&&(O=!1,z(!1),o.ws.sendData(i.HK.log_viewer_watch_cancel,S))}})),r.createElement("span",null,"当前加载进度",k),r.createElement(d.$Z,{max_width:"10rem",placeholder:J("跳转进度"),icon:"percent",value:H,handleInputChange:function(t){M(t)}}),r.createElement(c.rA,{icon:"play_arrow",title:J("跳转进度"),onClick:at}),r.createElement(c.rA,{icon:"text_rotate_vertical",title:J("滑动到文件最底部,实时输出"),onClick:lt})),r.createElement("div",{style:{height:"100%"}},r.createElement("div",{ref:_,style:{overflowY:"auto",height:"100%"}})))}}},1028(t,e,n){"use strict";n.d(e,{A:()=>l});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 l=a},9145(t,e,n){"use strict";var r=n(5072),i=n.n(r),o=n(7825),a=n.n(o),l=n(7659),s=n.n(l),c=n(5056),u=n.n(c),f=n(540),h=n.n(f),d=n(1113),p=n.n(d),m=n(1028),v={};v.styleTagTransform=p(),v.setAttributes=u(),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 502.1a98387d7790e9366c86.js.LICENSE.txt */
|
|
2
|
+
(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[502,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)}()},4694(t,e,n){"use strict";function r(t){return function(t){if(Array.isArray(t))return a(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 i(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 a,l=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return l=t.done,t},e:function(t){s=!0,a=t},f:function(){try{l||null==n.return||n.return()}finally{if(s)throw a}}}}function o(t,e){if(t){if("string"==typeof t)return a(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)?a(t,e):void 0}}function a(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 l(t,e){var n=s(t,e);return null===n||n===t.length-1?t[0]:t[n+1]}function s(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return null}function c(t,e){var n=s(t,e);return null===n?null:t[n]}function u(t){if(!t)return{};var e,n,r,o=i(t);try{for(o.s();!(r=o.n()).done;){var a=r.value;(void 0===e||e<a)&&(e=a),(void 0===n||n>a)&&(n=a)}}catch(t){o.e(t)}finally{o.f()}return{max:e,min:n}}function f(t,e){var n=t.indexOf(e),i=r(t);return i.splice(n,1),i}function h(){for(var t="",e=0;e<arguments.length;e++){var n=e<0||arguments.length<=e?void 0:arguments[e];0===e?("/"!==n[0]&&(n="/"+n),"/"!==n[n.length-1]&&(n+="/")):e===arguments.length-1?"/"!==n[n.list-1]&&-1===n.indexOf(".")&&(n+="/"):("/"===n[0]&&(n=n.slice(1,n.length-1)),"/"!==n[n.length-1]&&(n+="/")),t+=n}return t}function d(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];for(var r=e[0],i=1;i<e.length;i++)"/"!==e[i][e[i].length-1]?r+="/"+e[i]:r+=e[i];return r}function p(t,e){var n,r=[],o=i(e);try{for(o.s();!(n=o.n()).done;){var a=n.value;r.push(t[a])}}catch(t){o.e(t)}finally{o.f()}return r}function m(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t||0===t.length)return t;for(var r=0;r<t.length;r++)for(var i=t.length-1;i>r;i--){var o=e?e(t[i]):t[i],a=e?e(t[i-1]):t[i-1],l=t[i];o<a?n&&(t[i]=t[i-1],t[i-1]=l):o>a&&(n||(t[i]=t[i-1],t[i-1]=l))}return t}function v(t,e){if(0===t.length)return null;var n,r,i=(n=0,r=t.length,n===r?-1:Math.floor(Math.random()*(r-n))+n);return e&&i===e?v(t,e):t[i]}function b(t,e){if(e)for(var n=0;n<t.length;n++)if(e(t[n]))return t.splice(n,1)[0]}n.d(e,{Bd:()=>p,HS:()=>d,I:()=>b,IO:()=>h,Lr:()=>v,P1:()=>f,a7:()=>u,di:()=>m,jH:()=>l,kW:()=>c})},447(t,e,n){"use strict";n.d(e,{WA:()=>p,ZI:()=>m,Zp:()=>f,fq:()=>b,gz:()=>v,uF:()=>h,xP:()=>d});var r=n(6540),i=n(3413),o=n.n(i),a=n(505);function l(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,l=[],s=!0,c=!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)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return s(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)?s(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 s(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}var c=function(t){return t[t.common=0]="common",t[t.full=1]="full",t}(c||{});function u(t,e){var n=e===c.common?"card-content":e===c.full?"card-content full":"";return r.createElement("div",{className:"card",style:{}},r.createElement("div",{className:"card-title"},t.self_title?t.self_title:r.createElement("h2",null,t.title),r.createElement("div",{className:"not-select-div"},t.titleCom&&t.titleCom)),r.createElement("div",{className:n},t.children),r.createElement("div",{className:"card-action card-action-bottom-right"},t.rightBottomCom))}function f(t){return u(t,c.common)}function h(t){return u(t,c.full)}function d(t){var e,n,i,l=(0,r.useRef)(null);return r.createElement("div",{className:"card-text"},r.createElement("div",{className:"card-text-context"},null!==(e=t.context)&&void 0!==e?e:t.children),r.createElement("div",{className:"card-text-tip",ref:l,onClick:function(){var e,n;(0,a.lW)(null!==(e=null!==(n=t.tip_context)&&void 0!==n?n:t.context)&&void 0!==e?e:t.children),new(o())({type:"info",text:"复制完成",timeout:1e3,layout:"bottomLeft"}).show()}},null!==(n=null!==(i=t.tip_context)&&void 0!==i?i:t.context)&&void 0!==n?n:t.children))}function p(t){var e,n;return r.createElement("div",{className:"card-text"},r.createElement("div",{className:"card-text-context"},null!==(e=t.context)&&void 0!==e?e:t.children),r.createElement("div",{className:"card-text-tip"},null!==(n=t.context)&&void 0!==n?n:t.children))}function m(t){var e,n;return r.createElement("div",{className:"card floating",onKeyPress:function(e){"Enter"===e.key&&t.confirm_enter&&t.confirm_enter()}},r.createElement("div",{className:"card-title"},r.createElement("h2",null,t.title)),r.createElement("div",{className:"card-content"},t.context&&Array.isArray(t.context)?t.context.map(function(t,e){return r.createElement(r.Fragment,{key:e},t)}):t.context),r.createElement("div",{className:"card-action"},r.createElement("button",{className:"button button--flat button--grey",onClick:t.cancel},null!==(e=t.cancel_t)&&void 0!==e?e:"cancel"),r.createElement("button",{className:"button button--flat",onClick:t.confirm},null!==(n=t.confirm_t)&&void 0!==n?n:"confirm")))}function v(t){return r.createElement("div",{className:"progress-card"},r.createElement("div",{className:"progress-per"},r.createElement("div",{style:{width:"".concat(t.progress,"%")}})))}var b=function(t){var e=l((0,r.useState)("var(--iconTertiary)"),2),n=e[0],i=e[1];(0,r.useEffect)(function(){null==t.ok?null==t.success?null!=t.running&&i("var(--icon-yellow)"):!0===t.success?i("var(--icon-green)"):!1===t.success&&i("var(--icon-red)"):i(t.ok?"var(--icon-green)":"var(--iconTertiary)")},[t]);var o={width:"10px",height:"10px",borderRadius:"50%",backgroundColor:n,display:"inline-block"};return r.createElement("div",{style:o})}},3033(t,e,n){"use strict";n.d(e,{$Z:()=>f,GL:()=>b,Sm:()=>d,U6:()=>v,cA:()=>p,l6:()=>m});var r=n(6540),i=n(5219),o=n.n(i);n(9145);function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function l(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=s(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==s(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s(t)}function c(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,l=[],s=!0,c=!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)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return u(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)?u(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function f(t){var e=(0,r.useRef)(null),n=c(r.useState(""),2),i=n[0],o=n[1];return(0,r.useEffect)(function(){var n=t.value;null==n&&(n=""),e.current.value=n,o(t.value||"")},[t.value]),r.createElement("div",{id:"search",className:"",style:{maxWidth:t.max_width,display:t.not_mobile?"block":void 0}},r.createElement("div",{id:"input"},r.createElement("i",{className:"material-icons"},t.icon),r.createElement("input",{type:"text",ref:e,placeholder:i||t.placeholder,onChange:function(e){t.handleInputChange&&t.handleInputChange(e.target.value,e.target),o(e.target.value)},onKeyPress:function(e){"Enter"===e.key&&t.handleEnterPress&&t.handleEnterPress()}})))}function h(t){var e=(0,r.useRef)(null),n=c(r.useState(""),2),i=n[0],a=n[1],l=c(r.useState("input input--block awesomplete"),2),u=l[0],f=l[1];(0,r.useEffect)(function(){a(null==t.value?"":t.value),t.focus&&e.current&&e.current.focus(),t.no_border&&f("input input--block awesomplete input--no_border")},[t.value,t.focus,t.no_border]);var h=(0,r.useRef)(t.handleInputChange);return(0,r.useEffect)(function(){h.current=t.handleInputChange},[t.handleInputChange]),(0,r.useEffect)(function(){if(null!=t.options&&e.current){var n=t.options.map(function(t){return"object"===s(t)&&null!==t?{label:t.label,value:t.value}:String(t)}),r=new(o())(e.current,{list:n,minChars:0,autoFirst:!0}),i=function(){var t;null===(t=e.current)||void 0===t||t.dispatchEvent(new Event("input"))},l=function(t){var n,r,i,o=null!==(n=null!==(r=t.text.label)&&void 0!==r?r:t.text.value)&&void 0!==n?n:t.text,l=null!==(i=t.text.value)&&void 0!==i?i:t.text;a(o),requestAnimationFrame(function(){e.current&&(e.current.value=o)}),h.current&&h.current(l,e.current)};return e.current.addEventListener("focus",i),e.current.addEventListener("awesomplete-selectcomplete",l),function(){e.current&&(e.current.removeEventListener("focus",i),e.current.removeEventListener("awesomplete-selectcomplete",l)),r.destroy()}}},[t.options]),r.createElement(r.Fragment,null,t.placeholderOut&&r.createElement("p",null,t.placeholderOut),r.createElement("div",{style:{display:"flex",alignItems:"center",width:t.width,maxWidth:t.maxWidth}},t.left_placeholder&&r.createElement("div",{style:{flex:"0 0 auto",marginRight:"4px"}},t.left_placeholder),r.createElement("input",{style:{flex:1,minWidth:0},onClick:function(t){return t.stopPropagation()},disabled:!!t.disabled,className:u,type:t.type,placeholder:t.placeholder,onChange:function(e){var n=e.target.value;a(n),t.handleInputChange&&t.handleInputChange(n,e.target)},onKeyPress:function(e){"Enter"===e.key&&t.handlerEnter&&t.handlerEnter(e.currentTarget.value)},value:i,ref:e}),t.right_placeholder&&r.createElement("div",{style:{flex:"0 0 auto",marginLeft:"4px"}},t.right_placeholder)))}function d(t){return h(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach(function(e){l(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},t))}function p(t){return h({placeholder:t.placeholder,type:"password",handleInputChange:t.handleInputChange,handlerEnter:t.handleEnterPress,maxWidth:t.maxWidth,width:t.width,value:t.value})}function m(t){return r.createElement("div",{style:{display:"flex"}},t.tip&&r.createElement("p",{className:"input input_left "},t.tip),r.createElement("select",{defaultValue:t.defaultValue,value:t.value,style:{width:t.width},disabled:!!t.disabled,className:"input input--block ".concat(t.no_border?"input--no_border":""),onChange:function(e){return t.onChange(e.target.value)}},t.options.map(function(t,e){return r.createElement("option",{key:e,value:t.value},t.title)})))}function v(t){var e;return r.createElement("div",{className:"input_radio_row"},r.createElement("input",{type:"radio",checked:t.selected,name:null!==(e=t.name)&&void 0!==e?e:"common_name",value:t.value,className:"input_radio",onChange:function(){t.onchange&&t.onchange(t.value)}}),t.context)}function b(t){var e,n=c((0,r.useState)(!1),2),i=n[0],o=n[1];return(0,r.useEffect)(function(){o(!!t.selected)},[t.selected]),r.createElement("div",{className:"input_radio_row"},r.createElement("input",{type:"checkbox",disabled:null!==(e=t.is_disable)&&void 0!==e&&e,checked:i,onChange:function(){t.onchange&&t.onchange()}}),t.context)}},2502(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>P});var r=n(6540),i=n(4188),o=n(4944),a=n(7444),l=n(6417),s=n(7952),c=n(5997),u=n(7022),f=n(4289),h=n(2042),d=n(3033),p=n(2389),m=n(4694),v=n(447);function b(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=A(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,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){l=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(l)throw o}}}}function g(t){return function(t){if(Array.isArray(t))return k(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||A(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 y(){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 l?r:l,c=Object.create(s.prototype);return x(c,"_invoke",function(n,r,i){var o,l,s,c=0,u=i||[],f=!1,h={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,n){return o=e,l=0,s=t,h.n=n,a}};function d(n,r){for(l=n,s=r,e=0;!f&&c&&!i&&e<u.length;e++){var i,o=u[e],d=h.p,p=o[2];n>3?(i=p===r)&&(s=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=d&&((i=n<2&&d<o[1])?(l=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,l=0))}if(i||n>1)return a;throw f=!0,r}return function(i,u,p){if(c>1)throw TypeError("Generator is already running");for(f&&1===u&&d(u,p),l=u,s=p;(e=l<2?t:s)||!f;){o||(l?l<3?(l>1&&(h.n=-1),d(l,s)):h.n=s:h.v=s);try{if(c=2,o){if(l||(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,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(f=h.n<0)?s:n.call(r,h))!==a)break}catch(e){o=t,l=1,s=e}finally{c=1}}return{value:e,done:f}}}(n,i,o),!0),c}var a={};function l(){}function s(){}function c(){}e=Object.getPrototypeOf;var u=[][r]?e(e([][r]())):(x(e={},r,function(){return this}),e),f=c.prototype=l.prototype=Object.create(u);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,x(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return s.prototype=c,x(f,"constructor",c),x(c,"constructor",s),s.displayName="GeneratorFunction",x(c,i,"GeneratorFunction"),x(f),x(f,i,"Generator"),x(f,r,function(){return this}),x(f,"toString",function(){return"[object Generator]"}),(y=function(){return{w:o,m:h}})()}function x(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}x=function(t,e,n,r){function o(e,n){x(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))},x(t,e,n,r)}function _(t,e,n,r,i,o,a){try{var l=t[o](a),s=l.value}catch(t){return void n(t)}l.done?e(s):Promise.resolve(s).then(r,i)}function w(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){_(o,r,i,a,l,"next",t)}function l(t){_(o,r,i,a,l,"throw",t)}a(void 0)})}}function E(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,l=[],s=!0,c=!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)&&(l.push(r.value),l.length!==e);s=!0);}catch(t){c=!0,i=t}finally{try{if(!s&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return l}}(t,e)||A(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(t,e){if(t){if("string"==typeof t)return k(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)?k(t,e):void 0}}function k(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}var S,C=300,O=!1,I=0,T=!0,N=[],j=-1,L=[];function P(t){var e=E((0,a.L4)(l.AG.log_viewer),2),n=e[0],x=e[1],_=(0,r.useRef)(null),A=E((0,r.useState)(0),2),k=A[0],P=A[1],R=E((0,r.useState)(100),2),H=R[0],M=R[1],D=E((0,r.useState)(!1),2),F=D[0],z=D[1],$=E((0,r.useState)(""),2),G=$[0],W=$[1],K=E((0,r.useState)(0),2),B=K[0],q=K[1],U=E((0,r.useState)(0),2),X=U[0],Z=U[1],Y=E((0,r.useState)(0),2),V=(Y[0],Y[1]),J=(0,p.Bd)().t,Q=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4?arguments[4]:void 0,o=document.createElement("div");return-1===j?o.textContent=t:o.innerHTML=t,o.style.whiteSpace="pre-wrap",o.style.overflowWrap="break-word",o.setAttribute("position","".concat(e)),o.setAttribute("start_position","".concat(n)),r?(_.current.insertBefore(o,i),N.unshift(o)):(_.current.appendChild(o),N.push(o)),o},tt=function(t){var e=(0,m.I)(N,function(e){return e===t});e&&_.current.removeChild(e)},et=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(t){var i=Array.isArray(t)?t:t.split("\n");if(r){for(var o,a=0;a<i.length;a++)o=Q(i[a],e[a],n[a],!0,0===a?_.current.firstChild:o);if(N.length>C)for(var l=N.length-1;l>=C;)tt(N[N.length-1]),l--}else{for(var s=0;s<i.length;s++)Q(i[s],e[s],n[s]);if(N.length>C)for(var c=N.length-C;c>0;)tt(N[0]),c--}}},nt=function(){var t=w(y().m(function t(){var e,r,a,l,s;return y().w(function(t){for(;;)switch(t.n){case 0:return S.encoding=n.encoding,S.context="",t.n=1,o.ws.sendData(i.HK.log_viewer,S);case 1:if(e=t.v){if(r=e.context,S=r,r.find_back_enter_index&&r.context_list.length>0)for(a=0;a<r.context_list.length;a++)l=new RegExp(r.query_text,"g"),r.context_list[a]=r.context_list[a].replace(l,'<span style="color: blue;">'.concat(r.query_text,"</span>"));S.find_back_enter_index=!1,et(r.context_list,r.context_position_list,r.context_start_position_list,S.back),S.context_list.length>0&&(S.back&&N.length>0?(S.context_list.length>N.length?P(Math.floor(100*parseInt(N[S.context_list.length-N.length].getAttribute("position"))/S.max_size)):P(Math.floor(100*parseInt(N[N.length-S.context_list.length].getAttribute("position"))/S.max_size)),T=!1):P(Math.floor(100*(null!==(s=S.context_position_list[S.context_position_list.length-1])&&void 0!==s?s:0)/S.max_size)))}case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),rt=function(t){O||(O=!0,P(100),o.ws.addMsg(i.HK.log_viewer_watch,function(t){var e=t.context;e&&(S=e,et(e.context_list,e.context_position_list,e.context_start_position_list,!1),_.current.scrollTop=_.current.scrollHeight)}),S.context="",S.context_list=[],S.context_position_list=[],S.context_start_position_list=[],S.position=t,o.ws.sendData(i.HK.log_viewer_watch,S),z(!0))},it=function(){var t=w(y().m(function t(){var e,r;return y().w(function(t){for(;;)switch(t.n){case 0:return e=function(){var t=w(y().m(function t(){var e,n,r;return y().w(function(t){for(;;)switch(t.n){case 0:if(!(e=_.current)){t.n=7;break}if(!O){t.n=1;break}return I=e.scrollTop,t.a(2);case 1:if(!(I<e.scrollTop&&N.length>0&&e.scrollTop+e.clientHeight+500>=e.scrollHeight)){t.n=4;break}if(!((n=parseInt(N[N.length-1].getAttribute("position")))>=S.max_size)){t.n=2;break}return rt(n),t.a(2);case 2:return S.line=20,S.context="",S.context_list=[],S.context_position_list=[],S.context_start_position_list=[],S.back=!1,S.position=n,t.n=3,nt();case 3:t.n=6;break;case 4:if(!(I>e.scrollTop&&N.length>0&&e.scrollTop-300<=0)){t.n=6;break}if(!((r=parseInt(N[0].getAttribute("start_position")))<=0)){t.n=5;break}return T||(T=!0,(0,h.N9)("到达顶部")),I=e.scrollTop,t.a(2);case 5:return S.line=10,S.context="",S.context_list=[],S.context_position_list=[],S.context_start_position_list=[],S.back=!0,S.position=r,t.n=6,nt();case 6:I=e.scrollTop;case 7:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),_.current.addEventListener("scroll",e),r=function(t){var e=_.current;if(e){t.preventDefault();t.deltaY>0?e.scrollTop+=20:e.scrollTop-=20}},_.current.addEventListener("wheel",r,{passive:!1}),z(!1),q(0),Z(0),W(""),O=!1,V(0),I=0,L=[],j=-1,N=[],(S=new u.d2).line=C,S.path="".concat((0,f.GG)("file",(0,f.vX)())).concat(n.fileName),S.token=localStorage.getItem("token"),t.n=1,nt();case 1:o.ws.addMsg(i.HK.search_file_progress,function(t){try{q(parseInt(t.context))}catch(t){(0,h.zN)(t.message)}}),o.ws.addMsg(i.HK.search_file_index,function(t){try{var e;(e=L).push.apply(e,g(t.context)),V(t.context.length)}catch(t){(0,h.zN)(t.message)}});case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),ot=function(){var t=w(y().m(function t(){return y().w(function(t){for(;;)switch(t.n){case 0:_.current&&_.current.remove(),N=[];case 1:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();if((0,r.useEffect)(function(){n.show?it():ot()},[n]),(0,r.useEffect)(function(){return function(){ot()}},[]),n.show){var at=function(){var t=w(y().m(function t(){var e,n,r,i,o;return y().w(function(t){for(;;)switch(t.p=t.n){case 0:if(S.line=C,S.context="",S.context_list=[],S.context_position_list=[],S.context_start_position_list=[],e=0,t.p=1,!((e=parseInt(H))>100||e<0)){t.n=2;break}throw(0,h.zN)("范围在0-100"),"超过最大范围";case 2:n=b(N);try{for(n.s();!(r=n.n()).done;)i=r.value,_.current.removeChild(i)}catch(t){n.e(t)}finally{n.f()}N=[],t.n=4;break;case 3:return t.p=3,o=t.v,(0,h.N9)(o),t.a(2);case 4:return S.back=e>=100,S.position=Math.floor(S.max_size*(e/100)),t.n=5,nt();case 5:return t.a(2)}},t,null,[[1,3]])}));return function(){return t.apply(this,arguments)}}(),lt=function(){var t=w(y().m(function t(){var e,n,r;return y().w(function(t){for(;;)switch(t.n){case 0:if(!O){t.n=1;break}return t.a(2);case 1:S.line=C,S.context="",S.context_list=[],S.context_position_list=[],S.context_start_position_list=[],e=b(N);try{for(e.s();!(n=e.n()).done;)r=n.value,_.current.removeChild(r)}catch(t){e.e(t)}finally{e.f()}return N=[],S.back=!0,S.position=S.max_size,t.n=2,nt();case 2:_.current.scrollTop=_.current.scrollHeight,rt(S.max_size);case 3:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),st=function(){var t=w(y().m(function t(){return y().w(function(t){for(;;)switch(t.n){case 0:if(G){t.n=1;break}return t.a(2);case 1:q(.1),Z(0),V(0),j=-1,L=[],S.query_text=G,S.encoding=n.encoding,o.ws.sendData(i.HK.search_file,S);case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),ct=function(){var t=w(y().m(function t(){var e,n,r,i;return y().w(function(t){for(;;)switch(t.n){case 0:if(0!==L.length){t.n=1;break}return t.a(2);case 1:S.line=C,S.context="",S.context_list=[],S.context_position_list=[],S.context_start_position_list=[],e=b(N);try{for(e.s();!(n=e.n()).done;)r=n.value,_.current.removeChild(r)}catch(t){e.e(t)}finally{e.f()}return N=[],i=j+1>=L.length?0:j+1,Z(i+1),j=i,S.find_back_enter_index=!0,S.back=!1,S.position=L[j],t.n=2,nt();case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),ut=function(){var t=w(y().m(function t(){var e,n,r,i;return y().w(function(t){for(;;)switch(t.n){case 0:if(0!==L.length){t.n=1;break}return t.a(2);case 1:S.line=C,S.context="",S.context_list=[],S.context_position_list=[],S.context_start_position_list=[],e=b(N);try{for(e.s();!(n=e.n()).done;)r=n.value,_.current.removeChild(r)}catch(t){e.e(t)}finally{e.f()}return N=[],i=j-1<0?L.length-1:j-1,Z(i+1),j=i,S.back=!1,S.find_back_enter_index=!0,S.position=L[j],t.n=2,nt();case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();return r.createElement("div",{id:"editor-container"},r.createElement(s.A,{ignore_tags:!0,left_children:[r.createElement(c.rA,{key:1,title:J("取消"),icon:"close",onClick:function(){x({show:!1})}}),r.createElement("div",{key:2,style:{width:"4rem"}},r.createElement(v.WA,{context:n.fileName})),r.createElement(r.Fragment,{key:3}," ",r.createElement(d.$Z,{handleEnterPress:st,placeholder:J("回车搜索整个文件"),icon:"search",value:G,handleInputChange:function(t){W(t)},max_width:"25em"})),G&&r.createElement("div",{key:5,style:{paddingLeft:"1.5rem",cursor:"pointer"},onClick:ct},"↓"),G&&r.createElement("div",{key:6,style:{paddingLeft:"1.5rem",cursor:"pointer"},onClick:ut},"↑"),G&&r.createElement("div",{key:7,style:{paddingLeft:"1.5rem"}},X,"/",L.length),G&&r.createElement("div",{key:8,style:{paddingLeft:"1.5rem"}},"搜索进度$",B,"%"),0!==B&&100!==B&&r.createElement(c.rA,{key:4,title:J("取消"),icon:"cancel",onClick:function(){o.ws.sendData(i.HK.search_file_cancel,{}),W(""),q(0)}})]},r.createElement("span",{style:{paddingRight:".5rem"}},n.encoding),F&&r.createElement(r.Fragment,null,r.createElement("span",{style:{color:"var(--icon-green)",whiteSpace:"pre"}},"正在实时监听 "),r.createElement(c.rA,{icon:"close",title:J("关闭实时"),onClick:function(){O&&(O=!1,z(!1),o.ws.sendData(i.HK.log_viewer_watch_cancel,S))}})),r.createElement("span",null,"当前加载进度",k),r.createElement(d.$Z,{max_width:"10rem",placeholder:J("跳转进度"),icon:"percent",value:H,handleInputChange:function(t){M(t)}}),r.createElement(c.rA,{icon:"play_arrow",title:J("跳转进度"),onClick:at}),r.createElement(c.rA,{icon:"text_rotate_vertical",title:J("滑动到文件最底部,实时输出"),onClick:lt})),r.createElement("div",{style:{height:"100%"}},r.createElement("div",{ref:_,style:{overflowY:"auto",height:"100%"}})))}}},1028(t,e,n){"use strict";n.d(e,{A:()=>l});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 l=a},9145(t,e,n){"use strict";var r=n(5072),i=n.n(r),o=n(7825),a=n.n(o),l=n(7659),s=n.n(l),c=n(5056),u=n.n(c),f=n(540),h=n.n(f),d=n(1113),p=n.n(d),m=n(1028),v={};v.styleTagTransform=p(),v.setAttributes=u(),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,2 +1,2 @@
|
|
|
1
|
-
/*! For license information please see 53.
|
|
2
|
-
(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[53,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=o(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 o=e[r],i=t.input.getAttribute("data-"+r.toLowerCase());t[r]="number"==typeof o?parseInt(i):!1===o?null!==i:o instanceof Function?null:i,t[r]||0===t[r]||(t[r]=r in n?n[r]:o)}}(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=o.create("ul",{hidden:"hidden",role:"listbox",id:"awesomplete_list_"+this.count,inside:this.container,"aria-label":this.listLabel}),this.status=o.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))}}}},o.bind(this.input,this._events.input),o.bind(this.input.form,this._events.form),o.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=o(t))&&t.children){var e=[];r.apply(t.children).forEach(function(t){if(!t.disabled){var n=t.textContent.trim(),r=t.value||n,o=t.label||n;""!==r&&e.push({label:o,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",""),o.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),o.fire(this.input,"awesomplete-open")},destroy:function(){if(o.unbind(this.input,this._events.input),o.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,o.fire(this.input,"awesomplete-highlight",{text:this.suggestions[this.index]}))},select:function(t,e,n){if(t?this.index=o.siblingIndex(t):t=this.ul.children[this.index],t){var r=this.suggestions[this.index];o.fire(this.input,"awesomplete-select",{text:r,origin:e||t,originalEvent:n})&&(this.replace(r),this.close({reason:"select"}),o.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(o.regExpEscape(e.trim()),"i").test(t)},e.FILTER_STARTSWITH=function(t,e){return RegExp("^"+o.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 o.create("div",{className:"awesomplete",around:t})},e.ITEM=function(t,e,n){var r=""===e.trim()?t:t.replace(RegExp(o.regExpEscape(e.trim()),"gi"),"<mark>$&</mark>");return o.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 o(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function i(t,e){return r.call((e||document).querySelectorAll(t))}function a(){i("input.awesomplete").forEach(function(t){new e(t)})}o.create=function(t,e){var n=document.createElement(t);for(var r in e){var i=e[r];if("inside"===r)o(i).appendChild(n);else if("around"===r){var a=o(i);a.parentNode.insertBefore(n,a),n.appendChild(a),null!=a.getAttribute("autofocus")&&a.focus()}else r in n?n[r]=i:n.setAttribute(r,i)}return n},o.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)})}},o.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)})}},o.fire=function(t,e,n){var r=document.createEvent("HTMLEvents");for(var o in r.initEvent(e,!0,!0),n)r[o]=n[o];return t.dispatchEvent(r)},o.regExpEscape=function(t){return t.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")},o.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.$=o,e.$$=i,t.exports&&(t.exports=e)}()},8694(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t,e,n){return(e=u(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,u(r.key),r)}}function a(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(t){var e=function(t,e){if("object"!=r(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==r(e)?e:e+""}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,{$K:()=>f,RB:()=>h,l5:()=>d,qB:()=>l,vo:()=>p,vr:()=>m});var l=a(function t(){c(this,t)}),s=function(t){return t[t.tcp=0]="tcp",t[t.udp=1]="udp",t}({}),f=a(function t(){c(this,t),o(this,"open",!1),o(this,"key",""),o(this,"async_ips",[])}),p=a(function t(){c(this,t),o(this,"open",!1),o(this,"key",""),o(this,"model",s.udp)}),h=function(t){return t[t.row=1]="row",t[t.json=2]="json",t[t.form=3]="form",t}({}),m=a(function t(){c(this,t)}),d=a(function t(){c(this,t)})},7481(t,e,n){"use strict";n.d(e,{S:()=>u,X:()=>a});var r=n(6540);function o(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,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var 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)?i(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function a(t){var e,n=o(r.useState([]),2),i=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,i.map(function(e,n){return r.createElement("tr",{key:n,onContextMenu:function(){t.handleContextMenu&&t.handleContextMenu(e)}},e.map(function(n,o){var i;return r.createElement("td",{style:{width:null!==(i=t.width)&&void 0!==i?i:"auto"},key:o,className:o===e.length-1?"small":""},n)}))})))}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)}))}},5595(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>At});var r=n(6540),o=n(5725),i=n(4284),a=n(2042),u=n(3459),c=n(447),l=n(3033),s=n(5997),f=n(7481),p=n(8694),h=n(4944),m=n(4188),d=n(2389),v=n(7952);function y(t){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},y(t)}function b(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function g(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=y(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==y(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function E(t){return function(t){if(Array.isArray(t))return j(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",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof u?r:u,l=Object.create(c.prototype);return S(l,"_invoke",function(n,r,o){var i,u,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return i=e,u=0,c=t,p.n=n,a}};function h(n,r){for(u=n,c=r,e=0;!f&&l&&!o&&e<s.length;e++){var o,i=s[e],h=p.p,m=i[2];n>3?(o=m===r)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=h&&((o=n<2&&h<i[1])?(u=0,p.v=r,p.n=i[1]):h<m&&(o=n<3||i[0]>r||r>m)&&(i[4]=n,i[5]=r,p.n=m,u=0))}if(o||n>1)return a;throw f=!0,r}return function(o,s,m){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&h(s,m),u=s,c=m;(e=u<2?t:c)||!f;){i||(u?u<3?(u>1&&(p.n=-1),h(u,c)):p.n=c:p.v=c);try{if(l=2,i){if(u||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,u<2&&(u=0)}else 1===u&&(e=i.return)&&e.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=t}else if((e=(f=p.n<0)?c:n.call(r,p))!==a)break}catch(e){i=t,u=1,c=e}finally{l=1}}return{value:e,done:f}}}(n,o,i),!0),l}var a={};function u(){}function c(){}function l(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(S(e={},r,function(){return this}),e),f=l.prototype=u.prototype=Object.create(s);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,S(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=l,S(f,"constructor",l),S(l,"constructor",c),c.displayName="GeneratorFunction",S(l,o,"GeneratorFunction"),S(f),S(f,o,"Generator"),S(f,r,function(){return this}),S(f,"toString",function(){return"[object Generator]"}),(w=function(){return{w:i,m:p}})()}function S(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}S=function(t,e,n,r){function i(e,n){S(t,e,function(t){return this._invoke(e,n,t)})}e?o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(i("next",0),i("throw",1),i("return",2))},S(t,e,n,r)}function x(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function A(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){x(i,r,o,a,u,"next",t)}function u(t){x(i,r,o,a,u,"throw",t)}a(void 0)})}}function _(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,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}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 j(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)?j(t,e):void 0}}function j(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 k(t){var e=(0,d.Bd)().t,n=_((0,r.useState)(void 0),2),y=n[0],S=n[1],x=_((0,r.useState)(!1),2),j=x[0],k=x[1],C=_((0,r.useState)(""),2),I=C[0],P=C[1],T=_((0,r.useState)([e("".concat(e("名称"))),e("".concat(e("虚拟"),"ip")),"".concat(e("物理"),"信息"),e("在线状态"),e("选择")]),2),L=T[0],F=(T[1],_((0,r.useState)([]),2)),N=F[0],U=F[1],G=_((0,r.useState)({}),2),H=G[0],M=G[1],D=_((0,r.useState)(!1),2),R=D[0],B=D[1],W=function(t){var n,o=function(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,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}(t);try{for(o.s();!(n=o.n()).done;){var i=n.value,a=i[i.length-1];i[i.length-1]=r.createElement(r.Fragment,null,r.createElement(c.fq,{ok:a}),e(a?"在线":"离线")),i[0]=r.createElement(c.xP,{context:i[0],tip_context:i[0]}),i[2]=r.createElement(c.xP,{context:i[2],tip_context:i[2]})}}catch(t){o.e(t)}finally{o.f()}};(0,r.useEffect)(function(){var t=function(){var t=A(w().m(function t(){var e;return w().w(function(t){for(;;)switch(t.n){case 0:return e=new m.hf(m.HK.vir_net_serverIno_get),h.ws.addMsg(m.HK.vir_net_serverIno_get,function(t){W(t.context),U(t.context)}),t.n=1,h.ws.send(e);case 1:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();t();var e=function(){var t=A(w().m(function t(){var e,n;return w().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i._U.get("vir/server/get");case 1:if((e=t.v).code===u.m.Success){t.n=2;break}return t.a(2);case 2:n=e.data,S(n.port),P(n.key),k(n.open);case 3:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();return e(),function(){}},[]);var $=function(){var t=A(w().m(function t(){var e;return w().w(function(t){for(;;)switch(t.n){case 0:return(e=new p.$K).open=j,e.key=I,R&&(e.async_ips=Object.keys(H)),y&&(e.port=parseInt(y)),t.n=1,i._U.post("vir/server/save",e);case 1:if(t.v.code===u.m.Success){t.n=2;break}return(0,a.zN)("网络错误"),t.a(2);case 2:(0,a.LW)("保存成功"),B(!1);case 3:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),X=function(){var t=A(w().m(function t(){return w().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i._U.post("vir/server/delete/client",{ips:Object.keys(H)});case 1:M({});case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();return r.createElement("div",null,r.createElement(v.A,null,!!Object.keys(H).length&&H[0],!!Object.keys(H).length&&r.createElement(s.rA,{icon:"delete",title:"删除",onClick:X})),r.createElement(o.fI,null,r.createElement(o.VP,null,r.createElement(c.Zp,{title:"",rightBottomCom:r.createElement(s.C3,{text:e("保存"),clickFun:$})},r.createElement(l.Sm,{placeholder:"port",value:y,handleInputChange:function(t){S(t)}}),r.createElement(l.Sm,{placeholder:"key ",value:I,handleInputChange:function(t){P(t)}}),r.createElement("form",null,e("状态"),":",r.createElement(f.S,{isFlex:!0,columns:[r.createElement(l.U6,{value:1,context:e("开启"),selected:j,onchange:function(){k(!j)}}),r.createElement(l.U6,{value:1,context:e("关闭"),selected:!j,onchange:function(){k(!j)}})]})),!!Object.keys(H).length&&r.createElement(l.GL,{context:e("同步信息给选中服务器"),selected:R,onchange:function(){B(!R)}})),r.createElement(c.Zp,{title:""},r.createElement(f.X,{headers:L,rows:N.map(function(t){return[].concat(E(t),[r.createElement(l.GL,{context:e(""),selected:H[t[1]],onchange:function(){var e=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?b(Object(n),!0).forEach(function(e){g(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},H);e[t[1]]?delete e[t[1]]:e[t[1]]=t,M(e)}})])}),width:"10rem"})))))}function C(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof u?r:u,l=Object.create(c.prototype);return I(l,"_invoke",function(n,r,o){var i,u,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return i=e,u=0,c=t,p.n=n,a}};function h(n,r){for(u=n,c=r,e=0;!f&&l&&!o&&e<s.length;e++){var o,i=s[e],h=p.p,m=i[2];n>3?(o=m===r)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=h&&((o=n<2&&h<i[1])?(u=0,p.v=r,p.n=i[1]):h<m&&(o=n<3||i[0]>r||r>m)&&(i[4]=n,i[5]=r,p.n=m,u=0))}if(o||n>1)return a;throw f=!0,r}return function(o,s,m){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&h(s,m),u=s,c=m;(e=u<2?t:c)||!f;){i||(u?u<3?(u>1&&(p.n=-1),h(u,c)):p.n=c:p.v=c);try{if(l=2,i){if(u||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,u<2&&(u=0)}else 1===u&&(e=i.return)&&e.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=t}else if((e=(f=p.n<0)?c:n.call(r,p))!==a)break}catch(e){i=t,u=1,c=e}finally{l=1}}return{value:e,done:f}}}(n,o,i),!0),l}var a={};function u(){}function c(){}function l(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(I(e={},r,function(){return this}),e),f=l.prototype=u.prototype=Object.create(s);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,I(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=l,I(f,"constructor",l),I(l,"constructor",c),c.displayName="GeneratorFunction",I(l,o,"GeneratorFunction"),I(f),I(f,o,"Generator"),I(f,r,function(){return this}),I(f,"toString",function(){return"[object Generator]"}),(C=function(){return{w:i,m:p}})()}function I(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}I=function(t,e,n,r){function i(e,n){I(t,e,function(t){return this._invoke(e,n,t)})}e?o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(i("next",0),i("throw",1),i("return",2))},I(t,e,n,r)}function P(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function T(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){P(i,r,o,a,u,"next",t)}function u(t){P(i,r,o,a,u,"throw",t)}a(void 0)})}}function L(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,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return F(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)?F(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 F(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 N(t){var e=(0,d.Bd)().t,n=L((0,r.useState)(""),2),v=n[0],y=n[1],b=L((0,r.useState)(void 0),2),g=b[0],E=b[1],w=L((0,r.useState)(""),2),S=w[0],x=w[1],A=L((0,r.useState)(""),2),_=A[0],O=A[1],j=L((0,r.useState)(void 0),2),k=j[0],I=j[1],P=L((0,r.useState)(!1),2),F=P[0],N=P[1],U=L((0,r.useState)(""),2),G=U[0],H=U[1],M=L((0,r.useState)(!1),2),D=M[0],R=M[1];(0,r.useEffect)(function(){var t=function(){var t=T(C().m(function t(){var e,n,r,o,a;return C().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i._U.get("vir/client/get");case 1:if((e=t.v).code===u.m.Success){t.n=2;break}return t.a(2);case 2:if(n=e.data,I(n.serverPort),x(n.serverIp),y(n.ip),E(n.mask),H(n.key),N(n.open),O(n.client_name),!n.open){t.n=4;break}return r=new m.hf(m.HK.vir_net_client_get),t.n=3,h.ws.send(r);case 3:o=t.v,a=o.context.state,R(a),h.ws.addMsg(m.HK.vir_net_client_get,function(t){R(t.context.state)});case 4:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();t()},[]);var B=function(){var t=T(C().m(function t(){var e;return C().w(function(t){for(;;)switch(t.n){case 0:return(e=new p.vo).ip=v,e.mask=parseInt(g),e.key=G,e.serverIp=S,e.serverPort=parseInt(k),e.open=F,e.client_name=_,t.n=1,i._U.post("vir/client/save",e);case 1:if(t.v.code===u.m.Success){t.n=2;break}return(0,a.zN)("网络错误"),t.a(2);case 2:(0,a.LW)("保存成功");case 3:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();return r.createElement("div",null,r.createElement(o.fI,null,r.createElement(o.VP,null,r.createElement(c.Zp,{title:"",rightBottomCom:r.createElement(s.C3,{text:e("保存"),clickFun:B}),titleCom:r.createElement("div",null,e("连接状态"),r.createElement(c.fq,{ok:D}))},r.createElement(l.Sm,{placeholder:"ip ",value:v,handleInputChange:function(t){y(t)}}),r.createElement(l.Sm,{placeholder:"mask",value:g,handleInputChange:function(t){E(t)}}),r.createElement(l.Sm,{placeholder:"".concat(e("服务器"),"ip"),value:S,handleInputChange:function(t){x(t)}}),r.createElement(l.Sm,{placeholder:"".concat(e("服务器"),"part"),value:k,handleInputChange:function(t){I(t)}}),r.createElement(l.Sm,{placeholder:"名称 ",value:_,handleInputChange:function(t){O(t)}}),r.createElement(l.Sm,{placeholder:"key ",value:G,handleInputChange:function(t){H(t)}}),r.createElement("form",null,e("状态"),r.createElement(f.S,{isFlex:!0,columns:[r.createElement(l.U6,{value:1,context:e("开启"),selected:F,onchange:function(){N(!F)}}),r.createElement(l.U6,{value:1,context:e("关闭"),selected:!F,onchange:function(){N(!F)}})]}))),r.createElement(c.Zp,{title:""},r.createElement("div",null,"ip: 虚拟ip, “10.0.0.0 - 10.255.255.255”和“172.16.0.0 - 172.31.255.255”和“192.168.0.0 - 192.168.255.255”这三个网段属于内网ip"),r.createElement("div",null,"mask: 一些常见的子网掩码网段/8:255.0.0.0;/16:255.255.0.0 ;/24:255.255.255.0"),r.createElement("div",null,"key:用于验证身份信息并加密的和服务器设置的一样")))))}var U=n(7444),G=n(6417),H=n(3430),M=n(8247),D=n(1499);function R(t){return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},R(t)}function B(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function W(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?B(Object(n),!0).forEach(function(e){$(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function $(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=R(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=R(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==R(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function X(t){return function(t){if(Array.isArray(t))return J(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Y(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 Z(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof u?r:u,l=Object.create(c.prototype);return z(l,"_invoke",function(n,r,o){var i,u,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return i=e,u=0,c=t,p.n=n,a}};function h(n,r){for(u=n,c=r,e=0;!f&&l&&!o&&e<s.length;e++){var o,i=s[e],h=p.p,m=i[2];n>3?(o=m===r)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=h&&((o=n<2&&h<i[1])?(u=0,p.v=r,p.n=i[1]):h<m&&(o=n<3||i[0]>r||r>m)&&(i[4]=n,i[5]=r,p.n=m,u=0))}if(o||n>1)return a;throw f=!0,r}return function(o,s,m){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&h(s,m),u=s,c=m;(e=u<2?t:c)||!f;){i||(u?u<3?(u>1&&(p.n=-1),h(u,c)):p.n=c:p.v=c);try{if(l=2,i){if(u||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,u<2&&(u=0)}else 1===u&&(e=i.return)&&e.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=t}else if((e=(f=p.n<0)?c:n.call(r,p))!==a)break}catch(e){i=t,u=1,c=e}finally{l=1}}return{value:e,done:f}}}(n,o,i),!0),l}var a={};function u(){}function c(){}function l(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(z(e={},r,function(){return this}),e),f=l.prototype=u.prototype=Object.create(s);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,z(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=l,z(f,"constructor",l),z(l,"constructor",c),c.displayName="GeneratorFunction",z(l,o,"GeneratorFunction"),z(f),z(f,o,"Generator"),z(f,r,function(){return this}),z(f,"toString",function(){return"[object Generator]"}),(Z=function(){return{w:i,m:p}})()}function z(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}z=function(t,e,n,r){function i(e,n){z(t,e,function(t){return this._invoke(e,n,t)})}e?o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(i("next",0),i("throw",1),i("return",2))},z(t,e,n,r)}function K(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function V(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){K(i,r,o,a,u,"next",t)}function u(t){K(i,r,o,a,u,"throw",t)}a(void 0)})}}function q(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,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||Y(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Y(t,e){if(t){if("string"==typeof t)return J(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)?J(t,e):void 0}}function J(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 Q(t){var e=(0,d.Bd)().t,n=q((0,r.useState)(""),2),h=n[0],m=n[1],v=q((0,r.useState)(""),2),y=v[0],b=v[1],g=q((0,r.useState)(""),2),E=g[0],w=g[1],S=q((0,r.useState)(!1),2),x=S[0],A=S[1],_=q((0,r.useState)(!1),2),O=_[0],j=_[1],k=q((0,r.useState)({port:0,open:!1,list:[]}),2),C=k[0],I=k[1],P=q((0,U.L4)(G.A.editorSetting),2),T=(P[0],P[1]),L=q((0,U.L4)(G.A.user_base_info),2),F=L[0],N=(L[1],[e("端口"),e("目标地址"),e("目标端口"),e("开启"),e("备注"),e("删除")]),R=q((0,r.useState)([]),2),B=R[0],$=R[1],z=[e("port"),e("ip"),e("type"),e("开启")],K=q((0,r.useState)([]),2),Y=K[0],J=K[1],Q=[e("编辑"),e("开启"),e("备注"),e("删除")],tt=function(){var t=V(Z().m(function t(){var e,n;return Z().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i._U.post("http/proxy/get/win");case 1:(e=t.v).code===u.m.Success&&(n=e.data,m(n.ip),b(n.port),A(n.enabled),w(n.bypass),j(n.useForLocal));case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),et=function(){var t=V(Z().m(function t(){var e,n,r,o,a,c;return Z().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i._U.post("http/proxy/get/mac");case 1:if((e=t.v).code===u.m.Success){t.n=2;break}return t.a(2);case 2:for(n=[],r=[],o=0,a=e.data;o<a.length;o++)"Wi-Fi"===(c=a[o]).name?n.push(c):r.push(c);J([].concat(n,r));case 3:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),nt=function(){var t=V(Z().m(function t(){var e,n,r,o,a,c;return Z().w(function(t){for(;;)switch(t.n){case 0:return e=[i._U.post("vir/client/tcp_proxy/get"),i._U.post("http/proxy/server/get")],F.sys===H.XM.mac?n=et():F.sys===H.XM.win&&(n=tt()),n&&e.push(n),t.n=1,Promise.all(e);case 1:r=t.v,o=q(r,2),a=o[0],c=o[1],a.code===u.m.Success&&$(a.data),c.code===u.m.Success&&I(c.data);case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();(0,r.useEffect)(function(){nt()},[]);var rt=function(){var t=V(Z().m(function t(){var e;return Z().w(function(t){for(;;)switch(t.n){case 0:return(e=new p.l5).port=parseInt(y),e.enabled=x,e.useForLocal=O,e.ip=h,e.bypass=E,t.n=1,i._U.post("http/proxy/set/win",e);case 1:t.v.code===u.m.Success&&(nt(),(0,a.LW)("保存成功"));case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),ot=function(){var t=V(Z().m(function t(e){var n;return Z().w(function(t){for(;;)switch(t.n){case 0:return n=Y[e],t.n=1,i._U.post("http/proxy/set/mac",[n]);case 1:t.v.code===u.m.Success&&(nt(),(0,a.LW)("保存成功"));case 2:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}(),it=function(){var t=V(Z().m(function t(){var e,n;return Z().w(function(t){for(;;)switch(t.n){case 0:for(e=[],n=0;n<B.length;n++)B[n].index=n,e.push(B[n]);return t.n=1,i._U.post("vir/client/tcp_proxy/save",e);case 1:t.v.code===u.m.Success&&((0,a.LW)("保存成功"),nt());case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),at=function(){var t=V(Z().m(function t(){return Z().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i._U.post("http/proxy/server/save",C);case 1:t.v.code===u.m.Success&&(nt(),(0,a.LW)("保存成功"));case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),ut=function(){var t=V(Z().m(function t(e){var n;return Z().w(function(t){for(;;)switch(t.n){case 0:if(C.list[e].random_key){t.n=1;break}return C.list[e].random_key=(0,D.hU)(),I(W({},C)),t.n=1,at();case 1:return t.n=2,i._U.post("http/proxy/server/code/get",{key:C.list[e].random_key});case 2:n=t.v,T({model:"ace/mode/javascript",open:!0,fileName:"",can_format:!0,save:function(){var t=V(Z().m(function t(n){return Z().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i._U.post("http/proxy/server/code/save",{context:n,key:C.list[e].random_key});case 1:0===t.v.code&&(M.xK.set_value_temp(""),T({open:!1,model:"",fileName:"",save:null}));case 2:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}()}),M.xK.set_value_temp(n.data);case 3:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}();return r.createElement("div",null,r.createElement(o.fI,null,F.sys===H.XM.win&&r.createElement(o.VP,null,r.createElement(c.Zp,{title:"Http Proxy",rightBottomCom:r.createElement(s.C3,{text:e("保存"),clickFun:rt})},r.createElement(l.Sm,{placeholder:"ip (default localhost) ",value:h,handleInputChange:function(t){m(t)}}),r.createElement(l.Sm,{placeholder:"port ",value:y,handleInputChange:function(t){b(t)}}),r.createElement(l.Sm,{placeholder:"忽略ip ",value:E,handleInputChange:function(t){w(t)}}),r.createElement("form",null,e("请勿将代理服务器用于本地(Intranet)地址"),r.createElement(f.S,{isFlex:!0,columns:[r.createElement(l.U6,{value:1,context:e("开启"),selected:O,onchange:function(){j(!O)}}),r.createElement(l.U6,{value:1,context:e("关闭"),selected:!O,onchange:function(){j(!O)}})]})),r.createElement("form",null,e("状态"),r.createElement(f.S,{isFlex:!0,columns:[r.createElement(l.U6,{value:1,context:e("开启"),selected:x,onchange:function(){A(!x)}}),r.createElement(l.U6,{value:1,context:e("关闭"),selected:!x,onchange:function(){A(!x)}})]})))),F.sys===H.XM.mac&&r.createElement(o.VP,null,Y.map(function(t,n){return r.createElement(c.uF,{key:n,self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,t.name)," "),titleCom:r.createElement("div",null,r.createElement(s.rA,{icon:"save",title:e("保存"),onClick:function(){ot(n)}}))},r.createElement(f.X,{headers:z,rows:t.proxies.map(function(t,o){var i=[r.createElement(l.Sm,{value:t.port,handleInputChange:function(e){t.port=parseInt(e)},no_border:!0}),r.createElement(l.Sm,{value:t.ip,handleInputChange:function(e){t.ip=e},no_border:!0}),r.createElement("div",null,1===t.type?"http":"https"),r.createElement(l.l6,{value:t.enabled,onChange:function(t){!function(t,e,n){var r=X(Y);r[t].proxies[e].enabled="true"===n,J(r)}(n,o,t)},options:[{title:e("是"),value:!0},{title:e("否"),value:!1}],no_border:!0})];return i}),width:"10rem"}),"ignore ips",r.createElement(l.Sm,{value:t.bypass,handleInputChange:function(t){Y[n].bypass=t},no_border:!0}))})),r.createElement(o.VP,null,r.createElement(c.uF,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,e("Tcp Proxy"))," "),titleCom:r.createElement("div",null,r.createElement(s.rA,{icon:"add",title:e("添加"),onClick:function(){$([].concat(X(B),[{note:"",open:!1,port:0,target_port:0,target_ip:""}]))}}),r.createElement(s.rA,{icon:"save",title:e("保存"),onClick:it}))},r.createElement(f.X,{headers:N,rows:B.map(function(t,n){var o=[r.createElement(l.Sm,{value:t.port,handleInputChange:function(e){t.port=parseInt(e)},no_border:!0}),r.createElement(l.Sm,{value:t.target_ip,handleInputChange:function(e){t.target_ip=e},no_border:!0}),r.createElement(l.Sm,{value:t.target_port,handleInputChange:function(e){t.target_port=parseInt(e)},no_border:!0}),r.createElement(l.l6,{value:t.open,onChange:function(t){B[n].open="true"===t,$(X(B))},options:[{title:e("是"),value:!0},{title:e("否"),value:!1}],no_border:!0}),r.createElement(l.Sm,{value:t.note,handleInputChange:function(e){t.note=e},no_border:!0}),r.createElement("div",null,r.createElement(s.rA,{icon:"delete",title:e("删除"),onClick:function(){return function(t){B.splice(t,1),$(X(B))}(n)}}))];return o}),width:"10rem"})),r.createElement(c.uF,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,e("Http Proxy Server"))," "),titleCom:r.createElement("div",null,r.createElement(s.rA,{icon:"add",title:e("添加"),onClick:function(){C.list.push({note:"",open:!1}),I(W({},C))}}),r.createElement(s.rA,{icon:"save",title:e("保存"),onClick:at}))},r.createElement(f.X,{headers:Q,rows:C.list.map(function(t,n){return[r.createElement("div",null,r.createElement(s.rA,{icon:"edit",title:e("编辑"),onClick:function(){ut(n)}})),r.createElement(l.l6,{value:t.open,onChange:function(t){C.list[n].open="true"===t,I(W({},C))},options:[{title:e("是"),value:!0},{title:e("否"),value:!1}],no_border:!0}),r.createElement(l.Sm,{value:t.note,handleInputChange:function(e){t.note=e},no_border:!0}),r.createElement("div",null,r.createElement(s.rA,{icon:"delete",title:e("删除"),onClick:function(){C.list.splice(n,1),I(W({},C))}}))]}),width:"10rem"}),r.createElement("form",null,e("状态"),r.createElement(f.S,{isFlex:!0,columns:[r.createElement(l.U6,{value:1,context:e("开启"),selected:C.open,onchange:function(){I(W(W({},C),{},{open:!C.open}))}}),r.createElement(l.U6,{value:1,context:e("关闭"),selected:!C.open,onchange:function(){I(W(W({},C),{},{open:!C.open}))}})]})),"port",r.createElement(l.Sm,{value:C.port,handleInputChange:function(t){C.port=parseInt(t),I(W({},C))},no_border:!0})))))}var tt=n(2726),et=n(3413),nt=n.n(et),rt=n(7690);function ot(t){return function(t){if(Array.isArray(t))return pt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||ft(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 it(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof u?r:u,l=Object.create(c.prototype);return at(l,"_invoke",function(n,r,o){var i,u,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return i=e,u=0,c=t,p.n=n,a}};function h(n,r){for(u=n,c=r,e=0;!f&&l&&!o&&e<s.length;e++){var o,i=s[e],h=p.p,m=i[2];n>3?(o=m===r)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=h&&((o=n<2&&h<i[1])?(u=0,p.v=r,p.n=i[1]):h<m&&(o=n<3||i[0]>r||r>m)&&(i[4]=n,i[5]=r,p.n=m,u=0))}if(o||n>1)return a;throw f=!0,r}return function(o,s,m){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&h(s,m),u=s,c=m;(e=u<2?t:c)||!f;){i||(u?u<3?(u>1&&(p.n=-1),h(u,c)):p.n=c:p.v=c);try{if(l=2,i){if(u||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,u<2&&(u=0)}else 1===u&&(e=i.return)&&e.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=t}else if((e=(f=p.n<0)?c:n.call(r,p))!==a)break}catch(e){i=t,u=1,c=e}finally{l=1}}return{value:e,done:f}}}(n,o,i),!0),l}var a={};function u(){}function c(){}function l(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(at(e={},r,function(){return this}),e),f=l.prototype=u.prototype=Object.create(s);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,at(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=l,at(f,"constructor",l),at(l,"constructor",c),c.displayName="GeneratorFunction",at(l,o,"GeneratorFunction"),at(f),at(f,o,"Generator"),at(f,r,function(){return this}),at(f,"toString",function(){return"[object Generator]"}),(it=function(){return{w:i,m:p}})()}function at(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}at=function(t,e,n,r){function i(e,n){at(t,e,function(t){return this._invoke(e,n,t)})}e?o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(i("next",0),i("throw",1),i("return",2))},at(t,e,n,r)}function ut(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=ft(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function ct(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function lt(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){ct(i,r,o,a,u,"next",t)}function u(t){ct(i,r,o,a,u,"throw",t)}a(void 0)})}}function st(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,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||ft(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 ft(t,e){if(t){if("string"==typeof t)return pt(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)?pt(t,e):void 0}}function pt(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 ht(t){var e=(0,d.Bd)().t,n=st((0,r.useState)([]),2),p=n[0],h=n[1],m=st((0,r.useState)([]),2),y=m[0],b=m[1],g=st((0,r.useState)(""),2),E=g[0],w=g[1],S=st((0,r.useState)(""),2),x=S[0],A=S[1],_=st((0,r.useState)(!1),2),O=_[0],j=_[1],k=st((0,U.L4)(G.A.showPrompt),2),C=(k[0],k[1]),I=st((0,U.L4)(G.A.confirm),2),P=(I[0],I[1]);(0,r.useEffect)(function(){lt(it().m(function t(){var e,n,r,o,a,c,l;return it().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i.ez.get("ips/dnspod");case 1:if((e=t.v).code===u.m.Success){t.n=2;break}return t.a(2);case 2:n=e.data,r=[],o=[],a=ut(n.ips);try{for(a.s();!(c=a.n()).done;)(l=c.value).isIPv4?r.push(l):o.push(l)}catch(t){a.e(t)}finally{a.f()}h(r),b(o),n.account&&(w(n.account.id),A(n.account.token)),j(n.isOpen);case 3:return t.a(2)}},t)}))()},[]);var T=function(){var t=lt(it().m(function t(){var e,n,r,o,a,c;return it().w(function(t){for(;;)switch(t.n){case 0:if(!O||E&&x){t.n=1;break}return new(nt())({type:"error",text:"id和token都不能为空",timeout:1e3,layout:"bottomLeft"}).show(),t.a(2);case 1:for(e=new tt.yL,n=[],r=0,o=[].concat(ot(p),ot(y));r<o.length;r++)(a=o[r]).ddnsHost&&n.push(a);return e.ips=n,e.account={id:E,token:x},e.isOpen=O,e.ddnsType=tt.E2.dnspod,t.n=2,i.ez.post("save",e);case 2:(c=t.v).code===u.m.DdnsAuthFail?new(nt())({type:"error",text:c.data,timeout:1e3,layout:"bottomLeft"}).show():new(nt())({type:"success",text:c.data,timeout:1e3,layout:"bottomLeft"}).show();case 3:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),L=function(){var t=lt(it().m(function t(e){return it().w(function(t){for(;;)switch(t.n){case 0:P({open:!0,handle:function(){var t=lt(it().m(function t(){return it().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i.ez.post("http/del",e);case 1:0===t.v.code&&(0,a.LW)("删除成功,稍后请刷新"),P({open:!1,handle:null});case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),title:"确定删除吗?"});case 1:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}();return r.createElement("div",null,r.createElement(v.A,null,r.createElement(s.rA,{icon:"add",title:e("添加http获取ip"),onClick:function(){C({show:!0,type:rt.PromptEnum.DdnsAddHttp,overlay:!0,data:{}})}})),r.createElement(o.fI,null,r.createElement(o.VP,null,r.createElement(c.Zp,{title:"ipv4"},p.length>0&&p.map(function(t,n){return r.createElement("div",{key:n},"".concat(t.ifaceOrWww,"(").concat(t.ip,")"),r.createElement(l.Sm,{right_placeholder:r.createElement("div",null,t.source_type===tt.tC.http_get&&r.createElement(s.rA,{icon:"delete",title:e("删除"),onClick:function(){L(t)}})),placeholder:"a.abc.com b.abc.com ...",value:t.ddnsHost,handleInputChange:function(e){t.ddnsHost=e}}))})),r.createElement(c.Zp,{title:"ipv6"},y.length>0&&y.map(function(t,n){return r.createElement("div",{key:n},"".concat(t.ifaceOrWww,"(").concat(t.ip,")"),r.createElement(l.Sm,{right_placeholder:r.createElement("div",null,t.source_type===tt.tC.http_get&&r.createElement(s.rA,{icon:"delete",title:e("删除"),onClick:function(){L(t)}})),placeholder:"a.abc.com b.abc.com ...",value:t.ddnsHost,handleInputChange:function(e){t.ddnsHost=e}}))}))),r.createElement(o.VP,null,r.createElement(c.Zp,{title:e("账号设置"),rightBottomCom:r.createElement(s.C3,{text:e("保存"),clickFun:T})},r.createElement(l.Sm,{placeholder:"ID",value:E,handleInputChange:function(t){w(t)}}),r.createElement(l.cA,{placeholder:"TOKEN",value:x,handleInputChange:function(t){A(t)}}),r.createElement(f.S,{isFlex:!0,columns:[r.createElement(l.U6,{value:1,context:e("开启"),selected:O,onchange:function(){j(!O)}}),r.createElement(l.U6,{value:1,context:e("关闭"),selected:!O,onchange:function(){j(!O)}})]})),r.createElement(c.Zp,{title:e("说明")},"域名如果不存在会自动创建,空子域名是@,ip6和ipv4可以互相切换。"))))}function mt(t){return function(t){if(Array.isArray(t))return St(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||wt(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 dt(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof u?r:u,l=Object.create(c.prototype);return vt(l,"_invoke",function(n,r,o){var i,u,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return i=e,u=0,c=t,p.n=n,a}};function h(n,r){for(u=n,c=r,e=0;!f&&l&&!o&&e<s.length;e++){var o,i=s[e],h=p.p,m=i[2];n>3?(o=m===r)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=h&&((o=n<2&&h<i[1])?(u=0,p.v=r,p.n=i[1]):h<m&&(o=n<3||i[0]>r||r>m)&&(i[4]=n,i[5]=r,p.n=m,u=0))}if(o||n>1)return a;throw f=!0,r}return function(o,s,m){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&h(s,m),u=s,c=m;(e=u<2?t:c)||!f;){i||(u?u<3?(u>1&&(p.n=-1),h(u,c)):p.n=c:p.v=c);try{if(l=2,i){if(u||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,u<2&&(u=0)}else 1===u&&(e=i.return)&&e.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=t}else if((e=(f=p.n<0)?c:n.call(r,p))!==a)break}catch(e){i=t,u=1,c=e}finally{l=1}}return{value:e,done:f}}}(n,o,i),!0),l}var a={};function u(){}function c(){}function l(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(vt(e={},r,function(){return this}),e),f=l.prototype=u.prototype=Object.create(s);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,vt(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=l,vt(f,"constructor",l),vt(l,"constructor",c),c.displayName="GeneratorFunction",vt(l,o,"GeneratorFunction"),vt(f),vt(f,o,"Generator"),vt(f,r,function(){return this}),vt(f,"toString",function(){return"[object Generator]"}),(dt=function(){return{w:i,m:p}})()}function vt(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}vt=function(t,e,n,r){function i(e,n){vt(t,e,function(t){return this._invoke(e,n,t)})}e?o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(i("next",0),i("throw",1),i("return",2))},vt(t,e,n,r)}function yt(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=wt(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function bt(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function gt(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){bt(i,r,o,a,u,"next",t)}function u(t){bt(i,r,o,a,u,"throw",t)}a(void 0)})}}function Et(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,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||wt(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 wt(t,e){if(t){if("string"==typeof t)return St(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)?St(t,e):void 0}}function St(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 xt(t){var e=(0,d.Bd)().t,n=Et((0,r.useState)([]),2),p=n[0],h=n[1],m=Et((0,r.useState)([]),2),y=m[0],b=m[1],g=Et((0,r.useState)(""),2),E=g[0],w=g[1],S=Et((0,r.useState)(""),2),x=S[0],A=S[1],_=Et((0,r.useState)(!1),2),O=_[0],j=_[1],k=Et((0,U.L4)(G.A.showPrompt),2),C=(k[0],k[1]),I=Et((0,U.L4)(G.A.confirm),2),P=(I[0],I[1]);(0,r.useEffect)(function(){gt(dt().m(function t(){var e,n,r,o,a,c,l;return dt().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i.ez.get("ips/tx");case 1:if((e=t.v).code===u.m.Success){t.n=2;break}return t.a(2);case 2:n=e.data,r=[],o=[],a=yt(n.ips);try{for(a.s();!(c=a.n()).done;)(l=c.value).isIPv4?r.push(l):o.push(l)}catch(t){a.e(t)}finally{a.f()}h(r),b(o),n.account&&(w(n.account.secretid),A(n.account.secretkey)),j(n.isOpen);case 3:return t.a(2)}},t)}))()},[]);var T=function(){var t=gt(dt().m(function t(){var e,n,r,o,a,c;return dt().w(function(t){for(;;)switch(t.n){case 0:if(!O||E&&x){t.n=1;break}return new(nt())({type:"error",text:"SecretId和SecretKey都不能为空",timeout:1e3,layout:"bottomLeft"}).show(),t.a(2);case 1:for(e=new tt.yL,n=[],r=0,o=[].concat(mt(p),mt(y));r<o.length;r++)(a=o[r]).ddnsHost&&n.push(a);return e.ips=n,e.account={secretid:E,secretkey:x},e.isOpen=O,e.ddnsType=tt.E2.tengxun,t.n=2,i.ez.post("save",e);case 2:(c=t.v).code===u.m.DdnsAuthFail?new(nt())({type:"error",text:c.data,timeout:1e3,layout:"bottomLeft"}).show():new(nt())({type:"success",text:c.data,timeout:1e3,layout:"bottomLeft"}).show();case 3:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),L=function(){var t=gt(dt().m(function t(e){return dt().w(function(t){for(;;)switch(t.n){case 0:P({open:!0,handle:function(){var t=gt(dt().m(function t(){return dt().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i.ez.post("http/del",e);case 1:0===t.v.code&&(0,a.LW)("删除成功,稍后请刷新"),P({open:!1,handle:null});case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),title:"确定删除吗?"});case 1:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}();return r.createElement("div",null,r.createElement(v.A,null,r.createElement(s.rA,{icon:"add",title:e("添加http获取ip"),onClick:function(){C({show:!0,type:rt.PromptEnum.DdnsAddHttp,overlay:!0,data:{}})}})),r.createElement(o.fI,null,r.createElement(o.VP,null,r.createElement(c.Zp,{title:"ipv4"},p.length>0&&p.map(function(t,n){return r.createElement("div",{key:n},"".concat(t.ifaceOrWww,"(").concat(t.ip,")"),r.createElement(l.Sm,{right_placeholder:r.createElement("div",null,t.source_type===tt.tC.http_get&&r.createElement(s.rA,{icon:"delete",title:e("删除"),onClick:function(){L(t)}})),placeholder:"a.abc.com b.abc.com ...",value:t.ddnsHost,handleInputChange:function(e){t.ddnsHost=e}}))})),r.createElement(c.Zp,{title:"ipv6"},y.length>0&&y.map(function(t,n){return r.createElement("div",{key:n},"".concat(t.ifaceOrWww,"(").concat(t.ip,")"),r.createElement(l.Sm,{right_placeholder:r.createElement("div",null,t.source_type===tt.tC.http_get&&r.createElement(s.rA,{icon:"delete",title:e("删除"),onClick:function(){L(t)}})),placeholder:"a.abc.com b.abc.com ...",value:t.ddnsHost,handleInputChange:function(e){t.ddnsHost=e}}))}))),r.createElement(o.VP,null,r.createElement(c.Zp,{title:e("账号设置"),rightBottomCom:r.createElement(s.C3,{text:e("保存"),clickFun:T})},r.createElement(l.Sm,{placeholder:"SecretId",value:E,handleInputChange:function(t){w(t)}}),r.createElement(l.cA,{placeholder:"SecretKey",value:x,handleInputChange:function(t){A(t)}}),r.createElement(f.S,{isFlex:!0,columns:[r.createElement(l.U6,{value:1,context:e("开启"),selected:O,onchange:function(){j(!O)}}),r.createElement(l.U6,{value:1,context:e("关闭"),selected:!O,onchange:function(){j(!O)}})]})),r.createElement(c.Zp,{title:e("说明")},"域名如果不存在会自动创建,空子域名是@,ip6和ipv4可以互相切换。"))))}function At(){var t=(0,d.Bd)().t,e=(0,M.MH)().check_user_auth,n=[];return e(H.oV.vir_net)&&n.push.apply(n,[{index:1,name:t("系统")+t("代理"),rto:"proxy_sys/",component:r.createElement(Q,null)},{index:2,name:"Tun proxy "+t("客户端"),rto:"client/",component:r.createElement(N,null)},{index:3,name:"Tun proxy "+t("服务端"),rto:"server/",component:r.createElement(k,null)}]),e(H.oV.ddns)&&n.push.apply(n,[{index:4,name:"ddns-dnspod(".concat(t("腾讯"),")"),rto:"dnspod/",component:r.createElement(ht,null)},{index:5,name:"ddns-".concat(t("腾讯")).concat(t("云")),rto:"tengxun/",component:r.createElement(xt,null)}]),r.createElement(o.W1,{optionList:n})}},1028(t,e,n){"use strict";n.d(e,{A:()=>u});var r=n(1601),o=n.n(r),i=n(6314),a=n.n(i)()(o());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),o=n.n(r),i=n(7825),a=n.n(i),u=n(7659),c=n.n(u),l=n(5056),s=n.n(l),f=n(540),p=n.n(f),h=n(1113),m=n.n(h),d=n(1028),v={};v.styleTagTransform=m(),v.setAttributes=s(),v.insert=c().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=p();o()(d.A,v),d.A&&d.A.locals&&d.A.locals}}]);
|
|
1
|
+
/*! For license information please see 53.a0c838b8cd37589229d5.js.LICENSE.txt */
|
|
2
|
+
(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[53,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=o(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 o=e[r],i=t.input.getAttribute("data-"+r.toLowerCase());t[r]="number"==typeof o?parseInt(i):!1===o?null!==i:o instanceof Function?null:i,t[r]||0===t[r]||(t[r]=r in n?n[r]:o)}}(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=o.create("ul",{hidden:"hidden",role:"listbox",id:"awesomplete_list_"+this.count,inside:this.container,"aria-label":this.listLabel}),this.status=o.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))}}}},o.bind(this.input,this._events.input),o.bind(this.input.form,this._events.form),o.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=o(t))&&t.children){var e=[];r.apply(t.children).forEach(function(t){if(!t.disabled){var n=t.textContent.trim(),r=t.value||n,o=t.label||n;""!==r&&e.push({label:o,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",""),o.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),o.fire(this.input,"awesomplete-open")},destroy:function(){if(o.unbind(this.input,this._events.input),o.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,o.fire(this.input,"awesomplete-highlight",{text:this.suggestions[this.index]}))},select:function(t,e,n){if(t?this.index=o.siblingIndex(t):t=this.ul.children[this.index],t){var r=this.suggestions[this.index];o.fire(this.input,"awesomplete-select",{text:r,origin:e||t,originalEvent:n})&&(this.replace(r),this.close({reason:"select"}),o.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(o.regExpEscape(e.trim()),"i").test(t)},e.FILTER_STARTSWITH=function(t,e){return RegExp("^"+o.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 o.create("div",{className:"awesomplete",around:t})},e.ITEM=function(t,e,n){var r=""===e.trim()?t:t.replace(RegExp(o.regExpEscape(e.trim()),"gi"),"<mark>$&</mark>");return o.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 o(t,e){return"string"==typeof t?(e||document).querySelector(t):t||null}function i(t,e){return r.call((e||document).querySelectorAll(t))}function a(){i("input.awesomplete").forEach(function(t){new e(t)})}o.create=function(t,e){var n=document.createElement(t);for(var r in e){var i=e[r];if("inside"===r)o(i).appendChild(n);else if("around"===r){var a=o(i);a.parentNode.insertBefore(n,a),n.appendChild(a),null!=a.getAttribute("autofocus")&&a.focus()}else r in n?n[r]=i:n.setAttribute(r,i)}return n},o.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)})}},o.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)})}},o.fire=function(t,e,n){var r=document.createEvent("HTMLEvents");for(var o in r.initEvent(e,!0,!0),n)r[o]=n[o];return t.dispatchEvent(r)},o.regExpEscape=function(t){return t.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")},o.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.$=o,e.$$=i,t.exports&&(t.exports=e)}()},8694(t,e,n){"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function o(t,e,n){return(e=u(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,u(r.key),r)}}function a(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(t){var e=function(t,e){if("object"!=r(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e||"default");if("object"!=r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==r(e)?e:e+""}function c(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}n.d(e,{$K:()=>f,RB:()=>h,l5:()=>d,qB:()=>l,vo:()=>p,vr:()=>m});var l=a(function t(){c(this,t)}),s=function(t){return t[t.tcp=0]="tcp",t[t.udp=1]="udp",t}({}),f=a(function t(){c(this,t),o(this,"open",!1),o(this,"key",""),o(this,"async_ips",[])}),p=a(function t(){c(this,t),o(this,"open",!1),o(this,"key",""),o(this,"model",s.udp)}),h=function(t){return t[t.row=1]="row",t[t.json=2]="json",t[t.form=3]="form",t}({}),m=a(function t(){c(this,t)}),d=a(function t(){c(this,t)})},7481(t,e,n){"use strict";n.d(e,{S:()=>u,X:()=>a});var r=n(6540);function o(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,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return i(t,e);var 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)?i(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function a(t){var e,n=o(r.useState([]),2),i=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,i.map(function(e,n){return r.createElement("tr",{key:n,onContextMenu:function(){t.handleContextMenu&&t.handleContextMenu(e)}},e.map(function(n,o){var i;return r.createElement("td",{style:{width:null!==(i=t.width)&&void 0!==i?i:"auto"},key:o,className:o===e.length-1?"small":""},n)}))})))}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)}))}},5595(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>At});var r=n(6540),o=n(5725),i=n(4284),a=n(2042),u=n(3459),c=n(447),l=n(3033),s=n(5997),f=n(7481),p=n(8694),h=n(4944),m=n(4188),d=n(2389),v=n(7952);function y(t){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},y(t)}function b(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function g(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=y(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==y(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function E(t){return function(t){if(Array.isArray(t))return j(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",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof u?r:u,l=Object.create(c.prototype);return S(l,"_invoke",function(n,r,o){var i,u,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return i=e,u=0,c=t,p.n=n,a}};function h(n,r){for(u=n,c=r,e=0;!f&&l&&!o&&e<s.length;e++){var o,i=s[e],h=p.p,m=i[2];n>3?(o=m===r)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=h&&((o=n<2&&h<i[1])?(u=0,p.v=r,p.n=i[1]):h<m&&(o=n<3||i[0]>r||r>m)&&(i[4]=n,i[5]=r,p.n=m,u=0))}if(o||n>1)return a;throw f=!0,r}return function(o,s,m){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&h(s,m),u=s,c=m;(e=u<2?t:c)||!f;){i||(u?u<3?(u>1&&(p.n=-1),h(u,c)):p.n=c:p.v=c);try{if(l=2,i){if(u||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,u<2&&(u=0)}else 1===u&&(e=i.return)&&e.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=t}else if((e=(f=p.n<0)?c:n.call(r,p))!==a)break}catch(e){i=t,u=1,c=e}finally{l=1}}return{value:e,done:f}}}(n,o,i),!0),l}var a={};function u(){}function c(){}function l(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(S(e={},r,function(){return this}),e),f=l.prototype=u.prototype=Object.create(s);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,S(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=l,S(f,"constructor",l),S(l,"constructor",c),c.displayName="GeneratorFunction",S(l,o,"GeneratorFunction"),S(f),S(f,o,"Generator"),S(f,r,function(){return this}),S(f,"toString",function(){return"[object Generator]"}),(w=function(){return{w:i,m:p}})()}function S(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}S=function(t,e,n,r){function i(e,n){S(t,e,function(t){return this._invoke(e,n,t)})}e?o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(i("next",0),i("throw",1),i("return",2))},S(t,e,n,r)}function x(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function A(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){x(i,r,o,a,u,"next",t)}function u(t){x(i,r,o,a,u,"throw",t)}a(void 0)})}}function _(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,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}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 j(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)?j(t,e):void 0}}function j(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 k(t){var e=(0,d.Bd)().t,n=_((0,r.useState)(void 0),2),y=n[0],S=n[1],x=_((0,r.useState)(!1),2),j=x[0],k=x[1],C=_((0,r.useState)(""),2),I=C[0],P=C[1],T=_((0,r.useState)([e("".concat(e("名称"))),e("".concat(e("虚拟"),"ip")),"".concat(e("物理"),"信息"),e("在线状态"),e("选择")]),2),L=T[0],F=(T[1],_((0,r.useState)([]),2)),G=F[0],N=F[1],U=_((0,r.useState)({}),2),H=U[0],M=U[1],D=_((0,r.useState)(!1),2),R=D[0],B=D[1],W=function(t){var n,o=function(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,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}(t);try{for(o.s();!(n=o.n()).done;){var i=n.value,a=i[i.length-1];i[i.length-1]=r.createElement(r.Fragment,null,r.createElement(c.fq,{ok:a}),e(a?"在线":"离线")),i[0]=r.createElement(c.xP,{context:i[0],tip_context:i[0]}),i[2]=r.createElement(c.xP,{context:i[2],tip_context:i[2]})}}catch(t){o.e(t)}finally{o.f()}};(0,r.useEffect)(function(){var t=function(){var t=A(w().m(function t(){var e;return w().w(function(t){for(;;)switch(t.n){case 0:return e=new m.hf(m.HK.vir_net_serverIno_get),h.ws.addMsg(m.HK.vir_net_serverIno_get,function(t){W(t.context),N(t.context)}),t.n=1,h.ws.send(e);case 1:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();t();var e=function(){var t=A(w().m(function t(){var e,n;return w().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i._U.get("vir/server/get");case 1:if((e=t.v).code===u.m.Success){t.n=2;break}return t.a(2);case 2:n=e.data,S(n.port),P(n.key),k(n.open);case 3:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();return e(),function(){}},[]);var $=function(){var t=A(w().m(function t(){var e;return w().w(function(t){for(;;)switch(t.n){case 0:return(e=new p.$K).open=j,e.key=I,R&&(e.async_ips=Object.keys(H)),y&&(e.port=parseInt(y)),t.n=1,i._U.post("vir/server/save",e);case 1:if(t.v.code===u.m.Success){t.n=2;break}return(0,a.zN)("网络错误"),t.a(2);case 2:(0,a.LW)("保存成功"),B(!1);case 3:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),X=function(){var t=A(w().m(function t(){return w().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i._U.post("vir/server/delete/client",{ips:Object.keys(H)});case 1:M({});case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();return r.createElement("div",null,r.createElement(v.A,null,!!Object.keys(H).length&&H[0],!!Object.keys(H).length&&r.createElement(s.rA,{icon:"delete",title:"删除",onClick:X})),r.createElement(o.fI,null,r.createElement(o.VP,null,r.createElement(c.Zp,{title:"",rightBottomCom:r.createElement(s.C3,{text:e("保存"),clickFun:$})},r.createElement(l.Sm,{placeholder:"port",value:y,handleInputChange:function(t){S(t)}}),r.createElement(l.Sm,{placeholder:"key ",value:I,handleInputChange:function(t){P(t)}}),r.createElement("form",null,e("状态"),":",r.createElement(f.S,{isFlex:!0,columns:[r.createElement(l.U6,{value:1,context:e("开启"),selected:j,onchange:function(){k(!j)}}),r.createElement(l.U6,{value:1,context:e("关闭"),selected:!j,onchange:function(){k(!j)}})]})),!!Object.keys(H).length&&r.createElement(l.GL,{context:e("同步信息给选中服务器"),selected:R,onchange:function(){B(!R)}})),r.createElement(c.Zp,{title:""},r.createElement(f.X,{headers:L,rows:G.map(function(t){return[].concat(E(t),[r.createElement(l.GL,{context:e(""),selected:H[t[1]],onchange:function(){var e=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?b(Object(n),!0).forEach(function(e){g(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},H);e[t[1]]?delete e[t[1]]:e[t[1]]=t,M(e)}})])}),width:"10rem"})))))}function C(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof u?r:u,l=Object.create(c.prototype);return I(l,"_invoke",function(n,r,o){var i,u,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return i=e,u=0,c=t,p.n=n,a}};function h(n,r){for(u=n,c=r,e=0;!f&&l&&!o&&e<s.length;e++){var o,i=s[e],h=p.p,m=i[2];n>3?(o=m===r)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=h&&((o=n<2&&h<i[1])?(u=0,p.v=r,p.n=i[1]):h<m&&(o=n<3||i[0]>r||r>m)&&(i[4]=n,i[5]=r,p.n=m,u=0))}if(o||n>1)return a;throw f=!0,r}return function(o,s,m){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&h(s,m),u=s,c=m;(e=u<2?t:c)||!f;){i||(u?u<3?(u>1&&(p.n=-1),h(u,c)):p.n=c:p.v=c);try{if(l=2,i){if(u||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,u<2&&(u=0)}else 1===u&&(e=i.return)&&e.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=t}else if((e=(f=p.n<0)?c:n.call(r,p))!==a)break}catch(e){i=t,u=1,c=e}finally{l=1}}return{value:e,done:f}}}(n,o,i),!0),l}var a={};function u(){}function c(){}function l(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(I(e={},r,function(){return this}),e),f=l.prototype=u.prototype=Object.create(s);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,I(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=l,I(f,"constructor",l),I(l,"constructor",c),c.displayName="GeneratorFunction",I(l,o,"GeneratorFunction"),I(f),I(f,o,"Generator"),I(f,r,function(){return this}),I(f,"toString",function(){return"[object Generator]"}),(C=function(){return{w:i,m:p}})()}function I(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}I=function(t,e,n,r){function i(e,n){I(t,e,function(t){return this._invoke(e,n,t)})}e?o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(i("next",0),i("throw",1),i("return",2))},I(t,e,n,r)}function P(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function T(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){P(i,r,o,a,u,"next",t)}function u(t){P(i,r,o,a,u,"throw",t)}a(void 0)})}}function L(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,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||function(t,e){if(t){if("string"==typeof t)return F(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)?F(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 F(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,d.Bd)().t,n=L((0,r.useState)(""),2),v=n[0],y=n[1],b=L((0,r.useState)(void 0),2),g=b[0],E=b[1],w=L((0,r.useState)(""),2),S=w[0],x=w[1],A=L((0,r.useState)(""),2),_=A[0],O=A[1],j=L((0,r.useState)(void 0),2),k=j[0],I=j[1],P=L((0,r.useState)(!1),2),F=P[0],G=P[1],N=L((0,r.useState)(""),2),U=N[0],H=N[1],M=L((0,r.useState)(!1),2),D=M[0],R=M[1];(0,r.useEffect)(function(){var t=function(){var t=T(C().m(function t(){var e,n,r,o,a;return C().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i._U.get("vir/client/get");case 1:if((e=t.v).code===u.m.Success){t.n=2;break}return t.a(2);case 2:if(n=e.data,I(n.serverPort),x(n.serverIp),y(n.ip),E(n.mask),H(n.key),G(n.open),O(n.client_name),!n.open){t.n=4;break}return r=new m.hf(m.HK.vir_net_client_get),t.n=3,h.ws.send(r);case 3:o=t.v,a=o.context.state,R(a),h.ws.addMsg(m.HK.vir_net_client_get,function(t){R(t.context.state)});case 4:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();t()},[]);var B=function(){var t=T(C().m(function t(){var e;return C().w(function(t){for(;;)switch(t.n){case 0:return(e=new p.vo).ip=v,e.mask=parseInt(g),e.key=U,e.serverIp=S,e.serverPort=parseInt(k),e.open=F,e.client_name=_,t.n=1,i._U.post("vir/client/save",e);case 1:if(t.v.code===u.m.Success){t.n=2;break}return(0,a.zN)("网络错误"),t.a(2);case 2:(0,a.LW)("保存成功");case 3:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();return r.createElement("div",null,r.createElement(o.fI,null,r.createElement(o.VP,null,r.createElement(c.Zp,{title:"",rightBottomCom:r.createElement(s.C3,{text:e("保存"),clickFun:B}),titleCom:r.createElement("div",null,e("连接状态"),r.createElement(c.fq,{ok:D}))},r.createElement(l.Sm,{placeholder:"ip ",value:v,handleInputChange:function(t){y(t)}}),r.createElement(l.Sm,{placeholder:"mask",value:g,handleInputChange:function(t){E(t)}}),r.createElement(l.Sm,{placeholder:"".concat(e("服务器"),"ip"),value:S,handleInputChange:function(t){x(t)}}),r.createElement(l.Sm,{placeholder:"".concat(e("服务器"),"part"),value:k,handleInputChange:function(t){I(t)}}),r.createElement(l.Sm,{placeholder:"名称 ",value:_,handleInputChange:function(t){O(t)}}),r.createElement(l.Sm,{placeholder:"key ",value:U,handleInputChange:function(t){H(t)}}),r.createElement("form",null,e("状态"),r.createElement(f.S,{isFlex:!0,columns:[r.createElement(l.U6,{value:1,context:e("开启"),selected:F,onchange:function(){G(!F)}}),r.createElement(l.U6,{value:1,context:e("关闭"),selected:!F,onchange:function(){G(!F)}})]}))),r.createElement(c.Zp,{title:""},r.createElement("div",null,"ip: 虚拟ip, “10.0.0.0 - 10.255.255.255”和“172.16.0.0 - 172.31.255.255”和“192.168.0.0 - 192.168.255.255”这三个网段属于内网ip"),r.createElement("div",null,"mask: 一些常见的子网掩码网段/8:255.0.0.0;/16:255.255.0.0 ;/24:255.255.255.0"),r.createElement("div",null,"key:用于验证身份信息并加密的和服务器设置的一样")))))}var N=n(7444),U=n(6417),H=n(3430),M=n(8247),D=n(1499);function R(t){return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},R(t)}function B(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function W(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?B(Object(n),!0).forEach(function(e){$(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function $(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=R(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=R(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==R(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function X(t){return function(t){if(Array.isArray(t))return J(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Y(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 Z(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof u?r:u,l=Object.create(c.prototype);return z(l,"_invoke",function(n,r,o){var i,u,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return i=e,u=0,c=t,p.n=n,a}};function h(n,r){for(u=n,c=r,e=0;!f&&l&&!o&&e<s.length;e++){var o,i=s[e],h=p.p,m=i[2];n>3?(o=m===r)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=h&&((o=n<2&&h<i[1])?(u=0,p.v=r,p.n=i[1]):h<m&&(o=n<3||i[0]>r||r>m)&&(i[4]=n,i[5]=r,p.n=m,u=0))}if(o||n>1)return a;throw f=!0,r}return function(o,s,m){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&h(s,m),u=s,c=m;(e=u<2?t:c)||!f;){i||(u?u<3?(u>1&&(p.n=-1),h(u,c)):p.n=c:p.v=c);try{if(l=2,i){if(u||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,u<2&&(u=0)}else 1===u&&(e=i.return)&&e.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=t}else if((e=(f=p.n<0)?c:n.call(r,p))!==a)break}catch(e){i=t,u=1,c=e}finally{l=1}}return{value:e,done:f}}}(n,o,i),!0),l}var a={};function u(){}function c(){}function l(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(z(e={},r,function(){return this}),e),f=l.prototype=u.prototype=Object.create(s);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,z(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=l,z(f,"constructor",l),z(l,"constructor",c),c.displayName="GeneratorFunction",z(l,o,"GeneratorFunction"),z(f),z(f,o,"Generator"),z(f,r,function(){return this}),z(f,"toString",function(){return"[object Generator]"}),(Z=function(){return{w:i,m:p}})()}function z(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}z=function(t,e,n,r){function i(e,n){z(t,e,function(t){return this._invoke(e,n,t)})}e?o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(i("next",0),i("throw",1),i("return",2))},z(t,e,n,r)}function K(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function V(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){K(i,r,o,a,u,"next",t)}function u(t){K(i,r,o,a,u,"throw",t)}a(void 0)})}}function q(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,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||Y(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Y(t,e){if(t){if("string"==typeof t)return J(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)?J(t,e):void 0}}function J(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 Q(t){var e=(0,d.Bd)().t,n=q((0,r.useState)(""),2),h=n[0],m=n[1],v=q((0,r.useState)(""),2),y=v[0],b=v[1],g=q((0,r.useState)(""),2),E=g[0],w=g[1],S=q((0,r.useState)(!1),2),x=S[0],A=S[1],_=q((0,r.useState)(!1),2),O=_[0],j=_[1],k=q((0,r.useState)({port:0,open:!1,list:[]}),2),C=k[0],I=k[1],P=q((0,N.L4)(U.AG.editorSetting),2),T=(P[0],P[1]),L=q((0,N.L4)(U.AG.user_base_info),2),F=L[0],G=(L[1],[e("端口"),e("目标地址"),e("目标端口"),e("开启"),e("备注"),e("删除")]),R=q((0,r.useState)([]),2),B=R[0],$=R[1],z=[e("port"),e("ip"),e("type"),e("开启")],K=q((0,r.useState)([]),2),Y=K[0],J=K[1],Q=[e("编辑"),e("开启"),e("备注"),e("删除")],tt=function(){var t=V(Z().m(function t(){var e,n;return Z().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i._U.post("http/proxy/get/win");case 1:(e=t.v).code===u.m.Success&&(n=e.data,m(n.ip),b(n.port),A(n.enabled),w(n.bypass),j(n.useForLocal));case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),et=function(){var t=V(Z().m(function t(){var e,n,r,o,a,c;return Z().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i._U.post("http/proxy/get/mac");case 1:if((e=t.v).code===u.m.Success){t.n=2;break}return t.a(2);case 2:for(n=[],r=[],o=0,a=e.data;o<a.length;o++)"Wi-Fi"===(c=a[o]).name?n.push(c):r.push(c);J([].concat(n,r));case 3:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),nt=function(){var t=V(Z().m(function t(){var e,n,r,o,a,c;return Z().w(function(t){for(;;)switch(t.n){case 0:return e=[i._U.post("vir/client/tcp_proxy/get"),i._U.post("http/proxy/server/get")],F.sys===H.XM.mac?n=et():F.sys===H.XM.win&&(n=tt()),n&&e.push(n),t.n=1,Promise.all(e);case 1:r=t.v,o=q(r,2),a=o[0],c=o[1],a.code===u.m.Success&&$(a.data),c.code===u.m.Success&&I(c.data);case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();(0,r.useEffect)(function(){nt()},[]);var rt=function(){var t=V(Z().m(function t(){var e;return Z().w(function(t){for(;;)switch(t.n){case 0:return(e=new p.l5).port=parseInt(y),e.enabled=x,e.useForLocal=O,e.ip=h,e.bypass=E,t.n=1,i._U.post("http/proxy/set/win",e);case 1:t.v.code===u.m.Success&&(nt(),(0,a.LW)("保存成功"));case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),ot=function(){var t=V(Z().m(function t(e){var n;return Z().w(function(t){for(;;)switch(t.n){case 0:return n=Y[e],t.n=1,i._U.post("http/proxy/set/mac",[n]);case 1:t.v.code===u.m.Success&&(nt(),(0,a.LW)("保存成功"));case 2:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}(),it=function(){var t=V(Z().m(function t(){var e,n;return Z().w(function(t){for(;;)switch(t.n){case 0:for(e=[],n=0;n<B.length;n++)B[n].index=n,e.push(B[n]);return t.n=1,i._U.post("vir/client/tcp_proxy/save",e);case 1:t.v.code===u.m.Success&&((0,a.LW)("保存成功"),nt());case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),at=function(){var t=V(Z().m(function t(){return Z().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i._U.post("http/proxy/server/save",C);case 1:t.v.code===u.m.Success&&(nt(),(0,a.LW)("保存成功"));case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),ut=function(){var t=V(Z().m(function t(e){var n;return Z().w(function(t){for(;;)switch(t.n){case 0:if(C.list[e].random_key){t.n=1;break}return C.list[e].random_key=(0,D.hU)(),I(W({},C)),t.n=1,at();case 1:return t.n=2,i._U.post("http/proxy/server/code/get",{key:C.list[e].random_key});case 2:n=t.v,T({model:"ace/mode/javascript",open:!0,fileName:"",can_format:!0,save:function(){var t=V(Z().m(function t(n){return Z().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i._U.post("http/proxy/server/code/save",{context:n,key:C.list[e].random_key});case 1:0===t.v.code&&(M.xK.set_value_temp(""),T({open:!1,model:"",fileName:"",save:null}));case 2:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}()}),M.xK.set_value_temp(n.data);case 3:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}();return r.createElement("div",null,r.createElement(o.fI,null,F.sys===H.XM.win&&r.createElement(o.VP,null,r.createElement(c.Zp,{title:"Http Proxy",rightBottomCom:r.createElement(s.C3,{text:e("保存"),clickFun:rt})},r.createElement(l.Sm,{placeholder:"ip (default localhost) ",value:h,handleInputChange:function(t){m(t)}}),r.createElement(l.Sm,{placeholder:"port ",value:y,handleInputChange:function(t){b(t)}}),r.createElement(l.Sm,{placeholder:"忽略ip ",value:E,handleInputChange:function(t){w(t)}}),r.createElement("form",null,e("请勿将代理服务器用于本地(Intranet)地址"),r.createElement(f.S,{isFlex:!0,columns:[r.createElement(l.U6,{value:1,context:e("开启"),selected:O,onchange:function(){j(!O)}}),r.createElement(l.U6,{value:1,context:e("关闭"),selected:!O,onchange:function(){j(!O)}})]})),r.createElement("form",null,e("状态"),r.createElement(f.S,{isFlex:!0,columns:[r.createElement(l.U6,{value:1,context:e("开启"),selected:x,onchange:function(){A(!x)}}),r.createElement(l.U6,{value:1,context:e("关闭"),selected:!x,onchange:function(){A(!x)}})]})))),F.sys===H.XM.mac&&r.createElement(o.VP,null,Y.map(function(t,n){return r.createElement(c.uF,{key:n,self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,t.name)," "),titleCom:r.createElement("div",null,r.createElement(s.rA,{icon:"save",title:e("保存"),onClick:function(){ot(n)}}))},r.createElement(f.X,{headers:z,rows:t.proxies.map(function(t,o){var i=[r.createElement(l.Sm,{value:t.port,handleInputChange:function(e){t.port=parseInt(e)},no_border:!0}),r.createElement(l.Sm,{value:t.ip,handleInputChange:function(e){t.ip=e},no_border:!0}),r.createElement("div",null,1===t.type?"http":"https"),r.createElement(l.l6,{value:t.enabled,onChange:function(t){!function(t,e,n){var r=X(Y);r[t].proxies[e].enabled="true"===n,J(r)}(n,o,t)},options:[{title:e("是"),value:!0},{title:e("否"),value:!1}],no_border:!0})];return i}),width:"10rem"}),"ignore ips",r.createElement(l.Sm,{value:t.bypass,handleInputChange:function(t){Y[n].bypass=t},no_border:!0}))})),r.createElement(o.VP,null,r.createElement(c.uF,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,e("Tcp Proxy"))," "),titleCom:r.createElement("div",null,r.createElement(s.rA,{icon:"add",title:e("添加"),onClick:function(){$([].concat(X(B),[{note:"",open:!1,port:0,target_port:0,target_ip:""}]))}}),r.createElement(s.rA,{icon:"save",title:e("保存"),onClick:it}))},r.createElement(f.X,{headers:G,rows:B.map(function(t,n){var o=[r.createElement(l.Sm,{value:t.port,handleInputChange:function(e){t.port=parseInt(e)},no_border:!0}),r.createElement(l.Sm,{value:t.target_ip,handleInputChange:function(e){t.target_ip=e},no_border:!0}),r.createElement(l.Sm,{value:t.target_port,handleInputChange:function(e){t.target_port=parseInt(e)},no_border:!0}),r.createElement(l.l6,{value:t.open,onChange:function(t){B[n].open="true"===t,$(X(B))},options:[{title:e("是"),value:!0},{title:e("否"),value:!1}],no_border:!0}),r.createElement(l.Sm,{value:t.note,handleInputChange:function(e){t.note=e},no_border:!0}),r.createElement("div",null,r.createElement(s.rA,{icon:"delete",title:e("删除"),onClick:function(){return function(t){B.splice(t,1),$(X(B))}(n)}}))];return o}),width:"10rem"})),r.createElement(c.uF,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,e("Http Proxy Server"))," "),titleCom:r.createElement("div",null,r.createElement(s.rA,{icon:"add",title:e("添加"),onClick:function(){C.list.push({note:"",open:!1}),I(W({},C))}}),r.createElement(s.rA,{icon:"save",title:e("保存"),onClick:at}))},r.createElement(f.X,{headers:Q,rows:C.list.map(function(t,n){return[r.createElement("div",null,r.createElement(s.rA,{icon:"edit",title:e("编辑"),onClick:function(){ut(n)}})),r.createElement(l.l6,{value:t.open,onChange:function(t){C.list[n].open="true"===t,I(W({},C))},options:[{title:e("是"),value:!0},{title:e("否"),value:!1}],no_border:!0}),r.createElement(l.Sm,{value:t.note,handleInputChange:function(e){t.note=e},no_border:!0}),r.createElement("div",null,r.createElement(s.rA,{icon:"delete",title:e("删除"),onClick:function(){C.list.splice(n,1),I(W({},C))}}))]}),width:"10rem"}),r.createElement("form",null,e("状态"),r.createElement(f.S,{isFlex:!0,columns:[r.createElement(l.U6,{value:1,context:e("开启"),selected:C.open,onchange:function(){I(W(W({},C),{},{open:!C.open}))}}),r.createElement(l.U6,{value:1,context:e("关闭"),selected:!C.open,onchange:function(){I(W(W({},C),{},{open:!C.open}))}})]})),"port",r.createElement(l.Sm,{value:C.port,handleInputChange:function(t){C.port=parseInt(t),I(W({},C))},no_border:!0})))))}var tt=n(2726),et=n(3413),nt=n.n(et),rt=n(7690);function ot(t){return function(t){if(Array.isArray(t))return pt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||ft(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 it(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof u?r:u,l=Object.create(c.prototype);return at(l,"_invoke",function(n,r,o){var i,u,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return i=e,u=0,c=t,p.n=n,a}};function h(n,r){for(u=n,c=r,e=0;!f&&l&&!o&&e<s.length;e++){var o,i=s[e],h=p.p,m=i[2];n>3?(o=m===r)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=h&&((o=n<2&&h<i[1])?(u=0,p.v=r,p.n=i[1]):h<m&&(o=n<3||i[0]>r||r>m)&&(i[4]=n,i[5]=r,p.n=m,u=0))}if(o||n>1)return a;throw f=!0,r}return function(o,s,m){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&h(s,m),u=s,c=m;(e=u<2?t:c)||!f;){i||(u?u<3?(u>1&&(p.n=-1),h(u,c)):p.n=c:p.v=c);try{if(l=2,i){if(u||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,u<2&&(u=0)}else 1===u&&(e=i.return)&&e.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=t}else if((e=(f=p.n<0)?c:n.call(r,p))!==a)break}catch(e){i=t,u=1,c=e}finally{l=1}}return{value:e,done:f}}}(n,o,i),!0),l}var a={};function u(){}function c(){}function l(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(at(e={},r,function(){return this}),e),f=l.prototype=u.prototype=Object.create(s);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,at(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=l,at(f,"constructor",l),at(l,"constructor",c),c.displayName="GeneratorFunction",at(l,o,"GeneratorFunction"),at(f),at(f,o,"Generator"),at(f,r,function(){return this}),at(f,"toString",function(){return"[object Generator]"}),(it=function(){return{w:i,m:p}})()}function at(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}at=function(t,e,n,r){function i(e,n){at(t,e,function(t){return this._invoke(e,n,t)})}e?o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(i("next",0),i("throw",1),i("return",2))},at(t,e,n,r)}function ut(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=ft(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function ct(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function lt(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){ct(i,r,o,a,u,"next",t)}function u(t){ct(i,r,o,a,u,"throw",t)}a(void 0)})}}function st(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,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||ft(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 ft(t,e){if(t){if("string"==typeof t)return pt(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)?pt(t,e):void 0}}function pt(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 ht(t){var e=(0,d.Bd)().t,n=st((0,r.useState)([]),2),p=n[0],h=n[1],m=st((0,r.useState)([]),2),y=m[0],b=m[1],g=st((0,r.useState)(""),2),E=g[0],w=g[1],S=st((0,r.useState)(""),2),x=S[0],A=S[1],_=st((0,r.useState)(!1),2),O=_[0],j=_[1],k=st((0,N.L4)(U.AG.showPrompt),2),C=(k[0],k[1]),I=st((0,N.L4)(U.AG.confirm),2),P=(I[0],I[1]);(0,r.useEffect)(function(){lt(it().m(function t(){var e,n,r,o,a,c,l;return it().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i.ez.get("ips/dnspod");case 1:if((e=t.v).code===u.m.Success){t.n=2;break}return t.a(2);case 2:n=e.data,r=[],o=[],a=ut(n.ips);try{for(a.s();!(c=a.n()).done;)(l=c.value).isIPv4?r.push(l):o.push(l)}catch(t){a.e(t)}finally{a.f()}h(r),b(o),n.account&&(w(n.account.id),A(n.account.token)),j(n.isOpen);case 3:return t.a(2)}},t)}))()},[]);var T=function(){var t=lt(it().m(function t(){var e,n,r,o,a,c;return it().w(function(t){for(;;)switch(t.n){case 0:if(!O||E&&x){t.n=1;break}return new(nt())({type:"error",text:"id和token都不能为空",timeout:1e3,layout:"bottomLeft"}).show(),t.a(2);case 1:for(e=new tt.yL,n=[],r=0,o=[].concat(ot(p),ot(y));r<o.length;r++)(a=o[r]).ddnsHost&&n.push(a);return e.ips=n,e.account={id:E,token:x},e.isOpen=O,e.ddnsType=tt.E2.dnspod,t.n=2,i.ez.post("save",e);case 2:(c=t.v).code===u.m.DdnsAuthFail?new(nt())({type:"error",text:c.data,timeout:1e3,layout:"bottomLeft"}).show():new(nt())({type:"success",text:c.data,timeout:1e3,layout:"bottomLeft"}).show();case 3:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),L=function(){var t=lt(it().m(function t(e){return it().w(function(t){for(;;)switch(t.n){case 0:P({open:!0,handle:function(){var t=lt(it().m(function t(){return it().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i.ez.post("http/del",e);case 1:0===t.v.code&&(0,a.LW)("删除成功,稍后请刷新"),P({open:!1,handle:null});case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),title:"确定删除吗?"});case 1:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}();return r.createElement("div",null,r.createElement(v.A,null,r.createElement(s.rA,{icon:"add",title:e("添加http获取ip"),onClick:function(){C({show:!0,type:rt.PromptEnum.DdnsAddHttp,overlay:!0,data:{}})}})),r.createElement(o.fI,null,r.createElement(o.VP,null,r.createElement(c.Zp,{title:"ipv4"},p.length>0&&p.map(function(t,n){return r.createElement("div",{key:n},"".concat(t.ifaceOrWww,"(").concat(t.ip,")"),r.createElement(l.Sm,{right_placeholder:r.createElement("div",null,t.source_type===tt.tC.http_get&&r.createElement(s.rA,{icon:"delete",title:e("删除"),onClick:function(){L(t)}})),placeholder:"a.abc.com b.abc.com ...",value:t.ddnsHost,handleInputChange:function(e){t.ddnsHost=e}}))})),r.createElement(c.Zp,{title:"ipv6"},y.length>0&&y.map(function(t,n){return r.createElement("div",{key:n},"".concat(t.ifaceOrWww,"(").concat(t.ip,")"),r.createElement(l.Sm,{right_placeholder:r.createElement("div",null,t.source_type===tt.tC.http_get&&r.createElement(s.rA,{icon:"delete",title:e("删除"),onClick:function(){L(t)}})),placeholder:"a.abc.com b.abc.com ...",value:t.ddnsHost,handleInputChange:function(e){t.ddnsHost=e}}))}))),r.createElement(o.VP,null,r.createElement(c.Zp,{title:e("账号设置"),rightBottomCom:r.createElement(s.C3,{text:e("保存"),clickFun:T})},r.createElement(l.Sm,{placeholder:"ID",value:E,handleInputChange:function(t){w(t)}}),r.createElement(l.cA,{placeholder:"TOKEN",value:x,handleInputChange:function(t){A(t)}}),r.createElement(f.S,{isFlex:!0,columns:[r.createElement(l.U6,{value:1,context:e("开启"),selected:O,onchange:function(){j(!O)}}),r.createElement(l.U6,{value:1,context:e("关闭"),selected:!O,onchange:function(){j(!O)}})]})),r.createElement(c.Zp,{title:e("说明")},"域名如果不存在会自动创建,空子域名是@,ip6和ipv4可以互相切换。"))))}function mt(t){return function(t){if(Array.isArray(t))return St(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||wt(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 dt(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof u?r:u,l=Object.create(c.prototype);return vt(l,"_invoke",function(n,r,o){var i,u,c,l=0,s=o||[],f=!1,p={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return i=e,u=0,c=t,p.n=n,a}};function h(n,r){for(u=n,c=r,e=0;!f&&l&&!o&&e<s.length;e++){var o,i=s[e],h=p.p,m=i[2];n>3?(o=m===r)&&(c=i[(u=i[4])?5:(u=3,3)],i[4]=i[5]=t):i[0]<=h&&((o=n<2&&h<i[1])?(u=0,p.v=r,p.n=i[1]):h<m&&(o=n<3||i[0]>r||r>m)&&(i[4]=n,i[5]=r,p.n=m,u=0))}if(o||n>1)return a;throw f=!0,r}return function(o,s,m){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&h(s,m),u=s,c=m;(e=u<2?t:c)||!f;){i||(u?u<3?(u>1&&(p.n=-1),h(u,c)):p.n=c:p.v=c);try{if(l=2,i){if(u||(o="next"),e=i[o]){if(!(e=e.call(i,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,u<2&&(u=0)}else 1===u&&(e=i.return)&&e.call(i),u<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),u=1);i=t}else if((e=(f=p.n<0)?c:n.call(r,p))!==a)break}catch(e){i=t,u=1,c=e}finally{l=1}}return{value:e,done:f}}}(n,o,i),!0),l}var a={};function u(){}function c(){}function l(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(vt(e={},r,function(){return this}),e),f=l.prototype=u.prototype=Object.create(s);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,vt(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=l,vt(f,"constructor",l),vt(l,"constructor",c),c.displayName="GeneratorFunction",vt(l,o,"GeneratorFunction"),vt(f),vt(f,o,"Generator"),vt(f,r,function(){return this}),vt(f,"toString",function(){return"[object Generator]"}),(dt=function(){return{w:i,m:p}})()}function vt(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}vt=function(t,e,n,r){function i(e,n){vt(t,e,function(t){return this._invoke(e,n,t)})}e?o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(i("next",0),i("throw",1),i("return",2))},vt(t,e,n,r)}function yt(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=wt(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function bt(t,e,n,r,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function gt(t){return function(){var e=this,n=arguments;return new Promise(function(r,o){var i=t.apply(e,n);function a(t){bt(i,r,o,a,u,"next",t)}function u(t){bt(i,r,o,a,u,"throw",t)}a(void 0)})}}function Et(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,o,i,a,u=[],c=!0,l=!1;try{if(i=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(u.push(r.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,e)||wt(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 wt(t,e){if(t){if("string"==typeof t)return St(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)?St(t,e):void 0}}function St(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 xt(t){var e=(0,d.Bd)().t,n=Et((0,r.useState)([]),2),p=n[0],h=n[1],m=Et((0,r.useState)([]),2),y=m[0],b=m[1],g=Et((0,r.useState)(""),2),E=g[0],w=g[1],S=Et((0,r.useState)(""),2),x=S[0],A=S[1],_=Et((0,r.useState)(!1),2),O=_[0],j=_[1],k=Et((0,N.L4)(U.AG.showPrompt),2),C=(k[0],k[1]),I=Et((0,N.L4)(U.AG.confirm),2),P=(I[0],I[1]);(0,r.useEffect)(function(){gt(dt().m(function t(){var e,n,r,o,a,c,l;return dt().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i.ez.get("ips/tx");case 1:if((e=t.v).code===u.m.Success){t.n=2;break}return t.a(2);case 2:n=e.data,r=[],o=[],a=yt(n.ips);try{for(a.s();!(c=a.n()).done;)(l=c.value).isIPv4?r.push(l):o.push(l)}catch(t){a.e(t)}finally{a.f()}h(r),b(o),n.account&&(w(n.account.secretid),A(n.account.secretkey)),j(n.isOpen);case 3:return t.a(2)}},t)}))()},[]);var T=function(){var t=gt(dt().m(function t(){var e,n,r,o,a,c;return dt().w(function(t){for(;;)switch(t.n){case 0:if(!O||E&&x){t.n=1;break}return new(nt())({type:"error",text:"SecretId和SecretKey都不能为空",timeout:1e3,layout:"bottomLeft"}).show(),t.a(2);case 1:for(e=new tt.yL,n=[],r=0,o=[].concat(mt(p),mt(y));r<o.length;r++)(a=o[r]).ddnsHost&&n.push(a);return e.ips=n,e.account={secretid:E,secretkey:x},e.isOpen=O,e.ddnsType=tt.E2.tengxun,t.n=2,i.ez.post("save",e);case 2:(c=t.v).code===u.m.DdnsAuthFail?new(nt())({type:"error",text:c.data,timeout:1e3,layout:"bottomLeft"}).show():new(nt())({type:"success",text:c.data,timeout:1e3,layout:"bottomLeft"}).show();case 3:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),L=function(){var t=gt(dt().m(function t(e){return dt().w(function(t){for(;;)switch(t.n){case 0:P({open:!0,handle:function(){var t=gt(dt().m(function t(){return dt().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i.ez.post("http/del",e);case 1:0===t.v.code&&(0,a.LW)("删除成功,稍后请刷新"),P({open:!1,handle:null});case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),title:"确定删除吗?"});case 1:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}();return r.createElement("div",null,r.createElement(v.A,null,r.createElement(s.rA,{icon:"add",title:e("添加http获取ip"),onClick:function(){C({show:!0,type:rt.PromptEnum.DdnsAddHttp,overlay:!0,data:{}})}})),r.createElement(o.fI,null,r.createElement(o.VP,null,r.createElement(c.Zp,{title:"ipv4"},p.length>0&&p.map(function(t,n){return r.createElement("div",{key:n},"".concat(t.ifaceOrWww,"(").concat(t.ip,")"),r.createElement(l.Sm,{right_placeholder:r.createElement("div",null,t.source_type===tt.tC.http_get&&r.createElement(s.rA,{icon:"delete",title:e("删除"),onClick:function(){L(t)}})),placeholder:"a.abc.com b.abc.com ...",value:t.ddnsHost,handleInputChange:function(e){t.ddnsHost=e}}))})),r.createElement(c.Zp,{title:"ipv6"},y.length>0&&y.map(function(t,n){return r.createElement("div",{key:n},"".concat(t.ifaceOrWww,"(").concat(t.ip,")"),r.createElement(l.Sm,{right_placeholder:r.createElement("div",null,t.source_type===tt.tC.http_get&&r.createElement(s.rA,{icon:"delete",title:e("删除"),onClick:function(){L(t)}})),placeholder:"a.abc.com b.abc.com ...",value:t.ddnsHost,handleInputChange:function(e){t.ddnsHost=e}}))}))),r.createElement(o.VP,null,r.createElement(c.Zp,{title:e("账号设置"),rightBottomCom:r.createElement(s.C3,{text:e("保存"),clickFun:T})},r.createElement(l.Sm,{placeholder:"SecretId",value:E,handleInputChange:function(t){w(t)}}),r.createElement(l.cA,{placeholder:"SecretKey",value:x,handleInputChange:function(t){A(t)}}),r.createElement(f.S,{isFlex:!0,columns:[r.createElement(l.U6,{value:1,context:e("开启"),selected:O,onchange:function(){j(!O)}}),r.createElement(l.U6,{value:1,context:e("关闭"),selected:!O,onchange:function(){j(!O)}})]})),r.createElement(c.Zp,{title:e("说明")},"域名如果不存在会自动创建,空子域名是@,ip6和ipv4可以互相切换。"))))}function At(){var t=(0,d.Bd)().t,e=(0,M.MH)().check_user_auth,n=[];return e(H.oV.vir_net)&&n.push.apply(n,[{index:1,name:t("系统")+t("代理"),rto:"proxy_sys/",component:r.createElement(Q,null)},{index:2,name:"Tun proxy "+t("客户端"),rto:"client/",component:r.createElement(G,null)},{index:3,name:"Tun proxy "+t("服务端"),rto:"server/",component:r.createElement(k,null)}]),e(H.oV.ddns)&&n.push.apply(n,[{index:4,name:"ddns-dnspod(".concat(t("腾讯"),")"),rto:"dnspod/",component:r.createElement(ht,null)},{index:5,name:"ddns-".concat(t("腾讯")).concat(t("云")),rto:"tengxun/",component:r.createElement(xt,null)}]),r.createElement(o.W1,{optionList:n})}},1028(t,e,n){"use strict";n.d(e,{A:()=>u});var r=n(1601),o=n.n(r),i=n(6314),a=n.n(i)()(o());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),o=n.n(r),i=n(7825),a=n.n(i),u=n(7659),c=n.n(u),l=n(5056),s=n.n(l),f=n(540),p=n.n(f),h=n(1113),m=n.n(h),d=n(1028),v={};v.styleTagTransform=m(),v.setAttributes=s(),v.insert=c().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=p();o()(d.A,v),d.A&&d.A.locals&&d.A.locals}}]);
|