filecat 6.5.3 → 6.6.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.
Files changed (38) hide show
  1. package/build/dist/{2502.229fe244a77764240b3d.js → 2502.3a6da84610d2c89dc9ad.js} +2 -2
  2. package/build/dist/{2542.482d6a17176f2f5b4b4f.js → 2542.27a0cf282fc8a619c4a5.js} +2 -2
  3. package/build/dist/2685.61dbbdf62ad2f9e0a64e.js +1 -0
  4. package/build/dist/2851.269cb7a6e7b37f044d79.js +2 -0
  5. package/build/dist/4273.244bdd55746b302490fe.js +2 -0
  6. package/build/dist/4377.b404ed749ec8624cf674.js +2 -0
  7. package/build/dist/{4943.18564617b2ec78e72342.js → 4943.160947b99f94fa6379b6.js} +2 -2
  8. package/build/dist/4953.c40565009ac15f566b79.js +2 -0
  9. package/build/dist/5703.cbf1ac8b84d2d31ba220.js +1 -0
  10. package/build/dist/{6247.359a059102e7897988f8.js → 6247.172a368e2abcc340552b.js} +2 -2
  11. package/build/dist/8302.ad43518baaec286ab7a0.js +2 -0
  12. package/build/dist/9704.cacf7eb0df8aa60f88f7.js +2 -0
  13. package/build/dist/{9923.a8bc705dedcd3666269e.js → 9923.ca4f5b7bd3a2f67c2380.js} +1 -1
  14. package/build/dist/google.css +1 -1
  15. package/build/dist/index.html +1 -1
  16. package/build/dist/main.c50827cabc75f4aaf43c.js +2 -0
  17. package/build/main.js +1 -1
  18. package/package.json +1 -1
  19. package/build/dist/2114.89fb1982548d51a0eae7.js +0 -1
  20. package/build/dist/306.174c7bcff88cdf3a9503.js +0 -2
  21. package/build/dist/4273.ee9a61fa611d34dafb98.js +0 -2
  22. package/build/dist/5703.393fd7e487ca7855bacb.js +0 -1
  23. package/build/dist/6775.1df40a87f52a3c65a060.js +0 -2
  24. package/build/dist/9245.773311749674d0819a54.js +0 -2
  25. package/build/dist/9591.8137be08483fb316410b.js +0 -2
  26. package/build/dist/9704.d2fdb0966de7eb180034.js +0 -2
  27. package/build/dist/main.c5df6333046e28ceb91a.js +0 -2
  28. /package/build/dist/{2502.229fe244a77764240b3d.js.LICENSE.txt → 2502.3a6da84610d2c89dc9ad.js.LICENSE.txt} +0 -0
  29. /package/build/dist/{2542.482d6a17176f2f5b4b4f.js.LICENSE.txt → 2542.27a0cf282fc8a619c4a5.js.LICENSE.txt} +0 -0
  30. /package/build/dist/{306.174c7bcff88cdf3a9503.js.LICENSE.txt → 2851.269cb7a6e7b37f044d79.js.LICENSE.txt} +0 -0
  31. /package/build/dist/{4273.ee9a61fa611d34dafb98.js.LICENSE.txt → 4273.244bdd55746b302490fe.js.LICENSE.txt} +0 -0
  32. /package/build/dist/{6247.359a059102e7897988f8.js.LICENSE.txt → 4377.b404ed749ec8624cf674.js.LICENSE.txt} +0 -0
  33. /package/build/dist/{4943.18564617b2ec78e72342.js.LICENSE.txt → 4943.160947b99f94fa6379b6.js.LICENSE.txt} +0 -0
  34. /package/build/dist/{6775.1df40a87f52a3c65a060.js.LICENSE.txt → 4953.c40565009ac15f566b79.js.LICENSE.txt} +0 -0
  35. /package/build/dist/{9245.773311749674d0819a54.js.LICENSE.txt → 6247.172a368e2abcc340552b.js.LICENSE.txt} +0 -0
  36. /package/build/dist/{9591.8137be08483fb316410b.js.LICENSE.txt → 8302.ad43518baaec286ab7a0.js.LICENSE.txt} +0 -0
  37. /package/build/dist/{9704.d2fdb0966de7eb180034.js.LICENSE.txt → 9704.cacf7eb0df8aa60f88f7.js.LICENSE.txt} +0 -0
  38. /package/build/dist/{main.c5df6333046e28ceb91a.js.LICENSE.txt → main.c50827cabc75f4aaf43c.js.LICENSE.txt} +0 -0
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 4953.c40565009ac15f566b79.js.LICENSE.txt */
2
+ (self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[4627,4953,6010],{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],a=t.input.getAttribute("data-"+r.toLowerCase());t[r]="number"==typeof i?parseInt(a):!1===i?null!==a:i instanceof Function?null:a,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 a(t,e){return r.call((e||document).querySelectorAll(t))}function s(){a("input.awesomplete").forEach(function(t){new e(t)})}i.create=function(t,e){var n=document.createElement(t);for(var r in e){var a=e[r];if("inside"===r)i(a).appendChild(n);else if("around"===r){var s=i(a);s.parentNode.insertBefore(n,s),n.appendChild(s),null!=s.getAttribute("autofocus")&&s.focus()}else r in n?n[r]=a:n.setAttribute(r,a)}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?s():document.addEventListener("DOMContentLoaded",s)),e.$=i,e.$$=a,t.exports&&(t.exports=e)}()},306(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>V});var r=n(6540),i=n(4284),a=n(4299),s=n(9844),o=n(7952),c=n(5997),l=n(8247),u=n(3430),f=n(505),d=n(2042),h=n(2389),m=n(5907),p=n(3459),v=n(4777),g=n(7361),b=n(7767),y=n(7444),E=n(6417),w=n(7690),A=n(3033),x=n(2693);function _(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function a(n,r,i,a){var c=r&&r.prototype instanceof o?r:o,l=Object.create(c.prototype);return k(l,"_invoke",function(n,r,i){var a,o,c,l=0,u=i||[],f=!1,d={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return a=e,o=0,c=t,d.n=n,s}};function h(n,r){for(o=n,c=r,e=0;!f&&l&&!i&&e<u.length;e++){var i,a=u[e],h=d.p,m=a[2];n>3?(i=m===r)&&(c=a[(o=a[4])?5:(o=3,3)],a[4]=a[5]=t):a[0]<=h&&((i=n<2&&h<a[1])?(o=0,d.v=r,d.n=a[1]):h<m&&(i=n<3||a[0]>r||r>m)&&(a[4]=n,a[5]=r,d.n=m,o=0))}if(i||n>1)return s;throw f=!0,r}return function(i,u,m){if(l>1)throw TypeError("Generator is already running");for(f&&1===u&&h(u,m),o=u,c=m;(e=o<2?t:c)||!f;){a||(o?o<3?(o>1&&(d.n=-1),h(o,c)):d.n=c:d.v=c);try{if(l=2,a){if(o||(i="next"),e=a[i]){if(!(e=e.call(a,c)))throw TypeError("iterator result is not an object");if(!e.done)return e;c=e.value,o<2&&(o=0)}else 1===o&&(e=a.return)&&e.call(a),o<2&&(c=TypeError("The iterator does not provide a '"+i+"' method"),o=1);a=t}else if((e=(f=d.n<0)?c:n.call(r,d))!==s)break}catch(e){a=t,o=1,c=e}finally{l=1}}return{value:e,done:f}}}(n,i,a),!0),l}var s={};function o(){}function c(){}function l(){}e=Object.getPrototypeOf;var u=[][r]?e(e([][r]())):(k(e={},r,function(){return this}),e),f=l.prototype=o.prototype=Object.create(u);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,k(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return c.prototype=l,k(f,"constructor",l),k(l,"constructor",c),c.displayName="GeneratorFunction",k(l,i,"GeneratorFunction"),k(f),k(f,i,"Generator"),k(f,r,function(){return this}),k(f,"toString",function(){return"[object Generator]"}),(_=function(){return{w:a,m:d}})()}function k(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}k=function(t,e,n,r){function a(e,n){k(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:(a("next",0),a("throw",1),a("return",2))},k(t,e,n,r)}function S(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=T(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,s=!0,o=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){o=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function N(t,e,n,r,i,a,s){try{var o=t[a](s),c=o.value}catch(t){return void n(t)}o.done?e(c):Promise.resolve(c).then(r,i)}function C(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var a=t.apply(e,n);function s(t){N(a,r,i,s,o,"next",t)}function o(t){N(a,r,i,s,o,"throw",t)}s(void 0)})}}function j(t){return function(t){if(Array.isArray(t))return O(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||T(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){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,a,s,o=[],c=!0,l=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(o.push(r.value),o.length!==e);c=!0);}catch(t){l=!0,i=t}finally{try{if(!c&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(l)throw i}}return o}}(t,e)||T(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 T(t,e){if(t){if("string"==typeof t)return O(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?O(t,e):void 0}}function O(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function L(t){var e=t.onDelete,n=t.onCopy,i=(0,h.Bd)().t;return r.createElement("div",{className:"message-actions"},r.createElement("button",{onClick:e},i("删除")),r.createElement("button",{onClick:n},i("复制")))}function R(t){var e=t.attachments,n=void 0===e?[]:e;return n.length?r.createElement("div",{className:"chat-message-attachments"},n.map(function(t,e){return r.createElement("div",{key:"".concat(t.name,"_").concat(e),className:"chat-message-attachment"},r.createElement(c.In,{icon:"attach_file"}),r.createElement("span",null,t.name),r.createElement("small",null,t.size," B"))})):null}function D(t){var e,n;return null!==(e=t.type)&&void 0!==e&&e.startsWith("image/")?"image":null!==(n=t.type)&&void 0!==n&&n.startsWith("text/")||/\.(md|txt|json|js|jsx|ts|tsx|css|html?|xml|ya?ml|py|java|go|rs|c|cpp|h|hpp|sh|bat|cmd|ini|toml|csv|log|sql|env|gitignore|dockerfile)$/i.test(t.name)?"text":"binary"}function H(t){return t.text()}function F(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).filter(function(t){return"user"===t.role||"assistant"===t.role}).map(function(t,e){var n;return{id:Date.now()+e,sender:"assistant"===t.role?"bot":"user",text:t.content,attachments:null!==(n=t.attachments)&&void 0!==n?n:[]}})}function M(t){return t.map(function(t){var e;return{role:"bot"===t.sender?"assistant":"user",content:t.text,attachments:null!==(e=t.attachments)&&void 0!==e?e:[]}})}function V(){var t=I((0,r.useState)([]),2),e=t[0],n=t[1],k=I((0,r.useState)([]),2),N=k[0],T=k[1],O=I((0,r.useState)(""),2),V=O[0],P=O[1],$=I((0,y.L4)(E.AG.ai_session_collapsed),2),G=$[0],B=$[1],q=I((0,r.useState)([]),2),z=q[0],K=q[1];(0,x.w)();var W=(0,h.Bd)().t,X=(0,r.useRef)(null),U=I((0,y.L4)(E.AG.prompt_card),2),J=(U[0],U[1]),Y=(0,r.useRef)((0,s.sg)(function(t){n(t),lt.current&&mt(!1)},50)).current,Z=I((0,r.useState)(!1),2),Q=Z[0],tt=Z[1],et=(0,l.MH)().check_user_auth,nt=I((0,r.useState)(""),2),rt=nt[0],it=nt[1],at=(0,r.useRef)(null),st=(0,r.useRef)(null),ot=(0,m.y)(),ct=(0,b.Zp)(),lt=(0,r.useRef)(!0),ut=(0,r.useRef)(new v.qq),ft=I((0,r.useState)([]),2),dt=ft[0],ht=ft[1],mt=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=st.current;e&&e.scrollTo({top:e.scrollHeight,behavior:t?"smooth":"auto"})},pt=function(t){var e=Array.from(null!=t?t:[]).filter(Boolean);e.length&&K(function(t){return[].concat(j(t),j(e))})},vt=function(){var t=C(_().m(function t(e){var n,r,i,a,s,o,c,l,u;return _().w(function(t){for(;;)switch(t.p=t.n){case 0:n=[],r=S(e),t.p=1,r.s();case 2:if((i=r.n()).done){t.n=10;break}if(a=i.value,s=D(a),o="","text"!==s){t.n=7;break}return t.p=3,t.n=4,H(a);case 4:c=t.v,l=12e4,o=c.length>l?"".concat(c.slice(0,l),"\n\n[内容已截断,原始长度 ").concat(c.length," 字符]"):c,t.n=6;break;case 5:t.p=5,t.v,o="[文本读取失败]";case 6:t.n=8;break;case 7:o="image"===s?"[图片文件: ".concat(a.name,"]"):"[二进制文件: ".concat(a.name,"]");case 8:n.push({name:a.name,mime_type:a.type,size:a.size,kind:s,content:o});case 9:t.n=2;break;case 10:t.n=12;break;case 11:t.p=11,u=t.v,r.e(u);case 12:return t.p=12,r.f(),t.f(12);case 13:return t.a(2,n)}},t,null,[[3,5],[1,11,12,13]])}));return function(e){return t.apply(this,arguments)}}(),gt=function(){var t=C(_().m(function t(e){var r,a,s,o,c,l,u;return _().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i.jV.get("sessions");case 1:if((c=t.v).code===p.m.Success){t.n=2;break}return t.a(2);case 2:if(l=null!==(r=c.data)&&void 0!==r?r:[],T(l),!(u=null===e?null!==(a=null===(s=l[0])||void 0===s?void 0:s.id)&&void 0!==a?a:"":e||V||(null===(o=l[0])||void 0===o?void 0:o.id)||"")){t.n=4;break}return t.n=3,yt(u);case 3:t.n=5;break;case 4:n([]),P("");case 5:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}(),bt=function(){var t=C(_().m(function t(){var e,n;return _().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i.jV.get("sessions");case 1:(e=t.v).code===p.m.Success&&T(null!==(n=e.data)&&void 0!==n?n:[]);case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),yt=function(){var t=C(_().m(function t(e){var r,a,s,o=arguments;return _().w(function(t){for(;;)switch(t.n){case 0:return r=o.length>1&&void 0!==o[1]&&o[1],t.n=1,i.jV.post("session/get",{session_id:e});case 1:if((a=t.v).code===p.m.Success&&a.data){t.n=2;break}return t.a(2);case 2:s=a.data,P(s.id),n(F(s.messages)),r&&B(!1),requestAnimationFrame(function(){return mt(!1)});case 3:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}(),Et=function(){var t=C(_().m(function t(e){var r,a;return _().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i.jV.post("session",{title:"新会话"});case 1:if((r=t.v).code===p.m.Success){t.n=2;break}return t.a(2);case 2:return a=r.data,P(a.id),e?(it(e),n([])):n([]),B(!1),t.n=3,gt(a.id);case 3:requestAnimationFrame(function(){var t=document.querySelector(".chat-input");t&&(t.style.height="auto",t.style.height=Math.min(t.scrollHeight,200)+"px")});case 4:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}(),wt=function(){var t=C(_().m(function t(){var e,n,r;return _().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i.XO.get("ai_agent_setting/env");case 1:return(e=t.v).code===p.m.Success&&(ut.current=e.data),t.n=2,gt();case 2:return t.n=3,i.jV.get("system_prompts");case 3:(n=t.v).code===p.m.Success&&ht(null!==(r=n.data)&&void 0!==r?r:[]);case 4:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();(0,r.useEffect)(function(){wt(),requestAnimationFrame(function(){mt(!1)})},[]),(0,r.useEffect)(function(){var t=st.current;if(t){var e=function(){lt.current=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:120,n=t.scrollTop;return t.scrollHeight-(n+t.clientHeight)<e}(t)};return t.addEventListener("scroll",e),function(){return t.removeEventListener("scroll",e)}}},[]),(0,r.useLayoutEffect)(function(){lt.current&&mt(!1)},[e]);var At=function(t){var e;return[{content:t.text,role:"bot"===t.sender?"assistant":"user",attachments:null!==(e=t.attachments)&&void 0!==e?e:[]}]},xt=function(){var t=C(_().m(function t(){var r,a,o,c,l,u,f,d,h,m;return _().w(function(t){for(;;)switch(t.n){case 0:if(r=rt.trim(),!Q&&(r||0!==z.length)){t.n=1;break}return t.a(2);case 1:if(a=V){t.n=4;break}return t.n=2,i.jV.post("session",{title:(r||(null===(o=z[0])||void 0===o?void 0:o.name)||"新会话").slice(0,28)});case 2:if((c=t.v).code===p.m.Success){t.n=3;break}return t.a(2);case 3:return l=c.data,a=l.id,P(a),t.n=4,gt(a);case 4:return t.n=5,vt(z);case 5:u=t.v,f={id:Date.now(),sender:"user",text:r,attachments:u},d=[].concat(j(e),[f]),n(d),it(""),K([]),tt(!0),h={id:f.id+1,sender:"bot",text:"AI思考中..."},d.push(h),n(j(d)),m=!0,i.jV.sse_post("chat",{messages:At(f),session_id:a},{onMessage:function(t){m&&(h.text="",m=!1);try{var e,n,r,i=JSON.parse(t),a="string"==typeof i?i:null!==(e=null==i||null===(n=i.choices)||void 0===n||null===(n=n[0])||void 0===n||null===(n=n.delta)||void 0===n?void 0:n.content)&&void 0!==e?e:null==i||null===(r=i.choices)||void 0===r||null===(r=r[0])||void 0===r||null===(r=r.message)||void 0===r?void 0:r.content;a&&(h.text+=a)}catch(e){try{h.text+=JSON.parse(t)}catch(e){h.text+=t}}Y(j(d))},onDone:(0,s.nF)(C(_().m(function t(){return _().w(function(t){for(;;)switch(t.n){case 0:return tt(!1),t.n=1,bt();case 1:mt(!0);case 2:return t.a(2)}},t)})),100)});case 6:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),_t=function(){var t=C(_().m(function t(e){return _().w(function(t){for(;;)switch(t.n){case 0:(0,f.lW)(e),(0,d.LW)("复制成功");case 1:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}(),kt=function(){var t=C(_().m(function t(e){var n,a,s;return _().w(function(t){for(;;)switch(t.p=t.n){case 0:return J({open:!0,title:W("字符消耗统计"),context_div:r.createElement("div",{className:"usage-stats-loading"},W("加载中...")),cancel:function(){return J({open:!1})}}),t.p=1,t.n=2,i.jV.post("session/usage_stats",{session_id:e});case 2:(n=t.v).code===p.m.Success&&n.data?(s=n.data,J({open:!0,title:W("字符消耗统计"),context_div:r.createElement("div",{className:"usage-stats-panel"},[{l:W("对话轮次"),v:(null!==(a=s.turns)&&void 0!==a?a:0).toString()},{l:W("AI输入字符"),v:St(s.input_chars)},{l:W("AI输出字符"),v:St(s.output_chars)},{l:W("AI输入字符(最近一轮)"),v:St(s.recent_input_chars)},{l:W("AI输出字符(最近一轮)"),v:St(s.recent_output_chars)}].map(function(t,e){return r.createElement("div",{key:e,className:"usage-stats-row"},r.createElement("span",{className:"usage-stats-label"},t.l),r.createElement("span",{className:"usage-stats-value"},t.v))}),r.createElement("div",{className:"usage-stats-row usage-stats-total"},r.createElement("span",{className:"usage-stats-label"},W("AI字符总计消耗")),r.createElement("span",{className:"usage-stats-value"},St((s.input_chars||0)+(s.output_chars||0))))),cancel:function(){return J({open:!1})}})):J({open:!0,title:W("字符消耗统计"),context_div:r.createElement("div",{className:"usage-stats-empty"},W("暂无统计数据")),cancel:function(){return J({open:!1})}}),t.n=4;break;case 3:t.p=3,t.v,J({open:!0,title:W("字符消耗统计"),context_div:r.createElement("div",{className:"usage-stats-empty"},W("暂无统计数据")),cancel:function(){return J({open:!1})}});case 4:return t.a(2)}},t,null,[[1,3]])}));return function(e){return t.apply(this,arguments)}}(),St=function(t){return null==t||t<0?"0":t.toLocaleString()};return r.createElement(r.Fragment,null,r.createElement(o.A,null,r.createElement(c.rA,{icon:"menu",title:W("会话"),onClick:function(){window.innerWidth<=736?B(!0):B(function(t){return!t})}}),r.createElement(c.rA,{icon:"add",title:W("新会话"),onClick:function(){return Et()}}),dt.length>0&&r.createElement(w.MenuSelect,{list:dt.map(function(t,e){return{name:t.note||"".concat(W("提示词")," ").concat(e+1),click:function(){t.prompt&&Et(t.prompt)}}})},r.createElement(c.rA,{icon:"add_comment",title:W("提示词模板创建会话")})),r.createElement(c.rA,{icon:"delete_sweep",title:W("清空全部会话"),onClick:function(){var t;ot({sub_title:W("确认删除全部聊天会话吗?"),confirm_fun:(t=C(_().m(function t(){return _().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i.jV.post("sessions/clear",{});case 1:return t.n=2,wt();case 2:return t.a(2)}},t)})),function(){return t.apply(this,arguments)})})}}),et(u.oV.ai_agent_setting)&&r.createElement(c.rA,{icon:"settings",title:"ai setting",onClick:function(){ct("/".concat(g.o.ai_agent_setting_page))}})),r.createElement("div",{className:"chat-page chat-page-with-sessions"},G&&r.createElement("div",{className:"chat-session-overlay",onClick:function(){return B(!1)}}),r.createElement("aside",{className:"chat-session-list ".concat(G?"active":""," ").concat(G?"collapsed":"")},N.map(function(t){return r.createElement(r.Fragment,{key:t.id},r.createElement("button",{className:"chat-session-item ".concat(V===t.id?"active":""),onClick:function(){return yt(t.id,!1)},title:t.summary||t.long_term_memory||t.title},r.createElement("span",null,t.title||"新会话"),r.createElement("small",null,t.message_count),"cli"===t.source&&r.createElement("em",{className:"chat-session-source"},"CLI"),r.createElement(w.MenuSelect,{list:[{name:W("重命名"),click:function(){!function(t,e){var n,a=e;ot({confirm_fun:(n=C(_().m(function e(){return _().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,i.jV.post("sessions/update/meta",{id:t,title:a});case 1:return e.n=2,gt(V);case 2:return e.a(2)}},e)})),function(){return n.apply(this,arguments)}),context_div:r.createElement("div",{className:"card-content"},r.createElement(A.Sm,{value:a,handleInputChange:function(t){return a=t}}))})}(t.id,t.title)}},{name:W("字符消耗统计"),click:function(){return kt(t.id)}},{name:W("删除"),click:function(){return e=t.id,void ot({sub_title:"确认删除这个会话吗?",confirm_fun:(n=C(_().m(function t(){return _().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,i.jV.post("session/delete",{session_id:e});case 1:if(V!==e){t.n=3;break}return P(""),t.n=2,gt(null);case 2:t.n=4;break;case 3:return t.n=4,gt(V);case 4:return t.a(2)}},t)})),function(){return n.apply(this,arguments)})});var e,n}}]},r.createElement(c.In,{icon:"more_horiz"}))))})),r.createElement("section",{className:"chat-main"},0===(null==e?void 0:e.length)&&r.createElement("div",{className:"chat-header"},W("询问服务器的一切")),r.createElement("div",{className:"chat-messages",ref:st},e.map(function(t){return r.createElement("div",{key:t.id,className:"chat-message ".concat(t.sender)},r.createElement(a.default,{context:t.text}),r.createElement(R,{attachments:t.attachments}),r.createElement(L,{onDelete:function(){return r=t.id,a=e.filter(function(t){return t.id!==r}),n(a),void(V&&i.jV.post("session/messages",{session_id:V,messages:M(a)}).catch(console.error));var r,a},onCopy:function(){return _t(t.text)}}))}),r.createElement("div",{ref:at})),r.createElement("div",{className:"chat-input-area",onDrop:function(t){var e,n=null===(e=t.dataTransfer)||void 0===e?void 0:e.files;n&&n.length>0&&(t.preventDefault(),pt(n))},onDragOver:function(t){var e;null!==(e=t.dataTransfer)&&void 0!==e&&null!==(e=e.types)&&void 0!==e&&e.includes("Files")&&t.preventDefault()}},r.createElement("input",{ref:X,type:"file",multiple:!0,style:{display:"none"},onChange:function(t){var e;null!==(e=t.target.files)&&void 0!==e&&e.length&&(pt(t.target.files),t.currentTarget.value="")}}),r.createElement("div",{className:"chat-input-shell"},z.length>0&&r.createElement("div",{className:"chat-attachment-strip"},z.map(function(t,e){return r.createElement("div",{key:"".concat(t.name,"_").concat(e),className:"chat-attachment-chip"},r.createElement(c.In,{icon:"attach_file"}),r.createElement("span",{title:t.name},t.name),r.createElement("button",{type:"button",onClick:function(){return function(t){K(function(e){return e.filter(function(e,n){return n!==t})})}(e)}},r.createElement(c.In,{icon:"close"})))})),r.createElement("textarea",{value:rt,onChange:function(t){var e=t.target;e.style.height="auto",e.style.height=Math.min(e.scrollHeight,200)+"px",it(e.value)},onPaste:function(t){var e,n=null===(e=t.clipboardData)||void 0===e?void 0:e.files;n&&n.length>0&&(t.preventDefault(),pt(n))},onKeyDown:function(t){"Process"===t.key||t.nativeEvent.isComposing||t.shiftKey||t.ctrlKey||"Enter"===t.key&&(t.preventDefault(),xt())},placeholder:W("输入消息"),className:"chat-input"})),r.createElement(c.rA,{title:"添加文件",icon:"attach_file",onClick:function(){var t;null===(t=X.current)||void 0===t||t.click()}}),!1===Q?r.createElement(c.Vi,{text:W("发送"),clickFun:xt}):r.createElement("div",{className:"ai-thinking-indicator"},r.createElement("div",{className:"ai-thinking-dots"},r.createElement("div",{className:"ai-thinking-dot"}),r.createElement("div",{className:"ai-thinking-dot"}),r.createElement("div",{className:"ai-thinking-dot"})))))))}},2693(t,e,n){"use strict";n.d(e,{w:()=>d});var r=n(6540),i=n(2389),a=n(4944),s=n(4188),o=n(7444),c=n(6417),l=n(5997);function u(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,a,s,o=[],c=!0,l=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(o.push(r.value),o.length!==e);c=!0);}catch(t){l=!0,i=t}finally{try{if(!c&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(l)throw i}}return o}}(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 d(){var t=u((0,o.L4)(c.AG.prompt_card),2),e=(t[0],t[1]),n=(0,i.Bd)().t,f=(0,r.useCallback)(function(t,n){a.ws.sendData(s.HK.ai_confirm_cmd,{askId:t,approved:n}),e({open:!1})},[]);(0,r.useEffect)(function(){return a.ws.addMsg(s.HK.ai_confirm_cmd,function(t){var i=t.context||{};i.askId&&i.cmd&&e({open:!0,title:n("命令确认"),cancel:function(){f(i.askId,!1)},context_div:r.createElement("div",null,r.createElement("span",null,"$",i.cmd),r.createElement(l.$n,{text:n("允许"),clickFun:function(){return f(i.askId,!0)}}),r.createElement(l.$n,{text:n("拒绝"),color:"var(--red)",clickFun:function(){return f(i.askId,!1)}}))})}),function(){a.ws.removeMsg(s.HK.ai_confirm_cmd)}},[])}},4299(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>p});var r=n(6540),i=n(3557),a=n(3995),s=n(950),o=n(7979),c=n(8263),l=n(9428),u=n.n(l),f=(n(3775),n(1499)),d=n(9214),h=n(9878),m=(n(2411),new i.A({html:!0,highlight:function(t,e){if(e&&h.A.getLanguage(e))try{var n=h.A.highlight(t,{language:e}).value;return'<pre class="hljs code-block-with-copy"><code class="hljs language-'.concat(e,'">').concat(n,"</code></pre>")}catch(t){}try{var r=h.A.highlightAuto(t).value;return'<pre class="hljs code-block-with-copy"><code class="hljs">'.concat(r,"</code></pre>")}catch(t){}return'<pre class="hljs code-block-with-copy"><code>'.concat(m.utils.escapeHtml(t),"</code></pre>")}}));function p(t){return(0,d.VD)(),r.createElement("div",{dangerouslySetInnerHTML:{__html:m.render(t.context)}})}m.use(a.A).use(s.A).use(o.A).use(c.A).use(u()).use(function(t){t.renderer.rules.fence;t.renderer.rules.fence=function(e,n,r,i,a){var s=e[n],o=s.content.trim(),c=s.info.trim(),l="";if(c&&h.A.getLanguage(c))try{l=h.A.highlight(o,{language:c}).value}catch(e){l=t.utils.escapeHtml(o)}else try{l=h.A.highlightAuto(o).value}catch(e){l=t.utils.escapeHtml(o)}return'\n <div class="code-block-with-copy">\n <div class="code-header">\n <span class="code-language">'.concat(c||"code",'</span>\n <button class="copy-btn" data-code="').concat(t.utils.escapeHtml(o),'">复制</button>\n </div>\n <pre><code class="hljs ').concat(c?"language-".concat(c):"",'">').concat(l,"</code></pre>\n </div>")}}).use(function(t){var e=t.renderer.rules.link_open||function(t,e,n,r,i){return i.renderToken(t,e,n)};t.renderer.rules.link_open=function(t,n,r,i,a){var s=t[n],o=s.attrIndex("href");if(o>=0){var c=s.attrs[o][1];s.attrs[o][1]=(0,f.bi)(window.location.href,c)}return e(t,n,r,i,a)}})},5907(t,e,n){"use strict";n.d(e,{y:()=>o});var r=n(7444),i=n(6417);function a(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,a,s,o=[],c=!0,l=!1;try{if(a=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(o.push(r.value),o.length!==e);c=!0);}catch(t){l=!0,i=t}finally{try{if(!c&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(l)throw i}}return o}}(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}function o(){var t=a((0,r.L4)(i.AG.confirm),2),e=(t[0],t[1]);return function(t){var n=t.sub_title,r=t.confirm_fun,i=t.title,a=t.context_div;e({open:!0,sub_title:n,handle:function(){r(),e({open:!1,handle:null})},title:i,context_div:a})}}},1028(t,e,n){"use strict";n.d(e,{A:()=>o});var r=n(1601),i=n.n(r),a=n(6314),s=n.n(a)()(i());s.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 o=s},9145(t,e,n){"use strict";var r=n(5072),i=n.n(r),a=n(7825),s=n.n(a),o=n(7659),c=n.n(o),l=n(5056),u=n.n(l),f=n(540),d=n.n(f),h=n(1113),m=n.n(h),p=n(1028),v={};v.styleTagTransform=m(),v.setAttributes=u(),v.insert=c().bind(null,"head"),v.domAPI=s(),v.insertStyleElement=d();i()(p.A,v),p.A&&p.A.locals&&p.A.locals},840(t){"use strict";t.exports="data:image/svg+xml,<svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 version=%271.1%27 aria-hidden=%27true%27><path fill-rule=%27evenodd%27 d=%27M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z%27></path></svg>"}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[5703],{4777(e,t,n){function r(e){return r="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},r(e)}function l(e,t,n){return(t=c(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,c(r.key),r)}}function a(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var l=n.call(e,t||"default");if("object"!=r(l))return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==r(t)?t:t+""}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{CP:()=>d,Gd:()=>s,Mu:()=>p,aM:()=>u,cL:()=>m,jk:()=>v,qq:()=>f});var u=function(e){return e[e.close=0]="close",e[e.length=1]="length",e[e.forver=2]="forver",e}({}),s=a(function e(){i(this,e)}),f=a(function e(){i(this,e),l(this,"tool_error_max",50),l(this,"tool_call_max",300),l(this,"allow_exec_cmd_directly",!1)}),d="\n# 核心参数\n# 工具报错最大尝试次数\ntool_error_max=50\n# 聊天循环最大次数\ntool_call_max=300\n# 是否允许AI直接执行命令而不需要用户确认,默认为false,需要用户手动确认,如果使用 workflow 这里等价于为 true\nallow_exec_cmd_directly=false\n# 可选的代理 url,如果指定了所有访问大模型的请求将会走代理\n#proxy_url=\n",m=JSON.stringify({stream:!0,thinking:{type:"disabled"}}),v=function(e){return e.ffmpeg="ffmpeg",e.smartmontools="smartctl",e.ntfs_3g="ntfs-3g",e}({}),p=function(e){return e[e.auth=0]="auth",e[e.cmd=1]="cmd",e[e.cyc=2]="cyc",e[e.sys_env=3]="sys_env",e[e.private_sys_env=4]="private_sys_env",e}({})},447(e,t,n){n.d(t,{WA:()=>v,ZI:()=>p,Zp:()=>f,fq:()=>h,gz:()=>y,uF:()=>d,xP:()=>m});var r=n(6540),l=n(3413),o=n.n(l),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,l,o,a,c=[],i=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;i=!1}else for(;!(i=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);i=!0);}catch(e){u=!0,l=e}finally{try{if(!i&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw l}}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 d(e){return s(e,u.full)}function m(e){var t,n,l,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(o())({type:"info",text:"复制完成",timeout:1e3,layout:"bottomLeft"}).show()}},null!==(n=null!==(l=e.tip_context)&&void 0!==l?l: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 p(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 y(e){return r.createElement("div",{className:"progress-card"},r.createElement("div",{className:"progress-per"},r.createElement("div",{style:{width:"".concat(e.progress,"%")}})))}var h=function(e){var t=c((0,r.useState)("var(--iconTertiary)"),2),n=t[0],l=t[1];(0,r.useEffect)(function(){null==e.ok?null==e.success?null!=e.running&&l("var(--icon-yellow)"):!0===e.success?l("var(--icon-green)"):!1===e.success&&l("var(--icon-red)"):l(e.ok?"var(--icon-green)":"var(--iconTertiary)")},[e]);var o={width:"10px",height:"10px",borderRadius:"50%",backgroundColor:n,display:"inline-block"};return r.createElement("div",{style:o})}},3033(e,t,n){n.d(t,{$Z:()=>m,GL:()=>g,Sm:()=>p,U6:()=>b,cA:()=>y,l6:()=>h});var r=n(6540),l=n(5219),o=n.n(l),a=(n(9145),n(961)),c=n(5997);function i(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 u(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 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){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,l,o,a,c=[],i=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;i=!1}else for(;!(i=(r=o.call(n)).done)&&(c.push(r.value),c.length!==t);i=!0);}catch(e){u=!0,l=e}finally{try{if(!i&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw l}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(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)?d(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 d(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 m(e){var t=(0,r.useRef)(null),n=f(r.useState(""),2),l=n[0],o=n[1];return(0,r.useEffect)(function(){var n=e.value;null==n&&(n=""),t.current.value=n,o(e.value||"")},[e.value]),r.createElement("div",{id:"search",className:"",style:{maxWidth:e.max_width,display:e.not_mobile?"block":void 0}},r.createElement("div",{id:"input"},r.createElement(c.In,{icon:e.icon}),r.createElement("input",{type:"text",ref:t,placeholder:l||e.placeholder,onChange:function(t){e.handleInputChange&&e.handleInputChange(t.target.value,t.target),o(t.target.value)},onKeyPress:function(t){"Process"===t.key||t.nativeEvent.isComposing||"Enter"===t.key&&e.handleEnterPress&&e.handleEnterPress()}})))}function v(e){var t=(0,r.useRef)(null),n=f(r.useState(""),2),l=n[0],a=n[1],c=f(r.useState("input input--block awesomplete"),2),i=c[0],u=c[1];(0,r.useEffect)(function(){a(null==e.value?"":e.value),e.focus&&t.current&&t.current.focus(),e.no_border&&u("input input--block awesomplete input--no_border")},[e.value,e.focus,e.no_border]);var d=(0,r.useRef)(e.handleInputChange);return(0,r.useEffect)(function(){d.current=e.handleInputChange},[e.handleInputChange]),(0,r.useEffect)(function(){if(null!=e.options&&t.current){var n=e.options.map(function(e){return"object"===s(e)&&null!==e?{label:e.label,value:e.value}:String(e)}),r=new(o())(t.current,{list:n,minChars:0,autoFirst:!0,filter:function(e,t){return""===t.trim()||o().FILTER_CONTAINS(e,t)},sort:function(e,n){var r;return""===(null===(r=t.current)||void 0===r?void 0:r.value.trim())?0:e.label<n.label?-1:1}}),l=function(){r.evaluate()},c=function(e){var n,r,l,o=null!==(n=null!==(r=e.text.label)&&void 0!==r?r:e.text.value)&&void 0!==n?n:e.text,c=null!==(l=e.text.value)&&void 0!==l?l:e.text;a(o),requestAnimationFrame(function(){t.current&&(t.current.value=o)}),d.current&&d.current(c,t.current)};return t.current.addEventListener("focus",l),t.current.addEventListener("awesomplete-selectcomplete",c),function(){t.current&&(t.current.removeEventListener("focus",l),t.current.removeEventListener("awesomplete-selectcomplete",c)),r.destroy()}}},[e.options]),r.createElement(r.Fragment,null,e.placeholderOut&&r.createElement("p",null,e.placeholderOut),r.createElement("div",{style:{display:"flex",alignItems:"center",width:e.width,maxWidth:e.maxWidth}},e.left_placeholder&&r.createElement("div",{style:{flex:"0 0 auto",marginRight:"4px"}},e.left_placeholder),r.createElement("input",{style:{flex:1,minWidth:0},onClick:function(e){return e.stopPropagation()},disabled:!!e.disabled,className:i,type:e.type,placeholder:e.placeholder,onChange:function(t){var n=t.target.value;a(n),e.handleInputChange&&e.handleInputChange(n,t.target)},onKeyPress:function(t){"Process"===t.key||t.nativeEvent.isComposing||"Enter"===t.key&&e.handlerEnter&&e.handlerEnter(t.currentTarget.value)},value:l,ref:t}),e.right_placeholder&&r.createElement("div",{style:{flex:"0 0 auto",marginLeft:"4px"}},e.right_placeholder)))}function p(e){return v(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach(function(t){u(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({},e))}function y(e){return v({placeholder:e.placeholder,type:"password",handleInputChange:e.handleInputChange,handlerEnter:e.handleEnterPress,maxWidth:e.maxWidth,width:e.width,value:e.value})}function h(e){var t,n,l=f((0,r.useState)(!1),2),o=l[0],c=l[1],i=f((0,r.useState)({}),2),u=i[0],s=i[1],d=(0,r.useRef)(null),m=(0,r.useRef)(null),v=e.options.find(function(t){var n;return t.value===(null!==(n=e.value)&&void 0!==n?n:e.defaultValue)});(0,r.useEffect)(function(){var e=function(e){d.current&&!d.current.contains(e.target)&&m.current&&!m.current.contains(e.target)&&c(!1)};return document.addEventListener("mousedown",e),function(){return document.removeEventListener("mousedown",e)}},[]),(0,r.useEffect)(function(){if(o&&d.current&&m.current){var e,t=d.current.getBoundingClientRect(),n=m.current.offsetHeight,r=window.innerHeight-t.bottom,l=t.top;e=r<n&&l>n?t.top-n-4:t.bottom+4,s({position:"fixed",top:e,left:t.left,width:t.width,zIndex:9999})}},[o]);return r.createElement("div",{className:"select_wrapper",style:{width:e.width||"100%"}},e.tip&&r.createElement("p",{className:"input input_left"},e.tip),r.createElement("div",{className:"select_container"},r.createElement("div",{ref:d,className:["input input--block",e.no_border?"input--no_border":"","select_trigger",e.disabled?"select_trigger--disabled":""].join(" "),onClick:function(){e.disabled||c(!o)}},r.createElement("span",{className:"select_trigger__label",style:{color:(null==v?void 0:v.color)||"inherit"}},null!==(t=null!==(n=null==v?void 0:v.title)&&void 0!==n?n:null==v?void 0:v.value)&&void 0!==t?t:""),r.createElement("i",{className:["material-icons","select_trigger__icon",o?"select_trigger__icon--open":""].join(" ")},"expand_more")),o&&(0,a.createPortal)(r.createElement("div",{ref:m,className:"select_dropdown",style:u},e.options.map(function(t,n){var l,o;return r.createElement("div",{key:n,className:["select_option",t.value===(null!==(l=e.value)&&void 0!==l?l:e.defaultValue)?"select_option--selected":""].join(" "),style:{color:t.color},onClick:function(){e.onChange(t.value),c(!1)}},null!==(o=t.title)&&void 0!==o?o:t.value)})),document.body)))}function b(e){var t,n;return r.createElement("div",{className:"input_radio_row"},r.createElement("input",{type:"radio",checked:null!==(t=e.selected)&&void 0!==t&&t,name:null!==(n=e.name)&&void 0!==n?n:"common_name",value:e.value,className:"input_radio",onChange:function(){e.onchange&&e.onchange(e.value)}}),e.context)}function g(e){return r.createElement("div",{className:"input_radio_row"},r.createElement("input",{type:"checkbox",disabled:!!e.is_disable,checked:!!e.selected,onChange:function(){e.onchange&&e.onchange()}}),e.context&&e.context)}}}]);
@@ -1,2 +1,2 @@
1
- /*! For license information please see 6247.359a059102e7897988f8.js.LICENSE.txt */
2
- (self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[4627,6247],{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)}()},447(t,e,n){"use strict";n.d(e,{WA:()=>m,ZI:()=>p,Zp:()=>d,fq:()=>b,gz:()=>v,uF:()=>f,xP:()=>h});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=[],u=!0,s=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){s=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)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}var s=function(t){return t[t.common=0]="common",t[t.full=1]="full",t}(s||{});function c(t,e){var n=e===s.common?"card-content":e===s.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 d(t){return c(t,s.common)}function f(t){return c(t,s.full)}function h(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 m(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 p(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:()=>h,GL:()=>g,Sm:()=>p,U6:()=>y,cA:()=>v,l6:()=>b});var r=n(6540),i=n(5219),o=n.n(i),a=(n(9145),n(961)),l=n(5997);function u(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 s(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=c(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==c(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(t){return c="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},c(t)}function d(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=[],u=!0,s=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){s=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw i}}return l}}(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 h(t){var e=(0,r.useRef)(null),n=d(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(l.In,{icon: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){"Process"===e.key||e.nativeEvent.isComposing||"Enter"===e.key&&t.handleEnterPress&&t.handleEnterPress()}})))}function m(t){var e=(0,r.useRef)(null),n=d(r.useState(""),2),i=n[0],a=n[1],l=d(r.useState("input input--block awesomplete"),2),u=l[0],s=l[1];(0,r.useEffect)(function(){a(null==t.value?"":t.value),t.focus&&e.current&&e.current.focus(),t.no_border&&s("input input--block awesomplete input--no_border")},[t.value,t.focus,t.no_border]);var f=(0,r.useRef)(t.handleInputChange);return(0,r.useEffect)(function(){f.current=t.handleInputChange},[t.handleInputChange]),(0,r.useEffect)(function(){if(null!=t.options&&e.current){var n=t.options.map(function(t){return"object"===c(t)&&null!==t?{label:t.label,value:t.value}:String(t)}),r=new(o())(e.current,{list:n,minChars:0,autoFirst:!0,filter:function(t,e){return""===e.trim()||o().FILTER_CONTAINS(t,e)},sort:function(t,n){var r;return""===(null===(r=e.current)||void 0===r?void 0:r.value.trim())?0:t.label<n.label?-1:1}}),i=function(){r.evaluate()},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)}),f.current&&f.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){"Process"===e.key||e.nativeEvent.isComposing||"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 p(t){return m(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach(function(e){s(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},t))}function v(t){return m({placeholder:t.placeholder,type:"password",handleInputChange:t.handleInputChange,handlerEnter:t.handleEnterPress,maxWidth:t.maxWidth,width:t.width,value:t.value})}function b(t){var e,n,i=d((0,r.useState)(!1),2),o=i[0],l=i[1],u=d((0,r.useState)({}),2),s=u[0],c=u[1],f=(0,r.useRef)(null),h=(0,r.useRef)(null),m=t.options.find(function(e){var n;return e.value===(null!==(n=t.value)&&void 0!==n?n:t.defaultValue)});(0,r.useEffect)(function(){var t=function(t){f.current&&!f.current.contains(t.target)&&h.current&&!h.current.contains(t.target)&&l(!1)};return document.addEventListener("mousedown",t),function(){return document.removeEventListener("mousedown",t)}},[]),(0,r.useEffect)(function(){if(o&&f.current&&h.current){var t,e=f.current.getBoundingClientRect(),n=h.current.offsetHeight,r=window.innerHeight-e.bottom,i=e.top;t=r<n&&i>n?e.top-n-4:e.bottom+4,c({position:"fixed",top:t,left:e.left,width:e.width,zIndex:9999})}},[o]);return r.createElement("div",{className:"select_wrapper",style:{width:t.width||"100%"}},t.tip&&r.createElement("p",{className:"input input_left"},t.tip),r.createElement("div",{className:"select_container"},r.createElement("div",{ref:f,className:["input input--block",t.no_border?"input--no_border":"","select_trigger",t.disabled?"select_trigger--disabled":""].join(" "),onClick:function(){t.disabled||l(!o)}},r.createElement("span",{className:"select_trigger__label",style:{color:(null==m?void 0:m.color)||"inherit"}},null!==(e=null!==(n=null==m?void 0:m.title)&&void 0!==n?n:null==m?void 0:m.value)&&void 0!==e?e:""),r.createElement("i",{className:["material-icons","select_trigger__icon",o?"select_trigger__icon--open":""].join(" ")},"expand_more")),o&&(0,a.createPortal)(r.createElement("div",{ref:h,className:"select_dropdown",style:s},t.options.map(function(e,n){var i,o;return r.createElement("div",{key:n,className:["select_option",e.value===(null!==(i=t.value)&&void 0!==i?i:t.defaultValue)?"select_option--selected":""].join(" "),style:{color:e.color||"#111"},onClick:function(){t.onChange(e.value),l(!1)}},null!==(o=e.title)&&void 0!==o?o:e.value)})),document.body)))}function y(t){var e,n;return r.createElement("div",{className:"input_radio_row"},r.createElement("input",{type:"radio",checked:null!==(e=t.selected)&&void 0!==e&&e,name:null!==(n=t.name)&&void 0!==n?n:"common_name",value:t.value,className:"input_radio",onChange:function(){t.onchange&&t.onchange(t.value)}}),t.context)}function g(t){return r.createElement("div",{className:"input_radio_row"},r.createElement("input",{type:"checkbox",disabled:!!t.is_disable,checked:!!t.selected,onChange:function(){t.onchange&&t.onchange()}}),t.context&&t.context)}},7481(t,e,n){"use strict";n.d(e,{S:()=>l,X:()=>a});var r=n(6540);function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],u=!0,s=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){s=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw i}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function a(t){var e,n=i(r.useState([]),2),o=n[0],a=n[1];return(0,r.useEffect)(function(){t.children?a(Array.isArray(t.children)?t.children:[t.children]):a(t.rows)},[t.rows,t.children]),r.createElement("table",null,r.createElement("thead",null,r.createElement("tr",null,null===(e=t.headers)||void 0===e?void 0:e.map(function(t,e){return r.createElement("th",{key:e},t)}))),r.createElement("tbody",null,o.map(function(e,n){return r.createElement("tr",{key:n,onContextMenu:function(){t.handleContextMenu&&t.handleContextMenu(e)}},e.map(function(n,i){var o;return r.createElement("td",{style:{width:null!==(o=t.width)&&void 0!==o?o:"auto"},key:i,className:i===e.length-1?"small":""},n)}))})))}function l(t){return r.createElement("div",{style:{display:t.isFlex?"flex":"block"}},t.columns.map(function(t,e){return r.createElement("div",{key:e},t)}))}},6247(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>I});var r=n(6540),i=n(5725),o=n(447),a=n(5997),l=n(7481),u=n(3033),s=n(2389),c=n(4284),d=n(3459),f=n(2042),h=n(7361),m=n(505),p=n(7952),v=n(7767),b=n(7444),y=n(6417),g=n(1469),E=n(1499);function w(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=r&&r.prototype instanceof l?r:l,s=Object.create(u.prototype);return x(s,"_invoke",function(n,r,i){var o,l,u,s=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,u=t,f.n=n,a}};function h(n,r){for(l=n,u=r,e=0;!d&&s&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,m=o[2];n>3?(i=m===r)&&(u=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<m&&(i=n<3||o[0]>r||r>m)&&(o[4]=n,o[5]=r,f.n=m,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,m){if(s>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,m),l=c,u=m;(e=l<2?t:u)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,u)):f.n=u:f.v=u);try{if(s=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?u:n.call(r,f))!==a)break}catch(e){o=t,l=1,u=e}finally{s=1}}return{value:e,done:d}}}(n,i,o),!0),s}var a={};function l(){}function u(){}function s(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(x(e={},r,function(){return this}),e),d=s.prototype=l.prototype=Object.create(c);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,x(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return u.prototype=s,x(d,"constructor",s),x(s,"constructor",u),u.displayName="GeneratorFunction",x(s,i,"GeneratorFunction"),x(d),x(d,i,"Generator"),x(d,r,function(){return this}),x(d,"toString",function(){return"[object Generator]"}),(w=function(){return{w:o,m:f}})()}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){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=O(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,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 A(t,e,n,r,i,o,a){try{var l=t[o](a),u=l.value}catch(t){return void n(t)}l.done?e(u):Promise.resolve(u).then(r,i)}function C(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){A(o,r,i,a,l,"next",t)}function l(t){A(o,r,i,a,l,"throw",t)}a(void 0)})}}function S(t){return function(t){if(Array.isArray(t))return N(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||O(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],u=!0,s=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){s=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw i}}return l}}(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 N(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)?N(t,e):void 0}}function N(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 I(){var t=(0,s.Bd)(),e=t.t,n=(t.i18n,(0,v.Zp)()),x=[e("编号"),e("路径"),e("过期小时"),e("token"),e("备注"),e("剩余时间(h)"),e("下载次数")],A=k((0,r.useState)([]),2),O=A[0],N=A[1],I=k((0,b.L4)(y.AG.prompt_card),2),j=(I[0],I[1]),T=function(){var t=C(w().m(function t(){var e,n,r,i,o,a,l,u,s;return w().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,c.XO.get("get_share_file_list");case 1:if((e=t.v).code===d.m.Success){r=null!==(n=e.data)&&void 0!==n?n:[],i=Date.now(),o=_(r);try{for(o.s();!(a=o.n()).done;){l=a.value;try{null!=l.left_hour&&l.left_hour>0?(u=i-l.time_stamp,s=36e5*l.left_hour-u,l.show_left_hour=parseFloat((s/36e5).toFixed(2))):l.show_left_hour=l.left_hour}catch(t){}}}catch(t){o.e(t)}finally{o.f()}N(r)}case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();(0,r.useEffect)(function(){T()},[]);var P=function(){var t=C(w().m(function t(){return w().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,c.XO.post("set_share_file_list",O);case 1:t.v.code===d.m.Success&&((0,f.LW)("保存成功"),T());case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();return r.createElement("div",{className:"common-box "},r.createElement(p.A,null,r.createElement(a.rA,{icon:"arrow_back",title:e("上一页"),onClick:function(){n(-1)}})),r.createElement(i.J,{widthPer:100},r.createElement(o.uF,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,e("文件分享列表")),r.createElement(a.rA,{icon:"info",title:e("提示"),onClick:function(){var t=r.createElement("div",null,"小时设置为-1或者不设置就没有过期时间");j({open:!0,title:"信息",context_div:r.createElement("div",null,t)})}})),titleCom:r.createElement("div",null,r.createElement(a.rA,{icon:"add",title:e("添加"),onClick:function(){N([].concat(S(O),[{note:"",path:""}]))}}),r.createElement(a.rA,{icon:"save",title:e("保存"),onClick:P}))},r.createElement(l.X,{headers:x,rows:O.map(function(t,n){var i=[r.createElement("div",null,n),r.createElement(u.Sm,{value:t.path,handleInputChange:function(e){t.path=e},no_border:!0}),r.createElement(u.Sm,{value:t.left_hour,handleInputChange:function(e){t.left_hour=parseFloat(e),t.time_stamp=Date.now()},no_border:!0}),r.createElement(u.Sm,{value:t.token,handleInputChange:function(e){t.token=e},no_border:!0}),r.createElement(u.Sm,{value:t.note,handleInputChange:function(e){t.note=e},no_border:!0}),r.createElement("p",null,t.show_left_hour),r.createElement("p",null,t.download_num),r.createElement("div",null,r.createElement(a.rA,{icon:"delete",title:e("删除"),onClick:function(){return function(t){O.splice(t,1),N(S(O))}(n)}}),t.id&&r.createElement(a.rA,{icon:"content_copy",title:e("复制地址"),onClick:function(){var e=(0,E.bi)("".concat(window.location.origin).concat(g.m.base_url),"".concat(h.o.share,"/").concat(t.id));(0,m.lW)(e),(0,f.LW)(e)}}))];return i}),width:"10rem"}))))}},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),u=n.n(l),s=n(5056),c=n.n(s),d=n(540),f=n.n(d),h=n(1113),m=n.n(h),p=n(1028),v={};v.styleTagTransform=m(),v.setAttributes=c(),v.insert=u().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=f();i()(p.A,v),p.A&&p.A.locals&&p.A.locals}}]);
1
+ /*! For license information please see 6247.172a368e2abcc340552b.js.LICENSE.txt */
2
+ (self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[4627,6247],{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)}()},447(t,e,n){"use strict";n.d(e,{WA:()=>m,ZI:()=>p,Zp:()=>d,fq:()=>b,gz:()=>v,uF:()=>f,xP:()=>h});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=[],u=!0,s=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){s=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)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}var s=function(t){return t[t.common=0]="common",t[t.full=1]="full",t}(s||{});function c(t,e){var n=e===s.common?"card-content":e===s.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 d(t){return c(t,s.common)}function f(t){return c(t,s.full)}function h(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 m(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 p(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:()=>h,GL:()=>g,Sm:()=>p,U6:()=>y,cA:()=>v,l6:()=>b});var r=n(6540),i=n(5219),o=n.n(i),a=(n(9145),n(961)),l=n(5997);function u(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 s(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=c(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==c(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(t){return c="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},c(t)}function d(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=[],u=!0,s=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){s=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw i}}return l}}(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 h(t){var e=(0,r.useRef)(null),n=d(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(l.In,{icon: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){"Process"===e.key||e.nativeEvent.isComposing||"Enter"===e.key&&t.handleEnterPress&&t.handleEnterPress()}})))}function m(t){var e=(0,r.useRef)(null),n=d(r.useState(""),2),i=n[0],a=n[1],l=d(r.useState("input input--block awesomplete"),2),u=l[0],s=l[1];(0,r.useEffect)(function(){a(null==t.value?"":t.value),t.focus&&e.current&&e.current.focus(),t.no_border&&s("input input--block awesomplete input--no_border")},[t.value,t.focus,t.no_border]);var f=(0,r.useRef)(t.handleInputChange);return(0,r.useEffect)(function(){f.current=t.handleInputChange},[t.handleInputChange]),(0,r.useEffect)(function(){if(null!=t.options&&e.current){var n=t.options.map(function(t){return"object"===c(t)&&null!==t?{label:t.label,value:t.value}:String(t)}),r=new(o())(e.current,{list:n,minChars:0,autoFirst:!0,filter:function(t,e){return""===e.trim()||o().FILTER_CONTAINS(t,e)},sort:function(t,n){var r;return""===(null===(r=e.current)||void 0===r?void 0:r.value.trim())?0:t.label<n.label?-1:1}}),i=function(){r.evaluate()},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)}),f.current&&f.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){"Process"===e.key||e.nativeEvent.isComposing||"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 p(t){return m(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach(function(e){s(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},t))}function v(t){return m({placeholder:t.placeholder,type:"password",handleInputChange:t.handleInputChange,handlerEnter:t.handleEnterPress,maxWidth:t.maxWidth,width:t.width,value:t.value})}function b(t){var e,n,i=d((0,r.useState)(!1),2),o=i[0],l=i[1],u=d((0,r.useState)({}),2),s=u[0],c=u[1],f=(0,r.useRef)(null),h=(0,r.useRef)(null),m=t.options.find(function(e){var n;return e.value===(null!==(n=t.value)&&void 0!==n?n:t.defaultValue)});(0,r.useEffect)(function(){var t=function(t){f.current&&!f.current.contains(t.target)&&h.current&&!h.current.contains(t.target)&&l(!1)};return document.addEventListener("mousedown",t),function(){return document.removeEventListener("mousedown",t)}},[]),(0,r.useEffect)(function(){if(o&&f.current&&h.current){var t,e=f.current.getBoundingClientRect(),n=h.current.offsetHeight,r=window.innerHeight-e.bottom,i=e.top;t=r<n&&i>n?e.top-n-4:e.bottom+4,c({position:"fixed",top:t,left:e.left,width:e.width,zIndex:9999})}},[o]);return r.createElement("div",{className:"select_wrapper",style:{width:t.width||"100%"}},t.tip&&r.createElement("p",{className:"input input_left"},t.tip),r.createElement("div",{className:"select_container"},r.createElement("div",{ref:f,className:["input input--block",t.no_border?"input--no_border":"","select_trigger",t.disabled?"select_trigger--disabled":""].join(" "),onClick:function(){t.disabled||l(!o)}},r.createElement("span",{className:"select_trigger__label",style:{color:(null==m?void 0:m.color)||"inherit"}},null!==(e=null!==(n=null==m?void 0:m.title)&&void 0!==n?n:null==m?void 0:m.value)&&void 0!==e?e:""),r.createElement("i",{className:["material-icons","select_trigger__icon",o?"select_trigger__icon--open":""].join(" ")},"expand_more")),o&&(0,a.createPortal)(r.createElement("div",{ref:h,className:"select_dropdown",style:s},t.options.map(function(e,n){var i,o;return r.createElement("div",{key:n,className:["select_option",e.value===(null!==(i=t.value)&&void 0!==i?i:t.defaultValue)?"select_option--selected":""].join(" "),style:{color:e.color},onClick:function(){t.onChange(e.value),l(!1)}},null!==(o=e.title)&&void 0!==o?o:e.value)})),document.body)))}function y(t){var e,n;return r.createElement("div",{className:"input_radio_row"},r.createElement("input",{type:"radio",checked:null!==(e=t.selected)&&void 0!==e&&e,name:null!==(n=t.name)&&void 0!==n?n:"common_name",value:t.value,className:"input_radio",onChange:function(){t.onchange&&t.onchange(t.value)}}),t.context)}function g(t){return r.createElement("div",{className:"input_radio_row"},r.createElement("input",{type:"checkbox",disabled:!!t.is_disable,checked:!!t.selected,onChange:function(){t.onchange&&t.onchange()}}),t.context&&t.context)}},7481(t,e,n){"use strict";n.d(e,{S:()=>l,X:()=>a});var r=n(6540);function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],u=!0,s=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){s=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw i}}return l}}(t,e)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function a(t){var e,n=i(r.useState([]),2),o=n[0],a=n[1];return(0,r.useEffect)(function(){t.children?a(Array.isArray(t.children)?t.children:[t.children]):a(t.rows)},[t.rows,t.children]),r.createElement("table",null,r.createElement("thead",null,r.createElement("tr",null,null===(e=t.headers)||void 0===e?void 0:e.map(function(t,e){return r.createElement("th",{key:e},t)}))),r.createElement("tbody",null,o.map(function(e,n){return r.createElement("tr",{key:n,onContextMenu:function(){t.handleContextMenu&&t.handleContextMenu(e)}},e.map(function(n,i){var o;return r.createElement("td",{style:{width:null!==(o=t.width)&&void 0!==o?o:"auto"},key:i,className:i===e.length-1?"small":""},n)}))})))}function l(t){return r.createElement("div",{style:{display:t.isFlex?"flex":"block"}},t.columns.map(function(t,e){return r.createElement("div",{key:e},t)}))}},6247(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>I});var r=n(6540),i=n(5725),o=n(447),a=n(5997),l=n(7481),u=n(3033),s=n(2389),c=n(4284),d=n(3459),f=n(2042),h=n(7361),m=n(505),p=n(7952),v=n(7767),b=n(7444),y=n(6417),g=n(1469),E=n(1499);function w(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=r&&r.prototype instanceof l?r:l,s=Object.create(u.prototype);return x(s,"_invoke",function(n,r,i){var o,l,u,s=0,c=i||[],d=!1,f={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,u=t,f.n=n,a}};function h(n,r){for(l=n,u=r,e=0;!d&&s&&!i&&e<c.length;e++){var i,o=c[e],h=f.p,m=o[2];n>3?(i=m===r)&&(u=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,f.v=r,f.n=o[1]):h<m&&(i=n<3||o[0]>r||r>m)&&(o[4]=n,o[5]=r,f.n=m,l=0))}if(i||n>1)return a;throw d=!0,r}return function(i,c,m){if(s>1)throw TypeError("Generator is already running");for(d&&1===c&&h(c,m),l=c,u=m;(e=l<2?t:u)||!d;){o||(l?l<3?(l>1&&(f.n=-1),h(l,u)):f.n=u:f.v=u);try{if(s=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(d=f.n<0)?u:n.call(r,f))!==a)break}catch(e){o=t,l=1,u=e}finally{s=1}}return{value:e,done:d}}}(n,i,o),!0),s}var a={};function l(){}function u(){}function s(){}e=Object.getPrototypeOf;var c=[][r]?e(e([][r]())):(x(e={},r,function(){return this}),e),d=s.prototype=l.prototype=Object.create(c);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,x(t,i,"GeneratorFunction")),t.prototype=Object.create(d),t}return u.prototype=s,x(d,"constructor",s),x(s,"constructor",u),u.displayName="GeneratorFunction",x(s,i,"GeneratorFunction"),x(d),x(d,i,"Generator"),x(d,r,function(){return this}),x(d,"toString",function(){return"[object Generator]"}),(w=function(){return{w:o,m:f}})()}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){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=O(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,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 A(t,e,n,r,i,o,a){try{var l=t[o](a),u=l.value}catch(t){return void n(t)}l.done?e(u):Promise.resolve(u).then(r,i)}function C(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){A(o,r,i,a,l,"next",t)}function l(t){A(o,r,i,a,l,"throw",t)}a(void 0)})}}function S(t){return function(t){if(Array.isArray(t))return N(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||O(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],u=!0,s=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){s=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(s)throw i}}return l}}(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 N(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)?N(t,e):void 0}}function N(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 I(){var t=(0,s.Bd)(),e=t.t,n=(t.i18n,(0,v.Zp)()),x=[e("编号"),e("路径"),e("过期小时"),e("token"),e("备注"),e("剩余时间(h)"),e("下载次数")],A=k((0,r.useState)([]),2),O=A[0],N=A[1],I=k((0,b.L4)(y.AG.prompt_card),2),j=(I[0],I[1]),T=function(){var t=C(w().m(function t(){var e,n,r,i,o,a,l,u,s;return w().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,c.XO.get("get_share_file_list");case 1:if((e=t.v).code===d.m.Success){r=null!==(n=e.data)&&void 0!==n?n:[],i=Date.now(),o=_(r);try{for(o.s();!(a=o.n()).done;){l=a.value;try{null!=l.left_hour&&l.left_hour>0?(u=i-l.time_stamp,s=36e5*l.left_hour-u,l.show_left_hour=parseFloat((s/36e5).toFixed(2))):l.show_left_hour=l.left_hour}catch(t){}}}catch(t){o.e(t)}finally{o.f()}N(r)}case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();(0,r.useEffect)(function(){T()},[]);var P=function(){var t=C(w().m(function t(){return w().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,c.XO.post("set_share_file_list",O);case 1:t.v.code===d.m.Success&&((0,f.LW)("保存成功"),T());case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}();return r.createElement("div",{className:"common-box "},r.createElement(p.A,null,r.createElement(a.rA,{icon:"arrow_back",title:e("上一页"),onClick:function(){n(-1)}})),r.createElement(i.J,{widthPer:100},r.createElement(o.uF,{self_title:r.createElement("span",{className:" div-row "},r.createElement("h2",null,e("文件分享列表")),r.createElement(a.rA,{icon:"info",title:e("提示"),onClick:function(){var t=r.createElement("div",null,"小时设置为-1或者不设置就没有过期时间");j({open:!0,title:"信息",context_div:r.createElement("div",null,t)})}})),titleCom:r.createElement("div",null,r.createElement(a.rA,{icon:"add",title:e("添加"),onClick:function(){N([].concat(S(O),[{note:"",path:""}]))}}),r.createElement(a.rA,{icon:"save",title:e("保存"),onClick:P}))},r.createElement(l.X,{headers:x,rows:O.map(function(t,n){var i=[r.createElement("div",null,n),r.createElement(u.Sm,{value:t.path,handleInputChange:function(e){t.path=e},no_border:!0}),r.createElement(u.Sm,{value:t.left_hour,handleInputChange:function(e){t.left_hour=parseFloat(e),t.time_stamp=Date.now()},no_border:!0}),r.createElement(u.Sm,{value:t.token,handleInputChange:function(e){t.token=e},no_border:!0}),r.createElement(u.Sm,{value:t.note,handleInputChange:function(e){t.note=e},no_border:!0}),r.createElement("p",null,t.show_left_hour),r.createElement("p",null,t.download_num),r.createElement("div",null,r.createElement(a.rA,{icon:"delete",title:e("删除"),onClick:function(){return function(t){O.splice(t,1),N(S(O))}(n)}}),t.id&&r.createElement(a.rA,{icon:"content_copy",title:e("复制地址"),onClick:function(){var e=(0,E.bi)("".concat(window.location.origin).concat(g.m.base_url),"".concat(h.o.share,"/").concat(t.id));(0,m.lW)(e),(0,f.LW)(e)}}))];return i}),width:"10rem"}))))}},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),u=n.n(l),s=n(5056),c=n.n(s),d=n(540),f=n.n(d),h=n(1113),m=n.n(h),p=n(1028),v={};v.styleTagTransform=m(),v.setAttributes=c(),v.insert=u().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=f();i()(p.A,v),p.A&&p.A.locals&&p.A.locals}}]);
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 8302.ad43518baaec286ab7a0.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[6010,8302],{9591(e,t,n){n.r(t),n.d(t,{default:()=>W});var r=n(2389),o=n(6540),a=n(5997),c=n(7952),i=n(7444),l=n(6417),u=n(5725),s=n(7481),m=n(3033),f=n(447),d=n(4299);function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,c,i=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(u)throw o}}return i}}(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}var h=n(4284),y=n(3459),_=n(2042),g=n(7523),b=n(8247),E=n(3430),w=n(4777),A=n(7767),C=n(4944),S=n(4188),k=n(8815),j=n(5907),O=n(2721),x=n(4659);function P(e){return P="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},P(e)}function I(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 N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(Object(n),!0).forEach(function(t){T(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function T(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=P(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=P(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==P(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M(e){return function(e){if(Array.isArray(e))return H(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||V(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var l=r&&r.prototype instanceof i?r:i,u=Object.create(l.prototype);return K(u,"_invoke",function(n,r,o){var a,i,l,u=0,s=o||[],m=!1,f={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return a=t,i=0,l=e,f.n=n,c}};function d(n,r){for(i=n,l=r,t=0;!m&&u&&!o&&t<s.length;t++){var o,a=s[t],d=f.p,p=a[2];n>3?(o=p===r)&&(l=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=d&&((o=n<2&&d<a[1])?(i=0,f.v=r,f.n=a[1]):d<p&&(o=n<3||a[0]>r||r>p)&&(a[4]=n,a[5]=r,f.n=p,i=0))}if(o||n>1)return c;throw m=!0,r}return function(o,s,p){if(u>1)throw TypeError("Generator is already running");for(m&&1===s&&d(s,p),i=s,l=p;(t=i<2?e:l)||!m;){a||(i?i<3?(i>1&&(f.n=-1),d(i,l)):f.n=l:f.v=l);try{if(u=2,a){if(i||(o="next"),t=a[o]){if(!(t=t.call(a,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,i<2&&(i=0)}else 1===i&&(t=a.return)&&t.call(a),i<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=e}else if((t=(m=f.n<0)?l:n.call(r,f))!==c)break}catch(t){a=e,i=1,l=t}finally{u=1}}return{value:t,done:m}}}(n,o,a),!0),u}var c={};function i(){}function l(){}function u(){}t=Object.getPrototypeOf;var s=[][r]?t(t([][r]())):(K(t={},r,function(){return this}),t),m=u.prototype=i.prototype=Object.create(s);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,K(e,o,"GeneratorFunction")),e.prototype=Object.create(m),e}return l.prototype=u,K(m,"constructor",u),K(u,"constructor",l),l.displayName="GeneratorFunction",K(u,o,"GeneratorFunction"),K(m),K(m,o,"Generator"),K(m,r,function(){return this}),K(m,"toString",function(){return"[object Generator]"}),(G=function(){return{w:a,m:f}})()}function K(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}K=function(e,t,n,r){function a(t,n){K(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},K(e,t,n,r)}function L(e,t,n,r,o,a,c){try{var i=e[a](c),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}function X(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function c(e){L(a,r,o,c,i,"next",e)}function i(e){L(a,r,o,c,i,"throw",e)}c(void 0)})}}function F(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,c,i=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(u)throw o}}return i}}(e,t)||V(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){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}}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 W(){var e=(0,r.Bd)().t,t=(0,o.useContext)(g.F).initUserInfo,n=[e("编号"),e("url"),e("是否开启"),e("token"),"model",e("prompt|model|setting"),e("备注")],v=[e("编号"),e("本地目录"),e("自动加载"),e("备注")],P=F((0,o.useState)([]),2),I=P[0],T=P[1],K=F((0,o.useState)([]),2),L=K[0],V=K[1],H=F((0,o.useState)([]),2),W=H[0],D=H[1],R=F((0,o.useState)(null),2),Y=R[0],U=R[1],z=(0,o.useRef)(),B=(0,o.useRef)(!1),$=(0,o.useRef)(!1),Z=F((0,o.useState)([]),2),J=Z[0],q=Z[1],Q=F((0,o.useState)(!1),2),ee=(Q[0],Q[1]),te=F((0,i.L4)(l.AG.prompt_card),2),ne=(te[0],te[1]),re=F((0,i.L4)(l.AG.user_base_info),2),oe=(re[0],re[1],F((0,o.useState)(!1),2)),ae=oe[0],ce=oe[1],ie=W.filter(function(e){var t;return"http"!==(null!==(t=e.transport)&&void 0!==t?t:"stdio")}),le=W.filter(function(e){return"http"===e.transport}),ue=[e("编号"),e("名称"),e("是否开启"),"command","args","cwd",e("tools|env"),e("备注")],se=[e("编号"),e("名称"),e("是否开启"),e("endpoint"),e("tools|headers"),e("备注")],me=[e("编号"),e("提示词"),e("备注"),e("操作")],fe=F((0,o.useState)([]),2),de=fe[0],pe=fe[1],ve=function(){var e=p((0,i.L4)(l.AG.prompt_card),2),t=(e[0],e[1]);return function(e){t({open:!0,title:"信息",context_div:o.createElement("div",null,o.createElement(d.default,{context:e}))})}}(),he=(0,b.MH)().check_user_auth,ye=F((0,i.L4)(l.AG.editorSetting),2),_e=(ye[0],ye[1]),ge=(0,A.Zp)(),be=(0,j.y)(),Ee=(0,x.K)(),we=function(){var e=X(G().m(function e(){var t;return G().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,h.jV.get("docs_on_get");case 1:(t=e.v).code===y.m.Success&&ce(t.data);case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}(),Ae=function(){var e=X(G().m(function e(){var t,n,r,o,a,c,i,l;return G().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,h.XO.get("ai_agent_setting");case 1:return(t=e.v).code===y.m.Success&&T(t.data.models),e.n=2,C.ws.addMsg(S.HK.ai_load_info,function(e){U(e.context)});case 2:return e.n=3,C.ws.sendData(S.HK.ai_load_info,{});case 3:return null!=(n=e.v)&&n.context&&U(n.context),e.n=4,h.XO.get("ai_docs_setting");case 4:return(r=e.v).code===y.m.Success&&(z.current=r.data.param,null!==(o=r.data.list)&&void 0!==o&&o.length&&V(r.data.list)),e.n=5,h.XO.get("ai_mcp_setting");case 5:return(a=e.v).code===y.m.Success&&D(null!==(c=a.data.list)&&void 0!==c?c:[]),e.n=6,xe();case 6:return we(),e.n=7,h.XO.get("ai_system_prompts");case 7:(i=e.v).code===y.m.Success&&pe(null!==(l=i.data)&&void 0!==l?l:[]);case 8:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();(0,o.useEffect)(function(){Ae()},[]);var Ce=function(){var e="http"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"stdio")?{name:"",open:!1,note:"",transport:"http",endpoint:"",headers:"",stream:!1,timeout_ms:1e4}:{name:"",open:!1,command:"",args:"",cwd:"",env:"",note:"",transport:"stdio",timeout_ms:1e4};D([].concat(M(W),[e])),B.current=!0},Se=function(e){var t=W.indexOf(e);t<0||(W.splice(t,1),D(M(W)),B.current=!0)},ke=function(e){D([].concat(M(W),[N(N({},e),{},{open:!1})])),B.current=!0},je=function(){var e=X(G().m(function e(t){var n;return G().w(function(e){for(;;)switch(e.n){case 0:for(n=0;n<I.length;n++)I[n].index=n;return e.n=1,h.XO.post("ai_agent_setting/save",{models:null!=t?t:I});case 1:e.v.code===y.m.Success&&(0,_.LW)("保存成功");case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),Oe=function(){var e=X(G().m(function e(t){var n;return G().w(function(e){for(;;)switch(e.n){case 0:for(n=0;n<W.length;n++)W[n].index=n;return e.n=1,h.XO.post("ai_mcp_setting/save",{list:null!=t?t:W});case 1:if(e.v.code!==y.m.Success){e.n=2;break}return(0,_.LW)("保存成功"),B.current=!1,e.n=2,xe();case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),xe=function(){var e=X(G().m(function e(){var t,n,r;return G().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,h.XO.get("ai_mcp_tools");case 1:if((t=e.v).code!==y.m.Success){e.n=2;break}return q(null!==(n=t.data)&&void 0!==n?n:[]),e.a(2,null!==(r=t.data)&&void 0!==r?r:[]);case 2:return e.a(2,[])}},e)}));return function(){return e.apply(this,arguments)}}(),Pe=function(){var e=X(G().m(function e(t){var n,r;return G().w(function(e){for(;;)switch(e.p=e.n){case 0:return ee(!0),e.p=1,e.n=2,h.XO.post("ai_mcp_tools/reload",{index:t});case 2:if((n=e.v).code!==y.m.Success){e.n=4;break}return e.n=3,xe();case 3:return(0,_.LW)("MCP工具加载成功"),e.a(2,null!==(r=n.data)&&void 0!==r?r:null);case 4:return e.p=4,ee(!1),e.f(4);case 5:return e.a(2,null)}},e,null,[[1,,4,5]])}));return function(t){return e.apply(this,arguments)}}(),Ie=function(){var t=X(G().m(function t(n,r,a,c){var i,l,u,s,m,f,d;return G().w(function(t){for(;;)switch(t.n){case 0:f=null!==(i=null!=c?c:J.find(function(e){return e.index===r}))&&void 0!==i?i:{index:r,key:"".concat(r),name:null!==(l=n.name)&&void 0!==l?l:"",note:n.note,transport:null!==(u=n.transport)&&void 0!==u?u:"stdio",open:!!n.open,loaded:!1,tool_count:0,tools:[]},d=(null!==(s=f.tools)&&void 0!==s?s:[]).map(function(t){return{id:t.runtime_name,title:t.tool_name,subtitle:t.description||e("无描述"),detail:t.display_name,meta:t.runtime_name}}),ne({open:!0,title:"".concat(n.name||n.note||r," MCP工具"),context_div:o.createElement(O.O,{title:"".concat(n.name||n.note||r," MCP工具"),subtitle:"".concat(null!==(m=f.transport)&&void 0!==m?m:"stdio"," | ").concat(f.open?e("是"):e("否")," | ").concat(f.loaded?"loaded":"idle"," | ").concat(f.tool_count," tools"),pages:d,initialPageId:a,onRefresh:X(G().m(function e(){var t;return G().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,Pe(r);case 1:if(!(t=e.v)){e.n=2;break}return e.n=2,Ie(n,r,a,t);case 2:return e.a(2)}},e)})),renderPage:function(t){var n,r;if(!t)return o.createElement("div",{className:"prompt-switch-page__empty"},e("暂无工具"));var a=null===(n=f.tools)||void 0===n?void 0:n.find(function(e){return e.runtime_name===t.id});return a?o.createElement("div",{className:"prompt-switch-page__detail"},o.createElement("div",{className:"prompt-switch-page__detail-title"},a.display_name),o.createElement("div",{className:"prompt-switch-page__detail-desc"},a.description||e("无描述")),o.createElement("div",{className:"prompt-switch-page__detail-row"},o.createElement("strong",null,"runtime:")," ",a.runtime_name),o.createElement("div",null,o.createElement("strong",null,"schema:"),o.createElement("pre",{className:"prompt-switch-page__schema"},JSON.stringify(null!==(r=a.input_schema)&&void 0!==r?r:{},null,2)))):o.createElement("div",{className:"prompt-switch-page__empty"},e("暂无工具"))}}),cancel:function(){return ne({open:!1})}});case 1:return t.a(2)}},t)}));return function(e,n,r,o){return t.apply(this,arguments)}}(),Ne=function(){var e=X(G().m(function e(t){var n,r;return G().w(function(e){for(;;)switch(e.n){case 0:for(n=0;n<I.length;n++)I[n].index=n;return r={list:L,docs_update_tag:$.current},null!=t&&(r={param:t}),$.current=!1,e.n=1,h.XO.post("ai_docs_setting_save",r);case 1:e.v.code===y.m.Success&&(0,_.LW)("保存成功");case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),Te=function(){var e=X(G().m(function e(){var t;return G().w(function(e){for(;;)switch(e.n){case 0:for(t=0;t<de.length;t++)de[t].index=t;return e.n=1,h.XO.post("ai_system_prompts/save",{list:de});case 1:e.v.code===y.m.Success&&(0,_.LW)("保存成功");case 2:return e.a(2)}},e)}));return function(){return e.apply(this,arguments)}}();return o.createElement("div",null,o.createElement(c.A,null,he(E.oV.ai_agent_setting)&&o.createElement(a.rA,{icon:"arrow_back",title:e("上一页"),onClick:function(){ge(-1)}})),o.createElement(u.jW,{isFull:!0,more:!0},o.createElement(u.NN,null,o.createElement(u.xh,null,o.createElement(u.fI,null,o.createElement(u.VP,{widthPer:70},o.createElement(f.uF,{self_title:o.createElement("span",{className:" div-row "},o.createElement("h2",null,e("Model")+" "+e("设置"))," ",o.createElement(a.rA,{icon:"info",onClick:function(){ve('\n1. 只能使用符合openai风格的ai接口,接口不能只填域名,而是类似 https://ark.cn-beijing.volces.com/api/v3/chat/completions 这样的全路径链接聊天url\n2. 对话的历史越长,消耗的大模型token费用越贵,目前不具备长期记忆简化能力,可以在系统prompt中设置一下让AI回答的简洁一点,节省tokens\n3. model请求参数json编写,里面只能编写json,来用于编写openai风格ai支持的属性,比如 temperature thinking(豆包的深度思考开关)等\n4. 可以在model请求参数中开启 "stream":true 提高响应速度\n5. 深度思考现在会影响输出速度,建议设置`{\n "thinking" : { \n "type":"disabled"\n }\n}`关闭(豆包例子)\n6. 使用AI功能来查询服务器信息,那么AI就需要能够之一些命令,需要先在用户设置中,给用户设置命令权限,建议设置 `*` 允许全部命令,在设置禁止不能执行的危险命令。\n')},title:"信息"})),titleCom:o.createElement("div",null,o.createElement(a.rA,{icon:"add",title:e("添加"),onClick:function(){T([].concat(M(I),[{note:"",open:!1,path:"",dotenv:w.CP,json_params:w.cL}]))}}),o.createElement(a.rA,{icon:"save",title:e("保存"),onClick:function(){je()}}))},o.createElement(s.X,{headers:n,rows:I.map(function(t,n){var r=[o.createElement("div",null,n),o.createElement(m.Sm,{value:t.url,handleInputChange:function(e){t.url=e},no_border:!0}),o.createElement(m.l6,{value:t.open,onChange:function(e){!function(e,t,n){for(var r=[],o=0;o<I.length;o++)I[o].open=o===n&&t,r.push(I[o]);T(r)}(0,e,n)},options:Ee,no_border:!0}),o.createElement(m.Sm,{value:t.token,handleInputChange:function(e){t.token=e},no_border:!0}),o.createElement(m.Sm,{value:t.model,handleInputChange:function(e){t.model=e},no_border:!0}),o.createElement("div",null,o.createElement(a.rA,{icon:"short_text",title:"prompt",onClick:function(){var e,t;b.xK.set_value_temp(null!==(e=I[n].sys_prompt)&&void 0!==e?e:""),_e({model:"ace/mode/text",open:!0,fileName:"",save:(t=X(G().m(function e(t){return G().w(function(e){for(;;)switch(e.n){case 0:I[n].sys_prompt=t,T(I),b.xK.set_value_temp(""),je(I);case 1:return e.a(2)}},e)})),function(e){return t.apply(this,arguments)})})}}),o.createElement(a.rA,{icon:"edit_attributes",title:"model请求参数json编写",onClick:function(){var e;b.xK.set_value_temp(I[n].json_params),_e({model:"ace/mode/json",open:!0,fileName:"",save:(e=X(G().m(function e(t){return G().w(function(e){for(;;)switch(e.n){case 0:I[n].json_params=t,T(I),b.xK.set_value_temp(""),je(I);case 1:return e.a(2)}},e)})),function(t){return e.apply(this,arguments)}),can_format:!0})}}),o.createElement(a.rA,{icon:"settings",title:"额外参数设置",onClick:function(){var e;b.xK.set_value_temp(I[n].dotenv),_e({model:"ace/mode/ini",open:!0,fileName:"",save:(e=X(G().m(function e(t){return G().w(function(e){for(;;)switch(e.n){case 0:I[n].dotenv=t,T(I),b.xK.set_value_temp(""),je(I);case 1:return e.a(2)}},e)})),function(t){return e.apply(this,arguments)})})}})),o.createElement(m.Sm,{value:t.note,handleInputChange:function(e){t.note=e},no_border:!0}),o.createElement("div",null,o.createElement(a.rA,{icon:"delete",title:e("删除"),onClick:function(){return function(e){I.splice(e,1),T(M(I))}(n)}}),o.createElement(a.rA,{icon:"copy_all",title:e("复制"),onClick:function(){return function(e){T([].concat(M(I),[N(N({},I[e]),{},{open:!1})]))}(n)}}))];return r}),width:"10rem"})))),o.createElement(u.fI,null,o.createElement(u.VP,{widthPer:70},o.createElement(f.uF,{self_title:o.createElement("span",{className:" div-row "},o.createElement("h2",null,e("MCP")+" "+e("设置")," - stdio")," ",o.createElement(a.rA,{icon:"info",onClick:function(){ve("\n1. 这里配置的是 MCP Client 启动参数,当前实现的是 stdio 模式,也就是通过 command + args 启动本地 MCP Server\n2. 例如可以填 npx / uvx / python 等命令,再配合对应的 MCP server 包参数\n3. 保存后会自动重新加载 MCP 工具,agent 聊天时会把这些工具一起带给模型\n4. 建议把 cwd 配到具体项目目录,避免 server 在错误目录里运行\n")},title:"信息"})),titleCom:o.createElement("div",null,o.createElement(a.rA,{icon:"add",title:e("添加"),onClick:function(){return Ce("stdio")}}),o.createElement(a.rA,{icon:"save",title:e("保存"),onClick:function(){Oe()}}))},o.createElement(s.X,{headers:ue,rows:ie.map(function(t,n){var r=W.indexOf(t),c=[o.createElement("div",null,n),o.createElement(m.Sm,{value:t.name,handleInputChange:function(e){t.name=e,B.current=!0},no_border:!0}),o.createElement(m.l6,{value:t.open,onChange:function(e){t.open=e,D(M(W)),B.current=!0},options:Ee,no_border:!0}),o.createElement(m.Sm,{value:t.command,handleInputChange:function(e){t.command=e,B.current=!0},no_border:!0}),o.createElement(m.Sm,{value:t.args,handleInputChange:function(e){t.args=e,B.current=!0},no_border:!0}),o.createElement(m.Sm,{value:t.cwd,handleInputChange:function(e){t.cwd=e,B.current=!0},no_border:!0}),o.createElement("div",null,o.createElement(a.rA,{icon:"visibility",title:"查看工具",onClick:function(){Ie(t,r)}}),o.createElement(a.rA,{icon:"settings",title:"env",onClick:function(){var e,n;b.xK.set_value_temp(null!==(e=t.env)&&void 0!==e?e:""),_e({model:"ace/mode/ini",open:!0,fileName:"",save:(n=X(G().m(function e(n){return G().w(function(e){for(;;)switch(e.n){case 0:t.env=n,D(M(W)),b.xK.set_value_temp(""),B.current=!0,Oe();case 1:return e.a(2)}},e)})),function(e){return n.apply(this,arguments)})})}})),o.createElement(m.Sm,{value:t.note,handleInputChange:function(e){t.note=e,B.current=!0},no_border:!0}),o.createElement("div",null,o.createElement(a.rA,{icon:"delete",title:e("删除"),onClick:function(){return Se(t)}}),o.createElement(a.rA,{icon:"copy_all",title:e("复制"),onClick:function(){return ke(t)}}))];return c}),width:"10rem"})))),o.createElement(u.fI,null,o.createElement(u.VP,{widthPer:70},o.createElement(f.uF,{self_title:o.createElement("span",{className:" div-row "},o.createElement("h2",null,e("MCP")+" "+e("设置")," - HTTP")," "),titleCom:o.createElement("div",null,o.createElement(a.rA,{icon:"add",title:e("添加"),onClick:function(){return Ce("http")}}),o.createElement(a.rA,{icon:"save",title:e("保存"),onClick:function(){Oe()}}))},o.createElement(s.X,{headers:se,rows:le.map(function(t,n){var r=W.indexOf(t),c=[o.createElement("div",null,n),o.createElement(m.Sm,{value:t.name,handleInputChange:function(e){t.name=e,B.current=!0},no_border:!0}),o.createElement(m.l6,{value:t.open,onChange:function(e){t.open=e,D(M(W)),B.current=!0},options:Ee,no_border:!0}),o.createElement(m.Sm,{value:t.endpoint,handleInputChange:function(e){t.endpoint=e,B.current=!0},no_border:!0}),o.createElement("div",null,o.createElement(a.rA,{icon:"visibility",title:"查看工具",onClick:function(){Ie(t,r)}}),o.createElement(a.rA,{icon:"settings",title:"headers",onClick:function(){var e,n;b.xK.set_value_temp(null!==(e=t.headers)&&void 0!==e?e:""),_e({model:"ace/mode/ini",open:!0,fileName:"",save:(n=X(G().m(function e(n){return G().w(function(e){for(;;)switch(e.n){case 0:t.headers=n,D(M(W)),b.xK.set_value_temp(""),B.current=!0,Oe();case 1:return e.a(2)}},e)})),function(e){return n.apply(this,arguments)})})}})),o.createElement(m.Sm,{value:t.note,handleInputChange:function(e){t.note=e,B.current=!0},no_border:!0}),o.createElement("div",null,o.createElement(a.rA,{icon:"delete",title:e("删除"),onClick:function(){return Se(t)}}),o.createElement(a.rA,{icon:"copy_all",title:e("复制"),onClick:function(){return ke(t)}}))];return c}),width:"10rem"})),o.createElement(f.uF,{self_title:o.createElement("span",{className:" div-row "},o.createElement("h2",null,e("系统会话提示词"))," ",o.createElement(a.rA,{icon:"info",onClick:function(){ve('\n1. 系统会话提示词,在 AI 聊天页创建会话时可以选择,选中的提示词会自动填入聊天框作为第一条系统消息\n2. 适用于预先设定常用的会话场景模板,如"代码审查"、"翻译助手"、"运维诊断"等\n')},title:"信息"})),titleCom:o.createElement("div",null,o.createElement(a.rA,{icon:"add",title:e("添加"),onClick:function(){pe([].concat(M(de),[{prompt:"",note:""}]))}}),o.createElement(a.rA,{icon:"save",title:e("保存"),onClick:function(){Te()}}))},o.createElement(s.X,{headers:me,rows:de.map(function(t,n){var r=[o.createElement("div",null,n),o.createElement("div",null,o.createElement(a.rA,{icon:"short_text",title:e("提示词"),onClick:function(){var e,n;b.xK.set_value_temp(null!==(e=t.prompt)&&void 0!==e?e:""),_e({model:"ace/mode/text",open:!0,fileName:"",save:(n=X(G().m(function e(n){return G().w(function(e){for(;;)switch(e.n){case 0:t.prompt=n,pe(M(de)),b.xK.set_value_temp(""),Te();case 1:return e.a(2)}},e)})),function(e){return n.apply(this,arguments)})})}})),o.createElement(m.Sm,{value:t.note,handleInputChange:function(e){t.note=e},no_border:!0}),o.createElement("div",null,o.createElement(a.rA,{icon:"delete",title:e("删除"),onClick:function(){return function(e){de.splice(e,1),pe(M(de))}(n)}}))];return r}),width:"10rem"})))),o.createElement(u.fI,null,o.createElement(u.VP,{widthPer:50},o.createElement(f.uF,{self_title:o.createElement("span",{className:" div-row "},o.createElement("h2",null,e("本地知识库"))," ",o.createElement(a.rA,{icon:"info",onClick:function(){ve("\n1. 本地知识库用于为AI增强理解能力,或者分析本地文件,原理读取本地的文件,对文件在内存中建立全文索引,为AI提供额外数据(需要有模型开启才能使用)\n2. 该功能只能用于小型知识库,作为本地小型或者公司内部资料使用还是没有问题的\n3. 每次保存都会重新加载知识库中的文件,不会全部重新加载,而是检测哪些文件有变更\n")},title:"信息"})),titleCom:o.createElement("div",null,o.createElement(a.Ay,{checked:ae,onChange:function(){var e=X(G().m(function e(n){return G().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,h.jV.post("docs_on_set",{status:n});case 1:we(),t();case 2:return e.a(2)}},e)}));return function(t){return e.apply(this,arguments)}}(),title:e("知识库开关")}),o.createElement(a.rA,{icon:"settings",title:"额外参数设置",onClick:function(){var e;b.xK.set_value_temp(z.current),_e({model:"ace/mode/ini",open:!0,fileName:"",save:(e=X(G().m(function e(t){return G().w(function(e){for(;;)switch(e.n){case 0:z.current=t,b.xK.set_value_temp(""),Ne(z.current);case 1:return e.a(2)}},e)})),function(t){return e.apply(this,arguments)})})}}),o.createElement(a.rA,{icon:"add",title:e("添加"),onClick:function(){V([].concat(M(L),[{note:"",auto_load:!1,dir:""}])),$.current=!0}}),o.createElement(a.rA,{icon:"save",title:e("保存"),onClick:function(){Ne()}}))},o.createElement(s.X,{headers:v,rows:L.map(function(t,n){var r=[o.createElement("div",null,n),o.createElement(m.Sm,{value:t.dir,handleInputChange:function(e){t.dir=e,$.current=!0},no_border:!0}),o.createElement(m.l6,{value:t.auto_load,onChange:function(e){t.auto_load=e,V(M(L)),$.current=!0},options:Ee,no_border:!0}),o.createElement(m.Sm,{value:t.note,handleInputChange:function(e){t.note=e},no_border:!0}),o.createElement("div",null,o.createElement(a.rA,{icon:"delete",title:e("删除记录"),onClick:function(){return function(e){L.splice(e,1),V(M(L)),$.current=!0}(n)}}),o.createElement(a.rA,{icon:"restore",title:e("手动加载"),onClick:function(){be({sub_title:"手动加载",confirm_fun:function(){h.jV.post("ai_load_one_file",{param_path:t.dir}),(0,_.LW)("ok")}})}}),o.createElement(a.rA,{icon:"delete_forever",title:e("从索引删除"),onClick:function(){be({sub_title:"从索引删除",confirm_fun:function(){h.jV.post("ai_del",{param_path:t.dir}),(0,_.LW)("ok")}})}}))];return r}),width:"10rem"}))),Y&&o.createElement(u.VP,{widthPer:50},o.createElement(f.Zp,{title:e("知识库加载信息")},o.createElement(u.Yh,{left:e("最近一次加载")+","+e("加载进度"),right:null==Y?void 0:Y.progress}),o.createElement(u.Yh,{left:"".concat(e("最近一次加载"),",").concat(e("总文件数量")),right:null==Y?void 0:Y.num}),o.createElement(u.Yh,{left:"".concat(e("最近一次加载"),",").concat(e("总文件字符数量")),right:null==Y?void 0:Y.char_num}),o.createElement(u.Yh,{left:"".concat(e("最近一次加载"),",").concat(e("总文件大小")),right:(0,k.v7)(null==Y?void 0:Y.size)}),o.createElement(u.Yh,{left:"".concat(e("最近一次加载"),",").concat(e("总耗时")),right:(0,k.a3)(null==Y?void 0:Y.consume_time_ms_len)}),o.createElement(u.Yh,{left:"".concat(e("总文件数量")),right:null==Y?void 0:Y.total_num}))))))))}},4299(e,t,n){n.r(t),n.d(t,{default:()=>v});var r=n(6540),o=n(3557),a=n(3995),c=n(950),i=n(7979),l=n(8263),u=n(9428),s=n.n(u),m=(n(3775),n(1499)),f=n(9214),d=n(9878),p=(n(2411),new o.A({html:!0,highlight:function(e,t){if(t&&d.A.getLanguage(t))try{var n=d.A.highlight(e,{language:t}).value;return'<pre class="hljs code-block-with-copy"><code class="hljs language-'.concat(t,'">').concat(n,"</code></pre>")}catch(e){}try{var r=d.A.highlightAuto(e).value;return'<pre class="hljs code-block-with-copy"><code class="hljs">'.concat(r,"</code></pre>")}catch(e){}return'<pre class="hljs code-block-with-copy"><code>'.concat(p.utils.escapeHtml(e),"</code></pre>")}}));function v(e){return(0,f.VD)(),r.createElement("div",{dangerouslySetInnerHTML:{__html:p.render(e.context)}})}p.use(a.A).use(c.A).use(i.A).use(l.A).use(s()).use(function(e){e.renderer.rules.fence;e.renderer.rules.fence=function(t,n,r,o,a){var c=t[n],i=c.content.trim(),l=c.info.trim(),u="";if(l&&d.A.getLanguage(l))try{u=d.A.highlight(i,{language:l}).value}catch(t){u=e.utils.escapeHtml(i)}else try{u=d.A.highlightAuto(i).value}catch(t){u=e.utils.escapeHtml(i)}return'\n <div class="code-block-with-copy">\n <div class="code-header">\n <span class="code-language">'.concat(l||"code",'</span>\n <button class="copy-btn" data-code="').concat(e.utils.escapeHtml(i),'">复制</button>\n </div>\n <pre><code class="hljs ').concat(l?"language-".concat(l):"",'">').concat(u,"</code></pre>\n </div>")}}).use(function(e){var t=e.renderer.rules.link_open||function(e,t,n,r,o){return o.renderToken(e,t,n)};e.renderer.rules.link_open=function(e,n,r,o,a){var c=e[n],i=c.attrIndex("href");if(i>=0){var l=c.attrs[i][1];c.attrs[i][1]=(0,m.bi)(window.location.href,l)}return t(e,n,r,o,a)}})},2721(e,t,n){n.d(t,{O:()=>v,z:()=>p});var r=n(2389),o=n(7444),a=n(6417),c=n(6540),i=n(5997);function l(){var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,r,o,a){var l=r&&r.prototype instanceof i?r:i,s=Object.create(l.prototype);return u(s,"_invoke",function(n,r,o){var a,i,l,u=0,s=o||[],m=!1,f={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return a=t,i=0,l=e,f.n=n,c}};function d(n,r){for(i=n,l=r,t=0;!m&&u&&!o&&t<s.length;t++){var o,a=s[t],d=f.p,p=a[2];n>3?(o=p===r)&&(l=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=d&&((o=n<2&&d<a[1])?(i=0,f.v=r,f.n=a[1]):d<p&&(o=n<3||a[0]>r||r>p)&&(a[4]=n,a[5]=r,f.n=p,i=0))}if(o||n>1)return c;throw m=!0,r}return function(o,s,p){if(u>1)throw TypeError("Generator is already running");for(m&&1===s&&d(s,p),i=s,l=p;(t=i<2?e:l)||!m;){a||(i?i<3?(i>1&&(f.n=-1),d(i,l)):f.n=l:f.v=l);try{if(u=2,a){if(i||(o="next"),t=a[o]){if(!(t=t.call(a,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,i<2&&(i=0)}else 1===i&&(t=a.return)&&t.call(a),i<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=e}else if((t=(m=f.n<0)?l:n.call(r,f))!==c)break}catch(t){a=e,i=1,l=t}finally{u=1}}return{value:t,done:m}}}(n,o,a),!0),s}var c={};function i(){}function s(){}function m(){}t=Object.getPrototypeOf;var f=[][r]?t(t([][r]())):(u(t={},r,function(){return this}),t),d=m.prototype=i.prototype=Object.create(f);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,u(e,o,"GeneratorFunction")),e.prototype=Object.create(d),e}return s.prototype=m,u(d,"constructor",m),u(m,"constructor",s),s.displayName="GeneratorFunction",u(m,o,"GeneratorFunction"),u(d),u(d,o,"Generator"),u(d,r,function(){return this}),u(d,"toString",function(){return"[object Generator]"}),(l=function(){return{w:a,m:p}})()}function u(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}u=function(e,t,n,r){function a(t,n){u(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(a("next",0),a("throw",1),a("return",2))},u(e,t,n,r)}function s(e,t,n,r,o,a,c){try{var i=e[a](c),l=i.value}catch(e){return void n(e)}i.done?t(l):Promise.resolve(l).then(r,o)}function m(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function c(e){s(a,r,o,c,i,"next",e)}function i(e){s(a,r,o,c,i,"throw",e)}c(void 0)})}}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,c,i=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(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)?d(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 d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function p(){var e,t=(0,r.Bd)().t,n=f((0,o.L4)(a.AG.prompt_card),2),i=n[0],l=n[1];return c.createElement("div",{className:"card floating"},c.createElement("div",{className:"card-title"},c.createElement("h2",null,null!==(e=i.title)&&void 0!==e?e:t("验证执行"))),c.createElement("div",{className:"card-content"},i.context_div),c.createElement("div",{className:"card-action"},i.cancel&&c.createElement("button",{className:"button button--flat button--grey",onClick:function(){i.cancel&&i.cancel(),l({open:!1})}},"cancel"),i.confirm&&c.createElement("button",{className:"button button--flat",onClick:i.confirm},"confirm")))}function v(e){var t,n,o,a,u,s,d=(0,r.Bd)().t,p=null!==(t=null===(n=e.pages)||void 0===n||null===(n=n[0])||void 0===n?void 0:n.id)&&void 0!==t?t:"",v=f((0,c.useState)(null!==(o=e.initialPageId)&&void 0!==o?o:p),2),h=v[0],y=v[1];(0,c.useEffect)(function(){var t;y(null!==(t=e.initialPageId)&&void 0!==t?t:p)},[e.initialPageId,p,null===(a=e.pages)||void 0===a?void 0:a.length]);var _=(0,c.useMemo)(function(){var t,n,r;return null!==(t=null===(n=e.pages)||void 0===n?void 0:n.find(function(e){return e.id===h}))&&void 0!==t?t:null===(r=e.pages)||void 0===r?void 0:r[0]},[e.pages,h]);return c.createElement("div",{className:"prompt-switch-page"},c.createElement("div",{className:"prompt-switch-page__header"},c.createElement("div",null,c.createElement("div",{className:"prompt-switch-page__title"},null!==(u=e.title)&&void 0!==u?u:d("信息")),e.subtitle&&c.createElement("div",{className:"prompt-switch-page__meta"},e.subtitle)),c.createElement("div",{className:"prompt-switch-page__actions"},e.onRefresh&&c.createElement(i.rA,{icon:"refresh",title:d("刷新"),onClick:m(l().m(function t(){var n;return l().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,null===(n=e.onRefresh)||void 0===n?void 0:n.call(e);case 1:return t.a(2)}},t)}))}),e.onClose&&c.createElement(i.rA,{icon:"close",title:d("关闭"),onClick:e.onClose}))),c.createElement("div",{className:"prompt-switch-page__body"},c.createElement("div",{className:"prompt-switch-page__nav"},null!==(s=e.pages)&&void 0!==s&&s.length?e.pages.map(function(e){return c.createElement("button",{key:e.id,className:"button button--flat button--grey prompt-switch-page__nav-item".concat((null==_?void 0:_.id)===e.id?" is-active":""),onClick:function(){return y(e.id)}},c.createElement("div",{className:"prompt-switch-page__nav-item-title"},e.title),e.subtitle&&c.createElement("div",{className:"prompt-switch-page__nav-item-subtitle"},e.subtitle))}):c.createElement("div",{className:"prompt-switch-page__empty"},d("暂无数据"))),c.createElement("div",{className:"prompt-switch-page__content"},_?e.renderPage(_):c.createElement("div",{className:"prompt-switch-page__empty"},d("暂无数据")))))}},5907(e,t,n){n.d(t,{y:()=>i});var r=n(7444),o=n(6417);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,c,i=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(i.push(r.value),i.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return c(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)?c(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 c(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 i(){var e=a((0,r.L4)(o.AG.confirm),2),t=(e[0],e[1]);return function(e){var n=e.sub_title,r=e.confirm_fun,o=e.title,a=e.context_div;t({open:!0,sub_title:n,handle:function(){r(),t({open:!1,handle:null})},title:o,context_div:a})}}},840(e){e.exports="data:image/svg+xml,<svg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 version=%271.1%27 aria-hidden=%27true%27><path fill-rule=%27evenodd%27 d=%27M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z%27></path></svg>"}}]);
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 9704.cacf7eb0df8aa60f88f7.js.LICENSE.txt */
2
+ (self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[4627,9704],{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,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return l=t.done,t},e:function(t){u=!0,a=t},f:function(){try{l||null==n.return||n.return()}finally{if(u)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=u(t,e);return null===n||n===t.length-1?t[0]:t[n+1]}function u(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return null}function c(t,e){var n=u(t,e);return null===n?null:t[n]}function s(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 d(){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 h(){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 y(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:()=>h,I:()=>y,IO:()=>d,Lr:()=>v,P1:()=>f,a7:()=>s,di:()=>m,jH:()=>l,kW:()=>c})},447(t,e,n){"use strict";n.d(e,{WA:()=>p,ZI:()=>m,Zp:()=>f,fq:()=>y,gz:()=>v,uF:()=>d,xP:()=>h});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=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&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}var c=function(t){return t[t.common=0]="common",t[t.full=1]="full",t}(c||{});function s(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 s(t,c.common)}function d(t){return s(t,c.full)}function h(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 y=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:()=>h,GL:()=>g,Sm:()=>m,U6:()=>b,cA:()=>v,l6:()=>y});var r=n(6540),i=n(5219),o=n.n(i),a=(n(9145),n(961)),l=n(5997);function u(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 c(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 f(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=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&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 d(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)?d(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function h(t){var e=(0,r.useRef)(null),n=f(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(l.In,{icon: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){"Process"===e.key||e.nativeEvent.isComposing||"Enter"===e.key&&t.handleEnterPress&&t.handleEnterPress()}})))}function p(t){var e=(0,r.useRef)(null),n=f(r.useState(""),2),i=n[0],a=n[1],l=f(r.useState("input input--block awesomplete"),2),u=l[0],c=l[1];(0,r.useEffect)(function(){a(null==t.value?"":t.value),t.focus&&e.current&&e.current.focus(),t.no_border&&c("input input--block awesomplete input--no_border")},[t.value,t.focus,t.no_border]);var d=(0,r.useRef)(t.handleInputChange);return(0,r.useEffect)(function(){d.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,filter:function(t,e){return""===e.trim()||o().FILTER_CONTAINS(t,e)},sort:function(t,n){var r;return""===(null===(r=e.current)||void 0===r?void 0:r.value.trim())?0:t.label<n.label?-1:1}}),i=function(){r.evaluate()},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)}),d.current&&d.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){"Process"===e.key||e.nativeEvent.isComposing||"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 m(t){return p(function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?u(Object(n),!0).forEach(function(e){c(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}({},t))}function v(t){return p({placeholder:t.placeholder,type:"password",handleInputChange:t.handleInputChange,handlerEnter:t.handleEnterPress,maxWidth:t.maxWidth,width:t.width,value:t.value})}function y(t){var e,n,i=f((0,r.useState)(!1),2),o=i[0],l=i[1],u=f((0,r.useState)({}),2),c=u[0],s=u[1],d=(0,r.useRef)(null),h=(0,r.useRef)(null),p=t.options.find(function(e){var n;return e.value===(null!==(n=t.value)&&void 0!==n?n:t.defaultValue)});(0,r.useEffect)(function(){var t=function(t){d.current&&!d.current.contains(t.target)&&h.current&&!h.current.contains(t.target)&&l(!1)};return document.addEventListener("mousedown",t),function(){return document.removeEventListener("mousedown",t)}},[]),(0,r.useEffect)(function(){if(o&&d.current&&h.current){var t,e=d.current.getBoundingClientRect(),n=h.current.offsetHeight,r=window.innerHeight-e.bottom,i=e.top;t=r<n&&i>n?e.top-n-4:e.bottom+4,s({position:"fixed",top:t,left:e.left,width:e.width,zIndex:9999})}},[o]);return r.createElement("div",{className:"select_wrapper",style:{width:t.width||"100%"}},t.tip&&r.createElement("p",{className:"input input_left"},t.tip),r.createElement("div",{className:"select_container"},r.createElement("div",{ref:d,className:["input input--block",t.no_border?"input--no_border":"","select_trigger",t.disabled?"select_trigger--disabled":""].join(" "),onClick:function(){t.disabled||l(!o)}},r.createElement("span",{className:"select_trigger__label",style:{color:(null==p?void 0:p.color)||"inherit"}},null!==(e=null!==(n=null==p?void 0:p.title)&&void 0!==n?n:null==p?void 0:p.value)&&void 0!==e?e:""),r.createElement("i",{className:["material-icons","select_trigger__icon",o?"select_trigger__icon--open":""].join(" ")},"expand_more")),o&&(0,a.createPortal)(r.createElement("div",{ref:h,className:"select_dropdown",style:c},t.options.map(function(e,n){var i,o;return r.createElement("div",{key:n,className:["select_option",e.value===(null!==(i=t.value)&&void 0!==i?i:t.defaultValue)?"select_option--selected":""].join(" "),style:{color:e.color},onClick:function(){t.onChange(e.value),l(!1)}},null!==(o=e.title)&&void 0!==o?o:e.value)})),document.body)))}function b(t){var e,n;return r.createElement("div",{className:"input_radio_row"},r.createElement("input",{type:"radio",checked:null!==(e=t.selected)&&void 0!==e&&e,name:null!==(n=t.name)&&void 0!==n?n:"common_name",value:t.value,className:"input_radio",onChange:function(){t.onchange&&t.onchange(t.value)}}),t.context)}function g(t){return r.createElement("div",{className:"input_radio_row"},r.createElement("input",{type:"checkbox",disabled:!!t.is_disable,checked:!!t.selected,onChange:function(){t.onchange&&t.onchange()}}),t.context&&t.context)}},7481(t,e,n){"use strict";n.d(e,{S:()=>l,X:()=>a});var r=n(6540);function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,l=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&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 o(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function a(t){var e,n=i(r.useState([]),2),o=n[0],a=n[1];return(0,r.useEffect)(function(){t.children?a(Array.isArray(t.children)?t.children:[t.children]):a(t.rows)},[t.rows,t.children]),r.createElement("table",null,r.createElement("thead",null,r.createElement("tr",null,null===(e=t.headers)||void 0===e?void 0:e.map(function(t,e){return r.createElement("th",{key:e},t)}))),r.createElement("tbody",null,o.map(function(e,n){return r.createElement("tr",{key:n,onContextMenu:function(){t.handleContextMenu&&t.handleContextMenu(e)}},e.map(function(n,i){var o;return r.createElement("td",{style:{width:null!==(o=t.width)&&void 0!==o?o:"auto"},key:i,className:i===e.length-1?"small":""},n)}))})))}function l(t){return r.createElement("div",{style:{display:t.isFlex?"flex":"block"}},t.columns.map(function(t,e){return r.createElement("div",{key:e},t)}))}},7209(t,e,n){"use strict";n.r(e),n.d(e,{default:()=>U});var r=n(6540),i=n(5725),o=n(3033),a=n(447),l=n(5997),u=n(4289),c=n(2389),s=n(2042),f=n(4284),d=n(3459);function h(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=r&&r.prototype instanceof l?r:l,c=Object.create(u.prototype);return p(c,"_invoke",function(n,r,i){var o,l,u,c=0,s=i||[],f=!1,d={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,u=t,d.n=n,a}};function h(n,r){for(l=n,u=r,e=0;!f&&c&&!i&&e<s.length;e++){var i,o=s[e],h=d.p,p=o[2];n>3?(i=p===r)&&(u=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,d.v=r,d.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,d.n=p,l=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,p){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&h(s,p),l=s,u=p;(e=l<2?t:u)||!f;){o||(l?l<3?(l>1&&(d.n=-1),h(l,u)):d.n=u:d.v=u);try{if(c=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(f=d.n<0)?u:n.call(r,d))!==a)break}catch(e){o=t,l=1,u=e}finally{c=1}}return{value:e,done:f}}}(n,i,o),!0),c}var a={};function l(){}function u(){}function c(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(p(e={},r,function(){return this}),e),f=c.prototype=l.prototype=Object.create(s);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,p(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return u.prototype=c,p(f,"constructor",c),p(c,"constructor",u),u.displayName="GeneratorFunction",p(c,i,"GeneratorFunction"),p(f),p(f,i,"Generator"),p(f,r,function(){return this}),p(f,"toString",function(){return"[object Generator]"}),(h=function(){return{w:o,m:d}})()}function p(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}p=function(t,e,n,r){function o(e,n){p(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))},p(t,e,n,r)}function m(t,e,n,r,i,o,a){try{var l=t[o](a),u=l.value}catch(t){return void n(t)}l.done?e(u):Promise.resolve(u).then(r,i)}function v(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=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&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 y(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)?y(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function b(t){var e=(0,c.Bd)().t,n=v((0,r.useState)(e("毫秒")),2),p=n[0],y=n[1],b=v((0,r.useState)(""),2),g=b[0],E=b[1],w=v((0,r.useState)(""),2),x=w[0],_=w[1],A=v((0,r.useState)(null),2),S=A[0],C=A[1],O=v((0,r.useState)(null),2),k=O[0],j=O[1],N=v((0,r.useState)(Date.now()),2),I=N[0],T=N[1];var P=function(){var t,e=(t=h().m(function t(){var e,n;return h().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,f.Yu.get("sys_time/get");case 1:if((e=t.v).code!==d.m.Success){t.n=3;break}return t.n=2,e.data;case 2:n=t.v,C(n.timestamp),j(n.timezone),T(n.timestamp);case 3:return t.a(2)}},t)}),function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){m(o,r,i,a,l,"next",t)}function l(t){m(o,r,i,a,l,"throw",t)}a(void 0)})});return function(){return e.apply(this,arguments)}}();return(0,r.useEffect)(function(){P();var t=setInterval(function(){T(function(t){return t+1e3})},1e3);return function(){return clearInterval(t)}},[]),r.createElement(i.fI,null,r.createElement(i.VP,null,r.createElement(a.Zp,{title:e("时间转换器"),rightBottomCom:r.createElement(l.C3,{text:e("确定"),clickFun:function(){if(g||x){var t=0,e=""!==g&&0!==g;if(e){if(!(0,u.kf)(g))return void(0,s.zN)("must be number !");t=parseInt(g),"分秒"===p&&(t*=1e3)}var n=new Date(e?t:x),r=new Intl.DateTimeFormat("zh-CN",{year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).format(n);if(_(r),!g){var i=n.getTime();E("毫秒"===p?i:i/1e3)}}else new Noty({type:"error",text:"不能都为空",timeout:1e3,layout:"bottomLeft"}).show()}})},r.createElement(o.l6,{options:[{title:e("毫秒"),value:"毫秒"},{title:e("分秒"),value:"分秒"}],onChange:function(t){y(t)}}),r.createElement(o.Sm,{placeholder:p,value:g,handleInputChange:function(t){E(t)}}),r.createElement(o.Sm,{placeholder:e("格式化时间"),value:x,handleInputChange:function(t){_(t)}}))),r.createElement(i.VP,null,null!==S&&null!==k&&r.createElement(a.Zp,{title:e("服务器时间")},r.createElement("h1",null,e("时区"),": ",k),r.createElement("h1",null,e("时间"),": ",new Date(I).toLocaleString(navigator.language,{timeZone:k})))))}var g=n(3413),E=n.n(g),w=n(7952),x=n(3029),_=n(8247),A=n(3430);function S(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=r&&r.prototype instanceof l?r:l,c=Object.create(u.prototype);return C(c,"_invoke",function(n,r,i){var o,l,u,c=0,s=i||[],f=!1,d={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,u=t,d.n=n,a}};function h(n,r){for(l=n,u=r,e=0;!f&&c&&!i&&e<s.length;e++){var i,o=s[e],h=d.p,p=o[2];n>3?(i=p===r)&&(u=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,d.v=r,d.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,d.n=p,l=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,p){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&h(s,p),l=s,u=p;(e=l<2?t:u)||!f;){o||(l?l<3?(l>1&&(d.n=-1),h(l,u)):d.n=u:d.v=u);try{if(c=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(f=d.n<0)?u:n.call(r,d))!==a)break}catch(e){o=t,l=1,u=e}finally{c=1}}return{value:e,done:f}}}(n,i,o),!0),c}var a={};function l(){}function u(){}function c(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(C(e={},r,function(){return this}),e),f=c.prototype=l.prototype=Object.create(s);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,C(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return u.prototype=c,C(f,"constructor",c),C(c,"constructor",u),u.displayName="GeneratorFunction",C(c,i,"GeneratorFunction"),C(f),C(f,i,"Generator"),C(f,r,function(){return this}),C(f,"toString",function(){return"[object Generator]"}),(S=function(){return{w:o,m:d}})()}function C(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}C=function(t,e,n,r){function o(e,n){C(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))},C(t,e,n,r)}function O(t,e,n,r,i,o,a){try{var l=t[o](a),u=l.value}catch(t){return void n(t)}l.done?e(u):Promise.resolve(u).then(r,i)}function k(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){O(o,r,i,a,l,"next",t)}function l(t){O(o,r,i,a,l,"throw",t)}a(void 0)})}}function j(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=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&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 N(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)?N(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 N(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 I(t){var e=(0,c.Bd)().t,n=(0,_.MH)().check_user_auth,i=j((0,r.useState)(""),2),a=i[0],u=i[1],s=function(){var t=k(S().m(function t(e){var n;return S().w(function(t){for(;;)switch(t.n){case 0:if(n=e||a){t.n=1;break}return new(E())({type:"error",text:"mac地址不能为空",timeout:1e3,layout:"bottomLeft"}).show(),t.a(2);case 1:return t.n=2,f._U.post("wol/exec",{mac:n});case 2:if(t.v.code===d.m.Success){t.n=3;break}return t.a(2);case 3:new(E())({type:"success",text:"发送唤醒命令成功",timeout:1e3,layout:"bottomLeft"}).show();case 4:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}(),h=function(){var t=k(S().m(function t(){var e;return S().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,f._U.get("wol/tag");case 1:if((e=t.v).code!==d.m.Success){t.n=2;break}return t.a(2,e.data);case 2:return t.a(2,[])}},t)}));return function(){return t.apply(this,arguments)}}(),p=function(){var t=k(S().m(function t(e){return S().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,f._U.post("wol/tag/save",e);case 1:t.v.code!==d.m.Success&&new(E())({type:"error",text:"网络错误",timeout:1e3,layout:"bottomLeft"}).show();case 2:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}(),m=function(){var t=k(S().m(function t(e){return S().w(function(t){for(;;)switch(t.n){case 0:u(e.mac),s(e.mac);case 1:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}();return r.createElement("div",null,r.createElement(w.A,null,r.createElement(l.rA,{icon:"play_arrow",title:e("发送"),onClick:function(){s()}}),r.createElement(o.$Z,{placeholder:e("目标设备mac地址"),icon:"laptop_mac",value:a,handleInputChange:function(t){return u(t)}})),r.createElement(x.N,{have_auth_edit:n(A.oV.wol_proxy_tag_update),getItems:h,save:p,clickItem:m,items:[{key:"name",preName:e("名字")},{key:"mac",preName:"mac"+e("地址")},{key:"color",preName:"color"}]}))}var T,P=n(7481),L=n(7444),R=n(6417),F=n(505);function G(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var u=r&&r.prototype instanceof l?r:l,c=Object.create(u.prototype);return M(c,"_invoke",function(n,r,i){var o,l,u,c=0,s=i||[],f=!1,d={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,l=0,u=t,d.n=n,a}};function h(n,r){for(l=n,u=r,e=0;!f&&c&&!i&&e<s.length;e++){var i,o=s[e],h=d.p,p=o[2];n>3?(i=p===r)&&(u=o[(l=o[4])?5:(l=3,3)],o[4]=o[5]=t):o[0]<=h&&((i=n<2&&h<o[1])?(l=0,d.v=r,d.n=o[1]):h<p&&(i=n<3||o[0]>r||r>p)&&(o[4]=n,o[5]=r,d.n=p,l=0))}if(i||n>1)return a;throw f=!0,r}return function(i,s,p){if(c>1)throw TypeError("Generator is already running");for(f&&1===s&&h(s,p),l=s,u=p;(e=l<2?t:u)||!f;){o||(l?l<3?(l>1&&(d.n=-1),h(l,u)):d.n=u:d.v=u);try{if(c=2,o){if(l||(i="next"),e=o[i]){if(!(e=e.call(o,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,l<2&&(l=0)}else 1===l&&(e=o.return)&&e.call(o),l<2&&(u=TypeError("The iterator does not provide a '"+i+"' method"),l=1);o=t}else if((e=(f=d.n<0)?u:n.call(r,d))!==a)break}catch(e){o=t,l=1,u=e}finally{c=1}}return{value:e,done:f}}}(n,i,o),!0),c}var a={};function l(){}function u(){}function c(){}e=Object.getPrototypeOf;var s=[][r]?e(e([][r]())):(M(e={},r,function(){return this}),e),f=c.prototype=l.prototype=Object.create(s);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,c):(t.__proto__=c,M(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return u.prototype=c,M(f,"constructor",c),M(c,"constructor",u),u.displayName="GeneratorFunction",M(c,i,"GeneratorFunction"),M(f),M(f,i,"Generator"),M(f,r,function(){return this}),M(f,"toString",function(){return"[object Generator]"}),(G=function(){return{w:o,m:d}})()}function M(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}M=function(t,e,n,r){function o(e,n){M(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))},M(t,e,n,r)}function D(t,e,n,r,i,o,a){try{var l=t[o](a),u=l.value}catch(t){return void n(t)}l.done?e(u):Promise.resolve(u).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){D(o,r,i,a,l,"next",t)}function l(t){D(o,r,i,a,l,"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,i,o,a,l=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(l.push(r.value),l.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&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 B(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)?B(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 B(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 H(){var t=$((0,r.useState)("rsa"),2),e=t[0],n=t[1],u=$((0,r.useState)("pem"),2),h=u[0],p=u[1],m=(0,c.Bd)(),v=m.t,y=(m.i18n,$((0,L.L4)(R.AG.confirm),2)),b=(y[0],y[1]),g=$((0,r.useState)(""),2),E=g[0],x=g[1],_=$((0,r.useState)(""),2),A=_[0],S=_[1],C=function(){var t=W(G().m(function t(){var n;return G().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,f.cD.post("generate",{type:e,form:h});case 1:(n=t.v).code===d.m.Success&&(x(n.data.public_key),S(n.data.private_key),T=n.data.home_path);case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),O=function(){var t=W(G().m(function t(n){var r;return G().w(function(t){for(;;)switch(t.n){case 0:if(A&&E){t.n=1;break}return(0,s.zN)("密钥不能为空"),t.a(2);case 1:r="id_"+e,"pub"===n&&(r+=".pub"),b({open:!0,title:v("将覆盖密钥文件"),sub_title:"之前的密钥将作废。 将会作为 ".concat(r,' 文件保存到系统上的"').concat(T,'"目录下,此目录会作为openssh(git)所使用的默认目录。'),handle:function(){var t=W(G().m(function t(){return G().w(function(t){for(;;)switch(t.n){case 0:return t.n=1,f.cD.post("save_openssh",{name:r,context:"pub"===n?E:A});case 1:t.v.code===d.m.Success&&((0,s.LW)("完成"),b({open:!1,handle:null}));case 2:return t.a(2)}},t)}));return function(){return t.apply(this,arguments)}}()});case 2:return t.a(2)}},t)}));return function(e){return t.apply(this,arguments)}}();return r.createElement(r.Fragment,null,r.createElement(w.A,null,r.createElement(P.S,{isFlex:!0,columns:[r.createElement(o.l6,{tip:v("加密算法"),value:e,width:"auto",onChange:function(t){n(t)},options:[{title:v("RSA"),value:"rsa"},{title:v("DSA"),value:"dsa"},{title:v("ECDSA"),value:"ecdsa"}]}),r.createElement(o.l6,{tip:v("输出格式"),value:h,width:"auto",onChange:function(t){p(t)},options:[{title:v("普通PEM"),value:"pem"},{title:v("opensshPEM"),value:"openssh_pem"}]}),r.createElement(l.rA,{icon:"play_arrow",title:v("生成"),onClick:function(){C()}})]})),r.createElement(i.xh,null,r.createElement(i.fI,null,r.createElement(i.VP,null,r.createElement(a.Zp,{title:v("公钥"),titleCom:r.createElement(l.rA,{title:v("复制"),icon:"copy_all",onClick:function(){E&&((0,F.lW)(E),(0,s.LW)("完成"))}}),rightBottomCom:"openssh_pem"===h&&r.createElement(l.C3,{text:v("保存到.ssh目录"),clickFun:function(){O("pub")}})},r.createElement("textarea",{className:"input--textarea input--no_border",style:{width:"100%",height:"270px"},onChange:function(t){x(t.target.value)},value:E}))),r.createElement(i.VP,null,r.createElement(a.Zp,{title:v("私钥"),titleCom:r.createElement(l.rA,{title:v("复制"),icon:"copy_all",onClick:function(){A&&((0,F.lW)(A),(0,s.LW)("成功"))}}),rightBottomCom:"openssh_pem"===h&&r.createElement(l.C3,{text:v("保存到.ssh目录"),clickFun:function(){O("pri")}})},r.createElement("textarea",{className:"input--textarea input--no_border",style:{width:"100%",height:"270px"},value:A,onChange:function(t){S(t.target.value)}}))))))}function U(t){var e=(0,c.Bd)().t,n=(0,_.MH)().check_user_auth,o=[];return o.push.apply(o,[{index:1,name:e("时间工具"),rto:"timeutil/",component:r.createElement(b,null)},{index:1,name:e("非对称密钥"),rto:"crypto/",component:r.createElement(H,null)}]),n(A.oV.wol_proxy)&&o.push({index:1,name:e("网络唤醒"),rto:"netwol/",component:r.createElement(I,null)}),r.createElement(i.W1,{optionList:o})}},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),u=n.n(l),c=n(5056),s=n.n(c),f=n(540),d=n.n(f),h=n(1113),p=n.n(h),m=n(1028),v={};v.styleTagTransform=p(),v.setAttributes=s(),v.insert=u().bind(null,"head"),v.domAPI=a(),v.insertStyleElement=d();i()(m.A,v),m.A&&m.A.locals&&m.A.locals}}]);