@whyour/qinglong 2.19.2-1 → 2.19.2-2

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.
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[3249],{75875:function(n,e,r){r.d(e,{iN:function(){return Z},R_:function(){return s}});var a=r(96299),o=r(28556),t=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function c(n){var e=n.r,r=n.g,o=n.b,t=(0,a.py)(e,r,o);return{h:360*t.h,s:t.s,v:t.v}}function f(n){var e=n.r,r=n.g,o=n.b;return"#".concat((0,a.vq)(e,r,o,!1))}function i(n,e,r){var a=r/100;return{r:(e.r-n.r)*a+n.r,g:(e.g-n.g)*a+n.g,b:(e.b-n.b)*a+n.b}}function d(n,e,r){var a;return(a=Math.round(n.h)>=60&&Math.round(n.h)<=240?r?Math.round(n.h)-2*e:Math.round(n.h)+2*e:r?Math.round(n.h)+2*e:Math.round(n.h)-2*e)<0?a+=360:a>=360&&(a-=360),a}function l(n,e,r){return 0===n.h&&0===n.s?n.s:((a=r?n.s-.16*e:4===e?n.s+.16:n.s+.05*e)>1&&(a=1),r&&5===e&&a>.1&&(a=.1),a<.06&&(a=.06),Number(a.toFixed(2)));var a}function u(n,e,r){var a;return(a=r?n.v+.05*e:n.v-.15*e)>1&&(a=1),Number(a.toFixed(2))}function s(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[],a=(0,o.uA)(n),s=5;s>0;s-=1){var m=c(a),b=f((0,o.uA)({h:d(m,s,!0),s:l(m,s,!0),v:u(m,s,!0)}));r.push(b)}r.push(f(a));for(var p=1;p<=4;p+=1){var v=c(a),y=f((0,o.uA)({h:d(v,p),s:l(v,p),v:u(v,p)}));r.push(y)}return"dark"===e.theme?t.map((function(n){var a=n.index,t=n.opacity;return f(i((0,o.uA)(e.backgroundColor||"#141414"),(0,o.uA)(r[a]),100*t))})):r}var m=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];m.primary=m[5];var b=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];b.primary=b[5];var p=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];p.primary=p[5];var v=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];v.primary=v[5];var y=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];y.primary=y[5];var g=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];g.primary=g[5];var h=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];h.primary=h[5];var C=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];C.primary=C[5];var Z=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Z.primary=Z[5];var x=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];x.primary=x[5];var w=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];w.primary=w[5];var k=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];k.primary=k[5];var T=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];T.primary=T[5];var N=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];N.primary=N[5];var R=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];R.primary=R[5];var j=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];j.primary=j[5];var E=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];E.primary=E[5];var S=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];S.primary=S[5];var I=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];I.primary=I[5];var A=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];A.primary=A[5];var M=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];M.primary=M[5];var _=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];_.primary=_[5];var P=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];P.primary=P[5];var q=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];q.primary=q[5];var z=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];z.primary=z[5];var H=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];H.primary=H[5]},69870:function(n,e){e.Z={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"}},81372:function(n,e,r){var a=r(98037),o=r(75271),t=r(69870),c=r(64720),f=function(n,e){return o.createElement(c.Z,(0,a.Z)((0,a.Z)({},n),{},{ref:e,icon:t.Z}))},i=o.forwardRef(f);e.Z=i},48881:function(n,e,r){r.d(e,{Z:function(){return Z}});var a=r(2053),o=r(99459),t=r(57904),c=r(53162),f=r(75271),i=r(82187),d=r.n(i),l=r(75875),u=r(28771),s=r(98037),m=r(39765),b=["icon","className","onClick","style","primaryColor","secondaryColor"],p={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};var v=function(n){var e=n.icon,r=n.className,a=n.onClick,o=n.style,t=n.primaryColor,i=n.secondaryColor,d=(0,c.Z)(n,b),l=f.useRef(),u=p;if(t&&(u={primaryColor:t,secondaryColor:i||(0,m.pw)(t)}),(0,m.C3)(l),(0,m.Kp)((0,m.r)(e),"icon should be icon definiton, but got ".concat(e)),!(0,m.r)(e))return null;var v=e;return v&&"function"==typeof v.icon&&(v=(0,s.Z)((0,s.Z)({},v),{},{icon:v.icon(u.primaryColor,u.secondaryColor)})),(0,m.R_)(v.icon,"svg-".concat(v.name),(0,s.Z)((0,s.Z)({className:r,onClick:a,style:o,"data-icon":v.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},d),{},{ref:l}))};v.displayName="IconReact",v.getTwoToneColors=function(){return(0,s.Z)({},p)},v.setTwoToneColors=function(n){var e=n.primaryColor,r=n.secondaryColor;p.primaryColor=e,p.secondaryColor=r||(0,m.pw)(e),p.calculated=!!r};var y=v;function g(n){var e=(0,m.H9)(n),r=(0,o.Z)(e,2),a=r[0],t=r[1];return y.setTwoToneColors({primaryColor:a,secondaryColor:t})}var h=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];g(l.iN.primary);var C=f.forwardRef((function(n,e){var r=n.className,i=n.icon,l=n.spin,s=n.rotate,b=n.tabIndex,p=n.onClick,v=n.twoToneColor,g=(0,c.Z)(n,h),C=f.useContext(u.Z),Z=C.prefixCls,x=void 0===Z?"anticon":Z,w=C.rootClassName,k=d()(w,x,(0,t.Z)((0,t.Z)({},"".concat(x,"-").concat(i.name),!!i.name),"".concat(x,"-spin"),!!l||"loading"===i.name),r),T=b;void 0===T&&p&&(T=-1);var N=s?{msTransform:"rotate(".concat(s,"deg)"),transform:"rotate(".concat(s,"deg)")}:void 0,R=(0,m.H9)(v),j=(0,o.Z)(R,2),E=j[0],S=j[1];return f.createElement("span",(0,a.Z)({role:"img","aria-label":i.name},g,{ref:e,tabIndex:T,onClick:p,className:k}),f.createElement(y,{icon:i,primaryColor:E,secondaryColor:S,style:N}))}));C.displayName="AntdIcon",C.getTwoToneColor=function(){var n=y.getTwoToneColors();return n.calculated?[n.primaryColor,n.secondaryColor]:n.primaryColor},C.setTwoToneColor=g;var Z=C},28771:function(n,e,r){var a=(0,r(75271).createContext)({});e.Z=a},44084:function(n,e,r){var a=r(2053),o=r(75271),t=r(15618),c=r(48881),f=function(n,e){return o.createElement(c.Z,(0,a.Z)({},n,{ref:e,icon:t.Z}))},i=o.forwardRef(f);e.Z=i},56958:function(n,e,r){r.d(e,{Z:function(){return i}});var a=r(2053),o=r(75271),t={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 1024c-69.1 0-136.2-13.5-199.3-40.2C251.7 958 197 921 150 874c-47-47-84-101.7-109.8-162.7C13.5 648.2 0 581.1 0 512c0-19.9 16.1-36 36-36s36 16.1 36 36c0 59.4 11.6 117 34.6 171.3 22.2 52.4 53.9 99.5 94.3 139.9 40.4 40.4 87.5 72.2 139.9 94.3C395 940.4 452.6 952 512 952c59.4 0 117-11.6 171.3-34.6 52.4-22.2 99.5-53.9 139.9-94.3 40.4-40.4 72.2-87.5 94.3-139.9C940.4 629 952 571.4 952 512c0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.2C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3s-13.5 136.2-40.2 199.3C958 772.3 921 827 874 874c-47 47-101.8 83.9-162.7 109.7-63.1 26.8-130.2 40.3-199.3 40.3z"}}]},name:"loading-3-quarters",theme:"outlined"},c=r(48881),f=function(n,e){return o.createElement(c.Z,(0,a.Z)({},n,{ref:e,icon:t}))};var i=o.forwardRef(f)},39765:function(n,e,r){r.d(e,{R_:function(){return v},pw:function(){return y},r:function(){return b},H9:function(){return g},vD:function(){return h},C3:function(){return C},Kp:function(){return m}});var a=r(98037),o=r(24744),t=r(75875),c=r(61984);function f(n){var e;return null==n||null===(e=n.getRootNode)||void 0===e?void 0:e.call(n)}function i(n){return function(n){return f(n)instanceof ShadowRoot}(n)?f(n):null}var d=r(7432),l=r(75271),u=r(28771);function s(n){return n.replace(/-(.)/g,(function(n,e){return e.toUpperCase()}))}function m(n,e){(0,d.ZP)(n,"[@ant-design/icons] ".concat(e))}function b(n){return"object"===(0,o.Z)(n)&&"string"==typeof n.name&&"string"==typeof n.theme&&("object"===(0,o.Z)(n.icon)||"function"==typeof n.icon)}function p(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(n).reduce((function(e,r){var a=n[r];if("class"===r)e.className=a,delete e.class;else delete e[r],e[s(r)]=a;return e}),{})}function v(n,e,r){return r?l.createElement(n.tag,(0,a.Z)((0,a.Z)({key:e},p(n.attrs)),r),(n.children||[]).map((function(r,a){return v(r,"".concat(e,"-").concat(n.tag,"-").concat(a))}))):l.createElement(n.tag,(0,a.Z)({key:e},p(n.attrs)),(n.children||[]).map((function(r,a){return v(r,"".concat(e,"-").concat(n.tag,"-").concat(a))})))}function y(n){return(0,t.R_)(n)[0]}function g(n){return n?Array.isArray(n)?n:[n]:[]}var h={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},C=function(n){var e=(0,l.useContext)(u.Z),r=e.csp,a=e.prefixCls,o="\n.anticon {\n display: inline-flex;\n align-items: center;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";a&&(o=o.replace(/anticon/g,a)),(0,l.useEffect)((function(){var e=i(n.current);(0,c.hq)(o,"@ant-design-icons",{prepend:!0,csp:r,attachTo:e})}),[])}},63549:function(n,e,r){r.r(e);var a=r(48305),o=r.n(a),t=r(72317),c=r(75271),f=r(32890),i=r(50691),d=r(45520),l=r(93481),u=r(16314),s=r(3475),m=r(56958),b=r(44084),p=r(34014),v=r(48916),y=r(78060),g=r.n(y),h=r(52676);f.Z.Countdown;e.default=function(n){var e=n.cron,r=n.handleCancel,a=n.data,f=n.logUrl,y=(0,c.useState)(t.ZP.get("启动中...")),C=o()(y,2),Z=C[0],x=C[1],w=(0,c.useState)(!0),k=o()(w,2),T=k[0],N=k[1],R=(0,c.useState)(!0),j=o()(R,2),E=j[0],S=j[1],I=(0,c.useState)(!1),A=o()(I,2),M=A[0],_=A[1],P=(0,c.useRef)({value:0,down:!0}),q=f||String(null==e?void 0:e.id),z=function n(r){r&&N(!0),u.W.get(f||"".concat(s.Z.apiPrefix,"crons/").concat(e.id,"/log")).then((function(e){var r=e.code,a=e.data;if(200===r&&localStorage.getItem("logCron")===q&&a!==Z){var o=a;x(o||t.ZP.get("暂无日志"));var c=Boolean(o&&!(0,v.x$)(o)&&!o.includes("任务未运行"));c||(0,v.x$)(Z)||Z===t.ZP.get("启动中...")||setTimeout((function(){H()})),S(c),c&&setTimeout((function(){H(),n()}),2e3)}})).finally((function(){r&&N(!1)}))},H=function(){P.current.down&&setTimeout((function(){document.querySelector("#log-flag").scrollIntoView({behavior:"smooth"})}),600)},B=function(){localStorage.removeItem("logCron"),r()};return(0,c.useEffect)((function(){e&&e.id&&z(!0)}),[e]),(0,c.useEffect)((function(){a&&x(a)}),[a]),(0,c.useEffect)((function(){_(document.body.clientWidth<768)}),[]),(0,h.jsx)(d.Z,{title:(0,h.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(E||T)&&(0,h.jsx)(m.Z,{spin:!0}),!E&&!T&&(0,h.jsx)(b.Z,{}),(0,h.jsx)(i.Z.Text,{ellipsis:!0,style:{marginLeft:5},children:e&&e.name})]}),open:!0,centered:!0,className:"log-modal",forceRender:!0,onOk:function(){return B()},onCancel:function(){return B()},footer:[(0,h.jsx)(l.Z,{type:"primary",onClick:function(){return B()},children:t.ZP.get("知道了")})],children:(0,h.jsxs)("div",{onScroll:function(n){var e=n.target.scrollTop;P.current.down&&(P.current={value:e,down:e-P.current.value>-5||!e})},className:"log-container",children:[T?(0,h.jsx)(p.Z,{}):(0,h.jsx)("pre",{style:M?{fontFamily:"Source Code Pro",zoom:.83}:{},children:(0,h.jsx)(g(),{children:Z})}),(0,h.jsx)("div",{id:"log-flag"})]})})}},27916:function(n,e,r){r.d(e,{Z:function(){return t}});var a=r(99459),o=r(75271);function t(){var n=o.useReducer((function(n){return n+1}),0);return(0,a.Z)(n,2)[1]}}}]);
1
+ "use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[3249],{75875:function(n,e,r){r.d(e,{iN:function(){return Z},R_:function(){return s}});var a=r(96299),o=r(28556),t=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function c(n){var e=n.r,r=n.g,o=n.b,t=(0,a.py)(e,r,o);return{h:360*t.h,s:t.s,v:t.v}}function f(n){var e=n.r,r=n.g,o=n.b;return"#".concat((0,a.vq)(e,r,o,!1))}function i(n,e,r){var a=r/100;return{r:(e.r-n.r)*a+n.r,g:(e.g-n.g)*a+n.g,b:(e.b-n.b)*a+n.b}}function d(n,e,r){var a;return(a=Math.round(n.h)>=60&&Math.round(n.h)<=240?r?Math.round(n.h)-2*e:Math.round(n.h)+2*e:r?Math.round(n.h)+2*e:Math.round(n.h)-2*e)<0?a+=360:a>=360&&(a-=360),a}function l(n,e,r){return 0===n.h&&0===n.s?n.s:((a=r?n.s-.16*e:4===e?n.s+.16:n.s+.05*e)>1&&(a=1),r&&5===e&&a>.1&&(a=.1),a<.06&&(a=.06),Number(a.toFixed(2)));var a}function u(n,e,r){var a;return(a=r?n.v+.05*e:n.v-.15*e)>1&&(a=1),Number(a.toFixed(2))}function s(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[],a=(0,o.uA)(n),s=5;s>0;s-=1){var m=c(a),b=f((0,o.uA)({h:d(m,s,!0),s:l(m,s,!0),v:u(m,s,!0)}));r.push(b)}r.push(f(a));for(var v=1;v<=4;v+=1){var p=c(a),y=f((0,o.uA)({h:d(p,v),s:l(p,v),v:u(p,v)}));r.push(y)}return"dark"===e.theme?t.map((function(n){var a=n.index,t=n.opacity;return f(i((0,o.uA)(e.backgroundColor||"#141414"),(0,o.uA)(r[a]),100*t))})):r}var m=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];m.primary=m[5];var b=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];b.primary=b[5];var v=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];v.primary=v[5];var p=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];p.primary=p[5];var y=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];y.primary=y[5];var g=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];g.primary=g[5];var h=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];h.primary=h[5];var C=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];C.primary=C[5];var Z=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Z.primary=Z[5];var x=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];x.primary=x[5];var w=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];w.primary=w[5];var k=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];k.primary=k[5];var T=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];T.primary=T[5];var N=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];N.primary=N[5];var R=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];R.primary=R[5];var j=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];j.primary=j[5];var E=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];E.primary=E[5];var S=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];S.primary=S[5];var I=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];I.primary=I[5];var A=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];A.primary=A[5];var M=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];M.primary=M[5];var _=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];_.primary=_[5];var P=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];P.primary=P[5];var q=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];q.primary=q[5];var z=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];z.primary=z[5];var H=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];H.primary=H[5]},69870:function(n,e){e.Z={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"}},81372:function(n,e,r){var a=r(98037),o=r(75271),t=r(69870),c=r(64720),f=function(n,e){return o.createElement(c.Z,(0,a.Z)((0,a.Z)({},n),{},{ref:e,icon:t.Z}))},i=o.forwardRef(f);e.Z=i},48881:function(n,e,r){r.d(e,{Z:function(){return Z}});var a=r(2053),o=r(99459),t=r(57904),c=r(53162),f=r(75271),i=r(82187),d=r.n(i),l=r(75875),u=r(28771),s=r(98037),m=r(39765),b=["icon","className","onClick","style","primaryColor","secondaryColor"],v={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};var p=function(n){var e=n.icon,r=n.className,a=n.onClick,o=n.style,t=n.primaryColor,i=n.secondaryColor,d=(0,c.Z)(n,b),l=f.useRef(),u=v;if(t&&(u={primaryColor:t,secondaryColor:i||(0,m.pw)(t)}),(0,m.C3)(l),(0,m.Kp)((0,m.r)(e),"icon should be icon definiton, but got ".concat(e)),!(0,m.r)(e))return null;var p=e;return p&&"function"==typeof p.icon&&(p=(0,s.Z)((0,s.Z)({},p),{},{icon:p.icon(u.primaryColor,u.secondaryColor)})),(0,m.R_)(p.icon,"svg-".concat(p.name),(0,s.Z)((0,s.Z)({className:r,onClick:a,style:o,"data-icon":p.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},d),{},{ref:l}))};p.displayName="IconReact",p.getTwoToneColors=function(){return(0,s.Z)({},v)},p.setTwoToneColors=function(n){var e=n.primaryColor,r=n.secondaryColor;v.primaryColor=e,v.secondaryColor=r||(0,m.pw)(e),v.calculated=!!r};var y=p;function g(n){var e=(0,m.H9)(n),r=(0,o.Z)(e,2),a=r[0],t=r[1];return y.setTwoToneColors({primaryColor:a,secondaryColor:t})}var h=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];g(l.iN.primary);var C=f.forwardRef((function(n,e){var r=n.className,i=n.icon,l=n.spin,s=n.rotate,b=n.tabIndex,v=n.onClick,p=n.twoToneColor,g=(0,c.Z)(n,h),C=f.useContext(u.Z),Z=C.prefixCls,x=void 0===Z?"anticon":Z,w=C.rootClassName,k=d()(w,x,(0,t.Z)((0,t.Z)({},"".concat(x,"-").concat(i.name),!!i.name),"".concat(x,"-spin"),!!l||"loading"===i.name),r),T=b;void 0===T&&v&&(T=-1);var N=s?{msTransform:"rotate(".concat(s,"deg)"),transform:"rotate(".concat(s,"deg)")}:void 0,R=(0,m.H9)(p),j=(0,o.Z)(R,2),E=j[0],S=j[1];return f.createElement("span",(0,a.Z)({role:"img","aria-label":i.name},g,{ref:e,tabIndex:T,onClick:v,className:k}),f.createElement(y,{icon:i,primaryColor:E,secondaryColor:S,style:N}))}));C.displayName="AntdIcon",C.getTwoToneColor=function(){var n=y.getTwoToneColors();return n.calculated?[n.primaryColor,n.secondaryColor]:n.primaryColor},C.setTwoToneColor=g;var Z=C},28771:function(n,e,r){var a=(0,r(75271).createContext)({});e.Z=a},44084:function(n,e,r){var a=r(2053),o=r(75271),t=r(15618),c=r(48881),f=function(n,e){return o.createElement(c.Z,(0,a.Z)({},n,{ref:e,icon:t.Z}))},i=o.forwardRef(f);e.Z=i},56958:function(n,e,r){r.d(e,{Z:function(){return i}});var a=r(2053),o=r(75271),t={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 1024c-69.1 0-136.2-13.5-199.3-40.2C251.7 958 197 921 150 874c-47-47-84-101.7-109.8-162.7C13.5 648.2 0 581.1 0 512c0-19.9 16.1-36 36-36s36 16.1 36 36c0 59.4 11.6 117 34.6 171.3 22.2 52.4 53.9 99.5 94.3 139.9 40.4 40.4 87.5 72.2 139.9 94.3C395 940.4 452.6 952 512 952c59.4 0 117-11.6 171.3-34.6 52.4-22.2 99.5-53.9 139.9-94.3 40.4-40.4 72.2-87.5 94.3-139.9C940.4 629 952 571.4 952 512c0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.2C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3s-13.5 136.2-40.2 199.3C958 772.3 921 827 874 874c-47 47-101.8 83.9-162.7 109.7-63.1 26.8-130.2 40.3-199.3 40.3z"}}]},name:"loading-3-quarters",theme:"outlined"},c=r(48881),f=function(n,e){return o.createElement(c.Z,(0,a.Z)({},n,{ref:e,icon:t}))};var i=o.forwardRef(f)},39765:function(n,e,r){r.d(e,{R_:function(){return p},pw:function(){return y},r:function(){return b},H9:function(){return g},vD:function(){return h},C3:function(){return C},Kp:function(){return m}});var a=r(98037),o=r(24744),t=r(75875),c=r(61984);function f(n){var e;return null==n||null===(e=n.getRootNode)||void 0===e?void 0:e.call(n)}function i(n){return function(n){return f(n)instanceof ShadowRoot}(n)?f(n):null}var d=r(7432),l=r(75271),u=r(28771);function s(n){return n.replace(/-(.)/g,(function(n,e){return e.toUpperCase()}))}function m(n,e){(0,d.ZP)(n,"[@ant-design/icons] ".concat(e))}function b(n){return"object"===(0,o.Z)(n)&&"string"==typeof n.name&&"string"==typeof n.theme&&("object"===(0,o.Z)(n.icon)||"function"==typeof n.icon)}function v(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(n).reduce((function(e,r){var a=n[r];if("class"===r)e.className=a,delete e.class;else delete e[r],e[s(r)]=a;return e}),{})}function p(n,e,r){return r?l.createElement(n.tag,(0,a.Z)((0,a.Z)({key:e},v(n.attrs)),r),(n.children||[]).map((function(r,a){return p(r,"".concat(e,"-").concat(n.tag,"-").concat(a))}))):l.createElement(n.tag,(0,a.Z)({key:e},v(n.attrs)),(n.children||[]).map((function(r,a){return p(r,"".concat(e,"-").concat(n.tag,"-").concat(a))})))}function y(n){return(0,t.R_)(n)[0]}function g(n){return n?Array.isArray(n)?n:[n]:[]}var h={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},C=function(n){var e=(0,l.useContext)(u.Z),r=e.csp,a=e.prefixCls,o="\n.anticon {\n display: inline-flex;\n align-items: center;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";a&&(o=o.replace(/anticon/g,a)),(0,l.useEffect)((function(){var e=i(n.current);(0,c.hq)(o,"@ant-design-icons",{prepend:!0,csp:r,attachTo:e})}),[])}},63549:function(n,e,r){r.r(e);var a=r(48305),o=r.n(a),t=r(72317),c=r(75271),f=r(32890),i=r(50691),d=r(45520),l=r(93481),u=r(16314),s=r(3475),m=r(56958),b=r(44084),v=r(34014),p=r(48916),y=r(78060),g=r.n(y),h=r(52676);f.Z.Countdown;e.default=function(n){var e=n.cron,r=n.handleCancel,a=n.data,f=n.logUrl,y=(0,c.useState)(t.ZP.get("启动中...")),C=o()(y,2),Z=C[0],x=C[1],w=(0,c.useState)(!0),k=o()(w,2),T=k[0],N=k[1],R=(0,c.useState)(!0),j=o()(R,2),E=j[0],S=j[1],I=(0,c.useState)(!1),A=o()(I,2),M=A[0],_=A[1],P=(0,c.useRef)({value:0,down:!0}),q=f||String(null==e?void 0:e.id),z=function n(r){r&&N(!0),u.W.get(f||"".concat(s.Z.apiPrefix,"crons/").concat(e.id,"/log")).then((function(e){var r=e.code,a=e.data;if(200===r&&localStorage.getItem("logCron")===q&&a!==Z){var o=a;x(o||t.ZP.get("暂无日志"));var c=Boolean(o&&!(0,p.x$)(o)&&!o.includes("日志不存在"));c||(0,p.x$)(Z)||Z===t.ZP.get("启动中...")||setTimeout((function(){H()})),S(c),c&&setTimeout((function(){H(),n()}),2e3)}})).finally((function(){r&&N(!1)}))},H=function(){P.current.down&&setTimeout((function(){var n;null===(n=document.querySelector("#log-flag"))||void 0===n||n.scrollIntoView({behavior:"smooth"})}),600)},B=function(){localStorage.removeItem("logCron"),r()};return(0,c.useEffect)((function(){e&&e.id&&z(!0)}),[e]),(0,c.useEffect)((function(){a&&x(a)}),[a]),(0,c.useEffect)((function(){_(document.body.clientWidth<768)}),[]),(0,h.jsx)(d.Z,{title:(0,h.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(E||T)&&(0,h.jsx)(m.Z,{spin:!0}),!E&&!T&&(0,h.jsx)(b.Z,{}),(0,h.jsx)(i.Z.Text,{ellipsis:!0,style:{marginLeft:5},children:e&&e.name})]}),open:!0,centered:!0,className:"log-modal",forceRender:!0,onOk:function(){return B()},onCancel:function(){return B()},footer:[(0,h.jsx)(l.Z,{type:"primary",onClick:function(){return B()},children:t.ZP.get("知道了")})],children:(0,h.jsxs)("div",{onScroll:function(n){var e=n.target.scrollTop;P.current.down&&(P.current={value:e,down:e-P.current.value>-5||!e})},className:"log-container",children:[T?(0,h.jsx)(v.Z,{}):(0,h.jsx)("pre",{style:M?{fontFamily:"Source Code Pro",zoom:.83}:{},children:(0,h.jsx)(g(),{children:Z})}),(0,h.jsx)("div",{id:"log-flag"})]})})}},27916:function(n,e,r){r.d(e,{Z:function(){return t}});var a=r(99459),o=r(75271);function t(){var n=o.useReducer((function(n){return n+1}),0);return(0,a.Z)(n,2)[1]}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[3830],{73236:function(t,e,n){n.r(e);var i=n(48305),o=n.n(i),s=n(48916),r=n(3475),c=n(16314),a=n(65814),u=n(78060),l=n.n(u),h=n(32890),d=n(61508),f=n(45520),p=n(93481),v=n(75271),g=n(72317),m=n(52676),k=h.Z.Countdown;e.default=function(t){var e=t.systemInfo,n=(0,v.useState)(!1),i=o()(n,2),u=i[0],h=i[1],b=(0,v.useState)(""),y=o()(b,2),Z=y[0],x=y[1],P=(0,v.useRef)(),w=function(t){f.Z.confirm({width:500,title:g.ZP.get("更新"),content:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{children:g.ZP.get("已经是最新版了!")}),(0,m.jsxs)("div",{style:{fontSize:12,fontWeight:400,marginTop:5},children:[g.ZP.get("青龙")," ",t.lastVersion," ",g.ZP.get("是目前检测到的最新可用版本了。")]})]}),okText:g.ZP.get("重新下载"),onOk:function(){j(),c.W.put("".concat(r.Z.apiPrefix,"system/update")).then((function(t){})).catch((function(t){console.log(t)}))}})},S=function(t){var n=t.lastVersion,i=t.lastLog;f.Z.confirm({width:500,title:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{children:g.ZP.get("更新可用")}),(0,m.jsxs)("div",{style:{fontSize:12,fontWeight:400,marginTop:5},children:[g.ZP.get("新版本")," ",n," ",g.ZP.get("可用,你使用的版本为")," ",e.version,"。"]})]}),content:(0,m.jsx)("pre",{children:(0,m.jsx)(l(),{children:i})}),okText:g.ZP.get("下载更新"),cancelText:g.ZP.get("以后再说"),onOk:function(){j(),c.W.put("".concat(r.Z.apiPrefix,"system/update")).then((function(t){})).catch((function(t){console.log(t)}))}})},j=function(){x(""),P.current=f.Z.info({width:600,maskClosable:!1,closable:!1,keyboard:!1,okButtonProps:{disabled:!0},title:g.ZP.get("下载更新中..."),centered:!0,content:(0,m.jsx)("pre",{children:(0,m.jsx)(l(),{children:Z})})})},E=function(t){c.W.put("".concat(r.Z.apiPrefix,"update/").concat(t)).then((function(t){d.ZP.success({content:(0,m.jsxs)("span",{children:[g.ZP.get("系统将在"),(0,m.jsx)(k,{className:"inline-countdown",format:"ss",value:Date.now()+3e4}),g.ZP.get("秒后自动刷新")]}),duration:30}),(0,s.o4)(),setTimeout((function(){window.location.reload()}),3e4)})).catch((function(t){console.log(t)}))};(0,v.useEffect)((function(){if(Z){var t=Z.includes("失败,请检查");P.current.update({maskClosable:t,closable:t,okButtonProps:{disabled:!t},content:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("pre",{children:(0,m.jsx)(l(),{children:Z})}),(0,m.jsx)("div",{id:"log-identifier",style:{paddingBottom:5}})]})})}}),[Z]);var T=(0,v.useCallback)((function(t){var e=t.message;e.includes("失败,请检查")&&d.ZP.error(g.ZP.get("更新失败,请检查网络及日志或稍后再试")),setTimeout((function(){var t;null===(t=document.querySelector("#log-identifier"))||void 0===t||t.scrollIntoView({behavior:"smooth"})}),600),e.includes("更新包下载成功")&&setTimeout((function(){f.Z.confirm({width:600,maskClosable:!1,title:g.ZP.get("确认重启"),centered:!0,content:g.ZP.get("系统安装包下载成功,确认重启"),okText:g.ZP.get("重启"),onOk:function(){E("system")},onCancel:function(){P.current.update({maskClosable:!0,closable:!0,okButtonProps:{disabled:!1}})}})}),1e3),x((function(t){return"".concat(t).concat(e)}))}),[]);return(0,v.useEffect)((function(){var t=a.Z.getInstance();return t.subscribe("updateSystemVersion",T),function(){t.unsubscribe("updateSystemVersion",T)}}),[]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(p.Z,{type:"primary",onClick:function(){u||(h(!0),d.ZP.loading(g.ZP.get("检查更新中..."),0),c.W.put("".concat(r.Z.apiPrefix,"system/update-check")).then((function(t){var e=t.code,n=t.data;d.ZP.destroy(),200===e&&(n.hasNewVersion?S(n):w(n))})).catch((function(t){d.ZP.destroy(),console.log(t)})).finally((function(){h(!1)})))},children:g.ZP.get("检查更新")}),(0,m.jsx)(p.Z,{type:"primary",onClick:function(){return E("reload")},style:{marginLeft:8},children:g.ZP.get("重新启动")})]})}},65814:function(t,e,n){var i=n(15558),o=n.n(i),s=n(67825),r=n.n(s),c=n(90228),a=n.n(c),u=n(87999),l=n.n(u),h=n(25298),d=n.n(h),f=n(17069),p=n.n(f),v=n(82092),g=n.n(v),m=n(78078),k=n.n(m),b=["type"],y=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};d()(this,t),g()(this,"url",void 0),g()(this,"socket",null),g()(this,"subscriptions",new Map),g()(this,"options",void 0),g()(this,"reconnectAttempts",0),g()(this,"heartbeatTimeout",null),g()(this,"state","closed"),this.url=e,this.options={maxReconnectAttempts:n.maxReconnectAttempts||5,reconnectInterval:n.reconnectInterval||3e3,heartbeatInterval:n.heartbeatInterval||3e4},this.init()}var e,n;return p()(t,[{key:"init",value:(n=l()(a()().mark((function t(){var e=this;return a()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.prev=0,this.state="connecting",this.emit("connecting");case 3:if(!(this.reconnectAttempts<this.options.maxReconnectAttempts)){t.next=16;break}return this.socket=new(k())(this.url),this.setupEventListeners(),this.startHeartbeat(),t.next=9,this.waitForClose();case 9:return this.stopHeartbeat(),this.socket=null,this.reconnectAttempts++,t.next=14,new Promise((function(t){return setTimeout(t,e.options.reconnectInterval)}));case 14:t.next=3;break;case 16:t.next=21;break;case 18:t.prev=18,t.t0=t.catch(0),this.handleError(t.t0);case 21:case"end":return t.stop()}}),t,this,[[0,18]])}))),function(){return n.apply(this,arguments)})},{key:"setupEventListeners",value:function(){var t=this;this.socket&&(this.socket.onopen=function(){t.state="open",t.emit("open")},this.socket.onmessage=function(e){var n=JSON.parse(e.data);t.dispatchMessage(n)},this.socket.onclose=function(){t.state="closed",t.emit("close")})}},{key:"waitForClose",value:(e=l()(a()().mark((function t(){var e;return a()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((null===(e=this.socket)||void 0===e?void 0:e.readyState)===k().CLOSED){t.next=5;break}return t.next=3,new Promise((function(t){return setTimeout(t,100)}));case 3:t.next=0;break;case 5:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"subscribe",value:function(t,e){var n=this.subscriptions.get(t)||new Set;if(!n.has(e)){n.add(e),this.subscriptions.set(t,n);var i={action:"subscribe",topic:t};this.send(i)}}},{key:"unsubscribe",value:function(t,e){var n=this.subscriptions.get(t)||new Set;if(n.has(e)){n.delete(e);var i={action:"unsubscribe",topic:t};this.send(i)}}},{key:"send",value:function(t){var e;(null===(e=this.socket)||void 0===e?void 0:e.readyState)===k().OPEN&&this.socket.send(JSON.stringify(t))}},{key:"dispatchMessage",value:function(t){var e=t.type,n=r()(t,b),i=this.subscriptions.get(e)||new Set;o()(i).forEach((function(t){return t(n)}))}},{key:"startHeartbeat",value:function(){var t=this;this.heartbeatTimeout=setInterval((function(){var e;(null===(e=t.socket)||void 0===e?void 0:e.readyState)===k().OPEN&&t.socket.send(JSON.stringify({type:"heartbeat"}))}),this.options.heartbeatInterval)}},{key:"stopHeartbeat",value:function(){this.heartbeatTimeout&&clearInterval(this.heartbeatTimeout)}},{key:"close",value:function(){this.socket&&(this.state="closed",this.stopHeartbeat(),this.socket.close(),this.emit("close"))}},{key:"handleError",value:function(t){console.error("WebSocket错误:",t),this.emit("error",t)}},{key:"on",value:function(t,e){}},{key:"emit",value:function(t,e){}}],[{key:"getInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0;return t.instance||(t.instance=new t(e,n)),t.instance}}]),t}();g()(y,"instance",null),e.Z=y},27916:function(t,e,n){n.d(e,{Z:function(){return s}});var i=n(99459),o=n(75271);function s(){var t=o.useReducer((function(t){return t+1}),0);return(0,i.Z)(t,2)[1]}},21485:function(t,e,n){n.d(e,{mL:function(){return a},q0:function(){return c}});var i=function(){return{height:0,opacity:0}},o=function(t){return{height:t.scrollHeight,opacity:1}},s=function(t,e){return!0===(null==e?void 0:e.deadline)||"height"===e.propertyName},r={motionName:"ant-motion-collapse",onAppearStart:i,onEnterStart:i,onAppearActive:o,onEnterActive:o,onLeaveStart:function(t){return{height:t?t.offsetHeight:0}},onLeaveActive:i,onAppearEnd:s,onEnterEnd:s,onLeaveEnd:s,motionDeadline:500},c=((0,n(86428).b)("bottomLeft","bottomRight","topLeft","topRight"),function(t){return void 0===t||"topLeft"!==t&&"topRight"!==t?"slide-up":"slide-down"}),a=function(t,e,n){return void 0!==n?n:"".concat(t,"-").concat(e)};e.ZP=r}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[2340,8851],{29774:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return h}});var n=a(72317),i=(a(75271),a(50691)),r=a(18015),o="container___nww32",c="right___o0xXT",s="title___DHxWh",l="desc___frhI6",u=a(16483),d=a.n(u),p=a(52676),g=i.Z.Link,h=function(e){var t=e.systemInfo;return(0,p.jsxs)("div",{className:o,children:[(0,p.jsx)("img",{alt:"logo",style:{width:140,marginRight:20},src:"https://qn.whyour.cn/logo.png"}),(0,p.jsxs)("div",{className:c,children:[(0,p.jsx)("span",{className:s,children:n.ZP.get("青龙")}),(0,p.jsx)("span",{className:l,children:n.ZP.get("支持python3、javascript、shell、typescript 的定时任务管理面板")}),(0,p.jsxs)(r.Z,{children:[(0,p.jsxs)(r.Z.Item,{label:n.ZP.get("版本"),span:3,children:["develop"===(null==t?void 0:t.branch)?n.ZP.get("开发版"):n.ZP.get("正式版")," ","v",t.version]}),(0,p.jsx)(r.Z.Item,{label:n.ZP.get("更新时间"),span:3,children:d()(1e3*t.publishTime).format("YYYY-MM-DD HH:mm")}),(0,p.jsx)(r.Z.Item,{label:n.ZP.get("更新日志"),span:3,children:(0,p.jsx)(g,{href:"https://qn.whyour.cn/version.yaml?t=".concat(Date.now()),target:"_blank",children:n.ZP.get("查看")})})]}),(0,p.jsxs)("div",{children:[(0,p.jsx)(g,{href:"https://github.com/whyour/qinglong",target:"_blank",style:{marginRight:15},children:"Github"}),(0,p.jsx)(g,{href:"https://t.me/jiao_long",target:"_blank",style:{marginRight:15},children:n.ZP.get("Telegram频道")}),(0,p.jsx)(g,{href:"https://github.com/whyour/qinglong/issues",target:"_blank",children:n.ZP.get("提交BUG")})]})]})]})}},92294:function(e,t,a){"use strict";a.r(t);var n=a(90228),i=a.n(n),r=a(26068),o=a.n(r),c=a(87999),s=a.n(c),l=a(48305),u=a.n(l),d=a(72317),p=a(75271),g=a(72338),h=a(61508),f=a(45520),m=a(17082),P=a(35181),Z=a(16314),v=a(3475),y=a(52676);t.default=function(e){var t=e.app,a=e.handleCancel,n=g.Z.useForm(),r=u()(n,1)[0],c=(0,p.useState)(!1),l=u()(c,2),x=l[0],b=l[1],A=function(){var e=s()(i()().mark((function e(n){var r,c,s,l,u;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return b(!0),r=t?"put":"post",c=o()({},n),t&&(c.id=t.id),e.prev=4,e.next=7,Z.W[r]("".concat(v.Z.apiPrefix,"apps"),c);case 7:s=e.sent,l=s.code,u=s.data,200===l&&(h.ZP.success(t?d.ZP.get("更新应用成功"):d.ZP.get("创建应用成功")),a(u)),b(!1),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),b(!1);case 17:case"end":return e.stop()}}),e,null,[[4,14]])})));return function(t){return e.apply(this,arguments)}}();return(0,y.jsx)(f.Z,{title:t?d.ZP.get("编辑应用"):d.ZP.get("创建应用"),open:!0,forceRender:!0,centered:!0,maskClosable:!1,onOk:function(){r.validateFields().then((function(e){A(e)})).catch((function(e){console.log("Validate Failed:",e)}))},onCancel:function(){return a()},confirmLoading:x,children:(0,y.jsxs)(g.Z,{form:r,layout:"vertical",name:"form_app_modal",initialValues:t,children:[(0,y.jsx)(g.Z.Item,{name:"name",label:d.ZP.get("名称"),rules:[{validator:function(e,t){return["system"].includes(t)?Promise.reject(new Error(d.ZP.get("名称不能为保留关键字"))):Promise.resolve()}}],children:(0,y.jsx)(m.Z,{placeholder:d.ZP.get("请输入应用名称")})}),(0,y.jsx)(g.Z.Item,{name:"scopes",label:d.ZP.get("权限"),rules:[{required:!0}],children:(0,y.jsx)(P.Z,{mode:"multiple",placeholder:d.ZP.get("请选择模块权限"),allowClear:!0,style:{width:"100%"},children:v.Z.scopes.map((function(e){return(0,y.jsx)(P.Z.Option,{value:e.value,children:e.name},e.value)}))})})]})})}},73236:function(e,t,a){"use strict";a.r(t);var n=a(48305),i=a.n(n),r=a(48916),o=a(3475),c=a(16314),s=a(65814),l=a(78060),u=a.n(l),d=a(32890),p=a(61508),g=a(45520),h=a(93481),f=a(75271),m=a(72317),P=a(52676),Z=d.Z.Countdown;t.default=function(e){var t=e.systemInfo,a=(0,f.useState)(!1),n=i()(a,2),l=n[0],d=n[1],v=(0,f.useState)(""),y=i()(v,2),x=y[0],b=y[1],A=(0,f.useRef)(),k=function(e){g.Z.confirm({width:500,title:m.ZP.get("更新"),content:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)("div",{children:m.ZP.get("已经是最新版了!")}),(0,P.jsxs)("div",{style:{fontSize:12,fontWeight:400,marginTop:5},children:[m.ZP.get("青龙")," ",e.lastVersion," ",m.ZP.get("是目前检测到的最新可用版本了。")]})]}),okText:m.ZP.get("重新下载"),onOk:function(){j(),c.W.put("".concat(o.Z.apiPrefix,"system/update")).then((function(e){})).catch((function(e){console.log(e)}))}})},w=function(e){var a=e.lastVersion,n=e.lastLog;g.Z.confirm({width:500,title:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)("div",{children:m.ZP.get("更新可用")}),(0,P.jsxs)("div",{style:{fontSize:12,fontWeight:400,marginTop:5},children:[m.ZP.get("新版本")," ",a," ",m.ZP.get("可用,你使用的版本为")," ",t.version,"。"]})]}),content:(0,P.jsx)("pre",{children:(0,P.jsx)(u(),{children:n})}),okText:m.ZP.get("下载更新"),cancelText:m.ZP.get("以后再说"),onOk:function(){j(),c.W.put("".concat(o.Z.apiPrefix,"system/update")).then((function(e){})).catch((function(e){console.log(e)}))}})},j=function(){b(""),A.current=g.Z.info({width:600,maskClosable:!1,closable:!1,keyboard:!1,okButtonProps:{disabled:!0},title:m.ZP.get("下载更新中..."),centered:!0,content:(0,P.jsx)("pre",{children:(0,P.jsx)(u(),{children:x})})})},C=function(e){c.W.put("".concat(o.Z.apiPrefix,"update/").concat(e)).then((function(e){p.ZP.success({content:(0,P.jsxs)("span",{children:[m.ZP.get("系统将在"),(0,P.jsx)(Z,{className:"inline-countdown",format:"ss",value:Date.now()+3e4}),m.ZP.get("秒后自动刷新")]}),duration:30}),(0,r.o4)(),setTimeout((function(){window.location.reload()}),3e4)})).catch((function(e){console.log(e)}))};(0,f.useEffect)((function(){if(x){var e=x.includes("失败,请检查");A.current.update({maskClosable:e,closable:e,okButtonProps:{disabled:!e},content:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)("pre",{children:(0,P.jsx)(u(),{children:x})}),(0,P.jsx)("div",{id:"log-identifier",style:{paddingBottom:5}})]})})}}),[x]);var S=(0,f.useCallback)((function(e){var t=e.message;t.includes("失败,请检查")&&p.ZP.error(m.ZP.get("更新失败,请检查网络及日志或稍后再试")),setTimeout((function(){var e;null===(e=document.querySelector("#log-identifier"))||void 0===e||e.scrollIntoView({behavior:"smooth"})}),600),t.includes("更新包下载成功")&&setTimeout((function(){g.Z.confirm({width:600,maskClosable:!1,title:m.ZP.get("确认重启"),centered:!0,content:m.ZP.get("系统安装包下载成功,确认重启"),okText:m.ZP.get("重启"),onOk:function(){C("system")},onCancel:function(){A.current.update({maskClosable:!0,closable:!0,okButtonProps:{disabled:!1}})}})}),1e3),b((function(e){return"".concat(e).concat(t)}))}),[]);return(0,f.useEffect)((function(){var e=s.Z.getInstance();return e.subscribe("updateSystemVersion",S),function(){e.unsubscribe("updateSystemVersion",S)}}),[]),(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(h.Z,{type:"primary",onClick:function(){l||(d(!0),p.ZP.loading(m.ZP.get("检查更新中..."),0),c.W.put("".concat(o.Z.apiPrefix,"system/update-check")).then((function(e){var t=e.code,a=e.data;p.ZP.destroy(),200===t&&(a.hasNewVersion?w(a):k(a))})).catch((function(e){p.ZP.destroy(),console.log(e)})).finally((function(){d(!1)})))},children:m.ZP.get("检查更新")}),(0,P.jsx)(h.Z,{type:"primary",onClick:function(){return C("reload")},style:{marginLeft:8},children:m.ZP.get("重新启动")})]})}},53626:function(e,t,a){"use strict";a.r(t);var n=a(26068),i=a.n(n),r=a(48305),o=a.n(r),c=a(72317),s=a(75271),l=a(72338),u=a(61508),d=a(17082),p=a(93481),g=a(35181),h=a(3475),f=a(16314),m=(a(68251),a(78060)),P=a.n(m),Z=a(19334),v=a.n(Z),y=a(65814),x=a(52676),b={"dependence-proxy":"dependenceProxy","node-mirror":"nodeMirror","python-mirror":"pythonMirror","linux-mirror":"linuxMirror"};t.default=function(){var e=(0,s.useState)(),t=o()(e,2),a=t[0],n=t[1],r=l.Z.useForm(),m=o()(r,1)[0],Z=(0,s.useState)(""),A=o()(Z,2),k=A[0],w=A[1],j=(0,s.useState)(!1),C=o()(j,2),S=C[0],E=C[1],M=(0,s.useState)("node"),T=o()(M,2),B=T[0],I=T[1],q=function(e){E(!0),w("in progress...\n"),f.W.put("".concat(h.Z.apiPrefix,"system/config/").concat(e),v()(a,b[e])).then((function(e){})).catch((function(){E(!1),w((function(e){return"".concat(e,"update mirror error")}))}))},_=function(e){E(!0),w(""),f.W.put("".concat(h.Z.apiPrefix,"system/config/").concat(e),v()(a,b[e])).then((function(e){var t=e.code;e.data;200===t&&u.ZP.success(c.ZP.get("更新成功"))})).catch((function(e){console.log(e)})).finally((function(){return E(!1)}))},G=function(e){var t=e.message;w((function(e){return"".concat(e).concat(t)})),(t.includes("update node mirror end")||t.includes("update linux mirror end"))&&E(!1)};return(0,s.useEffect)((function(){var e=y.Z.getInstance();return e.subscribe("updateNodeMirror",G),e.subscribe("updateLinuxMirror",G),function(){e.subscribe("updateNodeMirror",G),e.unsubscribe("updateLinuxMirror",G)}}),[]),(0,s.useEffect)((function(){f.W.get("".concat(h.Z.apiPrefix,"system/config")).then((function(e){var t=e.code,a=e.data;200===t&&a.info&&n(a.info)})).catch((function(e){console.log(e)}))}),[]),(0,x.jsxs)("div",{className:"dependence-config-wrapper",children:[(0,x.jsxs)(l.Z,{layout:"vertical",form:m,style:{flexShrink:0},children:[(0,x.jsx)(l.Z.Item,{label:c.ZP.get("代理"),name:"proxy",extra:c.ZP.get("代理与镜像源二选一即可"),tooltip:{title:c.ZP.get("代理地址, 支持HTTP(S)/SOCK5"),placement:"topLeft"},children:(0,x.jsxs)(d.Z.Group,{compact:!0,children:[(0,x.jsx)(d.Z,{placeholder:"http://1.1.1.1:8080",style:{width:250},value:null==a?void 0:a.dependenceProxy,onChange:function(e){n(i()(i()({},a),{},{dependenceProxy:e.target.value}))}}),(0,x.jsx)(p.Z,{type:"primary",loading:S,onClick:function(){_("dependence-proxy")},style:{width:100},children:c.ZP.get("确认")})]})}),(0,x.jsx)(l.Z.Item,{label:c.ZP.get("Node 软件包镜像源"),name:"node",tooltip:c.ZP.get("NPM 镜像源"),children:(0,x.jsxs)(d.Z.Group,{compact:!0,children:[(0,x.jsx)(d.Z,{style:{width:250},placeholder:"https://registry.npmmirror.com",value:null==a?void 0:a.nodeMirror,onChange:function(e){n(i()(i()({},a),{},{nodeMirror:e.target.value}))}}),(0,x.jsx)(p.Z,{type:"primary",loading:S,onClick:function(){q("node-mirror")},style:{width:100},children:c.ZP.get("确认")})]})}),(0,x.jsx)(l.Z.Item,{label:c.ZP.get("Python 软件包镜像源"),name:"python",tooltip:c.ZP.get("PyPI 镜像源"),children:(0,x.jsxs)(d.Z.Group,{compact:!0,children:[(0,x.jsx)(d.Z,{style:{width:250},placeholder:"https://pypi.doubanio.com/simple/",value:null==a?void 0:a.pythonMirror,onChange:function(e){n(i()(i()({},a),{},{pythonMirror:e.target.value}))}}),(0,x.jsx)(p.Z,{type:"primary",loading:S,onClick:function(){_("python-mirror")},style:{width:100},children:c.ZP.get("确认")})]})}),(0,x.jsx)(l.Z.Item,{label:c.ZP.get("Linux 软件包镜像源"),name:"linux",tooltip:c.ZP.get("debian linux 镜像源"),children:(0,x.jsxs)(d.Z.Group,{compact:!0,children:[(0,x.jsx)(d.Z,{style:{width:250},placeholder:"http://mirrors.aliyun.com",value:null==a?void 0:a.linuxMirror,onChange:function(e){n(i()(i()({},a),{},{linuxMirror:e.target.value}))}}),(0,x.jsx)(p.Z,{type:"primary",loading:S,onClick:function(){q("linux-mirror")},style:{width:100},children:c.ZP.get("确认")})]})}),(0,x.jsx)(l.Z.Item,{label:c.ZP.get("清除依赖缓存"),name:"clean",tooltip:{title:c.ZP.get("清除依赖缓存"),placement:"topLeft"},children:(0,x.jsxs)(d.Z.Group,{compact:!0,children:[(0,x.jsx)(g.Z,{defaultValue:"node",style:{width:100},onChange:function(e){I(e)},options:[{label:"node",value:"node"},{label:"python3",value:"python3"}]}),(0,x.jsx)(p.Z,{type:"primary",loading:S,onClick:function(){var e;e=B,E(!0),w(""),f.W.put("".concat(h.Z.apiPrefix,"system/config/dependence-clean"),{type:e}).then((function(e){var t=e.code;e.data,200===t&&u.ZP.success(c.ZP.get("清除成功"))})).catch((function(e){console.log(e)})).finally((function(){return E(!1)}))},style:{width:100},children:c.ZP.get("确认")})]})})]}),(0,x.jsx)("pre",{style:{fontFamily:"Source Code Pro",zoom:.83,maxHeight:"100%",overflowY:"auto"},children:(0,x.jsx)(P(),{children:k})})]})}},42716:function(e,t,a){"use strict";a.r(t);var n=a(26068),i=a.n(n),r=a(15558),o=a.n(r),c=a(48305),s=a.n(c),l=a(72317),u=a(75271),d=a(50691),p=a(47667),g=a(63505),h=a(59816),f=a(45520),m=a(61508),P=a(93481),Z=a(46035),v=a(10948),y=a(3475),x=a(47508),b=a(16314),A=a(92294),k=a(28423),w=a(28068),j=a(88939),C=a(67303),S=a(59362),E=a(61160),M=a(85657),T=a(29774),B=a(98783),I=(a(68251),a(30502)),q=a(76433),_=a(53626),G=a(52676),D=d.Z.Text,L="demo"===window.__ENV__DeployEnv;t.default=function(){var e=(0,B.useOutletContext)(),t=e.headerStyle,a=e.isPhone,n=e.user,r=e.theme,c=e.reloadUser,d=e.reloadTheme,R=e.systemInfo,W=[{title:l.ZP.get("名称"),dataIndex:"name",key:"name"},{title:"Client ID",dataIndex:"client_id",key:"client_id",render:function(e,t){return(0,G.jsx)(D,{copyable:!0,children:t.client_id})}},{title:"Client Secret",dataIndex:"client_secret",key:"client_secret",render:function(e,t){return(0,G.jsx)(D,{copyable:{text:t.client_secret},children:"*******"})}},{title:l.ZP.get("权限"),dataIndex:"scopes",key:"scopes",width:500,render:function(e,t){return(0,G.jsx)("div",{style:{display:"flex",gap:4,flexWrap:"wrap"},children:t.scopes.map((function(e){return(0,G.jsx)(p.Z,{style:{marginRight:0},children:y.Z.scopesMap[e]},e)}))})}},{title:l.ZP.get("操作"),key:"action",render:function(e,t,n){var i=!a;return(0,G.jsxs)(g.Z,{size:"middle",style:{paddingLeft:8},children:[(0,G.jsx)(h.Z,{title:i?l.ZP.get("编辑"):"",children:(0,G.jsx)("a",{onClick:function(){return xe(t,n)},children:(0,G.jsx)(k.Z,{})})}),(0,G.jsx)(h.Z,{title:i?l.ZP.get("重置secret"):"",children:(0,G.jsx)("a",{onClick:function(){return Ae(t,n)},children:(0,G.jsx)(w.Z,{})})}),(0,G.jsx)(h.Z,{title:i?l.ZP.get("删除"):"",children:(0,G.jsx)("a",{onClick:function(){return be(t,n)},children:(0,G.jsx)(j.Z,{})})})]})}}],K=(0,u.useState)(!0),F=s()(K,2),N=F[0],V=F[1],z=(0,u.useState)([]),H=s()(z,2),O=H[0],U=H[1],Y=(0,u.useState)(!1),Q=s()(Y,2),X=Q[0],J=Q[1],$=(0,u.useState)(),ee=s()($,2),te=ee[0],ae=ee[1],ne=(0,u.useState)("security"),ie=s()(ne,2),re=ie[0],oe=ie[1],ce=(0,u.useState)([]),se=s()(ce,2),le=se[0],ue=se[1],de=(0,u.useState)(),pe=s()(de,2),ge=pe[0],he=pe[1],fe=(0,u.useRef)(null),me=(0,u.useState)(0),Pe=s()(me,2),Ze=Pe[0],ve=Pe[1];(0,I.Z)(fe,(function(e){var t,a=null===(t=e.target)||void 0===t?void 0:t.offsetHeight;a&&Ze!==a-101&&ve(a-101)}));var ye=function(){V(!0),b.W.get("".concat(y.Z.apiPrefix,"apps")).then((function(e){var t=e.code,a=e.data;200===t&&U(a)})).finally((function(){return V(!1)}))},xe=function(e,t){ae(e),J(!0)},be=function(e,t){f.Z.confirm({title:l.ZP.get("确认删除"),content:(0,G.jsxs)(G.Fragment,{children:[l.ZP.get("确认删除应用")," ",(0,G.jsx)(D,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",l.ZP.get("吗")]}),onOk:function(){b.W.delete("".concat(y.Z.apiPrefix,"apps"),{data:[e.id]}).then((function(e){var a=e.code;e.data;if(200===a){m.ZP.success(l.ZP.get("删除成功"));var n=o()(O);n.splice(t,1),U(n)}}))}})},Ae=function(e,t){f.Z.confirm({title:l.ZP.get("确认重置"),content:(0,G.jsxs)(G.Fragment,{children:[l.ZP.get("确认重置应用")," ",(0,G.jsx)(D,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",l.ZP.get("的Secret吗"),(0,G.jsx)("br",{}),(0,G.jsx)(D,{type:"secondary",children:l.ZP.get("重置Secret会让当前应用所有token失效")})]}),onOk:function(){b.W.put("".concat(y.Z.apiPrefix,"apps/").concat(e.id,"/reset-secret")).then((function(e){var t=e.code,a=e.data;200===t&&(m.ZP.success(l.ZP.get("重置成功")),ke(a))}))}})},ke=function(e){var t=O.findIndex((function(t){return t.id===e.id})),a=o()(O);-1===t?a.push(e):a.splice(t,1,i()({},e)),U(a)},we=function(){b.W.get("".concat(y.Z.apiPrefix,"user/notification")).then((function(e){var t=e.code,a=e.data;200===t&&he(a)})).catch((function(e){console.log(e)}))};return(0,u.useEffect)((function(){L&&ye()}),[]),(0,G.jsxs)(x.ZP,{className:"ql-container-wrapper ql-container-wrapper-has-tab ql-setting-container",title:l.ZP.get("系统设置"),header:{style:t},extra:"app"===re?[(0,G.jsx)(P.Z,{type:"primary",onClick:function(){return ae(null),void J(!0)},children:l.ZP.get("创建应用")},"2")]:[],children:[(0,G.jsx)("div",{ref:fe,style:{height:"100%"},children:(0,G.jsx)(Z.Z,{style:{height:"100%"},defaultActiveKey:"security",size:"small",tabPosition:"top",onChange:function(e){oe(e),"app"===e?ye():"login"===e?b.W.get("".concat(y.Z.apiPrefix,"user/login-log")).then((function(e){var t=e.code,a=e.data;200===t&&ue(a)})).catch((function(e){console.log(e)})):"notification"===e&&we()},destroyInactiveTabPane:!0,items:[].concat(o()(L?[]:[{key:"security",label:l.ZP.get("安全设置"),children:(0,G.jsx)(C.default,{user:n,userChange:c})}]),[{key:"app",label:l.ZP.get("应用设置"),children:(0,G.jsx)(v.Z,{columns:W,pagination:!1,dataSource:O,rowKey:"id",size:"middle",scroll:{x:1e3,y:Ze},loading:N})},{key:"notification",label:l.ZP.get("通知设置"),children:(0,G.jsx)(E.default,{data:ge})},{key:"syslog",label:l.ZP.get("系统日志"),children:(0,G.jsx)(q.default,{height:Ze,theme:r})},{key:"login",label:l.ZP.get("登录日志"),children:(0,G.jsx)(S.default,{height:Ze,data:le})},{key:"dependence",label:l.ZP.get("依赖设置"),children:(0,G.jsx)(_.default,{})},{key:"other",label:l.ZP.get("其他设置"),children:(0,G.jsx)(M.default,{reloadTheme:d,systemInfo:R})},{key:"about",label:l.ZP.get("关于"),children:(0,G.jsx)(T.default,{systemInfo:R})}])})}),X&&(0,G.jsx)(A.default,{handleCancel:function(e){J(!1),e&&ke(e)},app:te})]})}},59362:function(e,t,a){"use strict";a.r(t);var n=a(72317),i=(a(75271),a(50691)),r=a(47667),o=a(10948),c=a(16483),s=a.n(c),l=a(52676),u=(i.Z.Text,i.Z.Link,function(e){return e[e["成功"]=0]="成功",e[e["失败"]=1]="失败",e}(u||{})),d=function(e){return e[e.success=0]="success",e[e.error=1]="error",e}(d||{}),p=[{title:n.ZP.get("序号"),width:50,render:function(e,t,a){return a+1}},{title:n.ZP.get("登录时间"),dataIndex:"timestamp",key:"timestamp",width:120,render:function(e,t){return s()(t.timestamp).format("YYYY-MM-DD HH:mm:ss")}},{title:n.ZP.get("登录地址"),dataIndex:"address",width:120,key:"address"},{title:n.ZP.get("登录IP"),dataIndex:"ip",width:100,key:"ip"},{title:n.ZP.get("登录设备"),dataIndex:"platform",key:"platform",width:80},{title:n.ZP.get("登录状态"),dataIndex:"status",key:"status",width:80,render:function(e,t){return(0,l.jsx)(r.Z,{color:d[t.status],style:{marginRight:0},children:n.ZP.get(u[t.status])})}}];t.default=function(e){var t=e.data,a=e.height;return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(o.Z,{columns:p,pagination:!1,dataSource:t,rowKey:"id",size:"middle",scroll:{x:1e3,y:a}})})}},61160:function(e,t,a){"use strict";a.r(t);var n=a(26068),i=a.n(n),r=a(48305),o=a.n(r),c=a(72317),s=a(75271),l=a(35181),u=a(72338),d=a(61508),p=a(17082),g=a(93481),h=a(16314),f=a(3475),m=a(52676),P=l.Z.Option;t.default=function(e){var t=e.data,a=(0,s.useState)(!1),n=o()(a,2),r=n[0],Z=n[1],v=(0,s.useState)("closed"),y=o()(v,2),x=y[0],b=y[1],A=(0,s.useState)([]),k=o()(A,2),w=k[0],j=k[1],C=u.Z.useForm(),S=o()(C,1)[0],E=function(e){b(e);var t=f.Z.notificationModeMap[e];j(t||[])};return(0,s.useEffect)((function(){t&&t.type&&(E(t.type),S.setFieldsValue(i()({},t)))}),[t]),(0,m.jsx)("div",{children:(0,m.jsxs)(u.Z,{onFinish:function(e){Z(!0),"closed"==e.type&&(e.type=""),h.W.put("".concat(f.Z.apiPrefix,"user/notification"),e).then((function(t){var a=t.code;t.data;200===a&&d.ZP.success(e.type?c.ZP.get("通知发送成功"):c.ZP.get("通知关闭成功"))})).catch((function(e){console.log(e)})).finally((function(){return Z(!1)}))},form:S,layout:"vertical",children:[(0,m.jsx)(u.Z.Item,{label:c.ZP.get("通知方式"),name:"type",rules:[{required:!0}],style:{maxWidth:400},initialValue:x,children:(0,m.jsx)(l.Z,{onChange:E,disabled:r,children:f.Z.notificationModes.map((function(e){return(0,m.jsx)(P,{value:e.value,children:e.label},e.value)}))})}),w.map((function(e){return(0,m.jsx)(u.Z.Item,{label:e.label,name:e.label,extra:e.tip,rules:[{required:e.required}],style:{maxWidth:400},children:e.items?(0,m.jsx)(l.Z,{placeholder:e.placeholder||"".concat(c.ZP.get("请选择")," ").concat(e.label),disabled:r,children:e.items.map((function(e){return(0,m.jsx)(P,{value:e.value,children:e.label||e.value},e.value)}))}):(0,m.jsx)(p.Z.TextArea,{disabled:r,autoSize:{minRows:1,maxRows:5},placeholder:e.placeholder||"".concat(c.ZP.get("请输入")," ").concat(e.label)})},e.label)})),(0,m.jsx)(g.Z,{type:"primary",htmlType:"submit",disabled:r,children:r?c.ZP.get("测试中..."):c.ZP.get("保存")})]})})}},85657:function(e,t,a){"use strict";a.r(t);var n=a(26068),i=a.n(n),r=a(48305),o=a.n(r),c=a(72317),s=a(75271),l=a(72338),u=a(61508),d=a(45520),p=a(94747),g=a(17082),h=a(56646),f=a(93481),m=a(35181),P=a(6367),Z=a(32253),v=a(71571),y=a(3475),x=a(16314),b=a(73236),A=a(87105),k=(a(68251),a(79231)),w=a(84522),j=a(32916),C=a(19334),S=a.n(C),E=a(48916),M=a(97302),T=a(52676),B={"log-remove-frequency":"logRemoveFrequency","cron-concurrency":"cronConcurrency",timezone:"timezone"},I=[{value:"base",label:c.ZP.get("基础数据"),disabled:!0},{value:"config",label:c.ZP.get("配置文件")},{value:"scripts",label:c.ZP.get("脚本文件")},{value:"log",label:c.ZP.get("日志文件")},{value:"deps",label:c.ZP.get("依赖文件")},{value:"syslog",label:c.ZP.get("系统日志")},{value:"dep_cache",label:c.ZP.get("依赖缓存")},{value:"raw",label:c.ZP.get("远程脚本缓存")},{value:"repo",label:c.ZP.get("远程仓库缓存")},{value:"ssh.d",label:c.ZP.get("SSH 文件缓存")}];t.default=function(e){var t=e.systemInfo,a=e.reloadTheme,n=localStorage.getItem("qinglong_dark_theme")||"auto",r=(0,s.useState)(),C=o()(r,2),q=C[0],_=C[1],G=l.Z.useForm(),D=o()(G,1)[0],L=(0,s.useState)(!1),R=o()(L,2),W=R[0],K=R[1],F=(0,j.default)(c.ZP.get("上传")),N=(0,j.default)(c.ZP.get("下载")),V=(0,s.useState)(!1),z=o()(V,2),H=z[0],O=z[1],U=(0,s.useState)(["base"]),Y=o()(U,2),Q=Y[0],X=Y[1],J=v||{},$=J.enable,ee=J.disable,te=(J.exportGeneratedCSS,J.setFetchMethod),ae=J.auto,ne=function(e){x.W.put("".concat(y.Z.apiPrefix,"system/config/").concat(e),S()(q,B[e])).then((function(e){var t=e.code;e.data;200===t&&u.ZP.success(c.ZP.get("更新成功"))})).catch((function(e){console.log(e)}))};return(0,s.useEffect)((function(){x.W.get("".concat(y.Z.apiPrefix,"system/config")).then((function(e){var t=e.code,a=e.data;200===t&&a.info&&_(a.info)})).catch((function(e){console.log(e)}))}),[]),(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(l.Z,{layout:"vertical",form:D,children:[(0,T.jsx)(l.Z.Item,{label:c.ZP.get("主题"),name:"theme",initialValue:n,children:(0,T.jsxs)(p.ZP.Group,{onChange:function(e){var t=e.target.value;localStorage.setItem("qinglong_dark_theme",e.target.value),te(fetch),"dark"===t?$({}):"light"===t?ee():ae({}),a()},value:n,optionType:"button",buttonStyle:"solid",children:[(0,T.jsx)(p.ZP.Button,{value:"light",style:{width:70,textAlign:"center"},children:c.ZP.get("亮色")}),(0,T.jsx)(p.ZP.Button,{value:"dark",style:{width:66,textAlign:"center"},children:c.ZP.get("暗色")}),(0,T.jsx)(p.ZP.Button,{value:"auto",style:{width:129,textAlign:"center"},children:c.ZP.get("跟随系统")})]})}),(0,T.jsx)(l.Z.Item,{label:c.ZP.get("日志删除频率"),name:"frequency",tooltip:c.ZP.get("每x天自动删除x天以前的日志"),children:(0,T.jsxs)(g.Z.Group,{compact:!0,children:[(0,T.jsx)(h.Z,{addonBefore:c.ZP.get("每"),addonAfter:c.ZP.get("天"),style:{width:180},min:0,value:null==q?void 0:q.logRemoveFrequency,onChange:function(e){_(i()(i()({},q),{},{logRemoveFrequency:e}))}}),(0,T.jsx)(f.Z,{type:"primary",onClick:function(){ne("log-remove-frequency")},style:{width:84},children:c.ZP.get("确认")})]})}),(0,T.jsx)(l.Z.Item,{label:c.ZP.get("定时任务并发数"),name:"frequency",children:(0,T.jsxs)(g.Z.Group,{compact:!0,children:[(0,T.jsx)(h.Z,{style:{width:180},min:1,value:null==q?void 0:q.cronConcurrency,onChange:function(e){_(i()(i()({},q),{},{cronConcurrency:e}))}}),(0,T.jsx)(f.Z,{type:"primary",onClick:function(){ne("cron-concurrency")},style:{width:84},children:c.ZP.get("确认")})]})}),(0,T.jsx)(l.Z.Item,{label:c.ZP.get("时区"),name:"timezone",children:(0,T.jsxs)(g.Z.Group,{compact:!0,children:[(0,T.jsx)(m.Z,{value:null==q?void 0:q.timezone,style:{width:180},onChange:function(e){_(i()(i()({},q),{},{timezone:e}))},options:M.z.map((function(e){return{value:e,label:e}})),showSearch:!0,filterOption:function(e,t){var a;return(null==t||null===(a=t.value)||void 0===a?void 0:a.toLowerCase().indexOf(e.toLowerCase()))>=0}}),(0,T.jsx)(f.Z,{type:"primary",onClick:function(){ne("timezone")},style:{width:84},children:c.ZP.get("确认")})]})}),(0,T.jsx)(l.Z.Item,{label:c.ZP.get("语言"),name:"lang",children:(0,T.jsx)(m.Z,{defaultValue:localStorage.getItem("lang")||"",style:{width:264},onChange:function(e){localStorage.setItem("lang",e),setTimeout((function(){window.location.reload()}),500)},options:[{value:"",label:c.ZP.get("跟随系统")},{value:"zh",label:"简体中文"},{value:"en",label:"English"}]})}),(0,T.jsxs)(l.Z.Item,{label:c.ZP.get("数据备份还原"),name:"frequency",children:[(0,T.jsx)(f.Z,{type:"primary",onClick:function(){X(["base"]),O(!0)},loading:W,children:W?c.ZP.get("生成数据中..."):c.ZP.get("备份")}),(0,T.jsx)(P.Z,{method:"put",showUploadList:!1,maxCount:1,action:"".concat(y.Z.apiPrefix,"system/data/import"),onChange:function(e){var t=e.file,a=e.event;null!=a&&a.percent&&F(Math.min(parseFloat(null==a?void 0:a.percent.toFixed(1)),99)),"done"===t.status&&(F(100),d.Z.confirm({width:600,maskClosable:!1,title:c.ZP.get("确认重启"),centered:!0,content:(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("div",{children:c.ZP.get("备份数据上传成功,确认覆盖数据")}),(0,T.jsxs)("div",{children:[c.ZP.get("如果恢复失败,可进入容器执行")," ql reload data"]})]}),okText:c.ZP.get("重启"),onOk:function(){x.W.put("".concat(y.Z.apiPrefix,"update/data")).then((function(){u.ZP.success({content:(0,T.jsxs)("span",{children:[c.ZP.get("系统将在"),(0,T.jsx)(w.Z,{className:"inline-countdown",format:"ss",value:Date.now()+3e4}),c.ZP.get("秒后自动刷新")]}),duration:30}),(0,E.o4)(),setTimeout((function(){window.location.reload()}),3e4)})).catch((function(e){console.log(e)}))}})),"error"===t.status&&u.ZP.error("上传失败")},name:"data",headers:{Authorization:"Bearer ".concat(localStorage.getItem(y.Z.authKey))},children:(0,T.jsx)(f.Z,{icon:(0,T.jsx)(k.Z,{}),style:{marginLeft:8},children:c.ZP.get("还原数据")})})]}),(0,T.jsx)(l.Z.Item,{label:c.ZP.get("检查更新"),name:"update",children:(0,T.jsx)(b.default,{systemInfo:t})})]}),(0,T.jsx)(d.Z,{title:c.ZP.get("选择备份模块"),open:H,onOk:function(){K(!0),x.W.put("".concat(y.Z.apiPrefix,"system/data/export"),{type:Q},{responseType:"blob",timeout:864e5,onDownloadProgress:function(e){e.progress&&N(parseFloat((100*e.progress).toFixed(1)))}}).then((function(e){(0,A.saveAs)(e,"data.tgz")})).catch((function(e){console.log(e)})).finally((function(){K(!1),O(!1)}))},onCancel:function(){return O(!1)},okText:c.ZP.get("开始备份"),cancelText:c.ZP.get("取消"),okButtonProps:{loading:W},children:(0,T.jsx)(Z.Z.Group,{value:Q,onChange:function(e){X(e)},style:{width:"100%",display:"flex",flexWrap:"wrap",gap:"8px 16px"},children:I.map((function(e){return(0,T.jsx)(Z.Z,{value:e.value,disabled:e.disabled,style:{marginLeft:0},children:e.label},e.value)}))})})]})}},32916:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return l}});var n=a(72317),i=a(46016),r=a(45520),o=a(75271),c=a(52676),s=function(e){var t=e.percent;return(0,c.jsx)(i.Z,{style:{display:"flex",justifyContent:"center"},type:"circle",percent:t})};function l(e){var t=(0,o.useRef)();return function(a){t.current?(t.current.update({title:"".concat(e).concat(a>=100?n.ZP.get("成功"):n.ZP.get("中...")),content:(0,c.jsx)(s,{percent:a}),okButtonProps:{disabled:100!==a}}),100===a&&setTimeout((function(){var e;null===(e=t.current)||void 0===e||e.destroy(),t.current=null}))):t.current=r.Z.info({width:600,maskClosable:!1,title:"".concat(e).concat(a>=100?n.ZP.get("成功"):n.ZP.get("中...")),centered:!0,content:(0,c.jsx)(s,{percent:a}),okButtonProps:{disabled:!0}})}}},67303:function(e,t,a){"use strict";a.r(t);var n=a(48305),i=a.n(n),r=a(72317),o=a(75271),c=a(50691),s=a(61508),l=a(17082),u=a(93481),d=a(72338),p=a(70892),g=a(6367),h=a(16314),f=a(3475),m=a(98783),P=a(63392),Z=a.n(P),v=a(34014),y=a(1371),x=a(79231),b=a(69822),A=(a(94095),a(52676)),k=c.Z.Title,w=c.Z.Link;t.default=function(e){var t=e.user,a=e.userChange,n=(0,o.useState)(!1),c=i()(n,2),P=c[0],j=c[1],C=(0,o.useState)(),S=i()(C,2),E=S[0],M=S[1],T=(0,o.useState)(!1),B=i()(T,2),I=B[0],q=B[1],_=(0,o.useState)(),G=i()(_,2),D=G[0],L=G[1],R=(0,o.useState)(),W=i()(R,2),K=W[0],F=W[1],N=(0,o.useState)(),V=i()(N,2),z=V[0],H=V[1],O=function(){h.W.put("".concat(f.Z.apiPrefix,"user/two-factor/deactive")).then((function(e){var t=e.code,n=e.data;200===t&&n&&(M(!1),a())})).catch((function(e){console.log(e)}))},U=function(){h.W.get("".concat(f.Z.apiPrefix,"user/two-factor/init")).then((function(e){var t=e.code,a=e.data;200===t&&L(a)})).catch((function(e){console.log(e)}))};return(0,o.useEffect)((function(){M(t&&t.twoFactorActivated),H(t.avatar&&"".concat(f.Z.apiPrefix,"static/").concat(t.avatar))}),[t]),I?(0,A.jsx)(A.Fragment,{children:D?(0,A.jsxs)("div",{children:[(0,A.jsx)(k,{level:5,children:r.ZP.get("第一步")}),r.ZP.get("下载两步验证手机应用,比如 Google Authenticator 、"),(0,A.jsx)(w,{href:"https://www.microsoft.com/en-us/security/mobile-authenticator-app",target:"_blank",children:"Microsoft Authenticator"}),"、",(0,A.jsx)(w,{href:"https://authy.com/download/",target:"_blank",children:"Authy"}),"、",(0,A.jsx)(w,{href:"https://support.1password.com/one-time-passwords/",target:"_blank",children:"1Password"}),"、",(0,A.jsx)(w,{href:"https://support.logmeininc.com/lastpass/help/lastpass-authenticator-lp030014",target:"_blank",children:"LastPass Authenticator"}),(0,A.jsx)(k,{style:{marginTop:5},level:5,children:r.ZP.get("第二步")}),r.ZP.get("使用手机应用扫描二维码,或者输入秘钥")," ",null==D?void 0:D.secret,(0,A.jsx)("div",{style:{marginTop:10},children:(0,A.jsx)(Z(),{style:{border:"1px solid #21262d",borderRadius:6},includeMargin:!0,size:187,value:null==D?void 0:D.url})}),(0,A.jsx)(k,{style:{marginTop:5},level:5,children:r.ZP.get("第三步")}),r.ZP.get("输入手机应用上的6位数字"),(0,A.jsx)(l.Z,{style:{margin:"10px 0 10px 0",display:"block",maxWidth:200},value:K,onChange:function(e){return F(e.target.value)},placeholder:"123456"}),(0,A.jsx)(u.Z,{type:"primary",loading:P,onClick:function(){j(!0),h.W.put("".concat(f.Z.apiPrefix,"user/two-factor/active"),{code:K}).then((function(e){var t=e.code,n=e.data;200===t&&(n?(s.ZP.success(r.ZP.get("激活成功")),q(!1),M(!0),a()):s.ZP.success(r.ZP.get("验证失败")))})).catch((function(e){console.log(e)})).finally((function(){return j(!1)}))},children:r.ZP.get("完成设置")})]}):(0,A.jsx)(v.Z,{})}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)("div",{style:{fontSize:18,borderBottom:"1px solid #f0f0f0",marginBottom:8,paddingBottom:4},children:r.ZP.get("修改用户名密码")}),(0,A.jsxs)(d.Z,{onFinish:function(e){h.W.put("".concat(f.Z.apiPrefix,"user"),{username:e.username,password:e.password}).then((function(e){var t=e.code;e.data;200===t&&(localStorage.removeItem(f.Z.authKey),m.history.push("/login"))})).catch((function(e){console.log(e)}))},layout:"vertical",children:[(0,A.jsx)(d.Z.Item,{label:r.ZP.get("用户名"),name:"username",rules:[{required:!0}],hasFeedback:!0,style:{maxWidth:300},children:(0,A.jsx)(l.Z,{autoComplete:"username",placeholder:r.ZP.get("用户名")})}),(0,A.jsx)(d.Z.Item,{label:r.ZP.get("密码"),name:"password",rules:[{required:!0},{pattern:/^(?!admin$).*$/,message:r.ZP.get("密码不能为admin")}],hasFeedback:!0,style:{maxWidth:300},children:(0,A.jsx)(l.Z,{type:"password",autoComplete:"current-password",placeholder:r.ZP.get("密码")})}),(0,A.jsx)(u.Z,{type:"primary",htmlType:"submit",children:r.ZP.get("保存")})]}),(0,A.jsx)("div",{style:{fontSize:18,borderBottom:"1px solid #f0f0f0",marginBottom:8,paddingBottom:4,marginTop:16},children:r.ZP.get("两步验证")}),(0,A.jsx)(u.Z,{type:"primary",danger:E,onClick:function(){E?O():(U(),q(!0))},children:E?r.ZP.get("禁用"):r.ZP.get("启用")}),(0,A.jsx)("div",{style:{fontSize:18,borderBottom:"1px solid #f0f0f0",marginBottom:8,paddingBottom:4,marginTop:16},children:r.ZP.get("头像")}),(0,A.jsx)(p.C,{size:128,shape:"square",icon:(0,A.jsx)(y.Z,{}),src:z}),(0,A.jsx)(b.Z,{rotationSlider:!0,children:(0,A.jsx)(g.Z,{method:"put",showUploadList:!1,maxCount:1,action:"".concat(f.Z.apiPrefix,"user/avatar"),onChange:function(e){e.file&&e.file.response&&(H("".concat(f.Z.apiPrefix,"static/").concat(e.file.response.data)),a())},name:"avatar",headers:{Authorization:"Bearer ".concat(localStorage.getItem(f.Z.authKey))},children:(0,A.jsx)(u.Z,{icon:(0,A.jsx)(x.Z,{}),style:{marginLeft:8},children:r.ZP.get("更换头像")})})})]})}},76433:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return O}});var n=a(90228),i=a.n(n),r=a(87999),o=a.n(r),c=a(48305),s=a.n(c),l=a(72317),u=a(75271),d=a(71742),p=a(19116),g=a(61508),h=a(93481),f=a(20553),m=a(98705),P=a(54075),Z=a(2727),v=a(16314),y=a(3475),x=a(31352),b=a(11333),A=a.n(b),k=a(25298),w=a.n(k),j=a(17069),C=a.n(j),S=a(82092),E=a.n(S),M=a(5174),T=a(80403),B=/\[ℹ️info/g,I=/\[⚠️debug/g,q=/\[❌warn/g,_=/\[🐛error/g,G="system-log-info",D="system-warn-info",L="system-error-info",R="system-debug-info",W=M.lg.fromClass(function(){function e(t){w()(this,e),E()(this,"decorations",void 0),this.decorations=this.getDecorations(t)}return C()(e,[{key:"update",value:function(e){e.docChanged&&(this.decorations=this.getDecorations(e.view))}},{key:"getDecorations",value:function(e){for(var t,a=new T.f_,n=e.state.doc.toString();null!==(t=B.exec(n));){var i=M.p.mark({class:G});a.add(t.index,t.index+t[0].length,i)}return a.finish()}}]),e}(),{decorations:function(e){return e.decorations}}),K=M.lg.fromClass(function(){function e(t){w()(this,e),E()(this,"decorations",void 0),this.decorations=this.getDecorations(t)}return C()(e,[{key:"update",value:function(e){e.docChanged&&(this.decorations=this.getDecorations(e.view))}},{key:"getDecorations",value:function(e){for(var t,a=new T.f_,n=e.state.doc.toString();null!==(t=q.exec(n));){var i=M.p.mark({class:D});a.add(t.index,t.index+t[0].length,i)}return a.finish()}}]),e}(),{decorations:function(e){return e.decorations}}),F=M.lg.fromClass(function(){function e(t){w()(this,e),E()(this,"decorations",void 0),this.decorations=this.getDecorations(t)}return C()(e,[{key:"update",value:function(e){e.docChanged&&(this.decorations=this.getDecorations(e.view))}},{key:"getDecorations",value:function(e){for(var t,a=new T.f_,n=e.state.doc.toString();null!==(t=I.exec(n));){var i=M.p.mark({class:R});a.add(t.index,t.index+t[0].length,i)}return a.finish()}}]),e}(),{decorations:function(e){return e.decorations}}),N=M.lg.fromClass(function(){function e(t){w()(this,e),E()(this,"decorations",void 0),this.decorations=this.getDecorations(t)}return C()(e,[{key:"update",value:function(e){e.docChanged&&(this.decorations=this.getDecorations(e.view))}},{key:"getDecorations",value:function(e){for(var t,a=new T.f_,n=e.state.doc.toString();null!==(t=_.exec(n));){var i=M.p.mark({class:L});a.add(t.index,t.index+t[0].length,i)}return a.finish()}}]),e}(),{decorations:function(e){return e.decorations}}),V=M.tk.baseTheme({".system-log-info":{color:"#2196F3"},".system-warn-info":{color:"#FFB827"},".system-error-info":{color:"#FA5151"},".system-debug-info":{color:"#009A29"}}),z=a(52676),H=p.Z.RangePicker,O=function(e){var t=e.height,a=e.theme,n=(0,u.useRef)(null),r=(0,u.useRef)(),c=(0,u.useState)(["",""]),p=s()(c,2),b=p[0],k=p[1],w=(0,u.useState)(""),j=s()(w,2),C=j[0],S=j[1],E=(0,x.Z)((function(){return v.W.get("".concat(y.Z.apiPrefix,"system/log?startTime=").concat(b[0],"&endTime=").concat(b[1]),{responseType:"blob"})}),{refreshDeps:[b],onSuccess:function(e){return o()(i()().mark((function t(){return i()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=S,t.next=3,e.text();case 3:t.t1=t.sent,(0,t.t0)(t.t1);case 5:case"end":return t.stop()}}),t)})))()}}),M=E.loading,T=E.refresh,B=function(e){n.current.scrollDOM.scrollTo({top:"start"===e?0:n.current.scrollDOM.scrollHeight})};return(0,z.jsxs)("div",{style:{position:"relative"},children:[(0,z.jsxs)("div",{children:[(0,z.jsx)(H,{style:{marginBottom:12,marginRight:12},disabledDate:function(e){return e>A()()||e<A()().subtract(7,"days")},defaultValue:[A()(),A()()],onOpenChange:function(e){r.current=!!e&&["",""]},onCalendarChange:function(e,t,a){var n=a.range;r.current&&"boolean"!=typeof r.current&&("start"===n&&(r.current[0]=t[0]),"end"===n&&(r.current[1]=t[1]),r.current[0]&&r.current[1]&&k(t))}}),(0,z.jsx)(h.Z,{onClick:function(){v.W.delete("".concat(y.Z.apiPrefix,"system/log")).then((function(e){g.ZP.success("删除成功"),T()}))},children:l.ZP.get("清空日志")})]}),C?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(d.ZP,{maxHeight:"".concat(t,"px"),value:C,onCreateEditor:function(e){n.current=e},extensions:[F,N,W,K,V],readOnly:!0,theme:a.includes("dark")?"dark":"light"}),(0,z.jsxs)("div",{style:{position:"absolute",bottom:20,right:20,display:"flex",flexDirection:"column",gap:10},children:[(0,z.jsx)(h.Z,{size:"small",icon:(0,z.jsx)(P.Z,{}),onClick:function(){B("start")}}),(0,z.jsx)(h.Z,{size:"small",icon:(0,z.jsx)(Z.Z,{}),onClick:function(){B("end")}})]})]}):M?(0,z.jsx)(f.Z,{}):(0,z.jsx)(m.Z,{image:m.Z.PRESENTED_IMAGE_SIMPLE})]})}},3475:function(e,t,a){"use strict";var n=a(72317),i=window.__ENV__QlBaseUrl||"/";t.Z={siteName:n.ZP.get("青龙"),baseUrl:i,apiPrefix:"".concat(i,"api/"),authKey:"token",layouts:[{name:"primary",include:[/.*/],exclude:[/(\/(en|zh))*\/login/]}],i18n:{languages:[{key:"pt-br",title:"Português",flag:"/portugal.svg"},{key:"en",title:"English",flag:"/america.svg"},{key:"zh",title:n.ZP.get("中文"),flag:"/china.svg"}],defaultLanguage:"en"},scopes:[{name:n.ZP.get("定时任务"),value:"crons"},{name:n.ZP.get("环境变量"),value:"envs"},{name:n.ZP.get("订阅管理"),value:"subscriptions"},{name:n.ZP.get("配置文件"),value:"configs"},{name:n.ZP.get("脚本管理"),value:"scripts"},{name:n.ZP.get("日志管理"),value:"logs"},{name:n.ZP.get("依赖管理"),value:"dependencies"},{name:n.ZP.get("系统信息"),value:"system"}],scopesMap:{crons:n.ZP.get("定时任务"),envs:n.ZP.get("环境变量"),subscriptions:n.ZP.get("订阅管理"),configs:n.ZP.get("配置文件"),scripts:n.ZP.get("脚本管理"),logs:n.ZP.get("日志管理"),dependencies:n.ZP.get("依赖管理"),system:n.ZP.get("系统信息")},notificationModes:[{value:"gotify",label:"Gotify"},{value:"ntfy",label:"Ntfy"},{value:"goCqHttpBot",label:"GoCqHttpBot"},{value:"serverChan",label:n.ZP.get("Server酱")},{value:"pushDeer",label:"PushDeer"},{value:"bark",label:"Bark"},{value:"telegramBot",label:n.ZP.get("Telegram机器人")},{value:"dingtalkBot",label:n.ZP.get("钉钉机器人")},{value:"weWorkBot",label:n.ZP.get("企业微信机器人")},{value:"weWorkApp",label:n.ZP.get("企业微信应用")},{value:"aibotk",label:n.ZP.get("智能微秘书")},{value:"iGot",label:"IGot"},{value:"pushPlus",label:"PushPlus"},{value:"wePlusBot",label:n.ZP.get("微加机器人")},{value:"wxPusherBot",label:"wxPusher"},{value:"chat",label:n.ZP.get("群晖chat")},{value:"email",label:n.ZP.get("邮箱")},{value:"lark",label:n.ZP.get("飞书机器人")},{value:"pushMe",label:"PushMe"},{value:"chronocat",label:"Chronocat"},{value:"webhook",label:n.ZP.get("自定义通知")},{value:"closed",label:n.ZP.get("已关闭")}],notificationModeMap:{gotify:[{label:"gotifyUrl",tip:n.ZP.get("gotify的url地址,例如 https://push.example.de:8080"),required:!0},{label:"gotifyToken",tip:n.ZP.get("gotify的消息应用token码"),required:!0},{label:"gotifyPriority",tip:n.ZP.get("推送消息的优先级")}],ntfy:[{label:"ntfyUrl",tip:n.ZP.get("ntfy的url地址,例如 https://ntfy.sh"),required:!0},{label:"ntfyTopic",tip:n.ZP.get("ntfy应用topic"),required:!0},{label:"ntfyPriority",tip:n.ZP.get("推送消息的优先级")},{label:"ntfyToken",tip:n.ZP.get("ntfy应用token")},{label:"ntfyUsername",tip:n.ZP.get("ntfy应用用户名")},{label:"ntfyPassword",tip:n.ZP.get("ntfy应用密码")},{label:"ntfyActions",tip:n.ZP.get("ntfy用户动作")}],chat:[{label:"synologyChatUrl",tip:n.ZP.get("synologyChat的url地址"),required:!0}],goCqHttpBot:[{label:"goCqHttpBotUrl",tip:n.ZP.get("推送到个人QQ: http://127.0.0.1/send_private_msg,群:http://127.0.0.1/send_group_msg"),required:!0},{label:"goCqHttpBotToken",tip:n.ZP.get("访问密钥"),required:!0},{label:"goCqHttpBotQq",tip:n.ZP.get("如果GOBOT_URL设置 /send_private_msg 则需要填入 user_id=个人QQ 相反如果是 /send_group_msg 则需要填入 group_id=QQ群"),required:!0}],serverChan:[{label:"serverChanKey",tip:n.ZP.get("Server酱SENDKEY"),required:!0}],pushDeer:[{label:"pushDeerKey",tip:n.ZP.get("PushDeer的Key,https://github.com/easychen/pushdeer"),required:!0},{label:"pushDeerUrl",tip:n.ZP.get("PushDeer的自架API endpoint,默认是 https://api2.pushdeer.com/message/push")}],bark:[{label:"barkPush",tip:n.ZP.get("Bark的信息IP/设备码,例如:https://api.day.app/XXXXXXXX"),required:!0},{label:"barkIcon",tip:n.ZP.get("BARK推送图标,自定义推送图标 (需iOS15或以上才能显示)")},{label:"barkSound",tip:n.ZP.get("BARK推送铃声,铃声列表去APP查看复制填写")},{label:"barkGroup",tip:n.ZP.get("BARK推送消息的分组,默认为qinglong")},{label:"barkLevel",tip:n.ZP.get("BARK推送消息的时效性,默认为active")},{label:"barkUrl",tip:n.ZP.get("BARK推送消息的跳转URL")},{label:"barkArchive",tip:n.ZP.get("BARK是否保存推送消息")}],telegramBot:[{label:"telegramBotToken",tip:n.ZP.get("telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw"),required:!0},{label:"telegramBotUserId",tip:n.ZP.get("telegram用户的id,例如:129xxx206"),required:!0},{label:"telegramBotProxyHost",tip:n.ZP.get("代理IP")},{label:"telegramBotProxyPort",tip:n.ZP.get("代理端口")},{label:"telegramBotProxyAuth",tip:n.ZP.get("telegram代理配置认证参数,用户名与密码用英文冒号连接 user:password")},{label:"telegramBotApiHost",tip:n.ZP.get("telegram api自建的反向代理地址,默认tg官方api")}],dingtalkBot:[{label:"dingtalkBotToken",tip:n.ZP.get("钉钉机器人webhook token,例如:5a544165465465645d0f31dca676e7bd07415asdasd"),required:!0},{label:"dingtalkBotSecret",tip:n.ZP.get("密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串")}],weWorkBot:[{label:"weWorkBotKey",tip:n.ZP.get("企业微信机器人的webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa"),required:!0},{label:"weWorkOrigin",tip:n.ZP.get("企业微信代理地址")}],weWorkApp:[{label:"weWorkAppKey",tip:n.ZP.get("corpid、corpsecret、touser(注:多个成员ID使用|隔开)、agentid、消息类型(选填,不填默认文本消息类型) 注意用,号隔开(英文输入法的逗号),例如:wwcfrs,B-76WERQ,qinglong,1000001,2COat"),required:!0},{label:"weWorkOrigin",tip:n.ZP.get("企业微信代理地址")}],aibotk:[{label:"aibotkKey",tip:n.ZP.get("密钥key,智能微秘书个人中心获取apikey,申请地址:https://wechat.aibotk.com/signup?from=ql"),required:!0},{label:"aibotkType",tip:n.ZP.get("发送的目标,群组或者好友"),required:!0,placeholder:n.ZP.get("请输入要发送的目标"),items:[{value:"room",label:n.ZP.get("群聊")},{value:"contact",label:n.ZP.get("好友")}]},{label:"aibotkName",tip:n.ZP.get("要发送的用户昵称或群名,如果目标是群,需要填群名,如果目标是好友,需要填好友昵称"),required:!0}],iGot:[{label:"iGotPushKey",tip:n.ZP.get("iGot的信息推送key,例如:https://push.hellyw.com/XXXXXXXX"),required:!0}],pushPlus:[{label:"pushPlusToken",tip:n.ZP.get("微信扫码登录后一对一推送或一对多推送下面的token(您的Token),不提供PUSH_PLUS_USER则默认为一对一推送,参考 https://www.pushplus.plus/"),required:!0},{label:"pushPlusUser",tip:n.ZP.get("一对多推送的“群组编码”(一对多推送下面->您的群组(如无则创建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送)")},{label:"pushplusTemplate",tip:n.ZP.get("发送模板")},{label:"pushplusChannel",tip:n.ZP.get("发送渠道")},{label:"pushplusWebhook",tip:n.ZP.get("webhook编码")},{label:"pushplusCallbackUrl",tip:n.ZP.get("发送结果回调地址")},{label:"pushplusTo",tip:n.ZP.get("好友令牌")}],wePlusBot:[{label:"wePlusBotToken",tip:n.ZP.get("用户令牌,扫描登录后 我的—>设置->令牌 中获取,参考 https://www.weplusbot.com/"),required:!0},{label:"wePlusBotReceiver",tip:n.ZP.get("消息接收人")},{label:"wePlusBotVersion",tip:n.ZP.get("调用版本;专业版填写pro,个人版填写personal,为空默认使用专业版")}],wxPusherBot:[{label:"wxPusherBotAppToken",tip:n.ZP.get("wxPusherBot的appToken"),required:!0},{label:"wxPusherBotTopicIds",tip:n.ZP.get("wxPusherBot的topicIds"),required:!1},{label:"wxPusherBotUids",tip:n.ZP.get("wxPusherBot的uids"),required:!1}],lark:[{label:"larkKey",tip:n.ZP.get("飞书群组机器人:https://www.feishu.cn/hc/zh-CN/articles/360024984973"),required:!0}],email:[{label:"emailService",tip:n.ZP.get("邮箱服务名称,比如126、163、Gmail、QQ等,支持列表https://github.com/nodemailer/nodemailer/blob/master/lib/well-known/services.json"),required:!0},{label:"emailUser",tip:n.ZP.get("邮箱认证地址"),required:!0},{label:"emailPass",tip:n.ZP.get("SMTP 登录密码,也可能为特殊口令,视具体邮件服务商说明而定"),required:!0},{label:"emailTo",tip:n.ZP.get("收件邮箱地址,多个分号分隔,默认发送给发件邮箱地址")}],pushMe:[{label:"pushMeKey",tip:n.ZP.get("PushMe的Key,https://push.i-i.me/"),required:!0},{label:"pushMeUrl",tip:n.ZP.get("自建的PushMeServer消息接口地址,例如:http://127.0.0.1:3010,不填则使用官方消息接口"),required:!1}],chronocat:[{label:"chronocatURL",tip:n.ZP.get("Chronocat Red 服务的连接地址 https://chronocat.vercel.app/install/docker/official/"),required:!0},{label:"chronocatQQ",tip:n.ZP.get("个人:user_id=个人QQ 群则填入group_id=QQ群 多个用英文;隔开同时支持个人和群 如:user_id=xxx;group_id=xxxx;group_id=xxxxx"),required:!0},{label:"chronocatToken",tip:n.ZP.get("docker安装在持久化config目录下的chronocat.yml文件可找到"),required:!0}],webhook:[{label:"webhookMethod",tip:n.ZP.get("请求方法"),required:!0,items:[{value:"GET"},{value:"POST"},{value:"PUT"}]},{label:"webhookContentType",tip:n.ZP.get("请求头Content-Type"),required:!0,items:[{value:"text/plain"},{value:"application/json"},{value:"multipart/form-data"},{value:"application/x-www-form-urlencoded"}]},{label:"webhookUrl",tip:n.ZP.get("请求链接以http或者https开头。url或者body中必须包含$title,$content可选,对应api内容的位置"),required:!0,placeholder:"https://xxx.cn/api?content=$title\n"},{label:"webhookHeaders",tip:n.ZP.get("请求头格式Custom-Header1: Header1,多个换行分割"),placeholder:"Custom-Header1: Header1\nCustom-Header2: Header2"},{label:"webhookBody",tip:n.ZP.get("请求体格式key1: value1,多个换行分割。url或者body中必须包含$title,$content可选,对应api内容的位置"),placeholder:"key1: $title\nkey2: $content"}]},documentTitleMap:{"/login":n.ZP.get("登录"),"/initialization":n.ZP.get("初始化"),"/crontab":n.ZP.get("定时任务"),"/env":n.ZP.get("环境变量"),"/subscription":n.ZP.get("订阅管理"),"/config":n.ZP.get("配置文件"),"/script":n.ZP.get("脚本管理"),"/diff":n.ZP.get("对比工具"),"/log":n.ZP.get("日志管理"),"/setting":n.ZP.get("系统设置"),"/error":n.ZP.get("错误日志"),"/dependence":n.ZP.get("依赖管理")},dependenceTypes:["nodejs","python3","linux"]}},97302:function(e,t,a){"use strict";a.d(t,{eY:function(){return n},um:function(){return i},z:function(){return r}});var n="     ",i={".py":"python",".js":"javascript",".mjs":"javascript",".sh":"shell",".ts":"typescript",".ini":"ini",".json":"json"},r=["UTC","Africa/Abidjan","Africa/Accra","Africa/Addis Ababa","Africa/Algiers","Africa/Asmara","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar es Salaam","Africa/Djibouti","Africa/Douala","Africa/El Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao Tome","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/Buenos Aires","America/Argentina/Catamarca","America/Argentina/Cordoba","America/Argentina/Jujuy","America/Argentina/La Rioja","America/Argentina/Mendoza","America/Argentina/Rio Gallegos","America/Argentina/Salta","America/Argentina/San Juan","America/Argentina/San Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Atikokan","America/Bahia","America/Bahia Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa Vista","America/Bogota","America/Boise","America/Cambridge Bay","America/Campo Grande","America/Cancun","America/Caracas","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Ciudad Juarez","America/Costa Rica","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El Salvador","America/Fort Nelson","America/Fortaleza","America/Glace Bay","America/Goose Bay","America/Grand Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Indianapolis","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Inuvik","America/Iqaluit","America/Jamaica","America/Juneau","America/Kentucky/Louisville","America/Kentucky/Monticello","America/Kralendijk","America/La Paz","America/Lima","America/Los Angeles","America/Lower Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Menominee","America/Merida","America/Metlakatla","America/Mexico City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Montserrat","America/Nassau","America/New York","America/Nome","America/Noronha","America/North Dakota/Beulah","America/North Dakota/Center","America/North Dakota/New Salem","America/Nuuk","America/Ojinaga","America/Panama","America/Paramaribo","America/Phoenix","America/Port of Spain","America/Port-au-Prince","America/Porto Velho","America/Puerto Rico","America/Punta Arenas","America/Rankin Inlet","America/Recife","America/Regina","America/Resolute","America/Rio Branco","America/Santarem","America/Santiago","America/Santo Domingo","America/Sao Paulo","America/Scoresbysund","America/Sitka","America/St Barthelemy","America/St Johns","America/St Kitts","America/St Lucia","America/St Thomas","America/St Vincent","America/Swift Current","America/Tegucigalpa","America/Thule","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Whitehorse","America/Winnipeg","America/Yakutat","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/McMurdo","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Arctic/Longyearbyen","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Atyrau","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Chita","Asia/Choibalsan","Asia/Colombo","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Hebron","Asia/Ho Chi Minh","Asia/Hong Kong","Asia/Hovd","Asia/Irkutsk","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Kathmandu","Asia/Khandyga","Asia/Kolkata","Asia/Krasnoyarsk","Asia/Kuala Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Riyadh","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ulaanbaatar","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yangon","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape Verde","Atlantic/Faroe","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South Georgia","Atlantic/St Helena","Atlantic/Stanley","Australia/Adelaide","Australia/Brisbane","Australia/Broken Hill","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/Lindeman","Australia/Lord Howe","Australia/Melbourne","Australia/Perth","Australia/Sydney","Etc/GMT","Etc/GMT+1","Etc/GMT+10","Etc/GMT+11","Etc/GMT+12","Etc/GMT+2","Etc/GMT+3","Etc/GMT+4","Etc/GMT+5","Etc/GMT+6","Etc/GMT+7","Etc/GMT+8","Etc/GMT+9","Etc/GMT-1","Etc/GMT-10","Etc/GMT-11","Etc/GMT-12","Etc/GMT-13","Etc/GMT-14","Etc/GMT-2","Etc/GMT-3","Etc/GMT-4","Etc/GMT-5","Etc/GMT-6","Etc/GMT-7","Etc/GMT-8","Etc/GMT-9","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle of Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kirov","Europe/Kyiv","Europe/Lisbon","Europe/Ljubljana","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San Marino","Europe/Sarajevo","Europe/Saratov","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Ulyanovsk","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zurich","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Chuuk","Pacific/Easter","Pacific/Efate","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Kanton","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Pohnpei","Pacific/Port Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Wake","Pacific/Wallis"]},16314:function(e,t,a){"use strict";a.d(t,{W:function(){return P}});var n=a(90228),i=a.n(n),r=a(87999),o=a.n(r),c=a(72317),s=a(61508),l=a(33839),u=a(3475),d=a(98783),p=a(69313),g=a(52676);s.ZP.config({duration:2});var h=Date.now(),f=p.Z.create({timeout:6e4,params:{t:h}}),m=["/api/user/login","/open/auth/token","/api/user/two-factor/login","/api/system","/api/user/init","/api/user/notification/init"];f.interceptors.request.use((function(e){var t=localStorage.getItem(u.Z.authKey);return t&&!m.includes(e.url)?(e.headers.Authorization="Bearer ".concat(t),e):e})),f.interceptors.response.use(function(){var e=o()(i()().mark((function e(t){var a,n,r;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.status,![502,504].includes(a)){e.next=5;break}d.history.push("/error"),e.next=18;break;case 5:if(401!==a){e.next=9;break}"/login"!==d.history.location.pathname&&(localStorage.removeItem(u.Z.authKey),d.history.push("/login")),e.next=18;break;case 9:return e.prev=9,200!==(n=t.data).code&&(r=n.message||n.data)&&l.Z.error({message:r,description:null!=n&&n.errors?(0,g.jsx)(g.Fragment,{children:null==n?void 0:n.errors.map((function(e){return(0,g.jsx)("div",{children:e.message})}))}):void 0}),e.abrupt("return",n);case 15:e.prev=15,e.t0=e.catch(9);case 17:case 18:return e.abrupt("return",t);case 19:case"end":return e.stop()}}),e,null,[[9,15]])})));return function(t){return e.apply(this,arguments)}}(),(function(e){if(e.response){var t=e.response.data?e.response.data.message||e.message:e.response.statusText,a=e.response.status;if([502,504].includes(a))d.history.push("/error");else if(401===a)"/login"!==d.history.location.pathname&&(s.ZP.error(c.ZP.get("登录已过期,请重新登录")),localStorage.removeItem(u.Z.authKey),d.history.push("/login"));else{var n,i,r,o;if("function"==typeof(null===(n=e.config)||void 0===n?void 0:n.onError))return null===(o=e.config)||void 0===o?void 0:o.onError(e.response);t&&l.Z.error({message:t,description:null!==(i=e.response)&&void 0!==i&&null!==(i=i.data)&&void 0!==i&&i.errors?(0,g.jsx)(g.Fragment,{children:null===(r=e.response)||void 0===r||null===(r=r.data)||void 0===r||null===(r=r.errors)||void 0===r?void 0:r.map((function(e){return(0,g.jsxs)("div",{children:[e.message," (",e.value,")"]})}))}):void 0})}}else console.log(e.message);return Promise.reject(e)}));var P=f},48916:function(e,t,a){"use strict";a.d(t,{DY:function(){return g},FA:function(){return f},H$:function(){return Z},I1:function(){return p},W9:function(){return u},ZP:function(){return l},o4:function(){return v},rS:function(){return P},w7:function(){return d},x$:function(){return h}});var n=a(15558),i=a.n(n),r=a(72317),o=a(97302),c=a(94046),s=a.n(c);function l(){var e=navigator.userAgent.toLowerCase(),t=function(t){return t.test(e)},a=function(t){return(e.match(t)||[]).toString().replace(/[^0-9|_.]/g,"").replace(/_/g,".")},n="unknow";t(/windows|win32|win64|wow32|wow64/g)?n="windows":t(/macintosh|macintel/g)?n="macos":t(/x11/g)?n="linux":t(/android|adr/g)?n="android":t(/ios|iphone|ipad|ipod|iwatch/g)&&(n="ios");var i="unknow";"windows"===n?t(/windows nt 5.0|windows 2000/g)?i="2000":t(/windows nt 5.1|windows xp/g)?i="xp":t(/windows nt 5.2|windows 2003/g)?i="2003":t(/windows nt 6.0|windows vista/g)?i="vista":t(/windows nt 6.1|windows 7/g)?i="7":t(/windows nt 6.2|windows 8/g)?i="8":t(/windows nt 6.3|windows 8.1/g)?i="8.1":t(/windows nt 10.0|windows 10/g)&&(i="10"):"macos"===n?i=a(/os x [\d._]+/g):"android"===n?i=a(/android [\d._]+/g):"ios"===n&&(i=a(/os [\d._]+/g));var r="unknow";"windows"===n||"macos"===n||"linux"===n?r="desktop":("android"===n||"ios"===n||t(/mobile/g))&&(r="mobile");var o="unknow",c="unknow";t(/applewebkit/g)?(o="webkit",t(/edge/g)?c="edge":t(/opr/g)?c="opera":t(/chrome/g)?c="chrome":t(/safari/g)&&(c="safari")):t(/gecko/g)&&t(/firefox/g)?(o="gecko",c="firefox"):t(/presto/g)?(o="presto",c="opera"):t(/trident|compatible|msie/g)&&(o="trident",c="iexplore");var s="unknow";"webkit"===o?s=a(/applewebkit\/[\d._]+/g):"gecko"===o?s=a(/gecko\/[\d._]+/g):"presto"===o?s=a(/presto\/[\d._]+/g):"trident"===o&&(s=a(/trident\/[\d._]+/g));var l="unknow";"chrome"===c?l=a(/chrome\/[\d._]+/g):"safari"===c?l=a(/version\/[\d._]+/g):"firefox"===c?l=a(/firefox\/[\d._]+/g):"opera"===c?l=a(/opr\/[\d._]+/g):"iexplore"===c?l=a(/(msie [\d._]+)|(rv:[\d._]+)/g):"edge"===c&&(l=a(/edge\/[\d._]+/g));var u="none",d="unknow";t(/micromessenger/g)?(u="wechat",d=a(/micromessenger\/[\d._]+/g)):t(/qqbrowser/g)?(u="qq",d=a(/qqbrowser\/[\d._]+/g)):t(/ucbrowser/g)?(u="uc",d=a(/ucbrowser\/[\d._]+/g)):t(/qihu 360se/g)?u="360":t(/2345explorer/g)?(u="2345",d=a(/2345explorer\/[\d._]+/g)):t(/metasr/g)?u="sougou":t(/lbbrowser/g)?u="liebao":t(/maxthon/g)&&(u="maxthon",d=a(/maxthon\/[\d._]+/g));var p=Object.assign({engine:o,engineVs:s,platform:r,supporter:c,supporterVs:l,system:n,systemVs:i},"none"===u?{}:{shell:u,shellVs:d});return console.log("%c\n .d88b. d888888b d8b db d888b db .d88b. d8b db d888b \n.8P Y8. `88' 888o 88 88' Y8b 88 .8P Y8. 888o 88 88' Y8b \n88 88 88 88V8o 88 88 88 88 88 88V8o 88 88 \n88 88 88 88 V8o88 88 ooo 88 88 88 88 V8o88 88 ooo \n`8P d8' .88. 88 V888 88. ~8~ 88booo. `8b d8' 88 V888 88. ~8~ \n `Y88'Y8 Y888888P VP V8P Y888P Y88888P `Y88P' VP V8P Y888P \n \n \n","color: blue;font-size: 14px;"),console.log("%c忘形雨笠烟蓑,知心牧唱樵歌。明月清风共我,闲人三个,从他今古消磨。\n","color: yellow;font-size: 18px;"),console.log("%c青龙运行环境:\n\n系统:".concat(p.system,"/").concat(p.systemVs,"\n浏览器:").concat(p.supporter,"/").concat(p.supporterVs,"\n内核:").concat(p.engine,"/").concat(p.engineVs),"color: green;font-size: 14px;font-weight: bold;"),p}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.extraHeight,a=e.target;void 0===t&&(t=99);var n=null,i=0;(n=a||document.querySelector(".ant-table-wrapper"))&&(i=n.getBoundingClientRect().top);var r=document.body.clientHeight-i-t;return r}function d(e,t){var a,n,i=window.URL||window.webkitURL||window,r=new Blob([t]),o=document.createElementNS("http://www.w3.org/1999/xhtml","a");o.href=i.createObjectURL(r),o.download=e,a=o,(n=document.createEvent("MouseEvents")).initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),a.dispatchEvent(n)}function p(e,t,a){var n=i()(e),r=[];return function e(n){if(n)for(var i=0;i<(null==n?void 0:n.length);i++){if(t(n[i]))return a?void(n[i].children?n[i].children.unshift(a):n[i].children=[a]):void n.splice(i,1);n[i].children&&(r.push(n[i].key),e(n[i].children))}}(n),n}function g(e,t){var a;return function e(n){if(n)for(var i=0;i<(null==n?void 0:n.length);i++)t(n[i])?a=n[i]:n[i].children&&e(n[i].children)}(i()(e)),a}function h(e){return[o.eY,r.ZP.get("执行结束")].some((function(t){return e.includes(t)}))}function f(e){var t=e.split(" ");if("repo"===t[1]||"raw"===t[1])return t[2];var a=t.find((function(e){return[".js",".ts",".sh",".py"].some((function(t){return e.endsWith(t)}))}));if(a){var n,i,r="".concat(window.__ENV__QL_DIR,"/data/scripts");a.startsWith(r)&&(a=a.replace(r,""));var o=a.lastIndexOf("/");return o>=0?(i=a.slice(o+1),n=a.slice(0,o)):(i=a,n=""),[i,n]}}function m(e){try{var t=s().parseExpression(e);if(t)return t.next().toDate()}catch(e){}return null}function P(e,t){var a=m(e);return null!=t&&t.length&&t.forEach((function(e){var t=m(e.schedule);t&&(!a||t<a)&&(a=t)})),a}function Z(e){var t=function(e){if(!e)return"";var t=e.split(".");return".".concat(t[t.length-1])}(e);return o.um[t]}function v(){var e=document.createElement("div");e.style.position="fixed",e.style.top="0px",e.style.left="0px",e.style.width="100%",e.style.height="100%",e.style.backgroundColor="transparent",e.style.zIndex="9999",document.body.appendChild(e),e.addEventListener("click",(function(e){e.stopPropagation(),e.preventDefault()})),document.body.style.overflow="hidden"}},65814:function(e,t,a){"use strict";var n=a(15558),i=a.n(n),r=a(67825),o=a.n(r),c=a(90228),s=a.n(c),l=a(87999),u=a.n(l),d=a(25298),p=a.n(d),g=a(17069),h=a.n(g),f=a(82092),m=a.n(f),P=a(78078),Z=a.n(P),v=["type"],y=function(){function e(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};p()(this,e),m()(this,"url",void 0),m()(this,"socket",null),m()(this,"subscriptions",new Map),m()(this,"options",void 0),m()(this,"reconnectAttempts",0),m()(this,"heartbeatTimeout",null),m()(this,"state","closed"),this.url=t,this.options={maxReconnectAttempts:a.maxReconnectAttempts||5,reconnectInterval:a.reconnectInterval||3e3,heartbeatInterval:a.heartbeatInterval||3e4},this.init()}var t,a;return h()(e,[{key:"init",value:(a=u()(s()().mark((function e(){var t=this;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,this.state="connecting",this.emit("connecting");case 3:if(!(this.reconnectAttempts<this.options.maxReconnectAttempts)){e.next=16;break}return this.socket=new(Z())(this.url),this.setupEventListeners(),this.startHeartbeat(),e.next=9,this.waitForClose();case 9:return this.stopHeartbeat(),this.socket=null,this.reconnectAttempts++,e.next=14,new Promise((function(e){return setTimeout(e,t.options.reconnectInterval)}));case 14:e.next=3;break;case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),this.handleError(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,18]])}))),function(){return a.apply(this,arguments)})},{key:"setupEventListeners",value:function(){var e=this;this.socket&&(this.socket.onopen=function(){e.state="open",e.emit("open")},this.socket.onmessage=function(t){var a=JSON.parse(t.data);e.dispatchMessage(a)},this.socket.onclose=function(){e.state="closed",e.emit("close")})}},{key:"waitForClose",value:(t=u()(s()().mark((function e(){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((null===(t=this.socket)||void 0===t?void 0:t.readyState)===Z().CLOSED){e.next=5;break}return e.next=3,new Promise((function(e){return setTimeout(e,100)}));case 3:e.next=0;break;case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"subscribe",value:function(e,t){var a=this.subscriptions.get(e)||new Set;if(!a.has(t)){a.add(t),this.subscriptions.set(e,a);var n={action:"subscribe",topic:e};this.send(n)}}},{key:"unsubscribe",value:function(e,t){var a=this.subscriptions.get(e)||new Set;if(a.has(t)){a.delete(t);var n={action:"unsubscribe",topic:e};this.send(n)}}},{key:"send",value:function(e){var t;(null===(t=this.socket)||void 0===t?void 0:t.readyState)===Z().OPEN&&this.socket.send(JSON.stringify(e))}},{key:"dispatchMessage",value:function(e){var t=e.type,a=o()(e,v),n=this.subscriptions.get(t)||new Set;i()(n).forEach((function(e){return e(a)}))}},{key:"startHeartbeat",value:function(){var e=this;this.heartbeatTimeout=setInterval((function(){var t;(null===(t=e.socket)||void 0===t?void 0:t.readyState)===Z().OPEN&&e.socket.send(JSON.stringify({type:"heartbeat"}))}),this.options.heartbeatInterval)}},{key:"stopHeartbeat",value:function(){this.heartbeatTimeout&&clearInterval(this.heartbeatTimeout)}},{key:"close",value:function(){this.socket&&(this.state="closed",this.stopHeartbeat(),this.socket.close(),this.emit("close"))}},{key:"handleError",value:function(e){console.error("WebSocket错误:",e),this.emit("error",e)}},{key:"on",value:function(e,t){}},{key:"emit",value:function(e,t){}}],[{key:"getInstance",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",a=arguments.length>1?arguments[1]:void 0;return e.instance||(e.instance=new e(t,a)),e.instance}}]),e}();m()(y,"instance",null),t.Z=y},68251:function(){},50810:function(){}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[6465],{73236:function(t,e,n){"use strict";n.r(e);var o=n(48305),r=n.n(o),i=n(48916),s=n(3475),a=n(16314),c=n(65814),l=n(78060),u=n.n(l),d=n(32890),p=n(61508),f=n(45520),h=n(93481),v=n(75271),g=n(72317),m=n(52676),x=d.Z.Countdown;e.default=function(t){var e=t.systemInfo,n=(0,v.useState)(!1),o=r()(n,2),l=o[0],d=o[1],y=(0,v.useState)(""),Z=r()(y,2),b=Z[0],P=Z[1],_=(0,v.useRef)(),k=function(t){f.Z.confirm({width:500,title:g.ZP.get("更新"),content:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{children:g.ZP.get("已经是最新版了!")}),(0,m.jsxs)("div",{style:{fontSize:12,fontWeight:400,marginTop:5},children:[g.ZP.get("青龙")," ",t.lastVersion," ",g.ZP.get("是目前检测到的最新可用版本了。")]})]}),okText:g.ZP.get("重新下载"),onOk:function(){j(),a.W.put("".concat(s.Z.apiPrefix,"system/update")).then((function(t){})).catch((function(t){console.log(t)}))}})},w=function(t){var n=t.lastVersion,o=t.lastLog;f.Z.confirm({width:500,title:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{children:g.ZP.get("更新可用")}),(0,m.jsxs)("div",{style:{fontSize:12,fontWeight:400,marginTop:5},children:[g.ZP.get("新版本")," ",n," ",g.ZP.get("可用,你使用的版本为")," ",e.version,"。"]})]}),content:(0,m.jsx)("pre",{children:(0,m.jsx)(u(),{children:o})}),okText:g.ZP.get("下载更新"),cancelText:g.ZP.get("以后再说"),onOk:function(){j(),a.W.put("".concat(s.Z.apiPrefix,"system/update")).then((function(t){})).catch((function(t){console.log(t)}))}})},j=function(){P(""),_.current=f.Z.info({width:600,maskClosable:!1,closable:!1,keyboard:!1,okButtonProps:{disabled:!0},title:g.ZP.get("下载更新中..."),centered:!0,content:(0,m.jsx)("pre",{children:(0,m.jsx)(u(),{children:b})})})},C=function(t){a.W.put("".concat(s.Z.apiPrefix,"update/").concat(t)).then((function(t){p.ZP.success({content:(0,m.jsxs)("span",{children:[g.ZP.get("系统将在"),(0,m.jsx)(x,{className:"inline-countdown",format:"ss",value:Date.now()+3e4}),g.ZP.get("秒后自动刷新")]}),duration:30}),(0,i.o4)(),setTimeout((function(){window.location.reload()}),3e4)})).catch((function(t){console.log(t)}))};(0,v.useEffect)((function(){if(b){var t=b.includes("失败,请检查");_.current.update({maskClosable:t,closable:t,okButtonProps:{disabled:!t},content:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("pre",{children:(0,m.jsx)(u(),{children:b})}),(0,m.jsx)("div",{id:"log-identifier",style:{paddingBottom:5}})]})})}}),[b]);var I=(0,v.useCallback)((function(t){var e=t.message;e.includes("失败,请检查")&&p.ZP.error(g.ZP.get("更新失败,请检查网络及日志或稍后再试")),setTimeout((function(){var t;null===(t=document.querySelector("#log-identifier"))||void 0===t||t.scrollIntoView({behavior:"smooth"})}),600),e.includes("更新包下载成功")&&setTimeout((function(){f.Z.confirm({width:600,maskClosable:!1,title:g.ZP.get("确认重启"),centered:!0,content:g.ZP.get("系统安装包下载成功,确认重启"),okText:g.ZP.get("重启"),onOk:function(){C("system")},onCancel:function(){_.current.update({maskClosable:!0,closable:!0,okButtonProps:{disabled:!1}})}})}),1e3),P((function(t){return"".concat(t).concat(e)}))}),[]);return(0,v.useEffect)((function(){var t=c.Z.getInstance();return t.subscribe("updateSystemVersion",I),function(){t.unsubscribe("updateSystemVersion",I)}}),[]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(h.Z,{type:"primary",onClick:function(){l||(d(!0),p.ZP.loading(g.ZP.get("检查更新中..."),0),a.W.put("".concat(s.Z.apiPrefix,"system/update-check")).then((function(t){var e=t.code,n=t.data;p.ZP.destroy(),200===e&&(n.hasNewVersion?w(n):k(n))})).catch((function(t){p.ZP.destroy(),console.log(t)})).finally((function(){d(!1)})))},children:g.ZP.get("检查更新")}),(0,m.jsx)(h.Z,{type:"primary",onClick:function(){return C("reload")},style:{marginLeft:8},children:g.ZP.get("重新启动")})]})}},85657:function(t,e,n){"use strict";n.r(e);var o=n(26068),r=n.n(o),i=n(48305),s=n.n(i),a=n(72317),c=n(75271),l=n(72338),u=n(61508),d=n(45520),p=n(94747),f=n(17082),h=n(56646),v=n(93481),g=n(35181),m=n(6367),x=n(32253),y=n(71571),Z=n(3475),b=n(16314),P=n(73236),_=n(87105),k=(n(68251),n(79231)),w=n(84522),j=n(32916),C=n(19334),I=n.n(C),S=n(48916),O=n(97302),F=n(52676),T={"log-remove-frequency":"logRemoveFrequency","cron-concurrency":"cronConcurrency",timezone:"timezone"},z=[{value:"base",label:a.ZP.get("基础数据"),disabled:!0},{value:"config",label:a.ZP.get("配置文件")},{value:"scripts",label:a.ZP.get("脚本文件")},{value:"log",label:a.ZP.get("日志文件")},{value:"deps",label:a.ZP.get("依赖文件")},{value:"syslog",label:a.ZP.get("系统日志")},{value:"dep_cache",label:a.ZP.get("依赖缓存")},{value:"raw",label:a.ZP.get("远程脚本缓存")},{value:"repo",label:a.ZP.get("远程仓库缓存")},{value:"ssh.d",label:a.ZP.get("SSH 文件缓存")}];e.default=function(t){var e=t.systemInfo,n=t.reloadTheme,o=localStorage.getItem("qinglong_dark_theme")||"auto",i=(0,c.useState)(),C=s()(i,2),E=C[0],N=C[1],A=l.Z.useForm(),B=s()(A,1)[0],q=(0,c.useState)(!1),R=s()(q,2),W=R[0],M=R[1],H=(0,j.default)(a.ZP.get("上传")),L=(0,j.default)(a.ZP.get("下载")),D=(0,c.useState)(!1),G=s()(D,2),V=G[0],$=G[1],J=(0,c.useState)(["base"]),U=s()(J,2),X=U[0],K=U[1],Q=y||{},Y=Q.enable,tt=Q.disable,et=(Q.exportGeneratedCSS,Q.setFetchMethod),nt=Q.auto,ot=function(t){b.W.put("".concat(Z.Z.apiPrefix,"system/config/").concat(t),I()(E,T[t])).then((function(t){var e=t.code;t.data;200===e&&u.ZP.success(a.ZP.get("更新成功"))})).catch((function(t){console.log(t)}))};return(0,c.useEffect)((function(){b.W.get("".concat(Z.Z.apiPrefix,"system/config")).then((function(t){var e=t.code,n=t.data;200===e&&n.info&&N(n.info)})).catch((function(t){console.log(t)}))}),[]),(0,F.jsxs)(F.Fragment,{children:[(0,F.jsxs)(l.Z,{layout:"vertical",form:B,children:[(0,F.jsx)(l.Z.Item,{label:a.ZP.get("主题"),name:"theme",initialValue:o,children:(0,F.jsxs)(p.ZP.Group,{onChange:function(t){var e=t.target.value;localStorage.setItem("qinglong_dark_theme",t.target.value),et(fetch),"dark"===e?Y({}):"light"===e?tt():nt({}),n()},value:o,optionType:"button",buttonStyle:"solid",children:[(0,F.jsx)(p.ZP.Button,{value:"light",style:{width:70,textAlign:"center"},children:a.ZP.get("亮色")}),(0,F.jsx)(p.ZP.Button,{value:"dark",style:{width:66,textAlign:"center"},children:a.ZP.get("暗色")}),(0,F.jsx)(p.ZP.Button,{value:"auto",style:{width:129,textAlign:"center"},children:a.ZP.get("跟随系统")})]})}),(0,F.jsx)(l.Z.Item,{label:a.ZP.get("日志删除频率"),name:"frequency",tooltip:a.ZP.get("每x天自动删除x天以前的日志"),children:(0,F.jsxs)(f.Z.Group,{compact:!0,children:[(0,F.jsx)(h.Z,{addonBefore:a.ZP.get("每"),addonAfter:a.ZP.get("天"),style:{width:180},min:0,value:null==E?void 0:E.logRemoveFrequency,onChange:function(t){N(r()(r()({},E),{},{logRemoveFrequency:t}))}}),(0,F.jsx)(v.Z,{type:"primary",onClick:function(){ot("log-remove-frequency")},style:{width:84},children:a.ZP.get("确认")})]})}),(0,F.jsx)(l.Z.Item,{label:a.ZP.get("定时任务并发数"),name:"frequency",children:(0,F.jsxs)(f.Z.Group,{compact:!0,children:[(0,F.jsx)(h.Z,{style:{width:180},min:1,value:null==E?void 0:E.cronConcurrency,onChange:function(t){N(r()(r()({},E),{},{cronConcurrency:t}))}}),(0,F.jsx)(v.Z,{type:"primary",onClick:function(){ot("cron-concurrency")},style:{width:84},children:a.ZP.get("确认")})]})}),(0,F.jsx)(l.Z.Item,{label:a.ZP.get("时区"),name:"timezone",children:(0,F.jsxs)(f.Z.Group,{compact:!0,children:[(0,F.jsx)(g.Z,{value:null==E?void 0:E.timezone,style:{width:180},onChange:function(t){N(r()(r()({},E),{},{timezone:t}))},options:O.z.map((function(t){return{value:t,label:t}})),showSearch:!0,filterOption:function(t,e){var n;return(null==e||null===(n=e.value)||void 0===n?void 0:n.toLowerCase().indexOf(t.toLowerCase()))>=0}}),(0,F.jsx)(v.Z,{type:"primary",onClick:function(){ot("timezone")},style:{width:84},children:a.ZP.get("确认")})]})}),(0,F.jsx)(l.Z.Item,{label:a.ZP.get("语言"),name:"lang",children:(0,F.jsx)(g.Z,{defaultValue:localStorage.getItem("lang")||"",style:{width:264},onChange:function(t){localStorage.setItem("lang",t),setTimeout((function(){window.location.reload()}),500)},options:[{value:"",label:a.ZP.get("跟随系统")},{value:"zh",label:"简体中文"},{value:"en",label:"English"}]})}),(0,F.jsxs)(l.Z.Item,{label:a.ZP.get("数据备份还原"),name:"frequency",children:[(0,F.jsx)(v.Z,{type:"primary",onClick:function(){K(["base"]),$(!0)},loading:W,children:W?a.ZP.get("生成数据中..."):a.ZP.get("备份")}),(0,F.jsx)(m.Z,{method:"put",showUploadList:!1,maxCount:1,action:"".concat(Z.Z.apiPrefix,"system/data/import"),onChange:function(t){var e=t.file,n=t.event;null!=n&&n.percent&&H(Math.min(parseFloat(null==n?void 0:n.percent.toFixed(1)),99)),"done"===e.status&&(H(100),d.Z.confirm({width:600,maskClosable:!1,title:a.ZP.get("确认重启"),centered:!0,content:(0,F.jsxs)(F.Fragment,{children:[(0,F.jsx)("div",{children:a.ZP.get("备份数据上传成功,确认覆盖数据")}),(0,F.jsxs)("div",{children:[a.ZP.get("如果恢复失败,可进入容器执行")," ql reload data"]})]}),okText:a.ZP.get("重启"),onOk:function(){b.W.put("".concat(Z.Z.apiPrefix,"update/data")).then((function(){u.ZP.success({content:(0,F.jsxs)("span",{children:[a.ZP.get("系统将在"),(0,F.jsx)(w.Z,{className:"inline-countdown",format:"ss",value:Date.now()+3e4}),a.ZP.get("秒后自动刷新")]}),duration:30}),(0,S.o4)(),setTimeout((function(){window.location.reload()}),3e4)})).catch((function(t){console.log(t)}))}})),"error"===e.status&&u.ZP.error("上传失败")},name:"data",headers:{Authorization:"Bearer ".concat(localStorage.getItem(Z.Z.authKey))},children:(0,F.jsx)(v.Z,{icon:(0,F.jsx)(k.Z,{}),style:{marginLeft:8},children:a.ZP.get("还原数据")})})]}),(0,F.jsx)(l.Z.Item,{label:a.ZP.get("检查更新"),name:"update",children:(0,F.jsx)(P.default,{systemInfo:e})})]}),(0,F.jsx)(d.Z,{title:a.ZP.get("选择备份模块"),open:V,onOk:function(){M(!0),b.W.put("".concat(Z.Z.apiPrefix,"system/data/export"),{type:X},{responseType:"blob",timeout:864e5,onDownloadProgress:function(t){t.progress&&L(parseFloat((100*t.progress).toFixed(1)))}}).then((function(t){(0,_.saveAs)(t,"data.tgz")})).catch((function(t){console.log(t)})).finally((function(){M(!1),$(!1)}))},onCancel:function(){return $(!1)},okText:a.ZP.get("开始备份"),cancelText:a.ZP.get("取消"),okButtonProps:{loading:W},children:(0,F.jsx)(x.Z.Group,{value:X,onChange:function(t){K(t)},style:{width:"100%",display:"flex",flexWrap:"wrap",gap:"8px 16px"},children:z.map((function(t){return(0,F.jsx)(x.Z,{value:t.value,disabled:t.disabled,style:{marginLeft:0},children:t.label},t.value)}))})})]})}},32916:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return l}});var o=n(72317),r=n(46016),i=n(45520),s=n(75271),a=n(52676),c=function(t){var e=t.percent;return(0,a.jsx)(r.Z,{style:{display:"flex",justifyContent:"center"},type:"circle",percent:e})};function l(t){var e=(0,s.useRef)();return function(n){e.current?(e.current.update({title:"".concat(t).concat(n>=100?o.ZP.get("成功"):o.ZP.get("中...")),content:(0,a.jsx)(c,{percent:n}),okButtonProps:{disabled:100!==n}}),100===n&&setTimeout((function(){var t;null===(t=e.current)||void 0===t||t.destroy(),e.current=null}))):e.current=i.Z.info({width:600,maskClosable:!1,title:"".concat(t).concat(n>=100?o.ZP.get("成功"):o.ZP.get("中...")),centered:!0,content:(0,a.jsx)(c,{percent:n}),okButtonProps:{disabled:!0}})}}},65814:function(t,e,n){"use strict";var o=n(15558),r=n.n(o),i=n(67825),s=n.n(i),a=n(90228),c=n.n(a),l=n(87999),u=n.n(l),d=n(25298),p=n.n(d),f=n(17069),h=n.n(f),v=n(82092),g=n.n(v),m=n(78078),x=n.n(m),y=["type"],Z=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};p()(this,t),g()(this,"url",void 0),g()(this,"socket",null),g()(this,"subscriptions",new Map),g()(this,"options",void 0),g()(this,"reconnectAttempts",0),g()(this,"heartbeatTimeout",null),g()(this,"state","closed"),this.url=e,this.options={maxReconnectAttempts:n.maxReconnectAttempts||5,reconnectInterval:n.reconnectInterval||3e3,heartbeatInterval:n.heartbeatInterval||3e4},this.init()}var e,n;return h()(t,[{key:"init",value:(n=u()(c()().mark((function t(){var e=this;return c()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:t.prev=0,this.state="connecting",this.emit("connecting");case 3:if(!(this.reconnectAttempts<this.options.maxReconnectAttempts)){t.next=16;break}return this.socket=new(x())(this.url),this.setupEventListeners(),this.startHeartbeat(),t.next=9,this.waitForClose();case 9:return this.stopHeartbeat(),this.socket=null,this.reconnectAttempts++,t.next=14,new Promise((function(t){return setTimeout(t,e.options.reconnectInterval)}));case 14:t.next=3;break;case 16:t.next=21;break;case 18:t.prev=18,t.t0=t.catch(0),this.handleError(t.t0);case 21:case"end":return t.stop()}}),t,this,[[0,18]])}))),function(){return n.apply(this,arguments)})},{key:"setupEventListeners",value:function(){var t=this;this.socket&&(this.socket.onopen=function(){t.state="open",t.emit("open")},this.socket.onmessage=function(e){var n=JSON.parse(e.data);t.dispatchMessage(n)},this.socket.onclose=function(){t.state="closed",t.emit("close")})}},{key:"waitForClose",value:(e=u()(c()().mark((function t(){var e;return c()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((null===(e=this.socket)||void 0===e?void 0:e.readyState)===x().CLOSED){t.next=5;break}return t.next=3,new Promise((function(t){return setTimeout(t,100)}));case 3:t.next=0;break;case 5:case"end":return t.stop()}}),t,this)}))),function(){return e.apply(this,arguments)})},{key:"subscribe",value:function(t,e){var n=this.subscriptions.get(t)||new Set;if(!n.has(e)){n.add(e),this.subscriptions.set(t,n);var o={action:"subscribe",topic:t};this.send(o)}}},{key:"unsubscribe",value:function(t,e){var n=this.subscriptions.get(t)||new Set;if(n.has(e)){n.delete(e);var o={action:"unsubscribe",topic:t};this.send(o)}}},{key:"send",value:function(t){var e;(null===(e=this.socket)||void 0===e?void 0:e.readyState)===x().OPEN&&this.socket.send(JSON.stringify(t))}},{key:"dispatchMessage",value:function(t){var e=t.type,n=s()(t,y),o=this.subscriptions.get(e)||new Set;r()(o).forEach((function(t){return t(n)}))}},{key:"startHeartbeat",value:function(){var t=this;this.heartbeatTimeout=setInterval((function(){var e;(null===(e=t.socket)||void 0===e?void 0:e.readyState)===x().OPEN&&t.socket.send(JSON.stringify({type:"heartbeat"}))}),this.options.heartbeatInterval)}},{key:"stopHeartbeat",value:function(){this.heartbeatTimeout&&clearInterval(this.heartbeatTimeout)}},{key:"close",value:function(){this.socket&&(this.state="closed",this.stopHeartbeat(),this.socket.close(),this.emit("close"))}},{key:"handleError",value:function(t){console.error("WebSocket错误:",t),this.emit("error",t)}},{key:"on",value:function(t,e){}},{key:"emit",value:function(t,e){}}],[{key:"getInstance",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0;return t.instance||(t.instance=new t(e,n)),t.instance}}]),t}();g()(Z,"instance",null),e.Z=Z},68251:function(){},27916:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var o=n(99459),r=n(75271);function i(){var t=r.useReducer((function(t){return t+1}),0);return(0,o.Z)(t,2)[1]}},35181:function(t,e,n){"use strict";var o=n(57904),r=n(2053),i=n(82187),s=n.n(i),a=n(77168),c=n(2021),l=n(75271),u=n(96820),d=n(83289),p=n(30107),f=n(38470),h=n(5663),v=n(21485),g=n(28800),m=n(50528),x=n(81393),y=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(t);r<o.length;r++)e.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]])}return n},Z="SECRET_COMBOBOX_MODE_DO_NOT_USE",b=function(t,e){var n,i=t.prefixCls,b=t.bordered,P=void 0===b||b,_=t.className,k=t.getPopupContainer,w=t.dropdownClassName,j=t.popupClassName,C=t.listHeight,I=void 0===C?256:C,S=t.placement,O=t.listItemHeight,F=void 0===O?32:O,T=t.size,z=t.disabled,E=t.notFoundContent,N=t.status,A=t.showArrow,B=y(t,["prefixCls","bordered","className","getPopupContainer","dropdownClassName","popupClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","showArrow"]),q=l.useContext(u.E_),R=q.getPopupContainer,W=q.getPrefixCls,M=q.renderEmpty,H=q.direction,L=q.virtual,D=q.dropdownMatchSelectWidth,G=l.useContext(f.Z),V=W("select",i),$=W(),J=(0,x.ri)(V,H),U=J.compactSize,X=J.compactItemClassnames,K=l.useMemo((function(){var t=B.mode;if("combobox"!==t)return t===Z?"combobox":t}),[B.mode]),Q="multiple"===K||"tags"===K,Y=void 0!==A?A:B.loading||!(Q||"combobox"===K),tt=(0,l.useContext)(h.aM),et=tt.status,nt=tt.hasFeedback,ot=tt.isFormItemInput,rt=tt.feedbackIcon,it=(0,g.F)(et,N);n=void 0!==E?E:"combobox"===K?null:(M||d.Z)("Select");var st=(0,m.Z)((0,r.Z)((0,r.Z)({},B),{multiple:Q,hasFeedback:nt,feedbackIcon:rt,showArrow:Y,prefixCls:V})),at=st.suffixIcon,ct=st.itemIcon,lt=st.removeIcon,ut=st.clearIcon,dt=(0,c.Z)(B,["suffixIcon","itemIcon"]),pt=s()(j||w,(0,o.Z)({},"".concat(V,"-dropdown-").concat(H),"rtl"===H)),ft=U||T||G,ht=l.useContext(p.Z),vt=null!=z?z:ht,gt=s()((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},"".concat(V,"-lg"),"large"===ft),"".concat(V,"-sm"),"small"===ft),"".concat(V,"-rtl"),"rtl"===H),"".concat(V,"-borderless"),!P),"".concat(V,"-in-form-item"),ot),(0,g.Z)(V,it,nt),X,_);return l.createElement(a.ZP,(0,r.Z)({ref:e,virtual:L,dropdownMatchSelectWidth:D},dt,{transitionName:(0,v.mL)($,(0,v.q0)(S),B.transitionName),listHeight:I,listItemHeight:F,mode:K,prefixCls:V,placement:void 0!==S?S:"rtl"===H?"bottomRight":"bottomLeft",direction:H,inputIcon:at,menuItemSelectedIcon:ct,removeIcon:lt,clearIcon:ut,notFoundContent:n,className:gt,getPopupContainer:k||R,dropdownClassName:pt,showArrow:nt||A,disabled:vt}))},P=l.forwardRef(b);P.SECRET_COMBOBOX_MODE_DO_NOT_USE=Z,P.Option=a.Wx,P.OptGroup=a.Xo,e.Z=P},88987:function(t,e,n){var o=n(71519),r=n(82999),i=n(76111),s=n(50506),a=n(80845);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}c.prototype.clear=o,c.prototype.delete=r,c.prototype.get=i,c.prototype.has=s,c.prototype.set=a,t.exports=c},175:function(t,e,n){var o=n(2173),r=n(33752),i=n(10548),s=n(63410),a=n(3564);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}c.prototype.clear=o,c.prototype.delete=r,c.prototype.get=i,c.prototype.has=s,c.prototype.set=a,t.exports=c},35922:function(t,e,n){var o=n(47758)(n(29165),"Map");t.exports=o},9440:function(t,e,n){var o=n(7140),r=n(56504),i=n(88833),s=n(80953),a=n(70724);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}c.prototype.clear=o,c.prototype.delete=r,c.prototype.get=i,c.prototype.has=s,c.prototype.set=a,t.exports=c},62718:function(t,e,n){var o=n(42448);t.exports=function(t,e){for(var n=t.length;n--;)if(o(t[n][0],e))return n;return-1}},58939:function(t,e,n){var o=n(92042),r=n(90654),i=n(36838),s=n(51059),a=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,d=l.hasOwnProperty,p=RegExp("^"+u.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!i(t)||r(t))&&(o(t)?p:a).test(s(t))}},36633:function(t,e,n){var o=n(29165)["__core-js_shared__"];t.exports=o},67707:function(t,e,n){var o=n(3880);t.exports=function(t,e){var n=t.__data__;return o(e)?n["string"==typeof e?"string":"hash"]:n.map}},47758:function(t,e,n){var o=n(58939),r=n(9149);t.exports=function(t,e){var n=r(t,e);return o(n)?n:void 0}},9149:function(t){t.exports=function(t,e){return null==t?void 0:t[e]}},71519:function(t,e,n){var o=n(37722);t.exports=function(){this.__data__=o?o(null):{},this.size=0}},82999:function(t){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},76111:function(t,e,n){var o=n(37722),r=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(o){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return r.call(e,t)?e[t]:void 0}},50506:function(t,e,n){var o=n(37722),r=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return o?void 0!==e[t]:r.call(e,t)}},80845:function(t,e,n){var o=n(37722);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=o&&void 0===e?"__lodash_hash_undefined__":e,this}},3880:function(t){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},90654:function(t,e,n){var o,r=n(36633),i=(o=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"";t.exports=function(t){return!!i&&i in t}},2173:function(t){t.exports=function(){this.__data__=[],this.size=0}},33752:function(t,e,n){var o=n(62718),r=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=o(e,t);return!(n<0)&&(n==e.length-1?e.pop():r.call(e,n,1),--this.size,!0)}},10548:function(t,e,n){var o=n(62718);t.exports=function(t){var e=this.__data__,n=o(e,t);return n<0?void 0:e[n][1]}},63410:function(t,e,n){var o=n(62718);t.exports=function(t){return o(this.__data__,t)>-1}},3564:function(t,e,n){var o=n(62718);t.exports=function(t,e){var n=this.__data__,r=o(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}},7140:function(t,e,n){var o=n(88987),r=n(175),i=n(35922);t.exports=function(){this.size=0,this.__data__={hash:new o,map:new(i||r),string:new o}}},56504:function(t,e,n){var o=n(67707);t.exports=function(t){var e=o(this,t).delete(t);return this.size-=e?1:0,e}},88833:function(t,e,n){var o=n(67707);t.exports=function(t){return o(this,t).get(t)}},80953:function(t,e,n){var o=n(67707);t.exports=function(t){return o(this,t).has(t)}},70724:function(t,e,n){var o=n(67707);t.exports=function(t,e){var n=o(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}},37722:function(t,e,n){var o=n(47758)(Object,"create");t.exports=o},51059:function(t){var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},42448:function(t){t.exports=function(t,e){return t===e||t!=t&&e!=e}},92042:function(t,e,n){var o=n(80732),r=n(36838);t.exports=function(t){if(!r(t))return!1;var e=o(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}}}]);