@whyour/qinglong 0.9.3 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/package.json +1 -1
  2. package/sample/notify.py +1 -1
  3. package/shell/api.sh +1 -1
  4. package/shell/otask.sh +19 -11
  5. package/shell/task.sh +1 -1
  6. package/shell/update.sh +3 -3
  7. package/static/build/api/env.js +2 -1
  8. package/static/build/api/script.js +2 -0
  9. package/static/build/api/system.js +4 -1
  10. package/static/build/config/index.js +2 -2
  11. package/static/build/config/share.js +83 -0
  12. package/static/build/config/util.js +21 -84
  13. package/static/build/loaders/express.js +2 -2
  14. package/static/build/loaders/sock.js +1 -1
  15. package/static/build/schedule/addCron.js +1 -2
  16. package/static/build/schedule/client.js +1 -1
  17. package/static/build/schedule/health.js +1 -1
  18. package/static/build/services/cron.js +18 -14
  19. package/static/build/services/env.js +2 -4
  20. package/static/build/services/schedule.js +8 -8
  21. package/static/build/services/script.js +0 -1
  22. package/static/build/services/subscription.js +0 -3
  23. package/static/build/services/user.js +1 -1
  24. package/static/build/shared/pLimit.js +8 -0
  25. package/static/build/shared/runCron.js +2 -2
  26. package/static/dist/3330.485d94a3.async.js +1 -0
  27. package/static/dist/{4714.4abfa66f.async.js → 4714.bbe9fae0.async.js} +1 -1
  28. package/static/dist/8044.129359a6.async.js +1 -0
  29. package/static/dist/819.525cbfda.async.js +1 -0
  30. package/static/dist/index.html +1 -1
  31. package/static/dist/layouts__index.ddfcd364.chunk.css +1 -0
  32. package/static/dist/src__pages__config__index.fedea3f9.async.js +1 -0
  33. package/static/dist/{src__pages__crontab__detail.91b2b006.async.js → src__pages__crontab__detail.ad4729f7.async.js} +1 -1
  34. package/static/dist/{src__pages__crontab__index.502a1f71.chunk.css → src__pages__crontab__index.686cdb14.chunk.css} +1 -1
  35. package/static/dist/src__pages__crontab__index.a82cfa81.async.js +1 -0
  36. package/static/dist/{src__pages__crontab__logModal.a0c9c75c.async.js → src__pages__crontab__logModal.ad170a0f.async.js} +1 -1
  37. package/static/dist/src__pages__crontab__modal.696faf3d.async.js +1 -0
  38. package/static/dist/{src__pages__dependence__index.20e51efb.async.js → src__pages__dependence__index.9f871d7e.async.js} +1 -1
  39. package/static/dist/src__pages__dependence__logModal.b8dfb9bf.async.js +1 -0
  40. package/static/dist/src__pages__dependence__modal.77688c64.async.js +1 -0
  41. package/static/dist/src__pages__diff__index.73c27cfb.async.js +1 -0
  42. package/static/dist/src__pages__env__editNameModal.0b8b8511.async.js +1 -0
  43. package/static/dist/src__pages__env__index.c2e7f61a.async.js +1 -0
  44. package/static/dist/src__pages__env__modal.d4bcf3f1.async.js +1 -0
  45. package/static/dist/src__pages__error__index.9d76a461.async.js +1 -0
  46. package/static/dist/src__pages__initialization__index.7cb87ba4.async.js +1 -0
  47. package/static/dist/src__pages__script__editModal.dddd633e.async.js +1 -0
  48. package/static/dist/{src__pages__script__editNameModal.d2c2b500.async.js → src__pages__script__editNameModal.159d0a29.async.js} +1 -1
  49. package/static/dist/src__pages__script__index.123b12c6.async.js +1 -0
  50. package/static/dist/src__pages__script__renameModal.d4788f88.async.js +1 -0
  51. package/static/dist/src__pages__script__saveModal.f5fc2c94.async.js +1 -0
  52. package/static/dist/src__pages__script__setting.5004f9a6.async.js +1 -0
  53. package/static/dist/src__pages__setting__about.ef6f0636.async.js +1 -0
  54. package/static/dist/src__pages__setting__appModal.52ba0fb4.async.js +1 -0
  55. package/static/dist/src__pages__setting__index.ccb20d34.async.js +1 -0
  56. package/static/dist/src__pages__setting__notification.4f6be181.async.js +1 -0
  57. package/static/dist/src__pages__setting__other.ef42b461.async.js +1 -0
  58. package/static/dist/src__pages__setting__security.fed987f7.async.js +1 -0
  59. package/static/dist/{src__pages__subscription__index.373b2030.async.js → src__pages__subscription__index.a434b6c5.async.js} +1 -1
  60. package/static/dist/{src__pages__subscription__logModal.1acd5872.async.js → src__pages__subscription__logModal.3037cb57.async.js} +1 -1
  61. package/static/dist/src__pages__subscription__modal.91d85c79.async.js +1 -0
  62. package/static/dist/umi.435eb7e2.js +1 -0
  63. package/version.yaml +12 -9
  64. package/static/dist/3330.6b55d282.async.js +0 -1
  65. package/static/dist/8044.b4f59bd9.async.js +0 -1
  66. package/static/dist/819.14ef9416.async.js +0 -1
  67. package/static/dist/9532.af314989.async.js +0 -1
  68. package/static/dist/layouts__index.dc3fe99d.chunk.css +0 -1
  69. package/static/dist/src__pages__config__index.34473d74.async.js +0 -1
  70. package/static/dist/src__pages__crontab__index.7443956f.async.js +0 -1
  71. package/static/dist/src__pages__crontab__modal.e43fadf0.async.js +0 -1
  72. package/static/dist/src__pages__dependence__logModal.5632c2df.async.js +0 -1
  73. package/static/dist/src__pages__dependence__modal.0e940eb0.async.js +0 -1
  74. package/static/dist/src__pages__diff__index.630603fc.async.js +0 -1
  75. package/static/dist/src__pages__env__editNameModal.a1f5c3e1.async.js +0 -1
  76. package/static/dist/src__pages__env__index.03e934be.async.js +0 -1
  77. package/static/dist/src__pages__env__modal.c44800ec.async.js +0 -1
  78. package/static/dist/src__pages__error__index.521fde97.async.js +0 -1
  79. package/static/dist/src__pages__initialization__index.0e4d45ef.async.js +0 -1
  80. package/static/dist/src__pages__script__editModal.7bec90a6.async.js +0 -1
  81. package/static/dist/src__pages__script__index.f666bbf7.async.js +0 -1
  82. package/static/dist/src__pages__script__renameModal.03a9a63a.async.js +0 -1
  83. package/static/dist/src__pages__script__saveModal.fe022069.async.js +0 -1
  84. package/static/dist/src__pages__script__setting.25861cb9.async.js +0 -1
  85. package/static/dist/src__pages__setting__about.5343d1cb.async.js +0 -1
  86. package/static/dist/src__pages__setting__appModal.b0f04766.async.js +0 -1
  87. package/static/dist/src__pages__setting__index.6cfb3c67.async.js +0 -1
  88. package/static/dist/src__pages__setting__notification.566573dd.async.js +0 -1
  89. package/static/dist/src__pages__setting__other.5babac76.async.js +0 -1
  90. package/static/dist/src__pages__setting__security.ef345c25.async.js +0 -1
  91. package/static/dist/src__pages__subscription__modal.01b60226.async.js +0 -1
  92. package/static/dist/umi.adda7a82.js +0 -1
@@ -0,0 +1 @@
1
+ (self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[4473,5812,8044,4714],{13740:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var i=n(14797),a=n(63313),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},o=n(46420),l=function(e,t){return a.createElement(o.Z,(0,i.Z)((0,i.Z)({},e),{},{ref:t,icon:r}))};l.displayName="DeleteOutlined";var c=a.forwardRef(l)},68834:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var i=n(14797),a=n(63313),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M924.8 625.7l-65.5-56c3.1-19 4.7-38.4 4.7-57.8s-1.6-38.8-4.7-57.8l65.5-56a32.03 32.03 0 009.3-35.2l-.9-2.6a443.74 443.74 0 00-79.7-137.9l-1.8-2.1a32.12 32.12 0 00-35.1-9.5l-81.3 28.9c-30-24.6-63.5-44-99.7-57.6l-15.7-85a32.05 32.05 0 00-25.8-25.7l-2.7-.5c-52.1-9.4-106.9-9.4-159 0l-2.7.5a32.05 32.05 0 00-25.8 25.7l-15.8 85.4a351.86 351.86 0 00-99 57.4l-81.9-29.1a32 32 0 00-35.1 9.5l-1.8 2.1a446.02 446.02 0 00-79.7 137.9l-.9 2.6c-4.5 12.5-.8 26.5 9.3 35.2l66.3 56.6c-3.1 18.8-4.6 38-4.6 57.1 0 19.2 1.5 38.4 4.6 57.1L99 625.5a32.03 32.03 0 00-9.3 35.2l.9 2.6c18.1 50.4 44.9 96.9 79.7 137.9l1.8 2.1a32.12 32.12 0 0035.1 9.5l81.9-29.1c29.8 24.5 63.1 43.9 99 57.4l15.8 85.4a32.05 32.05 0 0025.8 25.7l2.7.5a449.4 449.4 0 00159 0l2.7-.5a32.05 32.05 0 0025.8-25.7l15.7-85a350 350 0 0099.7-57.6l81.3 28.9a32 32 0 0035.1-9.5l1.8-2.1c34.8-41.1 61.6-87.5 79.7-137.9l.9-2.6c4.5-12.3.8-26.3-9.3-35zM788.3 465.9c2.5 15.1 3.8 30.6 3.8 46.1s-1.3 31-3.8 46.1l-6.6 40.1 74.7 63.9a370.03 370.03 0 01-42.6 73.6L721 702.8l-31.4 25.8c-23.9 19.6-50.5 35-79.3 45.8l-38.1 14.3-17.9 97a377.5 377.5 0 01-85 0l-17.9-97.2-37.8-14.5c-28.5-10.8-55-26.2-78.7-45.7l-31.4-25.9-93.4 33.2c-17-22.9-31.2-47.6-42.6-73.6l75.5-64.5-6.5-40c-2.4-14.9-3.7-30.3-3.7-45.5 0-15.3 1.2-30.6 3.7-45.5l6.5-40-75.5-64.5c11.3-26.1 25.6-50.7 42.6-73.6l93.4 33.2 31.4-25.9c23.7-19.5 50.2-34.9 78.7-45.7l37.9-14.3 17.9-97.2c28.1-3.2 56.8-3.2 85 0l17.9 97 38.1 14.3c28.7 10.8 55.4 26.2 79.3 45.8l31.4 25.8 92.8-32.9c17 22.9 31.2 47.6 42.6 73.6L781.8 426l6.5 39.9zM512 326c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm79.2 255.2A111.6 111.6 0 01512 614c-29.9 0-58-11.7-79.2-32.8A111.6 111.6 0 01400 502c0-29.9 11.7-58 32.8-79.2C454 401.6 482.1 390 512 390c29.9 0 58 11.6 79.2 32.8A111.6 111.6 0 01624 502c0 29.9-11.7 58-32.8 79.2z"}}]},name:"setting",theme:"outlined"},o=n(46420),l=function(e,t){return a.createElement(o.Z,(0,i.Z)((0,i.Z)({},e),{},{ref:t,icon:r}))};l.displayName="SettingOutlined";var c=a.forwardRef(l)},86755:function(e,t,n){"use strict";var i=(0,n(55258).Z)({scriptUrl:["//at.alicdn.com/t/c/font_3354854_ob5y15ewlyq.js"]});t.Z=i},66150:function(e,t,n){"use strict";var i=n(54306),a=n.n(i),r=n(63313),o=n(61761),l=n(82428);t.Z=function(e,t){var n=(0,r.useState)(0),i=a()(n,2),c=i[0],s=i[1];return(0,o.Z)(e,(function(e){var n=e.target;n.classList.contains("ant-table-wrapper")||(n=e.target.querySelector(".ant-table-wrapper")),s((0,l.W9)({extraHeight:t,target:n}))})),c}},84550:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return F}});var i=n(57213),a=n.n(i),r=n(54306),o=n.n(r),l=n(88265),c=n(63313),s=n(92260),u=n(64865),d=n(84163),g=n(9835),f=n(394),p=n(51704),m=n(15367),h=n(24378),Z=n(1953),v=n(25265),x=n(44968),P=n(69685),b=n(20209),y=n(65601),w=n(7688),j=n(76657),k=n(3563),C=n(33538),S=n(80755),_=n(95176),q=n(5558),N=n(42792),B=n(82755),R=n(86755),I=n(82428),O=n(2689),E=n(61761),D=n(11527),z=s.Z.Text,W=[{key:"log",tab:l.ZP.get("日志")},{key:"script",tab:l.ZP.get("脚本")}],T=navigator.language||navigator.languages[0],F=function(e){var t,n,i,r=e.cron,s=void 0===r?{}:r,F=e.handleCancel,L=e.visible,M=e.theme,H=e.isPhone,V=(0,c.useState)("log"),A=o()(V,2),K=A[0],U=A[1],X=(0,c.useState)(!0),$=o()(X,2),G=($[0],$[1]),Y=(0,c.useState)([]),Q=o()(Y,2),J=Q[0],ee=Q[1],te=(0,c.useState)(""),ne=o()(te,2),ie=ne[0],ae=ne[1],re=(0,c.useState)(""),oe=o()(re,2),le=oe[0],ce=oe[1],se=(0,c.useState)(!1),ue=o()(se,2),de=ue[0],ge=ue[1],fe=(0,c.useRef)(null),pe=(0,c.useState)({}),me=o()(pe,2),he=me[0],Ze=me[1],ve=(0,c.useState)(""),xe=o()(ve,2),Pe=xe[0],be=xe[1],ye=(0,c.useState)(W),we=o()(ye,2),je=we[0],ke=we[1],Ce=(0,c.useState)({}),Se=o()(Ce,2),_e=Se[0],qe=Se[1],Ne=(0,c.useRef)(null),Be=function(e){var t=(0,c.useState)(0),n=o()(t,2),i=n[0],a=n[1];return(0,E.Z)(e,(function(e){var t=e.target.clientHeight;i!==t&&a(t)})),i}(Ne),Re={log:(0,D.jsx)("div",{ref:Ne,children:(0,D.jsx)(u.ZP,{children:(0,D.jsx)(O.Z,{data:J,height:Be,itemHeight:47,itemKey:"filename",children:function(e){return(0,D.jsxs)(u.ZP.Item,{className:"log-item",onClick:function(){return Ie(e)},children:[(0,D.jsx)(v.Z,{style:{marginRight:10}}),e.directory,"/",e.filename]})}})})}),script:he.filename&&(0,D.jsx)(B.ZP,{language:(0,I.H$)(he.filename),theme:M,value:le,options:{fontSize:12,lineNumbersMinChars:3,fontFamily:"Source Code Pro",glyphMargin:!1,wordWrap:"on"},onMount:function(e,t){fe.current=e}})},Ie=function(e){localStorage.setItem("logCron",_e.id),be("".concat(q.Z.apiPrefix,"logs/").concat(e.filename,"?path=").concat(e.directory||"")),_.W.get("".concat(q.Z.apiPrefix,"logs/").concat(e.filename,"?path=").concat(e.directory||"")).then((function(e){var t=e.code,n=e.data;200===t&&(ae(n),ge(!0))}))},Oe=function(){G(!0),_.W.get("".concat(q.Z.apiPrefix,"crons/").concat(s.id,"/logs")).then((function(e){var t=e.code,n=e.data;200===t&&ee(n)})).finally((function(){return G(!1)}))};return(0,c.useEffect)((function(){s&&s.id&&(qe(s),Oe(),function(){var e=(0,I.FA)(s.command);if(Array.isArray(e)){ke(je);var t=o()(e,2),n=t[0],i=t[1];Ze({parent:i,filename:n}),_.W.get("".concat(q.Z.apiPrefix,"scripts/").concat(n,"?path=").concat(i||"")).then((function(e){var t=e.code,n=e.data;200===t&&ce(n)}))}else e&&ke([je[0]])}())}),[s]),(0,D.jsxs)(d.Z,{title:(0,D.jsxs)("div",{className:"crontab-title-wrapper",children:[(0,D.jsxs)("div",{children:[(0,D.jsx)("span",{children:_e.name}),(null===(t=_e.labels)||void 0===t?void 0:t.length)>0&&""!==_e.labels[0]&&(0,D.jsx)(f.Z,{type:"vertical"}),(null===(n=_e.labels)||void 0===n?void 0:n.length)>0&&""!==_e.labels[0]&&(null===(i=_e.labels)||void 0===i?void 0:i.map((function(e,t){return(0,D.jsx)(p.Z,{color:"blue",style:{marginRight:5},children:e},e)})))]}),(0,D.jsxs)("div",{className:"operations",children:[(0,D.jsx)(m.Z,{title:_e.status===C.CrontabStatus.idle?l.ZP.get("运行"):l.ZP.get("停止"),children:(0,D.jsx)(h.Z,{type:"link",icon:_e.status===C.CrontabStatus.idle?(0,D.jsx)(x.Z,{}):(0,D.jsx)(P.Z,{}),size:"small",onClick:_e.status===C.CrontabStatus.idle?function(){d.Z.confirm({title:l.ZP.get("确认运行"),content:(0,D.jsxs)(D.Fragment,{children:[l.ZP.get("确认运行定时任务")," ",(0,D.jsx)(z,{style:{wordBreak:"break-all"},type:"warning",children:_e.name})," ",l.ZP.get("吗")]}),onOk:function(){_.W.put("".concat(q.Z.apiPrefix,"crons/run"),[_e.id]).then((function(e){var t=e.code;e.data;200===t&&(qe(a()(a()({},_e),{},{status:C.CrontabStatus.running})),setTimeout((function(){Oe()}),1e3))}))},onCancel:function(){console.log("Cancel")}})}:function(){d.Z.confirm({title:l.ZP.get("确认停止"),content:(0,D.jsxs)(D.Fragment,{children:[l.ZP.get("确认停止定时任务")," ",(0,D.jsx)(z,{style:{wordBreak:"break-all"},type:"warning",children:_e.name})," ",l.ZP.get("吗")]}),onOk:function(){_.W.put("".concat(q.Z.apiPrefix,"crons/stop"),[_e.id]).then((function(e){var t=e.code;e.data;200===t&&qe(a()(a()({},_e),{},{status:C.CrontabStatus.idle}))}))},onCancel:function(){console.log("Cancel")}})}})}),(0,D.jsx)(m.Z,{title:1===_e.isDisabled?l.ZP.get("启用"):l.ZP.get("禁用"),children:(0,D.jsx)(h.Z,{type:"link",icon:(0,D.jsx)(R.Z,{type:1===_e.isDisabled?"ql-icon-enable":"ql-icon-disable"}),size:"small",onClick:function(){d.Z.confirm({title:"确认".concat(1===_e.isDisabled?l.ZP.get("启用"):l.ZP.get("禁用")),content:(0,D.jsxs)(D.Fragment,{children:[l.ZP.get("确认"),1===_e.isDisabled?l.ZP.get("启用"):l.ZP.get("禁用"),l.ZP.get("定时任务")," ",(0,D.jsx)(z,{style:{wordBreak:"break-all"},type:"warning",children:_e.name})," ",l.ZP.get("吗")]}),onOk:function(){_.W.put("".concat(q.Z.apiPrefix,"crons/").concat(1===_e.isDisabled?"enable":"disable"),[_e.id]).then((function(e){var t=e.code;e.data;200===t&&qe(a()(a()({},_e),{},{isDisabled:1===_e.isDisabled?0:1}))}))},onCancel:function(){console.log("Cancel")}})}})}),(0,D.jsx)(m.Z,{title:1===_e.isPinned?l.ZP.get("取消置顶"):l.ZP.get("置顶"),children:(0,D.jsx)(h.Z,{type:"link",icon:(0,D.jsx)(R.Z,{type:1===_e.isPinned?"ql-icon-untop":"ql-icon-top"}),size:"small",onClick:function(){d.Z.confirm({title:"确认".concat(1===_e.isPinned?l.ZP.get("取消置顶"):l.ZP.get("置顶")),content:(0,D.jsxs)(D.Fragment,{children:[l.ZP.get("确认"),1===_e.isPinned?l.ZP.get("取消置顶"):l.ZP.get("置顶"),l.ZP.get("定时任务")," ",(0,D.jsx)(z,{style:{wordBreak:"break-all"},type:"warning",children:_e.name})," ",l.ZP.get("吗")]}),onOk:function(){_.W.put("".concat(q.Z.apiPrefix,"crons/").concat(1===_e.isPinned?"unpin":"pin"),[_e.id]).then((function(e){var t=e.code;e.data;200===t&&qe(a()(a()({},_e),{},{isPinned:1===_e.isPinned?0:1}))}))},onCancel:function(){console.log("Cancel")}})}})})]})]}),centered:!0,open:L,forceRender:!0,footer:!1,onCancel:function(){return F()},wrapClassName:"crontab-detail",width:H?"":"80vw",children:[(0,D.jsxs)("div",{className:"card-wrapper",children:[(0,D.jsx)(Z.Z,{children:(0,D.jsxs)("div",{className:"cron-detail-info-item",children:[(0,D.jsx)("div",{className:"cron-detail-info-title",children:l.ZP.get("任务")}),(0,D.jsx)("div",{className:"cron-detail-info-value",children:_e.command})]})}),(0,D.jsxs)(Z.Z,{style:{marginTop:10},children:[(0,D.jsxs)("div",{className:"cron-detail-info-item",children:[(0,D.jsx)("div",{className:"cron-detail-info-title",children:l.ZP.get("状态")}),(0,D.jsxs)("div",{className:"cron-detail-info-value",children:[(!_e.isDisabled||_e.status!==C.CrontabStatus.idle)&&(0,D.jsxs)(D.Fragment,{children:[_e.status===C.CrontabStatus.idle&&(0,D.jsx)(p.Z,{icon:(0,D.jsx)(b.Z,{}),color:"default",children:l.ZP.get("空闲中")}),_e.status===C.CrontabStatus.running&&(0,D.jsx)(p.Z,{icon:(0,D.jsx)(y.Z,{spin:!0}),color:"processing",children:l.ZP.get("运行中")}),_e.status===C.CrontabStatus.queued&&(0,D.jsx)(p.Z,{icon:(0,D.jsx)(w.Z,{}),color:"default",children:l.ZP.get("队列中")})]}),1===_e.isDisabled&&_e.status===C.CrontabStatus.idle&&(0,D.jsx)(p.Z,{icon:(0,D.jsx)(j.Z,{}),color:"error",children:l.ZP.get("已禁用")})]})]}),(0,D.jsxs)("div",{className:"cron-detail-info-item",children:[(0,D.jsx)("div",{className:"cron-detail-info-title",children:l.ZP.get("定时")}),(0,D.jsx)("div",{className:"cron-detail-info-value",children:_e.schedule})]}),(0,D.jsxs)("div",{className:"cron-detail-info-item",children:[(0,D.jsx)("div",{className:"cron-detail-info-title",children:l.ZP.get("最后运行时间")}),(0,D.jsx)("div",{className:"cron-detail-info-value",children:_e.last_execution_time?new Date(1e3*_e.last_execution_time).toLocaleString(T,{hour12:!1}).replace(" 24:"," 00:"):"-"})]}),(0,D.jsxs)("div",{className:"cron-detail-info-item",children:[(0,D.jsx)("div",{className:"cron-detail-info-title",children:l.ZP.get("最后运行时长")}),(0,D.jsx)("div",{className:"cron-detail-info-value",children:_e.last_running_time?(0,S.E)(_e.last_running_time):"-"})]}),(0,D.jsxs)("div",{className:"cron-detail-info-item",children:[(0,D.jsx)("div",{className:"cron-detail-info-title",children:l.ZP.get("下次运行时间")}),(0,D.jsx)("div",{className:"cron-detail-info-value",children:_e.nextRunTime&&_e.nextRunTime.toLocaleString(T,{hour12:!1}).replace(" 24:"," 00:")})]})]}),(0,D.jsx)(Z.Z,{style:{marginTop:10},tabList:je,activeTabKey:K,onTabChange:function(e){!function(e){U(e)}(e)},tabBarExtraContent:"script"===K&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(h.Z,{type:"primary",style:{marginRight:8},onClick:function(){d.Z.confirm({title:"确认保存",content:(0,D.jsxs)(D.Fragment,{children:[l.ZP.get("确认保存文件"),(0,D.jsx)(z,{style:{wordBreak:"break-all"},type:"warning",children:he.filename})," ",l.ZP.get(",保存后不可恢复")]}),onOk:function(){var e=fe.current?fe.current.getValue().replace(/\r\n/g,"\n"):le;return new Promise((function(t,n){_.W.put("".concat(q.Z.apiPrefix,"scripts"),{filename:he.filename,path:he.parent||"",content:e}).then((function(n){var i=n.code;n.data;200===i&&(ce(e),g.ZP.success("保存成功")),t(null)})).catch((function(e){return n(e)}))}))},onCancel:function(){console.log("Cancel")}})},children:l.ZP.get("保存")}),(0,D.jsx)(h.Z,{type:"primary",icon:(0,D.jsx)(k.Z,{}),onClick:function(){var e;null===(e=fe.current._domElement.parentElement)||void 0===e||e.requestFullscreen()}})]}),children:Re[K]})]}),(0,D.jsx)(N.default,{visible:de,handleCancel:function(){ge(!1)},cron:s,data:ie,logUrl:Pe})]})}},60012:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return se}});var i=n(93525),a=n.n(i),r=n(54306),o=n.n(r),l=n(57213),c=n.n(l),s=n(88265),u=n(63313),d=n(92260),g=n(22159),f=n(51704),p=n(2947),m=n(84163),h=n(9835),Z=n(34133),v=n(24378),x=n(86986),P=n(94674),b=n(20209),y=n(65601),w=n(7688),j=n(76657),k=n(32132),C=n(38101),S=n(23421),_=n(13740),q=n(14797),N={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"}}]},name:"pushpin",theme:"outlined"},B=n(46420),R=function(e,t){return u.createElement(B.Z,(0,q.Z)((0,q.Z)({},e),{},{ref:t,icon:N}))};R.displayName="PushpinOutlined";var I=u.forwardRef(R),O=n(23831),E=n(59673),D={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"unordered-list",theme:"outlined"},z=function(e,t){return u.createElement(B.Z,(0,q.Z)((0,q.Z)({},e),{},{ref:t,icon:D}))};z.displayName="UnorderedListOutlined";var W=u.forwardRef(z),T=n(26839),F=n(68834),L=n(99604),M=n(5558),H=n(78969),V=n(95176),A=n(8879),K=n(42792),U=n(84550),X=n(80755),$=n(98074),G=n(74714),Y=n(87421),Q=n(66150),J=n(82428),ee=n(33503),te=n(33538),ne=n(19631),ie=n(27705),ae=n(11527);function re(e){var t,n=e.service,i=e.options,a=(0,ne.Z)(n,i),r=a.loading,o=a.data;return(0,ae.jsx)(ie.Z,{spinning:r,children:(0,ae.jsx)(d.Z.Text,{ellipsis:!0,children:null==o||null===(t=o.data)||void 0===t?void 0:t.name})})}var oe=d.Z.Text,le=d.Z.Paragraph,ce=g.Z.Search,se=function(){var e=(0,$.useOutletContext)(),t=e.headerStyle,n=e.isPhone,i=e.theme,r=[{title:s.ZP.get("名称"),dataIndex:"name",key:"name",fixed:"left",width:120,render:function(e,t){return(0,ae.jsx)(le,{style:{wordBreak:"break-all",marginBottom:0},ellipsis:{tooltip:e,rows:2},children:(0,ae.jsx)("a",{onClick:function(){$e(t),Ae(!0)},children:t.name||"-"})})},sorter:{compare:function(e,t){var n;return null==e||null===(n=e.name)||void 0===n?void 0:n.localeCompare(null==t?void 0:t.name)}}},{title:s.ZP.get("命令/脚本"),dataIndex:"command",key:"command",width:240,render:function(e,t){return(0,ae.jsx)(le,{style:{wordBreak:"break-all",marginBottom:0},ellipsis:{tooltip:e,rows:2},children:(0,ae.jsx)("a",{onClick:function(){Nt(t)},children:e})})},sorter:{compare:function(e,t){return e.command.localeCompare(t.command)}}},{title:s.ZP.get("状态"),key:"status",dataIndex:"status",width:100,filters:[{text:s.ZP.get("运行中"),value:te.CrontabStatus.running},{text:s.ZP.get("空闲中"),value:te.CrontabStatus.idle},{text:s.ZP.get("已禁用"),value:te.CrontabStatus.disabled},{text:s.ZP.get("队列中"),value:te.CrontabStatus.queued}],render:function(e,t){return(0,ae.jsxs)(ae.Fragment,{children:[(!t.isDisabled||t.status!==te.CrontabStatus.idle)&&(0,ae.jsxs)(ae.Fragment,{children:[t.status===te.CrontabStatus.idle&&(0,ae.jsx)(f.Z,{icon:(0,ae.jsx)(b.Z,{}),color:"default",children:s.ZP.get("空闲中")}),t.status===te.CrontabStatus.running&&(0,ae.jsx)(f.Z,{icon:(0,ae.jsx)(y.Z,{spin:!0}),color:"processing",children:s.ZP.get("运行中")}),t.status===te.CrontabStatus.queued&&(0,ae.jsx)(f.Z,{icon:(0,ae.jsx)(w.Z,{}),color:"default",children:s.ZP.get("队列中")})]}),1===t.isDisabled&&t.status===te.CrontabStatus.idle&&(0,ae.jsx)(f.Z,{icon:(0,ae.jsx)(j.Z,{}),color:"error",children:s.ZP.get("已禁用")})]})}},{title:s.ZP.get("定时规则"),dataIndex:"schedule",key:"schedule",width:150,sorter:{compare:function(e,t){return e.schedule.localeCompare(t.schedule)}}},{title:s.ZP.get("最后运行时长"),width:167,dataIndex:"last_running_time",key:"last_running_time",sorter:{compare:function(e,t){return e.last_running_time-t.last_running_time}},render:function(e,t){return t.last_running_time?(0,X.E)(t.last_running_time):"-"}},{title:s.ZP.get("最后运行时间"),dataIndex:"last_execution_time",key:"last_execution_time",width:141,sorter:{compare:function(e,t){return(e.last_execution_time||0)-(t.last_execution_time||0)}},render:function(e,t){var n=navigator.language||navigator.languages[0];return(0,ae.jsx)("span",{style:{display:"block"},children:t.last_execution_time?new Date(1e3*t.last_execution_time).toLocaleString(n,{hour12:!1}).replace(" 24:"," 00:"):"-"})}},{title:s.ZP.get("下次运行时间"),width:144,sorter:{compare:function(e,t){return e.nextRunTime-t.nextRunTime}},render:function(e,t){var n=navigator.language||navigator.languages[0];return t.nextRunTime.toLocaleString(n,{hour12:!1}).replace(" 24:"," 00:")}},{title:s.ZP.get("关联订阅"),width:185,render:function(e,t){return t.sub_id?(0,ae.jsx)(re,{service:function(){return V.W.get("".concat(M.Z.apiPrefix,"subscriptions/").concat(t.sub_id))},options:{ready:null==t?void 0:t.sub_id,cacheKey:t.sub_id}}):"-"}},{title:s.ZP.get("操作"),key:"action",width:140,fixed:n?void 0:"right",render:function(e,t,n){return(0,ae.jsxs)(p.Z,{size:"middle",children:[t.status===te.CrontabStatus.idle&&(0,ae.jsx)("a",{onClick:function(e){e.stopPropagation(),Rt(t,n)},children:s.ZP.get("运行")}),t.status!==te.CrontabStatus.idle&&(0,ae.jsx)("a",{onClick:function(e){e.stopPropagation(),It(t,n)},children:s.ZP.get("停止")}),(0,ae.jsx)("a",{onClick:function(e){e.stopPropagation(),qe(c()(c()({},t),{},{timestamp:Date.now()}))},children:s.ZP.get("日志")}),(0,ae.jsx)(Et,{record:t,index:n},"more")]})}}],l=(0,u.useState)([]),d=o()(l,2),g=d[0],q=d[1],N=(0,u.useState)(!0),B=o()(N,2),R=B[0],D=B[1],z=(0,u.useState)(!1),ne=o()(z,2),ie=ne[0],se=ne[1],ue=(0,u.useState)(!1),de=o()(ue,2),ge=de[0],fe=de[1],pe=(0,u.useState)(),me=o()(pe,2),he=me[0],Ze=me[1],ve=(0,u.useState)(""),xe=o()(ve,2),Pe=xe[0],be=xe[1],ye=(0,u.useState)(!1),we=o()(ye,2),je=we[0],ke=we[1],Ce=(0,u.useState)(),Se=o()(Ce,2),_e=Se[0],qe=Se[1],Ne=(0,u.useState)([]),Be=o()(Ne,2),Re=Be[0],Ie=Be[1],Oe=(0,u.useState)({}),Ee=o()(Oe,2),De=Ee[0],ze=Ee[1],We=(0,u.useState)(),Te=o()(We,2),Fe=Te[0],Le=Te[1],Me=(0,u.useState)(!1),He=o()(Me,2),Ve=He[0],Ae=He[1],Ke=(0,u.useState)(),Ue=o()(Ke,2),Xe=Ue[0],$e=Ue[1],Ge=(0,u.useState)(""),Ye=o()(Ge,2),Qe=Ye[0],Je=Ye[1],et=(0,u.useState)(),tt=o()(et,2),nt=tt[0],it=tt[1],at=(0,u.useState)(!1),rt=o()(at,2),ot=rt[0],lt=rt[1],ct=(0,u.useState)(!1),st=o()(ct,2),ut=st[0],dt=st[1],gt=(0,u.useState)([]),ft=o()(gt,2),pt=ft[0],mt=ft[1],ht=(0,u.useState)([]),Zt=o()(ht,2),vt=Zt[0],xt=Zt[1],Pt=(0,u.useState)(!1),bt=o()(Pt,2),yt=bt[0],wt=bt[1],jt=(0,u.useRef)(null),kt=(0,Q.Z)(jt),Ct=(0,u.useState)(""),St=o()(Ct,2),_t=St[0],qt=St[1],Nt=function(e){var t=(0,J.FA)(e.command);if(Array.isArray(t)){var n=o()(t,2),i=n[0],a=n[1];$.history.push("/script?p=".concat(a,"&s=").concat(i))}else t&&(location.href=t)},Bt=function(){D(!0);var e=De.page,t=De.size,n=De.sorter,i=De.filters,a="".concat(M.Z.apiPrefix,"crons?searchValue=").concat(Pe,"&page=").concat(e,"&size=").concat(t,"&filters=").concat(JSON.stringify(i));n&&n.column&&n.order&&(a+="&sorter=".concat(JSON.stringify({field:n.column.key,type:"ascend"===n.order?"ASC":"DESC"}))),Fe&&(a+="&queryString=".concat(JSON.stringify({filters:Fe.filters,sorts:Fe.sorts,filterRelation:Fe.filterRelation||"and"}))),V.W.get(a).then((function(e){var t=e.code,n=e.data;if(200===t){var i=n.data,a=n.total;q(i.map((function(e){return c()(c()({},e),{},{nextRunTime:(0,J.n$)(e.schedule)})}))),it(a)}})).finally((function(){return D(!1)}))},Rt=function(e,t){m.Z.confirm({title:s.ZP.get("确认运行"),content:(0,ae.jsxs)(ae.Fragment,{children:[s.ZP.get("确认运行定时任务")," ",(0,ae.jsx)(oe,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",s.ZP.get("吗")]}),onOk:function(){V.W.put("".concat(M.Z.apiPrefix,"crons/run"),[e.id]).then((function(t){var n=t.code;t.data;if(200===n){var i=a()(g),r=i.findIndex((function(t){return t.id===e.id}));-1!==r&&(i.splice(r,1,c()(c()({},e),{},{status:te.CrontabStatus.running})),q(i))}}))},onCancel:function(){console.log("Cancel")}})},It=function(e,t){m.Z.confirm({title:s.ZP.get("确认停止"),content:(0,ae.jsxs)(ae.Fragment,{children:[s.ZP.get("确认停止定时任务")," ",(0,ae.jsx)(oe,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",s.ZP.get("吗")]}),onOk:function(){V.W.put("".concat(M.Z.apiPrefix,"crons/stop"),[e.id]).then((function(t){var n=t.code;t.data;if(200===n){var i=a()(g),r=i.findIndex((function(t){return t.id===e.id}));-1!==r&&(i.splice(r,1,c()(c()({},e),{},{pid:null,status:te.CrontabStatus.idle})),q(i))}}))},onCancel:function(){console.log("Cancel")}})},Ot=function(e){return[{label:s.ZP.get("编辑"),key:"edit",icon:(0,ae.jsx)(k.Z,{})},{label:1===e.isDisabled?s.ZP.get("启用"):s.ZP.get("禁用"),key:"enableOrDisable",icon:1===e.isDisabled?(0,ae.jsx)(C.Z,{}):(0,ae.jsx)(S.Z,{})},{label:s.ZP.get("删除"),key:"delete",icon:(0,ae.jsx)(_.Z,{})},{label:1===e.isPinned?s.ZP.get("取消置顶"):s.ZP.get("置顶"),key:"pinOrUnPin",icon:1===e.isPinned?(0,ae.jsx)(S.Z,{}):(0,ae.jsx)(I,{})}]},Et=function(e){var t=e.record,n=e.index;return(0,ae.jsx)(Z.Z,{placement:"bottomRight",trigger:["click"],menu:{items:Ot(t),onClick:function(e){var i=e.key;e.domEvent.stopPropagation(),Dt(i,t,n)}},children:(0,ae.jsx)("a",{onClick:function(e){return e.stopPropagation()},children:(0,ae.jsx)(O.Z,{})})})},Dt=function(e,t,n){switch(e){case"edit":!function(e,t){Ze(e),se(!0)}(t);break;case"enableOrDisable":!function(e,t){m.Z.confirm({title:"确认".concat(1===e.isDisabled?s.ZP.get("启用"):s.ZP.get("禁用")),content:(0,ae.jsxs)(ae.Fragment,{children:[s.ZP.get("确认"),1===e.isDisabled?s.ZP.get("启用"):s.ZP.get("禁用"),s.ZP.get("定时任务")," ",(0,ae.jsx)(oe,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",s.ZP.get("吗")]}),onOk:function(){V.W.put("".concat(M.Z.apiPrefix,"crons/").concat(1===e.isDisabled?"enable":"disable"),[e.id]).then((function(t){var n=t.code;if(t.data,200===n){var i=1===e.isDisabled?0:1,r=a()(g),o=r.findIndex((function(t){return t.id===e.id}));-1!==o&&(r.splice(o,1,c()(c()({},e),{},{isDisabled:i})),q(r))}}))},onCancel:function(){console.log("Cancel")}})}(t);break;case"delete":!function(e,t){m.Z.confirm({title:s.ZP.get("确认删除"),content:(0,ae.jsxs)(ae.Fragment,{children:[s.ZP.get("确认删除定时任务")," ",(0,ae.jsx)(oe,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",s.ZP.get("吗")]}),onOk:function(){V.W.delete("".concat(M.Z.apiPrefix,"crons"),{data:[e.id]}).then((function(t){var n=t.code;if(t.data,200===n){h.ZP.success(s.ZP.get("删除成功"));var i=a()(g),r=i.findIndex((function(t){return t.id===e.id}));-1!==r&&(i.splice(r,1),q(i))}}))},onCancel:function(){console.log("Cancel")}})}(t);break;case"pinOrUnPin":!function(e,t){m.Z.confirm({title:"确认".concat(1===e.isPinned?s.ZP.get("取消置顶"):s.ZP.get("置顶")),content:(0,ae.jsxs)(ae.Fragment,{children:[s.ZP.get("确认"),1===e.isPinned?s.ZP.get("取消置顶"):s.ZP.get("置顶"),s.ZP.get("定时任务")," ",(0,ae.jsx)(oe,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",s.ZP.get("吗")]}),onOk:function(){V.W.put("".concat(M.Z.apiPrefix,"crons/").concat(1===e.isPinned?"unpin":"pin"),[e.id]).then((function(t){var n=t.code;if(t.data,200===n){var i=1===e.isPinned?0:1,r=a()(g),o=r.findIndex((function(t){return t.id===e.id}));-1!==o&&(r.splice(o,1,c()(c()({},e),{},{isPinned:i})),q(r))}}))},onCancel:function(){console.log("Cancel")}})}(t)}},zt={selectedRowKeys:Re,onChange:function(e){Ie(e)}},Wt=function(e){m.Z.confirm({title:"确认".concat(te.OperationName[e]),content:(0,ae.jsxs)(ae.Fragment,{children:[s.ZP.get("确认"),te.OperationName[e],s.ZP.get("选中的定时任务吗")]}),onOk:function(){V.W.put("".concat(M.Z.apiPrefix,"crons/").concat(te.OperationPath[e]),Re).then((function(e){var t=e.code;e.data;200===t&&Bt()}))},onCancel:function(){console.log("Cancel")}})};(0,u.useEffect)((function(){_e&&(localStorage.setItem("logCron",_e.id),ke(!0))}),[_e]),(0,u.useEffect)((function(){ze(c()(c()({},De),{},{page:1}))}),[Pe]),(0,u.useEffect)((function(){De.page&&De.size&&Bt(),Fe&&Fe.id&&qt(Fe.id)}),[De,Fe]),(0,u.useEffect)((function(){if(Fe&&vt&&vt.length>0){var e=vt.slice(4).find((function(e){return e.id===Fe.id}));wt(!!e)}}),[Fe,vt]),(0,u.useEffect)((function(){Ft()}),[]);var Tt={onClick:function(e){var t=e.key;e.domEvent.stopPropagation(),function(e){switch(e){case"new":lt(!0);break;case"manage":dt(!0);break;default:Lt(e)}}(t)},items:[].concat(a()(a()(vt).slice(4).map((function(e){return{label:(0,ae.jsxs)(p.Z,{style:{display:"flex",justifyContent:"space-between"},children:[(0,ae.jsx)("span",{children:e.name}),(null==Fe?void 0:Fe.id)===e.id&&(0,ae.jsx)(E.Z,{style:{color:"#1890ff"}})]}),key:e.id,icon:(0,ae.jsx)(W,{})}}))),[{type:"divider"},{label:s.ZP.get("创建视图"),key:"new",icon:(0,ae.jsx)(T.Z,{})},{label:s.ZP.get("视图管理"),key:"manage",icon:(0,ae.jsx)(F.Z,{})}])},Ft=function(){D(!0),V.W.get("".concat(M.Z.apiPrefix,"crons/views")).then((function(e){var t=e.code,n=e.data;if(200===t){mt(n);var i=n.filter((function(e){return!e.isDisabled})).map((function(e){return c()(c()({},e),{},{name:"全部任务"===e.name?s.ZP.get("全部任务"):e.name})}));xt(i),ze({page:1,size:parseInt(localStorage.getItem("pageSize")||"20"),sorter:{},filters:{}}),Le(c()({},i[0]))}})).finally((function(){D(!1)}))},Lt=function(e){var t=vt.find((function(t){return t.id==e}));Ie([]),ze(c()(c()({},De),{},{page:1})),Le(t||null)},Mt=(0,ee.u)((function(){return{scroll:{y:kt}}}),[kt]),Ht=o()(Mt,1)[0];return(0,ae.jsxs)(H.ZP,{className:"ql-container-wrapper crontab-wrapper ql-container-wrapper-has-tab",title:s.ZP.get("定时任务"),extra:[(0,ae.jsx)(ce,{placeholder:s.ZP.get("请输入名称或者关键词"),style:{width:"auto"},enterButton:!0,allowClear:!0,loading:R,value:Qe,onChange:function(e){return Je(e.target.value)},onSearch:function(e){be(e.trim())}}),(0,ae.jsx)(v.Z,{type:"primary",onClick:function(){return Ze(null),void se(!0)},children:s.ZP.get("创建任务")},"2")],header:{style:t},children:[(0,ae.jsx)(x.Z,{defaultActiveKey:"all",size:"small",activeKey:_t,tabPosition:"top",className:"crontab-view ".concat(yt?"more-active":""),tabBarExtraContent:(0,ae.jsx)(Z.Z,{menu:Tt,trigger:["click"],overlayStyle:{minWidth:200},children:(0,ae.jsxs)("div",{className:"view-more ".concat(yt?"active":""),children:[(0,ae.jsxs)(p.Z,{children:[s.ZP.get("更多"),(0,ae.jsx)(L.Z,{})]}),(0,ae.jsx)("div",{className:"ant-tabs-ink-bar ant-tabs-ink-bar-animated"})]})}),onTabClick:Lt,items:a()(a()(vt).slice(0,4).map((function(e){return{key:e.id,label:e.name}})))}),(0,ae.jsxs)("div",{ref:jt,children:[Re.length>0&&(0,ae.jsxs)("div",{style:{marginBottom:16},children:[(0,ae.jsx)(v.Z,{type:"primary",style:{marginBottom:5},onClick:function(){m.Z.confirm({title:s.ZP.get("确认删除"),content:(0,ae.jsx)(ae.Fragment,{children:s.ZP.get("确认删除选中的定时任务吗")}),onOk:function(){V.W.delete("".concat(M.Z.apiPrefix,"crons"),{data:Re}).then((function(e){var t=e.code;e.data;200===t&&(h.ZP.success(s.ZP.get("批量删除成功")),Ie([]),Bt())}))},onCancel:function(){console.log("Cancel")}})},children:s.ZP.get("批量删除")}),(0,ae.jsx)(v.Z,{type:"primary",onClick:function(){return Wt(0)},style:{marginLeft:8,marginBottom:5},children:s.ZP.get("批量启用")}),(0,ae.jsx)(v.Z,{type:"primary",onClick:function(){return Wt(1)},style:{marginLeft:8,marginRight:8},children:s.ZP.get("批量禁用")}),(0,ae.jsx)(v.Z,{type:"primary",style:{marginRight:8},onClick:function(){return Wt(2)},children:s.ZP.get("批量运行")}),(0,ae.jsx)(v.Z,{type:"primary",onClick:function(){return Wt(3)},children:s.ZP.get("批量停止")}),(0,ae.jsx)(v.Z,{type:"primary",onClick:function(){return Wt(4)},style:{marginLeft:8,marginRight:8},children:s.ZP.get("批量置顶")}),(0,ae.jsx)(v.Z,{type:"primary",onClick:function(){return Wt(5)},style:{marginLeft:8,marginRight:8},children:s.ZP.get("批量取消置顶")}),(0,ae.jsx)(v.Z,{type:"primary",onClick:function(){return fe(!0)},style:{marginLeft:8,marginRight:8},children:s.ZP.get("批量修改标签")}),(0,ae.jsxs)("span",{style:{marginLeft:8},children:[s.ZP.get("已选择"),(0,ae.jsx)("a",{children:null==Re?void 0:Re.length}),s.ZP.get("项")]})]}),(0,ae.jsx)(P.Z,{columns:r,pagination:{current:De.page,pageSize:De.size,showSizeChanger:!0,simple:n,total:nt,showTotal:function(e,t){return"第 ".concat(t[0],"-").concat(t[1]," 条/总共 ").concat(e," 条")},pageSizeOptions:[10,20,50,100,200,500,nt||1e4].sort((function(e,t){return e-t}))},dataSource:g,rowKey:"id",size:"middle",scroll:{x:1200,y:kt},loading:R,rowSelection:zt,rowClassName:function(e,t){return e.isPinned?"pinned-cron cron":"cron"},onChange:function(e,t,n){var i=e.current,a=e.pageSize;ze({page:i,size:a,sorter:n,filters:t}),localStorage.setItem("pageSize",String(a))},components:n||De.size<50?void 0:Ht})]}),(0,ae.jsx)(K.default,{visible:je,handleCancel:function(){var e;e=_e,V.W.get("".concat(M.Z.apiPrefix,"crons/").concat(e.id)).then((function(t){var n=t.code,i=t.data;if(200===n){var r=g.findIndex((function(t){return t.id===e.id})),o=a()(g);i.nextRunTime=(0,J.n$)(i.schedule),-1!==r&&(o.splice(r,1,c()(c()({},e),i)),q(o))}})).finally((function(){return D(!1)})),ke(!1)},cron:_e}),(0,ae.jsx)(A.default,{visible:ie,handleCancel:function(){se(!1),Bt()},cron:he}),(0,ae.jsx)(A.CronLabelModal,{visible:ge,handleCancel:function(e){fe(!1),e&&Bt()},ids:Re}),(0,ae.jsx)(U.default,{visible:Ve,handleCancel:function(){Ae(!1)},cron:Xe,theme:i,isPhone:n}),(0,ae.jsx)(G.default,{visible:ot,handleCancel:function(e){lt(!1),Ft()}}),(0,ae.jsx)(Y.default,{cronViews:pt,visible:ut,handleCancel:function(){dt(!1)},cronViewChange:function(e){Ft()}})]})}},42792:function(e,t,n){"use strict";n.r(t);var i=n(54306),a=n.n(i),r=n(88265),o=n(63313),l=n(89065),c=n(84163),s=n(24378),u=n(95176),d=n(5558),g=n(65601),f=n(38101),p=n(91796),m=n(82428),h=n(11527);l.Z.Countdown;t.default=function(e){var t=e.cron,n=e.handleCancel,i=e.visible,l=e.data,Z=e.logUrl,v=(0,o.useState)(r.ZP.get("启动中...")),x=a()(v,2),P=x[0],b=x[1],y=(0,o.useState)(!0),w=a()(y,2),j=w[0],k=w[1],C=(0,o.useState)(!0),S=a()(C,2),_=S[0],q=S[1],N=(0,o.useState)(!1),B=a()(N,2),R=B[0],I=B[1],O=(0,o.useRef)({value:0,down:!0}),E=function e(n){n&&k(!0),u.W.get(Z||"".concat(d.Z.apiPrefix,"crons/").concat(t.id,"/log")).then((function(n){var i=n.code,a=n.data;if(200===i&&localStorage.getItem("logCron")===String(t.id)&&a!==P){var o=a;b(o||r.ZP.get("暂无日志"));var l=Boolean(o&&!(0,m.x$)(o)&&!o.includes("任务未运行"));q(l),l&&(D(),setTimeout((function(){e()}),2e3))}})).finally((function(){n&&k(!1)}))},D=function(){O.current.down&&setTimeout((function(){document.querySelector("#log-flag").scrollIntoView({behavior:"smooth"})}),600)},z=function(){localStorage.removeItem("logCron"),n()};return(0,o.useEffect)((function(){t&&t.id&&i&&E(!0)}),[t,i]),(0,o.useEffect)((function(){l&&b(l)}),[l]),(0,o.useEffect)((function(){I(document.body.clientWidth<768)}),[]),(0,h.jsx)(c.Z,{title:(0,h.jsxs)(h.Fragment,{children:[(_||j)&&(0,h.jsx)(g.Z,{spin:!0}),!_&&!j&&(0,h.jsx)(f.Z,{}),(0,h.jsx)("span",{style:{marginLeft:5},children:t&&t.name})]}),open:i,centered:!0,className:"log-modal",forceRender:!0,onOk:function(){return z()},onCancel:function(){return z()},footer:[(0,h.jsx)(s.Z,{type:"primary",onClick:function(){return z()},children:r.ZP.get("知道了")})],children:(0,h.jsxs)("div",{onScroll:function(e){var t=e.target.scrollTop;O.current.down&&(O.current={value:t,down:t>O.current.value})},className:"log-container",children:[j?(0,h.jsx)(p.Z,{}):(0,h.jsx)("pre",{style:R?{fontFamily:"Source Code Pro",zoom:.83}:{},children:P}),(0,h.jsx)("div",{id:"log-flag"})]})})}},8879:function(e,t,n){"use strict";n.r(t),n.d(t,{CronLabelModal:function(){return N},default:function(){return q}});var i=n(25359),a=n.n(i),r=n(57213),o=n.n(r),l=n(49811),c=n.n(l),s=n(54306),u=n.n(s),d=n(88265),g=n(63313),f=n(67393),p=n(9835),m=n(84163),h=n(22159),Z=n(24378),v=n(95176),x=n(5558),P=n(11186),b=n.n(P),y=n(93525),w=n.n(y),j=n(51704),k=n(8297),C=n(26839),S=n(11527),_=function(e){var t=e.value,n=e.onChange,i=(0,g.useState)(""),a=u()(i,2),r=a[0],o=a[1],l=(0,g.useState)(!1),c=u()(l,2),s=c[0],f=c[1],p=(0,g.useState)([]),m=u()(p,2),Z=m[0],v=m[1],x=(0,g.useRef)(),P=function(){r&&!Z.includes(r)&&(v([].concat(w()(Z),[r])),null==n||n([].concat(w()(Z),[r]))),f(!1),o("")},b=Z.map((function(e){var t=(0,S.jsx)(j.Z,{closable:!0,onClose:function(t){var i,a;t.preventDefault(),i=e,a=Z.filter((function(e){return e!==i})),v(a),null==n||n(a)},children:e});return(0,S.jsx)("span",{style:{display:"inline-block",marginBottom:8},children:t},e)}));return(0,g.useEffect)((function(){s&&x&&x.current.focus()}),[s]),(0,g.useEffect)((function(){t&&v(t)}),[t]),(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(k.Z,{enter:{scale:.8,opacity:0,type:"from",duration:100},leave:{opacity:0,width:0,scale:0,duration:200},appear:!1,children:b}),s&&(0,S.jsx)(h.Z,{ref:x,type:"text",size:"small",style:{width:78},value:r,onChange:function(e){o(e.target.value)},onBlur:P,onPressEnter:P}),!s&&(0,S.jsxs)(j.Z,{onClick:function(){f(!0)},style:{borderStyle:"dashed",cursor:"pointer"},children:[(0,S.jsx)(C.Z,{})," ",d.ZP.get("新建")]})]})},q=function(e){var t=e.cron,n=e.handleCancel,i=e.visible,r=f.Z.useForm(),l=u()(r,1)[0],s=(0,g.useState)(!1),Z=u()(s,2),P=Z[0],y=Z[1],w=function(){var e=c()(a()().mark((function e(i){var r,l,c,s,u;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return y(!0),r=t?"put":"post",l=o()({},i),t&&(l.id=t.id),e.prev=4,e.next=7,v.W[r]("".concat(x.Z.apiPrefix,"crons"),l);case 7:c=e.sent,s=c.code,u=c.data,200===s&&(p.ZP.success(t?d.ZP.get("更新任务成功"):d.ZP.get("创建任务成功")),n(u)),y(!1),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),y(!1);case 17:case"end":return e.stop()}}),e,null,[[4,14]])})));return function(t){return e.apply(this,arguments)}}();return(0,g.useEffect)((function(){l.resetFields()}),[t,i]),(0,S.jsx)(m.Z,{title:t?d.ZP.get("编辑任务"):d.ZP.get("创建任务"),open:i,forceRender:!0,centered:!0,maskClosable:!1,onOk:function(){l.validateFields().then((function(e){w(e)})).catch((function(e){console.log("Validate Failed:",e)}))},onCancel:function(){return n()},confirmLoading:P,children:(0,S.jsxs)(f.Z,{form:l,layout:"vertical",name:"form_in_modal",initialValues:t,children:[(0,S.jsx)(f.Z.Item,{name:"name",label:d.ZP.get("名称"),children:(0,S.jsx)(h.Z,{placeholder:d.ZP.get("请输入任务名称")})}),(0,S.jsx)(f.Z.Item,{name:"command",label:d.ZP.get("命令/脚本"),rules:[{required:!0,whitespace:!0}],children:(0,S.jsx)(h.Z.TextArea,{rows:4,autoSize:{minRows:1,maxRows:5},placeholder:d.ZP.get("支持输入脚本路径/任意系统可执行命令/task 脚本路径")})}),(0,S.jsx)(f.Z.Item,{name:"schedule",label:d.ZP.get("定时规则"),rules:[{required:!0},{validator:function(e,t){return!t||b().parseExpression(t).hasNext()?Promise.resolve():Promise.reject(d.ZP.get("Cron表达式格式有误"))}}],children:(0,S.jsx)(h.Z,{placeholder:d.ZP.get("秒(可选) 分 时 天 月 周")})}),(0,S.jsx)(f.Z.Item,{name:"labels",label:d.ZP.get("标签"),children:(0,S.jsx)(_,{})})]})})},N=function(e){var t=e.ids,n=e.handleCancel,i=e.visible,r=f.Z.useForm(),o=u()(r,1)[0],l=(0,g.useState)(!1),s=u()(l,2),h=s[0],P=s[1],b=function(){var e=c()(a()().mark((function e(i){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o.validateFields().then(function(){var e=c()(a()().mark((function e(r){var o,l,c;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return P(!0),o={ids:t,labels:r.labels},e.prev=2,e.next=5,v.W[i]("".concat(x.Z.apiPrefix,"crons/labels"),o);case 5:l=e.sent,c=l.code,l.data,200===c&&(p.ZP.success("post"===i?d.ZP.get("添加Labels成功"):d.ZP.get("删除Labels成功")),n(!0)),P(!1),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(2),P(!1);case 15:case"end":return e.stop()}}),e,null,[[2,12]])})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){console.log("Validate Failed:",e)}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();(0,g.useEffect)((function(){o.resetFields()}),[t,i]);var y=[(0,S.jsx)(Z.Z,{onClick:function(){return n(!1)},children:d.ZP.get("取消")}),(0,S.jsx)(Z.Z,{type:"primary",danger:!0,onClick:function(){return b("delete")},children:d.ZP.get("删除")}),(0,S.jsx)(Z.Z,{type:"primary",onClick:function(){return b("post")},children:d.ZP.get("添加")})];return(0,S.jsx)(m.Z,{title:d.ZP.get("批量修改标签"),open:i,footer:y,centered:!0,maskClosable:!1,forceRender:!0,onCancel:function(){return n(!1)},confirmLoading:h,children:(0,S.jsx)(f.Z,{form:o,layout:"vertical",name:"form_in_label_modal",children:(0,S.jsx)(f.Z.Item,{name:"labels",label:d.ZP.get("标签"),children:(0,S.jsx)(_,{})})})})}},33538:function(e,t,n){"use strict";n.r(t),n.d(t,{CrontabStatus:function(){return i},OperationName:function(){return a},OperationPath:function(){return r}});var i=function(e){return e[e.running=0]="running",e[e.queued=.5]="queued",e[e.idle=1]="idle",e[e.disabled=2]="disabled",e}({}),a=function(e){return e[e["启用"]=0]="启用",e[e["禁用"]=1]="禁用",e[e["运行"]=2]="运行",e[e["停止"]=3]="停止",e[e["置顶"]=4]="置顶",e[e["取消置顶"]=5]="取消置顶",e}({}),r=function(e){return e[e.enable=0]="enable",e[e.disable=1]="disable",e[e.run=2]="run",e[e.stop=3]="stop",e[e.pin=4]="pin",e[e.unpin=5]="unpin",e}({})},74714:function(e,t,n){"use strict";n.r(t);var i=n(12342),a=n.n(i),r=n(25359),o=n.n(r),l=n(57213),c=n.n(l),s=n(49811),u=n.n(s),d=n(54306),g=n.n(d),f=n(88265),p=n(63313),m=n(67393),h=n(28756),Z=n(84163),v=n(22159),x=n(24378),P=n(2947),b=n(95176),y=n(5558),w=n(32320),j=n(26839),k=n(86755),C=n(33538),S=n(19631),_=n(11527),q=["key","name"],N=["key","name"],B=[{name:f.ZP.get("命令"),value:"command"},{name:f.ZP.get("名称"),value:"name"},{name:f.ZP.get("定时规则"),value:"schedule"},{name:f.ZP.get("状态"),value:"status",onlySelect:!0},{name:f.ZP.get("标签"),value:"labels"},{name:f.ZP.get("订阅"),value:"sub_id",onlySelect:!0}],R={Reg:"",NotReg:"",In:"select",Nin:"select"},I=[{name:f.ZP.get("包含"),value:"Reg"},{name:f.ZP.get("不包含"),value:"NotReg"},{name:f.ZP.get("属于"),value:"In",type:"select"},{name:f.ZP.get("不属于"),value:"Nin",type:"select"}],O=[{name:f.ZP.get("顺序"),value:"ASC"},{name:f.ZP.get("倒序"),value:"DESC"}],E=function(e){return e.and="且",e.or="或",e}(E||{});t.default=function(e){var t=e.view,n=e.handleCancel,i=e.visible,r=m.Z.useForm(),l=g()(r,1)[0],s=(0,p.useState)(!1),d=g()(s,2),D=d[0],z=d[1],W=(0,p.useState)("and"),T=g()(W,2),F=T[0],L=T[1],M=m.Z.useWatch("filters",l),H=(0,S.Z)((function(){return b.W.get("".concat(y.Z.apiPrefix,"subscriptions"))}),{cacheKey:"subscriptions"}).data,V={status:[{name:f.ZP.get("运行中"),value:C.CrontabStatus.running},{name:f.ZP.get("空闲中"),value:C.CrontabStatus.idle},{name:f.ZP.get("已禁用"),value:C.CrontabStatus.disabled}],sub_id:null==H?void 0:H.data.map((function(e){return{name:e.name,value:e.id}}))},A=function(){var e=u()(o()().mark((function e(i){var a,r,l,s;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return z(!0),i.filterRelation=F,a=t?"put":"post",e.prev=3,e.next=6,b.W[a]("".concat(y.Z.apiPrefix,"crons/views"),t?c()(c()({},i),{},{id:t.id}):i);case 6:r=e.sent,l=r.code,s=r.data,200===l&&n(s),z(!1),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(3),z(!1);case 16:case"end":return e.stop()}}),e,null,[[3,13]])})));return function(t){return e.apply(this,arguments)}}();(0,p.useEffect)((function(){t||l.resetFields(),l.setFieldsValue(t||{filters:[{property:"command",operation:"Reg"}]})}),[t,i]);var K=(0,_.jsx)(h.Z,{style:{width:120},children:I.map((function(e){return(0,_.jsx)(h.Z.Option,{value:e.value,children:e.name},e.name)}))}),U=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,_.jsx)(h.Z,{style:t,children:e.map((function(e){return(0,_.jsx)(h.Z.Option,{value:e.value,children:e.name},e.name)}))})},X=(0,_.jsx)(h.Z,{style:{width:80},children:O.map((function(e){return(0,_.jsx)(h.Z.Option,{value:e.value,children:e.name},e.name)}))});return(0,_.jsx)(Z.Z,{title:t?f.ZP.get("编辑视图"):f.ZP.get("创建视图"),open:i,forceRender:!0,width:580,centered:!0,maskClosable:!1,onOk:function(){l.validateFields().then((function(e){A(e)})).catch((function(e){console.log("Validate Failed:",e)}))},onCancel:function(){return n()},confirmLoading:D,children:(0,_.jsxs)(m.Z,{form:l,layout:"vertical",name:"env_modal",children:[(0,_.jsx)(m.Z.Item,{name:"name",label:f.ZP.get("视图名称"),rules:[{required:!0,message:f.ZP.get("请输入视图名称")}],children:(0,_.jsx)(v.Z,{placeholder:f.ZP.get("请输入视图名称")})}),(0,_.jsx)(m.Z.List,{name:"filters",children:function(e,t){var n=t.add,i=t.remove;return(0,_.jsxs)("div",{style:{position:"relative"},className:"view-filters-container ".concat(e.length>1?"active":""),children:[e.length>1&&(0,_.jsx)("div",{style:{position:"absolute",width:50,borderRadius:10,border:"1px solid rgb(190, 220, 255)",borderRight:"none",height:56*(e.length-1),top:46,left:15},children:(0,_.jsx)(x.Z,{type:"primary",size:"small",style:{position:"absolute",top:"50%",translate:"-50% -50%",padding:"0 3px",cursor:"pointer"},onClick:function(){L("and"===F?"or":"and")},children:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)("span",{children:E[F]}),(0,_.jsx)(k.Z,{type:"ql-icon-d-caret"})]})})}),(0,_.jsxs)("div",{children:[e.map((function(e){var t,n,r=e.key,o=e.name,l=a()(e,q);return(0,_.jsx)(m.Z.Item,{label:0===o?f.ZP.get("筛选条件"):"",style:{marginBottom:0},required:!0,className:"filter-item",children:(0,_.jsxs)(P.Z,{className:"view-create-modal-filters",align:"baseline",children:[(0,_.jsx)(m.Z.Item,c()(c()({},l),{},{name:[o,"property"],rules:[{required:!0}],children:U(B,{width:120})})),(0,_.jsx)(m.Z.Item,c()(c()({},l),{},{name:[o,"operation"],rules:[{required:!0}],children:K})),(0,_.jsx)(m.Z.Item,c()(c()({},l),{},{name:[o,"value"],rules:[{required:!0,message:f.ZP.get("请输入内容")}],children:"select"===R[null==M?void 0:M[o].operation]?(t=null==M?void 0:M[o].property,(0,_.jsx)(h.Z,{mode:"tags",allowClear:!0,placeholder:f.ZP.get("输入后回车增加自定义选项"),children:null===(n=V[t])||void 0===n?void 0:n.map((function(e){return(0,_.jsx)(h.Z.Option,{value:e.value,children:e.name},e.name)}))})):(0,_.jsx)(v.Z,{placeholder:f.ZP.get("请输入内容")})})),0!==o&&(0,_.jsx)(w.Z,{onClick:function(){return i(o)}})]})},r)})),(0,_.jsx)(m.Z.Item,{children:(0,_.jsxs)("a",{onClick:function(){return n({property:"command",operation:"Reg"})},children:[(0,_.jsx)(j.Z,{}),f.ZP.get("新增筛选条件")]})})]})]})}}),(0,_.jsx)(m.Z.List,{name:"sorts",children:function(e,t){var n=t.add,i=t.remove;return(0,_.jsxs)("div",{style:{position:"relative"},className:"view-filters-container ".concat(e.length>1?"active":""),children:[e.length>1&&(0,_.jsx)("div",{style:{position:"absolute",width:50,borderRadius:10,border:"1px solid rgb(190, 220, 255)",borderRight:"none",height:56*(e.length-1),top:46,left:15},children:(0,_.jsx)(x.Z,{type:"primary",size:"small",style:{position:"absolute",top:"50%",translate:"-50% -50%",padding:"0 3px",cursor:"pointer"},children:(0,_.jsx)(_.Fragment,{children:(0,_.jsx)("span",{children:E[F]})})})}),(0,_.jsxs)("div",{children:[e.map((function(e){var t=e.key,n=e.name,r=a()(e,N);return(0,_.jsx)(m.Z.Item,{label:0===n?f.ZP.get("排序方式"):"",style:{marginBottom:0},className:"filter-item",children:(0,_.jsxs)(P.Z,{className:"view-create-modal-sorts",align:"baseline",children:[(0,_.jsx)(m.Z.Item,c()(c()({},r),{},{name:[n,"property"],rules:[{required:!0}],children:U(B)})),(0,_.jsx)(m.Z.Item,c()(c()({},r),{},{name:[n,"type"],rules:[{required:!0}],children:X})),(0,_.jsx)(w.Z,{onClick:function(){return i(n)}})]})},t)})),(0,_.jsx)(m.Z.Item,{children:(0,_.jsxs)("a",{onClick:function(){return n({property:"command",type:"ASC"})},children:[(0,_.jsx)(j.Z,{}),f.ZP.get("新增排序方式")]})})]})]})}})]})})}},87421:function(e,t,n){"use strict";n.r(t);var i=n(93525),a=n.n(i),r=n(57213),o=n.n(r),l=n(54306),c=n.n(l),s=n(12342),u=n.n(s),d=n(88265),g=n(63313),f=n(92260),p=n(16861),m=n(2947),h=n(84163),Z=n(9835),v=n(24378),x=n(94674),P=n(95176),b=n(5558),y=n(32132),w=n(13740),j=n(18141),k=n(9058),C=n(33328),S=n(66255),_=n(74714),q=n(11527),N=["index","moveRow","className","style"],B=f.Z.Text,R="DragableBodyRow",I=function(e){var t=e.index,n=e.moveRow,i=e.className,a=e.style,r=u()(e,N),l=(0,g.useRef)(),s=(0,j.L)({accept:R,collect:function(e){var n=(e.getItem()||{}).index;return n===t?{}:{isOver:e.isOver(),dropClassName:n<t?" drop-over-downward":" drop-over-upward"}},drop:function(e){n(e.index,t)}}),d=c()(s,2),f=d[0],p=f.isOver,m=f.dropClassName,h=d[1],Z=(0,k.c)({type:R,item:{index:t},collect:function(e){return{isDragging:e.isDragging()}}});return h((0,c()(Z,2)[1])(l)),(0,q.jsx)("tr",o()({ref:l,className:"".concat(i).concat(p?m:""),style:o()({cursor:"move"},a)},r))};t.default=function(e){var t=e.cronViews,n=e.handleCancel,i=e.visible,r=e.cronViewChange,l=function(e){return j.filter((function(e){return!e.isDisabled})).length<=1&&!e.isDisabled},s=[{title:d.ZP.get("名称"),dataIndex:"name",key:"name",render:function(e){return"全部任务"===e?d.ZP.get("全部任务"):e}},{title:d.ZP.get("类型"),dataIndex:"type",key:"type",render:function(e){return 1===e?d.ZP.get("系统"):d.ZP.get("个人")}},{title:d.ZP.get("显示"),key:"isDisabled",dataIndex:"isDisabled",width:100,render:function(e,t,n){return(0,q.jsx)(p.Z,{disabled:l(t),checked:!t.isDisabled,onChange:function(e){return M(e,t,n)}})}},{title:d.ZP.get("操作"),key:"action",width:100,render:function(e,t,n){return 1!==t.type?(0,q.jsxs)(m.Z,{size:"middle",children:[(0,q.jsx)("a",{onClick:function(){return F(t,n)},children:(0,q.jsx)(y.Z,{})}),!l(t)&&(0,q.jsx)("a",{onClick:function(){return L(t,n)},children:(0,q.jsx)(w.Z,{})})]}):"-"}}],u=(0,g.useState)([]),f=c()(u,2),j=f[0],k=f[1],N=(0,g.useState)(!1),R=c()(N,2),O=R[0],E=R[1],D=(0,g.useState)(null),z=c()(D,2),W=z[0],T=z[1],F=function(e,t){T(e),E(!0)},L=function(e,t){h.Z.confirm({title:d.ZP.get("确认删除"),content:(0,q.jsxs)(q.Fragment,{children:[d.ZP.get("确认删除视图")," ",(0,q.jsx)(B,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",d.ZP.get("吗")]}),onOk:function(){P.W.delete("".concat(b.Z.apiPrefix,"crons/views"),{data:[e.id]}).then((function(e){var t=e.code;e.data;200===t&&(Z.ZP.success(d.ZP.get("删除成功")),r())}))},onCancel:function(){console.log("Cancel")}})},M=function(e,t,n){P.W.put("".concat(b.Z.apiPrefix,"crons/views/").concat(e?"enable":"disable"),[t.id]).then((function(t){var i=t.code;t.data;if(200===i){var l=a()(j);l.splice(n,1,o()(o()({},j[n]),{},{isDisabled:!e})),k(l),r()}}))},H={body:{row:I}},V=(0,g.useCallback)((function(e,t){if(e!==t){var n=j[e];P.W.put("".concat(b.Z.apiPrefix,"crons/views/move"),{fromIndex:e,toIndex:t,id:n.id}).then((function(i){var l=i.code,c=i.data;if(200===l){var s=a()(j);s.splice(e,1),s.splice(t,0,o()(o()({},n),c)),k(s),r()}}))}}),[j]);return(0,g.useEffect)((function(){k(t)}),[t]),(0,q.jsxs)(h.Z,{title:d.ZP.get("视图管理"),open:i,centered:!0,width:620,onCancel:function(){return n()},className:"view-manage-modal",forceRender:!0,footer:!1,maskClosable:!1,children:[(0,q.jsx)(m.Z,{style:{display:"flex",justifyContent:"flex-end",marginBottom:10},children:(0,q.jsx)(v.Z,{type:"primary",onClick:function(){T(null),E(!0)},children:d.ZP.get("创建视图")},"2")}),(0,q.jsx)(C.W,{backend:S.PD,children:(0,q.jsx)(x.Z,{bordered:!0,columns:s,pagination:!1,dataSource:j,rowKey:"id",size:"middle",style:{marginBottom:20},components:H,onRow:function(e,t){return{index:t,moveRow:V}}})}),(0,q.jsx)(_.default,{view:W,visible:O,handleCancel:function(e){E(!1),r(e)}})]})}},5558:function(e,t,n){"use strict";var i=n(88265),a=window.__ENV__QlBaseUrl||"/";t.Z={siteName:i.ZP.get("青龙"),apiPrefix:"".concat(a,"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:i.ZP.get("中文"),flag:"/china.svg"}],defaultLanguage:"en"},scopes:[{name:i.ZP.get("定时任务"),value:"crons"},{name:i.ZP.get("环境变量"),value:"envs"},{name:i.ZP.get("订阅管理"),value:"subscriptions"},{name:i.ZP.get("配置文件"),value:"configs"},{name:i.ZP.get("脚本管理"),value:"scripts"},{name:i.ZP.get("日志管理"),value:"logs"},{name:i.ZP.get("依赖管理"),value:"dependencies"},{name:i.ZP.get("系统信息"),value:"system"}],scopesMap:{crons:i.ZP.get("定时任务"),envs:i.ZP.get("环境变量"),subscriptions:i.ZP.get("订阅管理"),configs:i.ZP.get("配置文件"),scripts:i.ZP.get("脚本管理"),logs:i.ZP.get("日志管理"),dependencies:i.ZP.get("依赖管理"),system:i.ZP.get("系统信息")},notificationModes:[{value:"gotify",label:"Gotify"},{value:"goCqHttpBot",label:"GoCqHttpBot"},{value:"serverChan",label:i.ZP.get("Server酱")},{value:"pushDeer",label:"PushDeer"},{value:"bark",label:"Bark"},{value:"telegramBot",label:i.ZP.get("Telegram机器人")},{value:"dingtalkBot",label:i.ZP.get("钉钉机器人")},{value:"weWorkBot",label:i.ZP.get("企业微信机器人")},{value:"weWorkApp",label:i.ZP.get("企业微信应用")},{value:"aibotk",label:i.ZP.get("智能微秘书")},{value:"iGot",label:"IGot"},{value:"pushPlus",label:"PushPlus"},{value:"chat",label:i.ZP.get("群晖chat")},{value:"email",label:i.ZP.get("邮箱")},{value:"lark",label:i.ZP.get("飞书机器人")},{value:"pushMe",label:"PushMe"},{value:"webhook",label:i.ZP.get("自定义通知")},{value:"closed",label:i.ZP.get("已关闭")}],notificationModeMap:{gotify:[{label:"gotifyUrl",tip:i.ZP.get("gotify的url地址,例如 https://push.example.de:8080"),required:!0},{label:"gotifyToken",tip:i.ZP.get("gotify的消息应用token码"),required:!0},{label:"gotifyPriority",tip:i.ZP.get("推送消息的优先级")}],chat:[{label:"chatUrl",tip:i.ZP.get("chat的url地址"),required:!0},{label:"chatToken",tip:i.ZP.get("chat的token码"),required:!0}],goCqHttpBot:[{label:"goCqHttpBotUrl",tip:i.ZP.get("推送到个人QQ: http://127.0.0.1/send_private_msg,群:http://127.0.0.1/send_group_msg"),required:!0},{label:"goCqHttpBotToken",tip:i.ZP.get("访问密钥"),required:!0},{label:"goCqHttpBotQq",tip:i.ZP.get("如果GOBOT_URL设置 /send_private_msg 则需要填入 user_id=个人QQ 相反如果是 /send_group_msg 则需要填入 group_id=QQ群"),required:!0}],serverChan:[{label:"serverChanKey",tip:i.ZP.get("Server酱SENDKEY"),required:!0}],pushDeer:[{label:"pushDeerKey",tip:i.ZP.get("PushDeer的Key,https://github.com/easychen/pushdeer"),required:!0},{label:"pushDeerUrl",tip:i.ZP.get("PushDeer的自架API endpoint,默认是 https://api2.pushdeer.com/message/push")}],bark:[{label:"barkPush",tip:i.ZP.get("Bark的信息IP/设备码,例如:https://api.day.app/XXXXXXXX"),required:!0},{label:"barkIcon",tip:i.ZP.get("BARK推送图标,自定义推送图标 (需iOS15或以上才能显示)")},{label:"barkSound",tip:i.ZP.get("BARK推送铃声,铃声列表去APP查看复制填写")},{label:"barkGroup",tip:i.ZP.get("BARK推送消息的分组,默认为qinglong")}],telegramBot:[{label:"telegramBotToken",tip:i.ZP.get("telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw"),required:!0},{label:"telegramBotUserId",tip:i.ZP.get("telegram用户的id,例如:129xxx206"),required:!0},{label:"telegramBotProxyHost",tip:i.ZP.get("代理IP")},{label:"telegramBotProxyPort",tip:i.ZP.get("代理端口")},{label:"telegramBotProxyAuth",tip:i.ZP.get("telegram代理配置认证参数,用户名与密码用英文冒号连接 user:password")},{label:"telegramBotApiHost",tip:i.ZP.get("telegram api自建的反向代理地址,默认tg官方api")}],dingtalkBot:[{label:"dingtalkBotToken",tip:i.ZP.get("钉钉机器人webhook token,例如:5a544165465465645d0f31dca676e7bd07415asdasd"),required:!0},{label:"dingtalkBotSecret",tip:i.ZP.get("密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串")}],weWorkBot:[{label:"weWorkBotKey",tip:i.ZP.get("企业微信机器人的webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa"),required:!0},{label:"weWorkOrigin",tip:i.ZP.get("企业微信代理地址")}],weWorkApp:[{label:"weWorkAppKey",tip:i.ZP.get("corpid、corpsecret、touser(注:多个成员ID使用|隔开)、agentid、消息类型(选填,不填默认文本消息类型) 注意用,号隔开(英文输入法的逗号),例如:wwcfrs,B-76WERQ,qinglong,1000001,2COat"),required:!0},{label:"weWorkOrigin",tip:i.ZP.get("企业微信代理地址")}],aibotk:[{label:"aibotkKey",tip:i.ZP.get("密钥key,智能微秘书个人中心获取apikey,申请地址:https://wechat.aibotk.com/signup?from=ql"),required:!0},{label:"aibotkType",tip:i.ZP.get("发送的目标,群组或者好友"),required:!0,placeholder:i.ZP.get("请输入要发送的目标"),items:[{value:"room",label:i.ZP.get("群聊")},{value:"contact",label:i.ZP.get("好友")}]},{label:"aibotkName",tip:i.ZP.get("要发送的用户昵称或群名,如果目标是群,需要填群名,如果目标是好友,需要填好友昵称"),required:!0}],iGot:[{label:"iGotPushKey",tip:i.ZP.get("iGot的信息推送key,例如:https://push.hellyw.com/XXXXXXXX"),required:!0}],pushPlus:[{label:"pushPlusToken",tip:i.ZP.get("微信扫码登录后一对一推送或一对多推送下面的token(您的Token),不提供PUSH_PLUS_USER则默认为一对一推送,参考 https://www.pushplus.plus/"),required:!0},{label:"pushPlusUser",tip:i.ZP.get("一对多推送的“群组编码”(一对多推送下面->您的群组(如无则创建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送)")}],lark:[{label:"larkKey",tip:i.ZP.get("飞书群组机器人:https://www.feishu.cn/hc/zh-CN/articles/360024984973"),required:!0}],email:[{label:"emailService",tip:i.ZP.get("邮箱服务名称,比如126、163、Gmail、QQ等,支持列表https://nodemailer.com/smtp/well-known/"),required:!0},{label:"emailUser",tip:i.ZP.get("邮箱地址"),required:!0},{label:"emailPass",tip:i.ZP.get("邮箱SMTP授权码"),required:!0}],pushMe:[{label:"pushMeKey",tip:i.ZP.get("PushMe的Key,https://push.i-i.me/"),required:!0}],webhook:[{label:"webhookMethod",tip:i.ZP.get("请求方法"),required:!0,items:[{value:"GET"},{value:"POST"},{value:"PUT"}]},{label:"webhookContentType",tip:i.ZP.get("请求头Content-Type"),required:!0,items:[{value:"application/json"},{value:"multipart/form-data"},{value:"application/x-www-form-urlencoded"}]},{label:"webhookUrl",tip:i.ZP.get("请求链接以http或者https开头。url或者body中必须包含$title,$content可选,对应api内容的位置"),required:!0,placeholder:"https://xxx.cn/api?content=$title\n"},{label:"webhookHeaders",tip:i.ZP.get("请求头格式Custom-Header1: Header1,多个换行分割"),placeholder:"Custom-Header1: Header1\nCustom-Header2: Header2"},{label:"webhookBody",tip:i.ZP.get("请求体格式key1: value1,多个换行分割。url或者body中必须包含$title,$content可选,对应api内容的位置"),placeholder:"key1: $title\nkey2: $content"}]},documentTitleMap:{"/login":i.ZP.get("登录"),"/initialization":i.ZP.get("初始化"),"/crontab":i.ZP.get("定时任务"),"/env":i.ZP.get("环境变量"),"/subscription":i.ZP.get("订阅管理"),"/config":i.ZP.get("配置文件"),"/script":i.ZP.get("脚本管理"),"/diff":i.ZP.get("对比工具"),"/log":i.ZP.get("日志管理"),"/setting":i.ZP.get("系统设置"),"/error":i.ZP.get("错误日志"),"/dependence":i.ZP.get("依赖管理")},dependenceTypes:["nodejs","python3","linux"]}},80755:function(e,t,n){"use strict";function i(e){var t=1e3*e,n=Math.floor(t/864e5),i=t%864e5,a=Math.floor(i/36e5),r=i%36e5,o=Math.floor(r/6e4),l=r%6e4,c=Math.round(l/1e3)+"秒";return o>0&&(c=o+"分"+c),a>0&&(c=a+"小时"+c),n>0&&(c=n+"天"+c),c}n.d(t,{E:function(){return i}})},95176:function(e,t,n){"use strict";n.d(t,{W:function(){return m}});var i=n(25359),a=n.n(i),r=n(49811),o=n.n(r),l=n(88265),c=n(9835),s=n(5558),u=n(98074),d=n(73669);c.ZP.config({duration:2});var g=Date.now(),f=d.Z.create({timeout:6e4,params:{t:g}}),p=["/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(s.Z.authKey);return t&&!p.includes(e.url)?(e.headers.Authorization="Bearer ".concat(t),e):e})),f.interceptors.response.use(function(){var e=o()(a()().mark((function e(t){var n,i,r;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.status,![502,504].includes(n)){e.next=5;break}u.history.push("/error"),e.next=18;break;case 5:if(401!==n){e.next=9;break}"/login"!==u.history.location.pathname&&(localStorage.removeItem(s.Z.authKey),u.history.push("/login")),e.next=18;break;case 9:return e.prev=9,200!==(i=t.data).code&&(r=i.message||i.data)&&c.ZP.error({content:r,style:{maxWidth:500,margin:"0 auto"}}),e.abrupt("return",i);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.data:e.response.statusText,n=e.response.status;[502,504].includes(n)?u.history.push("/error"):401===n?"/login"!==u.history.location.pathname&&(c.ZP.error(l.ZP.get("登录已过期,请重新登录")),localStorage.removeItem(s.Z.authKey),u.history.push("/login")):c.ZP.error({content:t,style:{maxWidth:500,margin:"0 auto"}})}else console.log(e.message);return Promise.reject(e)}));var m=f},82428:function(e,t,n){"use strict";n.d(t,{ZP:function(){return s},I1:function(){return g},w7:function(){return d},DY:function(){return f},FA:function(){return m},H$:function(){return Z},W9:function(){return u},x$:function(){return p},n$:function(){return h}});var i=n(93525),a=n.n(i),r=n(88265),o={".py":"python",".js":"javascript",".mjs":"javascript",".sh":"shell",".ts":"typescript"},l=n(11186),c=n.n(l);function s(){var e=navigator.userAgent.toLowerCase(),t=function(t){return t.test(e)},n=function(t){return(e.match(t)||[]).toString().replace(/[^0-9|_.]/g,"").replace(/_/g,".")},i="unknow";t(/windows|win32|win64|wow32|wow64/g)?i="windows":t(/macintosh|macintel/g)?i="macos":t(/x11/g)?i="linux":t(/android|adr/g)?i="android":t(/ios|iphone|ipad|ipod|iwatch/g)&&(i="ios");var a="unknow";"windows"===i?t(/windows nt 5.0|windows 2000/g)?a="2000":t(/windows nt 5.1|windows xp/g)?a="xp":t(/windows nt 5.2|windows 2003/g)?a="2003":t(/windows nt 6.0|windows vista/g)?a="vista":t(/windows nt 6.1|windows 7/g)?a="7":t(/windows nt 6.2|windows 8/g)?a="8":t(/windows nt 6.3|windows 8.1/g)?a="8.1":t(/windows nt 10.0|windows 10/g)&&(a="10"):"macos"===i?a=n(/os x [\d._]+/g):"android"===i?a=n(/android [\d._]+/g):"ios"===i&&(a=n(/os [\d._]+/g));var r="unknow";"windows"===i||"macos"===i||"linux"===i?r="desktop":("android"===i||"ios"===i||t(/mobile/g))&&(r="mobile");var o="unknow",l="unknow";t(/applewebkit/g)?(o="webkit",t(/edge/g)?l="edge":t(/opr/g)?l="opera":t(/chrome/g)?l="chrome":t(/safari/g)&&(l="safari")):t(/gecko/g)&&t(/firefox/g)?(o="gecko",l="firefox"):t(/presto/g)?(o="presto",l="opera"):t(/trident|compatible|msie/g)&&(o="trident",l="iexplore");var c="unknow";"webkit"===o?c=n(/applewebkit\/[\d._]+/g):"gecko"===o?c=n(/gecko\/[\d._]+/g):"presto"===o?c=n(/presto\/[\d._]+/g):"trident"===o&&(c=n(/trident\/[\d._]+/g));var s="unknow";"chrome"===l?s=n(/chrome\/[\d._]+/g):"safari"===l?s=n(/version\/[\d._]+/g):"firefox"===l?s=n(/firefox\/[\d._]+/g):"opera"===l?s=n(/opr\/[\d._]+/g):"iexplore"===l?s=n(/(msie [\d._]+)|(rv:[\d._]+)/g):"edge"===l&&(s=n(/edge\/[\d._]+/g));var u="none",d="unknow";t(/micromessenger/g)?(u="wechat",d=n(/micromessenger\/[\d._]+/g)):t(/qqbrowser/g)?(u="qq",d=n(/qqbrowser\/[\d._]+/g)):t(/ucbrowser/g)?(u="uc",d=n(/ucbrowser\/[\d._]+/g)):t(/qihu 360se/g)?u="360":t(/2345explorer/g)?(u="2345",d=n(/2345explorer\/[\d._]+/g)):t(/metasr/g)?u="sougou":t(/lbbrowser/g)?u="liebao":t(/maxthon/g)&&(u="maxthon",d=n(/maxthon\/[\d._]+/g));var g=Object.assign({engine:o,engineVs:c,platform:r,supporter:l,supporterVs:s,system:i,systemVs:a},"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(g.system,"/").concat(g.systemVs,"\n浏览器:").concat(g.supporter,"/").concat(g.supporterVs,"\n内核:").concat(g.engine,"/").concat(g.engineVs),"color: green;font-size: 14px;font-weight: bold;"),g}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.extraHeight,n=e.target;void 0===t&&(t=99);var i=null,a=0;(i=n||document.querySelector(".ant-table-wrapper"))&&(a=i.getBoundingClientRect().top);var r=document.body.clientHeight-a-t;return r}function d(e,t){var n,i,a=window.URL||window.webkitURL||window,r=new Blob([t]),o=document.createElementNS("http://www.w3.org/1999/xhtml","a");o.href=a.createObjectURL(r),o.download=e,n=o,(i=document.createEvent("MouseEvents")).initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(i)}function g(e,t,n){var i=a()(e),r=[];return function e(i){if(i)for(var a=0;a<(null==i?void 0:i.length);a++){if(t(i[a]))return n?void(i[a].children?i[a].children.unshift(n):i[a].children=[n]):void i.splice(a,1);i[a].children&&(r.push(i[a].key),e(i[a].children))}}(i),i}function f(e,t){var n;return function e(i){if(i)for(var a=0;a<(null==i?void 0:i.length);a++)t(i[a])?n=i[a]:i[a].children&&e(i[a].children)}(a()(e)),n}function p(e){return["     ",r.ZP.get("执行结束")].some((function(t){return e.includes(t)}))}function m(e){var t=e.split(" ");if("repo"===t[1]||"raw"===t[1])return t[2];var n=t.find((function(e){return[".js",".ts",".sh",".py"].some((function(t){return e.endsWith(t)}))}));if(n){var i,a;n.startsWith("/ql/data/scripts")&&(n=n.replace("/ql/data/scripts/",""));var r=n.lastIndexOf("/");return r>=0?(a=n.slice(r+1),i=n.slice(0,r)):(a=n,i=""),[a,i]}}function h(e){try{var t=c().parseExpression(e);if(t)return t.next().toDate()}catch(e){}return new Date("1970")}function Z(e){var t=function(e){if(!e)return"";var t=e.split(".");return".".concat(t[t.length-1])}(e);return o[t]}},16861:function(e,t,n){"use strict";n.d(t,{Z:function(){return b}});var i=n(60795),a=n(87807),r=n(24090),o=n(84875),l=n.n(o),c=n(17079),s=n(67725),u=n(63313),d=n(26230),g=n(25641),f=u.forwardRef((function(e,t){var n,i=e.prefixCls,r=void 0===i?"rc-switch":i,o=e.className,f=e.checked,p=e.defaultChecked,m=e.disabled,h=e.loadingIcon,Z=e.checkedChildren,v=e.unCheckedChildren,x=e.onClick,P=e.onChange,b=e.onKeyDown,y=(0,s.Z)(e,["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"]),w=(0,d.Z)(!1,{value:f,defaultValue:p}),j=(0,c.Z)(w,2),k=j[0],C=j[1];function S(e,t){var n=k;return m||(C(n=e),null==P||P(n,t)),n}var _=l()(r,o,(n={},(0,a.Z)(n,"".concat(r,"-checked"),k),(0,a.Z)(n,"".concat(r,"-disabled"),m),n));return u.createElement("button",Object.assign({},y,{type:"button",role:"switch","aria-checked":k,disabled:m,className:_,ref:t,onKeyDown:function(e){e.which===g.Z.LEFT?S(!1,e):e.which===g.Z.RIGHT&&S(!0,e),null==b||b(e)},onClick:function(e){var t=S(!k,e);null==x||x(t,e)}}),h,u.createElement("span",{className:"".concat(r,"-inner")},k?Z:v))}));f.displayName="Switch";var p=f,m=n(82259),h=n(7893),Z=n(65189),v=n(1570),x=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(e);a<i.length;a++)t.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(n[i[a]]=e[i[a]])}return n},P=u.forwardRef((function(e,t){var n,o=e.prefixCls,c=e.size,s=e.disabled,d=e.loading,g=e.className,f=void 0===g?"":g,P=x(e,["prefixCls","size","disabled","loading","className"]),b=u.useContext(m.E_),y=b.getPrefixCls,w=b.direction,j=u.useContext(Z.Z),k=u.useContext(h.Z),C=(null!=s?s:k)||d,S=y("switch",o),_=u.createElement("div",{className:"".concat(S,"-handle")},d&&u.createElement(r.Z,{className:"".concat(S,"-loading-icon")})),q=l()((n={},(0,a.Z)(n,"".concat(S,"-small"),"small"===(c||j)),(0,a.Z)(n,"".concat(S,"-loading"),d),(0,a.Z)(n,"".concat(S,"-rtl"),"rtl"===w),n),f);return u.createElement(v.Z,{insertExtraNode:!0},u.createElement(p,(0,i.Z)({},P,{prefixCls:S,className:q,disabled:C,ref:t,loadingIcon:_})))}));P.__ANT_SWITCH=!0;var b=P},38433:function(){}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[3249,3830],{65601:function(e,n,t){"use strict";t.d(n,{Z:function(){return u}});var o=t(14797),r=t(63313),c={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"},a=t(46420),i=function(e,n){return r.createElement(a.Z,(0,o.Z)((0,o.Z)({},e),{},{ref:n,icon:c}))};i.displayName="Loading3QuartersOutlined";var u=r.forwardRef(i)},42792:function(e,n,t){"use strict";t.r(n);var o=t(54306),r=t.n(o),c=t(88265),a=t(63313),i=t(89065),u=t(84163),l=t(24378),s=t(95176),f=t(5558),d=t(65601),g=t(38101),m=t(91796),v=t(82428),h=t(11527);i.Z.Countdown;n.default=function(e){var n=e.cron,t=e.handleCancel,o=e.visible,i=e.data,C=e.logUrl,Z=(0,a.useState)(c.ZP.get("启动中...")),p=r()(Z,2),x=p[0],y=p[1],w=(0,a.useState)(!0),j=r()(w,2),S=j[0],b=j[1],k=(0,a.useState)(!0),P=r()(k,2),q=P[0],E=P[1],R=(0,a.useState)(!1),_=r()(R,2),I=_[0],N=_[1],T=(0,a.useRef)({value:0,down:!0}),z=function e(t){t&&b(!0),s.W.get(C||"".concat(f.Z.apiPrefix,"crons/").concat(n.id,"/log")).then((function(t){var o=t.code,r=t.data;if(200===o&&localStorage.getItem("logCron")===String(n.id)&&r!==x){var a=r;y(a||c.ZP.get("暂无日志"));var i=Boolean(a&&!(0,v.x$)(a)&&!a.includes("任务未运行"));E(i),A(),i&&setTimeout((function(){e()}),2e3)}})).finally((function(){t&&b(!1)}))},A=function(){T.current.down&&setTimeout((function(){document.querySelector("#log-flag").scrollIntoView({behavior:"smooth"})}),1e3)},B=function(){localStorage.removeItem("logCron"),t()};return(0,a.useEffect)((function(){n&&n.id&&o&&z(!0)}),[n,o]),(0,a.useEffect)((function(){i&&y(i)}),[i]),(0,a.useEffect)((function(){N(document.body.clientWidth<768)}),[]),(0,h.jsx)(u.Z,{title:(0,h.jsxs)(h.Fragment,{children:[(q||S)&&(0,h.jsx)(d.Z,{spin:!0}),!q&&!S&&(0,h.jsx)(g.Z,{}),(0,h.jsx)("span",{style:{marginLeft:5},children:n&&n.name})]}),open:o,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:c.ZP.get("知道了")})],children:(0,h.jsxs)("div",{onScroll:function(e){var n=e.target.scrollTop;T.current.down&&(T.current={value:n,down:n>T.current.value})},className:"log-container",children:[S?(0,h.jsx)(m.Z,{}):(0,h.jsx)("pre",{style:I?{fontFamily:"Source Code Pro",zoom:.83}:{},children:x}),(0,h.jsx)("div",{id:"log-flag"})]})})}},92235:function(e,n,t){"use strict";t.d(n,{Z:function(){return c}});var o=t(17079),r=t(63313);function c(){var e=r.useReducer((function(e){return e+1}),0);return(0,o.Z)(e,2)[1]}},24669:function(e){var n=Array.isArray;e.exports=n}}]);
1
+ (self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[3249,3830],{65601:function(e,n,t){"use strict";t.d(n,{Z:function(){return u}});var o=t(14797),r=t(63313),c={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"},a=t(46420),i=function(e,n){return r.createElement(a.Z,(0,o.Z)((0,o.Z)({},e),{},{ref:n,icon:c}))};i.displayName="Loading3QuartersOutlined";var u=r.forwardRef(i)},42792:function(e,n,t){"use strict";t.r(n);var o=t(54306),r=t.n(o),c=t(88265),a=t(63313),i=t(89065),u=t(84163),l=t(24378),s=t(95176),f=t(5558),d=t(65601),g=t(38101),m=t(91796),v=t(82428),h=t(11527);i.Z.Countdown;n.default=function(e){var n=e.cron,t=e.handleCancel,o=e.visible,i=e.data,C=e.logUrl,Z=(0,a.useState)(c.ZP.get("启动中...")),p=r()(Z,2),x=p[0],y=p[1],w=(0,a.useState)(!0),j=r()(w,2),S=j[0],b=j[1],k=(0,a.useState)(!0),P=r()(k,2),q=P[0],E=P[1],R=(0,a.useState)(!1),_=r()(R,2),I=_[0],N=_[1],T=(0,a.useRef)({value:0,down:!0}),z=function e(t){t&&b(!0),s.W.get(C||"".concat(f.Z.apiPrefix,"crons/").concat(n.id,"/log")).then((function(t){var o=t.code,r=t.data;if(200===o&&localStorage.getItem("logCron")===String(n.id)&&r!==x){var a=r;y(a||c.ZP.get("暂无日志"));var i=Boolean(a&&!(0,v.x$)(a)&&!a.includes("任务未运行"));E(i),i&&(A(),setTimeout((function(){e()}),2e3))}})).finally((function(){t&&b(!1)}))},A=function(){T.current.down&&setTimeout((function(){document.querySelector("#log-flag").scrollIntoView({behavior:"smooth"})}),600)},B=function(){localStorage.removeItem("logCron"),t()};return(0,a.useEffect)((function(){n&&n.id&&o&&z(!0)}),[n,o]),(0,a.useEffect)((function(){i&&y(i)}),[i]),(0,a.useEffect)((function(){N(document.body.clientWidth<768)}),[]),(0,h.jsx)(u.Z,{title:(0,h.jsxs)(h.Fragment,{children:[(q||S)&&(0,h.jsx)(d.Z,{spin:!0}),!q&&!S&&(0,h.jsx)(g.Z,{}),(0,h.jsx)("span",{style:{marginLeft:5},children:n&&n.name})]}),open:o,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:c.ZP.get("知道了")})],children:(0,h.jsxs)("div",{onScroll:function(e){var n=e.target.scrollTop;T.current.down&&(T.current={value:n,down:n>T.current.value})},className:"log-container",children:[S?(0,h.jsx)(m.Z,{}):(0,h.jsx)("pre",{style:I?{fontFamily:"Source Code Pro",zoom:.83}:{},children:x}),(0,h.jsx)("div",{id:"log-flag"})]})})}},92235:function(e,n,t){"use strict";t.d(n,{Z:function(){return c}});var o=t(17079),r=t(63313);function c(){var e=r.useReducer((function(e){return e+1}),0);return(0,o.Z)(e,2)[1]}},24669:function(e){var n=Array.isArray;e.exports=n}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[8393],{26839:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});var r=a(14797),n=a(63313),l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},o=a(46420),i=function(e,t){return n.createElement(o.Z,(0,r.Z)((0,r.Z)({},e),{},{ref:t,icon:l}))};i.displayName="PlusOutlined";var s=n.forwardRef(i)},8879:function(e,t,a){"use strict";a.r(t),a.d(t,{CronLabelModal:function(){return S},default:function(){return E}});var r=a(25359),n=a.n(r),l=a(57213),o=a.n(l),i=a(49811),s=a.n(i),c=a(54306),u=a.n(c),p=a(88265),g=a(63313),d=a(67393),h=a(9835),P=a(84163),Z=a(22159),f=a(24378),b=a(95176),m=a(5558),v=a(11186),y=a.n(v),k=a(93525),x=a.n(k),w=a(51704),q=a(8297),C=a(26839),j=a(11527),B=function(e){var t=e.value,a=e.onChange,r=(0,g.useState)(""),n=u()(r,2),l=n[0],o=n[1],i=(0,g.useState)(!1),s=u()(i,2),c=s[0],d=s[1],h=(0,g.useState)([]),P=u()(h,2),f=P[0],b=P[1],m=(0,g.useRef)(),v=function(){l&&!f.includes(l)&&(b([].concat(x()(f),[l])),null==a||a([].concat(x()(f),[l]))),d(!1),o("")},y=f.map((function(e){var t=(0,j.jsx)(w.Z,{closable:!0,onClose:function(t){var r,n;t.preventDefault(),r=e,n=f.filter((function(e){return e!==r})),b(n),null==a||a(n)},children:e});return(0,j.jsx)("span",{style:{display:"inline-block",marginBottom:8},children:t},e)}));return(0,g.useEffect)((function(){c&&m&&m.current.focus()}),[c]),(0,g.useEffect)((function(){t&&b(t)}),[t]),(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(q.Z,{enter:{scale:.8,opacity:0,type:"from",duration:100},leave:{opacity:0,width:0,scale:0,duration:200},appear:!1,children:y}),c&&(0,j.jsx)(Z.Z,{ref:m,type:"text",size:"small",style:{width:78},value:l,onChange:function(e){o(e.target.value)},onBlur:v,onPressEnter:v}),!c&&(0,j.jsxs)(w.Z,{onClick:function(){d(!0)},style:{borderStyle:"dashed",cursor:"pointer"},children:[(0,j.jsx)(C.Z,{})," ",p.ZP.get("新建")]})]})},E=function(e){var t=e.cron,a=e.handleCancel,r=e.visible,l=d.Z.useForm(),i=u()(l,1)[0],c=(0,g.useState)(!1),f=u()(c,2),v=f[0],k=f[1],x=function(){var e=s()(n()().mark((function e(r){var l,i,s,c,u;return n()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k(!0),l=t?"put":"post",i=o()({},r),t&&(i.id=t.id),e.prev=4,e.next=7,b.W[l]("".concat(m.Z.apiPrefix,"crons"),i);case 7:s=e.sent,c=s.code,u=s.data,200===c&&(h.ZP.success(t?p.ZP.get("更新任务成功"):p.ZP.get("创建任务成功")),a(u)),k(!1),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),k(!1);case 17:case"end":return e.stop()}}),e,null,[[4,14]])})));return function(t){return e.apply(this,arguments)}}();return(0,g.useEffect)((function(){i.resetFields()}),[t,r]),(0,j.jsx)(P.Z,{title:t?p.ZP.get("编辑任务"):p.ZP.get("创建任务"),open:r,forceRender:!0,centered:!0,maskClosable:!1,onOk:function(){i.validateFields().then((function(e){x(e)})).catch((function(e){console.log("Validate Failed:",e)}))},onCancel:function(){return a()},confirmLoading:v,children:(0,j.jsxs)(d.Z,{form:i,layout:"vertical",name:"form_in_modal",initialValues:t,children:[(0,j.jsx)(d.Z.Item,{name:"name",label:p.ZP.get("名称"),children:(0,j.jsx)(Z.Z,{placeholder:p.ZP.get("请输入任务名称")})}),(0,j.jsx)(d.Z.Item,{name:"command",label:p.ZP.get("命令/脚本"),rules:[{required:!0,whitespace:!0}],children:(0,j.jsx)(Z.Z.TextArea,{rows:4,autoSize:{minRows:1,maxRows:5},placeholder:p.ZP.get("支持输入脚本路径/任意系统可执行命令/task 脚本路径")})}),(0,j.jsx)(d.Z.Item,{name:"schedule",label:p.ZP.get("定时规则"),rules:[{required:!0},{validator:function(e,t){return!t||y().parseExpression(t).hasNext()?Promise.resolve():Promise.reject(p.ZP.get("Cron表达式格式有误"))}}],children:(0,j.jsx)(Z.Z,{placeholder:p.ZP.get("秒(可选) 分 时 天 月 周")})}),(0,j.jsx)(d.Z.Item,{name:"labels",label:p.ZP.get("标签"),children:(0,j.jsx)(B,{})})]})})},S=function(e){var t=e.ids,a=e.handleCancel,r=e.visible,l=d.Z.useForm(),o=u()(l,1)[0],i=(0,g.useState)(!1),c=u()(i,2),Z=c[0],v=c[1],y=function(){var e=s()(n()().mark((function e(r){return n()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o.validateFields().then(function(){var e=s()(n()().mark((function e(l){var o,i,s;return n()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return v(!0),o={ids:t,labels:l.labels},e.prev=2,e.next=5,b.W[r]("".concat(m.Z.apiPrefix,"crons/labels"),o);case 5:i=e.sent,s=i.code,i.data,200===s&&(h.ZP.success("post"===r?p.ZP.get("添加Labels成功"):p.ZP.get("删除Labels成功")),a(!0)),v(!1),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(2),v(!1);case 15:case"end":return e.stop()}}),e,null,[[2,12]])})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){console.log("Validate Failed:",e)}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();(0,g.useEffect)((function(){o.resetFields()}),[t,r]);var k=[(0,j.jsx)(f.Z,{onClick:function(){return a(!1)},children:p.ZP.get("取消")}),(0,j.jsx)(f.Z,{type:"primary",danger:!0,onClick:function(){return y("delete")},children:p.ZP.get("删除")}),(0,j.jsx)(f.Z,{type:"primary",onClick:function(){return y("post")},children:p.ZP.get("添加")})];return(0,j.jsx)(P.Z,{title:p.ZP.get("批量修改标签"),open:r,footer:k,centered:!0,maskClosable:!1,forceRender:!0,onCancel:function(){return a(!1)},confirmLoading:Z,children:(0,j.jsx)(d.Z,{form:o,layout:"vertical",name:"form_in_label_modal",children:(0,j.jsx)(d.Z.Item,{name:"labels",label:p.ZP.get("标签"),children:(0,j.jsx)(B,{})})})})}},5558:function(e,t,a){"use strict";var r=a(88265),n=window.__ENV__QlBaseUrl||"/";t.Z={siteName:r.ZP.get("青龙"),apiPrefix:"".concat(n,"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:r.ZP.get("中文"),flag:"/china.svg"}],defaultLanguage:"en"},scopes:[{name:r.ZP.get("定时任务"),value:"crons"},{name:r.ZP.get("环境变量"),value:"envs"},{name:r.ZP.get("订阅管理"),value:"subscriptions"},{name:r.ZP.get("配置文件"),value:"configs"},{name:r.ZP.get("脚本管理"),value:"scripts"},{name:r.ZP.get("日志管理"),value:"logs"},{name:r.ZP.get("依赖管理"),value:"dependencies"},{name:r.ZP.get("系统信息"),value:"system"}],scopesMap:{crons:r.ZP.get("定时任务"),envs:r.ZP.get("环境变量"),subscriptions:r.ZP.get("订阅管理"),configs:r.ZP.get("配置文件"),scripts:r.ZP.get("脚本管理"),logs:r.ZP.get("日志管理"),dependencies:r.ZP.get("依赖管理"),system:r.ZP.get("系统信息")},notificationModes:[{value:"gotify",label:"Gotify"},{value:"goCqHttpBot",label:"GoCqHttpBot"},{value:"serverChan",label:r.ZP.get("Server酱")},{value:"pushDeer",label:"PushDeer"},{value:"bark",label:"Bark"},{value:"telegramBot",label:r.ZP.get("Telegram机器人")},{value:"dingtalkBot",label:r.ZP.get("钉钉机器人")},{value:"weWorkBot",label:r.ZP.get("企业微信机器人")},{value:"weWorkApp",label:r.ZP.get("企业微信应用")},{value:"aibotk",label:r.ZP.get("智能微秘书")},{value:"iGot",label:"IGot"},{value:"pushPlus",label:"PushPlus"},{value:"chat",label:r.ZP.get("群晖chat")},{value:"email",label:r.ZP.get("邮箱")},{value:"lark",label:r.ZP.get("飞书机器人")},{value:"pushMe",label:"PushMe"},{value:"webhook",label:r.ZP.get("自定义通知")},{value:"closed",label:r.ZP.get("已关闭")}],notificationModeMap:{gotify:[{label:"gotifyUrl",tip:r.ZP.get("gotify的url地址,例如 https://push.example.de:8080"),required:!0},{label:"gotifyToken",tip:r.ZP.get("gotify的消息应用token码"),required:!0},{label:"gotifyPriority",tip:r.ZP.get("推送消息的优先级")}],chat:[{label:"chatUrl",tip:r.ZP.get("chat的url地址"),required:!0},{label:"chatToken",tip:r.ZP.get("chat的token码"),required:!0}],goCqHttpBot:[{label:"goCqHttpBotUrl",tip:r.ZP.get("推送到个人QQ: http://127.0.0.1/send_private_msg,群:http://127.0.0.1/send_group_msg"),required:!0},{label:"goCqHttpBotToken",tip:r.ZP.get("访问密钥"),required:!0},{label:"goCqHttpBotQq",tip:r.ZP.get("如果GOBOT_URL设置 /send_private_msg 则需要填入 user_id=个人QQ 相反如果是 /send_group_msg 则需要填入 group_id=QQ群"),required:!0}],serverChan:[{label:"serverChanKey",tip:r.ZP.get("Server酱SENDKEY"),required:!0}],pushDeer:[{label:"pushDeerKey",tip:r.ZP.get("PushDeer的Key,https://github.com/easychen/pushdeer"),required:!0},{label:"pushDeerUrl",tip:r.ZP.get("PushDeer的自架API endpoint,默认是 https://api2.pushdeer.com/message/push")}],bark:[{label:"barkPush",tip:r.ZP.get("Bark的信息IP/设备码,例如:https://api.day.app/XXXXXXXX"),required:!0},{label:"barkIcon",tip:r.ZP.get("BARK推送图标,自定义推送图标 (需iOS15或以上才能显示)")},{label:"barkSound",tip:r.ZP.get("BARK推送铃声,铃声列表去APP查看复制填写")},{label:"barkGroup",tip:r.ZP.get("BARK推送消息的分组,默认为qinglong")}],telegramBot:[{label:"telegramBotToken",tip:r.ZP.get("telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw"),required:!0},{label:"telegramBotUserId",tip:r.ZP.get("telegram用户的id,例如:129xxx206"),required:!0},{label:"telegramBotProxyHost",tip:r.ZP.get("代理IP")},{label:"telegramBotProxyPort",tip:r.ZP.get("代理端口")},{label:"telegramBotProxyAuth",tip:r.ZP.get("telegram代理配置认证参数,用户名与密码用英文冒号连接 user:password")},{label:"telegramBotApiHost",tip:r.ZP.get("telegram api自建的反向代理地址,默认tg官方api")}],dingtalkBot:[{label:"dingtalkBotToken",tip:r.ZP.get("钉钉机器人webhook token,例如:5a544165465465645d0f31dca676e7bd07415asdasd"),required:!0},{label:"dingtalkBotSecret",tip:r.ZP.get("密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串")}],weWorkBot:[{label:"weWorkBotKey",tip:r.ZP.get("企业微信机器人的webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa"),required:!0},{label:"weWorkOrigin",tip:r.ZP.get("企业微信代理地址")}],weWorkApp:[{label:"weWorkAppKey",tip:r.ZP.get("corpid、corpsecret、touser(注:多个成员ID使用|隔开)、agentid、消息类型(选填,不填默认文本消息类型) 注意用,号隔开(英文输入法的逗号),例如:wwcfrs,B-76WERQ,qinglong,1000001,2COat"),required:!0},{label:"weWorkOrigin",tip:r.ZP.get("企业微信代理地址")}],aibotk:[{label:"aibotkKey",tip:r.ZP.get("密钥key,智能微秘书个人中心获取apikey,申请地址:https://wechat.aibotk.com/signup?from=ql"),required:!0},{label:"aibotkType",tip:r.ZP.get("发送的目标,群组或者好友"),required:!0,placeholder:r.ZP.get("请输入要发送的目标"),items:[{value:"room",label:r.ZP.get("群聊")},{value:"contact",label:r.ZP.get("好友")}]},{label:"aibotkName",tip:r.ZP.get("要发送的用户昵称或群名,如果目标是群,需要填群名,如果目标是好友,需要填好友昵称"),required:!0}],iGot:[{label:"iGotPushKey",tip:r.ZP.get("iGot的信息推送key,例如:https://push.hellyw.com/XXXXXXXX"),required:!0}],pushPlus:[{label:"pushPlusToken",tip:r.ZP.get("微信扫码登录后一对一推送或一对多推送下面的token(您的Token),不提供PUSH_PLUS_USER则默认为一对一推送,参考 https://www.pushplus.plus/"),required:!0},{label:"pushPlusUser",tip:r.ZP.get("一对多推送的“群组编码”(一对多推送下面->您的群组(如无则创建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送)")}],lark:[{label:"larkKey",tip:r.ZP.get("飞书群组机器人:https://www.feishu.cn/hc/zh-CN/articles/360024984973"),required:!0}],email:[{label:"emailService",tip:r.ZP.get("邮箱服务名称,比如126、163、Gmail、QQ等,支持列表https://nodemailer.com/smtp/well-known/"),required:!0},{label:"emailUser",tip:r.ZP.get("邮箱地址"),required:!0},{label:"emailPass",tip:r.ZP.get("邮箱SMTP授权码"),required:!0}],pushMe:[{label:"pushMeKey",tip:r.ZP.get("PushMe的Key,https://push.i-i.me/"),required:!0}],webhook:[{label:"webhookMethod",tip:r.ZP.get("请求方法"),required:!0,items:[{value:"GET"},{value:"POST"},{value:"PUT"}]},{label:"webhookContentType",tip:r.ZP.get("请求头Content-Type"),required:!0,items:[{value:"application/json"},{value:"multipart/form-data"},{value:"application/x-www-form-urlencoded"}]},{label:"webhookUrl",tip:r.ZP.get("请求链接以http或者https开头。url或者body中必须包含$title,$content可选,对应api内容的位置"),required:!0,placeholder:"https://xxx.cn/api?content=$title\n"},{label:"webhookHeaders",tip:r.ZP.get("请求头格式Custom-Header1: Header1,多个换行分割"),placeholder:"Custom-Header1: Header1\nCustom-Header2: Header2"},{label:"webhookBody",tip:r.ZP.get("请求体格式key1: value1,多个换行分割。url或者body中必须包含$title,$content可选,对应api内容的位置"),placeholder:"key1: $title\nkey2: $content"}]},documentTitleMap:{"/login":r.ZP.get("登录"),"/initialization":r.ZP.get("初始化"),"/crontab":r.ZP.get("定时任务"),"/env":r.ZP.get("环境变量"),"/subscription":r.ZP.get("订阅管理"),"/config":r.ZP.get("配置文件"),"/script":r.ZP.get("脚本管理"),"/diff":r.ZP.get("对比工具"),"/log":r.ZP.get("日志管理"),"/setting":r.ZP.get("系统设置"),"/error":r.ZP.get("错误日志"),"/dependence":r.ZP.get("依赖管理")},dependenceTypes:["nodejs","python3","linux"]}},95176:function(e,t,a){"use strict";a.d(t,{W:function(){return P}});var r=a(25359),n=a.n(r),l=a(49811),o=a.n(l),i=a(88265),s=a(9835),c=a(5558),u=a(98074),p=a(73669);s.ZP.config({duration:2});var g=Date.now(),d=p.Z.create({timeout:6e4,params:{t:g}}),h=["/api/user/login","/open/auth/token","/api/user/two-factor/login","/api/system","/api/user/init","/api/user/notification/init"];d.interceptors.request.use((function(e){var t=localStorage.getItem(c.Z.authKey);return t&&!h.includes(e.url)?(e.headers.Authorization="Bearer ".concat(t),e):e})),d.interceptors.response.use(function(){var e=o()(n()().mark((function e(t){var a,r,l;return n()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.status,![502,504].includes(a)){e.next=5;break}u.history.push("/error"),e.next=18;break;case 5:if(401!==a){e.next=9;break}"/login"!==u.history.location.pathname&&(localStorage.removeItem(c.Z.authKey),u.history.push("/login")),e.next=18;break;case 9:return e.prev=9,200!==(r=t.data).code&&(l=r.message||r.data)&&s.ZP.error({content:l,style:{maxWidth:500,margin:"0 auto"}}),e.abrupt("return",r);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.data:e.response.statusText,a=e.response.status;[502,504].includes(a)?u.history.push("/error"):401===a?"/login"!==u.history.location.pathname&&(s.ZP.error(i.ZP.get("登录已过期,请重新登录")),localStorage.removeItem(c.Z.authKey),u.history.push("/login")):s.ZP.error({content:t,style:{maxWidth:500,margin:"0 auto"}})}else console.log(e.message);return Promise.reject(e)}));var P=d},51704:function(e,t,a){"use strict";a.d(t,{Z:function(){return y}});var r=a(87807),n=a(60795),l=a(17079),o=a(5132),i=a(84875),s=a.n(i),c=a(92976),u=a(63313),p=a(82259),g=a(31124),d=a(1570),h=function(e,t){var a={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(a[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(a[r[n]]=e[r[n]])}return a},P=function(e){var t,a=e.prefixCls,l=e.className,o=e.checked,i=e.onChange,c=e.onClick,g=h(e,["prefixCls","className","checked","onChange","onClick"]),d=(0,u.useContext(p.E_).getPrefixCls)("tag",a),P=s()(d,(t={},(0,r.Z)(t,"".concat(d,"-checkable"),!0),(0,r.Z)(t,"".concat(d,"-checkable-checked"),o),t),l);return u.createElement("span",(0,n.Z)({},g,{className:P,onClick:function(e){null==i||i(!o),null==c||c(e)}}))},Z=function(e,t){var a={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(a[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(a[r[n]]=e[r[n]])}return a},f=new RegExp("^(".concat(g.Y.join("|"),")(-inverse)?$")),b=new RegExp("^(".concat(g.E.join("|"),")$")),m=function(e,t){var a,i=e.prefixCls,g=e.className,h=e.style,P=e.children,m=e.icon,v=e.color,y=e.onClose,k=e.closeIcon,x=e.closable,w=void 0!==x&&x,q=Z(e,["prefixCls","className","style","children","icon","color","onClose","closeIcon","closable"]),C=u.useContext(p.E_),j=C.getPrefixCls,B=C.direction,E=u.useState(!0),S=(0,l.Z)(E,2),_=S[0],O=S[1];u.useEffect((function(){"visible"in q&&O(q.visible)}),[q.visible]);var T=function(){return!!v&&(f.test(v)||b.test(v))},I=(0,n.Z)({backgroundColor:v&&!T()?v:void 0},h),K=T(),H=j("tag",i),M=s()(H,(a={},(0,r.Z)(a,"".concat(H,"-").concat(v),K),(0,r.Z)(a,"".concat(H,"-has-color"),v&&!K),(0,r.Z)(a,"".concat(H,"-hidden"),!_),(0,r.Z)(a,"".concat(H,"-rtl"),"rtl"===B),a),g),R=function(e){e.stopPropagation(),null==y||y(e),e.defaultPrevented||"visible"in q||O(!1)},X="onClick"in q||P&&"a"===P.type,N=(0,c.Z)(q,["visible"]),A=m||null,U=A?u.createElement(u.Fragment,null,A,u.createElement("span",null,P)):P,W=u.createElement("span",(0,n.Z)({},N,{ref:t,className:M,style:I}),U,w?k?u.createElement("span",{className:"".concat(H,"-close-icon"),onClick:R},k):u.createElement(o.Z,{className:"".concat(H,"-close-icon"),onClick:R}):null);return X?u.createElement(d.Z,null,W):W},v=u.forwardRef(m);v.CheckableTag=P;var y=v},38433:function(){}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[9914],{20209:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var i=n(14797),r=n(63313),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"},c=n(46420),s=function(e,t){return r.createElement(c.Z,(0,i.Z)((0,i.Z)({},e),{},{ref:t,icon:a}))};s.displayName="ClockCircleOutlined";var o=r.forwardRef(s)},13740:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var i=n(14797),r=n(63313),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},c=n(46420),s=function(e,t){return r.createElement(c.Z,(0,i.Z)((0,i.Z)({},e),{},{ref:t,icon:a}))};s.displayName="DeleteOutlined";var o=r.forwardRef(s)},66150:function(e,t,n){"use strict";var i=n(54306),r=n.n(i),a=n(63313),c=n(61761),s=n(82428);t.Z=function(e,t){var n=(0,a.useState)(0),i=r()(n,2),o=i[0],u=i[1];return(0,c.Z)(e,(function(e){var n=e.target;n.classList.contains("ant-table-wrapper")||(n=e.target.querySelector(".ant-table-wrapper")),u((0,s.W9)({extraHeight:t,target:n}))})),o}},16648:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return ee}});var i=n(93525),r=n.n(i),a=n(54306),c=n.n(a),s=n(57213),o=n.n(s),u=n(88265),l=n(63313),d=n(92260),f=n(22159),h=n(2947),g=n(51704),p=n(15367),m=n(84163),v=n(24378),Z=n(86986),x=n(94674),y=n(14797),$={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z"}}]},name:"sync",theme:"outlined"},j=n(46420),w=function(e,t){return l.createElement(j.Z,(0,y.Z)((0,y.Z)({},e),{},{ref:t,icon:$}))};w.displayName="SyncOutlined";var P=l.forwardRef(w),S=n(38101),M=n(76657),k=n(20209),D={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"},C=function(e,t){return l.createElement(j.Z,(0,y.Z)((0,y.Z)({},e),{},{ref:t,icon:D}))};C.displayName="FileTextOutlined";var b=l.forwardRef(C),H={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M304 280h56c4.4 0 8-3.6 8-8 0-28.3 5.9-53.2 17.1-73.5 10.6-19.4 26-34.8 45.4-45.4C450.9 142 475.7 136 504 136h16c28.3 0 53.2 5.9 73.5 17.1 19.4 10.6 34.8 26 45.4 45.4C650 218.9 656 243.7 656 272c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-40-8.8-76.7-25.9-108.1a184.31 184.31 0 00-74-74C596.7 72.8 560 64 520 64h-16c-40 0-76.7 8.8-108.1 25.9a184.31 184.31 0 00-74 74C304.8 195.3 296 232 296 272c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M940 512H792V412c76.8 0 139-62.2 139-139 0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8a63 63 0 01-63 63H232a63 63 0 01-63-63c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 76.8 62.2 139 139 139v100H84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h148v96c0 6.5.2 13 .7 19.3C164.1 728.6 116 796.7 116 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-44.2 23.9-82.9 59.6-103.7a273 273 0 0022.7 49c24.3 41.5 59 76.2 100.5 100.5S460.5 960 512 960s99.8-13.9 141.3-38.2a281.38 281.38 0 00123.2-149.5A120 120 0 01836 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-79.3-48.1-147.4-116.7-176.7.4-6.4.7-12.8.7-19.3v-96h148c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM716 680c0 36.8-9.7 72-27.8 102.9-17.7 30.3-43 55.6-73.3 73.3C584 874.3 548.8 884 512 884s-72-9.7-102.9-27.8c-30.3-17.7-55.6-43-73.3-73.3A202.75 202.75 0 01308 680V412h408v268z"}}]},name:"bug",theme:"outlined"},O=function(e,t){return l.createElement(j.Z,(0,y.Z)((0,y.Z)({},e),{},{ref:t,icon:H}))};O.displayName="BugOutlined";var z=l.forwardRef(O),I=n(13740),_={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 256H736v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zm-200 0H360v-72h304v72z"}}]},name:"delete",theme:"filled"},W=function(e,t){return l.createElement(j.Z,(0,y.Z)((0,y.Z)({},e),{},{ref:t,icon:_}))};W.displayName="DeleteFilled";var Y=l.forwardRef(W),L=n(5558),A=n(78969),T=n(95176),F=n(52739),B=n(33328),E=n(66255),N=n(47549),V=n(98074),R=n(66150),q=n(52053),J=n.n(q),U=n(11527),K=d.Z.Text,G=f.Z.Search,Q=function(e){return e[e["安装中"]=0]="安装中",e[e["已安装"]=1]="已安装",e[e["安装失败"]=2]="安装失败",e[e["删除中"]=3]="删除中",e[e["已删除"]=4]="已删除",e[e["删除失败"]=5]="删除失败",e[e["队列中"]=6]="队列中",e}(Q||{}),X={0:{icon:(0,U.jsx)(P,{spin:!0}),color:"processing"},1:{icon:(0,U.jsx)(S.Z,{}),color:"success"},2:{icon:(0,U.jsx)(M.Z,{}),color:"error"},3:{icon:(0,U.jsx)(P,{spin:!0}),color:"processing"},4:{icon:(0,U.jsx)(S.Z,{}),color:"success"},5:{icon:(0,U.jsx)(M.Z,{}),color:"error"},6:{icon:(0,U.jsx)(k.Z,{}),color:"default"}},ee=function(){var e=(0,V.useOutletContext)(),t=e.headerStyle,n=e.isPhone,i=e.socketMessage,a=[{title:u.ZP.get("序号"),width:80,render:function(e,t,n){return(0,U.jsxs)("span",{style:{cursor:"text"},children:[n+1," "]})}},{title:u.ZP.get("名称"),dataIndex:"name",width:120,key:"name"},{title:u.ZP.get("状态"),key:"status",width:120,dataIndex:"status",render:function(e,t,n){return(0,U.jsx)(h.Z,{size:"middle",style:{cursor:"text"},children:(0,U.jsx)(g.Z,{color:X[t.status].color,icon:X[t.status].icon,style:{marginRight:0},children:u.ZP.get(Q[t.status])})})}},{title:u.ZP.get("备注"),dataIndex:"remark",width:120,key:"remark"},{title:u.ZP.get("更新时间"),key:"updatedAt",dataIndex:"updatedAt",width:150,render:function(e){return(0,U.jsx)("span",{children:J()(e).format("YYYY-MM-DD HH:mm:ss")})}},{title:u.ZP.get("创建时间"),key:"createdAt",dataIndex:"createdAt",width:150,render:function(e){return(0,U.jsx)("span",{children:J()(e).format("YYYY-MM-DD HH:mm:ss")})}},{title:u.ZP.get("操作"),key:"action",width:150,render:function(e,t,i){var r=!n;return(0,U.jsxs)(h.Z,{size:"middle",children:[(0,U.jsx)(p.Z,{title:r?u.ZP.get("日志"):"",children:(0,U.jsx)("a",{onClick:function(){ue(o()(o()({},t),{},{timestamp:Date.now()}))},children:(0,U.jsx)(b,{})})}),t.status!==Q.安装中&&t.status!==Q.删除中&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(p.Z,{title:r?u.ZP.get("重新安装"):"",children:(0,U.jsx)("a",{onClick:function(){return je(t,i)},children:(0,U.jsx)(z,{})})}),(0,U.jsx)(p.Z,{title:r?u.ZP.get("删除"):"",children:(0,U.jsx)("a",{onClick:function(){return $e(t,i)},children:(0,U.jsx)(I.Z,{})})}),(0,U.jsx)(p.Z,{title:r?u.ZP.get("强制删除"):"",children:(0,U.jsx)("a",{onClick:function(){return $e(t,i,!0)},children:(0,U.jsx)(Y,{})})})]})]})}}],s=(0,l.useState)([]),d=c()(s,2),f=d[0],y=d[1],$=(0,l.useState)(!0),j=c()($,2),w=j[0],P=j[1],S=(0,l.useState)(!1),M=c()(S,2),k=M[0],D=M[1],C=(0,l.useState)(),H=c()(C,2),O=H[0],_=H[1],W=(0,l.useState)([]),q=c()(W,2),ee=q[0],te=q[1],ne=(0,l.useState)(""),ie=c()(ne,2),re=ie[0],ae=ie[1],ce=(0,l.useState)(),se=c()(ce,2),oe=se[0],ue=se[1],le=(0,l.useState)(!1),de=c()(le,2),fe=de[0],he=de[1],ge=(0,l.useState)("nodejs"),pe=c()(ge,2),me=pe[0],ve=pe[1],Ze=(0,l.useRef)(null),xe=(0,R.Z)(Ze,59),ye=function(){P(!0),T.W.get("".concat(L.Z.apiPrefix,"dependencies?searchValue=").concat(re,"&type=").concat(me)).then((function(e){var t=e.code,n=e.data;200===t&&y(n)})).finally((function(){return P(!1)}))},$e=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];m.Z.confirm({title:u.ZP.get("确认删除"),content:(0,U.jsxs)(U.Fragment,{children:[u.ZP.get("确认删除依赖")," ",(0,U.jsx)(K,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",u.ZP.get("吗")]}),onOk:function(){T.W.delete("".concat(L.Z.apiPrefix,"dependencies").concat(n?"/force":""),{data:[e.id]}).then((function(e){var t=e.code,i=e.data;if(200===t&&n){var a=f.findIndex((function(e){return e.id===i[0].id}));if(-1!==a){var c=r()(f);c.splice(a,1),y(c)}}}))},onCancel:function(){console.log("Cancel")}})},je=function(e,t){m.Z.confirm({title:u.ZP.get("确认重新安装"),content:(0,U.jsxs)(U.Fragment,{children:[u.ZP.get("确认重新安装")," ",(0,U.jsx)(K,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",u.ZP.get("吗")]}),onOk:function(){T.W.put("".concat(L.Z.apiPrefix,"dependencies/reinstall"),[e.id]).then((function(e){var t=e.code,n=e.data;200===t&&we(n[0])}))},onCancel:function(){console.log("Cancel")}})},we=function(e){var t=r()(f);if(Array.isArray(e))t.unshift.apply(t,r()(e));else{var n=f.findIndex((function(t){return t.id===e.id}));-1!==n&&t.splice(n,1,o()({},e))}y(t)},Pe={selectedRowKeys:ee,onChange:function(e){te(e)}},Se=function(e){var t=e?"/force":"";m.Z.confirm({title:u.ZP.get("确认删除"),content:(0,U.jsx)(U.Fragment,{children:u.ZP.get("确认删除选中的依赖吗")}),onOk:function(){T.W.delete("".concat(L.Z.apiPrefix,"dependencies").concat(t),{data:ee}).then((function(e){var t=e.code;e.data;200===t&&(te([]),ye())}))},onCancel:function(){console.log("Cancel")}})};(0,l.useEffect)((function(){ye()}),[re,me]),(0,l.useEffect)((function(){oe&&(localStorage.setItem("logDependence",oe.id),he(!0))}),[oe]),(0,l.useEffect)((function(){if(i){var e=i.type,t=i.message,n=i.references;if("installDependence"===e&&t.includes("开始时间")&&n.length>0){for(var a=r()(f),c=function(e){var i=f.findIndex((function(t){return t.id===n[e]}));-1!==i&&a.splice(i,1,o()(o()({},f[i]),{},{status:t.includes("安装")?Q.安装中:Q.删除中}))},s=0;s<n.length;s++)c(s);y(a)}if("installDependence"===e&&t.includes("结束时间")&&n.length>0){var u;u=t.includes("安装")?t.includes("成功")?Q.已安装:Q.安装失败:t.includes("成功")?Q.已删除:Q.删除失败;for(var l=r()(f),d=function(e){var t=f.findIndex((function(t){return t.id===n[e]}));-1!==t&&l.splice(t,1,o()(o()({},f[t]),{},{status:u}))},h=0;h<n.length;h++)d(h);y(l),u===Q.已删除&&setTimeout((function(){for(var e=r()(f),t=function(t){var i=f.findIndex((function(e){return e.id===n[t]}));-1!==i&&e.splice(i,1)},i=0;i<n.length;i++)t(i);y(e)}),5e3)}}}),[i]);return(0,U.jsxs)(A.ZP,{className:"ql-container-wrapper dependence-wrapper ql-container-wrapper-has-tab",title:u.ZP.get("依赖管理"),extra:[(0,U.jsx)(G,{placeholder:u.ZP.get("请输入名称"),style:{width:"auto"},enterButton:!0,loading:w,onSearch:function(e){ae(e.trim())}}),(0,U.jsx)(v.Z,{type:"primary",onClick:function(){return _(null),void D(!0)},children:u.ZP.get("创建依赖")},"2")],header:{style:t},children:[(0,U.jsx)(Z.Z,{defaultActiveKey:"nodejs",size:"small",tabPosition:"top",onChange:function(e){te([]),ve(e)},items:[{key:"nodejs",label:"NodeJs"},{key:"python3",label:"Python3"},{key:"linux",label:"Linux"}]}),(0,U.jsxs)("div",{ref:Ze,children:[ee.length>0&&(0,U.jsxs)("div",{style:{marginBottom:16},children:[(0,U.jsx)(v.Z,{type:"primary",style:{marginBottom:5,marginLeft:8},onClick:function(){m.Z.confirm({title:u.ZP.get("确认重新安装"),content:(0,U.jsx)(U.Fragment,{children:u.ZP.get("确认重新安装选中的依赖吗")}),onOk:function(){T.W.put("".concat(L.Z.apiPrefix,"dependencies/reinstall"),ee).then((function(e){var t=e.code;e.data,200===t&&(te([]),ye())}))},onCancel:function(){console.log("Cancel")}})},children:u.ZP.get("批量安装")}),(0,U.jsx)(v.Z,{type:"primary",style:{marginBottom:5,marginLeft:8},onClick:function(){return Se(!1)},children:u.ZP.get("批量删除")}),(0,U.jsx)(v.Z,{type:"primary",style:{marginBottom:5,marginLeft:8},onClick:function(){return Se(!0)},children:u.ZP.get("批量强制删除")}),(0,U.jsxs)("span",{style:{marginLeft:8},children:[u.ZP.get("已选择"),(0,U.jsx)("a",{children:null==ee?void 0:ee.length}),u.ZP.get("项")]})]}),(0,U.jsx)(B.W,{backend:E.PD,children:(0,U.jsx)(x.Z,{columns:a,rowSelection:Pe,pagination:!1,dataSource:f,rowKey:"id",size:"middle",scroll:{x:768,y:xe},loading:w})})]}),(0,U.jsx)(F.default,{visible:k,handleCancel:function(e){D(!1),e&&we(e)},dependence:O,defaultType:me}),(0,U.jsx)(N.default,{visible:fe,handleCancel:function(e){if(he(!1),e){var t=f.findIndex((function(e){return e.id===oe.id})),n=r()(f);-1!==t&&(n.splice(t,1),y(n))}else r()(f).map((function(e){return e.id})).includes(oe.id)&&function(e){T.W.get("".concat(L.Z.apiPrefix,"dependencies/").concat(e.id)).then((function(t){var n=t.code,i=t.data;if(200===n){var a=f.findIndex((function(t){return t.id===e.id})),c=r()(f);-1!==a&&(c.splice(a,1,o()(o()({},e),i)),y(c))}})).finally((function(){return P(!1)}))}(oe)},socketMessage:i,dependence:oe})]})}},47549:function(e,t,n){"use strict";n.r(t);var i=n(54306),r=n.n(i),a=n(88265),c=n(63313),s=n(84163),o=n(24378),u=n(95176),l=n(5558),d=n(65601),f=n(38101),h=n(91796),g=n(99120),p=n.n(g),m=n(11527);t.default=function(e){var t=e.dependence,n=e.handleCancel,i=e.visible,g=e.socketMessage,v=(0,c.useState)(""),Z=r()(v,2),x=Z[0],y=Z[1],$=(0,c.useState)(!0),j=r()($,2),w=j[0],P=j[1],S=(0,c.useState)(!1),M=r()(S,2),k=M[0],D=M[1],C=(0,c.useState)(!0),b=r()(C,2),H=b[0],O=b[1],z=(0,c.useState)(!1),I=r()(z,2),_=I[0],W=I[1],Y=(0,c.useState)(!1),L=r()(Y,2),A=L[0],T=L[1],F=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];localStorage.removeItem("logDependence"),n(e)};return(0,c.useEffect)((function(){t&&(O(!0),u.W.get("".concat(l.Z.apiPrefix,"dependencies/").concat(t.id)).then((function(e){var n=e.code,i=e.data;if(200===n&&localStorage.getItem("logDependence")===String(t.id)){var r=(i.log||[]).join("");y(r),P(!r.includes(a.ZP.get("结束时间"))),W(r.includes(a.ZP.get("删除失败")))}})).finally((function(){O(!1)})))}),[t]),(0,c.useEffect)((function(){if(g&&t){var e=g.type,n=g.message,i=g.references;"installDependence"===e&&i.length>0&&i.includes(t.id)&&(n.includes("结束时间")&&(P(!1),W(n.includes("删除失败"))),y("".concat(x).concat(n)))}}),[g]),(0,c.useEffect)((function(){D(document.body.clientWidth<768)}),[]),(0,m.jsx)(s.Z,{title:(0,m.jsxs)(m.Fragment,{children:[w&&(0,m.jsx)(d.Z,{spin:!0}),!w&&(0,m.jsx)(f.Z,{}),(0,m.jsxs)("span",{style:{marginLeft:5},children:[a.ZP.get("日志 -")," ",t&&t.name]})," "]}),open:i,centered:!0,className:"log-modal",forceRender:!0,onOk:function(){return F()},onCancel:function(){return F()},footer:[(0,m.jsx)(o.Z,{type:"primary",onClick:function(){_?(T(!0),u.W.delete("".concat(l.Z.apiPrefix,"dependencies/force"),{data:[t.id]}).then((function(e){var t=e.code;e.data,200===t&&F(!0)})).finally((function(){T(!1)}))):F()},loading:A,children:_?a.ZP.get("强制删除"):a.ZP.get("知道了")})],children:H?(0,m.jsx)(h.Z,{}):(0,m.jsx)("pre",{style:k?{fontFamily:"Source Code Pro",zoom:.83}:{},children:(0,m.jsx)(p(),{children:x})})})}},52739:function(e,t,n){"use strict";n.r(t);var i=n(25359),r=n.n(i),a=n(57213),c=n.n(a),s=n(49811),o=n.n(s),u=n(54306),l=n.n(u),d=n(88265),f=n(63313),h=n(28756),g=n(67393),p=n(84163),m=n(84468),v=n(22159),Z=n(95176),x=n(5558),y=n(11527),$=h.Z.Option,j=function(e){return e[e.nodejs=0]="nodejs",e[e.python3=1]="python3",e[e.linux=2]="linux",e}(j||{});t.default=function(e){var t=e.dependence,n=e.handleCancel,i=e.visible,a=e.defaultType,s=g.Z.useForm(),u=l()(s,1)[0],w=(0,f.useState)(!1),P=l()(w,2),S=P[0],M=P[1],k=function(){var e=o()(r()().mark((function e(i){var a,s,o,u,l,d,f,h,g,p;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return M(!0),a=i.name,s=i.split,o=i.type,u=i.remark,l=t?"put":"post",t?d=c()(c()({},i),{},{id:t.id}):"1"===s?(f=a.includes("&")?"&":"\n",d=a.split(f).map((function(e){return{name:e,type:o,remark:u}}))):d=[{name:a,type:o,remark:u}],e.prev=4,e.next=7,Z.W[l]("".concat(x.Z.apiPrefix,"dependencies"),d);case 7:h=e.sent,g=h.code,p=h.data,200===g&&n(p),M(!1),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),M(!1);case 17:case"end":return e.stop()}}),e,null,[[4,14]])})));return function(t){return e.apply(this,arguments)}}();return(0,f.useEffect)((function(){u.resetFields()}),[t,i]),(0,y.jsx)(p.Z,{title:t?d.ZP.get("编辑依赖"):d.ZP.get("创建依赖"),open:i,forceRender:!0,centered:!0,maskClosable:!1,onOk:function(){u.validateFields().then((function(e){k(e)})).catch((function(e){console.log("Validate Failed:",e)}))},onCancel:function(){return n()},confirmLoading:S,children:(0,y.jsxs)(g.Z,{form:u,layout:"vertical",name:"dependence_modal",initialValues:t,children:[(0,y.jsx)(g.Z.Item,{name:"type",label:d.ZP.get("依赖类型"),initialValue:j[a],children:(0,y.jsx)(h.Z,{children:x.Z.dependenceTypes.map((function(e,t){return(0,y.jsx)($,{value:t,children:e},t)}))})}),!t&&(0,y.jsx)(g.Z.Item,{name:"split",label:d.ZP.get("自动拆分"),initialValue:"0",tooltip:d.ZP.get("多个依赖是否换行分割"),children:(0,y.jsxs)(m.ZP.Group,{children:[(0,y.jsx)(m.ZP,{value:"1",children:d.ZP.get("是")}),(0,y.jsx)(m.ZP,{value:"0",children:d.ZP.get("否")})]})}),(0,y.jsx)(g.Z.Item,{name:"name",label:d.ZP.get("名称"),rules:[{required:!0,message:d.ZP.get("请输入依赖名称,支持指定版本"),whitespace:!0}],children:(0,y.jsx)(v.Z.TextArea,{rows:4,autoSize:!0,placeholder:d.ZP.get("请输入依赖名称")})}),(0,y.jsx)(g.Z.Item,{name:"remark",label:d.ZP.get("备注"),children:(0,y.jsx)(v.Z,{placeholder:d.ZP.get("请输入备注")})})]})})}},52053:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,n=36e5,i="millisecond",r="second",a="minute",c="hour",s="day",o="week",u="month",l="quarter",d="year",f="date",h="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},v=function(e,t,n){var i=String(e);return!i||i.length>=t?e:""+Array(t+1-i.length).join(n)+e},Z={s:v,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),i=Math.floor(n/60),r=n%60;return(t<=0?"+":"-")+v(i,2,"0")+":"+v(r,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var i=12*(n.year()-t.year())+(n.month()-t.month()),r=t.clone().add(i,u),a=n-r<0,c=t.clone().add(i+(a?-1:1),u);return+(-(i+(n-r)/(a?r-c:c-r))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:d,w:o,d:s,D:f,h:c,m:a,s:r,ms:i,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},x="en",y={};y[x]=m;var $=function(e){return e instanceof S},j=function e(t,n,i){var r;if(!t)return x;if("string"==typeof t){var a=t.toLowerCase();y[a]&&(r=a),n&&(y[a]=n,r=a);var c=t.split("-");if(!r&&c.length>1)return e(c[0])}else{var s=t.name;y[s]=t,r=s}return!i&&r&&(x=r),r||!i&&x},w=function(e,t){if($(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new S(n)},P=Z;P.l=j,P.i=$,P.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var S=function(){function m(e){this.$L=j(e.locale,null,!0),this.parse(e)}var v=m.prototype;return v.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(P.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var i=t.match(g);if(i){var r=i[2]-1||0,a=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)):new Date(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return P},v.isValid=function(){return!(this.$d.toString()===h)},v.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},v.isAfter=function(e,t){return w(e)<this.startOf(t)},v.isBefore=function(e,t){return this.endOf(t)<w(e)},v.$g=function(e,t,n){return P.u(e)?this[t]:this.set(n,e)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(e,t){var n=this,i=!!P.u(t)||t,l=P.p(e),h=function(e,t){var r=P.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return i?r:r.endOf(s)},g=function(e,t){return P.w(n.toDate()[e].apply(n.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},p=this.$W,m=this.$M,v=this.$D,Z="set"+(this.$u?"UTC":"");switch(l){case d:return i?h(1,0):h(31,11);case u:return i?h(1,m):h(0,m+1);case o:var x=this.$locale().weekStart||0,y=(p<x?p+7:p)-x;return h(i?v-y:v+(6-y),m);case s:case f:return g(Z+"Hours",0);case c:return g(Z+"Minutes",1);case a:return g(Z+"Seconds",2);case r:return g(Z+"Milliseconds",3);default:return this.clone()}},v.endOf=function(e){return this.startOf(e,!1)},v.$set=function(e,t){var n,o=P.p(e),l="set"+(this.$u?"UTC":""),h=(n={},n[s]=l+"Date",n[f]=l+"Date",n[u]=l+"Month",n[d]=l+"FullYear",n[c]=l+"Hours",n[a]=l+"Minutes",n[r]=l+"Seconds",n[i]=l+"Milliseconds",n)[o],g=o===s?this.$D+(t-this.$W):t;if(o===u||o===d){var p=this.clone().set(f,1);p.$d[h](g),p.init(),this.$d=p.set(f,Math.min(this.$D,p.daysInMonth())).$d}else h&&this.$d[h](g);return this.init(),this},v.set=function(e,t){return this.clone().$set(e,t)},v.get=function(e){return this[P.p(e)]()},v.add=function(i,l){var f,h=this;i=Number(i);var g=P.p(l),p=function(e){var t=w(h);return P.w(t.date(t.date()+Math.round(e*i)),h)};if(g===u)return this.set(u,this.$M+i);if(g===d)return this.set(d,this.$y+i);if(g===s)return p(1);if(g===o)return p(7);var m=(f={},f[a]=t,f[c]=n,f[r]=e,f)[g]||1,v=this.$d.getTime()+i*m;return P.w(v,this)},v.subtract=function(e,t){return this.add(-1*e,t)},v.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||h;var i=e||"YYYY-MM-DDTHH:mm:ssZ",r=P.z(this),a=this.$H,c=this.$m,s=this.$M,o=n.weekdays,u=n.months,l=function(e,n,r,a){return e&&(e[n]||e(t,i))||r[n].slice(0,a)},d=function(e){return P.s(a%12||12,e,"0")},f=n.meridiem||function(e,t,n){var i=e<12?"AM":"PM";return n?i.toLowerCase():i},g={YY:String(this.$y).slice(-2),YYYY:P.s(this.$y,4,"0"),M:s+1,MM:P.s(s+1,2,"0"),MMM:l(n.monthsShort,s,u,3),MMMM:l(u,s),D:this.$D,DD:P.s(this.$D,2,"0"),d:String(this.$W),dd:l(n.weekdaysMin,this.$W,o,2),ddd:l(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(a),HH:P.s(a,2,"0"),h:d(1),hh:d(2),a:f(a,c,!0),A:f(a,c,!1),m:String(c),mm:P.s(c,2,"0"),s:String(this.$s),ss:P.s(this.$s,2,"0"),SSS:P.s(this.$ms,3,"0"),Z:r};return i.replace(p,(function(e,t){return t||g[e]||r.replace(":","")}))},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(i,f,h){var g,p=P.p(f),m=w(i),v=(m.utcOffset()-this.utcOffset())*t,Z=this-m,x=P.m(this,m);return x=(g={},g[d]=x/12,g[u]=x,g[l]=x/3,g[o]=(Z-v)/6048e5,g[s]=(Z-v)/864e5,g[c]=Z/n,g[a]=Z/t,g[r]=Z/e,g)[p]||Z,h?x:P.a(x)},v.daysInMonth=function(){return this.endOf(u).$D},v.$locale=function(){return y[this.$L]},v.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),i=j(e,t,!0);return i&&(n.$L=i),n},v.clone=function(){return P.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},m}(),M=S.prototype;return w.prototype=M,[["$ms",i],["$s",r],["$m",a],["$H",c],["$W",s],["$M",u],["$y",d],["$D",f]].forEach((function(e){M[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||(e(t,S,w),e.$i=!0),w},w.locale=j,w.isDayjs=$,w.unix=function(e){return w(1e3*e)},w.en=y[x],w.Ls=y,w.p={},w}()}}]);
1
+ (self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[9914],{20209:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var i=n(14797),r=n(63313),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"},c=n(46420),s=function(e,t){return r.createElement(c.Z,(0,i.Z)((0,i.Z)({},e),{},{ref:t,icon:a}))};s.displayName="ClockCircleOutlined";var o=r.forwardRef(s)},13740:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var i=n(14797),r=n(63313),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},c=n(46420),s=function(e,t){return r.createElement(c.Z,(0,i.Z)((0,i.Z)({},e),{},{ref:t,icon:a}))};s.displayName="DeleteOutlined";var o=r.forwardRef(s)},66150:function(e,t,n){"use strict";var i=n(54306),r=n.n(i),a=n(63313),c=n(61761),s=n(82428);t.Z=function(e,t){var n=(0,a.useState)(0),i=r()(n,2),o=i[0],u=i[1];return(0,c.Z)(e,(function(e){var n=e.target;n.classList.contains("ant-table-wrapper")||(n=e.target.querySelector(".ant-table-wrapper")),u((0,s.W9)({extraHeight:t,target:n}))})),o}},16648:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return ee}});var i=n(93525),r=n.n(i),a=n(54306),c=n.n(a),s=n(57213),o=n.n(s),u=n(88265),l=n(63313),d=n(92260),f=n(22159),h=n(2947),g=n(51704),p=n(15367),m=n(84163),v=n(24378),Z=n(86986),x=n(94674),y=n(14797),$={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z"}}]},name:"sync",theme:"outlined"},j=n(46420),w=function(e,t){return l.createElement(j.Z,(0,y.Z)((0,y.Z)({},e),{},{ref:t,icon:$}))};w.displayName="SyncOutlined";var S=l.forwardRef(w),P=n(38101),M=n(76657),k=n(20209),D={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"},C=function(e,t){return l.createElement(j.Z,(0,y.Z)((0,y.Z)({},e),{},{ref:t,icon:D}))};C.displayName="FileTextOutlined";var b=l.forwardRef(C),H={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M304 280h56c4.4 0 8-3.6 8-8 0-28.3 5.9-53.2 17.1-73.5 10.6-19.4 26-34.8 45.4-45.4C450.9 142 475.7 136 504 136h16c28.3 0 53.2 5.9 73.5 17.1 19.4 10.6 34.8 26 45.4 45.4C650 218.9 656 243.7 656 272c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-40-8.8-76.7-25.9-108.1a184.31 184.31 0 00-74-74C596.7 72.8 560 64 520 64h-16c-40 0-76.7 8.8-108.1 25.9a184.31 184.31 0 00-74 74C304.8 195.3 296 232 296 272c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M940 512H792V412c76.8 0 139-62.2 139-139 0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8a63 63 0 01-63 63H232a63 63 0 01-63-63c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 76.8 62.2 139 139 139v100H84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h148v96c0 6.5.2 13 .7 19.3C164.1 728.6 116 796.7 116 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-44.2 23.9-82.9 59.6-103.7a273 273 0 0022.7 49c24.3 41.5 59 76.2 100.5 100.5S460.5 960 512 960s99.8-13.9 141.3-38.2a281.38 281.38 0 00123.2-149.5A120 120 0 01836 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-79.3-48.1-147.4-116.7-176.7.4-6.4.7-12.8.7-19.3v-96h148c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM716 680c0 36.8-9.7 72-27.8 102.9-17.7 30.3-43 55.6-73.3 73.3C584 874.3 548.8 884 512 884s-72-9.7-102.9-27.8c-30.3-17.7-55.6-43-73.3-73.3A202.75 202.75 0 01308 680V412h408v268z"}}]},name:"bug",theme:"outlined"},O=function(e,t){return l.createElement(j.Z,(0,y.Z)((0,y.Z)({},e),{},{ref:t,icon:H}))};O.displayName="BugOutlined";var z=l.forwardRef(O),I=n(13740),_={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 256H736v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zm-200 0H360v-72h304v72z"}}]},name:"delete",theme:"filled"},W=function(e,t){return l.createElement(j.Z,(0,y.Z)((0,y.Z)({},e),{},{ref:t,icon:_}))};W.displayName="DeleteFilled";var Y=l.forwardRef(W),L=n(5558),A=n(78969),T=n(95176),F=n(52739),B=n(33328),N=n(66255),E=n(47549),V=n(98074),R=n(66150),q=n(52053),J=n.n(q),U=n(11527),K=d.Z.Text,G=f.Z.Search,Q=function(e){return e[e["安装中"]=0]="安装中",e[e["已安装"]=1]="已安装",e[e["安装失败"]=2]="安装失败",e[e["删除中"]=3]="删除中",e[e["已删除"]=4]="已删除",e[e["删除失败"]=5]="删除失败",e[e["队列中"]=6]="队列中",e}(Q||{}),X={0:{icon:(0,U.jsx)(S,{spin:!0}),color:"processing"},1:{icon:(0,U.jsx)(P.Z,{}),color:"success"},2:{icon:(0,U.jsx)(M.Z,{}),color:"error"},3:{icon:(0,U.jsx)(S,{spin:!0}),color:"processing"},4:{icon:(0,U.jsx)(P.Z,{}),color:"success"},5:{icon:(0,U.jsx)(M.Z,{}),color:"error"},6:{icon:(0,U.jsx)(k.Z,{}),color:"default"}},ee=function(){var e=(0,V.useOutletContext)(),t=e.headerStyle,n=e.isPhone,i=e.socketMessage,a=[{title:u.ZP.get("序号"),width:80,render:function(e,t,n){return(0,U.jsxs)("span",{style:{cursor:"text"},children:[n+1," "]})}},{title:u.ZP.get("名称"),dataIndex:"name",width:120,key:"name"},{title:u.ZP.get("状态"),key:"status",width:120,dataIndex:"status",render:function(e,t,n){return(0,U.jsx)(h.Z,{size:"middle",style:{cursor:"text"},children:(0,U.jsx)(g.Z,{color:X[t.status].color,icon:X[t.status].icon,style:{marginRight:0},children:u.ZP.get(Q[t.status])})})}},{title:u.ZP.get("备注"),dataIndex:"remark",width:120,key:"remark"},{title:u.ZP.get("更新时间"),key:"updatedAt",dataIndex:"updatedAt",width:150,render:function(e){return(0,U.jsx)("span",{children:J()(e).format("YYYY-MM-DD HH:mm:ss")})}},{title:u.ZP.get("创建时间"),key:"createdAt",dataIndex:"createdAt",width:150,render:function(e){return(0,U.jsx)("span",{children:J()(e).format("YYYY-MM-DD HH:mm:ss")})}},{title:u.ZP.get("操作"),key:"action",width:150,render:function(e,t,i){var r=!n;return(0,U.jsxs)(h.Z,{size:"middle",children:[(0,U.jsx)(p.Z,{title:r?u.ZP.get("日志"):"",children:(0,U.jsx)("a",{onClick:function(){ue(o()(o()({},t),{},{timestamp:Date.now()}))},children:(0,U.jsx)(b,{})})}),t.status!==Q.安装中&&t.status!==Q.删除中&&(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(p.Z,{title:r?u.ZP.get("重新安装"):"",children:(0,U.jsx)("a",{onClick:function(){return je(t,i)},children:(0,U.jsx)(z,{})})}),(0,U.jsx)(p.Z,{title:r?u.ZP.get("删除"):"",children:(0,U.jsx)("a",{onClick:function(){return $e(t,i)},children:(0,U.jsx)(I.Z,{})})}),(0,U.jsx)(p.Z,{title:r?u.ZP.get("强制删除"):"",children:(0,U.jsx)("a",{onClick:function(){return $e(t,i,!0)},children:(0,U.jsx)(Y,{})})})]})]})}}],s=(0,l.useState)([]),d=c()(s,2),f=d[0],y=d[1],$=(0,l.useState)(!0),j=c()($,2),w=j[0],S=j[1],P=(0,l.useState)(!1),M=c()(P,2),k=M[0],D=M[1],C=(0,l.useState)(),H=c()(C,2),O=H[0],_=H[1],W=(0,l.useState)([]),q=c()(W,2),ee=q[0],te=q[1],ne=(0,l.useState)(""),ie=c()(ne,2),re=ie[0],ae=ie[1],ce=(0,l.useState)(),se=c()(ce,2),oe=se[0],ue=se[1],le=(0,l.useState)(!1),de=c()(le,2),fe=de[0],he=de[1],ge=(0,l.useState)("nodejs"),pe=c()(ge,2),me=pe[0],ve=pe[1],Ze=(0,l.useRef)(null),xe=(0,R.Z)(Ze,59),ye=function(){S(!0),T.W.get("".concat(L.Z.apiPrefix,"dependencies?searchValue=").concat(re,"&type=").concat(me)).then((function(e){var t=e.code,n=e.data;200===t&&y(n)})).finally((function(){return S(!1)}))},$e=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];m.Z.confirm({title:u.ZP.get("确认删除"),content:(0,U.jsxs)(U.Fragment,{children:[u.ZP.get("确认删除依赖")," ",(0,U.jsx)(K,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",u.ZP.get("吗")]}),onOk:function(){T.W.delete("".concat(L.Z.apiPrefix,"dependencies").concat(n?"/force":""),{data:[e.id]}).then((function(e){var t=e.code,i=e.data;if(200===t&&n){var a=f.findIndex((function(e){return e.id===i[0].id}));if(-1!==a){var c=r()(f);c.splice(a,1),y(c)}}}))},onCancel:function(){console.log("Cancel")}})},je=function(e,t){m.Z.confirm({title:u.ZP.get("确认重新安装"),content:(0,U.jsxs)(U.Fragment,{children:[u.ZP.get("确认重新安装")," ",(0,U.jsx)(K,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",u.ZP.get("吗")]}),onOk:function(){T.W.put("".concat(L.Z.apiPrefix,"dependencies/reinstall"),[e.id]).then((function(e){var t=e.code,n=e.data;200===t&&we(n[0])}))},onCancel:function(){console.log("Cancel")}})},we=function(e){var t=r()(f);if(Array.isArray(e))t.unshift.apply(t,r()(e));else{var n=f.findIndex((function(t){return t.id===e.id}));-1!==n&&t.splice(n,1,o()({},e))}y(t)},Se={selectedRowKeys:ee,onChange:function(e){te(e)}},Pe=function(e){var t=e?"/force":"";m.Z.confirm({title:u.ZP.get("确认删除"),content:(0,U.jsx)(U.Fragment,{children:u.ZP.get("确认删除选中的依赖吗")}),onOk:function(){T.W.delete("".concat(L.Z.apiPrefix,"dependencies").concat(t),{data:ee}).then((function(e){var t=e.code;e.data;200===t&&(te([]),ye())}))},onCancel:function(){console.log("Cancel")}})};(0,l.useEffect)((function(){ye()}),[re,me]),(0,l.useEffect)((function(){oe&&(localStorage.setItem("logDependence",oe.id),he(!0))}),[oe]),(0,l.useEffect)((function(){if(i){var e=i.type,t=i.message,n=i.references;if("installDependence"===e&&t.includes("开始时间")&&n.length>0){for(var a=r()(f),c=function(e){var i=f.findIndex((function(t){return t.id===n[e]}));-1!==i&&a.splice(i,1,o()(o()({},f[i]),{},{status:t.includes("安装")?Q.安装中:Q.删除中}))},s=0;s<n.length;s++)c(s);y(a)}if("installDependence"===e&&t.includes("结束时间")&&n.length>0){var u;u=t.includes("安装")?t.includes("成功")?Q.已安装:Q.安装失败:t.includes("成功")?Q.已删除:Q.删除失败;for(var l=r()(f),d=function(e){var t=f.findIndex((function(t){return t.id===n[e]}));-1!==t&&l.splice(t,1,o()(o()({},f[t]),{},{status:u}))},h=0;h<n.length;h++)d(h);y(l),u===Q.已删除&&setTimeout((function(){for(var e=r()(f),t=function(t){var i=f.findIndex((function(e){return e.id===n[t]}));-1!==i&&e.splice(i,1)},i=0;i<n.length;i++)t(i);y(e)}),5e3)}}}),[i]);return(0,U.jsxs)(A.ZP,{className:"ql-container-wrapper dependence-wrapper ql-container-wrapper-has-tab",title:u.ZP.get("依赖管理"),extra:[(0,U.jsx)(G,{placeholder:u.ZP.get("请输入名称"),style:{width:"auto"},enterButton:!0,loading:w,onSearch:function(e){ae(e.trim())}}),(0,U.jsx)(v.Z,{type:"primary",onClick:function(){return _(null),void D(!0)},children:u.ZP.get("创建依赖")},"2")],header:{style:t},children:[(0,U.jsx)(Z.Z,{defaultActiveKey:"nodejs",size:"small",tabPosition:"top",onChange:function(e){te([]),ve(e)},items:[{key:"nodejs",label:"NodeJs"},{key:"python3",label:"Python3"},{key:"linux",label:"Linux"}]}),(0,U.jsxs)("div",{ref:Ze,children:[ee.length>0&&(0,U.jsxs)("div",{style:{marginBottom:16},children:[(0,U.jsx)(v.Z,{type:"primary",style:{marginBottom:5,marginLeft:8},onClick:function(){m.Z.confirm({title:u.ZP.get("确认重新安装"),content:(0,U.jsx)(U.Fragment,{children:u.ZP.get("确认重新安装选中的依赖吗")}),onOk:function(){T.W.put("".concat(L.Z.apiPrefix,"dependencies/reinstall"),ee).then((function(e){var t=e.code;e.data,200===t&&(te([]),ye())}))},onCancel:function(){console.log("Cancel")}})},children:u.ZP.get("批量安装")}),(0,U.jsx)(v.Z,{type:"primary",style:{marginBottom:5,marginLeft:8},onClick:function(){return Pe(!1)},children:u.ZP.get("批量删除")}),(0,U.jsx)(v.Z,{type:"primary",style:{marginBottom:5,marginLeft:8},onClick:function(){return Pe(!0)},children:u.ZP.get("批量强制删除")}),(0,U.jsxs)("span",{style:{marginLeft:8},children:[u.ZP.get("已选择"),(0,U.jsx)("a",{children:null==ee?void 0:ee.length}),u.ZP.get("项")]})]}),(0,U.jsx)(B.W,{backend:N.PD,children:(0,U.jsx)(x.Z,{columns:a,rowSelection:Se,pagination:!1,dataSource:f,rowKey:"id",size:"middle",scroll:{x:768,y:xe},loading:w})})]}),(0,U.jsx)(F.default,{visible:k,handleCancel:function(e){D(!1),e&&we(e)},dependence:O,defaultType:me}),(0,U.jsx)(E.default,{visible:fe,handleCancel:function(e){if(he(!1),e){var t=f.findIndex((function(e){return e.id===oe.id})),n=r()(f);-1!==t&&(n.splice(t,1),y(n))}else r()(f).map((function(e){return e.id})).includes(oe.id)&&function(e){T.W.get("".concat(L.Z.apiPrefix,"dependencies/").concat(e.id)).then((function(t){var n=t.code,i=t.data;if(200===n){var a=f.findIndex((function(t){return t.id===e.id})),c=r()(f);-1!==a&&(c.splice(a,1,o()(o()({},e),i)),y(c))}})).finally((function(){return S(!1)}))}(oe)},socketMessage:i,dependence:oe})]})}},47549:function(e,t,n){"use strict";n.r(t);var i=n(54306),r=n.n(i),a=n(88265),c=n(63313),s=n(84163),o=n(24378),u=n(95176),l=n(5558),d=n(65601),f=n(38101),h=n(91796),g=n(99120),p=n.n(g),m=n(11527);t.default=function(e){var t=e.dependence,n=e.handleCancel,i=e.visible,g=e.socketMessage,v=(0,c.useState)(""),Z=r()(v,2),x=Z[0],y=Z[1],$=(0,c.useState)(!0),j=r()($,2),w=j[0],S=j[1],P=(0,c.useState)(!1),M=r()(P,2),k=M[0],D=M[1],C=(0,c.useState)(!0),b=r()(C,2),H=b[0],O=b[1],z=(0,c.useState)(!1),I=r()(z,2),_=I[0],W=I[1],Y=(0,c.useState)(!1),L=r()(Y,2),A=L[0],T=L[1],F=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];localStorage.removeItem("logDependence"),n(e)};return(0,c.useEffect)((function(){t&&(O(!0),u.W.get("".concat(l.Z.apiPrefix,"dependencies/").concat(t.id)).then((function(e){var n=e.code,i=e.data;if(200===n&&localStorage.getItem("logDependence")===String(t.id)){var r=(i.log||[]).join("");y(r),S(!r.includes("结束时间")),W(r.includes("删除失败"))}})).finally((function(){O(!1)})))}),[t]),(0,c.useEffect)((function(){if(g&&t){var e=g.type,n=g.message,i=g.references;"installDependence"===e&&i.length>0&&i.includes(t.id)&&(n.includes("结束时间")&&(S(!1),W(n.includes("删除失败"))),y("".concat(x).concat(n)))}}),[g]),(0,c.useEffect)((function(){D(document.body.clientWidth<768)}),[]),(0,m.jsx)(s.Z,{title:(0,m.jsxs)(m.Fragment,{children:[w&&(0,m.jsx)(d.Z,{spin:!0}),!w&&(0,m.jsx)(f.Z,{}),(0,m.jsxs)("span",{style:{marginLeft:5},children:[a.ZP.get("日志 -")," ",t&&t.name]})," "]}),open:i,centered:!0,className:"log-modal",forceRender:!0,onOk:function(){return F()},onCancel:function(){return F()},footer:[(0,m.jsx)(o.Z,{type:"primary",onClick:function(){_?(T(!0),u.W.delete("".concat(l.Z.apiPrefix,"dependencies/force"),{data:[t.id]}).then((function(e){var t=e.code;e.data,200===t&&F(!0)})).finally((function(){T(!1)}))):F()},loading:A,children:_?a.ZP.get("强制删除"):a.ZP.get("知道了")})],children:(0,m.jsx)("div",{className:"log-container",children:H?(0,m.jsx)(h.Z,{}):(0,m.jsx)("pre",{style:k?{fontFamily:"Source Code Pro",zoom:.83}:{},children:(0,m.jsx)(p(),{children:x})})})})}},52739:function(e,t,n){"use strict";n.r(t);var i=n(25359),r=n.n(i),a=n(57213),c=n.n(a),s=n(49811),o=n.n(s),u=n(54306),l=n.n(u),d=n(88265),f=n(63313),h=n(28756),g=n(67393),p=n(84163),m=n(84468),v=n(22159),Z=n(95176),x=n(5558),y=n(11527),$=h.Z.Option,j=function(e){return e[e.nodejs=0]="nodejs",e[e.python3=1]="python3",e[e.linux=2]="linux",e}(j||{});t.default=function(e){var t=e.dependence,n=e.handleCancel,i=e.visible,a=e.defaultType,s=g.Z.useForm(),u=l()(s,1)[0],w=(0,f.useState)(!1),S=l()(w,2),P=S[0],M=S[1],k=function(){var e=o()(r()().mark((function e(i){var a,s,o,u,l,d,f,h,g,p;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return M(!0),a=i.name,s=i.split,o=i.type,u=i.remark,l=t?"put":"post",t?d=c()(c()({},i),{},{id:t.id}):"1"===s?(f=a.includes("&")?"&":"\n",d=a.split(f).map((function(e){return{name:e,type:o,remark:u}}))):d=[{name:a,type:o,remark:u}],e.prev=4,e.next=7,Z.W[l]("".concat(x.Z.apiPrefix,"dependencies"),d);case 7:h=e.sent,g=h.code,p=h.data,200===g&&n(p),M(!1),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),M(!1);case 17:case"end":return e.stop()}}),e,null,[[4,14]])})));return function(t){return e.apply(this,arguments)}}();return(0,f.useEffect)((function(){u.resetFields()}),[t,i]),(0,y.jsx)(p.Z,{title:t?d.ZP.get("编辑依赖"):d.ZP.get("创建依赖"),open:i,forceRender:!0,centered:!0,maskClosable:!1,onOk:function(){u.validateFields().then((function(e){k(e)})).catch((function(e){console.log("Validate Failed:",e)}))},onCancel:function(){return n()},confirmLoading:P,children:(0,y.jsxs)(g.Z,{form:u,layout:"vertical",name:"dependence_modal",initialValues:t,children:[(0,y.jsx)(g.Z.Item,{name:"type",label:d.ZP.get("依赖类型"),initialValue:j[a],children:(0,y.jsx)(h.Z,{children:x.Z.dependenceTypes.map((function(e,t){return(0,y.jsx)($,{value:t,children:e},t)}))})}),!t&&(0,y.jsx)(g.Z.Item,{name:"split",label:d.ZP.get("自动拆分"),initialValue:"0",tooltip:d.ZP.get("多个依赖是否换行分割"),children:(0,y.jsxs)(m.ZP.Group,{children:[(0,y.jsx)(m.ZP,{value:"1",children:d.ZP.get("是")}),(0,y.jsx)(m.ZP,{value:"0",children:d.ZP.get("否")})]})}),(0,y.jsx)(g.Z.Item,{name:"name",label:d.ZP.get("名称"),rules:[{required:!0,message:d.ZP.get("请输入依赖名称,支持指定版本"),whitespace:!0}],children:(0,y.jsx)(v.Z.TextArea,{rows:4,autoSize:{minRows:1,maxRows:5},placeholder:d.ZP.get("请输入依赖名称")})}),(0,y.jsx)(g.Z.Item,{name:"remark",label:d.ZP.get("备注"),children:(0,y.jsx)(v.Z,{placeholder:d.ZP.get("请输入备注")})})]})})}},52053:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,n=36e5,i="millisecond",r="second",a="minute",c="hour",s="day",o="week",u="month",l="quarter",d="year",f="date",h="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},v=function(e,t,n){var i=String(e);return!i||i.length>=t?e:""+Array(t+1-i.length).join(n)+e},Z={s:v,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),i=Math.floor(n/60),r=n%60;return(t<=0?"+":"-")+v(i,2,"0")+":"+v(r,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var i=12*(n.year()-t.year())+(n.month()-t.month()),r=t.clone().add(i,u),a=n-r<0,c=t.clone().add(i+(a?-1:1),u);return+(-(i+(n-r)/(a?r-c:c-r))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:d,w:o,d:s,D:f,h:c,m:a,s:r,ms:i,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},x="en",y={};y[x]=m;var $=function(e){return e instanceof P},j=function e(t,n,i){var r;if(!t)return x;if("string"==typeof t){var a=t.toLowerCase();y[a]&&(r=a),n&&(y[a]=n,r=a);var c=t.split("-");if(!r&&c.length>1)return e(c[0])}else{var s=t.name;y[s]=t,r=s}return!i&&r&&(x=r),r||!i&&x},w=function(e,t){if($(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new P(n)},S=Z;S.l=j,S.i=$,S.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var P=function(){function m(e){this.$L=j(e.locale,null,!0),this.parse(e)}var v=m.prototype;return v.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(S.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var i=t.match(g);if(i){var r=i[2]-1||0,a=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)):new Date(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,a)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return S},v.isValid=function(){return!(this.$d.toString()===h)},v.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},v.isAfter=function(e,t){return w(e)<this.startOf(t)},v.isBefore=function(e,t){return this.endOf(t)<w(e)},v.$g=function(e,t,n){return S.u(e)?this[t]:this.set(n,e)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(e,t){var n=this,i=!!S.u(t)||t,l=S.p(e),h=function(e,t){var r=S.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return i?r:r.endOf(s)},g=function(e,t){return S.w(n.toDate()[e].apply(n.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},p=this.$W,m=this.$M,v=this.$D,Z="set"+(this.$u?"UTC":"");switch(l){case d:return i?h(1,0):h(31,11);case u:return i?h(1,m):h(0,m+1);case o:var x=this.$locale().weekStart||0,y=(p<x?p+7:p)-x;return h(i?v-y:v+(6-y),m);case s:case f:return g(Z+"Hours",0);case c:return g(Z+"Minutes",1);case a:return g(Z+"Seconds",2);case r:return g(Z+"Milliseconds",3);default:return this.clone()}},v.endOf=function(e){return this.startOf(e,!1)},v.$set=function(e,t){var n,o=S.p(e),l="set"+(this.$u?"UTC":""),h=(n={},n[s]=l+"Date",n[f]=l+"Date",n[u]=l+"Month",n[d]=l+"FullYear",n[c]=l+"Hours",n[a]=l+"Minutes",n[r]=l+"Seconds",n[i]=l+"Milliseconds",n)[o],g=o===s?this.$D+(t-this.$W):t;if(o===u||o===d){var p=this.clone().set(f,1);p.$d[h](g),p.init(),this.$d=p.set(f,Math.min(this.$D,p.daysInMonth())).$d}else h&&this.$d[h](g);return this.init(),this},v.set=function(e,t){return this.clone().$set(e,t)},v.get=function(e){return this[S.p(e)]()},v.add=function(i,l){var f,h=this;i=Number(i);var g=S.p(l),p=function(e){var t=w(h);return S.w(t.date(t.date()+Math.round(e*i)),h)};if(g===u)return this.set(u,this.$M+i);if(g===d)return this.set(d,this.$y+i);if(g===s)return p(1);if(g===o)return p(7);var m=(f={},f[a]=t,f[c]=n,f[r]=e,f)[g]||1,v=this.$d.getTime()+i*m;return S.w(v,this)},v.subtract=function(e,t){return this.add(-1*e,t)},v.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||h;var i=e||"YYYY-MM-DDTHH:mm:ssZ",r=S.z(this),a=this.$H,c=this.$m,s=this.$M,o=n.weekdays,u=n.months,l=function(e,n,r,a){return e&&(e[n]||e(t,i))||r[n].slice(0,a)},d=function(e){return S.s(a%12||12,e,"0")},f=n.meridiem||function(e,t,n){var i=e<12?"AM":"PM";return n?i.toLowerCase():i},g={YY:String(this.$y).slice(-2),YYYY:S.s(this.$y,4,"0"),M:s+1,MM:S.s(s+1,2,"0"),MMM:l(n.monthsShort,s,u,3),MMMM:l(u,s),D:this.$D,DD:S.s(this.$D,2,"0"),d:String(this.$W),dd:l(n.weekdaysMin,this.$W,o,2),ddd:l(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(a),HH:S.s(a,2,"0"),h:d(1),hh:d(2),a:f(a,c,!0),A:f(a,c,!1),m:String(c),mm:S.s(c,2,"0"),s:String(this.$s),ss:S.s(this.$s,2,"0"),SSS:S.s(this.$ms,3,"0"),Z:r};return i.replace(p,(function(e,t){return t||g[e]||r.replace(":","")}))},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(i,f,h){var g,p=S.p(f),m=w(i),v=(m.utcOffset()-this.utcOffset())*t,Z=this-m,x=S.m(this,m);return x=(g={},g[d]=x/12,g[u]=x,g[l]=x/3,g[o]=(Z-v)/6048e5,g[s]=(Z-v)/864e5,g[c]=Z/n,g[a]=Z/t,g[r]=Z/e,g)[p]||Z,h?x:S.a(x)},v.daysInMonth=function(){return this.endOf(u).$D},v.$locale=function(){return y[this.$L]},v.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),i=j(e,t,!0);return i&&(n.$L=i),n},v.clone=function(){return S.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},m}(),M=P.prototype;return w.prototype=M,[["$ms",i],["$s",r],["$m",a],["$H",c],["$W",s],["$M",u],["$y",d],["$D",f]].forEach((function(e){M[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||(e(t,P,w),e.$i=!0),w},w.locale=j,w.isDayjs=$,w.unix=function(e){return w(1e3*e)},w.en=y[x],w.Ls=y,w.p={},w}()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[1406],{47549:function(e,t,a){a.r(t);var l=a(54306),r=a.n(l),i=a(88265),o=a(63313),n=a(84163),s=a(24378),u=a(95176),g=a(5558),p=a(65601),c=a(38101),d=a(91796),P=a(99120),h=a.n(P),Z=a(11527);t.default=function(e){var t=e.dependence,a=e.handleCancel,l=e.visible,P=e.socketMessage,b=(0,o.useState)(""),m=r()(b,2),f=m[0],k=m[1],v=(0,o.useState)(!0),y=r()(v,2),x=y[0],w=y[1],q=(0,o.useState)(!1),B=r()(q,2),S=B[0],C=B[1],_=(0,o.useState)(!0),T=r()(_,2),K=T[0],H=T[1],X=(0,o.useState)(!1),j=r()(X,2),W=j[0],M=j[1],U=(0,o.useState)(!1),A=r()(U,2),D=A[0],E=A[1],G=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];localStorage.removeItem("logDependence"),a(e)};return(0,o.useEffect)((function(){t&&(H(!0),u.W.get("".concat(g.Z.apiPrefix,"dependencies/").concat(t.id)).then((function(e){var a=e.code,l=e.data;if(200===a&&localStorage.getItem("logDependence")===String(t.id)){var r=(l.log||[]).join("");k(r),w(!r.includes("结束时间")),M(r.includes("删除失败"))}})).finally((function(){H(!1)})))}),[t]),(0,o.useEffect)((function(){if(P&&t){var e=P.type,a=P.message,l=P.references;"installDependence"===e&&l.length>0&&l.includes(t.id)&&(a.includes("结束时间")&&(w(!1),M(a.includes("删除失败"))),k("".concat(f).concat(a)))}}),[P]),(0,o.useEffect)((function(){C(document.body.clientWidth<768)}),[]),(0,Z.jsx)(n.Z,{title:(0,Z.jsxs)(Z.Fragment,{children:[x&&(0,Z.jsx)(p.Z,{spin:!0}),!x&&(0,Z.jsx)(c.Z,{}),(0,Z.jsxs)("span",{style:{marginLeft:5},children:[i.ZP.get("日志 -")," ",t&&t.name]})," "]}),open:l,centered:!0,className:"log-modal",forceRender:!0,onOk:function(){return G()},onCancel:function(){return G()},footer:[(0,Z.jsx)(s.Z,{type:"primary",onClick:function(){W?(E(!0),u.W.delete("".concat(g.Z.apiPrefix,"dependencies/force"),{data:[t.id]}).then((function(e){var t=e.code;e.data,200===t&&G(!0)})).finally((function(){E(!1)}))):G()},loading:D,children:W?i.ZP.get("强制删除"):i.ZP.get("知道了")})],children:(0,Z.jsx)("div",{className:"log-container",children:K?(0,Z.jsx)(d.Z,{}):(0,Z.jsx)("pre",{style:S?{fontFamily:"Source Code Pro",zoom:.83}:{},children:(0,Z.jsx)(h(),{children:f})})})})}},5558:function(e,t,a){var l=a(88265),r=window.__ENV__QlBaseUrl||"/";t.Z={siteName:l.ZP.get("青龙"),apiPrefix:"".concat(r,"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:l.ZP.get("中文"),flag:"/china.svg"}],defaultLanguage:"en"},scopes:[{name:l.ZP.get("定时任务"),value:"crons"},{name:l.ZP.get("环境变量"),value:"envs"},{name:l.ZP.get("订阅管理"),value:"subscriptions"},{name:l.ZP.get("配置文件"),value:"configs"},{name:l.ZP.get("脚本管理"),value:"scripts"},{name:l.ZP.get("日志管理"),value:"logs"},{name:l.ZP.get("依赖管理"),value:"dependencies"},{name:l.ZP.get("系统信息"),value:"system"}],scopesMap:{crons:l.ZP.get("定时任务"),envs:l.ZP.get("环境变量"),subscriptions:l.ZP.get("订阅管理"),configs:l.ZP.get("配置文件"),scripts:l.ZP.get("脚本管理"),logs:l.ZP.get("日志管理"),dependencies:l.ZP.get("依赖管理"),system:l.ZP.get("系统信息")},notificationModes:[{value:"gotify",label:"Gotify"},{value:"goCqHttpBot",label:"GoCqHttpBot"},{value:"serverChan",label:l.ZP.get("Server酱")},{value:"pushDeer",label:"PushDeer"},{value:"bark",label:"Bark"},{value:"telegramBot",label:l.ZP.get("Telegram机器人")},{value:"dingtalkBot",label:l.ZP.get("钉钉机器人")},{value:"weWorkBot",label:l.ZP.get("企业微信机器人")},{value:"weWorkApp",label:l.ZP.get("企业微信应用")},{value:"aibotk",label:l.ZP.get("智能微秘书")},{value:"iGot",label:"IGot"},{value:"pushPlus",label:"PushPlus"},{value:"chat",label:l.ZP.get("群晖chat")},{value:"email",label:l.ZP.get("邮箱")},{value:"lark",label:l.ZP.get("飞书机器人")},{value:"pushMe",label:"PushMe"},{value:"webhook",label:l.ZP.get("自定义通知")},{value:"closed",label:l.ZP.get("已关闭")}],notificationModeMap:{gotify:[{label:"gotifyUrl",tip:l.ZP.get("gotify的url地址,例如 https://push.example.de:8080"),required:!0},{label:"gotifyToken",tip:l.ZP.get("gotify的消息应用token码"),required:!0},{label:"gotifyPriority",tip:l.ZP.get("推送消息的优先级")}],chat:[{label:"chatUrl",tip:l.ZP.get("chat的url地址"),required:!0},{label:"chatToken",tip:l.ZP.get("chat的token码"),required:!0}],goCqHttpBot:[{label:"goCqHttpBotUrl",tip:l.ZP.get("推送到个人QQ: http://127.0.0.1/send_private_msg,群:http://127.0.0.1/send_group_msg"),required:!0},{label:"goCqHttpBotToken",tip:l.ZP.get("访问密钥"),required:!0},{label:"goCqHttpBotQq",tip:l.ZP.get("如果GOBOT_URL设置 /send_private_msg 则需要填入 user_id=个人QQ 相反如果是 /send_group_msg 则需要填入 group_id=QQ群"),required:!0}],serverChan:[{label:"serverChanKey",tip:l.ZP.get("Server酱SENDKEY"),required:!0}],pushDeer:[{label:"pushDeerKey",tip:l.ZP.get("PushDeer的Key,https://github.com/easychen/pushdeer"),required:!0},{label:"pushDeerUrl",tip:l.ZP.get("PushDeer的自架API endpoint,默认是 https://api2.pushdeer.com/message/push")}],bark:[{label:"barkPush",tip:l.ZP.get("Bark的信息IP/设备码,例如:https://api.day.app/XXXXXXXX"),required:!0},{label:"barkIcon",tip:l.ZP.get("BARK推送图标,自定义推送图标 (需iOS15或以上才能显示)")},{label:"barkSound",tip:l.ZP.get("BARK推送铃声,铃声列表去APP查看复制填写")},{label:"barkGroup",tip:l.ZP.get("BARK推送消息的分组,默认为qinglong")}],telegramBot:[{label:"telegramBotToken",tip:l.ZP.get("telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw"),required:!0},{label:"telegramBotUserId",tip:l.ZP.get("telegram用户的id,例如:129xxx206"),required:!0},{label:"telegramBotProxyHost",tip:l.ZP.get("代理IP")},{label:"telegramBotProxyPort",tip:l.ZP.get("代理端口")},{label:"telegramBotProxyAuth",tip:l.ZP.get("telegram代理配置认证参数,用户名与密码用英文冒号连接 user:password")},{label:"telegramBotApiHost",tip:l.ZP.get("telegram api自建的反向代理地址,默认tg官方api")}],dingtalkBot:[{label:"dingtalkBotToken",tip:l.ZP.get("钉钉机器人webhook token,例如:5a544165465465645d0f31dca676e7bd07415asdasd"),required:!0},{label:"dingtalkBotSecret",tip:l.ZP.get("密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串")}],weWorkBot:[{label:"weWorkBotKey",tip:l.ZP.get("企业微信机器人的webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa"),required:!0},{label:"weWorkOrigin",tip:l.ZP.get("企业微信代理地址")}],weWorkApp:[{label:"weWorkAppKey",tip:l.ZP.get("corpid、corpsecret、touser(注:多个成员ID使用|隔开)、agentid、消息类型(选填,不填默认文本消息类型) 注意用,号隔开(英文输入法的逗号),例如:wwcfrs,B-76WERQ,qinglong,1000001,2COat"),required:!0},{label:"weWorkOrigin",tip:l.ZP.get("企业微信代理地址")}],aibotk:[{label:"aibotkKey",tip:l.ZP.get("密钥key,智能微秘书个人中心获取apikey,申请地址:https://wechat.aibotk.com/signup?from=ql"),required:!0},{label:"aibotkType",tip:l.ZP.get("发送的目标,群组或者好友"),required:!0,placeholder:l.ZP.get("请输入要发送的目标"),items:[{value:"room",label:l.ZP.get("群聊")},{value:"contact",label:l.ZP.get("好友")}]},{label:"aibotkName",tip:l.ZP.get("要发送的用户昵称或群名,如果目标是群,需要填群名,如果目标是好友,需要填好友昵称"),required:!0}],iGot:[{label:"iGotPushKey",tip:l.ZP.get("iGot的信息推送key,例如:https://push.hellyw.com/XXXXXXXX"),required:!0}],pushPlus:[{label:"pushPlusToken",tip:l.ZP.get("微信扫码登录后一对一推送或一对多推送下面的token(您的Token),不提供PUSH_PLUS_USER则默认为一对一推送,参考 https://www.pushplus.plus/"),required:!0},{label:"pushPlusUser",tip:l.ZP.get("一对多推送的“群组编码”(一对多推送下面->您的群组(如无则创建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送)")}],lark:[{label:"larkKey",tip:l.ZP.get("飞书群组机器人:https://www.feishu.cn/hc/zh-CN/articles/360024984973"),required:!0}],email:[{label:"emailService",tip:l.ZP.get("邮箱服务名称,比如126、163、Gmail、QQ等,支持列表https://nodemailer.com/smtp/well-known/"),required:!0},{label:"emailUser",tip:l.ZP.get("邮箱地址"),required:!0},{label:"emailPass",tip:l.ZP.get("邮箱SMTP授权码"),required:!0}],pushMe:[{label:"pushMeKey",tip:l.ZP.get("PushMe的Key,https://push.i-i.me/"),required:!0}],webhook:[{label:"webhookMethod",tip:l.ZP.get("请求方法"),required:!0,items:[{value:"GET"},{value:"POST"},{value:"PUT"}]},{label:"webhookContentType",tip:l.ZP.get("请求头Content-Type"),required:!0,items:[{value:"application/json"},{value:"multipart/form-data"},{value:"application/x-www-form-urlencoded"}]},{label:"webhookUrl",tip:l.ZP.get("请求链接以http或者https开头。url或者body中必须包含$title,$content可选,对应api内容的位置"),required:!0,placeholder:"https://xxx.cn/api?content=$title\n"},{label:"webhookHeaders",tip:l.ZP.get("请求头格式Custom-Header1: Header1,多个换行分割"),placeholder:"Custom-Header1: Header1\nCustom-Header2: Header2"},{label:"webhookBody",tip:l.ZP.get("请求体格式key1: value1,多个换行分割。url或者body中必须包含$title,$content可选,对应api内容的位置"),placeholder:"key1: $title\nkey2: $content"}]},documentTitleMap:{"/login":l.ZP.get("登录"),"/initialization":l.ZP.get("初始化"),"/crontab":l.ZP.get("定时任务"),"/env":l.ZP.get("环境变量"),"/subscription":l.ZP.get("订阅管理"),"/config":l.ZP.get("配置文件"),"/script":l.ZP.get("脚本管理"),"/diff":l.ZP.get("对比工具"),"/log":l.ZP.get("日志管理"),"/setting":l.ZP.get("系统设置"),"/error":l.ZP.get("错误日志"),"/dependence":l.ZP.get("依赖管理")},dependenceTypes:["nodejs","python3","linux"]}},95176:function(e,t,a){a.d(t,{W:function(){return h}});var l=a(25359),r=a.n(l),i=a(49811),o=a.n(i),n=a(88265),s=a(9835),u=a(5558),g=a(98074),p=a(73669);s.ZP.config({duration:2});var c=Date.now(),d=p.Z.create({timeout:6e4,params:{t:c}}),P=["/api/user/login","/open/auth/token","/api/user/two-factor/login","/api/system","/api/user/init","/api/user/notification/init"];d.interceptors.request.use((function(e){var t=localStorage.getItem(u.Z.authKey);return t&&!P.includes(e.url)?(e.headers.Authorization="Bearer ".concat(t),e):e})),d.interceptors.response.use(function(){var e=o()(r()().mark((function e(t){var a,l,i;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.status,![502,504].includes(a)){e.next=5;break}g.history.push("/error"),e.next=18;break;case 5:if(401!==a){e.next=9;break}"/login"!==g.history.location.pathname&&(localStorage.removeItem(u.Z.authKey),g.history.push("/login")),e.next=18;break;case 9:return e.prev=9,200!==(l=t.data).code&&(i=l.message||l.data)&&s.ZP.error({content:i,style:{maxWidth:500,margin:"0 auto"}}),e.abrupt("return",l);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.data:e.response.statusText,a=e.response.status;[502,504].includes(a)?g.history.push("/error"):401===a?"/login"!==g.history.location.pathname&&(s.ZP.error(n.ZP.get("登录已过期,请重新登录")),localStorage.removeItem(u.Z.authKey),g.history.push("/login")):s.ZP.error({content:t,style:{maxWidth:500,margin:"0 auto"}})}else console.log(e.message);return Promise.reject(e)}));var h=d}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[803],{52739:function(e,t,a){a.r(t);var r=a(25359),n=a.n(r),o=a(57213),l=a.n(o),i=a(49811),s=a.n(i),u=a(54306),c=a.n(u),p=a(88265),d=a(63313),g=a(28756),m=a(67393),h=a(84163),b=a(84468),f=a(22159),Z=a(95176),P=a(5558),v=a(11527),y=g.Z.Option,k=function(e){return e[e.nodejs=0]="nodejs",e[e.python3=1]="python3",e[e.linux=2]="linux",e}(k||{});t.default=function(e){var t=e.dependence,a=e.handleCancel,r=e.visible,o=e.defaultType,i=m.Z.useForm(),u=c()(i,1)[0],x=(0,d.useState)(!1),w=c()(x,2),C=w[0],O=w[1],q=function(){var e=s()(n()().mark((function e(r){var o,i,s,u,c,p,d,g,m,h;return n()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return O(!0),o=r.name,i=r.split,s=r.type,u=r.remark,c=t?"put":"post",t?p=l()(l()({},r),{},{id:t.id}):"1"===i?(d=o.includes("&")?"&":"\n",p=o.split(d).map((function(e){return{name:e,type:s,remark:u}}))):p=[{name:o,type:s,remark:u}],e.prev=4,e.next=7,Z.W[c]("".concat(P.Z.apiPrefix,"dependencies"),p);case 7:g=e.sent,m=g.code,h=g.data,200===m&&a(h),O(!1),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),O(!1);case 17:case"end":return e.stop()}}),e,null,[[4,14]])})));return function(t){return e.apply(this,arguments)}}();return(0,d.useEffect)((function(){u.resetFields()}),[t,r]),(0,v.jsx)(h.Z,{title:t?p.ZP.get("编辑依赖"):p.ZP.get("创建依赖"),open:r,forceRender:!0,centered:!0,maskClosable:!1,onOk:function(){u.validateFields().then((function(e){q(e)})).catch((function(e){console.log("Validate Failed:",e)}))},onCancel:function(){return a()},confirmLoading:C,children:(0,v.jsxs)(m.Z,{form:u,layout:"vertical",name:"dependence_modal",initialValues:t,children:[(0,v.jsx)(m.Z.Item,{name:"type",label:p.ZP.get("依赖类型"),initialValue:k[o],children:(0,v.jsx)(g.Z,{children:P.Z.dependenceTypes.map((function(e,t){return(0,v.jsx)(y,{value:t,children:e},t)}))})}),!t&&(0,v.jsx)(m.Z.Item,{name:"split",label:p.ZP.get("自动拆分"),initialValue:"0",tooltip:p.ZP.get("多个依赖是否换行分割"),children:(0,v.jsxs)(b.ZP.Group,{children:[(0,v.jsx)(b.ZP,{value:"1",children:p.ZP.get("是")}),(0,v.jsx)(b.ZP,{value:"0",children:p.ZP.get("否")})]})}),(0,v.jsx)(m.Z.Item,{name:"name",label:p.ZP.get("名称"),rules:[{required:!0,message:p.ZP.get("请输入依赖名称,支持指定版本"),whitespace:!0}],children:(0,v.jsx)(f.Z.TextArea,{rows:4,autoSize:{minRows:1,maxRows:5},placeholder:p.ZP.get("请输入依赖名称")})}),(0,v.jsx)(m.Z.Item,{name:"remark",label:p.ZP.get("备注"),children:(0,v.jsx)(f.Z,{placeholder:p.ZP.get("请输入备注")})})]})})}},5558:function(e,t,a){var r=a(88265),n=window.__ENV__QlBaseUrl||"/";t.Z={siteName:r.ZP.get("青龙"),apiPrefix:"".concat(n,"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:r.ZP.get("中文"),flag:"/china.svg"}],defaultLanguage:"en"},scopes:[{name:r.ZP.get("定时任务"),value:"crons"},{name:r.ZP.get("环境变量"),value:"envs"},{name:r.ZP.get("订阅管理"),value:"subscriptions"},{name:r.ZP.get("配置文件"),value:"configs"},{name:r.ZP.get("脚本管理"),value:"scripts"},{name:r.ZP.get("日志管理"),value:"logs"},{name:r.ZP.get("依赖管理"),value:"dependencies"},{name:r.ZP.get("系统信息"),value:"system"}],scopesMap:{crons:r.ZP.get("定时任务"),envs:r.ZP.get("环境变量"),subscriptions:r.ZP.get("订阅管理"),configs:r.ZP.get("配置文件"),scripts:r.ZP.get("脚本管理"),logs:r.ZP.get("日志管理"),dependencies:r.ZP.get("依赖管理"),system:r.ZP.get("系统信息")},notificationModes:[{value:"gotify",label:"Gotify"},{value:"goCqHttpBot",label:"GoCqHttpBot"},{value:"serverChan",label:r.ZP.get("Server酱")},{value:"pushDeer",label:"PushDeer"},{value:"bark",label:"Bark"},{value:"telegramBot",label:r.ZP.get("Telegram机器人")},{value:"dingtalkBot",label:r.ZP.get("钉钉机器人")},{value:"weWorkBot",label:r.ZP.get("企业微信机器人")},{value:"weWorkApp",label:r.ZP.get("企业微信应用")},{value:"aibotk",label:r.ZP.get("智能微秘书")},{value:"iGot",label:"IGot"},{value:"pushPlus",label:"PushPlus"},{value:"chat",label:r.ZP.get("群晖chat")},{value:"email",label:r.ZP.get("邮箱")},{value:"lark",label:r.ZP.get("飞书机器人")},{value:"pushMe",label:"PushMe"},{value:"webhook",label:r.ZP.get("自定义通知")},{value:"closed",label:r.ZP.get("已关闭")}],notificationModeMap:{gotify:[{label:"gotifyUrl",tip:r.ZP.get("gotify的url地址,例如 https://push.example.de:8080"),required:!0},{label:"gotifyToken",tip:r.ZP.get("gotify的消息应用token码"),required:!0},{label:"gotifyPriority",tip:r.ZP.get("推送消息的优先级")}],chat:[{label:"chatUrl",tip:r.ZP.get("chat的url地址"),required:!0},{label:"chatToken",tip:r.ZP.get("chat的token码"),required:!0}],goCqHttpBot:[{label:"goCqHttpBotUrl",tip:r.ZP.get("推送到个人QQ: http://127.0.0.1/send_private_msg,群:http://127.0.0.1/send_group_msg"),required:!0},{label:"goCqHttpBotToken",tip:r.ZP.get("访问密钥"),required:!0},{label:"goCqHttpBotQq",tip:r.ZP.get("如果GOBOT_URL设置 /send_private_msg 则需要填入 user_id=个人QQ 相反如果是 /send_group_msg 则需要填入 group_id=QQ群"),required:!0}],serverChan:[{label:"serverChanKey",tip:r.ZP.get("Server酱SENDKEY"),required:!0}],pushDeer:[{label:"pushDeerKey",tip:r.ZP.get("PushDeer的Key,https://github.com/easychen/pushdeer"),required:!0},{label:"pushDeerUrl",tip:r.ZP.get("PushDeer的自架API endpoint,默认是 https://api2.pushdeer.com/message/push")}],bark:[{label:"barkPush",tip:r.ZP.get("Bark的信息IP/设备码,例如:https://api.day.app/XXXXXXXX"),required:!0},{label:"barkIcon",tip:r.ZP.get("BARK推送图标,自定义推送图标 (需iOS15或以上才能显示)")},{label:"barkSound",tip:r.ZP.get("BARK推送铃声,铃声列表去APP查看复制填写")},{label:"barkGroup",tip:r.ZP.get("BARK推送消息的分组,默认为qinglong")}],telegramBot:[{label:"telegramBotToken",tip:r.ZP.get("telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw"),required:!0},{label:"telegramBotUserId",tip:r.ZP.get("telegram用户的id,例如:129xxx206"),required:!0},{label:"telegramBotProxyHost",tip:r.ZP.get("代理IP")},{label:"telegramBotProxyPort",tip:r.ZP.get("代理端口")},{label:"telegramBotProxyAuth",tip:r.ZP.get("telegram代理配置认证参数,用户名与密码用英文冒号连接 user:password")},{label:"telegramBotApiHost",tip:r.ZP.get("telegram api自建的反向代理地址,默认tg官方api")}],dingtalkBot:[{label:"dingtalkBotToken",tip:r.ZP.get("钉钉机器人webhook token,例如:5a544165465465645d0f31dca676e7bd07415asdasd"),required:!0},{label:"dingtalkBotSecret",tip:r.ZP.get("密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串")}],weWorkBot:[{label:"weWorkBotKey",tip:r.ZP.get("企业微信机器人的webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa"),required:!0},{label:"weWorkOrigin",tip:r.ZP.get("企业微信代理地址")}],weWorkApp:[{label:"weWorkAppKey",tip:r.ZP.get("corpid、corpsecret、touser(注:多个成员ID使用|隔开)、agentid、消息类型(选填,不填默认文本消息类型) 注意用,号隔开(英文输入法的逗号),例如:wwcfrs,B-76WERQ,qinglong,1000001,2COat"),required:!0},{label:"weWorkOrigin",tip:r.ZP.get("企业微信代理地址")}],aibotk:[{label:"aibotkKey",tip:r.ZP.get("密钥key,智能微秘书个人中心获取apikey,申请地址:https://wechat.aibotk.com/signup?from=ql"),required:!0},{label:"aibotkType",tip:r.ZP.get("发送的目标,群组或者好友"),required:!0,placeholder:r.ZP.get("请输入要发送的目标"),items:[{value:"room",label:r.ZP.get("群聊")},{value:"contact",label:r.ZP.get("好友")}]},{label:"aibotkName",tip:r.ZP.get("要发送的用户昵称或群名,如果目标是群,需要填群名,如果目标是好友,需要填好友昵称"),required:!0}],iGot:[{label:"iGotPushKey",tip:r.ZP.get("iGot的信息推送key,例如:https://push.hellyw.com/XXXXXXXX"),required:!0}],pushPlus:[{label:"pushPlusToken",tip:r.ZP.get("微信扫码登录后一对一推送或一对多推送下面的token(您的Token),不提供PUSH_PLUS_USER则默认为一对一推送,参考 https://www.pushplus.plus/"),required:!0},{label:"pushPlusUser",tip:r.ZP.get("一对多推送的“群组编码”(一对多推送下面->您的群组(如无则创建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送)")}],lark:[{label:"larkKey",tip:r.ZP.get("飞书群组机器人:https://www.feishu.cn/hc/zh-CN/articles/360024984973"),required:!0}],email:[{label:"emailService",tip:r.ZP.get("邮箱服务名称,比如126、163、Gmail、QQ等,支持列表https://nodemailer.com/smtp/well-known/"),required:!0},{label:"emailUser",tip:r.ZP.get("邮箱地址"),required:!0},{label:"emailPass",tip:r.ZP.get("邮箱SMTP授权码"),required:!0}],pushMe:[{label:"pushMeKey",tip:r.ZP.get("PushMe的Key,https://push.i-i.me/"),required:!0}],webhook:[{label:"webhookMethod",tip:r.ZP.get("请求方法"),required:!0,items:[{value:"GET"},{value:"POST"},{value:"PUT"}]},{label:"webhookContentType",tip:r.ZP.get("请求头Content-Type"),required:!0,items:[{value:"application/json"},{value:"multipart/form-data"},{value:"application/x-www-form-urlencoded"}]},{label:"webhookUrl",tip:r.ZP.get("请求链接以http或者https开头。url或者body中必须包含$title,$content可选,对应api内容的位置"),required:!0,placeholder:"https://xxx.cn/api?content=$title\n"},{label:"webhookHeaders",tip:r.ZP.get("请求头格式Custom-Header1: Header1,多个换行分割"),placeholder:"Custom-Header1: Header1\nCustom-Header2: Header2"},{label:"webhookBody",tip:r.ZP.get("请求体格式key1: value1,多个换行分割。url或者body中必须包含$title,$content可选,对应api内容的位置"),placeholder:"key1: $title\nkey2: $content"}]},documentTitleMap:{"/login":r.ZP.get("登录"),"/initialization":r.ZP.get("初始化"),"/crontab":r.ZP.get("定时任务"),"/env":r.ZP.get("环境变量"),"/subscription":r.ZP.get("订阅管理"),"/config":r.ZP.get("配置文件"),"/script":r.ZP.get("脚本管理"),"/diff":r.ZP.get("对比工具"),"/log":r.ZP.get("日志管理"),"/setting":r.ZP.get("系统设置"),"/error":r.ZP.get("错误日志"),"/dependence":r.ZP.get("依赖管理")},dependenceTypes:["nodejs","python3","linux"]}},95176:function(e,t,a){a.d(t,{W:function(){return h}});var r=a(25359),n=a.n(r),o=a(49811),l=a.n(o),i=a(88265),s=a(9835),u=a(5558),c=a(98074),p=a(73669);s.ZP.config({duration:2});var d=Date.now(),g=p.Z.create({timeout:6e4,params:{t:d}}),m=["/api/user/login","/open/auth/token","/api/user/two-factor/login","/api/system","/api/user/init","/api/user/notification/init"];g.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})),g.interceptors.response.use(function(){var e=l()(n()().mark((function e(t){var a,r,o;return n()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.status,![502,504].includes(a)){e.next=5;break}c.history.push("/error"),e.next=18;break;case 5:if(401!==a){e.next=9;break}"/login"!==c.history.location.pathname&&(localStorage.removeItem(u.Z.authKey),c.history.push("/login")),e.next=18;break;case 9:return e.prev=9,200!==(r=t.data).code&&(o=r.message||r.data)&&s.ZP.error({content:o,style:{maxWidth:500,margin:"0 auto"}}),e.abrupt("return",r);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.data:e.response.statusText,a=e.response.status;[502,504].includes(a)?c.history.push("/error"):401===a?"/login"!==c.history.location.pathname&&(s.ZP.error(i.ZP.get("登录已过期,请重新登录")),localStorage.removeItem(u.Z.authKey),c.history.push("/login")):s.ZP.error({content:t,style:{maxWidth:500,margin:"0 auto"}})}else console.log(e.message);return Promise.reject(e)}));var h=g},60822:function(e,t,a){function r(e){return Object.keys(e).reduce((function(t,a){return!a.startsWith("data-")&&!a.startsWith("aria-")&&"role"!==a||a.startsWith("data-__")||(t[a]=e[a]),t}),{})}a.d(t,{Z:function(){return r}})},84468:function(e,t,a){a.d(t,{ZP:function(){return B}});var r=a(60795),n=a(87807),o=a(17079),l=a(84875),i=a.n(l),s=a(26230),u=a(63313),c=a(82259),p=a(65189),d=a(60822),g=u.createContext(null),m=g.Provider,h=g,b=u.createContext(null),f=b.Provider,Z=a(69370),P=a(33951),v=a(7893),y=a(76737),k=function(e,t){var a={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(a[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(a[r[n]]=e[r[n]])}return a},x=function(e,t){var a,o=u.useContext(h),l=u.useContext(b),s=u.useContext(c.E_),p=s.getPrefixCls,d=s.direction,g=u.useRef(),m=(0,P.sQ)(t,g),f=(0,u.useContext)(y.aM).isFormItemInput,x=e.prefixCls,w=e.className,C=e.children,O=e.style,q=e.disabled,E=k(e,["prefixCls","className","children","style","disabled"]),_=p("radio",x),I="button"===((null==o?void 0:o.optionType)||l)?"".concat(_,"-button"):_,B=(0,r.Z)({},E),S=u.useContext(v.Z);B.disabled=q||S,o&&(B.name=o.name,B.onChange=function(t){var a,r;null===(a=e.onChange)||void 0===a||a.call(e,t),null===(r=null==o?void 0:o.onChange)||void 0===r||r.call(o,t)},B.checked=e.value===o.value,B.disabled=B.disabled||o.disabled);var j=i()("".concat(I,"-wrapper"),(a={},(0,n.Z)(a,"".concat(I,"-wrapper-checked"),B.checked),(0,n.Z)(a,"".concat(I,"-wrapper-disabled"),B.disabled),(0,n.Z)(a,"".concat(I,"-wrapper-rtl"),"rtl"===d),(0,n.Z)(a,"".concat(I,"-wrapper-in-form-item"),f),a),w);return u.createElement("label",{className:j,style:O,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave},u.createElement(Z.Z,(0,r.Z)({},B,{type:"radio",prefixCls:I,ref:m})),void 0!==C?u.createElement("span",null,C):null)};var w=u.forwardRef(x),C=u.forwardRef((function(e,t){var a,l=u.useContext(c.E_),g=l.getPrefixCls,h=l.direction,b=u.useContext(p.Z),f=(0,s.Z)(e.defaultValue,{value:e.value}),Z=(0,o.Z)(f,2),P=Z[0],v=Z[1],y=e.prefixCls,k=e.className,x=void 0===k?"":k,C=e.options,O=e.buttonStyle,q=void 0===O?"outline":O,E=e.disabled,_=e.children,I=e.size,B=e.style,S=e.id,j=e.onMouseEnter,M=e.onMouseLeave,T=e.onFocus,N=e.onBlur,H=g("radio",y),R="".concat(H,"-group"),A=_;C&&C.length>0&&(A=C.map((function(e){return"string"==typeof e||"number"==typeof e?u.createElement(w,{key:e.toString(),prefixCls:H,disabled:E,value:e,checked:P===e},e):u.createElement(w,{key:"radio-group-value-options-".concat(e.value),prefixCls:H,disabled:e.disabled||E,value:e.value,checked:P===e.value,style:e.style},e.label)})));var W=I||b,X=i()(R,"".concat(R,"-").concat(q),(a={},(0,n.Z)(a,"".concat(R,"-").concat(W),W),(0,n.Z)(a,"".concat(R,"-rtl"),"rtl"===h),a),x);return u.createElement("div",(0,r.Z)({},(0,d.Z)(e),{className:X,style:B,onMouseEnter:j,onMouseLeave:M,onFocus:T,onBlur:N,id:S,ref:t}),u.createElement(m,{value:{onChange:function(t){var a=P,r=t.target.value;"value"in e||v(r);var n=e.onChange;n&&r!==a&&n(t)},value:P,disabled:e.disabled,name:e.name,optionType:e.optionType}},A))})),O=u.memo(C),q=function(e,t){var a={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(a[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(a[r[n]]=e[r[n]])}return a},E=function(e,t){var a=u.useContext(c.E_).getPrefixCls,n=e.prefixCls,o=q(e,["prefixCls"]),l=a("radio",n);return u.createElement(f,{value:"button"},u.createElement(w,(0,r.Z)({prefixCls:l},o,{type:"radio",ref:t})))},_=u.forwardRef(E),I=w;I.Button=_,I.Group=O,I.__ANT_RADIO=!0;var B=I},28756:function(e,t,a){var r=a(87807),n=a(60795),o=a(84875),l=a.n(o),i=a(40804),s=a(92976),u=a(63313),c=a(82259),p=a(23474),d=a(7893),g=a(65189),m=a(76737),h=a(16082),b=a(1020),f=a(91967),Z=a(60934),P=function(e,t){var a={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(a[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(a[r[n]]=e[r[n]])}return a},v="SECRET_COMBOBOX_MODE_DO_NOT_USE",y=function(e,t){var a,o,y=e.prefixCls,k=e.bordered,x=void 0===k||k,w=e.className,C=e.getPopupContainer,O=e.dropdownClassName,q=e.popupClassName,E=e.listHeight,_=void 0===E?256:E,I=e.placement,B=e.listItemHeight,S=void 0===B?24:B,j=e.size,M=e.disabled,T=e.notFoundContent,N=e.status,H=e.showArrow,R=P(e,["prefixCls","bordered","className","getPopupContainer","dropdownClassName","popupClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","showArrow"]),A=u.useContext(c.E_),W=A.getPopupContainer,X=A.getPrefixCls,K=A.renderEmpty,D=A.direction,F=A.virtual,U=A.dropdownMatchSelectWidth,G=u.useContext(g.Z),Q=X("select",y),z=X(),L=(0,Z.ri)(Q,D),$=L.compactSize,V=L.compactItemClassnames,Y=u.useMemo((function(){var e=R.mode;if("combobox"!==e)return e===v?"combobox":e}),[R.mode]),J="multiple"===Y||"tags"===Y,ee=void 0!==H?H:R.loading||!(J||"combobox"===Y),te=(0,u.useContext)(m.aM),ae=te.status,re=te.hasFeedback,ne=te.isFormItemInput,oe=te.feedbackIcon,le=(0,b.F)(ae,N);o=void 0!==T?T:"combobox"===Y?null:(K||p.Z)("Select");var ie=(0,f.Z)((0,n.Z)((0,n.Z)({},R),{multiple:J,hasFeedback:re,feedbackIcon:oe,showArrow:ee,prefixCls:Q})),se=ie.suffixIcon,ue=ie.itemIcon,ce=ie.removeIcon,pe=ie.clearIcon,de=(0,s.Z)(R,["suffixIcon","itemIcon"]),ge=l()(q||O,(0,r.Z)({},"".concat(Q,"-dropdown-").concat(D),"rtl"===D)),me=$||j||G,he=u.useContext(d.Z),be=null!=M?M:he,fe=l()((a={},(0,r.Z)(a,"".concat(Q,"-lg"),"large"===me),(0,r.Z)(a,"".concat(Q,"-sm"),"small"===me),(0,r.Z)(a,"".concat(Q,"-rtl"),"rtl"===D),(0,r.Z)(a,"".concat(Q,"-borderless"),!x),(0,r.Z)(a,"".concat(Q,"-in-form-item"),ne),a),(0,b.Z)(Q,le,re),V,w);return u.createElement(i.ZP,(0,n.Z)({ref:t,virtual:F,dropdownMatchSelectWidth:U},de,{transitionName:(0,h.mL)(z,(0,h.q0)(I),R.transitionName),listHeight:_,listItemHeight:S,mode:Y,prefixCls:Q,placement:void 0!==I?I:"rtl"===D?"bottomRight":"bottomLeft",direction:D,inputIcon:se,menuItemSelectedIcon:ue,removeIcon:ce,clearIcon:pe,notFoundContent:o,className:fe,getPopupContainer:C||W,dropdownClassName:ge,showArrow:re||H,disabled:be}))},k=u.forwardRef(y);k.SECRET_COMBOBOX_MODE_DO_NOT_USE=v,k.Option=i.Wx,k.OptGroup=i.Xo,t.Z=k},69370:function(e,t,a){var r=a(60795),n=a(14797),o=a(87807),l=a(17079),i=a(67725),s=a(84875),u=a.n(s),c=a(26230),p=a(63313),d=["prefixCls","className","style","checked","disabled","defaultChecked","type","onChange"],g=(0,p.forwardRef)((function(e,t){var a,s=e.prefixCls,g=void 0===s?"rc-checkbox":s,m=e.className,h=e.style,b=e.checked,f=e.disabled,Z=e.defaultChecked,P=void 0!==Z&&Z,v=e.type,y=void 0===v?"checkbox":v,k=e.onChange,x=(0,i.Z)(e,d),w=(0,p.useRef)(null),C=(0,c.Z)(P,{value:b}),O=(0,l.Z)(C,2),q=O[0],E=O[1];(0,p.useImperativeHandle)(t,(function(){return{focus:function(){var e;null===(e=w.current)||void 0===e||e.focus()},blur:function(){var e;null===(e=w.current)||void 0===e||e.blur()},input:w.current}}));var _=u()(g,m,(a={},(0,o.Z)(a,"".concat(g,"-checked"),q),(0,o.Z)(a,"".concat(g,"-disabled"),f),a));return p.createElement("span",{className:_,style:h},p.createElement("input",(0,r.Z)({},x,{className:"".concat(g,"-input"),ref:w,onChange:function(t){f||("checked"in e||E(t.target.checked),null==k||k({target:(0,n.Z)((0,n.Z)({},e),{},{type:y,checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:f,checked:!!q,type:y})),p.createElement("span",{className:"".concat(g,"-inner")}))}));t.Z=g}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[6401],{58276:function(e,t,a){a.r(t),a.d(t,{default:function(){return y}});var l=a(54306),r=a.n(l),i=a(88265),o=a(63313),n=a(28756),s=a(9835),u=a(24378),g=a(59873),p=a(66585),c=a(67393),d=a(5558),h=a(78969),P=a(95176),Z=a(82755),b=a(22370),f=a.n(b),m=a(98074),v=a(11527),k=n.Z.Option,y=function(){var e=(0,m.useOutletContext)(),t=e.headerStyle,a=e.isPhone,l=e.theme,b=(0,o.useState)("config.sample.sh"),y=r()(b,2),w=y[0],x=y[1],q=(0,o.useState)("config.sh"),B=r()(q,2),C=B[0],S=B[1],T=(0,o.useState)(""),W=r()(T,2),_=W[0],X=W[1],K=(0,o.useState)(""),j=r()(K,2),M=j[0],H=j[1],A=(0,o.useState)(!0),U=r()(A,2),E=U[0],G=U[1],I=(0,o.useState)([]),D=r()(I,2),Q=D[0],O=D[1],R=(0,o.useRef)(null);return(0,o.useEffect)((function(){G(!0),P.W.get("".concat(d.Z.apiPrefix,"configs/files")).then((function(e){var t=e.code,a=e.data;200===t&&O(a)})).finally((function(){return G(!1)}))}),[]),(0,o.useEffect)((function(){P.W.get("".concat(d.Z.apiPrefix,"configs/").concat(w)).then((function(e){var t=e.code,a=e.data;200===t&&X(a)}))}),[w]),(0,o.useEffect)((function(){P.W.get("".concat(d.Z.apiPrefix,"configs/").concat(C)).then((function(e){var t=e.code,a=e.data;200===t&&H(a)}))}),[C]),(0,v.jsxs)(h.ZP,{className:"ql-container-wrapper",title:i.ZP.get("对比工具"),loading:E,header:{style:t},extra:!a&&[(0,v.jsx)(u.Z,{type:"primary",onClick:function(){var e=R.current?R.current.getModel().modified.getValue().replace(/\r\n/g,"\n"):M;P.W.post("".concat(d.Z.apiPrefix,"configs/save"),{content:e,name:C}).then((function(e){var t=e.code;e.data;200===t&&s.ZP.success(i.ZP.get("保存成功"))}))},children:i.ZP.get("保存")},"1")],children:[(0,v.jsxs)(g.Z,{gutter:24,className:"diff-switch-file",children:[(0,v.jsx)(p.Z,{span:12,children:(0,v.jsx)(c.Z.Item,{label:i.ZP.get("源文件"),children:(0,v.jsx)(n.Z,{value:w,onChange:function(e){x(e)},children:Q.map((function(e){return(0,v.jsx)(k,{value:e.value,children:e.title},e.value)}))})})}),(0,v.jsx)(p.Z,{span:12,children:(0,v.jsx)(c.Z.Item,{label:i.ZP.get("当前文件"),children:(0,v.jsx)(n.Z,{value:C,onChange:function(e){S(e)},children:Q.map((function(e){return(0,v.jsx)(k,{value:e.value,children:e.title},e.value)}))})})})]}),a?(0,v.jsx)(f(),{styles:{diffContainer:{overflowX:"auto",minWidth:768},diffRemoved:{overflowX:"auto",maxWidth:300},diffAdded:{overflowX:"auto",maxWidth:300},line:{wordBreak:"break-word"}},oldValue:_,newValue:M,splitView:!0,leftTitle:"config.sh",rightTitle:"config.sample.sh",disableWordDiff:!0}):(0,v.jsx)(Z.SV,{language:"shell",original:_,modified:M,options:{fontSize:12,lineNumbersMinChars:3,folding:!1,glyphMargin:!1,wordWrap:"on"},theme:l,onMount:function(e){R.current=e}})]})}},5558:function(e,t,a){var l=a(88265),r=window.__ENV__QlBaseUrl||"/";t.Z={siteName:l.ZP.get("青龙"),apiPrefix:"".concat(r,"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:l.ZP.get("中文"),flag:"/china.svg"}],defaultLanguage:"en"},scopes:[{name:l.ZP.get("定时任务"),value:"crons"},{name:l.ZP.get("环境变量"),value:"envs"},{name:l.ZP.get("订阅管理"),value:"subscriptions"},{name:l.ZP.get("配置文件"),value:"configs"},{name:l.ZP.get("脚本管理"),value:"scripts"},{name:l.ZP.get("日志管理"),value:"logs"},{name:l.ZP.get("依赖管理"),value:"dependencies"},{name:l.ZP.get("系统信息"),value:"system"}],scopesMap:{crons:l.ZP.get("定时任务"),envs:l.ZP.get("环境变量"),subscriptions:l.ZP.get("订阅管理"),configs:l.ZP.get("配置文件"),scripts:l.ZP.get("脚本管理"),logs:l.ZP.get("日志管理"),dependencies:l.ZP.get("依赖管理"),system:l.ZP.get("系统信息")},notificationModes:[{value:"gotify",label:"Gotify"},{value:"goCqHttpBot",label:"GoCqHttpBot"},{value:"serverChan",label:l.ZP.get("Server酱")},{value:"pushDeer",label:"PushDeer"},{value:"bark",label:"Bark"},{value:"telegramBot",label:l.ZP.get("Telegram机器人")},{value:"dingtalkBot",label:l.ZP.get("钉钉机器人")},{value:"weWorkBot",label:l.ZP.get("企业微信机器人")},{value:"weWorkApp",label:l.ZP.get("企业微信应用")},{value:"aibotk",label:l.ZP.get("智能微秘书")},{value:"iGot",label:"IGot"},{value:"pushPlus",label:"PushPlus"},{value:"chat",label:l.ZP.get("群晖chat")},{value:"email",label:l.ZP.get("邮箱")},{value:"lark",label:l.ZP.get("飞书机器人")},{value:"pushMe",label:"PushMe"},{value:"webhook",label:l.ZP.get("自定义通知")},{value:"closed",label:l.ZP.get("已关闭")}],notificationModeMap:{gotify:[{label:"gotifyUrl",tip:l.ZP.get("gotify的url地址,例如 https://push.example.de:8080"),required:!0},{label:"gotifyToken",tip:l.ZP.get("gotify的消息应用token码"),required:!0},{label:"gotifyPriority",tip:l.ZP.get("推送消息的优先级")}],chat:[{label:"chatUrl",tip:l.ZP.get("chat的url地址"),required:!0},{label:"chatToken",tip:l.ZP.get("chat的token码"),required:!0}],goCqHttpBot:[{label:"goCqHttpBotUrl",tip:l.ZP.get("推送到个人QQ: http://127.0.0.1/send_private_msg,群:http://127.0.0.1/send_group_msg"),required:!0},{label:"goCqHttpBotToken",tip:l.ZP.get("访问密钥"),required:!0},{label:"goCqHttpBotQq",tip:l.ZP.get("如果GOBOT_URL设置 /send_private_msg 则需要填入 user_id=个人QQ 相反如果是 /send_group_msg 则需要填入 group_id=QQ群"),required:!0}],serverChan:[{label:"serverChanKey",tip:l.ZP.get("Server酱SENDKEY"),required:!0}],pushDeer:[{label:"pushDeerKey",tip:l.ZP.get("PushDeer的Key,https://github.com/easychen/pushdeer"),required:!0},{label:"pushDeerUrl",tip:l.ZP.get("PushDeer的自架API endpoint,默认是 https://api2.pushdeer.com/message/push")}],bark:[{label:"barkPush",tip:l.ZP.get("Bark的信息IP/设备码,例如:https://api.day.app/XXXXXXXX"),required:!0},{label:"barkIcon",tip:l.ZP.get("BARK推送图标,自定义推送图标 (需iOS15或以上才能显示)")},{label:"barkSound",tip:l.ZP.get("BARK推送铃声,铃声列表去APP查看复制填写")},{label:"barkGroup",tip:l.ZP.get("BARK推送消息的分组,默认为qinglong")}],telegramBot:[{label:"telegramBotToken",tip:l.ZP.get("telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw"),required:!0},{label:"telegramBotUserId",tip:l.ZP.get("telegram用户的id,例如:129xxx206"),required:!0},{label:"telegramBotProxyHost",tip:l.ZP.get("代理IP")},{label:"telegramBotProxyPort",tip:l.ZP.get("代理端口")},{label:"telegramBotProxyAuth",tip:l.ZP.get("telegram代理配置认证参数,用户名与密码用英文冒号连接 user:password")},{label:"telegramBotApiHost",tip:l.ZP.get("telegram api自建的反向代理地址,默认tg官方api")}],dingtalkBot:[{label:"dingtalkBotToken",tip:l.ZP.get("钉钉机器人webhook token,例如:5a544165465465645d0f31dca676e7bd07415asdasd"),required:!0},{label:"dingtalkBotSecret",tip:l.ZP.get("密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串")}],weWorkBot:[{label:"weWorkBotKey",tip:l.ZP.get("企业微信机器人的webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa"),required:!0},{label:"weWorkOrigin",tip:l.ZP.get("企业微信代理地址")}],weWorkApp:[{label:"weWorkAppKey",tip:l.ZP.get("corpid、corpsecret、touser(注:多个成员ID使用|隔开)、agentid、消息类型(选填,不填默认文本消息类型) 注意用,号隔开(英文输入法的逗号),例如:wwcfrs,B-76WERQ,qinglong,1000001,2COat"),required:!0},{label:"weWorkOrigin",tip:l.ZP.get("企业微信代理地址")}],aibotk:[{label:"aibotkKey",tip:l.ZP.get("密钥key,智能微秘书个人中心获取apikey,申请地址:https://wechat.aibotk.com/signup?from=ql"),required:!0},{label:"aibotkType",tip:l.ZP.get("发送的目标,群组或者好友"),required:!0,placeholder:l.ZP.get("请输入要发送的目标"),items:[{value:"room",label:l.ZP.get("群聊")},{value:"contact",label:l.ZP.get("好友")}]},{label:"aibotkName",tip:l.ZP.get("要发送的用户昵称或群名,如果目标是群,需要填群名,如果目标是好友,需要填好友昵称"),required:!0}],iGot:[{label:"iGotPushKey",tip:l.ZP.get("iGot的信息推送key,例如:https://push.hellyw.com/XXXXXXXX"),required:!0}],pushPlus:[{label:"pushPlusToken",tip:l.ZP.get("微信扫码登录后一对一推送或一对多推送下面的token(您的Token),不提供PUSH_PLUS_USER则默认为一对一推送,参考 https://www.pushplus.plus/"),required:!0},{label:"pushPlusUser",tip:l.ZP.get("一对多推送的“群组编码”(一对多推送下面->您的群组(如无则创建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送)")}],lark:[{label:"larkKey",tip:l.ZP.get("飞书群组机器人:https://www.feishu.cn/hc/zh-CN/articles/360024984973"),required:!0}],email:[{label:"emailService",tip:l.ZP.get("邮箱服务名称,比如126、163、Gmail、QQ等,支持列表https://nodemailer.com/smtp/well-known/"),required:!0},{label:"emailUser",tip:l.ZP.get("邮箱地址"),required:!0},{label:"emailPass",tip:l.ZP.get("邮箱SMTP授权码"),required:!0}],pushMe:[{label:"pushMeKey",tip:l.ZP.get("PushMe的Key,https://push.i-i.me/"),required:!0}],webhook:[{label:"webhookMethod",tip:l.ZP.get("请求方法"),required:!0,items:[{value:"GET"},{value:"POST"},{value:"PUT"}]},{label:"webhookContentType",tip:l.ZP.get("请求头Content-Type"),required:!0,items:[{value:"application/json"},{value:"multipart/form-data"},{value:"application/x-www-form-urlencoded"}]},{label:"webhookUrl",tip:l.ZP.get("请求链接以http或者https开头。url或者body中必须包含$title,$content可选,对应api内容的位置"),required:!0,placeholder:"https://xxx.cn/api?content=$title\n"},{label:"webhookHeaders",tip:l.ZP.get("请求头格式Custom-Header1: Header1,多个换行分割"),placeholder:"Custom-Header1: Header1\nCustom-Header2: Header2"},{label:"webhookBody",tip:l.ZP.get("请求体格式key1: value1,多个换行分割。url或者body中必须包含$title,$content可选,对应api内容的位置"),placeholder:"key1: $title\nkey2: $content"}]},documentTitleMap:{"/login":l.ZP.get("登录"),"/initialization":l.ZP.get("初始化"),"/crontab":l.ZP.get("定时任务"),"/env":l.ZP.get("环境变量"),"/subscription":l.ZP.get("订阅管理"),"/config":l.ZP.get("配置文件"),"/script":l.ZP.get("脚本管理"),"/diff":l.ZP.get("对比工具"),"/log":l.ZP.get("日志管理"),"/setting":l.ZP.get("系统设置"),"/error":l.ZP.get("错误日志"),"/dependence":l.ZP.get("依赖管理")},dependenceTypes:["nodejs","python3","linux"]}},95176:function(e,t,a){a.d(t,{W:function(){return P}});var l=a(25359),r=a.n(l),i=a(49811),o=a.n(i),n=a(88265),s=a(9835),u=a(5558),g=a(98074),p=a(73669);s.ZP.config({duration:2});var c=Date.now(),d=p.Z.create({timeout:6e4,params:{t:c}}),h=["/api/user/login","/open/auth/token","/api/user/two-factor/login","/api/system","/api/user/init","/api/user/notification/init"];d.interceptors.request.use((function(e){var t=localStorage.getItem(u.Z.authKey);return t&&!h.includes(e.url)?(e.headers.Authorization="Bearer ".concat(t),e):e})),d.interceptors.response.use(function(){var e=o()(r()().mark((function e(t){var a,l,i;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.status,![502,504].includes(a)){e.next=5;break}g.history.push("/error"),e.next=18;break;case 5:if(401!==a){e.next=9;break}"/login"!==g.history.location.pathname&&(localStorage.removeItem(u.Z.authKey),g.history.push("/login")),e.next=18;break;case 9:return e.prev=9,200!==(l=t.data).code&&(i=l.message||l.data)&&s.ZP.error({content:i,style:{maxWidth:500,margin:"0 auto"}}),e.abrupt("return",l);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.data:e.response.statusText,a=e.response.status;[502,504].includes(a)?g.history.push("/error"):401===a?"/login"!==g.history.location.pathname&&(s.ZP.error(n.ZP.get("登录已过期,请重新登录")),localStorage.removeItem(u.Z.authKey),g.history.push("/login")):s.ZP.error({content:t,style:{maxWidth:500,margin:"0 auto"}})}else console.log(e.message);return Promise.reject(e)}));var P=d}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[4216],{947:function(e,t,a){a.r(t);var r=a(25359),l=a.n(r),i=a(49811),o=a.n(i),n=a(54306),s=a.n(n),u=a(88265),p=a(63313),g=a(67393),c=a(9835),P=a(84163),d=a(22159),h=a(95176),Z=a(5558),b=a(11527);t.default=function(e){var t=e.ids,a=e.handleCancel,r=e.visible,i=g.Z.useForm(),n=s()(i,1)[0],m=(0,p.useState)(!1),k=s()(m,2),v=k[0],f=k[1],y=function(){var e=o()(l()().mark((function e(r){var i,o;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f(!0),e.prev=1,e.next=4,h.W.put("".concat(Z.Z.apiPrefix,"envs/name"),{ids:t,name:r.name});case 4:i=e.sent,o=i.code,i.data,200===o&&(c.ZP.success(u.ZP.get("更新环境变量名称成功")),a()),f(!1),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),f(!1);case 14:case"end":return e.stop()}}),e,null,[[1,11]])})));return function(t){return e.apply(this,arguments)}}();return(0,p.useEffect)((function(){n.resetFields()}),[t,r]),(0,b.jsx)(P.Z,{title:u.ZP.get("修改环境变量名称"),open:r,forceRender:!0,centered:!0,maskClosable:!1,onOk:function(){n.validateFields().then((function(e){y(e)})).catch((function(e){console.log("Validate Failed:",e)}))},onCancel:function(){return a()},confirmLoading:v,children:(0,b.jsx)(g.Z,{form:n,layout:"vertical",name:"edit_name_modal",children:(0,b.jsx)(g.Z.Item,{name:"name",rules:[{required:!0,message:u.ZP.get("请输入新的环境变量名称")}],children:(0,b.jsx)(d.Z,{placeholder:u.ZP.get("请输入新的环境变量名称")})})})})}},5558:function(e,t,a){var r=a(88265),l=window.__ENV__QlBaseUrl||"/";t.Z={siteName:r.ZP.get("青龙"),apiPrefix:"".concat(l,"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:r.ZP.get("中文"),flag:"/china.svg"}],defaultLanguage:"en"},scopes:[{name:r.ZP.get("定时任务"),value:"crons"},{name:r.ZP.get("环境变量"),value:"envs"},{name:r.ZP.get("订阅管理"),value:"subscriptions"},{name:r.ZP.get("配置文件"),value:"configs"},{name:r.ZP.get("脚本管理"),value:"scripts"},{name:r.ZP.get("日志管理"),value:"logs"},{name:r.ZP.get("依赖管理"),value:"dependencies"},{name:r.ZP.get("系统信息"),value:"system"}],scopesMap:{crons:r.ZP.get("定时任务"),envs:r.ZP.get("环境变量"),subscriptions:r.ZP.get("订阅管理"),configs:r.ZP.get("配置文件"),scripts:r.ZP.get("脚本管理"),logs:r.ZP.get("日志管理"),dependencies:r.ZP.get("依赖管理"),system:r.ZP.get("系统信息")},notificationModes:[{value:"gotify",label:"Gotify"},{value:"goCqHttpBot",label:"GoCqHttpBot"},{value:"serverChan",label:r.ZP.get("Server酱")},{value:"pushDeer",label:"PushDeer"},{value:"bark",label:"Bark"},{value:"telegramBot",label:r.ZP.get("Telegram机器人")},{value:"dingtalkBot",label:r.ZP.get("钉钉机器人")},{value:"weWorkBot",label:r.ZP.get("企业微信机器人")},{value:"weWorkApp",label:r.ZP.get("企业微信应用")},{value:"aibotk",label:r.ZP.get("智能微秘书")},{value:"iGot",label:"IGot"},{value:"pushPlus",label:"PushPlus"},{value:"chat",label:r.ZP.get("群晖chat")},{value:"email",label:r.ZP.get("邮箱")},{value:"lark",label:r.ZP.get("飞书机器人")},{value:"pushMe",label:"PushMe"},{value:"webhook",label:r.ZP.get("自定义通知")},{value:"closed",label:r.ZP.get("已关闭")}],notificationModeMap:{gotify:[{label:"gotifyUrl",tip:r.ZP.get("gotify的url地址,例如 https://push.example.de:8080"),required:!0},{label:"gotifyToken",tip:r.ZP.get("gotify的消息应用token码"),required:!0},{label:"gotifyPriority",tip:r.ZP.get("推送消息的优先级")}],chat:[{label:"chatUrl",tip:r.ZP.get("chat的url地址"),required:!0},{label:"chatToken",tip:r.ZP.get("chat的token码"),required:!0}],goCqHttpBot:[{label:"goCqHttpBotUrl",tip:r.ZP.get("推送到个人QQ: http://127.0.0.1/send_private_msg,群:http://127.0.0.1/send_group_msg"),required:!0},{label:"goCqHttpBotToken",tip:r.ZP.get("访问密钥"),required:!0},{label:"goCqHttpBotQq",tip:r.ZP.get("如果GOBOT_URL设置 /send_private_msg 则需要填入 user_id=个人QQ 相反如果是 /send_group_msg 则需要填入 group_id=QQ群"),required:!0}],serverChan:[{label:"serverChanKey",tip:r.ZP.get("Server酱SENDKEY"),required:!0}],pushDeer:[{label:"pushDeerKey",tip:r.ZP.get("PushDeer的Key,https://github.com/easychen/pushdeer"),required:!0},{label:"pushDeerUrl",tip:r.ZP.get("PushDeer的自架API endpoint,默认是 https://api2.pushdeer.com/message/push")}],bark:[{label:"barkPush",tip:r.ZP.get("Bark的信息IP/设备码,例如:https://api.day.app/XXXXXXXX"),required:!0},{label:"barkIcon",tip:r.ZP.get("BARK推送图标,自定义推送图标 (需iOS15或以上才能显示)")},{label:"barkSound",tip:r.ZP.get("BARK推送铃声,铃声列表去APP查看复制填写")},{label:"barkGroup",tip:r.ZP.get("BARK推送消息的分组,默认为qinglong")}],telegramBot:[{label:"telegramBotToken",tip:r.ZP.get("telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw"),required:!0},{label:"telegramBotUserId",tip:r.ZP.get("telegram用户的id,例如:129xxx206"),required:!0},{label:"telegramBotProxyHost",tip:r.ZP.get("代理IP")},{label:"telegramBotProxyPort",tip:r.ZP.get("代理端口")},{label:"telegramBotProxyAuth",tip:r.ZP.get("telegram代理配置认证参数,用户名与密码用英文冒号连接 user:password")},{label:"telegramBotApiHost",tip:r.ZP.get("telegram api自建的反向代理地址,默认tg官方api")}],dingtalkBot:[{label:"dingtalkBotToken",tip:r.ZP.get("钉钉机器人webhook token,例如:5a544165465465645d0f31dca676e7bd07415asdasd"),required:!0},{label:"dingtalkBotSecret",tip:r.ZP.get("密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串")}],weWorkBot:[{label:"weWorkBotKey",tip:r.ZP.get("企业微信机器人的webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa"),required:!0},{label:"weWorkOrigin",tip:r.ZP.get("企业微信代理地址")}],weWorkApp:[{label:"weWorkAppKey",tip:r.ZP.get("corpid、corpsecret、touser(注:多个成员ID使用|隔开)、agentid、消息类型(选填,不填默认文本消息类型) 注意用,号隔开(英文输入法的逗号),例如:wwcfrs,B-76WERQ,qinglong,1000001,2COat"),required:!0},{label:"weWorkOrigin",tip:r.ZP.get("企业微信代理地址")}],aibotk:[{label:"aibotkKey",tip:r.ZP.get("密钥key,智能微秘书个人中心获取apikey,申请地址:https://wechat.aibotk.com/signup?from=ql"),required:!0},{label:"aibotkType",tip:r.ZP.get("发送的目标,群组或者好友"),required:!0,placeholder:r.ZP.get("请输入要发送的目标"),items:[{value:"room",label:r.ZP.get("群聊")},{value:"contact",label:r.ZP.get("好友")}]},{label:"aibotkName",tip:r.ZP.get("要发送的用户昵称或群名,如果目标是群,需要填群名,如果目标是好友,需要填好友昵称"),required:!0}],iGot:[{label:"iGotPushKey",tip:r.ZP.get("iGot的信息推送key,例如:https://push.hellyw.com/XXXXXXXX"),required:!0}],pushPlus:[{label:"pushPlusToken",tip:r.ZP.get("微信扫码登录后一对一推送或一对多推送下面的token(您的Token),不提供PUSH_PLUS_USER则默认为一对一推送,参考 https://www.pushplus.plus/"),required:!0},{label:"pushPlusUser",tip:r.ZP.get("一对多推送的“群组编码”(一对多推送下面->您的群组(如无则创建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送)")}],lark:[{label:"larkKey",tip:r.ZP.get("飞书群组机器人:https://www.feishu.cn/hc/zh-CN/articles/360024984973"),required:!0}],email:[{label:"emailService",tip:r.ZP.get("邮箱服务名称,比如126、163、Gmail、QQ等,支持列表https://nodemailer.com/smtp/well-known/"),required:!0},{label:"emailUser",tip:r.ZP.get("邮箱地址"),required:!0},{label:"emailPass",tip:r.ZP.get("邮箱SMTP授权码"),required:!0}],pushMe:[{label:"pushMeKey",tip:r.ZP.get("PushMe的Key,https://push.i-i.me/"),required:!0}],webhook:[{label:"webhookMethod",tip:r.ZP.get("请求方法"),required:!0,items:[{value:"GET"},{value:"POST"},{value:"PUT"}]},{label:"webhookContentType",tip:r.ZP.get("请求头Content-Type"),required:!0,items:[{value:"application/json"},{value:"multipart/form-data"},{value:"application/x-www-form-urlencoded"}]},{label:"webhookUrl",tip:r.ZP.get("请求链接以http或者https开头。url或者body中必须包含$title,$content可选,对应api内容的位置"),required:!0,placeholder:"https://xxx.cn/api?content=$title\n"},{label:"webhookHeaders",tip:r.ZP.get("请求头格式Custom-Header1: Header1,多个换行分割"),placeholder:"Custom-Header1: Header1\nCustom-Header2: Header2"},{label:"webhookBody",tip:r.ZP.get("请求体格式key1: value1,多个换行分割。url或者body中必须包含$title,$content可选,对应api内容的位置"),placeholder:"key1: $title\nkey2: $content"}]},documentTitleMap:{"/login":r.ZP.get("登录"),"/initialization":r.ZP.get("初始化"),"/crontab":r.ZP.get("定时任务"),"/env":r.ZP.get("环境变量"),"/subscription":r.ZP.get("订阅管理"),"/config":r.ZP.get("配置文件"),"/script":r.ZP.get("脚本管理"),"/diff":r.ZP.get("对比工具"),"/log":r.ZP.get("日志管理"),"/setting":r.ZP.get("系统设置"),"/error":r.ZP.get("错误日志"),"/dependence":r.ZP.get("依赖管理")},dependenceTypes:["nodejs","python3","linux"]}},95176:function(e,t,a){a.d(t,{W:function(){return h}});var r=a(25359),l=a.n(r),i=a(49811),o=a.n(i),n=a(88265),s=a(9835),u=a(5558),p=a(98074),g=a(73669);s.ZP.config({duration:2});var c=Date.now(),P=g.Z.create({timeout:6e4,params:{t:c}}),d=["/api/user/login","/open/auth/token","/api/user/two-factor/login","/api/system","/api/user/init","/api/user/notification/init"];P.interceptors.request.use((function(e){var t=localStorage.getItem(u.Z.authKey);return t&&!d.includes(e.url)?(e.headers.Authorization="Bearer ".concat(t),e):e})),P.interceptors.response.use(function(){var e=o()(l()().mark((function e(t){var a,r,i;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.status,![502,504].includes(a)){e.next=5;break}p.history.push("/error"),e.next=18;break;case 5:if(401!==a){e.next=9;break}"/login"!==p.history.location.pathname&&(localStorage.removeItem(u.Z.authKey),p.history.push("/login")),e.next=18;break;case 9:return e.prev=9,200!==(r=t.data).code&&(i=r.message||r.data)&&s.ZP.error({content:i,style:{maxWidth:500,margin:"0 auto"}}),e.abrupt("return",r);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.data:e.response.statusText,a=e.response.status;[502,504].includes(a)?p.history.push("/error"):401===a?"/login"!==p.history.location.pathname&&(s.ZP.error(n.ZP.get("登录已过期,请重新登录")),localStorage.removeItem(u.Z.authKey),p.history.push("/login")):s.ZP.error({content:t,style:{maxWidth:500,margin:"0 auto"}})}else console.log(e.message);return Promise.reject(e)}));var h=P}}]);