filecat 3.1.2 → 3.3.3

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.
@@ -0,0 +1 @@
1
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see 663.bundle.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[663],{3663:(t,e,r)=>{r.r(e),r.d(e,{default:()=>Xt});var n=r(6540),o=r(7022),i=r(7444),a=r(6417),c=r(7767),u=r(4694),l=r(4289),s=r(8844),f=r(2869),h=r(4251),p=r(2389),v=r(8247);function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function y(){y=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),c=new C(n||[]);return o(a,"_invoke",{value:j(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",v="executing",m="completed",w={};function g(){}function b(){}function E(){}var x={};l(x,a,(function(){return this}));var _=Object.getPrototypeOf,L=_&&_(_(F([])));L&&L!==r&&n.call(L,a)&&(x=L);var k=E.prototype=g.prototype=Object.create(x);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==d(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function j(e,r,n){var o=h;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=A(c,n);if(u){if(u===w)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?m:p,l.arg===w)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function A(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),w;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,w;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,w):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,w)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function F(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(d(e)+" is not iterable")}return b.prototype=E,o(k,"constructor",{value:E,configurable:!0}),o(E,"constructor",{value:b,configurable:!0}),b.displayName=l(E,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,E):(t.__proto__=E,l(t,u,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},S(O.prototype),l(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new O(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(k),l(k,u,"Generator"),l(k,a,(function(){return this})),l(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=F,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(N),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,w):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),w},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),w}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:F(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),w}},e}function m(t){return function(t){if(Array.isArray(t))return E(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||b(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function g(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||b(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){if(t){if("string"==typeof t)return E(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?E(t,e):void 0}}function E(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function x(t){var e=g((0,i.L4)(a.A.selectedFileList),2),r=e[0],d=e[1],b=g((0,i.L4)(a.A.clickFileList),2),E=b[0],x=b[1],_=g((0,i.L4)(a.A.nowFileList),2),L=(_[0],_[1]),k=g((0,i.L4)(a.A.enterKey),2),S=k[0],O=(k[1],(0,v.kZ)().click_file),j=((0,p.Bd)().t,(0,c.Zp)()),A=((0,c.zy)(),function(){var e,n=(e=y().mark((function e(n,i){var a,c,s,f,h,p;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==(0,u.kW)(r,n))d((0,u.P1)(r,n));else if("ctrl"===S)d([].concat(m(r),[n]));else if("shift"===S){if(a=(0,u.a7)(r),c=a.max,s=a.min,f=[],n>=c)for(h=c;h<=n;h++)f.push(h);else for(p=s;p>=n;p--)f.push(p);d(f)}else d([n]);if(x([].concat(m(E),[n])),setTimeout((function(){x((0,u.P1)(E,n))}),300),t.type!==o.Iw.folder){e.next=14;break}if(void 0===E.find((function(t){return t===n}))){e.next=12;break}return j((0,u.IO)((0,l.vX)(),i)),d([]),x([]),L({files:[],folders:[]}),e.abrupt("return");case 12:e.next=16;break;case 14:void 0!==E.find((function(t){return t===n}))&&O({name:i,size:t.origin_size,opt_shell:!0});case 16:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(t){w(i,n,o,a,c,"next",t)}function c(t){w(i,n,o,a,c,"throw",t)}a(void 0)}))});return function(t,e){return n.apply(this,arguments)}}()),P=g((0,i.L4)(a.A.showPrompt),2),N=(P[0],P[1]);return n.createElement(s.B,{extraAttr:{onContextMenu:function(e){!function(t,e,r,n){t.preventDefault();var i=new h.i;i.path=(0,u.IO)((0,l.vX)(),e),i.filename=e,i.x=t.clientX,i.y=t.clientY,i.type=r?o.Iw.folder:(0,h.u)(e),i.size=n,N({show:!0,type:f.PromptEnum.FileMenu,overlay:!1,data:i})}(e,t.name,t.type===o.Iw.folder,t.origin_size)}},name:t.name,index:t.index,mtime:t.mtime,size:t.size,type:t.type,isLink:t.isLink,path:t.path,icon:t.icon,click:A,itemWidth:t.itemWidth})}var _=r(4976),L=r(3033);function k(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return S(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?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 r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function O(t){var e=(0,c.zy)(),r=k((0,n.useState)([]),2),o=r[0],i=r[1],a=k((0,n.useState)("/"),2),s=a[0],f=a[1],h=k((0,n.useState)(void 0),2),p=h[0],v=h[1];n.useEffect((function(){var e="",r=(0,l.vX)().split("/");r=r.filter((function(t){return t}));var n=r.indexOf(t.baseRoute),o=[];if(-1!=n){e=(0,u.IO)(r.slice(0,n),t.baseRoute);for(var a=r.slice(n+1),c=0;c<a.length;c++){var s=a[c];o.push({value:s,href:0===c?"".concat(e).concat(s,"/"):(0,u.IO)(o[c-1].href,s)})}f(e),i(o)}}),[e]);var d=function(e){e.stopPropagation(),t.clickFun(e)};return n.createElement("div",{className:"breadcrumbs",onClick:function(t){v(void 0!==p?void 0:"")}},n.createElement(n.Fragment,null,void 0===p?n.createElement(n.Fragment,null,n.createElement("span",{className:"chevron"},n.createElement(_.N_,{to:s,onClick:d},n.createElement("i",{className:"material-icons"},"home"))),o.map((function(t,e){return n.createElement("span",{className:"chevron",key:e},n.createElement("i",{className:"material-icons"},"keyboard_arrow_right"),n.createElement(_.N_,{to:t.href,onClick:d},decodeURIComponent(t.value)))}))):n.createElement(L.Sm,{width:"100%",maxWidth:"60%",handlerEnter:function(e){t.input_path_enter&&t.input_path_enter(e),v(void 0)}})))}var j=r(6007),A=r(5997),P=r(7952),N=r(5726),C=r(3459),F=r(7856),I=r(4238),G=r(4944),T=r(7704),M=r(4405),z=r(505);function W(t){return W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},W(t)}function K(){K=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new P(n||[]);return o(a,"_invoke",{value:S(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",v="executing",d="completed",y={};function m(){}function w(){}function g(){}var b={};l(b,a,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(N([])));x&&x!==r&&n.call(x,a)&&(b=x);var _=g.prototype=m.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==W(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=h;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(W(e)+" is not iterable")}return w.prototype=g,o(_,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:w,configurable:!0}),w.displayName=l(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},L(k.prototype),l(k.prototype,c,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new k(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(_),l(_,u,"Generator"),l(_,a,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function D(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function H(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){D(i,n,o,a,c,"next",t)}function c(t){D(i,n,o,a,c,"throw",t)}a(void 0)}))}}function U(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return X(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?X(t,e):void 0}}(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 X(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function Y(t){var e=U((0,n.useState)(null),2),r=e[0],o=e[1],c=U((0,i.L4)(a.A.fileShellShow),2),u=c[0],l=(c[1],U((0,i.L4)(a.A.file_shell_hidden),2)),s=l[0],f=(l[1],U((0,n.useState)(!1),2)),h=f[0],p=f[1],v=function(){var t=H(K().mark((function t(){var e,r,n;return K().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=new F.Terminal({fontFamily:"Monaco, Menlo, Consolas, 'Courier New', monospace",theme:{background:"#FFFFFF",foreground:"#000000",cursor:"#000000",selectionBackground:"#a6d2ff"},cursorBlink:!0,cursorStyle:"bar",scrollback:1e3,scrollSensitivity:1,tabStopWidth:4}),n=function(t){e.write(t)},r=function(t){e.clear(),e.write(t),r=n},G.ws.addMsg(I.HK.shell_getting,(function(t){r(t.context)})),G.ws.addMsg(I.HK.shell_copy,(function(t){t.context&&(0,z.l)(t.context),e.focus()})),e.onData(function(){var t=H(K().mark((function t(e){var r;return K().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new I.hf(I.HK.shell_send)).context=e,t.next=4,G.ws.send(r);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),o(e);case 7:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),d=function(){H(K().mark((function t(){return K().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r&&(r.dispose(),o(null)),G.ws.isAilive()&&G.ws.setPromise(function(){var t=H(K().mark((function t(e){return K().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,G.ws.unConnect();case 2:e();case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 2:case"end":return t.stop()}}),t)})))()};return(0,n.useEffect)((function(){return function(){d()}}),[]),(0,n.useEffect)((function(){if(u.show)if(r){if(h){var t=new I.hf(I.HK.shell_cd),e=new M.n;e.init_path=u.path,e.http_token=localStorage.getItem("token"),t.context=e,G.ws.send(t)}}else v(),p(!0);else d()}),[u]),n.createElement(T.$,{show:u.show,file_shell_hidden:s,terminal:r,init:function(t,e){r.writeln("open shell... ");var n=new I.hf(I.HK.shell_open),o=new M.n;o.init_path=u.path,o.rows=t,o.cols=e,o.http_token=localStorage.getItem("token"),n.context=o,G.ws.send(n)}})}var $,q,R=r(9214),B=r(5725),Z=r(2042),J=r(7523),V=r(8815),Q=r(2730),tt=r(447),et=r(7481),rt=r(7071),nt=r(8062);function ot(t){return ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ot(t)}function it(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=ft(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function at(t){return function(t){if(Array.isArray(t))return ht(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||ft(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ct(){ct=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new P(n||[]);return o(a,"_invoke",{value:S(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",v="executing",d="completed",y={};function m(){}function w(){}function g(){}var b={};l(b,a,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(N([])));x&&x!==r&&n.call(x,a)&&(b=x);var _=g.prototype=m.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==ot(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=h;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(ot(e)+" is not iterable")}return w.prototype=g,o(_,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:w,configurable:!0}),w.displayName=l(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},L(k.prototype),l(k.prototype,c,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new k(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(_),l(_,u,"Generator"),l(_,a,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function ut(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function lt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){ut(i,n,o,a,c,"next",t)}function c(t){ut(i,n,o,a,c,"throw",t)}a(void 0)}))}}function st(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||ft(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ft(t,e){if(t){if("string"==typeof t)return ht(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ht(t,e):void 0}}function ht(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var pt,vt,dt=-1;function yt(t){var e=(0,p.Bd)().t,r=st((0,i.L4)(a.A.workflow_show),2),o=(r[0],r[1]),c=st((0,n.useState)([]),2),u=c[0],s=c[1],f=st((0,n.useState)([]),2),h=f[0],v=f[1],d=st((0,n.useState)(!1),2),y=d[0],m=d[1],w=st((0,n.useState)(void 0),2),g=w[0],b=w[1],E=st((0,n.useState)([]),2),x=E[0],_=E[1],k=st((0,n.useState)(-1),2),S=k[0],O=k[1],j=st((0,n.useState)(10),2),N=j[0],C=(j[1],st((0,n.useState)(0),2)),M=(C[0],C[1]),z=st((0,n.useState)(0),2),W=z[0],K=z[1],D=st((0,n.useState)(""),2),H=D[0],U=D[1],X=st((0,n.useState)(!1),2),Y=X[0],R=X[1],J=[e("序号"),e("运行名称"),e("状态"),e("运行时长"),e("日期"),e("操作")],Q=[e("名称"),e("状态"),e("cwd"),e("运行时长"),e("操作")],ot=function(){var t=lt(ct().mark((function t(e){var r,n,o;return ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new rt._).page_num=null!=e?e:S,r.page_size=N,r.dir_path="".concat((0,l.GG)("file",(0,l.vX)())),t.next=6,G.ws.sendData(I.HK.workflow_get,r);case 6:if(n=t.sent){t.next=9;break}return t.abrupt("return");case 9:o=n.context,s(o.list.map((function(t){var e="string"==typeof t.meta?JSON.parse(t.meta):t.meta;return e.index=t.index,e}))),M(o.total),K((0,V.gw)(o.total,N));case 13:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),ut=function(){var t=lt(ct().mark((function t(e){var r,n,o;return ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new rt._).search_name=e,r.dir_path="".concat((0,l.GG)("file",(0,l.vX)())),R(!0),t.next=6,G.ws.sendData(I.HK.workflow_search_by_run_name,r);case 6:if(n=t.sent){t.next=9;break}return t.abrupt("return");case 9:o=n.context,s(o.list.map((function(t){var e="string"==typeof t.meta?JSON.parse(t.meta):t.meta;return e.index=t.index,e}))),M(o.total),K((0,V.gw)(o.total,N)),O(0),R(!1);case 15:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),ft=function(){var t=lt(ct().mark((function t(){var e;return ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=new F.Terminal({fontFamily:"Monaco, Menlo, Consolas, 'Courier New', monospace",theme:{background:"#FFFFFF",foreground:"#000000",cursor:"#000000",selectionBackground:"#a6d2ff"},cursorBlink:!0,cursorStyle:"bar",scrollback:1e3,scrollSensitivity:1,tabStopWidth:4,convertEol:!0}),q=e,b(e);case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();(0,n.useEffect)((function(){return m(!1),$=void 0,q=void 0,dt=-1,ot(),lt(ct().mark((function t(){return ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:q&&(q.dispose(),q=null);case 1:case"end":return t.stop()}}),t)})))}),[]);var ht=function(){var t=lt(ct().mark((function t(e){var r,n,o,i,a,c;return ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.is_running){t.next=2;break}return t.abrupt("return");case 2:return _([]),(r=new rt._).index=e.index,r.dir_path="".concat((0,l.GG)("file",(0,l.vX)())),t.next=8,G.ws.sendData(I.HK.workflow_get,r);case 8:n=t.sent,o=n.context,i="string"==typeof o.one_data.data?JSON.parse(o.one_data.data):o.one_data.data,a=i.success_list,c=i.fail_list,v([].concat(at(c),at(a)));case 14:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),pt=function(t,e,r){if(e){var o,i=it(null!=e?e:[]);try{for(i.s();!(o=i.n()).done;){var a,c,u,l=o.value,s=void 0,f=[];l["use-yml"]?(pt(f,void 0,l.use_job_children_list),s="".concat(l["use-yml"]," ;").concat(null!==(c=l.duration)&&void 0!==c?c:-1)):s="".concat(l.run," ;").concat(null!==(u=l.duration)&&void 0!==u?u:-1),s=n.createElement("div",null,n.createElement(tt.fq,{success:void 0===l.code?void 0:0===l.code}),"$",s),t.push({name:s,children:f,extra_data:{code:l.code,context:null!==(a=l.success_message)&&void 0!==a?a:l.fail_message}})}}catch(t){i.e(t)}finally{i.f()}}else if(r){var h,p=it(null!=r?r:[]);try{for(p.s();!(h=p.n()).done;){var v=h.value,d=n.createElement("div",null,n.createElement(tt.fq,{success:void 0===v.code?void 0:0===v.code}),"$",v.name);t.push({name:d,extra_data:{code:v.code,is_job:!0,job_data:v}})}}catch(t){p.e(t)}finally{p.f()}}},vt=function(){var t=lt(ct().mark((function t(e){var r,n;return ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=e.steps,pt(n=[],null!=r?r:[]),_(n);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),yt=function(){var t=lt(ct().mark((function t(e){return ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(g){t.next=3;break}return t.next=3,new Promise((function(t){$=t,m(!0),ft()}));case 3:e&&(q.reset(),q.write(e));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),mt=function(){var t=lt(ct().mark((function t(e){var r,n,o;return ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null==e||null===(r=e.extra_data)||void 0===r||!r.is_job){t.next=4;break}return t.next=3,vt(e.extra_data.job_data);case 3:return t.abrupt("return");case 4:if(null==e||null===(n=e.extra_data)||void 0===n||!n.context){t.next=8;break}yt(e.extra_data.context),t.next=11;break;case 8:if(null!=e&&e.extra_data.code){t.next=10;break}return t.abrupt("return");case 10:yt(null!==(o=e.extra_data.code)&&void 0!==o?o:"");case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(P.A,null,g&&n.createElement(A.rA,{icon:"print",title:"打印日志",onClick:function(){m(!y)}}),n.createElement(A.rA,{icon:"close",title:e("关闭"),onClick:function(){o(!1)}})),n.createElement(B.jW,{isFull:!0,more:!0},n.createElement(B.NN,null,n.createElement(B.xh,null,n.createElement(B.fI,null,n.createElement(B.VP,null,n.createElement(tt.uF,{self_title:n.createElement("span",{className:" div-row "},n.createElement("h2",null,e("历史记录"))),titleCom:n.createElement("div",{className:" div-row "},n.createElement(L.Sm,{disabled:Y,value:H,placeholder:"搜索运行名称(支持正则)",handleInputChange:function(t){U(H)},handlerEnter:function(t){ut(t)}})),rightBottomCom:n.createElement("span",{className:" div-row "},n.createElement("span",null,Math.abs(S),"/",W),n.createElement(L.Sm,{placeholder:"max page ".concat(W),handleInputChange:function(t){dt=parseInt(t)},handlerEnter:function(){if(dt<1||dt>W)(0,Z.zN)("illegal page num");else{var t=0-dt;O(t),ot(t)}}}),n.createElement(A.rA,{icon:"navigate_before",onClick:function(){var t=S+1;t>-1?(0,Z.zN)("max page num"):(O(t),ot(t))},title:"上一页"}),n.createElement(A.rA,{icon:"navigate_next",onClick:function(){var t=S-1;Math.abs(t)>W?(0,Z.zN)("min page num"):(O(t),ot(t))},title:"下一页"}))},n.createElement(et.X,{headers:J,rows:u.map((function(t,r){var o;return o=t.is_running?n.createElement("div",null,n.createElement(tt.fq,null),e("正在运行")):n.createElement("div",null,n.createElement(tt.fq,{success:t.is_success}),t.is_success?e("成功"):e("失败")),[n.createElement("p",null,t.index),n.createElement("p",{style:{wordWrap:"break-word"}},t["run-name"]),o,n.createElement("span",null,t.duration),n.createElement("span",null,t.timestamp),n.createElement("div",null,n.createElement(A.rA,{icon:"details",title:e("详情"),onClick:function(){ht(t)}}))]})),width:"10rem"}))),n.createElement(B.VP,null,n.createElement(tt.Zp,{title:e("Job")},n.createElement(et.X,{headers:Q,rows:h.map((function(t,r){return[n.createElement("p",null,t.name),n.createElement("div",null,n.createElement(tt.fq,{success:void 0===t.code?void 0:0===t.code}),0===t.code?e("成功"):e("失败")),n.createElement(tt.xP,null,t.cwd),n.createElement("span",null,t.duration),n.createElement("div",null,n.createElement(A.rA,{icon:"details",title:e("详情"),onClick:function(){vt(t)}}),(!!t.success_message||!!t.fail_message)&&n.createElement(A.rA,{icon:"print",title:e("日志"),onClick:function(){var e;yt(null!==(e=t.success_message)&&void 0!==e?e:t.fail_message)}}))]})),width:"10rem"})),n.createElement(tt.Zp,{title:"Step"},n.createElement(nt.A,{list:x,click:function(t){mt(t)}}))))))),n.createElement("div",{style:{display:y?"":"none"}},n.createElement(T.$,{show:!0,terminal:g,init:function(){$&&($(1),$=void 0)}})))}function mt(t){return mt="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},mt(t)}function wt(){wt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new P(n||[]);return o(a,"_invoke",{value:S(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",v="executing",d="completed",y={};function m(){}function w(){}function g(){}var b={};l(b,a,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(N([])));x&&x!==r&&n.call(x,a)&&(b=x);var _=g.prototype=m.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==mt(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=h;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(mt(e)+" is not iterable")}return w.prototype=g,o(_,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:w,configurable:!0}),w.displayName=l(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},L(k.prototype),l(k.prototype,c,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new k(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(_),l(_,u,"Generator"),l(_,a,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function gt(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function bt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){gt(i,n,o,a,c,"next",t)}function c(t){gt(i,n,o,a,c,"throw",t)}a(void 0)}))}}function Et(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||xt(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 xt(t,e){if(t){if("string"==typeof t)return _t(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_t(t,e):void 0}}function _t(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function Lt(t){var e=(0,p.Bd)().t,r=Et((0,i.L4)(a.A.workflow_realtime_show),2),o=r[0],c=r[1],u=Et((0,n.useState)([]),2),s=(u[0],u[1],Et((0,n.useState)([]),2)),f=(s[0],s[1],Et((0,n.useState)(!1),2)),h=f[0],v=f[1],d=Et((0,n.useState)(void 0),2),y=d[0],m=(d[1],Et((0,n.useState)([]),2)),w=m[0],g=m[1],b=function(t){var e,r=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=xt(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}(t);try{for(r.s();!(e=r.n()).done;){var o,i,a,c=e.value;(null==c||null===(o=c.extra_data)||void 0===o?void 0:o.running_type)===rt.rl.success?c.name=n.createElement("div",null,n.createElement(tt.fq,{success:!0}),c.name):(null==c||null===(i=c.extra_data)||void 0===i?void 0:i.running_type)===rt.rl.fail?c.name=n.createElement("div",null,n.createElement(tt.fq,{success:!1}),c.name):(null==c||null===(a=c.extra_data)||void 0===a?void 0:a.running_type)===rt.rl.running&&(c.name=n.createElement("div",null,n.createElement(tt.fq,{running:!0}),c.name)),c.children&&b(c.children)}}catch(t){r.e(t)}finally{r.f()}},E=function(){var t=bt(wt().mark((function t(e){var r;return wt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(r=new rt.v3).filename_path="".concat((0,l.GG)("file",(0,l.vX)())).concat(o.filename),G.ws.addMsg(I.HK.workflow_realtime_one_rsq,(function(t){!0===t.context.done?(0,Z.LW)("done!"):!1===t.context.done&&(0,Z.zN)("done!");var e=t.context.list;b(e),g(e)})),G.ws.sendData(I.HK.workflow_realtime_one_req,r);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return(0,n.useEffect)((function(){return v(!1),pt=void 0,vt=void 0,E(),bt(wt().mark((function t(){return wt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:G.ws.removeMsg(I.HK.workflow_realtime_one_rsq),vt&&(vt.dispose(),vt=null);case 2:case"end":return t.stop()}}),t)})))}),[]),n.createElement("div",null,n.createElement(P.A,null,y&&n.createElement(A.rA,{icon:"print",title:"打印日志",onClick:function(){v(!h)}}),n.createElement(A.rA,{icon:"close",title:e("关闭"),onClick:function(){c({open:!1})}})),n.createElement(B.jW,{isFull:!0,more:!0},n.createElement(B.NN,null,n.createElement(nt.A,{list:w,click:function(t){}}))),n.createElement("div",{style:{display:h?"":"none"}},n.createElement(T.$,{show:!0,terminal:y,init:function(){pt&&(pt(1),pt=void 0)}})))}var kt=r(3430),St=r(2458);function Ot(t){return Ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ot(t)}function jt(){return jt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},jt.apply(null,arguments)}function At(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Pt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?At(Object(r),!0).forEach((function(e){Nt(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):At(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Nt(t,e,r){return(e=function(t){var e=function(t){if("object"!=Ot(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ot(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ot(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ct(){Ct=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new P(n||[]);return o(a,"_invoke",{value:S(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",v="executing",d="completed",y={};function m(){}function w(){}function g(){}var b={};l(b,a,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(N([])));x&&x!==r&&n.call(x,a)&&(b=x);var _=g.prototype=m.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==Ot(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=h;return function(i,a){if(o===v)throw Error("Generator is already running");if(o===d){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=d,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?d:p,l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=d,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function N(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Ot(e)+" is not iterable")}return w.prototype=g,o(_,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:w,configurable:!0}),w.displayName=l(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},L(k.prototype),l(k.prototype,c,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new k(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(_),l(_,u,"Generator"),l(_,a,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=N,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:N(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function Ft(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Mt(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function It(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function Gt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){It(i,n,o,a,c,"next",t)}function c(t){It(i,n,o,a,c,"throw",t)}a(void 0)}))}}function Tt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||Mt(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 Mt(t,e){if(t){if("string"==typeof t)return zt(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?zt(t,e):void 0}}function zt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var Wt,Kt,Dt=Object.values(kt.UG),Ht=280,Ut={};function Xt(){var t,e,r=Tt((0,i.L4)(a.A.editorSetting),2),s=(r[0],r[1]),h=Tt((0,i.L4)(a.A.file_preview),2),d=(h[0],h[1]),y=(0,p.Bd)().t,m=(0,n.useRef)(null),w=(0,c.zy)(),g=(0,c.Zp)(),b=Tt((0,i.L4)(a.A.nowFileList),2),E=b[0],_=b[1],k=Tt((0,i.L4)(a.A.uploadFiles),2),S=(k[0],k[1]),F=Tt((0,i.L4)(a.A.showPrompt),2),T=(F[0],F[1]),M=Tt((0,i.L4)(a.A.selectedFileList),2),z=M[0],W=(M[1],Tt((0,i.L4)(a.A.copyedFileList),2)),K=W[0],D=W[1],H=Tt((0,i.L4)(a.A.enterKey),2),U=(H[0],H[1]),X=Tt((0,i.L4)(a.A.cutedFileList),2),$=X[0],q=X[1],et=Tt((0,i.L4)(a.A.selectedFileList),2),nt=(et[0],et[1]),ot=Tt((0,i.L4)(a.A.clickFileList),2),it=(ot[0],ot[1]),at=Tt((0,i.L4)(a.A.fileShellShow),2),ct=at[0],ut=at[1],lt=Tt((0,i.L4)(a.A.windows_width),2),st=(lt[0],lt[1],Tt((0,i.L4)(a.A.file_root_list),2)),ft=st[0],ht=(st[1],Tt((0,i.L4)(a.A.file_root_index),2)),pt=ht[0],vt=ht[1],dt=Tt((0,n.useState)(void 0),2),mt=dt[0],wt=dt[1],gt=Tt((0,n.useState)(""),2),bt=gt[0],Et=gt[1],xt=Tt((0,i.L4)(a.A.workflow_show),2),_t=xt[0],kt=xt[1],Ot=Tt((0,i.L4)(a.A.workflow_realtime_show),2),At=Ot[0],Nt=(Ot[1],Tt((0,n.useState)(!1),2)),It=Nt[0],Mt=Nt[1],zt=(0,n.useContext)(J.F).reloadUserInfo,Xt=(0,n.useContext)(J.F).initUserInfo,Yt=Tt((0,i.L4)(a.A.user_base_info),2),$t=Yt[0],qt=(Yt[1],(0,v.kZ)().click_file),Rt=Tt((0,i.L4)(a.A.prompt_card),2),Bt=(Rt[0],Rt[1]),Zt=(0,v.hg)().file_is_running,Jt=Tt((0,i.L4)(a.A.to_running_files),2),Vt=(Jt[0],Jt[1]),Qt=function(){var t=Gt(Ct().mark((function t(){var e;return Ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=new rt.Nd).dir_path="".concat((0,l.GG)("file",(0,l.vX)())),G.ws.addMsg(I.HK.workflow_realtime,(function(t){var e,r,n=new Set(null!==(e=t.context)&&void 0!==e?e:[]),o=Ft(null!=Kt?Kt:[]);try{for(o.s();!(r=o.n()).done;){var i=r.value;i.endsWith(".workflow.yml")&&!n.has(i)?(0,Z.LW)("".concat(i.slice(0,-13)," done!")):i.endsWith(".act")&&!n.has(i)&&(0,Z.LW)("".concat(i.slice(0,-4)," done!"))}}catch(t){o.e(t)}finally{o.f()}Kt=n,Vt(n)})),t.next=5,G.ws.sendData(I.HK.workflow_realtime,e);case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),te=function(){var t=Gt(Ct().mark((function t(e){var r,n,o,i,a,c,u,s,f,h;return Ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=e?encodeURIComponent(e)+"?is_sys_path=1":encodeURIComponent((0,l.GG)("file",(0,l.vX)())),t.next=3,j.$M.get(e);case 3:if((o=t.sent).code!==C.m.PreFile){t.next=7;break}return qt({name:o.message,context:o.data,opt_shell:!0}),t.abrupt("return");case 7:if(o.code===C.m.Sucess){t.next=10;break}return o.message&&(0,Z.zN)(o.message),t.abrupt("return");case 10:i=o.data,a=!1,c=Ft(null!==(r=i.files)&&void 0!==r?r:[]);try{for(c.s();!(u=c.n()).done;)(s=u.value).origin_size=s.size,s.size=(0,V.v7)(s.size),s.name.endsWith("workflow.yml")&&!a&&(a=!0,Qt())}catch(t){c.e(t)}finally{c.f()}if(void 0===i.relative_user_path){t.next=18;break}return(i.relative_user_path.startsWith("\\")||i.relative_user_path.startsWith("/"))&&(i.relative_user_path=i.relative_user_path.slice(1)),g(i.relative_user_path),t.abrupt("return");case 18:f=Ft(null!==(n=i.folders)&&void 0!==n?n:[]);try{for(f.s();!(h=f.n()).done;)h.value.name===rt.SB&&(Mt(!0),a||Qt())}catch(t){f.e(t)}finally{f.f()}_(o.data),Wt=o.data;case 22:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),ee=function(){var t=Math.floor(document.querySelector("main").offsetWidth/Ht);0===t&&(t=1),wt("calc(".concat(100/t,"% - 1em)"))};(0,n.useEffect)((function(){var t=function(){var t=Gt(Ct().mark((function t(){return Ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,te();case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();t(),s({open:!1}),d({open:!1}),Mt(!1),Ut={},Kt=void 0}),[w]),(0,n.useEffect)((function(){return Gt(Ct().mark((function t(){return Ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(ct.show){t.next=3;break}return t.next=3,G.ws.unConnect();case 3:Vt(new Set);case 4:case"end":return t.stop()}}),t)})))}),[ct]);var re=function(){var t=Gt(Ct().mark((function t(e){var r,n,o,i;return Ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.preventDefault(),r=e.dataTransfer,n=e.target,!(r.files.length<=0)){t.next=5;break}return t.abrupt("return");case 5:for(o=0;o<5;o++)null===n||n.classList.contains("item")||(n=n.parentElement);return t.next=8,(0,N.T)(r);case 8:i=t.sent,S(i),T({show:!0,type:f.PromptEnum.FilesUpload,overlay:!1,data:{}});case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),ne=function(t){t.preventDefault()};function oe(){return(oe=Gt(Ct().mark((function t(){var e,r,n;return Ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=(0,u.jH)(Dt,null!==(e=null==$t||null===(r=$t.user_data)||void 0===r?void 0:r.file_list_show_type)&&void 0!==e?e:""),t.next=3,j.wm.post("save_user_file_list_show_type",{type:n});case 3:Xt();case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function ie(t){(0,Z.LW)(t)}(0,n.useEffect)((function(){var t=m.current.ownerDocument;return t.addEventListener("dragover",ne),t.addEventListener("drop",re),ee(),window.addEventListener("resize",ee),function(){t.removeEventListener("dragover",ne),t.removeEventListener("drop",re),window.removeEventListener("resize",ee),ct.show&&ut({show:!1,path:""})}}),[]);var ae=function(){var t=Gt(Ct().mark((function t(e){return Ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return vt(e),t.next=3,j.$M.post("base_switch",{root_index:e});case 3:return t.next=5,zt();case 5:g("/file/"),nt([]),it([]);case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),ce=function(t){Bt({open:!0,title:"信息",context_div:n.createElement("div",null,n.createElement(B.Yh,{left:y("挂载位置磁盘"),right:null==t?void 0:t.total_size}),n.createElement(B.Yh,{left:"".concat(y("磁盘剩余")),right:null==t?void 0:t.left_size}),n.createElement(B.Yh,{left:"".concat(y("文件系统")),right:null==t?void 0:t.fs_type}),n.createElement(B.Yh,{left:"".concat(y("文件夹数")),right:E.folders.length}),n.createElement(B.Yh,{left:"".concat(y("文件数")),right:E.files.length}),n.createElement(B.Yh,{left:"".concat(y("当前位置")),right:n.createElement(tt.xP,{context:null==t?void 0:t.now_absolute_path})}))})},ue=function(){var t=Gt(Ct().mark((function t(){var e,r;return Ct().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Ut.now_absolute_path){t.next=8;break}return G.ws.addMsg(I.HK.file_info,(function(t){var r=t.context;e&&(Ut=Pt(Pt({},Ut),r),G.ws.removeMsg(I.HK.file_info),ce(Ut))})),t.next=4,G.ws.sendData(I.HK.file_info,{type:o.Iw.folder,path:(0,l.GG)("file",(0,l.vX)())});case 4:r=t.sent,e=r.context,ce(Ut=e);case 8:ce(Ut);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),le=Tt((0,n.useState)(!1),2),se=le[0],fe=le[1];(0,n.useEffect)((function(){var t=function(t){if(se)if(t.ctrlKey)if("a"===t.key||"A"===t.key){for(var e=E.files.length,r=E.folders.length,n=[],o=0;o<e+r;o++)n.push(o);nt(n)}else U("ctrl");else"Escape"===t.key?nt([]):"Shift"===t.key&&U("shift")},e=function(t){t.ctrlKey||U("")};return window.addEventListener("keydown",t),window.addEventListener("keyup",e),function(){window.removeEventListener("keydown",t),window.removeEventListener("keyup",e)}}),[E,se]);var he=function(t){t.target===t.currentTarget&&nt([])};return n.createElement("div",{className:"not-select-div"},n.createElement(P.A,{left_children:n.createElement(L.$Z,{handleEnterPress:function(){var t,e;if(Wt){nt([]),it([]);var r,n=[],o=[],i=Ft(null!==(t=Wt.files)&&void 0!==t?t:[]);try{for(i.s();!(r=i.n()).done;){var a=r.value;a.name.includes(bt)&&n.push(a)}}catch(t){i.e(t)}finally{i.f()}var c,u=Ft(null!==(e=Wt.folders)&&void 0!==e?e:[]);try{for(u.s();!(c=u.n()).done;){var l=c.value;l.name.includes(bt)&&o.push(l)}}catch(t){u.e(t)}finally{u.f()}_({files:n,folders:o})}},placeholder:y("搜索当前目录"),icon:"search",value:"",handleInputChange:function(t){Et(t)},max_width:"25em"})},z.length>0&&n.createElement(A.rA,{icon:"delete",title:y("删除"),onClick:function(){T({show:!0,type:f.PromptEnum.FilesDelete,overlay:!0,data:{}})}}),z.length>0&&n.createElement(A.rA,{icon:"content_copy",title:y("复制"),onClick:function(){var t=(0,R.i)(E,z);D(t.map((function(t){return(0,R.O)(t.name)}))),q([]),ie("已复制")}}),z.length>0&&n.createElement(A.rA,{icon:"content_cut",title:y("剪切"),onClick:function(){var t=(0,R.i)(E,z);q(t.map((function(t){return(0,R.O)(t.name)}))),D([]),ie("已剪切")}}),(K.length>0||$.length>0)&&n.createElement(A.rA,{onClick:function(){T({show:!0,type:f.PromptEnum.Confirm,overlay:!0,data:{}})},icon:"content_paste",title:y("粘贴到此处"),tip:K.length+$.length}),z.length>0&&n.createElement(A.rA,{icon:"download",title:y("下载"),onClick:function(){for(var t=(0,R.i)(E,z),e=0;e<t.length;e++){var r=t[e];t[e]=encodeURIComponent((0,R.O)(r.name))}var n=j.$M.getDownloadUrl(t);window.open(n)}}),z.length>0&&n.createElement(A.rA,{icon:"compress",title:y("压缩"),onClick:function(){for(var t=(0,R.i)(E,z),e=0;e<t.length;e++){var r=t[e];t[e]=(0,R.O)(r.name)}t&&0!==t.length?T({show:!0,type:f.PromptEnum.Compress,overlay:!0,data:{files:t}}):(0,Z.zN)("没有选中")}}),1===z.length&&n.createElement(A.rA,{icon:"edit_attributes",title:y("重命名"),onClick:function(){T({show:!0,type:f.PromptEnum.FileRename,overlay:!0,data:{}})}}),It&&n.createElement(A.rA,{icon:"api",title:"workflow",onClick:function(){kt(!_t)}}),n.createElement(A.rA,{icon:"terminal",title:"shell",onClick:function(){ct.show?ut({show:!1,path:""}):ut({show:!0,path:(0,l.GG)("file",(0,l.vX)())})}}),n.createElement(A.rA,{icon:"grid_view",title:y("切换样式"),onClick:function(){return oe.apply(this,arguments)}}),n.createElement(A.rA,{icon:"create_new_folder",title:y("创建文件夹"),onClick:function(){T({show:!0,type:f.PromptEnum.DirNew,overlay:!0,data:{dir:(0,l.GG)("file",(0,l.vX)())}})}}),n.createElement(A.rA,{icon:"note_add",title:y("创建文本文件"),onClick:function(){T({show:!0,type:f.PromptEnum.FileNew,overlay:!0,data:{dir:(0,l.GG)("file",(0,l.vX)())}})}}),n.createElement(A.rA,{icon:"upload_file",title:"上传",onClick:function(){T({show:!0,type:f.PromptEnum.UploadFile,overlay:!0,data:{call:function(t){var e,r=null===(e=t.currentTarget)||void 0===e?void 0:e.files;if(r){for(var n=!!r[0].webkitRelativePath,o=[],i=new Set,a=0;a<r.length;a++){var c=r[a],u=n?c.webkitRelativePath:"".concat(c.webkitRelativePath).concat(c.name);c.fullPath=u,n&&i.add((0,Q.S)(u)),o.push(c)}var l=[];if(n){var s,h=Ft(i);try{for(h.s();!(s=h.n()).done;){var p=s.value;l.push({isDir:!0,fullPath:p,name:p})}}catch(t){h.e(t)}finally{h.f()}}l.push.apply(l,o),S(l),T({show:!0,type:f.PromptEnum.FilesUpload,overlay:!1,data:{}})}}}})}}),n.createElement(A.rA,{icon:"info",title:y("信息"),onClick:ue}),n.createElement(B.EF,{title:y("切换目录"),items:ft,click:function(t){ae(t)},pre_value:pt})),n.createElement(O,{baseRoute:"file",clickFun:function(){nt([]),it([])},input_path_enter:function(t){(0,St.Z1)(t)?te(t):g((0,St.Jn)((0,l.vX)(),t)),nt([]),it([]),_({files:[],folders:[]})}}),n.createElement("div",{id:"listing",className:"mosaic file-icons ".concat(null!==(t=null==$t||null===(e=$t.user_data)||void 0===e?void 0:e.file_list_show_type)&&void 0!==t?t:""),ref:m,onMouseEnter:function(){fe(!0)},onMouseLeave:function(){fe(!1)}},E.folders&&E.folders.length>0&&n.createElement("h2",null,y("文件夹")),E.folders&&n.createElement("div",{onClick:he},E.folders.map((function(t,e){return n.createElement(x,jt({itemWidth:mt,index:e,key:e},t))}))),E.files&&E.files.length>0&&n.createElement("h2",{onClick:he},y("文件")),E.files&&n.createElement("div",{onClick:he},E.files.map((function(t,e){return n.createElement(x,jt({icon:Zt(t.name)?"refresh":void 0,itemWidth:mt,index:e+E.folders.length,key:e},t))})))),n.createElement(Y,null),_t&&n.createElement(yt,null),At.open&&n.createElement(Lt,null))}},8062:(t,e,r)=>{r.d(e,{A:()=>c});var n=r(6540);function o(){return o=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},o.apply(null,arguments)}function i(t){return n.createElement("div",{className:"black-tip",onClick:function(){t.click&&t.click(t)},onContextMenu:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),t.onContextMenu&&t.onContextMenu(e,t)}},t.name)}var a=function(t){return n.createElement("li",null,t.click?n.createElement(i,o({},t.node,{name:t.render?t.render(t.node):t.node.name,click:t.click,onContextMenu:t.onContextMenu})):n.createElement("div",null,t.render?t.render(t.node):t.node.name),t.node.children&&t.node.children.length>0&&n.createElement("ul",null,t.node.children.map((function(e,r){return n.createElement(a,{key:r,node:e,click:t.click,onContextMenu:t.onContextMenu,render:t.render})}))))};const c=function(t){return n.createElement("div",{className:"card-tree-view"},n.createElement("ul",null,t.list&&t.list.map((function(e,r){return n.createElement(a,{key:r,node:e,click:t.click,onContextMenu:t.onContextMenu,render:t.render})}))))}}}]);
2
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[663],{3496:(t,e,r)=>{r.d(e,{s:()=>n});var n=function(t){return t.setting_sys_option_status_save="sys_option/status/save",t.setting_customer_router="customer_router",t.setting_customer_router_save="customer_router/save",t.setting_customer_workflow_router="customer_router/workflow",t.setting_customer_workflow_router_save="customer_router/workflow/save",t.user_save_user_file_list_show_type="save_user_file_list_show_type",t}({})},3663:(t,e,r)=>{r.r(e),r.d(e,{default:()=>Ut});var n=r(6540),o=r(7022),i=r(7444),a=r(6417),c=r(7767),u=r(4694),l=r(6007),s=r(4289),f=r(8844),h=r(7567),p=r(4251),d=r(2389),v=r(8247),y=r(9214);function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}function w(){w=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),c=new N(n||[]);return o(a,"_invoke",{value:j(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",d="executing",v="completed",y={};function g(){}function _(){}function b(){}var E={};l(E,a,(function(){return this}));var x=Object.getPrototypeOf,k=x&&x(x(C([])));k&&k!==r&&n.call(k,a)&&(E=k);var L=b.prototype=g.prototype=Object.create(E);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==m(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function j(e,r,n){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=A(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:p,l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function A(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,A(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function F(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function C(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(m(e)+" is not iterable")}return _.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:_,configurable:!0}),_.displayName=l(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===_||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,u,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},S(O.prototype),l(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new O(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(L),l(L,u,"Generator"),l(L,a,(function(){return this})),l(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=C,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(F),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),F(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;F(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:C(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function g(t){return function(t){if(Array.isArray(t))return k(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||x(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 _(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function b(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){_(i,n,o,a,c,"next",t)}function c(t){_(i,n,o,a,c,"throw",t)}a(void 0)}))}}function E(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||x(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 x(t,e){if(t){if("string"==typeof t)return k(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?k(t,e):void 0}}function k(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function L(t){var e=E((0,i.L4)(a.A.selectedFileList),2),r=e[0],m=e[1],_=E((0,i.L4)(a.A.clickFileList),2),x=_[0],k=_[1],L=E((0,i.L4)(a.A.nowFileList),2),S=L[0],O=L[1],j=E((0,i.L4)(a.A.confirm),2),A=(j[0],j[1]),P=E((0,i.L4)(a.A.enterKey),2),F=P[0],N=(P[1],(0,v.kZ)().click_file),C=((0,d.Bd)().t,(0,c.Zp)()),I=((0,c.zy)(),function(){var e=b(w().mark((function e(n,i){var a,c,l,f,h,p;return w().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==(0,u.kW)(r,n))m((0,u.P1)(r,n));else if("ctrl"===F)m([].concat(g(r),[n]));else if("shift"===F){if(a=(0,u.a7)(r),c=a.max,l=a.min,f=[],n>=c)for(h=c;h<=n;h++)f.push(h);else for(p=l;p>=n;p--)f.push(p);m(f)}else m([n]);if(k([].concat(g(x),[n])),setTimeout((function(){k((0,u.P1)(x,n))}),300),t.type!==o.Iw.folder){e.next=14;break}if(void 0===x.find((function(t){return t===n}))){e.next=12;break}return C((0,u.IO)((0,s.vX)(),i)),m([]),k([]),O({files:[],folders:[]}),e.abrupt("return");case 12:e.next=16;break;case 14:void 0!==x.find((function(t){return t===n}))&&N({name:i,size:t.origin_size,opt_shell:!0});case 16:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()),G=E((0,i.L4)(a.A.showPrompt),2),T=(G[0],G[1]),M=function(){var t=b(w().mark((function t(e){var n,o;return w().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=(0,y.i)(S,r),o=n.map((function(t){return(0,y.O)(t.name)})),t.next=4,l.$M.post("cut",{files:o,to:"".concat((0,s.GG)("file",(0,s.vX)()),"/").concat(e)});case 4:t.sent,m([]),A({open:!1,handle:null}),C((0,s.vX)());case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement(f.B,{extraAttr:{onContextMenu:function(e){!function(t,e,r,n){t.preventDefault(),t.stopPropagation();var i=new p.i;i.path=(0,u.IO)((0,s.vX)(),e),i.filename=e,i.x=t.clientX,i.y=t.clientY,i.type=r?o.Iw.folder:(0,p.u)(e),i.size=n,T({show:!0,type:h.PromptEnum.FileMenu,overlay:!1,data:i})}(e,t.name,t.type===o.Iw.folder,t.origin_size)}},draggable_handle:M,name:t.name,index:t.index,mtime:t.mtime,size:t.size,type:t.type,isLink:t.isLink,path:t.path,icon:t.icon,click:I,itemWidth:t.itemWidth})}var S=r(4976),O=r(3033);function j(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return A(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?A(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function P(t){var e=(0,c.zy)(),r=j((0,n.useState)([]),2),o=r[0],i=r[1],a=j((0,n.useState)("/"),2),l=a[0],f=a[1],h=j((0,n.useState)(void 0),2),p=h[0],d=h[1];n.useEffect((function(){var e="",r=(0,s.vX)().split("/");r=r.filter((function(t){return t}));var n=r.indexOf(t.baseRoute),o=[];if(-1!=n){e=(0,u.IO)(r.slice(0,n),t.baseRoute);for(var a=r.slice(n+1),c=0;c<a.length;c++){var l=a[c];o.push({value:l,href:0===c?"".concat(e).concat(l,"/"):(0,u.IO)(o[c-1].href,l)})}f(e),i(o)}}),[e]);var v=function(e){e.stopPropagation(),t.clickFun(e)};return n.createElement("div",{className:"breadcrumbs",onClick:function(t){d(void 0!==p?void 0:"")}},n.createElement(n.Fragment,null,void 0===p?n.createElement(n.Fragment,null,n.createElement("span",{className:"chevron"},n.createElement(S.N_,{to:l,onClick:v},n.createElement("i",{className:"material-icons"},"home"))),o.map((function(t,e){return n.createElement("span",{className:"chevron",key:e},n.createElement("i",{className:"material-icons"},"keyboard_arrow_right"),n.createElement(S.N_,{to:t.href,onClick:v},decodeURIComponent(t.value)))}))):n.createElement(O.Sm,{width:"100%",maxWidth:"60%",handlerEnter:function(e){t.input_path_enter&&t.input_path_enter(e),d(void 0)}})))}var F=r(5997),N=r(7952),C=r(5726),I=r(3459),G=r(7856),T=r(4238),M=r(4944),z=r(7704),W=r(4405),X=r(505);function D(t){return D="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},D(t)}function K(){K=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new P(n||[]);return o(a,"_invoke",{value:S(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",d="executing",v="completed",y={};function m(){}function w(){}function g(){}var _={};l(_,a,(function(){return this}));var b=Object.getPrototypeOf,E=b&&b(b(F([])));E&&E!==r&&n.call(E,a)&&(_=E);var x=g.prototype=m.prototype=Object.create(_);function k(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==D(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:p,l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function F(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(D(e)+" is not iterable")}return w.prototype=g,o(x,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:w,configurable:!0}),w.displayName=l(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,u,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},k(L.prototype),l(L.prototype,c,(function(){return this})),e.AsyncIterator=L,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new L(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(x),l(x,u,"Generator"),l(x,a,(function(){return this})),l(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=F,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:F(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function H(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function Y(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){H(i,n,o,a,c,"next",t)}function c(t){H(i,n,o,a,c,"throw",t)}a(void 0)}))}}function U(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return $(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$(t,e):void 0}}(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,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function B(t){var e=U((0,n.useState)(null),2),r=e[0],o=e[1],c=U((0,i.L4)(a.A.fileShellShow),2),u=c[0],l=(c[1],U((0,i.L4)(a.A.file_shell_hidden),2)),s=l[0],f=(l[1],U((0,n.useState)(!1),2)),h=f[0],p=f[1],d=function(){var t=Y(K().mark((function t(){var e,r,n;return K().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=new G.Terminal({fontFamily:"Monaco, Menlo, Consolas, 'Courier New', monospace",theme:{background:"#FFFFFF",foreground:"#000000",cursor:"#000000",selectionBackground:"#a6d2ff"},cursorBlink:!0,cursorStyle:"bar",scrollback:1e3,scrollSensitivity:1,tabStopWidth:4}),n=function(t){e.write(t)},r=function(t){e.clear(),e.write(t),r=n},M.ws.addMsg(T.HK.shell_getting,(function(t){r(t.context)})),M.ws.addMsg(T.HK.shell_copy,(function(t){t.context&&(0,X.l)(t.context),e.focus()})),e.onData(function(){var t=Y(K().mark((function t(e){var r;return K().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new T.hf(T.HK.shell_send)).context=e,t.next=4,M.ws.send(r);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),o(e);case 7:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),v=function(){Y(K().mark((function t(){return K().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r&&(r.dispose(),o(null)),M.ws.isAilive()&&M.ws.setPromise(function(){var t=Y(K().mark((function t(e){return K().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,M.ws.unConnect();case 2:e();case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 2:case"end":return t.stop()}}),t)})))()};return(0,n.useEffect)((function(){return function(){v()}}),[]),(0,n.useEffect)((function(){if(u.show)if(r){if(h){var t=new T.hf(T.HK.shell_cd),e=new W.n;e.init_path=u.path,e.http_token=localStorage.getItem("token"),t.context=e,M.ws.send(t)}}else d(),p(!0);else v()}),[u]),n.createElement(z.$,{show:u.show,file_shell_hidden:s,terminal:r,init:function(t,e){r.writeln("open shell... ");var n=new T.hf(T.HK.shell_open),o=new W.n;o.init_path=u.path,o.rows=t,o.cols=e,o.http_token=localStorage.getItem("token"),n.context=o,M.ws.send(n)}})}var q,R,Z=r(5725),J=r(2042),V=r(7523),Q=r(8815),tt=r(2730),et=r(447),rt=r(7481),nt=r(7071),ot=r(8062);function it(t){return it="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},it(t)}function at(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=ht(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function ct(t){return function(t){if(Array.isArray(t))return pt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||ht(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 ut(){ut=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new P(n||[]);return o(a,"_invoke",{value:S(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",d="executing",v="completed",y={};function m(){}function w(){}function g(){}var _={};l(_,a,(function(){return this}));var b=Object.getPrototypeOf,E=b&&b(b(F([])));E&&E!==r&&n.call(E,a)&&(_=E);var x=g.prototype=m.prototype=Object.create(_);function k(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==it(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:p,l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function F(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(it(e)+" is not iterable")}return w.prototype=g,o(x,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:w,configurable:!0}),w.displayName=l(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,u,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},k(L.prototype),l(L.prototype,c,(function(){return this})),e.AsyncIterator=L,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new L(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(x),l(x,u,"Generator"),l(x,a,(function(){return this})),l(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=F,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:F(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function lt(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function st(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){lt(i,n,o,a,c,"next",t)}function c(t){lt(i,n,o,a,c,"throw",t)}a(void 0)}))}}function ft(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||ht(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 ht(t,e){if(t){if("string"==typeof t)return pt(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?pt(t,e):void 0}}function pt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var dt,vt,yt=-1;function mt(t){var e=(0,d.Bd)().t,r=ft((0,i.L4)(a.A.workflow_show),2),o=(r[0],r[1]),c=ft((0,n.useState)([]),2),u=c[0],l=c[1],f=ft((0,n.useState)([]),2),h=f[0],p=f[1],v=ft((0,n.useState)(!1),2),y=v[0],m=v[1],w=ft((0,n.useState)(void 0),2),g=w[0],_=w[1],b=ft((0,n.useState)([]),2),E=b[0],x=b[1],k=ft((0,n.useState)(-1),2),L=k[0],S=k[1],j=ft((0,n.useState)(10),2),A=j[0],P=(j[1],ft((0,n.useState)(0),2)),C=(P[0],P[1]),I=ft((0,n.useState)(0),2),W=I[0],X=I[1],D=ft((0,n.useState)(""),2),K=D[0],H=D[1],Y=ft((0,n.useState)(!1),2),U=Y[0],$=Y[1],B=[e("序号"),e("运行名称"),e("状态"),e("运行时长"),e("日期"),e("操作")],V=[e("名称"),e("状态"),e("cwd"),e("运行时长"),e("操作")],tt=function(){var t=st(ut().mark((function t(e){var r,n,o;return ut().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new nt._).page_num=null!=e?e:L,r.page_size=A,r.dir_path="".concat((0,s.GG)("file",(0,s.vX)())),t.next=6,M.ws.sendData(T.HK.workflow_get,r);case 6:if(n=t.sent){t.next=9;break}return t.abrupt("return");case 9:o=n.context,l(o.list.map((function(t){var e="string"==typeof t.meta?JSON.parse(t.meta):t.meta;return e.index=t.index,e}))),C(o.total),X((0,Q.gw)(o.total,A));case 13:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),it=function(){var t=st(ut().mark((function t(e){var r,n,o;return ut().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(r=new nt._).search_name=e,r.dir_path="".concat((0,s.GG)("file",(0,s.vX)())),$(!0),t.next=6,M.ws.sendData(T.HK.workflow_search_by_run_name,r);case 6:if(n=t.sent){t.next=9;break}return t.abrupt("return");case 9:o=n.context,l(o.list.map((function(t){var e="string"==typeof t.meta?JSON.parse(t.meta):t.meta;return e.index=t.index,e}))),C(o.total),X((0,Q.gw)(o.total,A)),S(0),$(!1);case 15:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),lt=function(){var t=st(ut().mark((function t(){var e;return ut().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=new G.Terminal({fontFamily:"Monaco, Menlo, Consolas, 'Courier New', monospace",theme:{background:"#FFFFFF",foreground:"#000000",cursor:"#000000",selectionBackground:"#a6d2ff"},cursorBlink:!0,cursorStyle:"bar",scrollback:1e3,scrollSensitivity:1,tabStopWidth:4,convertEol:!0}),R=e,_(e);case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();(0,n.useEffect)((function(){return m(!1),q=void 0,R=void 0,yt=-1,tt(),st(ut().mark((function t(){return ut().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:R&&(R.dispose(),R=null);case 1:case"end":return t.stop()}}),t)})))}),[]);var ht=function(){var t=st(ut().mark((function t(e){var r,n,o,i,a,c;return ut().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.is_running){t.next=2;break}return t.abrupt("return");case 2:return x([]),(r=new nt._).index=e.index,r.dir_path="".concat((0,s.GG)("file",(0,s.vX)())),t.next=8,M.ws.sendData(T.HK.workflow_get,r);case 8:n=t.sent,o=n.context,i="string"==typeof o.one_data.data?JSON.parse(o.one_data.data):o.one_data.data,a=i.success_list,c=i.fail_list,p([].concat(ct(c),ct(a)));case 14:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),pt=function(t,e,r){if(e){var o,i=at(null!=e?e:[]);try{for(i.s();!(o=i.n()).done;){var a,c,u,l=o.value,s=void 0,f=[];l["use-yml"]?(pt(f,void 0,l.use_job_children_list),s="".concat(l["use-yml"]," ;").concat(null!==(c=l.duration)&&void 0!==c?c:-1)):s="".concat(l.run," ;").concat(null!==(u=l.duration)&&void 0!==u?u:-1),s=n.createElement("div",null,n.createElement(et.fq,{success:void 0===l.code?void 0:0===l.code}),"$",s),t.push({name:s,children:f,extra_data:{code:l.code,context:null!==(a=l.success_message)&&void 0!==a?a:l.fail_message}})}}catch(t){i.e(t)}finally{i.f()}}else if(r){var h,p=at(null!=r?r:[]);try{for(p.s();!(h=p.n()).done;){var d=h.value,v=n.createElement("div",null,n.createElement(et.fq,{success:void 0===d.code?void 0:0===d.code}),"$",d.name);t.push({name:v,extra_data:{code:d.code,is_job:!0,job_data:d}})}}catch(t){p.e(t)}finally{p.f()}}},dt=function(){var t=st(ut().mark((function t(e){var r,n;return ut().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=e.steps,pt(n=[],null!=r?r:[]),x(n);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),vt=function(){var t=st(ut().mark((function t(e){return ut().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(R){t.next=3;break}return t.next=3,new Promise((function(t){q=t,m(!0),lt()}));case 3:e&&(R.reset(),R.write(e));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),mt=function(){var t=st(ut().mark((function t(e){var r,n,o;return ut().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(null==e||null===(r=e.extra_data)||void 0===r||!r.is_job){t.next=4;break}return t.next=3,dt(e.extra_data.job_data);case 3:return t.abrupt("return");case 4:if(null==e||null===(n=e.extra_data)||void 0===n||!n.context){t.next=8;break}vt(e.extra_data.context),t.next=11;break;case 8:if(null!=e&&e.extra_data.code){t.next=10;break}return t.abrupt("return");case 10:vt(null!==(o=e.extra_data.code)&&void 0!==o?o:"");case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(N.A,null,g&&n.createElement(F.rA,{icon:"print",title:"打印日志",onClick:function(){m(!y)}}),n.createElement(F.rA,{icon:"close",title:e("关闭"),onClick:function(){o(!1)}})),n.createElement(Z.jW,{isFull:!0,more:!0},n.createElement(Z.NN,null,n.createElement(Z.xh,null,n.createElement(Z.fI,null,n.createElement(Z.VP,null,n.createElement(et.uF,{self_title:n.createElement("span",{className:" div-row "},n.createElement("h2",null,e("历史记录"))),titleCom:n.createElement("div",{className:" div-row "},n.createElement(O.Sm,{disabled:U,value:K,placeholder:"搜索运行名称(支持正则)",handleInputChange:function(t){H(K)},handlerEnter:function(t){it(t)}})),rightBottomCom:n.createElement("span",{className:" div-row "},n.createElement("span",null,Math.abs(L),"/",W),n.createElement(O.Sm,{placeholder:"max page ".concat(W),handleInputChange:function(t){yt=parseInt(t)},handlerEnter:function(){if(yt<1||yt>W)(0,J.zN)("illegal page num");else{var t=0-yt;S(t),tt(t)}}}),n.createElement(F.rA,{icon:"navigate_before",onClick:function(){var t=L+1;t>-1?(0,J.zN)("max page num"):(S(t),tt(t))},title:"上一页"}),n.createElement(F.rA,{icon:"navigate_next",onClick:function(){var t=L-1;Math.abs(t)>W?(0,J.zN)("min page num"):(S(t),tt(t))},title:"下一页"}))},n.createElement(rt.X,{headers:B,rows:u.map((function(t,r){var o;return o=t.is_running?n.createElement("div",null,n.createElement(et.fq,null),e("正在运行")):n.createElement("div",null,n.createElement(et.fq,{success:t.is_success}),t.is_success?e("成功"):e("失败")),[n.createElement("p",null,t.index),n.createElement("p",{style:{wordWrap:"break-word"}},t["run-name"]),o,n.createElement("span",null,t.duration),n.createElement("span",null,t.timestamp),n.createElement("div",null,n.createElement(F.rA,{icon:"details",title:e("详情"),onClick:function(){ht(t)}}))]})),width:"10rem"}))),n.createElement(Z.VP,null,n.createElement(et.Zp,{title:e("Job")},n.createElement(rt.X,{headers:V,rows:h.map((function(t,r){return[n.createElement("p",null,t.name),n.createElement("div",null,n.createElement(et.fq,{success:void 0===t.code?void 0:0===t.code}),0===t.code?e("成功"):e("失败")),n.createElement(et.xP,null,t.cwd),n.createElement("span",null,t.duration),n.createElement("div",null,n.createElement(F.rA,{icon:"details",title:e("详情"),onClick:function(){dt(t)}}),(!!t.success_message||!!t.fail_message)&&n.createElement(F.rA,{icon:"print",title:e("日志"),onClick:function(){var e;vt(null!==(e=t.success_message)&&void 0!==e?e:t.fail_message)}}))]})),width:"10rem"})),n.createElement(et.Zp,{title:"Step"},n.createElement(ot.A,{list:E,click:function(t){mt(t)}}))))))),n.createElement("div",{style:{display:y?"":"none"}},n.createElement(z.$,{show:!0,terminal:g,init:function(){q&&(q(1),q=void 0)}})))}function wt(t){return wt="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},wt(t)}function gt(){gt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new P(n||[]);return o(a,"_invoke",{value:S(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",d="executing",v="completed",y={};function m(){}function w(){}function g(){}var _={};l(_,a,(function(){return this}));var b=Object.getPrototypeOf,E=b&&b(b(F([])));E&&E!==r&&n.call(E,a)&&(_=E);var x=g.prototype=m.prototype=Object.create(_);function k(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==wt(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:p,l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function F(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(wt(e)+" is not iterable")}return w.prototype=g,o(x,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:w,configurable:!0}),w.displayName=l(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,u,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},k(L.prototype),l(L.prototype,c,(function(){return this})),e.AsyncIterator=L,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new L(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(x),l(x,u,"Generator"),l(x,a,(function(){return this})),l(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=F,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:F(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function _t(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function bt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){_t(i,n,o,a,c,"next",t)}function c(t){_t(i,n,o,a,c,"throw",t)}a(void 0)}))}}function Et(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||xt(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 xt(t,e){if(t){if("string"==typeof t)return kt(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?kt(t,e):void 0}}function kt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function Lt(t){var e=(0,d.Bd)().t,r=Et((0,i.L4)(a.A.workflow_realtime_show),2),o=r[0],c=r[1],u=Et((0,n.useState)([]),2),l=(u[0],u[1],Et((0,n.useState)([]),2)),f=(l[0],l[1],Et((0,n.useState)(!1),2)),h=f[0],p=f[1],v=Et((0,n.useState)(void 0),2),y=v[0],m=v[1],w=Et((0,n.useState)([]),2),g=w[0],_=w[1],b=function(t){var e,r=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=xt(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}(t);try{for(r.s();!(e=r.n()).done;){var o,i,a,c=e.value;(null==c||null===(o=c.extra_data)||void 0===o?void 0:o.running_type)===nt.rl.success?c.name=n.createElement("div",null,n.createElement(et.fq,{success:!0}),c.name):(null==c||null===(i=c.extra_data)||void 0===i?void 0:i.running_type)===nt.rl.fail?c.name=n.createElement("div",null,n.createElement(et.fq,{success:!1}),c.name):(null==c||null===(a=c.extra_data)||void 0===a?void 0:a.running_type)===nt.rl.running&&(c.name=n.createElement("div",null,n.createElement(et.fq,{running:!0}),c.name)),c.children&&b(c.children)}}catch(t){r.e(t)}finally{r.f()}},E=function(){var t=bt(gt().mark((function t(e){var r;return gt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(r=new nt.v3).filename_path="".concat((0,s.GG)("file",(0,s.vX)())).concat(o.filename),M.ws.addMsg(T.HK.workflow_realtime_one_rsq,(function(t){if(t.context.list&&t.context.list.length>0){var e=t.context.list;b(e),_(e)}t.context.new_log&&k(t.context.new_log)})),M.ws.sendData(T.HK.workflow_realtime_one_req,r);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),x=function(){var t=bt(gt().mark((function t(){var e;return gt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e=new G.Terminal({fontFamily:"Monaco, Menlo, Consolas, 'Courier New', monospace",theme:{background:"#FFFFFF",foreground:"#000000",cursor:"#000000",selectionBackground:"#a6d2ff"},cursorBlink:!0,cursorStyle:"bar",scrollback:1e3,scrollSensitivity:1,tabStopWidth:4,convertEol:!0}),vt=e,m(e);case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();(0,n.useEffect)((function(){return p(!1),dt=void 0,vt=void 0,E(),bt(gt().mark((function t(){return gt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:M.ws.removeMsg(T.HK.workflow_realtime_one_rsq),vt&&(vt.dispose(),vt=null);case 2:case"end":return t.stop()}}),t)})))}),[]);var k=function(){var t=bt(gt().mark((function t(e){return gt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(vt){t.next=3;break}return t.next=3,new Promise((function(t){dt=t,p(!0),x()}));case 3:e&&vt.write(e);case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}();return n.createElement("div",null,n.createElement(N.A,null,y&&n.createElement(F.rA,{icon:"print",title:"打印日志",onClick:function(){p(!h)}}),n.createElement(F.rA,{icon:"close",title:e("关闭"),onClick:function(){c({open:!1})}})),n.createElement(Z.jW,{isFull:!0,more:!0},n.createElement(Z.NN,null,n.createElement(ot.A,{list:g,click:function(t){}}))),n.createElement("div",{style:{display:h?"":"none"}},n.createElement(z.$,{show:!0,terminal:y,init:function(){dt&&(dt(1),dt=void 0)}})))}var St=r(3430),Ot=r(2458),jt=r(3496);function At(t){return At="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},At(t)}function Pt(){return Pt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Pt.apply(null,arguments)}function Ft(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Nt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ft(Object(r),!0).forEach((function(e){Ct(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ft(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function Ct(t,e,r){return(e=function(t){var e=function(t){if("object"!=At(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=At(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==At(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function It(){It=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new P(n||[]);return o(a,"_invoke",{value:S(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",d="executing",v="completed",y={};function m(){}function w(){}function g(){}var _={};l(_,a,(function(){return this}));var b=Object.getPrototypeOf,E=b&&b(b(F([])));E&&E!==r&&n.call(E,a)&&(_=E);var x=g.prototype=m.prototype=Object.create(_);function k(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function L(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==At(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:p,l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function P(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function F(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(At(e)+" is not iterable")}return w.prototype=g,o(x,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:w,configurable:!0}),w.displayName=l(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,u,"GeneratorFunction")),t.prototype=Object.create(x),t},e.awrap=function(t){return{__await:t}},k(L.prototype),l(L.prototype,c,(function(){return this})),e.AsyncIterator=L,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new L(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(x),l(x,u,"Generator"),l(x,a,(function(){return this})),l(x,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=F,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:F(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function Gt(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=Wt(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){c=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function Tt(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function Mt(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){Tt(i,n,o,a,c,"next",t)}function c(t){Tt(i,n,o,a,c,"throw",t)}a(void 0)}))}}function zt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||Wt(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Wt(t,e){if(t){if("string"==typeof t)return Xt(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Xt(t,e):void 0}}function Xt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}var Dt,Kt=Object.values(St.UG),Ht=280,Yt={};function Ut(){var t,e,r=zt((0,i.L4)(a.A.editorSetting),2),f=(r[0],r[1]),m=zt((0,i.L4)(a.A.file_preview),2),w=(m[0],m[1]),g=(0,d.Bd)().t,_=(0,n.useRef)(null),b=(0,c.zy)(),E=(0,c.Zp)(),x=(0,v.MH)().check_user_auth,k=zt((0,i.L4)(a.A.nowFileList),2),S=k[0],j=k[1],A=zt((0,i.L4)(a.A.uploadFiles),2),G=(A[0],A[1]),z=zt((0,i.L4)(a.A.showPrompt),2),W=(z[0],z[1]),X=zt((0,i.L4)(a.A.selectedFileList),2),D=X[0],K=(X[1],zt((0,i.L4)(a.A.copyedFileList),2)),H=K[0],Y=K[1],U=zt((0,i.L4)(a.A.enterKey),2),$=(U[0],U[1]),q=zt((0,i.L4)(a.A.cutedFileList),2),R=q[0],rt=q[1],ot=zt((0,i.L4)(a.A.selectedFileList),2),it=(ot[0],ot[1]),at=zt((0,i.L4)(a.A.clickFileList),2),ct=(at[0],at[1]),ut=zt((0,i.L4)(a.A.fileShellShow),2),lt=ut[0],st=ut[1],ft=zt((0,i.L4)(a.A.file_root_list),2),ht=ft[0],pt=(ft[1],zt((0,i.L4)(a.A.file_root_index),2)),dt=pt[0],vt=pt[1],yt=zt((0,n.useState)(void 0),2),wt=yt[0],gt=yt[1],_t=zt((0,n.useState)(""),2),bt=_t[0],Et=_t[1],xt=zt((0,i.L4)(a.A.workflow_show),2),kt=xt[0],At=xt[1],Ft=zt((0,i.L4)(a.A.workflow_realtime_show),2),Ct=Ft[0],Tt=(Ft[1],zt((0,n.useState)(!1),2)),Wt=Tt[0],Xt=Tt[1],Ut=(0,n.useContext)(V.F).reloadUserInfo,$t=(0,n.useContext)(V.F).initUserInfo,Bt=zt((0,i.L4)(a.A.user_base_info),2),qt=Bt[0],Rt=(Bt[1],(0,v.kZ)().click_file),Zt=zt((0,i.L4)(a.A.prompt_card),2),Jt=(Zt[0],Zt[1]),Vt=(0,v.hg)().file_is_running,Qt=zt((0,i.L4)(a.A.to_running_files),2),te=(Qt[0],Qt[1]),ee=zt((0,i.L4)(a.A.router_jump),2),re=(ee[0],ee[1]),ne=function(){var t=Mt(It().mark((function t(){var e;return It().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(e=new nt.Nd).dir_path="".concat((0,s.GG)("file",(0,s.vX)())),M.ws.addMsg(T.HK.workflow_realtime,(function(t){var e,r=t.context,n=Gt(r.sucess_file_list);try{for(n.s();!(e=n.n()).done;){var o=e.value;o.endsWith(".workflow.yml")?(0,J.LW)("".concat(o.slice(0,-13)," done!")):o.endsWith(".act")&&(0,J.LW)("".concat(o.slice(0,-4)," done!"))}}catch(t){n.e(t)}finally{n.f()}var i,a=Gt(r.failed_file_list);try{for(a.s();!(i=a.n()).done;){var c=i.value;c.endsWith(".workflow.yml")?(0,J.zN)("".concat(c.slice(0,-13)," failed!")):c.endsWith(".act")&&(0,J.zN)("".concat(c.slice(0,-4)," failed!"))}}catch(t){a.e(t)}finally{a.f()}te(new Set(r.running_file_list))})),t.next=5,M.ws.sendData(T.HK.workflow_realtime,e);case 5:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),oe=function(){var t=Mt(It().mark((function t(e){var r,n,o,i,a,c,f,h,p,d,v,y;return It().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=e?encodeURIComponent(e)+"?is_sys_path=1":encodeURIComponent((0,s.GG)("file",(0,s.vX)())),t.next=3,l.$M.get(e);case 3:if((o=t.sent).code!==I.m.PreFile){t.next=7;break}return Rt({name:o.message,context:o.data,opt_shell:!0}),t.abrupt("return");case 7:if(o.code===I.m.Sucess){t.next=10;break}return o.message&&(0,J.zN)(o.message),t.abrupt("return");case 10:i=o.data,t.t0=qt.user_data.dir_show_type,t.next=t.t0===St.t8.size_max_min||t.t0===St.t8.size_min_max?14:t.t0===St.t8.time_minx_max||t.t0===St.t8.time_max_min?18:t.t0===St.t8.name?22:24;break;case 14:return a=qt.user_data.dir_show_type===St.t8.size_min_max,(0,u.di)(i.files,(function(t){return t.size}),a),(0,u.di)(i.folders,(function(t){return t.size}),a),t.abrupt("break",25);case 18:return c=qt.user_data.dir_show_type===St.t8.time_minx_max,(0,u.di)(i.files,(function(t){return t.mtime}),c),(0,u.di)(i.folders,(function(t){return t.mtime}),c),t.abrupt("break",25);case 22:return(0,u.di)(i.folders,(function(t){return t.name})),t.abrupt("break",25);case 24:return t.abrupt("break",25);case 25:f=!1,h=Gt(null!==(r=i.files)&&void 0!==r?r:[]);try{for(h.s();!(p=h.n()).done;)(d=p.value).origin_size=d.size,d.size=(0,Q.v7)(d.size),d.name.endsWith("workflow.yml")&&!f&&(f=!0,Promise.resolve().then((function(){ne()})))}catch(t){h.e(t)}finally{h.f()}if(void 0===i.relative_user_path){t.next=32;break}return(i.relative_user_path.startsWith("\\")||i.relative_user_path.startsWith("/"))&&(i.relative_user_path=i.relative_user_path.slice(1)),E(i.relative_user_path),t.abrupt("return");case 32:v=Gt(null!==(n=i.folders)&&void 0!==n?n:[]);try{for(v.s();!(y=v.n()).done;)y.value.name===nt.SB&&(Xt(!0),f||Promise.resolve().then((function(){ne()})))}catch(t){v.e(t)}finally{v.f()}j(o.data),Dt=o.data;case 36:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),ie=function(){var t=Math.floor(document.querySelector("main").offsetWidth/Ht);0===t&&(t=1),gt("calc(".concat(100/t,"% - 1em)"))};(0,n.useEffect)((function(){var t=function(){var t=Mt(It().mark((function t(){return It().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,oe();case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();t(),f({open:!1}),w({open:!1}),Xt(!1),Yt={}}),[b]),(0,n.useEffect)((function(){return Mt(It().mark((function t(){return It().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:te(new Set);case 1:case"end":return t.stop()}}),t)})))}),[]);var ae=function(){var t=Mt(It().mark((function t(e){var r,n,o,i;return It().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.preventDefault(),r=e.dataTransfer,n=e.target,!(r.files.length<=0)){t.next=5;break}return t.abrupt("return");case 5:for(o=0;o<5;o++)null===n||n.classList.contains("item")||(n=n.parentElement);return t.next=8,(0,C.T)(r);case 8:i=t.sent,G(i),W({show:!0,type:h.PromptEnum.FilesUpload,overlay:!1,data:{}});case 11:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),ce=function(t){t.preventDefault()};function ue(){return(ue=Mt(It().mark((function t(){var e,r,n;return It().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=(0,u.jH)(Kt,null!==(e=null==qt||null===(r=qt.user_data)||void 0===r?void 0:r.file_list_show_type)&&void 0!==e?e:""),t.next=3,l.wm.post(jt.s.user_save_user_file_list_show_type,{type:n});case 3:$t();case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function le(t){(0,J.LW)(t)}(0,n.useEffect)((function(){var t=_.current.ownerDocument;return t.addEventListener("dragover",ce),t.addEventListener("drop",ae),ie(),window.addEventListener("resize",ie),function(){t.removeEventListener("dragover",ce),t.removeEventListener("drop",ae),window.removeEventListener("resize",ie),lt.show&&st({show:!1,path:""})}}),[]);var se=function(){var t=Mt(It().mark((function t(e){return It().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return vt(e),t.next=3,l.$M.post("base_switch",{root_index:e});case 3:return t.next=5,Ut();case 5:E("/file/"),it([]),ct([]);case 8:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),fe=function(t){Jt({open:!0,title:"信息",context_div:n.createElement("div",null,n.createElement(Z.Yh,{left:g("挂载位置磁盘"),right:null==t?void 0:t.total_size}),n.createElement(Z.Yh,{left:"".concat(g("磁盘剩余")),right:null==t?void 0:t.left_size}),n.createElement(Z.Yh,{left:"".concat(g("文件系统")),right:null==t?void 0:t.fs_type}),n.createElement(Z.Yh,{left:"".concat(g("文件夹数")),right:S.folders.length}),n.createElement(Z.Yh,{left:"".concat(g("文件数")),right:S.files.length}),n.createElement(Z.Yh,{left:"".concat(g("当前位置")),right:n.createElement(et.xP,{context:null==t?void 0:t.now_absolute_path})}))})},he=function(){var t=Mt(It().mark((function t(){var e,r;return It().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Yt.now_absolute_path){t.next=8;break}return M.ws.addMsg(T.HK.file_info,(function(t){var r=t.context;e&&(Yt=Nt(Nt({},Yt),r),M.ws.removeMsg(T.HK.file_info),fe(Yt))})),t.next=4,M.ws.sendData(T.HK.file_info,{type:o.Iw.folder,path:(0,s.GG)("file",(0,s.vX)())});case 4:r=t.sent,e=r.context,fe(Yt=e);case 8:fe(Yt);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),pe=zt((0,n.useState)(!1),2),de=pe[0],ve=pe[1];(0,n.useEffect)((function(){var t=function(t){if(de)if(t.ctrlKey)if("a"===t.key||"A"===t.key){for(var e=S.files.length,r=S.folders.length,n=[],o=0;o<e+r;o++)n.push(o);it(n)}else $("ctrl");else"Escape"===t.key?it([]):"Shift"===t.key&&$("shift")},e=function(t){t.ctrlKey||$("")};return window.addEventListener("keydown",t),window.addEventListener("keyup",e),function(){window.removeEventListener("keydown",t),window.removeEventListener("keyup",e)}}),[S,de]);var ye=function(t){t.target===t.currentTarget&&it([])};return n.createElement("div",{className:"not-select-div"},n.createElement(N.A,{left_children:n.createElement(O.$Z,{handleEnterPress:function(){var t,e;if(Dt){it([]),ct([]);var r,n=[],o=[],i=Gt(null!==(t=Dt.files)&&void 0!==t?t:[]);try{for(i.s();!(r=i.n()).done;){var a=r.value;a.name.includes(bt)&&n.push(a)}}catch(t){i.e(t)}finally{i.f()}var c,u=Gt(null!==(e=Dt.folders)&&void 0!==e?e:[]);try{for(u.s();!(c=u.n()).done;){var l=c.value;l.name.includes(bt)&&o.push(l)}}catch(t){u.e(t)}finally{u.f()}j({files:n,folders:o})}},placeholder:g("搜索当前目录"),icon:"search",value:"",handleInputChange:function(t){Et(t)},max_width:"25em"})},D.length>0&&n.createElement(F.rA,{icon:"delete",title:g("删除"),onClick:function(){W({show:!0,type:h.PromptEnum.FilesDelete,overlay:!0,data:{}})}}),D.length>0&&n.createElement(F.rA,{icon:"content_copy",title:g("复制"),onClick:function(){var t=(0,y.i)(S,D);Y(t.map((function(t){return(0,y.O)(t.name)}))),rt([]),le("已复制")}}),D.length>0&&n.createElement(F.rA,{icon:"content_cut",title:g("剪切"),onClick:function(){var t=(0,y.i)(S,D);rt(t.map((function(t){return(0,y.O)(t.name)}))),Y([]),le("已剪切")}}),(H.length>0||R.length>0)&&n.createElement(F.rA,{onClick:function(){W({show:!0,type:h.PromptEnum.Confirm,overlay:!0,data:{}})},icon:"content_paste",title:g("粘贴到此处"),tip:H.length+R.length}),D.length>0&&n.createElement(F.rA,{icon:"download",title:g("下载"),onClick:function(){for(var t=(0,y.i)(S,D),e=0;e<t.length;e++){var r=t[e];t[e]=encodeURIComponent((0,y.O)(r.name))}var n=l.$M.getDownloadUrl(t);window.open(n)}}),D.length>0&&n.createElement(F.rA,{icon:"compress",title:g("压缩"),onClick:function(){for(var t=(0,y.i)(S,D),e=0;e<t.length;e++){var r=t[e];t[e]=(0,y.O)(r.name)}t&&0!==t.length?W({show:!0,type:h.PromptEnum.Compress,overlay:!0,data:{files:t}}):(0,J.zN)("没有选中")}}),1===D.length&&n.createElement(F.rA,{icon:"edit_attributes",title:g("重命名"),onClick:function(){W({show:!0,type:h.PromptEnum.FileRename,overlay:!0,data:{}})}}),Wt&&n.createElement(F.rA,{icon:"api",title:"workflow",onClick:function(){At(!kt)}}),n.createElement(F.rA,{icon:"terminal",title:"shell",onClick:function(){lt.show?st({show:!1,path:""}):st({show:!0,path:(0,s.GG)("file",(0,s.vX)())})}}),n.createElement(F.rA,{icon:"grid_view",title:g("切换样式"),onClick:function(){return ue.apply(this,arguments)}}),n.createElement(F.rA,{icon:"create_new_folder",title:g("创建文件夹"),onClick:function(){W({show:!0,type:h.PromptEnum.DirNew,overlay:!0,data:{dir:(0,s.GG)("file",(0,s.vX)())}})}}),n.createElement(F.rA,{icon:"note_add",title:g("创建文本文件"),onClick:function(){W({show:!0,type:h.PromptEnum.FileNew,overlay:!0,data:{dir:(0,s.GG)("file",(0,s.vX)())}})}}),n.createElement(F.rA,{icon:"upload_file",title:"上传",onClick:function(){W({show:!0,type:h.PromptEnum.UploadFile,overlay:!0,data:{call:function(t){var e,r=null===(e=t.currentTarget)||void 0===e?void 0:e.files;if(r){for(var n=!!r[0].webkitRelativePath,o=[],i=new Set,a=0;a<r.length;a++){var c=r[a],u=n?c.webkitRelativePath:"".concat(c.webkitRelativePath).concat(c.name);c.fullPath=u,n&&i.add((0,tt.S)(u)),o.push(c)}var l=[];if(n){var s,f=Gt(i);try{for(f.s();!(s=f.n()).done;){var p=s.value;l.push({isDir:!0,fullPath:p,name:p})}}catch(t){f.e(t)}finally{f.f()}}l.push.apply(l,o),G(l),W({show:!0,type:h.PromptEnum.FilesUpload,overlay:!1,data:{}})}}}})}}),n.createElement(F.rA,{icon:"info",title:g("信息"),onClick:he}),n.createElement(Z.EF,{title:g("切换目录"),items:ht,click:function(t){se(t)},pre_value:dt})),n.createElement(P,{baseRoute:"file",clickFun:function(){it([]),ct([])},input_path_enter:function(t){(0,Ot.Z1)(t)?oe(t):E((0,Ot.Jn)((0,s.vX)(),t)),it([]),ct([]),j({files:[],folders:[]})}}),n.createElement("div",{onContextMenu:function(t){t.preventDefault(),t.stopPropagation();var e=new p.i;e.x=t.clientX,e.y=t.clientY,e.type=o.Iw.directory;var r=[{r:n.createElement("span",{style:{color:qt.user_data.dir_show_type===St.t8.time_minx_max?"green":void 0}},"时间顺序"),v:St.t8.time_minx_max},{r:n.createElement("span",{style:{color:qt.user_data.dir_show_type===St.t8.time_max_min?"green":void 0}},"时间逆序"),v:St.t8.time_max_min}],i=[{r:n.createElement("span",{style:{color:qt.user_data.dir_show_type===St.t8.size_min_max?"green":void 0}},"大小顺序"),v:St.t8.size_min_max},{r:n.createElement("span",{style:{color:qt.user_data.dir_show_type===St.t8.size_max_min?"green":void 0}},"大小逆序"),v:St.t8.size_max_min}],a=[{r:"文件排序",v:"",items:[{r:n.createElement("span",{style:{color:qt.user_data.dir_show_type?void 0:"green"}},"系统默认"),v:St.t8.defualt},{r:n.createElement("span",{style:{color:qt.user_data.dir_show_type===St.t8.name?"green":void 0}},"名字"),v:St.t8.name},{r:n.createElement("span",{style:{color:qt.user_data.dir_show_type===St.t8.time_minx_max||qt.user_data.dir_show_type===St.t8.time_max_min?"green":void 0}},"修改时间"),v:!1,items:r},{r:n.createElement("span",{style:{color:qt.user_data.dir_show_type===St.t8.size_min_max||qt.user_data.dir_show_type===St.t8.size_max_min?"green":void 0}},"文件大小"),v:!1,items:i}]}];x(St.oV.code_resource)&&a.push({r:"添加http资源根目录",v:"code_resource"}),e.items=a,e.textClick=function(){var t=Mt(It().mark((function t(e){var r;return It().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!1!==e){t.next=2;break}return t.abrupt("return");case 2:if("code_resource"!==e){t.next=10;break}return t.next=5,M.ws.sendData(T.HK.file_info,{path:(0,s.GG)("file",(0,s.vX)())});case 5:return r=t.sent,re({page_self_router_api_data:["",r.context.now_absolute_path]}),W({data:void 0,overlay:!1,type:"",show:!1}),E("/setting/customer_router/"),t.abrupt("return");case 10:return t.next=12,l.wm.post(jt.s.user_save_user_file_list_show_type,{type:e,is_dir_list_type:!0});case 12:return t.next=14,$t();case 14:W({data:void 0,overlay:!1,type:"",show:!1}),E((0,s.vX)());case 16:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),W({show:!0,type:h.PromptEnum.FileMenu,overlay:!1,data:e})},id:"listing",style:{paddingBottom:"10rem"},className:"mosaic file-icons ".concat(null!==(t=null==qt||null===(e=qt.user_data)||void 0===e?void 0:e.file_list_show_type)&&void 0!==t?t:""),ref:_,onMouseEnter:function(){ve(!0)},onMouseLeave:function(){ve(!1)}},S.folders&&S.folders.length>0&&n.createElement("h2",null,g("文件夹")),S.folders&&n.createElement("div",{onClick:ye},S.folders.map((function(t,e){return n.createElement(L,Pt({itemWidth:wt,index:e,key:e},t))}))),S.files&&S.files.length>0&&n.createElement("h2",{onClick:ye},g("文件")),S.files&&n.createElement("div",{onClick:ye},S.files.map((function(t,e){return n.createElement(L,Pt({icon:Vt(t.name)?"refresh":void 0,itemWidth:wt,index:e+S.folders.length,key:e},t))})))),n.createElement(B,null),kt&&n.createElement(mt,null),Ct.open&&n.createElement(Lt,null))}},8062:(t,e,r)=>{r.d(e,{A:()=>c});var n=r(6540);function o(){return o=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},o.apply(null,arguments)}function i(t){return n.createElement("div",{className:"black-tip",onClick:function(){t.click&&t.click(t)},onContextMenu:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),t.onContextMenu&&t.onContextMenu(e,t)}},t.name)}var a=function(t){return n.createElement("li",null,t.click?n.createElement(i,o({},t.node,{name:t.render?t.render(t.node):t.node.name,click:t.click,onContextMenu:t.onContextMenu})):n.createElement("div",null,t.render?t.render(t.node):t.node.name),t.node.children&&t.node.children.length>0&&n.createElement("ul",null,t.node.children.map((function(e,r){return n.createElement(a,{key:r,node:e,click:t.click,onContextMenu:t.onContextMenu,render:t.render})}))))};const c=function(t){return n.createElement("div",{className:"card-tree-view"},n.createElement("ul",null,t.list&&t.list.map((function(e,r){return n.createElement(a,{key:r,node:e,click:t.click,onContextMenu:t.onContextMenu,render:t.render})}))))}}}]);
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see 674.bundle.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[674],{2674:(t,e,r)=>{r.r(e),r.d(e,{default:()=>F});var n=r(6540),o=r(6417),i=r(7444),a=r(5997),c=r(7952),u=r(7022);function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function s(){s=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof w?e:w,a=Object.create(i.prototype),c=new C(n||[]);return o(a,"_invoke",{value:j(t,r,c)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var y="suspendedStart",v="suspendedYield",d="executing",m="completed",g={};function w(){}function b(){}function x(){}var E={};f(E,a,(function(){return this}));var _=Object.getPrototypeOf,L=_&&_(_(G([])));L&&L!==r&&n.call(L,a)&&(E=L);var k=x.prototype=w.prototype=Object.create(E);function S(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,a,c){var u=p(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==l(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function j(e,r,n){var o=y;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=P(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=p(e,r,n);if("normal"===l.type){if(o=n.done?m:v,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function G(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(l(e)+" is not iterable")}return b.prototype=x,o(k,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:b,configurable:!0}),b.displayName=f(x,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,u,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},S(O.prototype),f(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new O(h(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(k),f(k,u,"Generator"),f(k,a,(function(){return this})),f(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=G,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:G(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function f(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function h(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){f(i,n,o,a,c,"next",t)}function c(t){f(i,n,o,a,c,"throw",t)}a(void 0)}))}}function p(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return y(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function v(t){var e=p((0,n.useState)(!1),2),r=e[0],o=e[1],i=p((0,n.useState)([]),2),a=i[0],c=i[1],l=function(t){c(t)},f=function(){var e=h(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("folder"!==t.type){e.next=7;break}if(r||!t.click||a){e.next=4;break}return e.next=4,t.click(t,l,t.pre_path);case 4:o(!r),e.next=10;break;case 7:if(!t.click){e.next=10;break}return e.next=10,t.click(t,l,t.pre_path);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),y=function(){var e=h(s().mark((function e(){var r,n=arguments;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.length>0&&void 0!==n[0]&&n[0],"folder"!==t.type||r){e.next=6;break}return e.next=4,t.click(t,l,t.pre_path);case 4:e.next=7;break;case 6:t.fatherNowToggleExpansion&&t.fatherNowToggleExpansion();case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,n.useEffect)((function(){c(t.children)}),[t.children]),n.createElement("div",{className:"studio-item"},n.createElement("div",{onClick:f,onContextMenu:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),t.handleContextMenu&&t.handleContextMenu(e,t.name,t.pre_path,t.type===u.Iw.folder,y)},className:"studio-item-title"},n.createElement("i",{className:"material-icons studio-item-title-tag"},"file"==t.type?"":r?"arrow_drop_down":"arrow_right"),n.createElement("i",{className:"material-icons","file-type":t.type},"folder"===t.type?"folder":"text_snippet"),n.createElement("span",{className:"studio-item-name"},t.name)),r&&a&&n.createElement("div",{style:{marginLeft:20}},a.map((function(e,r){return n.createElement(n.Fragment,{key:r},n.createElement(v,{type:e.type,click:t.click,name:e.name,key:r,children:e.children,pre_path:"".concat(t.pre_path).concat(e.name).concat(e.type===u.Iw.folder?"/":""),handleContextMenu:t.handleContextMenu,fatherNowToggleExpansion:y}))}))))}function d(t){return n.createElement("div",null,t.list.map((function(e,r){return n.createElement(v,{pre_path:"".concat(t.pre_path).concat(e.name).concat(e.type===u.Iw.folder?"/":""),key:r,name:e.name,type:e.type,handleContextMenu:t.handleContextMenu,fatherNowToggleExpansion:t.fatherNowToggleExpansion,children:e.children,click:t.click})})))}var m=r(6007),g=r(4289),w=r(3459),b=r(8247),x=r(2042),E=r(2543),_=r.n(E),L=r(4251),k=r(2869),S=r(2389),O=r(4091);function j(t){return j="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},j(t)}function P(){P=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new C(n||[]);return o(a,"_invoke",{value:S(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",v="completed",d={};function m(){}function g(){}function w(){}var b={};l(b,a,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(G([])));E&&E!==r&&n.call(E,a)&&(b=E);var _=w.prototype=m.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==j(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:p,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function G(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(j(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},L(k.prototype),l(k.prototype,c,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new k(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(_),l(_,u,"Generator"),l(_,a,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=G,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:G(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function N(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function A(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){N(i,n,o,a,c,"next",t)}function c(t){N(i,n,o,a,c,"throw",t)}a(void 0)}))}}function C(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return G(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?G(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function F(t){var e=C((0,i.L4)(o.A.studio),2),r=e[0],l=e[1],s=C((0,n.useState)([]),2),f=s[0],h=s[1],p=C((0,n.useState)(""),2),y=p[0],v=p[1],E=C((0,n.useState)(""),2),j=(E[0],E[1]),N=C((0,n.useState)(!1),2),G=(N[0],N[1],C((0,n.useState)({path:"",name:""}),2)),F=G[0],T=G[1],I=C((0,n.useState)(""),2),M=I[0],D=I[1],K=C((0,i.L4)(o.A.confirm),2),R=(K[0],K[1]),U=C((0,n.useState)(!1),2),Y=U[0],$=U[1],z=C((0,i.L4)(o.A.fileShellShow),2),B=z[0],W=z[1],X=C((0,i.L4)(o.A.file_shell_hidden),2),q=X[0],H=X[1],J=(0,n.useRef)(null),Q=(0,n.useRef)(null),V=C((0,n.useState)(!1),2),Z=V[0],tt=V[1],et=C((0,n.useState)(16),2),rt=et[0],nt=et[1],ot=C((0,i.L4)(o.A.showPrompt),2),it=(ot[0],ot[1]),at=(0,S.Bd)().t,ct=function(){var t=A(P().mark((function t(){var e,n;return P().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=(0,g.GG)("file",r.folder_path),v(e),t.next=4,m.$M.post("studio/get/item",{path:e});case 4:(n=t.sent).code===w.m.Sucess&&h(n.data.list);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();(0,n.useEffect)((function(){j(""),T({}),$(!1),r.folder_path&&ct()}),[r]);var ut=function(){var t=A(P().mark((function t(e,r){var n;return P().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,m.$M.get("".concat(encodeURIComponent(r)));case 2:if((n=t.sent).code!==w.m.File_Max){t.next=6;break}return(0,x.zN)("超过20MB"),t.abrupt("return");case 6:j(n.data),b.xK.set_value_temp(n.data),T({path:r,name:e}),D(r);case 10:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),lt=function(){var t=A(P().mark((function t(e,r,n){var o;return P().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("folder"!==e.type){t.next=7;break}return t.next=3,m.$M.post("studio/get/item",{path:"".concat(n)});case 3:(o=t.sent).code===w.m.Sucess&&r(o.data.list),t.next=12;break;case 7:if(!Y){t.next=10;break}return R({open:!0,handle:function(){ut(e.name,n),R({open:!1,handle:null}),$(!1)},title:"确定不保存就切换吗?"}),t.abrupt("return");case 10:return t.next=12,ut(e.name,n);case 12:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}();function st(){return ft.apply(this,arguments)}function ft(){return(ft=A(P().mark((function t(){var e;return P().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Y){t.next=2;break}return t.abrupt("return");case 2:return e={context:b.xK.get_editor_value()},t.next=5,m.$M.post("save/".concat(encodeURIComponent(M)),e);case 5:0===t.sent.code&&$(!1);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var ht=function(t){t.ctrlKey&&"s"===t.key&&(t.preventDefault(),Y&&st())};(0,n.useEffect)((function(){return document.addEventListener("keydown",ht),function(){document.removeEventListener("keydown",ht)}}),[Y]);var pt=(0,n.useCallback)(_().throttle((function(t){var e=parseFloat(getComputedStyle(Q.current).fontSize),r=window.innerWidth/e-4,n=t.clientX/e,o=2.25+J.current.offsetWidth/e;n<=r&&n>=o&&nt(parseFloat(n.toFixed(2)))}),32),[]),yt=function(){tt(!1),Q.current.removeEventListener("pointermove",pt)};if(r.folder_path){var vt=[{r:at("创建文件"),v:"创建文件"},{r:at("创建目录"),v:"创建目录"},{r:at("重命名"),v:"重命名"},{r:at("删除"),v:"删除"}],dt=[{r:at("重命名"),v:"重命名"},{r:at("删除"),v:"删除"}],mt=function(t,e,r,n,o){t.preventDefault();var i=new L.i;i.path=r,i.filename=e,i.x=t.clientX,i.y=t.clientY,i.items=n?vt:dt,o===ct&&(i.items=i.items.slice(0,2)),i.type=n?u.Iw.studio_folder:u.Iw.studio_file;var a=function(t){o(t)};i.textClick=function(t){switch(t){case"创建文件":it({show:!0,type:k.PromptEnum.FileNew,overlay:!0,data:{dir:r,call:a}});break;case"创建目录":it({show:!0,type:k.PromptEnum.DirNew,overlay:!0,data:{dir:r,call:a}});break;case"删除":if(Y&&(F.path===r||F.path.includes(r))){it({show:!0,type:k.PromptEnum.FilesDelete,overlay:!0,data:{path:r,call:function(){a(n),$(!1),T({}),j(""),b.xK.set_value_temp("")}}});break}it({show:!0,type:k.PromptEnum.FilesDelete,overlay:!0,data:{path:r,call:n?function(){a(!0)}:a}});break;case"重命名":it({show:!0,type:k.PromptEnum.FileRename,overlay:!0,data:{path:r,dir:(0,g.Yp)(r),call:function(){a(!0)},filename:e}})}},it({show:!0,type:k.PromptEnum.FileMenu,overlay:!1,data:i})};return n.createElement("div",{className:"studio"},n.createElement(c.A,{ignore_tags:!0,left_children:[n.createElement(a.rA,{key:1,title:"取消",icon:"close",onClick:function(){l({}),W({show:!1,path:""}),H(void 0)}}),n.createElement("title",{key:2},F.name)]},n.createElement(a.rA,{icon:"terminal",title:"shell",onClick:function(){void 0===q?B.show?W({show:!1,path:""}):(W({show:!0,path:(0,g.GG)("file",r.folder_path)}),H(!1)):H(!q)}}),Y&&n.createElement(a.rA,{title:"保存",icon:"save",onClick:st})),n.createElement("div",{className:"studio-body",ref:Q},n.createElement("div",{className:"studio-nav",style:{width:"".concat(rt-1,"em")},onContextMenu:function(t){mt(t,F.name,(0,g.GG)("file",r.folder_path),!0,ct)}},n.createElement(d,{pre_path:y,list:f,click:lt,handleContextMenu:mt,fatherNowToggleExpansion:ct})),n.createElement("div",{className:"studio__divider",ref:J,onPointerDown:function(){tt(!0),Q.current.addEventListener("pointermove",pt)},onPointerUp:yt}),Z&&n.createElement("div",{className:"shell__overlay",onPointerUp:yt}),n.createElement("div",{className:"studio-editor",key:F.path},F.name&&n.createElement(O.A,{name:F.name,on_change:function(){Y||$(!0)}}))))}}},4091:(t,e,r)=>{r.d(e,{A:()=>h});var n=r(6540),o=r(952),i=r.n(o),a=(r(2327),r(1766),r(4854),r(8),r(846),r(975),r(4286),r(766),r(1234),r(4522)),c=r.n(a),u=r(8247);function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function f(t,e,r){return(e=function(t){var e=function(t){if("object"!=l(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==l(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function h(t){var e=(0,n.useRef)(null);return(0,n.useEffect)((function(){var r,n,o=i().edit(e.current,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach((function(e){f(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({value:u.xK.get_value_temp(),showPrintMargin:!1,theme:"ace/theme/cloud9_day",mode:null!==(r=t.model)&&void 0!==r?r:c().getModeForPath(null!==(n=t.name)&&void 0!==n?n:"").mode,wrap:!1,highlightActiveLine:!1,fontSize:14},t.options));return o.setOptions({enableBasicAutocompletion:!0,enableSnippets:!0,enableLiveAutocompletion:!0}),o.container.addEventListener("wheel",(function(t){t.preventDefault()})),o.focus(),o.on("change",(function(e){t.on_change&&t.on_change()})),e.current=o,u.xK.set_editor_temp(o),function(){u.xK.set_editor_temp(null),o.destroy()}}),[]),n.createElement("div",{ref:e,style:{height:"100%",width:"100%"}})}r(47),i().config.set("basePath","https://gcore.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/")),i().config.set("modePath","https://gcore.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/")),i().config.set("themePath","https://gcore.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/")),i().config.set("workerPath","https://gcore.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/"))}}]);
2
+ "use strict";(self.webpackChunkfilecat=self.webpackChunkfilecat||[]).push([[674],{2674:(t,e,r)=>{r.r(e),r.d(e,{default:()=>F});var n=r(6540),o=r(6417),i=r(7444),a=r(5997),c=r(7952),u=r(7022);function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function s(){s=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof w?e:w,a=Object.create(i.prototype),c=new C(n||[]);return o(a,"_invoke",{value:j(t,r,c)}),a}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var y="suspendedStart",v="suspendedYield",d="executing",m="completed",g={};function w(){}function b(){}function x(){}var E={};f(E,a,(function(){return this}));var _=Object.getPrototypeOf,L=_&&_(_(G([])));L&&L!==r&&n.call(L,a)&&(E=L);var k=x.prototype=w.prototype=Object.create(E);function S(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function r(o,i,a,c){var u=p(t[o],t,i);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==l(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function j(e,r,n){var o=y;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=P(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===y)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=p(e,r,n);if("normal"===l.type){if(o=n.done?m:v,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function P(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=p(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function G(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(l(e)+" is not iterable")}return b.prototype=x,o(k,"constructor",{value:x,configurable:!0}),o(x,"constructor",{value:b,configurable:!0}),b.displayName=f(x,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,u,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},S(O.prototype),f(O.prototype,c,(function(){return this})),e.AsyncIterator=O,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new O(h(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(k),f(k,u,"Generator"),f(k,a,(function(){return this})),f(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=G,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:G(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function f(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function h(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){f(i,n,o,a,c,"next",t)}function c(t){f(i,n,o,a,c,"throw",t)}a(void 0)}))}}function p(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return y(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function v(t){var e=p((0,n.useState)(!1),2),r=e[0],o=e[1],i=p((0,n.useState)([]),2),a=i[0],c=i[1],l=function(t){c(t)},f=function(){var e=h(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("folder"!==t.type){e.next=7;break}if(r||!t.click||a){e.next=4;break}return e.next=4,t.click(t,l,t.pre_path);case 4:o(!r),e.next=10;break;case 7:if(!t.click){e.next=10;break}return e.next=10,t.click(t,l,t.pre_path);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),y=function(){var e=h(s().mark((function e(){var r,n=arguments;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.length>0&&void 0!==n[0]&&n[0],"folder"!==t.type||r){e.next=6;break}return e.next=4,t.click(t,l,t.pre_path);case 4:e.next=7;break;case 6:t.fatherNowToggleExpansion&&t.fatherNowToggleExpansion();case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,n.useEffect)((function(){c(t.children)}),[t.children]),n.createElement("div",{className:"studio-item"},n.createElement("div",{onClick:f,onContextMenu:function(e){e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),t.handleContextMenu&&t.handleContextMenu(e,t.name,t.pre_path,t.type===u.Iw.folder,y)},className:"studio-item-title"},n.createElement("i",{className:"material-icons studio-item-title-tag"},"file"==t.type?"":r?"arrow_drop_down":"arrow_right"),n.createElement("i",{className:"material-icons","file-type":t.type},"folder"===t.type?"folder":"text_snippet"),n.createElement("span",{className:"studio-item-name"},t.name)),r&&a&&n.createElement("div",{style:{marginLeft:20}},a.map((function(e,r){return n.createElement(n.Fragment,{key:r},n.createElement(v,{type:e.type,click:t.click,name:e.name,key:r,children:e.children,pre_path:"".concat(t.pre_path).concat(e.name).concat(e.type===u.Iw.folder?"/":""),handleContextMenu:t.handleContextMenu,fatherNowToggleExpansion:y}))}))))}function d(t){return n.createElement("div",null,t.list.map((function(e,r){return n.createElement(v,{pre_path:"".concat(t.pre_path).concat(e.name).concat(e.type===u.Iw.folder?"/":""),key:r,name:e.name,type:e.type,handleContextMenu:t.handleContextMenu,fatherNowToggleExpansion:t.fatherNowToggleExpansion,children:e.children,click:t.click})})))}var m=r(6007),g=r(4289),w=r(3459),b=r(8247),x=r(2042),E=r(2543),_=r.n(E),L=r(4251),k=r(7567),S=r(2389),O=r(4091);function j(t){return j="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},j(t)}function P(){P=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof m?e:m,a=Object.create(i.prototype),c=new C(n||[]);return o(a,"_invoke",{value:S(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",p="suspendedYield",y="executing",v="completed",d={};function m(){}function g(){}function w(){}var b={};l(b,a,(function(){return this}));var x=Object.getPrototypeOf,E=x&&x(x(G([])));E&&E!==r&&n.call(E,a)&&(b=E);var _=w.prototype=m.prototype=Object.create(b);function L(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==j(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function S(e,r,n){var o=h;return function(i,a){if(o===y)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=O(c,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:p,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function O(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function G(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(j(e)+" is not iterable")}return g.prototype=w,o(_,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,l(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},L(k.prototype),l(k.prototype,c,(function(){return this})),e.AsyncIterator=k,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new k(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},L(_),l(_,u,"Generator"),l(_,a,(function(){return this})),l(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=G,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(A),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:G(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function N(t,e,r,n,o,i,a){try{var c=t[i](a),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}function A(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(t){N(i,n,o,a,c,"next",t)}function c(t){N(i,n,o,a,c,"throw",t)}a(void 0)}))}}function C(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return G(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?G(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function F(t){var e=C((0,i.L4)(o.A.studio),2),r=e[0],l=e[1],s=C((0,n.useState)([]),2),f=s[0],h=s[1],p=C((0,n.useState)(""),2),y=p[0],v=p[1],E=C((0,n.useState)(""),2),j=(E[0],E[1]),N=C((0,n.useState)(!1),2),G=(N[0],N[1],C((0,n.useState)({path:"",name:""}),2)),F=G[0],T=G[1],I=C((0,n.useState)(""),2),M=I[0],D=I[1],K=C((0,i.L4)(o.A.confirm),2),R=(K[0],K[1]),U=C((0,n.useState)(!1),2),Y=U[0],$=U[1],z=C((0,i.L4)(o.A.fileShellShow),2),B=z[0],W=z[1],X=C((0,i.L4)(o.A.file_shell_hidden),2),q=X[0],H=X[1],J=(0,n.useRef)(null),Q=(0,n.useRef)(null),V=C((0,n.useState)(!1),2),Z=V[0],tt=V[1],et=C((0,n.useState)(16),2),rt=et[0],nt=et[1],ot=C((0,i.L4)(o.A.showPrompt),2),it=(ot[0],ot[1]),at=(0,S.Bd)().t,ct=function(){var t=A(P().mark((function t(){var e,n;return P().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=(0,g.GG)("file",r.folder_path),v(e),t.next=4,m.$M.post("studio/get/item",{path:e});case 4:(n=t.sent).code===w.m.Sucess&&h(n.data.list);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();(0,n.useEffect)((function(){j(""),T({}),$(!1),r.folder_path&&ct()}),[r]);var ut=function(){var t=A(P().mark((function t(e,r){var n;return P().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,m.$M.get("".concat(encodeURIComponent(r)));case 2:if((n=t.sent).code!==w.m.File_Max){t.next=6;break}return(0,x.zN)("超过20MB"),t.abrupt("return");case 6:j(n.data),b.xK.set_value_temp(n.data),T({path:r,name:e}),D(r);case 10:case"end":return t.stop()}}),t)})));return function(e,r){return t.apply(this,arguments)}}(),lt=function(){var t=A(P().mark((function t(e,r,n){var o;return P().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("folder"!==e.type){t.next=7;break}return t.next=3,m.$M.post("studio/get/item",{path:"".concat(n)});case 3:(o=t.sent).code===w.m.Sucess&&r(o.data.list),t.next=12;break;case 7:if(!Y){t.next=10;break}return R({open:!0,handle:function(){ut(e.name,n),R({open:!1,handle:null}),$(!1)},title:"确定不保存就切换吗?"}),t.abrupt("return");case 10:return t.next=12,ut(e.name,n);case 12:case"end":return t.stop()}}),t)})));return function(e,r,n){return t.apply(this,arguments)}}();function st(){return ft.apply(this,arguments)}function ft(){return(ft=A(P().mark((function t(){var e;return P().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(Y){t.next=2;break}return t.abrupt("return");case 2:return e={context:b.xK.get_editor_value()},t.next=5,m.$M.post("save/".concat(encodeURIComponent(M)),e);case 5:0===t.sent.code&&$(!1);case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var ht=function(t){t.ctrlKey&&"s"===t.key&&(t.preventDefault(),Y&&st())};(0,n.useEffect)((function(){return document.addEventListener("keydown",ht),function(){document.removeEventListener("keydown",ht)}}),[Y]);var pt=(0,n.useCallback)(_().throttle((function(t){var e=parseFloat(getComputedStyle(Q.current).fontSize),r=window.innerWidth/e-4,n=t.clientX/e,o=2.25+J.current.offsetWidth/e;n<=r&&n>=o&&nt(parseFloat(n.toFixed(2)))}),32),[]),yt=function(){tt(!1),Q.current.removeEventListener("pointermove",pt)};if(r.folder_path){var vt=[{r:at("创建文件"),v:"创建文件"},{r:at("创建目录"),v:"创建目录"},{r:at("重命名"),v:"重命名"},{r:at("删除"),v:"删除"}],dt=[{r:at("重命名"),v:"重命名"},{r:at("删除"),v:"删除"}],mt=function(t,e,r,n,o){t.preventDefault();var i=new L.i;i.path=r,i.filename=e,i.x=t.clientX,i.y=t.clientY,i.items=n?vt:dt,o===ct&&(i.items=i.items.slice(0,2)),i.type=n?u.Iw.studio_folder:u.Iw.studio_file;var a=function(t){o(t)};i.textClick=function(t){switch(t){case"创建文件":it({show:!0,type:k.PromptEnum.FileNew,overlay:!0,data:{dir:r,call:a}});break;case"创建目录":it({show:!0,type:k.PromptEnum.DirNew,overlay:!0,data:{dir:r,call:a}});break;case"删除":if(Y&&(F.path===r||F.path.includes(r))){it({show:!0,type:k.PromptEnum.FilesDelete,overlay:!0,data:{path:r,call:function(){a(n),$(!1),T({}),j(""),b.xK.set_value_temp("")}}});break}it({show:!0,type:k.PromptEnum.FilesDelete,overlay:!0,data:{path:r,call:n?function(){a(!0)}:a}});break;case"重命名":it({show:!0,type:k.PromptEnum.FileRename,overlay:!0,data:{path:r,dir:(0,g.Yp)(r),call:function(){a(!0)},filename:e}})}},it({show:!0,type:k.PromptEnum.FileMenu,overlay:!1,data:i})};return n.createElement("div",{className:"studio"},n.createElement(c.A,{ignore_tags:!0,left_children:[n.createElement(a.rA,{key:1,title:"取消",icon:"close",onClick:function(){l({}),W({show:!1,path:""}),H(void 0)}}),n.createElement("title",{key:2},F.name)]},n.createElement(a.rA,{icon:"terminal",title:"shell",onClick:function(){void 0===q?B.show?W({show:!1,path:""}):(W({show:!0,path:(0,g.GG)("file",r.folder_path)}),H(!1)):H(!q)}}),Y&&n.createElement(a.rA,{title:"保存",icon:"save",onClick:st})),n.createElement("div",{className:"studio-body",ref:Q},n.createElement("div",{className:"studio-nav",style:{width:"".concat(rt-1,"em")},onContextMenu:function(t){mt(t,F.name,(0,g.GG)("file",r.folder_path),!0,ct)}},n.createElement(d,{pre_path:y,list:f,click:lt,handleContextMenu:mt,fatherNowToggleExpansion:ct})),n.createElement("div",{className:"studio__divider",ref:J,onPointerDown:function(){tt(!0),Q.current.addEventListener("pointermove",pt)},onPointerUp:yt}),Z&&n.createElement("div",{className:"shell__overlay",onPointerUp:yt}),n.createElement("div",{className:"studio-editor",key:F.path},F.name&&n.createElement(O.A,{name:F.name,on_change:function(){Y||$(!0)}}))))}}},4091:(t,e,r)=>{r.d(e,{A:()=>h});var n=r(6540),o=r(952),i=r.n(o),a=(r(2327),r(1766),r(4854),r(8),r(846),r(975),r(4286),r(766),r(1234),r(4522)),c=r.n(a),u=r(8247);function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function f(t,e,r){return(e=function(t){var e=function(t){if("object"!=l(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==l(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function h(t){var e=(0,n.useRef)(null);return(0,n.useEffect)((function(){var r,n,o=i().edit(e.current,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach((function(e){f(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({value:u.xK.get_value_temp(),showPrintMargin:!1,theme:"ace/theme/cloud9_day",mode:null!==(r=t.model)&&void 0!==r?r:c().getModeForPath(null!==(n=t.name)&&void 0!==n?n:"").mode,wrap:!1,highlightActiveLine:!1,fontSize:14},t.options));return o.setOptions({enableBasicAutocompletion:!0,enableSnippets:!0,enableLiveAutocompletion:!0}),o.container.addEventListener("wheel",(function(t){t.preventDefault()})),o.focus(),o.on("change",(function(e){t.on_change&&t.on_change()})),e.current=o,u.xK.set_editor_temp(o),function(){u.xK.set_editor_temp(null),o.destroy()}}),[]),n.createElement("div",{ref:e,style:{height:"100%",width:"100%"}})}r(47),i().config.set("basePath","https://gcore.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/")),i().config.set("modePath","https://gcore.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/")),i().config.set("themePath","https://gcore.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/")),i().config.set("workerPath","https://gcore.jsdelivr.net/npm/ace-builds@".concat(o.version,"/src-min-noconflict/"))}}]);