@whyour/qinglong 2.18.1 → 2.18.2-1

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 (129) hide show
  1. package/README-en.md +4 -127
  2. package/README.md +4 -125
  3. package/SECURITY.md +5 -0
  4. package/back.d.ts +9 -0
  5. package/package.json +6 -8
  6. package/sample/notify.js +5 -5
  7. package/sample/ql_sample.js +6 -0
  8. package/sample/ql_sample.py +6 -1
  9. package/shell/api.sh +4 -1
  10. package/shell/preload/client.js +45 -0
  11. package/shell/preload/client.py +113 -0
  12. package/shell/preload/sitecustomize.js +2 -0
  13. package/shell/preload/sitecustomize.py +2 -1
  14. package/shell/share.sh +15 -4
  15. package/shell/update.sh +2 -1
  16. package/static/build/api/log.js +1 -1
  17. package/static/build/app.js +0 -1
  18. package/static/build/config/index.js +0 -2
  19. package/static/build/config/util.js +8 -4
  20. package/static/build/data/env.js +1 -1
  21. package/static/build/loaders/db.js +0 -70
  22. package/static/build/loaders/express.js +2 -27
  23. package/static/build/loaders/initData.js +20 -12
  24. package/static/build/protos/api.js +1084 -0
  25. package/static/build/protos/cron.js +36 -27
  26. package/static/build/protos/health.js +12 -3
  27. package/static/build/schedule/api.js +140 -0
  28. package/static/build/schedule/index.js +26 -0
  29. package/static/build/services/env.js +1 -1
  30. package/static/build/services/notify.js +19 -34
  31. package/static/build/services/open.js +8 -7
  32. package/static/build/services/system.js +1 -1
  33. package/static/build/shared/pLimit.js +12 -1
  34. package/static/dist/2208.c1a40612.async.js +1 -0
  35. package/static/dist/{8528.3dffc548.async.js → 3127.2579e73a.async.js} +1 -1
  36. package/static/dist/{2237.4d3def87.async.js → 3191.f56b00f8.async.js} +1 -1
  37. package/static/dist/4402.49bbe98d.async.js +1 -0
  38. package/static/dist/{5312.5545b3ed.async.js → 5312.74b95311.async.js} +1 -1
  39. package/static/dist/{1149.33cb7e7a.async.js → 7253.4b9bf133.async.js} +1 -1
  40. package/static/dist/{872.10bd0974.async.js → 7508.a31662a3.async.js} +1 -1
  41. package/static/dist/{2081.d0d781b1.async.js → 7984.e6bb9378.async.js} +1 -1
  42. package/static/dist/8317.c44c1ebd.async.js +1 -0
  43. package/static/dist/874.ae8edb1a.async.js +1 -0
  44. package/static/dist/8826.37966028.async.js +1 -0
  45. package/static/dist/{4799.d5ca9f30.async.js → 9313.37acaf13.async.js} +1 -1
  46. package/static/dist/index.html +2 -2
  47. package/static/dist/layouts__index.c986408d.async.js +1 -0
  48. package/static/dist/preload_helper.6482f199.js +1 -0
  49. package/static/dist/src__pages__404.771168fc.async.js +1 -0
  50. package/static/dist/src__pages__config__index.de6dca30.async.js +1 -0
  51. package/static/dist/{src__pages__crontab__detail.6f7c3205.async.js → src__pages__crontab__detail.80d30a01.async.js} +1 -1
  52. package/static/dist/src__pages__crontab__index.9e38b6dc.async.js +1 -0
  53. package/static/dist/{src__pages__crontab__logModal.c88ea3b7.async.js → src__pages__crontab__logModal.6a345e8a.async.js} +1 -1
  54. package/static/dist/src__pages__crontab__modal.78b1e588.async.js +1 -0
  55. package/static/dist/{src__pages__crontab__type.5895ed02.async.js → src__pages__crontab__type.bde5cda4.async.js} +1 -1
  56. package/static/dist/src__pages__crontab__viewManageModal.4874669b.async.js +1 -0
  57. package/static/dist/src__pages__dependence__index.4a0af2b9.async.js +1 -0
  58. package/static/dist/src__pages__dependence__modal.e6696a7c.async.js +1 -0
  59. package/static/dist/{src__pages__dependence__type.bdac3725.async.js → src__pages__dependence__type.e48c5c88.async.js} +1 -1
  60. package/static/dist/src__pages__diff__index.a4176b58.async.js +1 -0
  61. package/static/dist/src__pages__env__editNameModal.02322e80.async.js +1 -0
  62. package/static/dist/src__pages__env__index.f3bfe0c7.async.js +1 -0
  63. package/static/dist/src__pages__env__modal.066399fd.async.js +1 -0
  64. package/static/dist/src__pages__error__index.656c9940.async.js +1 -0
  65. package/static/dist/src__pages__initialization__index.75484c39.async.js +1 -0
  66. package/static/dist/src__pages__log__index.8a782756.async.js +1 -0
  67. package/static/dist/src__pages__login__index.8a653852.async.js +1 -0
  68. package/static/dist/src__pages__script__editModal.e7bf71bd.async.js +1 -0
  69. package/static/dist/src__pages__script__editNameModal.c048343e.async.js +1 -0
  70. package/static/dist/src__pages__script__index.9d9099c1.async.js +1 -0
  71. package/static/dist/src__pages__script__renameModal.357c6c72.async.js +1 -0
  72. package/static/dist/src__pages__script__saveModal.61fcb1fe.async.js +1 -0
  73. package/static/dist/src__pages__script__setting.f2d78204.async.js +1 -0
  74. package/static/dist/{src__pages__setting__about.3a1a6f3b.async.js → src__pages__setting__about.3d3c019f.async.js} +1 -1
  75. package/static/dist/src__pages__setting__appModal.9eeaeee7.async.js +1 -0
  76. package/static/dist/{src__pages__setting__checkUpdate.0dfdaf7c.async.js → src__pages__setting__checkUpdate.04c00c9c.async.js} +1 -1
  77. package/static/dist/src__pages__setting__dependence.0dd0969b.async.js +1 -0
  78. package/static/dist/src__pages__setting__index.46a8e768.async.js +1 -0
  79. package/static/dist/{src__pages__setting__loginLog.fc87584a.async.js → src__pages__setting__loginLog.cea6056c.async.js} +1 -1
  80. package/static/dist/src__pages__setting__notification.b038afec.async.js +1 -0
  81. package/static/dist/{src__pages__setting__other.34ccb2e8.async.js → src__pages__setting__other.0d869d58.async.js} +1 -1
  82. package/static/dist/{src__pages__setting__progress.75143dca.async.js → src__pages__setting__progress.8823ac90.async.js} +1 -1
  83. package/static/dist/src__pages__setting__security.af57bd6a.async.js +1 -0
  84. package/static/dist/src__pages__setting__systemLog.501844bd.async.js +1 -0
  85. package/static/dist/src__pages__subscription__index.b43143e7.async.js +1 -0
  86. package/static/dist/{src__pages__subscription__logModal.b3c7c02c.async.js → src__pages__subscription__logModal.02c80eb3.async.js} +1 -1
  87. package/static/dist/src__pages__subscription__modal.a61ece75.async.js +1 -0
  88. package/static/dist/umi.e783bacd.js +1 -0
  89. package/version.yaml +6 -7
  90. package/static/build/loaders/sentry.js +0 -53
  91. package/static/dist/2634.a765cd37.async.js +0 -1
  92. package/static/dist/4642.9e24d86c.async.js +0 -1
  93. package/static/dist/4865.98e5a005.async.js +0 -1
  94. package/static/dist/852.15be2189.async.js +0 -1
  95. package/static/dist/9065.df8d5dcc.async.js +0 -1
  96. package/static/dist/layouts__index.c164d41f.async.js +0 -1
  97. package/static/dist/preload_helper.55b35ae0.js +0 -1
  98. package/static/dist/src__pages__404.6871535b.async.js +0 -1
  99. package/static/dist/src__pages__config__index.39b5f99f.async.js +0 -1
  100. package/static/dist/src__pages__crontab__index.55a8714d.async.js +0 -1
  101. package/static/dist/src__pages__crontab__modal.328fee41.async.js +0 -1
  102. package/static/dist/src__pages__crontab__viewManageModal.c71ebc5a.async.js +0 -1
  103. package/static/dist/src__pages__dependence__index.edec638b.async.js +0 -1
  104. package/static/dist/src__pages__dependence__modal.9fd1176b.async.js +0 -1
  105. package/static/dist/src__pages__diff__index.8ba53a1e.async.js +0 -1
  106. package/static/dist/src__pages__env__editNameModal.c35e96f9.async.js +0 -1
  107. package/static/dist/src__pages__env__index.c799138c.async.js +0 -1
  108. package/static/dist/src__pages__env__modal.3b0ca9a6.async.js +0 -1
  109. package/static/dist/src__pages__error__index.0221fcd9.async.js +0 -1
  110. package/static/dist/src__pages__initialization__index.346725d1.async.js +0 -1
  111. package/static/dist/src__pages__log__index.2fd615f2.async.js +0 -1
  112. package/static/dist/src__pages__login__index.1dd6e684.async.js +0 -1
  113. package/static/dist/src__pages__script__editModal.28caeb56.async.js +0 -1
  114. package/static/dist/src__pages__script__editNameModal.1155d34c.async.js +0 -1
  115. package/static/dist/src__pages__script__index.6a212c2d.async.js +0 -1
  116. package/static/dist/src__pages__script__renameModal.dabfccfd.async.js +0 -1
  117. package/static/dist/src__pages__script__saveModal.04d43882.async.js +0 -1
  118. package/static/dist/src__pages__script__setting.9d5ad53c.async.js +0 -1
  119. package/static/dist/src__pages__setting__appModal.7b3bff1e.async.js +0 -1
  120. package/static/dist/src__pages__setting__dependence.a9b7ed43.async.js +0 -1
  121. package/static/dist/src__pages__setting__index.ffa1cdd6.async.js +0 -1
  122. package/static/dist/src__pages__setting__notification.97b1d997.async.js +0 -1
  123. package/static/dist/src__pages__setting__security.c777fb87.async.js +0 -1
  124. package/static/dist/src__pages__setting__systemLog.63e9c69d.async.js +0 -1
  125. package/static/dist/src__pages__subscription__index.69a6de02.async.js +0 -1
  126. package/static/dist/src__pages__subscription__modal.aefaf070.async.js +0 -1
  127. package/static/dist/umi.fb3ed7a0.js +0 -1
  128. /package/static/dist/{2625.675b6a18.chunk.css → 1883.675b6a18.chunk.css} +0 -0
  129. /package/static/dist/{872.3fffed15.chunk.css → 7508.3fffed15.chunk.css} +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[2340,4402],{29774:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return h}});var o=n(72317),r=(n(75271),n(50691)),i=n(18015),a="container___nww32",s="right___o0xXT",l="title___DHxWh",c="desc___frhI6",u=n(16483),d=n.n(u),g=n(52676),p=r.Z.Link,h=function(e){var t=e.systemInfo;return(0,g.jsxs)("div",{className:a,children:[(0,g.jsx)("img",{alt:"logo",style:{width:140,marginRight:20},src:"https://qn.whyour.cn/logo.png"}),(0,g.jsxs)("div",{className:s,children:[(0,g.jsx)("span",{className:l,children:o.ZP.get("青龙")}),(0,g.jsx)("span",{className:c,children:o.ZP.get("支持python3、javascript、shell、typescript 的定时任务管理面板")}),(0,g.jsxs)(i.Z,{children:[(0,g.jsxs)(i.Z.Item,{label:o.ZP.get("版本"),span:3,children:["develop"===(null==t?void 0:t.branch)?o.ZP.get("开发版"):o.ZP.get("正式版")," ","v",t.version]}),(0,g.jsx)(i.Z.Item,{label:o.ZP.get("更新时间"),span:3,children:d()(1e3*t.publishTime).format("YYYY-MM-DD HH:mm")}),(0,g.jsx)(i.Z.Item,{label:o.ZP.get("更新日志"),span:3,children:(0,g.jsx)(p,{href:"https://qn.whyour.cn/version.yaml?t=".concat(Date.now()),target:"_blank",children:o.ZP.get("查看")})})]}),(0,g.jsxs)("div",{children:[(0,g.jsx)(p,{href:"https://github.com/whyour/qinglong",target:"_blank",style:{marginRight:15},children:"Github"}),(0,g.jsx)(p,{href:"https://t.me/jiao_long",target:"_blank",style:{marginRight:15},children:o.ZP.get("Telegram频道")}),(0,g.jsx)(p,{href:"https://github.com/whyour/qinglong/issues",target:"_blank",children:o.ZP.get("提交BUG")})]})]})]})}},92294:function(e,t,n){"use strict";n.r(t);var o=n(90228),r=n.n(o),i=n(26068),a=n.n(i),s=n(87999),l=n.n(s),c=n(48305),u=n.n(c),d=n(72317),g=n(75271),p=n(72338),h=n(61508),f=n(45520),m=n(17082),Z=n(35181),x=n(16314),P=n(3475),v=n(52676);t.default=function(e){var t=e.app,n=e.handleCancel,o=e.visible,i=p.Z.useForm(),s=u()(i,1)[0],c=(0,g.useState)(!1),y=u()(c,2),b=y[0],w=y[1],k=function(){var e=l()(r()().mark((function e(o){var i,s,l,c,u;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return w(!0),i=t?"put":"post",s=a()({},o),t&&(s.id=t.id),e.prev=4,e.next=7,x.W[i]("".concat(P.Z.apiPrefix,"apps"),s);case 7:l=e.sent,c=l.code,u=l.data,200===c&&(h.ZP.success(t?d.ZP.get("更新应用成功"):d.ZP.get("创建应用成功")),n(u)),w(!1),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),w(!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(){s.resetFields()}),[t,o]),(0,v.jsx)(f.Z,{title:t?d.ZP.get("编辑应用"):d.ZP.get("创建应用"),open:o,forceRender:!0,centered:!0,maskClosable:!1,onOk:function(){s.validateFields().then((function(e){k(e)})).catch((function(e){console.log("Validate Failed:",e)}))},onCancel:function(){return n()},confirmLoading:b,children:(0,v.jsxs)(p.Z,{form:s,layout:"vertical",name:"form_app_modal",initialValues:t,children:[(0,v.jsx)(p.Z.Item,{name:"name",label:d.ZP.get("名称"),rules:[{validator:function(e,t){return["system"].includes(t)?Promise.reject(new Error(d.ZP.get("名称不能为保留关键字"))):Promise.resolve()}}],children:(0,v.jsx)(m.Z,{placeholder:d.ZP.get("请输入应用名称")})}),(0,v.jsx)(p.Z.Item,{name:"scopes",label:d.ZP.get("权限"),rules:[{required:!0}],children:(0,v.jsx)(Z.Z,{mode:"multiple",placeholder:d.ZP.get("请选择模块权限"),allowClear:!0,style:{width:"100%"},children:P.Z.scopes.map((function(e){return(0,v.jsx)(Z.Z.Option,{value:e.value,children:e.name},e.value)}))})})]})})}},73236:function(e,t,n){"use strict";n.r(t);var o=n(48305),r=n.n(o),i=n(52076),a=n(3475),s=n(16314),l=n(65814),c=n(78060),u=n.n(c),d=n(32890),g=n(61508),p=n(45520),h=n(93481),f=n(75271),m=n(72317),Z=n(52676),x=d.Z.Countdown;t.default=function(e){var t=e.systemInfo,n=(0,f.useState)(!1),o=r()(n,2),c=o[0],d=o[1],P=(0,f.useState)(""),v=r()(P,2),y=v[0],b=v[1],w=(0,f.useRef)(),k=function(e){p.Z.confirm({width:500,title:m.ZP.get("更新"),content:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("div",{children:m.ZP.get("已经是最新版了!")}),(0,Z.jsxs)("div",{style:{fontSize:12,fontWeight:400,marginTop:5},children:[m.ZP.get("青龙")," ",e.lastVersion," ",m.ZP.get("是目前检测到的最新可用版本了。")]})]}),okText:m.ZP.get("重新下载"),onOk:function(){C(),s.W.put("".concat(a.Z.apiPrefix,"system/update")).then((function(e){})).catch((function(e){console.log(e)}))}})},j=function(e){var n=e.lastVersion,o=e.lastLog;p.Z.confirm({width:500,title:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("div",{children:m.ZP.get("更新可用")}),(0,Z.jsxs)("div",{style:{fontSize:12,fontWeight:400,marginTop:5},children:[m.ZP.get("新版本")," ",n," ",m.ZP.get("可用,你使用的版本为")," ",t.version,"。"]})]}),content:(0,Z.jsx)("pre",{children:(0,Z.jsx)(u(),{children:o})}),okText:m.ZP.get("下载更新"),cancelText:m.ZP.get("以后再说"),onOk:function(){C(),s.W.put("".concat(a.Z.apiPrefix,"system/update")).then((function(e){})).catch((function(e){console.log(e)}))}})},C=function(){b(""),w.current=p.Z.info({width:600,maskClosable:!1,closable:!1,keyboard:!1,okButtonProps:{disabled:!0},title:m.ZP.get("下载更新中..."),centered:!0,content:(0,Z.jsx)("pre",{children:(0,Z.jsx)(u(),{children:y})})})},S=function(e){s.W.put("".concat(a.Z.apiPrefix,"update/").concat(e)).then((function(e){g.ZP.success({content:(0,Z.jsxs)("span",{children:[m.ZP.get("系统将在"),(0,Z.jsx)(x,{className:"inline-countdown",format:"ss",value:Date.now()+3e4}),m.ZP.get("秒后自动刷新")]}),duration:30}),(0,i.o4)(),setTimeout((function(){window.location.reload()}),3e4)})).catch((function(e){console.log(e)}))};(0,f.useEffect)((function(){if(y){var e=y.includes("失败,请检查");w.current.update({maskClosable:e,closable:e,okButtonProps:{disabled:!e},content:(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("pre",{children:(0,Z.jsx)(u(),{children:y})}),(0,Z.jsx)("div",{id:"log-identifier",style:{paddingBottom:5}})]})})}}),[y]);var _=(0,f.useCallback)((function(e){var t=e.message;t.includes("失败,请检查")&&g.ZP.error(m.ZP.get("更新失败,请检查网络及日志或稍后再试")),setTimeout((function(){document.querySelector("#log-identifier").scrollIntoView({behavior:"smooth"})}),600),t.includes("更新包下载成功")&&setTimeout((function(){p.Z.confirm({width:600,maskClosable:!1,title:m.ZP.get("确认重启"),centered:!0,content:m.ZP.get("系统安装包下载成功,确认重启"),okText:m.ZP.get("重启"),onOk:function(){S("system")},onCancel:function(){w.current.update({maskClosable:!0,closable:!0,okButtonProps:{disabled:!1}})}})}),1e3),b((function(e){return"".concat(e).concat(t)}))}),[]);return(0,f.useEffect)((function(){var e=l.Z.getInstance();return e.subscribe("updateSystemVersion",_),function(){e.unsubscribe("updateSystemVersion",_)}}),[]),(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(h.Z,{type:"primary",onClick:function(){c||(d(!0),g.ZP.loading(m.ZP.get("检查更新中..."),0),s.W.put("".concat(a.Z.apiPrefix,"system/update-check")).then((function(e){var t=e.code,n=e.data;g.ZP.destroy(),200===t&&(n.hasNewVersion?j(n):k(n))})).catch((function(e){g.ZP.destroy(),console.log(e)})).finally((function(){d(!1)})))},children:m.ZP.get("检查更新")}),(0,Z.jsx)(h.Z,{type:"primary",onClick:function(){return S("reload")},style:{marginLeft:8},children:m.ZP.get("重新启动")})]})}},53626:function(e,t,n){"use strict";n.r(t);var o=n(26068),r=n.n(o),i=n(48305),a=n.n(i),s=n(72317),l=n(75271),c=n(72338),u=n(61508),d=n(17082),g=n(93481),p=n(3475),h=n(16314),f=(n(68251),n(78060)),m=n.n(f),Z=n(19334),x=n.n(Z),P=n(65814),v=n(52676),y={"dependence-proxy":"dependenceProxy","node-mirror":"nodeMirror","python-mirror":"pythonMirror","linux-mirror":"linuxMirror"};t.default=function(){var e=(0,l.useState)(),t=a()(e,2),n=t[0],o=t[1],i=c.Z.useForm(),f=a()(i,1)[0],Z=(0,l.useState)(""),b=a()(Z,2),w=b[0],k=b[1],j=(0,l.useState)(!1),C=a()(j,2),S=C[0],_=C[1],q=function(e){_(!0),k("in progress...\n"),h.W.put("".concat(p.Z.apiPrefix,"system/config/").concat(e),x()(n,y[e])).then((function(e){})).catch((function(){_(!1),k((function(e){return"".concat(e,"update mirror error")}))}))},I=function(e){_(!0),k(""),h.W.put("".concat(p.Z.apiPrefix,"system/config/").concat(e),x()(n,y[e])).then((function(e){var t=e.code;e.data;200===t&&u.ZP.success(s.ZP.get("更新成功"))})).catch((function(e){console.log(e)})).finally((function(){return _(!1)}))},B=function(e){var t=e.message;k((function(e){return"".concat(e).concat(t)})),(t.includes("update node mirror end")||t.includes("update linux mirror end"))&&_(!1)};return(0,l.useEffect)((function(){var e=P.Z.getInstance();return e.subscribe("updateNodeMirror",B),e.subscribe("updateLinuxMirror",B),function(){e.subscribe("updateNodeMirror",B),e.unsubscribe("updateLinuxMirror",B)}}),[]),(0,l.useEffect)((function(){h.W.get("".concat(p.Z.apiPrefix,"system/config")).then((function(e){var t=e.code,n=e.data;200===t&&n.info&&o(n.info)})).catch((function(e){console.log(e)}))}),[]),(0,v.jsxs)("div",{className:"dependence-config-wrapper",children:[(0,v.jsxs)(c.Z,{layout:"vertical",form:f,style:{flexShrink:0},children:[(0,v.jsx)(c.Z.Item,{label:s.ZP.get("代理"),name:"proxy",extra:s.ZP.get("代理与镜像源二选一即可"),tooltip:{title:s.ZP.get("代理地址, 支持HTTP(S)/SOCK5"),placement:"topLeft"},children:(0,v.jsxs)(d.Z.Group,{compact:!0,children:[(0,v.jsx)(d.Z,{placeholder:"http://1.1.1.1:8080",style:{width:250},value:null==n?void 0:n.dependenceProxy,onChange:function(e){o(r()(r()({},n),{},{dependenceProxy:e.target.value}))}}),(0,v.jsx)(g.Z,{type:"primary",loading:S,onClick:function(){I("dependence-proxy")},style:{width:100},children:s.ZP.get("确认")})]})}),(0,v.jsx)(c.Z.Item,{label:s.ZP.get("Node 软件包镜像源"),name:"node",tooltip:s.ZP.get("NPM 镜像源"),children:(0,v.jsxs)(d.Z.Group,{compact:!0,children:[(0,v.jsx)(d.Z,{style:{width:250},placeholder:"https://registry.npmmirror.com",value:null==n?void 0:n.nodeMirror,onChange:function(e){o(r()(r()({},n),{},{nodeMirror:e.target.value}))}}),(0,v.jsx)(g.Z,{type:"primary",loading:S,onClick:function(){q("node-mirror")},style:{width:100},children:s.ZP.get("确认")})]})}),(0,v.jsx)(c.Z.Item,{label:s.ZP.get("Python 软件包镜像源"),name:"python",tooltip:s.ZP.get("PyPI 镜像源"),children:(0,v.jsxs)(d.Z.Group,{compact:!0,children:[(0,v.jsx)(d.Z,{style:{width:250},placeholder:"https://pypi.doubanio.com/simple/",value:null==n?void 0:n.pythonMirror,onChange:function(e){o(r()(r()({},n),{},{pythonMirror:e.target.value}))}}),(0,v.jsx)(g.Z,{type:"primary",loading:S,onClick:function(){I("python-mirror")},style:{width:100},children:s.ZP.get("确认")})]})}),(0,v.jsx)(c.Z.Item,{label:s.ZP.get("Linux 软件包镜像源"),name:"linux",tooltip:s.ZP.get("debian linux 镜像源"),children:(0,v.jsxs)(d.Z.Group,{compact:!0,children:[(0,v.jsx)(d.Z,{style:{width:250},placeholder:"http://mirrors.aliyun.com",value:null==n?void 0:n.linuxMirror,onChange:function(e){o(r()(r()({},n),{},{linuxMirror:e.target.value}))}}),(0,v.jsx)(g.Z,{type:"primary",loading:S,onClick:function(){q("linux-mirror")},style:{width:100},children:s.ZP.get("确认")})]})})]}),(0,v.jsx)("pre",{style:{fontFamily:"Source Code Pro",zoom:.83,maxHeight:"100%",overflowY:"auto"},children:(0,v.jsx)(m(),{children:w})})]})}},42716:function(e,t,n){"use strict";n.r(t);var o=n(26068),r=n.n(o),i=n(15558),a=n.n(i),s=n(48305),l=n.n(s),c=n(72317),u=n(75271),d=n(50691),g=n(47667),p=n(63505),h=n(59816),f=n(45520),m=n(61508),Z=n(93481),x=n(46035),P=n(10948),v=n(3475),y=n(47508),b=n(16314),w=n(92294),k=n(28423),j=n(28068),C=n(88939),S=n(67303),_=n(59362),q=n(61160),I=n(85657),B=n(29774),T=n(98783),M=(n(68251),n(30502)),E=n(76433),W=n(53626),D=n(52676),F=d.Z.Text,A="demo"===window.__ENV__DeployEnv;t.default=function(){var e=(0,T.useOutletContext)(),t=e.headerStyle,n=e.isPhone,o=e.user,i=e.theme,s=e.reloadUser,d=e.reloadTheme,R=e.systemInfo,H=[{title:c.ZP.get("名称"),dataIndex:"name",key:"name"},{title:"Client ID",dataIndex:"client_id",key:"client_id",render:function(e,t){return(0,D.jsx)(F,{copyable:!0,children:t.client_id})}},{title:"Client Secret",dataIndex:"client_secret",key:"client_secret",render:function(e,t){return(0,D.jsx)(F,{copyable:{text:t.client_secret},children:"*******"})}},{title:c.ZP.get("权限"),dataIndex:"scopes",key:"scopes",width:500,render:function(e,t){return(0,D.jsx)("div",{style:{display:"flex",gap:4,flexWrap:"wrap"},children:t.scopes.map((function(e){return(0,D.jsx)(g.Z,{style:{marginRight:0},children:v.Z.scopesMap[e]},e)}))})}},{title:c.ZP.get("操作"),key:"action",render:function(e,t,o){var r=!n;return(0,D.jsxs)(p.Z,{size:"middle",style:{paddingLeft:8},children:[(0,D.jsx)(h.Z,{title:r?c.ZP.get("编辑"):"",children:(0,D.jsx)("a",{onClick:function(){return ye(t,o)},children:(0,D.jsx)(k.Z,{})})}),(0,D.jsx)(h.Z,{title:r?c.ZP.get("重置secret"):"",children:(0,D.jsx)("a",{onClick:function(){return we(t,o)},children:(0,D.jsx)(j.Z,{})})}),(0,D.jsx)(h.Z,{title:r?c.ZP.get("删除"):"",children:(0,D.jsx)("a",{onClick:function(){return be(t,o)},children:(0,D.jsx)(C.Z,{})})})]})}}],V=(0,u.useState)(!0),L=l()(V,2),O=L[0],U=L[1],z=(0,u.useState)([]),K=l()(z,2),N=K[0],G=K[1],Y=(0,u.useState)(!1),Q=l()(Y,2),X=Q[0],$=Q[1],J=(0,u.useState)(),ee=l()(J,2),te=ee[0],ne=ee[1],oe=(0,u.useState)("security"),re=l()(oe,2),ie=re[0],ae=re[1],se=(0,u.useState)([]),le=l()(se,2),ce=le[0],ue=le[1],de=(0,u.useState)(),ge=l()(de,2),pe=ge[0],he=ge[1],fe=(0,u.useRef)(null),me=(0,u.useState)(0),Ze=l()(me,2),xe=Ze[0],Pe=Ze[1];(0,M.Z)(fe,(function(e){var t,n=null===(t=e.target)||void 0===t?void 0:t.offsetHeight;n&&xe!==n-101&&Pe(n-101)}));var ve=function(){U(!0),b.W.get("".concat(v.Z.apiPrefix,"apps")).then((function(e){var t=e.code,n=e.data;200===t&&G(n)})).finally((function(){return U(!1)}))},ye=function(e,t){ne(e),$(!0)},be=function(e,t){f.Z.confirm({title:c.ZP.get("确认删除"),content:(0,D.jsxs)(D.Fragment,{children:[c.ZP.get("确认删除应用")," ",(0,D.jsx)(F,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",c.ZP.get("吗")]}),onOk:function(){b.W.delete("".concat(v.Z.apiPrefix,"apps"),{data:[e.id]}).then((function(e){var n=e.code;e.data;if(200===n){m.ZP.success(c.ZP.get("删除成功"));var o=a()(N);o.splice(t,1),G(o)}}))},onCancel:function(){console.log("Cancel")}})},we=function(e,t){f.Z.confirm({title:c.ZP.get("确认重置"),content:(0,D.jsxs)(D.Fragment,{children:[c.ZP.get("确认重置应用")," ",(0,D.jsx)(F,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",c.ZP.get("的Secret吗"),(0,D.jsx)("br",{}),(0,D.jsx)(F,{type:"secondary",children:c.ZP.get("重置Secret会让当前应用所有token失效")})]}),onOk:function(){b.W.put("".concat(v.Z.apiPrefix,"apps/").concat(e.id,"/reset-secret")).then((function(e){var t=e.code,n=e.data;200===t&&(m.ZP.success(c.ZP.get("重置成功")),ke(n))}))},onCancel:function(){console.log("Cancel")}})},ke=function(e){var t=N.findIndex((function(t){return t.id===e.id})),n=a()(N);-1===t?n.push(e):n.splice(t,1,r()({},e)),G(n)},je=function(){b.W.get("".concat(v.Z.apiPrefix,"user/notification")).then((function(e){var t=e.code,n=e.data;200===t&&he(n)})).catch((function(e){console.log(e)}))};return(0,u.useEffect)((function(){A&&ve()}),[]),(0,D.jsxs)(y.ZP,{className:"ql-container-wrapper ql-container-wrapper-has-tab ql-setting-container",title:c.ZP.get("系统设置"),header:{style:t},extra:"app"===ie?[(0,D.jsx)(Z.Z,{type:"primary",onClick:function(){return ne(null),void $(!0)},children:c.ZP.get("创建应用")},"2")]:[],children:[(0,D.jsx)("div",{ref:fe,style:{height:"100%"},children:(0,D.jsx)(x.Z,{style:{height:"100%"},defaultActiveKey:"security",size:"small",tabPosition:"top",onChange:function(e){ae(e),"app"===e?ve():"login"===e?b.W.get("".concat(v.Z.apiPrefix,"user/login-log")).then((function(e){var t=e.code,n=e.data;200===t&&ue(n)})).catch((function(e){console.log(e)})):"notification"===e&&je()},destroyInactiveTabPane:!0,items:[].concat(a()(A?[]:[{key:"security",label:c.ZP.get("安全设置"),children:(0,D.jsx)(S.default,{user:o,userChange:s})}]),[{key:"app",label:c.ZP.get("应用设置"),children:(0,D.jsx)(P.Z,{columns:H,pagination:!1,dataSource:N,rowKey:"id",size:"middle",scroll:{x:1e3,y:xe},loading:O})},{key:"notification",label:c.ZP.get("通知设置"),children:(0,D.jsx)(q.default,{data:pe})},{key:"syslog",label:c.ZP.get("系统日志"),children:(0,D.jsx)(E.default,{height:xe,theme:i})},{key:"login",label:c.ZP.get("登录日志"),children:(0,D.jsx)(_.default,{height:xe,data:ce})},{key:"dependence",label:c.ZP.get("依赖设置"),children:(0,D.jsx)(W.default,{})},{key:"other",label:c.ZP.get("其他设置"),children:(0,D.jsx)(I.default,{reloadTheme:d,systemInfo:R})},{key:"about",label:c.ZP.get("关于"),children:(0,D.jsx)(B.default,{systemInfo:R})}])})}),(0,D.jsx)(w.default,{visible:X,handleCancel:function(e){$(!1),e&&ke(e)},app:te})]})}},59362:function(e,t,n){"use strict";n.r(t);var o=n(72317),r=(n(75271),n(50691)),i=n(47667),a=n(10948),s=n(16483),l=n.n(s),c=n(52676),u=(r.Z.Text,r.Z.Link,function(e){return e[e["成功"]=0]="成功",e[e["失败"]=1]="失败",e}(u||{})),d=function(e){return e[e.success=0]="success",e[e.error=1]="error",e}(d||{}),g=[{title:o.ZP.get("序号"),width:50,render:function(e,t,n){return n+1}},{title:o.ZP.get("登录时间"),dataIndex:"timestamp",key:"timestamp",width:120,render:function(e,t){return l()(t.timestamp).format("YYYY-MM-DD HH:mm:ss")}},{title:o.ZP.get("登录地址"),dataIndex:"address",width:120,key:"address"},{title:o.ZP.get("登录IP"),dataIndex:"ip",width:100,key:"ip"},{title:o.ZP.get("登录设备"),dataIndex:"platform",key:"platform",width:80},{title:o.ZP.get("登录状态"),dataIndex:"status",key:"status",width:80,render:function(e,t){return(0,c.jsx)(i.Z,{color:d[t.status],style:{marginRight:0},children:o.ZP.get(u[t.status])})}}];t.default=function(e){var t=e.data,n=e.height;return(0,c.jsx)(c.Fragment,{children:(0,c.jsx)(a.Z,{columns:g,pagination:!1,dataSource:t,rowKey:"id",size:"middle",scroll:{x:1e3,y:n}})})}},61160:function(e,t,n){"use strict";n.r(t);var o=n(26068),r=n.n(o),i=n(48305),a=n.n(i),s=n(72317),l=n(75271),c=n(35181),u=n(72338),d=n(61508),g=n(17082),p=n(93481),h=n(16314),f=n(3475),m=n(52676),Z=c.Z.Option;t.default=function(e){var t=e.data,n=(0,l.useState)(!1),o=a()(n,2),i=o[0],x=o[1],P=(0,l.useState)("closed"),v=a()(P,2),y=v[0],b=v[1],w=(0,l.useState)([]),k=a()(w,2),j=k[0],C=k[1],S=u.Z.useForm(),_=a()(S,1)[0],q=function(e){b(e);var t=f.Z.notificationModeMap[e];C(t||[])};return(0,l.useEffect)((function(){t&&t.type&&(q(t.type),_.setFieldsValue(r()({},t)))}),[t]),(0,m.jsx)("div",{children:(0,m.jsxs)(u.Z,{onFinish:function(e){x(!0),"closed"==e.type&&(e.type=""),h.W.put("".concat(f.Z.apiPrefix,"user/notification"),e).then((function(t){var n=t.code;t.data;200===n&&d.ZP.success(e.type?s.ZP.get("通知发送成功"):s.ZP.get("通知关闭成功"))})).catch((function(e){console.log(e)})).finally((function(){return x(!1)}))},form:_,layout:"vertical",children:[(0,m.jsx)(u.Z.Item,{label:s.ZP.get("通知方式"),name:"type",rules:[{required:!0}],style:{maxWidth:400},initialValue:y,children:(0,m.jsx)(c.Z,{onChange:q,disabled:i,children:f.Z.notificationModes.map((function(e){return(0,m.jsx)(Z,{value:e.value,children:e.label},e.value)}))})}),j.map((function(e){return(0,m.jsx)(u.Z.Item,{label:e.label,name:e.label,extra:e.tip,rules:[{required:e.required}],style:{maxWidth:400},children:e.items?(0,m.jsx)(c.Z,{placeholder:e.placeholder||"".concat(s.ZP.get("请选择")," ").concat(e.label),disabled:i,children:e.items.map((function(e){return(0,m.jsx)(Z,{value:e.value,children:e.label||e.value},e.value)}))}):(0,m.jsx)(g.Z.TextArea,{disabled:i,autoSize:{minRows:1,maxRows:5},placeholder:e.placeholder||"".concat(s.ZP.get("请输入")," ").concat(e.label)})},e.label)})),(0,m.jsx)(p.Z,{type:"primary",htmlType:"submit",disabled:i,children:i?s.ZP.get("测试中..."):s.ZP.get("保存")})]})})}},85657:function(e,t,n){"use strict";n.r(t);var o=n(26068),r=n.n(o),i=n(48305),a=n.n(i),s=n(72317),l=n(75271),c=n(72338),u=n(61508),d=n(45520),g=n(94747),p=n(17082),h=n(56646),f=n(93481),m=n(35181),Z=n(6367),x=n(71571),P=n(3475),v=n(16314),y=n(73236),b=n(87105),w=(n(68251),n(79231)),k=n(84522),j=n(32916),C=n(19334),S=n.n(C),_=n(52076),q=n(52676),I={"log-remove-frequency":"logRemoveFrequency","cron-concurrency":"cronConcurrency"};t.default=function(e){var t=e.systemInfo,n=e.reloadTheme,o=localStorage.getItem("qinglong_dark_theme")||"auto",i=(0,l.useState)(),C=a()(i,2),B=C[0],T=C[1],M=c.Z.useForm(),E=a()(M,1)[0],W=(0,l.useState)(!1),D=a()(W,2),F=D[0],A=D[1],R=(0,j.default)(s.ZP.get("上传")),H=(0,j.default)(s.ZP.get("下载")),V=x||{},L=V.enable,O=V.disable,U=(V.exportGeneratedCSS,V.setFetchMethod),z=V.auto,K=function(e){v.W.put("".concat(P.Z.apiPrefix,"system/config/").concat(e),S()(B,I[e])).then((function(e){var t=e.code;e.data;200===t&&u.ZP.success(s.ZP.get("更新成功"))})).catch((function(e){console.log(e)}))};return(0,l.useEffect)((function(){v.W.get("".concat(P.Z.apiPrefix,"system/config")).then((function(e){var t=e.code,n=e.data;200===t&&n.info&&T(n.info)})).catch((function(e){console.log(e)}))}),[]),(0,q.jsxs)(c.Z,{layout:"vertical",form:E,children:[(0,q.jsx)(c.Z.Item,{label:s.ZP.get("主题"),name:"theme",initialValue:o,children:(0,q.jsxs)(g.ZP.Group,{onChange:function(e){var t=e.target.value;localStorage.setItem("qinglong_dark_theme",e.target.value),U(fetch),"dark"===t?L({}):"light"===t?O():z({}),n()},value:o,optionType:"button",buttonStyle:"solid",children:[(0,q.jsx)(g.ZP.Button,{value:"light",style:{width:70,textAlign:"center"},children:s.ZP.get("亮色")}),(0,q.jsx)(g.ZP.Button,{value:"dark",style:{width:66,textAlign:"center"},children:s.ZP.get("暗色")}),(0,q.jsx)(g.ZP.Button,{value:"auto",style:{width:129,textAlign:"center"},children:s.ZP.get("跟随系统")})]})}),(0,q.jsx)(c.Z.Item,{label:s.ZP.get("日志删除频率"),name:"frequency",tooltip:s.ZP.get("每x天自动删除x天以前的日志"),children:(0,q.jsxs)(p.Z.Group,{compact:!0,children:[(0,q.jsx)(h.Z,{addonBefore:s.ZP.get("每"),addonAfter:s.ZP.get("天"),style:{width:180},min:0,value:null==B?void 0:B.logRemoveFrequency,onChange:function(e){T(r()(r()({},B),{},{logRemoveFrequency:e}))}}),(0,q.jsx)(f.Z,{type:"primary",onClick:function(){K("log-remove-frequency")},style:{width:84},children:s.ZP.get("确认")})]})}),(0,q.jsx)(c.Z.Item,{label:s.ZP.get("定时任务并发数"),name:"frequency",children:(0,q.jsxs)(p.Z.Group,{compact:!0,children:[(0,q.jsx)(h.Z,{style:{width:180},min:1,value:null==B?void 0:B.cronConcurrency,onChange:function(e){T(r()(r()({},B),{},{cronConcurrency:e}))}}),(0,q.jsx)(f.Z,{type:"primary",onClick:function(){K("cron-concurrency")},style:{width:84},children:s.ZP.get("确认")})]})}),(0,q.jsx)(c.Z.Item,{label:s.ZP.get("语言"),name:"lang",children:(0,q.jsx)(m.Z,{defaultValue:localStorage.getItem("lang")||"",style:{width:264},onChange:function(e){localStorage.setItem("lang",e),setTimeout((function(){window.location.reload()}),500)},options:[{value:"",label:s.ZP.get("跟随系统")},{value:"zh",label:"简体中文"},{value:"en",label:"English"}]})}),(0,q.jsxs)(c.Z.Item,{label:s.ZP.get("数据备份还原"),name:"frequency",children:[(0,q.jsx)(f.Z,{type:"primary",onClick:function(){A(!0),v.W.put("".concat(P.Z.apiPrefix,"system/data/export"),{},{responseType:"blob",timeout:864e5,onDownloadProgress:function(e){e.progress&&H(parseFloat((100*e.progress).toFixed(1)))}}).then((function(e){(0,b.saveAs)(e,"data.tgz")})).catch((function(e){console.log(e)})).finally((function(){return A(!1)}))},loading:F,children:F?s.ZP.get("生成数据中..."):s.ZP.get("备份")}),(0,q.jsx)(Z.Z,{method:"put",showUploadList:!1,maxCount:1,action:"".concat(P.Z.apiPrefix,"system/data/import"),onChange:function(e){var t=e.file,n=e.event;null!=n&&n.percent&&R(Math.min(parseFloat(null==n?void 0:n.percent.toFixed(1)),99)),"done"===t.status&&(R(100),d.Z.confirm({width:600,maskClosable:!1,title:s.ZP.get("确认重启"),centered:!0,content:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)("div",{children:s.ZP.get("备份数据上传成功,确认覆盖数据")}),(0,q.jsxs)("div",{children:[s.ZP.get("如果恢复失败,可进入容器执行")," ql reload data"]})]}),okText:s.ZP.get("重启"),onOk:function(){v.W.put("".concat(P.Z.apiPrefix,"update/data")).then((function(){u.ZP.success({content:(0,q.jsxs)("span",{children:[s.ZP.get("系统将在"),(0,q.jsx)(k.Z,{className:"inline-countdown",format:"ss",value:Date.now()+3e4}),s.ZP.get("秒后自动刷新")]}),duration:30}),(0,_.o4)(),setTimeout((function(){window.location.reload()}),3e4)})).catch((function(e){console.log(e)}))}})),"error"===t.status&&u.ZP.error("上传失败")},name:"data",headers:{Authorization:"Bearer ".concat(localStorage.getItem(P.Z.authKey))},children:(0,q.jsx)(f.Z,{icon:(0,q.jsx)(w.Z,{}),style:{marginLeft:8},children:s.ZP.get("还原数据")})})]}),(0,q.jsx)(c.Z.Item,{label:s.ZP.get("检查更新"),name:"update",children:(0,q.jsx)(y.default,{systemInfo:t})})]})}},32916:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return c}});var o=n(72317),r=n(46016),i=n(45520),a=n(75271),s=n(52676),l=function(e){var t=e.percent;return(0,s.jsx)(r.Z,{style:{display:"flex",justifyContent:"center"},type:"circle",percent:t})};function c(e){var t=(0,a.useRef)();return function(n){t.current?(t.current.update({title:"".concat(e).concat(n>=100?o.ZP.get("成功"):o.ZP.get("中...")),content:(0,s.jsx)(l,{percent:n}),okButtonProps:{disabled:100!==n}}),100===n&&setTimeout((function(){var e;null===(e=t.current)||void 0===e||e.destroy(),t.current=null}))):t.current=i.Z.info({width:600,maskClosable:!1,title:"".concat(e).concat(n>=100?o.ZP.get("成功"):o.ZP.get("中...")),centered:!0,content:(0,s.jsx)(l,{percent:n}),okButtonProps:{disabled:!0}})}}},67303:function(e,t,n){"use strict";n.r(t);var o=n(48305),r=n.n(o),i=n(72317),a=n(75271),s=n(50691),l=n(61508),c=n(17082),u=n(93481),d=n(72338),g=n(70892),p=n(6367),h=n(16314),f=n(3475),m=n(98783),Z=n(63392),x=n.n(Z),P=n(34014),v=n(1371),y=n(79231),b=n(69822),w=(n(94095),n(52676)),k=s.Z.Title,j=s.Z.Link;t.default=function(e){var t=e.user,n=e.userChange,o=(0,a.useState)(!1),s=r()(o,2),Z=s[0],C=s[1],S=(0,a.useState)(),_=r()(S,2),q=_[0],I=_[1],B=(0,a.useState)(!1),T=r()(B,2),M=T[0],E=T[1],W=(0,a.useState)(),D=r()(W,2),F=D[0],A=D[1],R=(0,a.useState)(),H=r()(R,2),V=H[0],L=H[1],O=(0,a.useState)(),U=r()(O,2),z=U[0],K=U[1],N=function(){h.W.put("".concat(f.Z.apiPrefix,"user/two-factor/deactive")).then((function(e){var t=e.code,o=e.data;200===t&&o&&(I(!1),n())})).catch((function(e){console.log(e)}))},G=function(){h.W.get("".concat(f.Z.apiPrefix,"user/two-factor/init")).then((function(e){var t=e.code,n=e.data;200===t&&A(n)})).catch((function(e){console.log(e)}))};return(0,a.useEffect)((function(){I(t&&t.twoFactorActivated),K(t.avatar&&"".concat(f.Z.apiPrefix,"static/").concat(t.avatar))}),[t]),M?(0,w.jsx)(w.Fragment,{children:F?(0,w.jsxs)("div",{children:[(0,w.jsx)(k,{level:5,children:i.ZP.get("第一步")}),i.ZP.get("下载两步验证手机应用,比如 Google Authenticator 、"),(0,w.jsx)(j,{href:"https://www.microsoft.com/en-us/security/mobile-authenticator-app",target:"_blank",children:"Microsoft Authenticator"}),"、",(0,w.jsx)(j,{href:"https://authy.com/download/",target:"_blank",children:"Authy"}),"、",(0,w.jsx)(j,{href:"https://support.1password.com/one-time-passwords/",target:"_blank",children:"1Password"}),"、",(0,w.jsx)(j,{href:"https://support.logmeininc.com/lastpass/help/lastpass-authenticator-lp030014",target:"_blank",children:"LastPass Authenticator"}),(0,w.jsx)(k,{style:{marginTop:5},level:5,children:i.ZP.get("第二步")}),i.ZP.get("使用手机应用扫描二维码,或者输入秘钥")," ",null==F?void 0:F.secret,(0,w.jsx)("div",{style:{marginTop:10},children:(0,w.jsx)(x(),{style:{border:"1px solid #21262d",borderRadius:6},includeMargin:!0,size:187,value:null==F?void 0:F.url})}),(0,w.jsx)(k,{style:{marginTop:5},level:5,children:i.ZP.get("第三步")}),i.ZP.get("输入手机应用上的6位数字"),(0,w.jsx)(c.Z,{style:{margin:"10px 0 10px 0",display:"block",maxWidth:200},value:V,onChange:function(e){return L(e.target.value)},placeholder:"123456"}),(0,w.jsx)(u.Z,{type:"primary",loading:Z,onClick:function(){C(!0),h.W.put("".concat(f.Z.apiPrefix,"user/two-factor/active"),{code:V}).then((function(e){var t=e.code,o=e.data;200===t&&(o?(l.ZP.success(i.ZP.get("激活成功")),E(!1),I(!0),n()):l.ZP.success(i.ZP.get("验证失败")))})).catch((function(e){console.log(e)})).finally((function(){return C(!1)}))},children:i.ZP.get("完成设置")})]}):(0,w.jsx)(P.Z,{})}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)("div",{style:{fontSize:18,borderBottom:"1px solid #f0f0f0",marginBottom:8,paddingBottom:4},children:i.ZP.get("修改用户名密码")}),(0,w.jsxs)(d.Z,{onFinish:function(e){h.W.put("".concat(f.Z.apiPrefix,"user"),{username:e.username,password:e.password}).then((function(e){var t=e.code;e.data;200===t&&(localStorage.removeItem(f.Z.authKey),m.history.push("/login"))})).catch((function(e){console.log(e)}))},layout:"vertical",children:[(0,w.jsx)(d.Z.Item,{label:i.ZP.get("用户名"),name:"username",rules:[{required:!0}],hasFeedback:!0,style:{maxWidth:300},children:(0,w.jsx)(c.Z,{autoComplete:"username",placeholder:i.ZP.get("用户名")})}),(0,w.jsx)(d.Z.Item,{label:i.ZP.get("密码"),name:"password",rules:[{required:!0},{pattern:/^(?!admin$).*$/,message:i.ZP.get("密码不能为admin")}],hasFeedback:!0,style:{maxWidth:300},children:(0,w.jsx)(c.Z,{type:"password",autoComplete:"current-password",placeholder:i.ZP.get("密码")})}),(0,w.jsx)(u.Z,{type:"primary",htmlType:"submit",children:i.ZP.get("保存")})]}),(0,w.jsx)("div",{style:{fontSize:18,borderBottom:"1px solid #f0f0f0",marginBottom:8,paddingBottom:4,marginTop:16},children:i.ZP.get("两步验证")}),(0,w.jsx)(u.Z,{type:"primary",danger:q,onClick:function(){q?N():(G(),E(!0))},children:q?i.ZP.get("禁用"):i.ZP.get("启用")}),(0,w.jsx)("div",{style:{fontSize:18,borderBottom:"1px solid #f0f0f0",marginBottom:8,paddingBottom:4,marginTop:16},children:i.ZP.get("头像")}),(0,w.jsx)(g.C,{size:128,shape:"square",icon:(0,w.jsx)(v.Z,{}),src:z}),(0,w.jsx)(b.Z,{rotationSlider:!0,children:(0,w.jsx)(p.Z,{method:"put",showUploadList:!1,maxCount:1,action:"".concat(f.Z.apiPrefix,"user/avatar"),onChange:function(e){e.file&&e.file.response&&(K("".concat(f.Z.apiPrefix,"static/").concat(e.file.response.data)),n())},name:"avatar",headers:{Authorization:"Bearer ".concat(localStorage.getItem(f.Z.authKey))},children:(0,w.jsx)(u.Z,{icon:(0,w.jsx)(y.Z,{}),style:{marginLeft:8},children:i.ZP.get("更换头像")})})})]})}},76433:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return N}});var o=n(90228),r=n.n(o),i=n(87999),a=n.n(i),s=n(48305),l=n.n(s),c=n(72317),u=n(75271),d=n(71742),g=n(19116),p=n(61508),h=n(93481),f=n(20553),m=n(98705),Z=n(54075),x=n(2727),P=n(16314),v=n(3475),y=n(31352),b=n(11333),w=n.n(b),k=n(25298),j=n.n(k),C=n(17069),S=n.n(C),_=n(82092),q=n.n(_),I=n(5174),B=n(80403),T=/\[\ue6f5info\]/g,M=/\[\ue67fdebug\]/g,E=/\[\ue880warn\]/g,W=/\[\ue602error\]/g,D="system-log-info",F="system-warn-info",A="system-error-info",R="system-debug-info",H=I.lg.fromClass(function(){function e(t){j()(this,e),q()(this,"decorations",void 0),this.decorations=this.getDecorations(t)}return S()(e,[{key:"update",value:function(e){e.docChanged&&(this.decorations=this.getDecorations(e.view))}},{key:"getDecorations",value:function(e){for(var t,n=new B.f_,o=e.state.doc.toString();null!==(t=T.exec(o));){var r=I.p.mark({class:D});n.add(t.index,t.index+t[0].length,r)}return n.finish()}}]),e}(),{decorations:function(e){return e.decorations}}),V=I.lg.fromClass(function(){function e(t){j()(this,e),q()(this,"decorations",void 0),this.decorations=this.getDecorations(t)}return S()(e,[{key:"update",value:function(e){e.docChanged&&(this.decorations=this.getDecorations(e.view))}},{key:"getDecorations",value:function(e){for(var t,n=new B.f_,o=e.state.doc.toString();null!==(t=E.exec(o));){var r=I.p.mark({class:F});n.add(t.index,t.index+t[0].length,r)}return n.finish()}}]),e}(),{decorations:function(e){return e.decorations}}),L=I.lg.fromClass(function(){function e(t){j()(this,e),q()(this,"decorations",void 0),this.decorations=this.getDecorations(t)}return S()(e,[{key:"update",value:function(e){e.docChanged&&(this.decorations=this.getDecorations(e.view))}},{key:"getDecorations",value:function(e){for(var t,n=new B.f_,o=e.state.doc.toString();null!==(t=M.exec(o));){var r=I.p.mark({class:R});n.add(t.index,t.index+t[0].length,r)}return n.finish()}}]),e}(),{decorations:function(e){return e.decorations}}),O=I.lg.fromClass(function(){function e(t){j()(this,e),q()(this,"decorations",void 0),this.decorations=this.getDecorations(t)}return S()(e,[{key:"update",value:function(e){e.docChanged&&(this.decorations=this.getDecorations(e.view))}},{key:"getDecorations",value:function(e){for(var t,n=new B.f_,o=e.state.doc.toString();null!==(t=W.exec(o));){var r=I.p.mark({class:A});n.add(t.index,t.index+t[0].length,r)}return n.finish()}}]),e}(),{decorations:function(e){return e.decorations}}),U=I.tk.baseTheme({".system-log-info":{color:"#2196F3"},".system-warn-info":{color:"#FFB827"},".system-error-info":{color:"#FA5151"},".system-debug-info":{color:"#009A29"}}),z=n(52676),K=g.Z.RangePicker,N=function(e){var t=e.height,n=e.theme,o=(0,u.useRef)(null),i=(0,u.useRef)(),s=(0,u.useState)(["",""]),g=l()(s,2),b=g[0],k=g[1],j=(0,u.useState)(""),C=l()(j,2),S=C[0],_=C[1],q=(0,y.Z)((function(){return P.W.get("".concat(v.Z.apiPrefix,"system/log?startTime=").concat(b[0],"&endTime=").concat(b[1]),{responseType:"blob"})}),{refreshDeps:[b],onSuccess:function(e){return a()(r()().mark((function t(){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=_,t.next=3,e.text();case 3:t.t1=t.sent,(0,t.t0)(t.t1);case 5:case"end":return t.stop()}}),t)})))()}}),I=q.loading,B=q.refresh,T=function(e){o.current.scrollDOM.scrollTo({top:"start"===e?0:o.current.scrollDOM.scrollHeight})};return(0,z.jsxs)("div",{style:{position:"relative"},children:[(0,z.jsxs)("div",{children:[(0,z.jsx)(K,{style:{marginBottom:12,marginRight:12},disabledDate:function(e){return e>w()()||e<w()().subtract(7,"days")},defaultValue:[w()(),w()()],onOpenChange:function(e){i.current=!!e&&["",""]},onCalendarChange:function(e,t,n){var o=n.range;i.current&&"boolean"!=typeof i.current&&("start"===o&&(i.current[0]=t[0]),"end"===o&&(i.current[1]=t[1]),i.current[0]&&i.current[1]&&k(t))}}),(0,z.jsx)(h.Z,{onClick:function(){P.W.delete("".concat(v.Z.apiPrefix,"system/log")).then((function(e){p.ZP.success("删除成功"),B()}))},children:c.ZP.get("清空日志")})]}),S?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(d.ZP,{maxHeight:"".concat(t,"px"),value:S,onCreateEditor:function(e){o.current=e},extensions:[L,O,H,V,U],readOnly:!0,theme:n.includes("dark")?"dark":"light"}),(0,z.jsxs)("div",{style:{position:"absolute",bottom:20,right:20,display:"flex",flexDirection:"column",gap:10},children:[(0,z.jsx)(h.Z,{size:"small",icon:(0,z.jsx)(Z.Z,{}),onClick:function(){T("start")}}),(0,z.jsx)(h.Z,{size:"small",icon:(0,z.jsx)(x.Z,{}),onClick:function(){T("end")}})]})]}):I?(0,z.jsx)(f.Z,{}):(0,z.jsx)(m.Z,{image:m.Z.PRESENTED_IMAGE_SIMPLE})]})}},3475:function(e,t,n){"use strict";var o=n(72317),r=window.__ENV__QlBaseUrl||"/";t.Z={siteName:o.ZP.get("青龙"),baseUrl:r,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:o.ZP.get("中文"),flag:"/china.svg"}],defaultLanguage:"en"},scopes:[{name:o.ZP.get("定时任务"),value:"crons"},{name:o.ZP.get("环境变量"),value:"envs"},{name:o.ZP.get("订阅管理"),value:"subscriptions"},{name:o.ZP.get("配置文件"),value:"configs"},{name:o.ZP.get("脚本管理"),value:"scripts"},{name:o.ZP.get("日志管理"),value:"logs"},{name:o.ZP.get("依赖管理"),value:"dependencies"},{name:o.ZP.get("系统信息"),value:"system"}],scopesMap:{crons:o.ZP.get("定时任务"),envs:o.ZP.get("环境变量"),subscriptions:o.ZP.get("订阅管理"),configs:o.ZP.get("配置文件"),scripts:o.ZP.get("脚本管理"),logs:o.ZP.get("日志管理"),dependencies:o.ZP.get("依赖管理"),system:o.ZP.get("系统信息")},notificationModes:[{value:"gotify",label:"Gotify"},{value:"ntfy",label:"Ntfy"},{value:"goCqHttpBot",label:"GoCqHttpBot"},{value:"serverChan",label:o.ZP.get("Server酱")},{value:"pushDeer",label:"PushDeer"},{value:"bark",label:"Bark"},{value:"telegramBot",label:o.ZP.get("Telegram机器人")},{value:"dingtalkBot",label:o.ZP.get("钉钉机器人")},{value:"weWorkBot",label:o.ZP.get("企业微信机器人")},{value:"weWorkApp",label:o.ZP.get("企业微信应用")},{value:"aibotk",label:o.ZP.get("智能微秘书")},{value:"iGot",label:"IGot"},{value:"pushPlus",label:"PushPlus"},{value:"wePlusBot",label:o.ZP.get("微加机器人")},{value:"wxPusherBot",label:"wxPusher"},{value:"chat",label:o.ZP.get("群晖chat")},{value:"email",label:o.ZP.get("邮箱")},{value:"lark",label:o.ZP.get("飞书机器人")},{value:"pushMe",label:"PushMe"},{value:"chronocat",label:"Chronocat"},{value:"webhook",label:o.ZP.get("自定义通知")},{value:"closed",label:o.ZP.get("已关闭")}],notificationModeMap:{gotify:[{label:"gotifyUrl",tip:o.ZP.get("gotify的url地址,例如 https://push.example.de:8080"),required:!0},{label:"gotifyToken",tip:o.ZP.get("gotify的消息应用token码"),required:!0},{label:"gotifyPriority",tip:o.ZP.get("推送消息的优先级")}],ntfy:[{label:"ntfyUrl",tip:o.ZP.get("ntfy的url地址,例如 https://ntfy.sh"),required:!0},{label:"ntfyTopic",tip:o.ZP.get("ntfy的消息应用topic"),required:!0},{label:"ntfyPriority",tip:o.ZP.get("推送消息的优先级")}],chat:[{label:"chatUrl",tip:o.ZP.get("chat的url地址"),required:!0},{label:"chatToken",tip:o.ZP.get("chat的token码"),required:!0}],goCqHttpBot:[{label:"goCqHttpBotUrl",tip:o.ZP.get("推送到个人QQ: http://127.0.0.1/send_private_msg,群:http://127.0.0.1/send_group_msg"),required:!0},{label:"goCqHttpBotToken",tip:o.ZP.get("访问密钥"),required:!0},{label:"goCqHttpBotQq",tip:o.ZP.get("如果GOBOT_URL设置 /send_private_msg 则需要填入 user_id=个人QQ 相反如果是 /send_group_msg 则需要填入 group_id=QQ群"),required:!0}],serverChan:[{label:"serverChanKey",tip:o.ZP.get("Server酱SENDKEY"),required:!0}],pushDeer:[{label:"pushDeerKey",tip:o.ZP.get("PushDeer的Key,https://github.com/easychen/pushdeer"),required:!0},{label:"pushDeerUrl",tip:o.ZP.get("PushDeer的自架API endpoint,默认是 https://api2.pushdeer.com/message/push")}],bark:[{label:"barkPush",tip:o.ZP.get("Bark的信息IP/设备码,例如:https://api.day.app/XXXXXXXX"),required:!0},{label:"barkIcon",tip:o.ZP.get("BARK推送图标,自定义推送图标 (需iOS15或以上才能显示)")},{label:"barkSound",tip:o.ZP.get("BARK推送铃声,铃声列表去APP查看复制填写")},{label:"barkGroup",tip:o.ZP.get("BARK推送消息的分组,默认为qinglong")},{label:"barkLevel",tip:o.ZP.get("BARK推送消息的时效性,默认为active")},{label:"barkUrl",tip:o.ZP.get("BARK推送消息的跳转URL")},{label:"barkArchive",tip:o.ZP.get("BARK是否保存推送消息")}],telegramBot:[{label:"telegramBotToken",tip:o.ZP.get("telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw"),required:!0},{label:"telegramBotUserId",tip:o.ZP.get("telegram用户的id,例如:129xxx206"),required:!0},{label:"telegramBotProxyHost",tip:o.ZP.get("代理IP")},{label:"telegramBotProxyPort",tip:o.ZP.get("代理端口")},{label:"telegramBotProxyAuth",tip:o.ZP.get("telegram代理配置认证参数,用户名与密码用英文冒号连接 user:password")},{label:"telegramBotApiHost",tip:o.ZP.get("telegram api自建的反向代理地址,默认tg官方api")}],dingtalkBot:[{label:"dingtalkBotToken",tip:o.ZP.get("钉钉机器人webhook token,例如:5a544165465465645d0f31dca676e7bd07415asdasd"),required:!0},{label:"dingtalkBotSecret",tip:o.ZP.get("密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串")}],weWorkBot:[{label:"weWorkBotKey",tip:o.ZP.get("企业微信机器人的webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa"),required:!0},{label:"weWorkOrigin",tip:o.ZP.get("企业微信代理地址")}],weWorkApp:[{label:"weWorkAppKey",tip:o.ZP.get("corpid、corpsecret、touser(注:多个成员ID使用|隔开)、agentid、消息类型(选填,不填默认文本消息类型) 注意用,号隔开(英文输入法的逗号),例如:wwcfrs,B-76WERQ,qinglong,1000001,2COat"),required:!0},{label:"weWorkOrigin",tip:o.ZP.get("企业微信代理地址")}],aibotk:[{label:"aibotkKey",tip:o.ZP.get("密钥key,智能微秘书个人中心获取apikey,申请地址:https://wechat.aibotk.com/signup?from=ql"),required:!0},{label:"aibotkType",tip:o.ZP.get("发送的目标,群组或者好友"),required:!0,placeholder:o.ZP.get("请输入要发送的目标"),items:[{value:"room",label:o.ZP.get("群聊")},{value:"contact",label:o.ZP.get("好友")}]},{label:"aibotkName",tip:o.ZP.get("要发送的用户昵称或群名,如果目标是群,需要填群名,如果目标是好友,需要填好友昵称"),required:!0}],iGot:[{label:"iGotPushKey",tip:o.ZP.get("iGot的信息推送key,例如:https://push.hellyw.com/XXXXXXXX"),required:!0}],pushPlus:[{label:"pushPlusToken",tip:o.ZP.get("微信扫码登录后一对一推送或一对多推送下面的token(您的Token),不提供PUSH_PLUS_USER则默认为一对一推送,参考 https://www.pushplus.plus/"),required:!0},{label:"pushPlusUser",tip:o.ZP.get("一对多推送的“群组编码”(一对多推送下面->您的群组(如无则创建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送)")},{label:"pushplusTemplate",tip:o.ZP.get("发送模板")},{label:"pushplusChannel",tip:o.ZP.get("发送渠道")},{label:"pushplusWebhook",tip:o.ZP.get("webhook编码")},{label:"pushplusCallbackUrl",tip:o.ZP.get("发送结果回调地址")},{label:"pushplusTo",tip:o.ZP.get("好友令牌")}],wePlusBot:[{label:"wePlusBotToken",tip:o.ZP.get("用户令牌,扫描登录后 我的—>设置->令牌 中获取,参考 https://www.weplusbot.com/"),required:!0},{label:"wePlusBotReceiver",tip:o.ZP.get("消息接收人")},{label:"wePlusBotVersion",tip:o.ZP.get("调用版本;专业版填写pro,个人版填写personal,为空默认使用专业版")}],wxPusherBot:[{label:"wxPusherBotAppToken",tip:o.ZP.get("wxPusherBot的appToken"),required:!0},{label:"wxPusherBotTopicIds",tip:o.ZP.get("wxPusherBot的topicIds"),required:!1},{label:"wxPusherBotUids",tip:o.ZP.get("wxPusherBot的uids"),required:!1}],lark:[{label:"larkKey",tip:o.ZP.get("飞书群组机器人:https://www.feishu.cn/hc/zh-CN/articles/360024984973"),required:!0}],email:[{label:"emailService",tip:o.ZP.get("邮箱服务名称,比如126、163、Gmail、QQ等,支持列表https://github.com/nodemailer/nodemailer/blob/master/lib/well-known/services.json"),required:!0},{label:"emailUser",tip:o.ZP.get("邮箱地址"),required:!0},{label:"emailPass",tip:o.ZP.get("SMTP 登录密码,也可能为特殊口令,视具体邮件服务商说明而定"),required:!0}],pushMe:[{label:"pushMeKey",tip:o.ZP.get("PushMe的Key,https://push.i-i.me/"),required:!0},{label:"pushMeUrl",tip:o.ZP.get("自建的PushMeServer消息接口地址,例如:http://127.0.0.1:3010,不填则使用官方消息接口"),required:!1}],chronocat:[{label:"chronocatURL",tip:o.ZP.get("Chronocat Red 服务的连接地址 https://chronocat.vercel.app/install/docker/official/"),required:!0},{label:"chronocatQQ",tip:o.ZP.get("个人:user_id=个人QQ 群则填入group_id=QQ群 多个用英文;隔开同时支持个人和群 如:user_id=xxx;group_id=xxxx;group_id=xxxxx"),required:!0},{label:"chronocatToken",tip:o.ZP.get("docker安装在持久化config目录下的chronocat.yml文件可找到"),required:!0}],webhook:[{label:"webhookMethod",tip:o.ZP.get("请求方法"),required:!0,items:[{value:"GET"},{value:"POST"},{value:"PUT"}]},{label:"webhookContentType",tip:o.ZP.get("请求头Content-Type"),required:!0,items:[{value:"text/plain"},{value:"application/json"},{value:"multipart/form-data"},{value:"application/x-www-form-urlencoded"}]},{label:"webhookUrl",tip:o.ZP.get("请求链接以http或者https开头。url或者body中必须包含$title,$content可选,对应api内容的位置"),required:!0,placeholder:"https://xxx.cn/api?content=$title\n"},{label:"webhookHeaders",tip:o.ZP.get("请求头格式Custom-Header1: Header1,多个换行分割"),placeholder:"Custom-Header1: Header1\nCustom-Header2: Header2"},{label:"webhookBody",tip:o.ZP.get("请求体格式key1: value1,多个换行分割。url或者body中必须包含$title,$content可选,对应api内容的位置"),placeholder:"key1: $title\nkey2: $content"}]},documentTitleMap:{"/login":o.ZP.get("登录"),"/initialization":o.ZP.get("初始化"),"/crontab":o.ZP.get("定时任务"),"/env":o.ZP.get("环境变量"),"/subscription":o.ZP.get("订阅管理"),"/config":o.ZP.get("配置文件"),"/script":o.ZP.get("脚本管理"),"/diff":o.ZP.get("对比工具"),"/log":o.ZP.get("日志管理"),"/setting":o.ZP.get("系统设置"),"/error":o.ZP.get("错误日志"),"/dependence":o.ZP.get("依赖管理")},dependenceTypes:["nodejs","python3","linux"]}},16314:function(e,t,n){"use strict";n.d(t,{W:function(){return Z}});var o=n(90228),r=n.n(o),i=n(87999),a=n.n(i),s=n(72317),l=n(61508),c=n(33839),u=n(3475),d=n(98783),g=n(69313),p=n(52676);l.ZP.config({duration:2});var h=Date.now(),f=g.Z.create({timeout:6e4,params:{t:h}}),m=["/api/user/login","/open/auth/token","/api/user/two-factor/login","/api/system","/api/user/init","/api/user/notification/init"];f.interceptors.request.use((function(e){var t=localStorage.getItem(u.Z.authKey);return t&&!m.includes(e.url)?(e.headers.Authorization="Bearer ".concat(t),e):e})),f.interceptors.response.use(function(){var e=a()(r()().mark((function e(t){var n,o,i;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.status,![502,504].includes(n)){e.next=5;break}d.history.push("/error"),e.next=18;break;case 5:if(401!==n){e.next=9;break}"/login"!==d.history.location.pathname&&(localStorage.removeItem(u.Z.authKey),d.history.push("/login")),e.next=18;break;case 9:return e.prev=9,200!==(o=t.data).code&&(i=o.message||o.data)&&c.Z.error({message:i,description:(0,p.jsx)(p.Fragment,{children:null==o?void 0:o.errors.map((function(e){return(0,p.jsx)("div",{children:e.message})}))})}),e.abrupt("return",o);case 15:e.prev=15,e.t0=e.catch(9);case 17:case 18:return e.abrupt("return",t);case 19:case"end":return e.stop()}}),e,null,[[9,15]])})));return function(t){return e.apply(this,arguments)}}(),(function(e){if(e.response){var t=e.response.data?e.response.data.message||e.message:e.response.statusText,n=e.response.status;if([502,504].includes(n))d.history.push("/error");else if(401===n)"/login"!==d.history.location.pathname&&(l.ZP.error(s.ZP.get("登录已过期,请重新登录")),localStorage.removeItem(u.Z.authKey),d.history.push("/login"));else{var o,r,i;if("function"==typeof(null===(o=e.config)||void 0===o?void 0:o.onError))return null===(i=e.config)||void 0===i?void 0:i.onError(e.response);c.Z.error({message:t,description:(0,p.jsx)(p.Fragment,{children:null===(r=e.response)||void 0===r||null===(r=r.data)||void 0===r||null===(r=r.errors)||void 0===r?void 0:r.map((function(e){return(0,p.jsxs)("div",{children:[e.message," (",e.value,")"]})}))})})}}else console.log(e.message);return Promise.reject(e)}));var Z=f},52076:function(e,t,n){"use strict";n.d(t,{ZP:function(){return c},I1:function(){return g},o4:function(){return P},w7:function(){return d},DY:function(){return p},FA:function(){return f},rS:function(){return Z},H$:function(){return x},W9:function(){return u},x$:function(){return h}});var o=n(15558),r=n.n(o),i=n(72317),a={".py":"python",".js":"javascript",".mjs":"javascript",".sh":"shell",".ts":"typescript",".ini":"ini",".json":"json"},s=n(94046),l=n.n(s);function c(){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,".")},o="unknow";t(/windows|win32|win64|wow32|wow64/g)?o="windows":t(/macintosh|macintel/g)?o="macos":t(/x11/g)?o="linux":t(/android|adr/g)?o="android":t(/ios|iphone|ipad|ipod|iwatch/g)&&(o="ios");var r="unknow";"windows"===o?t(/windows nt 5.0|windows 2000/g)?r="2000":t(/windows nt 5.1|windows xp/g)?r="xp":t(/windows nt 5.2|windows 2003/g)?r="2003":t(/windows nt 6.0|windows vista/g)?r="vista":t(/windows nt 6.1|windows 7/g)?r="7":t(/windows nt 6.2|windows 8/g)?r="8":t(/windows nt 6.3|windows 8.1/g)?r="8.1":t(/windows nt 10.0|windows 10/g)&&(r="10"):"macos"===o?r=n(/os x [\d._]+/g):"android"===o?r=n(/android [\d._]+/g):"ios"===o&&(r=n(/os [\d._]+/g));var i="unknow";"windows"===o||"macos"===o||"linux"===o?i="desktop":("android"===o||"ios"===o||t(/mobile/g))&&(i="mobile");var a="unknow",s="unknow";t(/applewebkit/g)?(a="webkit",t(/edge/g)?s="edge":t(/opr/g)?s="opera":t(/chrome/g)?s="chrome":t(/safari/g)&&(s="safari")):t(/gecko/g)&&t(/firefox/g)?(a="gecko",s="firefox"):t(/presto/g)?(a="presto",s="opera"):t(/trident|compatible|msie/g)&&(a="trident",s="iexplore");var l="unknow";"webkit"===a?l=n(/applewebkit\/[\d._]+/g):"gecko"===a?l=n(/gecko\/[\d._]+/g):"presto"===a?l=n(/presto\/[\d._]+/g):"trident"===a&&(l=n(/trident\/[\d._]+/g));var c="unknow";"chrome"===s?c=n(/chrome\/[\d._]+/g):"safari"===s?c=n(/version\/[\d._]+/g):"firefox"===s?c=n(/firefox\/[\d._]+/g):"opera"===s?c=n(/opr\/[\d._]+/g):"iexplore"===s?c=n(/(msie [\d._]+)|(rv:[\d._]+)/g):"edge"===s&&(c=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:a,engineVs:l,platform:i,supporter:s,supporterVs:c,system:o,systemVs:r},"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 o=null,r=0;(o=n||document.querySelector(".ant-table-wrapper"))&&(r=o.getBoundingClientRect().top);var i=document.body.clientHeight-r-t;return i}function d(e,t){var n,o,r=window.URL||window.webkitURL||window,i=new Blob([t]),a=document.createElementNS("http://www.w3.org/1999/xhtml","a");a.href=r.createObjectURL(i),a.download=e,n=a,(o=document.createEvent("MouseEvents")).initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(o)}function g(e,t,n){var o=r()(e),i=[];return function e(o){if(o)for(var r=0;r<(null==o?void 0:o.length);r++){if(t(o[r]))return n?void(o[r].children?o[r].children.unshift(n):o[r].children=[n]):void o.splice(r,1);o[r].children&&(i.push(o[r].key),e(o[r].children))}}(o),o}function p(e,t){var n;return function e(o){if(o)for(var r=0;r<(null==o?void 0:o.length);r++)t(o[r])?n=o[r]:o[r].children&&e(o[r].children)}(r()(e)),n}function h(e){return["     ",i.ZP.get("执行结束")].some((function(t){return e.includes(t)}))}function f(e){var t=e.split(" ");if("repo"===t[1]||"raw"===t[1])return t[2];var n=t.find((function(e){return[".js",".ts",".sh",".py"].some((function(t){return e.endsWith(t)}))}));if(n){var o,r,i="".concat(window.__ENV__QL_DIR,"/data/scripts");n.startsWith(i)&&(n=n.replace(i,""));var a=n.lastIndexOf("/");return a>=0?(r=n.slice(a+1),o=n.slice(0,a)):(r=n,o=""),[r,o]}}function m(e){try{var t=l().parseExpression(e);if(t)return t.next().toDate()}catch(e){}return null}function Z(e,t){var n=m(e);return null!=t&&t.length&&t.forEach((function(e){var t=m(e.schedule);t&&(!n||t<n)&&(n=t)})),n}function x(e){var t=function(e){if(!e)return"";var t=e.split(".");return".".concat(t[t.length-1])}(e);return a[t]}function P(){var e=document.createElement("div");e.style.position="fixed",e.style.top="0px",e.style.left="0px",e.style.width="100%",e.style.height="100%",e.style.backgroundColor="transparent",e.style.zIndex="9999",document.body.appendChild(e),e.addEventListener("click",(function(e){e.stopPropagation(),e.preventDefault()})),document.body.style.overflow="hidden"}},65814:function(e,t,n){"use strict";var o=n(15558),r=n.n(o),i=n(67825),a=n.n(i),s=n(90228),l=n.n(s),c=n(87999),u=n.n(c),d=n(25298),g=n.n(d),p=n(17069),h=n.n(p),f=n(82092),m=n.n(f),Z=n(78078),x=n.n(Z),P=["type"],v=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};g()(this,e),m()(this,"url",void 0),m()(this,"socket",null),m()(this,"subscriptions",new Map),m()(this,"options",void 0),m()(this,"reconnectAttempts",0),m()(this,"heartbeatTimeout",null),m()(this,"state","closed"),this.url=t,this.options={maxReconnectAttempts:n.maxReconnectAttempts||5,reconnectInterval:n.reconnectInterval||3e3,heartbeatInterval:n.heartbeatInterval||3e4},this.init()}var t,n;return h()(e,[{key:"init",value:(n=u()(l()().mark((function e(){var t=this;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,this.state="connecting",this.emit("connecting");case 3:if(!(this.reconnectAttempts<this.options.maxReconnectAttempts)){e.next=16;break}return this.socket=new(x())(this.url),this.setupEventListeners(),this.startHeartbeat(),e.next=9,this.waitForClose();case 9:return this.stopHeartbeat(),this.socket=null,this.reconnectAttempts++,e.next=14,new Promise((function(e){return setTimeout(e,t.options.reconnectInterval)}));case 14:e.next=3;break;case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),this.handleError(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,18]])}))),function(){return n.apply(this,arguments)})},{key:"setupEventListeners",value:function(){var e=this;this.socket&&(this.socket.onopen=function(){e.state="open",e.emit("open")},this.socket.onmessage=function(t){var n=JSON.parse(t.data);e.dispatchMessage(n)},this.socket.onclose=function(){e.state="closed",e.emit("close")})}},{key:"waitForClose",value:(t=u()(l()().mark((function e(){var t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((null===(t=this.socket)||void 0===t?void 0:t.readyState)===x().CLOSED){e.next=5;break}return e.next=3,new Promise((function(e){return setTimeout(e,100)}));case 3:e.next=0;break;case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"subscribe",value:function(e,t){var n=this.subscriptions.get(e)||new Set;if(!n.has(t)){n.add(t),this.subscriptions.set(e,n);var o={action:"subscribe",topic:e};this.send(o)}}},{key:"unsubscribe",value:function(e,t){var n=this.subscriptions.get(e)||new Set;if(n.has(t)){n.delete(t);var o={action:"unsubscribe",topic:e};this.send(o)}}},{key:"send",value:function(e){var t;(null===(t=this.socket)||void 0===t?void 0:t.readyState)===x().OPEN&&this.socket.send(JSON.stringify(e))}},{key:"dispatchMessage",value:function(e){var t=e.type,n=a()(e,P),o=this.subscriptions.get(t)||new Set;r()(o).forEach((function(e){return e(n)}))}},{key:"startHeartbeat",value:function(){var e=this;this.heartbeatTimeout=setInterval((function(){var t;(null===(t=e.socket)||void 0===t?void 0:t.readyState)===x().OPEN&&e.socket.send(JSON.stringify({type:"heartbeat"}))}),this.options.heartbeatInterval)}},{key:"stopHeartbeat",value:function(){this.heartbeatTimeout&&clearInterval(this.heartbeatTimeout)}},{key:"close",value:function(){this.socket&&(this.state="closed",this.stopHeartbeat(),this.socket.close(),this.emit("close"))}},{key:"handleError",value:function(e){console.error("WebSocket错误:",e),this.emit("error",e)}},{key:"on",value:function(e,t){}},{key:"emit",value:function(e,t){}}],[{key:"getInstance",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0;return e.instance||(e.instance=new e(t,n)),e.instance}}]),e}();m()(v,"instance",null),t.Z=v},68251:function(){},50810:function(){}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[5722],{20228:function(e,t,n){"use strict";n.r(t);var r=n(72317),a=(n(75271),n(50691)),o=n(47667),i=n(10948),s=n(16483),c=n.n(s),u=n(52676),l=(a.Z.Text,a.Z.Link,function(e){return e[e["成功"]=0]="成功",e[e["失败"]=1]="失败",e}(l||{})),d=function(e){return e[e.success=0]="success",e[e.error=1]="error",e}(d||{}),f=[{title:r.ZP.get("序号"),width:50,render:function(e,t,n){return n+1}},{title:r.ZP.get("登录时间"),dataIndex:"timestamp",key:"timestamp",width:120,render:function(e,t){return c()(t.timestamp).format("YYYY-MM-DD HH:mm:ss")}},{title:r.ZP.get("登录地址"),dataIndex:"address",width:120,key:"address"},{title:r.ZP.get("登录IP"),dataIndex:"ip",width:100,key:"ip"},{title:r.ZP.get("登录设备"),dataIndex:"platform",key:"platform",width:80},{title:r.ZP.get("登录状态"),dataIndex:"status",key:"status",width:80,render:function(e,t){return(0,u.jsx)(o.Z,{color:d[t.status],style:{marginRight:0},children:r.ZP.get(l[t.status])})}}];t.default=function(e){var t=e.data,n=e.height;return(0,u.jsx)(u.Fragment,{children:(0,u.jsx)(i.Z,{columns:f,pagination:!1,dataSource:t,rowKey:"id",size:"middle",scroll:{x:1e3,y:n}})})}},43541:function(e,t,n){"use strict";n.d(t,{fk:function(){return i},jD:function(){return o}});var r,a=n(71254),o=function(){return(0,a.Z)()&&window.document.documentElement},i=function(){if(!o())return!1;if(void 0!==r)return r;var e=document.createElement("div");return e.style.display="flex",e.style.flexDirection="column",e.style.rowGap="1px",e.appendChild(document.createElement("div")),e.appendChild(document.createElement("div")),document.body.appendChild(e),r=1===e.scrollHeight,document.body.removeChild(e),r}},47667:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r=n(57904),a=n(2053),o=n(99459),i=n(32324),s=n(82187),c=n.n(s),u=n(2021),l=n(75271),d=n(96820),f=n(1667),h=n(74244),m=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n},p=function(e){var t=e.prefixCls,n=e.className,o=e.checked,i=e.onChange,s=e.onClick,u=m(e,["prefixCls","className","checked","onChange","onClick"]),f=(0,l.useContext(d.E_).getPrefixCls)("tag",t),h=c()(f,(0,r.Z)((0,r.Z)({},"".concat(f,"-checkable"),!0),"".concat(f,"-checkable-checked"),o),n);return l.createElement("span",(0,a.Z)({},u,{className:h,onClick:function(e){null==i||i(!o),null==s||s(e)}}))},E=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n},g=new RegExp("^(".concat(f.Y.join("|"),")(-inverse)?$")),y=new RegExp("^(".concat(f.E.join("|"),")$")),M=function(e,t){var n=e.prefixCls,s=e.className,f=e.style,m=e.children,p=e.icon,M=e.color,S=e.onClose,v=e.closeIcon,C=e.closable,O=void 0!==C&&C,N=E(e,["prefixCls","className","style","children","icon","color","onClose","closeIcon","closable"]),$=l.useContext(d.E_),_=$.getPrefixCls,w=$.direction,T=l.useState(!0),D=(0,o.Z)(T,2),b=D[0],I=D[1];l.useEffect((function(){"visible"in N&&I(N.visible)}),[N.visible]);var P=function(){return!!M&&(g.test(M)||y.test(M))},U=(0,a.Z)({backgroundColor:M&&!P()?M:void 0},f),A=P(),k=_("tag",n),L=c()(k,(0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)({},"".concat(k,"-").concat(M),A),"".concat(k,"-has-color"),M&&!A),"".concat(k,"-hidden"),!b),"".concat(k,"-rtl"),"rtl"===w),s),x=function(e){e.stopPropagation(),null==S||S(e),e.defaultPrevented||"visible"in N||I(!1)},R="onClick"in N||m&&"a"===m.type,Z=(0,u.Z)(N,["visible"]),H=p||null,F=H?l.createElement(l.Fragment,null,H,l.createElement("span",null,m)):m,K=l.createElement("span",(0,a.Z)({},Z,{ref:t,className:L,style:U}),F,O?v?l.createElement("span",{className:"".concat(k,"-close-icon"),onClick:x},v):l.createElement(i.Z,{className:"".concat(k,"-close-icon"),onClick:x}):null);return R?l.createElement(h.Z,null,K):K},S=l.forwardRef(M);S.CheckableTag=p;var v=S},16483:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,n=36e5,r="millisecond",a="second",o="minute",i="hour",s="day",c="week",u="month",l="quarter",d="year",f="date",h="Invalid Date",m=/^(\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,E={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])+"]"}},g=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},y={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),a=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(a,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),a=t.clone().add(r,u),o=n-a<0,i=t.clone().add(r+(o?-1:1),u);return+(-(r+(n-a)/(o?a-i:i-a))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:d,w:c,d:s,D:f,h:i,m:o,s:a,ms:r,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},M="en",S={};S[M]=E;var v="$isDayjsObject",C=function(e){return e instanceof _||!(!e||!e[v])},O=function e(t,n,r){var a;if(!t)return M;if("string"==typeof t){var o=t.toLowerCase();S[o]&&(a=o),n&&(S[o]=n,a=o);var i=t.split("-");if(!a&&i.length>1)return e(i[0])}else{var s=t.name;S[s]=t,a=s}return!r&&a&&(M=a),a||!r&&M},N=function(e,t){if(C(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new _(n)},$=y;$.l=O,$.i=C,$.w=function(e,t){return N(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var _=function(){function E(e){this.$L=O(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[v]=!0}var g=E.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if($.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(m);if(r){var a=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(t)}(e),this.init()},g.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()},g.$utils=function(){return $},g.isValid=function(){return!(this.$d.toString()===h)},g.isSame=function(e,t){var n=N(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return N(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<N(e)},g.$g=function(e,t,n){return $.u(e)?this[t]:this.set(n,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var n=this,r=!!$.u(t)||t,l=$.p(e),h=function(e,t){var a=$.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?a:a.endOf(s)},m=function(e,t){return $.w(n.toDate()[e].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},p=this.$W,E=this.$M,g=this.$D,y="set"+(this.$u?"UTC":"");switch(l){case d:return r?h(1,0):h(31,11);case u:return r?h(1,E):h(0,E+1);case c:var M=this.$locale().weekStart||0,S=(p<M?p+7:p)-M;return h(r?g-S:g+(6-S),E);case s:case f:return m(y+"Hours",0);case i:return m(y+"Minutes",1);case o:return m(y+"Seconds",2);case a:return m(y+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var n,c=$.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[i]=l+"Hours",n[o]=l+"Minutes",n[a]=l+"Seconds",n[r]=l+"Milliseconds",n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===u||c===d){var p=this.clone().set(f,1);p.$d[h](m),p.init(),this.$d=p.set(f,Math.min(this.$D,p.daysInMonth())).$d}else h&&this.$d[h](m);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[$.p(e)]()},g.add=function(r,l){var f,h=this;r=Number(r);var m=$.p(l),p=function(e){var t=N(h);return $.w(t.date(t.date()+Math.round(e*r)),h)};if(m===u)return this.set(u,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return p(1);if(m===c)return p(7);var E=(f={},f[o]=t,f[i]=n,f[a]=e,f)[m]||1,g=this.$d.getTime()+r*E;return $.w(g,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||h;var r=e||"YYYY-MM-DDTHH:mm:ssZ",a=$.z(this),o=this.$H,i=this.$m,s=this.$M,c=n.weekdays,u=n.months,l=n.meridiem,d=function(e,n,a,o){return e&&(e[n]||e(t,r))||a[n].slice(0,o)},f=function(e){return $.s(o%12||12,e,"0")},m=l||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(p,(function(e,r){return r||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return $.s(t.$y,4,"0");case"M":return s+1;case"MM":return $.s(s+1,2,"0");case"MMM":return d(n.monthsShort,s,u,3);case"MMMM":return d(u,s);case"D":return t.$D;case"DD":return $.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return d(n.weekdaysMin,t.$W,c,2);case"ddd":return d(n.weekdaysShort,t.$W,c,3);case"dddd":return c[t.$W];case"H":return String(o);case"HH":return $.s(o,2,"0");case"h":return f(1);case"hh":return f(2);case"a":return m(o,i,!0);case"A":return m(o,i,!1);case"m":return String(i);case"mm":return $.s(i,2,"0");case"s":return String(t.$s);case"ss":return $.s(t.$s,2,"0");case"SSS":return $.s(t.$ms,3,"0");case"Z":return a}return null}(e)||a.replace(":","")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(r,f,h){var m,p=this,E=$.p(f),g=N(r),y=(g.utcOffset()-this.utcOffset())*t,M=this-g,S=function(){return $.m(p,g)};switch(E){case d:m=S()/12;break;case u:m=S();break;case l:m=S()/3;break;case c:m=(M-y)/6048e5;break;case s:m=(M-y)/864e5;break;case i:m=M/n;break;case o:m=M/t;break;case a:m=M/e;break;default:m=M}return h?m:$.a(m)},g.daysInMonth=function(){return this.endOf(u).$D},g.$locale=function(){return S[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=O(e,t,!0);return r&&(n.$L=r),n},g.clone=function(){return $.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},E}(),w=_.prototype;return N.prototype=w,[["$ms",r],["$s",a],["$m",o],["$H",i],["$W",s],["$M",u],["$y",d],["$D",f]].forEach((function(e){w[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),N.extend=function(e,t){return e.$i||(e(t,_,N),e.$i=!0),N},N.locale=O,N.isDayjs=C,N.unix=function(e){return N(1e3*e)},N.en=S[M],N.Ls=S,N.p={},N}()},1260:function(e,t){"use strict";var n={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=n.F1&&t<=n.F12)return!1;switch(t){case n.ALT:case n.CAPS_LOCK:case n.CONTEXT_MENU:case n.CTRL:case n.DOWN:case n.END:case n.ESC:case n.HOME:case n.INSERT:case n.LEFT:case n.MAC_FF_META:case n.META:case n.NUMLOCK:case n.NUM_CENTER:case n.PAGE_DOWN:case n.PAGE_UP:case n.PAUSE:case n.PRINT_SCREEN:case n.RIGHT:case n.SHIFT:case n.UP:case n.WIN_KEY:case n.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=n.ZERO&&e<=n.NINE)return!0;if(e>=n.NUM_ZERO&&e<=n.NUM_MULTIPLY)return!0;if(e>=n.A&&e<=n.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case n.SPACE:case n.QUESTION_MARK:case n.NUM_PLUS:case n.NUM_MINUS:case n.NUM_PERIOD:case n.NUM_DIVISION:case n.SEMICOLON:case n.DASH:case n.EQUALS:case n.COMMA:case n.PERIOD:case n.SLASH:case n.APOSTROPHE:case n.SINGLE_QUOTE:case n.OPEN_SQUARE_BRACKET:case n.BACKSLASH:case n.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};t.Z=n},97882:function(e,t,n){"use strict";n.d(t,{Z:function(){return i},o:function(){return s}});var r,a=n(61984);function o(e){var t="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),n=document.createElement("div");n.id=t;var r,o,i=n.style;if(i.position="absolute",i.left="0",i.top="0",i.width="100px",i.height="100px",i.overflow="scroll",e){var s=getComputedStyle(e);i.scrollbarColor=s.scrollbarColor,i.scrollbarWidth=s.scrollbarWidth;var c=getComputedStyle(e,"::-webkit-scrollbar"),u=parseInt(c.width,10),l=parseInt(c.height,10);try{var d=u?"width: ".concat(c.width,";"):"",f=l?"height: ".concat(c.height,";"):"";(0,a.hq)("\n#".concat(t,"::-webkit-scrollbar {\n").concat(d,"\n").concat(f,"\n}"),t)}catch(e){console.error(e),r=u,o=l}}document.body.appendChild(n);var h=e&&r&&!isNaN(r)?r:n.offsetWidth-n.clientWidth,m=e&&o&&!isNaN(o)?o:n.offsetHeight-n.clientHeight;return document.body.removeChild(n),(0,a.jL)(t),{width:h,height:m}}function i(e){return"undefined"==typeof document?0:((e||void 0===r)&&(r=o()),r.width)}function s(e){return"undefined"!=typeof document&&e&&e instanceof Element?o(e):{width:0,height:0}}},41045:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(98037),a="".concat("accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap"," ").concat("onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError").split(/[\s\n]+/),o="aria-",i="data-";function s(e,t){return 0===e.indexOf(t)}function c(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t=!1===n?{aria:!0,data:!0,attr:!0}:!0===n?{aria:!0}:(0,r.Z)({},n);var c={};return Object.keys(e).forEach((function(n){(t.aria&&("role"===n||s(n,o))||t.data&&s(n,i)||t.attr&&a.includes(n))&&(c[n]=e[n])})),c}}}]);
1
+ (self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[5722],{59362:function(e,t,n){"use strict";n.r(t);var r=n(72317),a=(n(75271),n(50691)),o=n(47667),i=n(10948),s=n(16483),c=n.n(s),u=n(52676),l=(a.Z.Text,a.Z.Link,function(e){return e[e["成功"]=0]="成功",e[e["失败"]=1]="失败",e}(l||{})),d=function(e){return e[e.success=0]="success",e[e.error=1]="error",e}(d||{}),f=[{title:r.ZP.get("序号"),width:50,render:function(e,t,n){return n+1}},{title:r.ZP.get("登录时间"),dataIndex:"timestamp",key:"timestamp",width:120,render:function(e,t){return c()(t.timestamp).format("YYYY-MM-DD HH:mm:ss")}},{title:r.ZP.get("登录地址"),dataIndex:"address",width:120,key:"address"},{title:r.ZP.get("登录IP"),dataIndex:"ip",width:100,key:"ip"},{title:r.ZP.get("登录设备"),dataIndex:"platform",key:"platform",width:80},{title:r.ZP.get("登录状态"),dataIndex:"status",key:"status",width:80,render:function(e,t){return(0,u.jsx)(o.Z,{color:d[t.status],style:{marginRight:0},children:r.ZP.get(l[t.status])})}}];t.default=function(e){var t=e.data,n=e.height;return(0,u.jsx)(u.Fragment,{children:(0,u.jsx)(i.Z,{columns:f,pagination:!1,dataSource:t,rowKey:"id",size:"middle",scroll:{x:1e3,y:n}})})}},43541:function(e,t,n){"use strict";n.d(t,{fk:function(){return i},jD:function(){return o}});var r,a=n(71254),o=function(){return(0,a.Z)()&&window.document.documentElement},i=function(){if(!o())return!1;if(void 0!==r)return r;var e=document.createElement("div");return e.style.display="flex",e.style.flexDirection="column",e.style.rowGap="1px",e.appendChild(document.createElement("div")),e.appendChild(document.createElement("div")),document.body.appendChild(e),r=1===e.scrollHeight,document.body.removeChild(e),r}},47667:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r=n(57904),a=n(2053),o=n(99459),i=n(32324),s=n(82187),c=n.n(s),u=n(2021),l=n(75271),d=n(96820),f=n(1667),h=n(74244),m=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n},p=function(e){var t=e.prefixCls,n=e.className,o=e.checked,i=e.onChange,s=e.onClick,u=m(e,["prefixCls","className","checked","onChange","onClick"]),f=(0,l.useContext(d.E_).getPrefixCls)("tag",t),h=c()(f,(0,r.Z)((0,r.Z)({},"".concat(f,"-checkable"),!0),"".concat(f,"-checkable-checked"),o),n);return l.createElement("span",(0,a.Z)({},u,{className:h,onClick:function(e){null==i||i(!o),null==s||s(e)}}))},E=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n},g=new RegExp("^(".concat(f.Y.join("|"),")(-inverse)?$")),y=new RegExp("^(".concat(f.E.join("|"),")$")),M=function(e,t){var n=e.prefixCls,s=e.className,f=e.style,m=e.children,p=e.icon,M=e.color,S=e.onClose,v=e.closeIcon,C=e.closable,O=void 0!==C&&C,N=E(e,["prefixCls","className","style","children","icon","color","onClose","closeIcon","closable"]),$=l.useContext(d.E_),_=$.getPrefixCls,w=$.direction,T=l.useState(!0),D=(0,o.Z)(T,2),b=D[0],I=D[1];l.useEffect((function(){"visible"in N&&I(N.visible)}),[N.visible]);var P=function(){return!!M&&(g.test(M)||y.test(M))},U=(0,a.Z)({backgroundColor:M&&!P()?M:void 0},f),A=P(),k=_("tag",n),L=c()(k,(0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)({},"".concat(k,"-").concat(M),A),"".concat(k,"-has-color"),M&&!A),"".concat(k,"-hidden"),!b),"".concat(k,"-rtl"),"rtl"===w),s),x=function(e){e.stopPropagation(),null==S||S(e),e.defaultPrevented||"visible"in N||I(!1)},R="onClick"in N||m&&"a"===m.type,Z=(0,u.Z)(N,["visible"]),H=p||null,F=H?l.createElement(l.Fragment,null,H,l.createElement("span",null,m)):m,K=l.createElement("span",(0,a.Z)({},Z,{ref:t,className:L,style:U}),F,O?v?l.createElement("span",{className:"".concat(k,"-close-icon"),onClick:x},v):l.createElement(i.Z,{className:"".concat(k,"-close-icon"),onClick:x}):null);return R?l.createElement(h.Z,null,K):K},S=l.forwardRef(M);S.CheckableTag=p;var v=S},16483:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,n=36e5,r="millisecond",a="second",o="minute",i="hour",s="day",c="week",u="month",l="quarter",d="year",f="date",h="Invalid Date",m=/^(\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,E={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])+"]"}},g=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},y={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),a=n%60;return(t<=0?"+":"-")+g(r,2,"0")+":"+g(a,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),a=t.clone().add(r,u),o=n-a<0,i=t.clone().add(r+(o?-1:1),u);return+(-(r+(n-a)/(o?a-i:i-a))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:d,w:c,d:s,D:f,h:i,m:o,s:a,ms:r,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},M="en",S={};S[M]=E;var v="$isDayjsObject",C=function(e){return e instanceof _||!(!e||!e[v])},O=function e(t,n,r){var a;if(!t)return M;if("string"==typeof t){var o=t.toLowerCase();S[o]&&(a=o),n&&(S[o]=n,a=o);var i=t.split("-");if(!a&&i.length>1)return e(i[0])}else{var s=t.name;S[s]=t,a=s}return!r&&a&&(M=a),a||!r&&M},N=function(e,t){if(C(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new _(n)},$=y;$.l=O,$.i=C,$.w=function(e,t){return N(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var _=function(){function E(e){this.$L=O(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[v]=!0}var g=E.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if($.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(m);if(r){var a=r[2]-1||0,o=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)):new Date(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,o)}}return new Date(t)}(e),this.init()},g.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()},g.$utils=function(){return $},g.isValid=function(){return!(this.$d.toString()===h)},g.isSame=function(e,t){var n=N(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return N(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<N(e)},g.$g=function(e,t,n){return $.u(e)?this[t]:this.set(n,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var n=this,r=!!$.u(t)||t,l=$.p(e),h=function(e,t){var a=$.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?a:a.endOf(s)},m=function(e,t){return $.w(n.toDate()[e].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},p=this.$W,E=this.$M,g=this.$D,y="set"+(this.$u?"UTC":"");switch(l){case d:return r?h(1,0):h(31,11);case u:return r?h(1,E):h(0,E+1);case c:var M=this.$locale().weekStart||0,S=(p<M?p+7:p)-M;return h(r?g-S:g+(6-S),E);case s:case f:return m(y+"Hours",0);case i:return m(y+"Minutes",1);case o:return m(y+"Seconds",2);case a:return m(y+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var n,c=$.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[i]=l+"Hours",n[o]=l+"Minutes",n[a]=l+"Seconds",n[r]=l+"Milliseconds",n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===u||c===d){var p=this.clone().set(f,1);p.$d[h](m),p.init(),this.$d=p.set(f,Math.min(this.$D,p.daysInMonth())).$d}else h&&this.$d[h](m);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[$.p(e)]()},g.add=function(r,l){var f,h=this;r=Number(r);var m=$.p(l),p=function(e){var t=N(h);return $.w(t.date(t.date()+Math.round(e*r)),h)};if(m===u)return this.set(u,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return p(1);if(m===c)return p(7);var E=(f={},f[o]=t,f[i]=n,f[a]=e,f)[m]||1,g=this.$d.getTime()+r*E;return $.w(g,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||h;var r=e||"YYYY-MM-DDTHH:mm:ssZ",a=$.z(this),o=this.$H,i=this.$m,s=this.$M,c=n.weekdays,u=n.months,l=n.meridiem,d=function(e,n,a,o){return e&&(e[n]||e(t,r))||a[n].slice(0,o)},f=function(e){return $.s(o%12||12,e,"0")},m=l||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(p,(function(e,r){return r||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return $.s(t.$y,4,"0");case"M":return s+1;case"MM":return $.s(s+1,2,"0");case"MMM":return d(n.monthsShort,s,u,3);case"MMMM":return d(u,s);case"D":return t.$D;case"DD":return $.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return d(n.weekdaysMin,t.$W,c,2);case"ddd":return d(n.weekdaysShort,t.$W,c,3);case"dddd":return c[t.$W];case"H":return String(o);case"HH":return $.s(o,2,"0");case"h":return f(1);case"hh":return f(2);case"a":return m(o,i,!0);case"A":return m(o,i,!1);case"m":return String(i);case"mm":return $.s(i,2,"0");case"s":return String(t.$s);case"ss":return $.s(t.$s,2,"0");case"SSS":return $.s(t.$ms,3,"0");case"Z":return a}return null}(e)||a.replace(":","")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(r,f,h){var m,p=this,E=$.p(f),g=N(r),y=(g.utcOffset()-this.utcOffset())*t,M=this-g,S=function(){return $.m(p,g)};switch(E){case d:m=S()/12;break;case u:m=S();break;case l:m=S()/3;break;case c:m=(M-y)/6048e5;break;case s:m=(M-y)/864e5;break;case i:m=M/n;break;case o:m=M/t;break;case a:m=M/e;break;default:m=M}return h?m:$.a(m)},g.daysInMonth=function(){return this.endOf(u).$D},g.$locale=function(){return S[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=O(e,t,!0);return r&&(n.$L=r),n},g.clone=function(){return $.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},E}(),w=_.prototype;return N.prototype=w,[["$ms",r],["$s",a],["$m",o],["$H",i],["$W",s],["$M",u],["$y",d],["$D",f]].forEach((function(e){w[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),N.extend=function(e,t){return e.$i||(e(t,_,N),e.$i=!0),N},N.locale=O,N.isDayjs=C,N.unix=function(e){return N(1e3*e)},N.en=S[M],N.Ls=S,N.p={},N}()},1260:function(e,t){"use strict";var n={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=n.F1&&t<=n.F12)return!1;switch(t){case n.ALT:case n.CAPS_LOCK:case n.CONTEXT_MENU:case n.CTRL:case n.DOWN:case n.END:case n.ESC:case n.HOME:case n.INSERT:case n.LEFT:case n.MAC_FF_META:case n.META:case n.NUMLOCK:case n.NUM_CENTER:case n.PAGE_DOWN:case n.PAGE_UP:case n.PAUSE:case n.PRINT_SCREEN:case n.RIGHT:case n.SHIFT:case n.UP:case n.WIN_KEY:case n.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=n.ZERO&&e<=n.NINE)return!0;if(e>=n.NUM_ZERO&&e<=n.NUM_MULTIPLY)return!0;if(e>=n.A&&e<=n.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case n.SPACE:case n.QUESTION_MARK:case n.NUM_PLUS:case n.NUM_MINUS:case n.NUM_PERIOD:case n.NUM_DIVISION:case n.SEMICOLON:case n.DASH:case n.EQUALS:case n.COMMA:case n.PERIOD:case n.SLASH:case n.APOSTROPHE:case n.SINGLE_QUOTE:case n.OPEN_SQUARE_BRACKET:case n.BACKSLASH:case n.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};t.Z=n},97882:function(e,t,n){"use strict";n.d(t,{Z:function(){return i},o:function(){return s}});var r,a=n(61984);function o(e){var t="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),n=document.createElement("div");n.id=t;var r,o,i=n.style;if(i.position="absolute",i.left="0",i.top="0",i.width="100px",i.height="100px",i.overflow="scroll",e){var s=getComputedStyle(e);i.scrollbarColor=s.scrollbarColor,i.scrollbarWidth=s.scrollbarWidth;var c=getComputedStyle(e,"::-webkit-scrollbar"),u=parseInt(c.width,10),l=parseInt(c.height,10);try{var d=u?"width: ".concat(c.width,";"):"",f=l?"height: ".concat(c.height,";"):"";(0,a.hq)("\n#".concat(t,"::-webkit-scrollbar {\n").concat(d,"\n").concat(f,"\n}"),t)}catch(e){console.error(e),r=u,o=l}}document.body.appendChild(n);var h=e&&r&&!isNaN(r)?r:n.offsetWidth-n.clientWidth,m=e&&o&&!isNaN(o)?o:n.offsetHeight-n.clientHeight;return document.body.removeChild(n),(0,a.jL)(t),{width:h,height:m}}function i(e){return"undefined"==typeof document?0:((e||void 0===r)&&(r=o()),r.width)}function s(e){return"undefined"!=typeof document&&e&&e instanceof Element?o(e):{width:0,height:0}}},41045:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(98037),a="".concat("accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap"," ").concat("onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError").split(/[\s\n]+/),o="aria-",i="data-";function s(e,t){return 0===e.indexOf(t)}function c(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t=!1===n?{aria:!0,data:!0,attr:!0}:!0===n?{aria:!0}:(0,r.Z)({},n);var c={};return Object.keys(e).forEach((function(n){(t.aria&&("role"===n||s(n,o))||t.data&&s(n,i)||t.attr&&a.includes(n))&&(c[n]=e[n])})),c}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[7213],{61160:function(e,t,a){a.r(t);var o=a(26068),r=a.n(o),n=a(48305),l=a.n(n),i=a(72317),s=a(75271),u=a(35181),c=a(72338),p=a(61508),d=a(17082),g=a(93481),h=a(16314),P=a(3475),m=a(52676),b=u.Z.Option;t.default=function(e){var t=e.data,a=(0,s.useState)(!1),o=l()(a,2),n=o[0],Z=o[1],f=(0,s.useState)("closed"),v=l()(f,2),E=v[0],y=v[1],C=(0,s.useState)([]),x=l()(C,2),w=x[0],S=x[1],k=c.Z.useForm(),T=l()(k,1)[0],_=function(e){y(e);var t=P.Z.notificationModeMap[e];S(t||[])};return(0,s.useEffect)((function(){t&&t.type&&(_(t.type),T.setFieldsValue(r()({},t)))}),[t]),(0,m.jsx)("div",{children:(0,m.jsxs)(c.Z,{onFinish:function(e){Z(!0),"closed"==e.type&&(e.type=""),h.W.put("".concat(P.Z.apiPrefix,"user/notification"),e).then((function(t){var a=t.code;t.data;200===a&&p.ZP.success(e.type?i.ZP.get("通知发送成功"):i.ZP.get("通知关闭成功"))})).catch((function(e){console.log(e)})).finally((function(){return Z(!1)}))},form:T,layout:"vertical",children:[(0,m.jsx)(c.Z.Item,{label:i.ZP.get("通知方式"),name:"type",rules:[{required:!0}],style:{maxWidth:400},initialValue:E,children:(0,m.jsx)(u.Z,{onChange:_,disabled:n,children:P.Z.notificationModes.map((function(e){return(0,m.jsx)(b,{value:e.value,children:e.label},e.value)}))})}),w.map((function(e){return(0,m.jsx)(c.Z.Item,{label:e.label,name:e.label,extra:e.tip,rules:[{required:e.required}],style:{maxWidth:400},children:e.items?(0,m.jsx)(u.Z,{placeholder:e.placeholder||"".concat(i.ZP.get("请选择")," ").concat(e.label),disabled:n,children:e.items.map((function(e){return(0,m.jsx)(b,{value:e.value,children:e.label||e.value},e.value)}))}):(0,m.jsx)(d.Z.TextArea,{disabled:n,autoSize:{minRows:1,maxRows:5},placeholder:e.placeholder||"".concat(i.ZP.get("请输入")," ").concat(e.label)})},e.label)})),(0,m.jsx)(g.Z,{type:"primary",htmlType:"submit",disabled:n,children:n?i.ZP.get("测试中..."):i.ZP.get("保存")})]})})}},3475:function(e,t,a){var o=a(72317),r=window.__ENV__QlBaseUrl||"/";t.Z={siteName:o.ZP.get("青龙"),baseUrl:r,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:o.ZP.get("中文"),flag:"/china.svg"}],defaultLanguage:"en"},scopes:[{name:o.ZP.get("定时任务"),value:"crons"},{name:o.ZP.get("环境变量"),value:"envs"},{name:o.ZP.get("订阅管理"),value:"subscriptions"},{name:o.ZP.get("配置文件"),value:"configs"},{name:o.ZP.get("脚本管理"),value:"scripts"},{name:o.ZP.get("日志管理"),value:"logs"},{name:o.ZP.get("依赖管理"),value:"dependencies"},{name:o.ZP.get("系统信息"),value:"system"}],scopesMap:{crons:o.ZP.get("定时任务"),envs:o.ZP.get("环境变量"),subscriptions:o.ZP.get("订阅管理"),configs:o.ZP.get("配置文件"),scripts:o.ZP.get("脚本管理"),logs:o.ZP.get("日志管理"),dependencies:o.ZP.get("依赖管理"),system:o.ZP.get("系统信息")},notificationModes:[{value:"gotify",label:"Gotify"},{value:"ntfy",label:"Ntfy"},{value:"goCqHttpBot",label:"GoCqHttpBot"},{value:"serverChan",label:o.ZP.get("Server酱")},{value:"pushDeer",label:"PushDeer"},{value:"bark",label:"Bark"},{value:"telegramBot",label:o.ZP.get("Telegram机器人")},{value:"dingtalkBot",label:o.ZP.get("钉钉机器人")},{value:"weWorkBot",label:o.ZP.get("企业微信机器人")},{value:"weWorkApp",label:o.ZP.get("企业微信应用")},{value:"aibotk",label:o.ZP.get("智能微秘书")},{value:"iGot",label:"IGot"},{value:"pushPlus",label:"PushPlus"},{value:"wePlusBot",label:o.ZP.get("微加机器人")},{value:"wxPusherBot",label:"wxPusher"},{value:"chat",label:o.ZP.get("群晖chat")},{value:"email",label:o.ZP.get("邮箱")},{value:"lark",label:o.ZP.get("飞书机器人")},{value:"pushMe",label:"PushMe"},{value:"chronocat",label:"Chronocat"},{value:"webhook",label:o.ZP.get("自定义通知")},{value:"closed",label:o.ZP.get("已关闭")}],notificationModeMap:{gotify:[{label:"gotifyUrl",tip:o.ZP.get("gotify的url地址,例如 https://push.example.de:8080"),required:!0},{label:"gotifyToken",tip:o.ZP.get("gotify的消息应用token码"),required:!0},{label:"gotifyPriority",tip:o.ZP.get("推送消息的优先级")}],ntfy:[{label:"ntfyUrl",tip:o.ZP.get("ntfy的url地址,例如 https://ntfy.sh"),required:!0},{label:"ntfyTopic",tip:o.ZP.get("ntfy的消息应用topic"),required:!0},{label:"ntfyPriority",tip:o.ZP.get("推送消息的优先级")}],chat:[{label:"chatUrl",tip:o.ZP.get("chat的url地址"),required:!0},{label:"chatToken",tip:o.ZP.get("chat的token码"),required:!0}],goCqHttpBot:[{label:"goCqHttpBotUrl",tip:o.ZP.get("推送到个人QQ: http://127.0.0.1/send_private_msg,群:http://127.0.0.1/send_group_msg"),required:!0},{label:"goCqHttpBotToken",tip:o.ZP.get("访问密钥"),required:!0},{label:"goCqHttpBotQq",tip:o.ZP.get("如果GOBOT_URL设置 /send_private_msg 则需要填入 user_id=个人QQ 相反如果是 /send_group_msg 则需要填入 group_id=QQ群"),required:!0}],serverChan:[{label:"serverChanKey",tip:o.ZP.get("Server酱SENDKEY"),required:!0}],pushDeer:[{label:"pushDeerKey",tip:o.ZP.get("PushDeer的Key,https://github.com/easychen/pushdeer"),required:!0},{label:"pushDeerUrl",tip:o.ZP.get("PushDeer的自架API endpoint,默认是 https://api2.pushdeer.com/message/push")}],bark:[{label:"barkPush",tip:o.ZP.get("Bark的信息IP/设备码,例如:https://api.day.app/XXXXXXXX"),required:!0},{label:"barkIcon",tip:o.ZP.get("BARK推送图标,自定义推送图标 (需iOS15或以上才能显示)")},{label:"barkSound",tip:o.ZP.get("BARK推送铃声,铃声列表去APP查看复制填写")},{label:"barkGroup",tip:o.ZP.get("BARK推送消息的分组,默认为qinglong")},{label:"barkLevel",tip:o.ZP.get("BARK推送消息的时效性,默认为active")},{label:"barkUrl",tip:o.ZP.get("BARK推送消息的跳转URL")},{label:"barkArchive",tip:o.ZP.get("BARK是否保存推送消息")}],telegramBot:[{label:"telegramBotToken",tip:o.ZP.get("telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw"),required:!0},{label:"telegramBotUserId",tip:o.ZP.get("telegram用户的id,例如:129xxx206"),required:!0},{label:"telegramBotProxyHost",tip:o.ZP.get("代理IP")},{label:"telegramBotProxyPort",tip:o.ZP.get("代理端口")},{label:"telegramBotProxyAuth",tip:o.ZP.get("telegram代理配置认证参数,用户名与密码用英文冒号连接 user:password")},{label:"telegramBotApiHost",tip:o.ZP.get("telegram api自建的反向代理地址,默认tg官方api")}],dingtalkBot:[{label:"dingtalkBotToken",tip:o.ZP.get("钉钉机器人webhook token,例如:5a544165465465645d0f31dca676e7bd07415asdasd"),required:!0},{label:"dingtalkBotSecret",tip:o.ZP.get("密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串")}],weWorkBot:[{label:"weWorkBotKey",tip:o.ZP.get("企业微信机器人的webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa"),required:!0},{label:"weWorkOrigin",tip:o.ZP.get("企业微信代理地址")}],weWorkApp:[{label:"weWorkAppKey",tip:o.ZP.get("corpid、corpsecret、touser(注:多个成员ID使用|隔开)、agentid、消息类型(选填,不填默认文本消息类型) 注意用,号隔开(英文输入法的逗号),例如:wwcfrs,B-76WERQ,qinglong,1000001,2COat"),required:!0},{label:"weWorkOrigin",tip:o.ZP.get("企业微信代理地址")}],aibotk:[{label:"aibotkKey",tip:o.ZP.get("密钥key,智能微秘书个人中心获取apikey,申请地址:https://wechat.aibotk.com/signup?from=ql"),required:!0},{label:"aibotkType",tip:o.ZP.get("发送的目标,群组或者好友"),required:!0,placeholder:o.ZP.get("请输入要发送的目标"),items:[{value:"room",label:o.ZP.get("群聊")},{value:"contact",label:o.ZP.get("好友")}]},{label:"aibotkName",tip:o.ZP.get("要发送的用户昵称或群名,如果目标是群,需要填群名,如果目标是好友,需要填好友昵称"),required:!0}],iGot:[{label:"iGotPushKey",tip:o.ZP.get("iGot的信息推送key,例如:https://push.hellyw.com/XXXXXXXX"),required:!0}],pushPlus:[{label:"pushPlusToken",tip:o.ZP.get("微信扫码登录后一对一推送或一对多推送下面的token(您的Token),不提供PUSH_PLUS_USER则默认为一对一推送,参考 https://www.pushplus.plus/"),required:!0},{label:"pushPlusUser",tip:o.ZP.get("一对多推送的“群组编码”(一对多推送下面->您的群组(如无则创建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送)")},{label:"pushplusTemplate",tip:o.ZP.get("发送模板")},{label:"pushplusChannel",tip:o.ZP.get("发送渠道")},{label:"pushplusWebhook",tip:o.ZP.get("webhook编码")},{label:"pushplusCallbackUrl",tip:o.ZP.get("发送结果回调地址")},{label:"pushplusTo",tip:o.ZP.get("好友令牌")}],wePlusBot:[{label:"wePlusBotToken",tip:o.ZP.get("用户令牌,扫描登录后 我的—>设置->令牌 中获取,参考 https://www.weplusbot.com/"),required:!0},{label:"wePlusBotReceiver",tip:o.ZP.get("消息接收人")},{label:"wePlusBotVersion",tip:o.ZP.get("调用版本;专业版填写pro,个人版填写personal,为空默认使用专业版")}],wxPusherBot:[{label:"wxPusherBotAppToken",tip:o.ZP.get("wxPusherBot的appToken"),required:!0},{label:"wxPusherBotTopicIds",tip:o.ZP.get("wxPusherBot的topicIds"),required:!1},{label:"wxPusherBotUids",tip:o.ZP.get("wxPusherBot的uids"),required:!1}],lark:[{label:"larkKey",tip:o.ZP.get("飞书群组机器人:https://www.feishu.cn/hc/zh-CN/articles/360024984973"),required:!0}],email:[{label:"emailService",tip:o.ZP.get("邮箱服务名称,比如126、163、Gmail、QQ等,支持列表https://github.com/nodemailer/nodemailer/blob/master/lib/well-known/services.json"),required:!0},{label:"emailUser",tip:o.ZP.get("邮箱地址"),required:!0},{label:"emailPass",tip:o.ZP.get("SMTP 登录密码,也可能为特殊口令,视具体邮件服务商说明而定"),required:!0}],pushMe:[{label:"pushMeKey",tip:o.ZP.get("PushMe的Key,https://push.i-i.me/"),required:!0},{label:"pushMeUrl",tip:o.ZP.get("自建的PushMeServer消息接口地址,例如:http://127.0.0.1:3010,不填则使用官方消息接口"),required:!1}],chronocat:[{label:"chronocatURL",tip:o.ZP.get("Chronocat Red 服务的连接地址 https://chronocat.vercel.app/install/docker/official/"),required:!0},{label:"chronocatQQ",tip:o.ZP.get("个人:user_id=个人QQ 群则填入group_id=QQ群 多个用英文;隔开同时支持个人和群 如:user_id=xxx;group_id=xxxx;group_id=xxxxx"),required:!0},{label:"chronocatToken",tip:o.ZP.get("docker安装在持久化config目录下的chronocat.yml文件可找到"),required:!0}],webhook:[{label:"webhookMethod",tip:o.ZP.get("请求方法"),required:!0,items:[{value:"GET"},{value:"POST"},{value:"PUT"}]},{label:"webhookContentType",tip:o.ZP.get("请求头Content-Type"),required:!0,items:[{value:"text/plain"},{value:"application/json"},{value:"multipart/form-data"},{value:"application/x-www-form-urlencoded"}]},{label:"webhookUrl",tip:o.ZP.get("请求链接以http或者https开头。url或者body中必须包含$title,$content可选,对应api内容的位置"),required:!0,placeholder:"https://xxx.cn/api?content=$title\n"},{label:"webhookHeaders",tip:o.ZP.get("请求头格式Custom-Header1: Header1,多个换行分割"),placeholder:"Custom-Header1: Header1\nCustom-Header2: Header2"},{label:"webhookBody",tip:o.ZP.get("请求体格式key1: value1,多个换行分割。url或者body中必须包含$title,$content可选,对应api内容的位置"),placeholder:"key1: $title\nkey2: $content"}]},documentTitleMap:{"/login":o.ZP.get("登录"),"/initialization":o.ZP.get("初始化"),"/crontab":o.ZP.get("定时任务"),"/env":o.ZP.get("环境变量"),"/subscription":o.ZP.get("订阅管理"),"/config":o.ZP.get("配置文件"),"/script":o.ZP.get("脚本管理"),"/diff":o.ZP.get("对比工具"),"/log":o.ZP.get("日志管理"),"/setting":o.ZP.get("系统设置"),"/error":o.ZP.get("错误日志"),"/dependence":o.ZP.get("依赖管理")},dependenceTypes:["nodejs","python3","linux"]}},16314:function(e,t,a){a.d(t,{W:function(){return b}});var o=a(90228),r=a.n(o),n=a(87999),l=a.n(n),i=a(72317),s=a(61508),u=a(33839),c=a(3475),p=a(98783),d=a(69313),g=a(52676);s.ZP.config({duration:2});var h=Date.now(),P=d.Z.create({timeout:6e4,params:{t:h}}),m=["/api/user/login","/open/auth/token","/api/user/two-factor/login","/api/system","/api/user/init","/api/user/notification/init"];P.interceptors.request.use((function(e){var t=localStorage.getItem(c.Z.authKey);return t&&!m.includes(e.url)?(e.headers.Authorization="Bearer ".concat(t),e):e})),P.interceptors.response.use(function(){var e=l()(r()().mark((function e(t){var a,o,n;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}p.history.push("/error"),e.next=18;break;case 5:if(401!==a){e.next=9;break}"/login"!==p.history.location.pathname&&(localStorage.removeItem(c.Z.authKey),p.history.push("/login")),e.next=18;break;case 9:return e.prev=9,200!==(o=t.data).code&&(n=o.message||o.data)&&u.Z.error({message:n,description:(0,g.jsx)(g.Fragment,{children:null==o?void 0:o.errors.map((function(e){return(0,g.jsx)("div",{children:e.message})}))})}),e.abrupt("return",o);case 15:e.prev=15,e.t0=e.catch(9);case 17:case 18:return e.abrupt("return",t);case 19:case"end":return e.stop()}}),e,null,[[9,15]])})));return function(t){return e.apply(this,arguments)}}(),(function(e){if(e.response){var t=e.response.data?e.response.data.message||e.message:e.response.statusText,a=e.response.status;if([502,504].includes(a))p.history.push("/error");else if(401===a)"/login"!==p.history.location.pathname&&(s.ZP.error(i.ZP.get("登录已过期,请重新登录")),localStorage.removeItem(c.Z.authKey),p.history.push("/login"));else{var o,r,n;if("function"==typeof(null===(o=e.config)||void 0===o?void 0:o.onError))return null===(n=e.config)||void 0===n?void 0:n.onError(e.response);u.Z.error({message:t,description:(0,g.jsx)(g.Fragment,{children:null===(r=e.response)||void 0===r||null===(r=r.data)||void 0===r||null===(r=r.errors)||void 0===r?void 0:r.map((function(e){return(0,g.jsxs)("div",{children:[e.message," (",e.value,")"]})}))})})}}else console.log(e.message);return Promise.reject(e)}));var b=P},43541:function(e,t,a){a.d(t,{fk:function(){return l},jD:function(){return n}});var o,r=a(71254),n=function(){return(0,r.Z)()&&window.document.documentElement},l=function(){if(!n())return!1;if(void 0!==o)return o;var e=document.createElement("div");return e.style.display="flex",e.style.flexDirection="column",e.style.rowGap="1px",e.appendChild(document.createElement("div")),e.appendChild(document.createElement("div")),document.body.appendChild(e),o=1===e.scrollHeight,document.body.removeChild(e),o}},35181:function(e,t,a){var o=a(57904),r=a(2053),n=a(82187),l=a.n(n),i=a(77168),s=a(2021),u=a(75271),c=a(96820),p=a(83289),d=a(30107),g=a(38470),h=a(5663),P=a(21485),m=a(28800),b=a(50528),Z=a(81393),f=function(e,t){var a={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(a[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(a[o[r]]=e[o[r]])}return a},v="SECRET_COMBOBOX_MODE_DO_NOT_USE",E=function(e,t){var a,n=e.prefixCls,E=e.bordered,y=void 0===E||E,C=e.className,x=e.getPopupContainer,w=e.dropdownClassName,S=e.popupClassName,k=e.listHeight,T=void 0===k?256:k,_=e.placement,N=e.listItemHeight,M=void 0===N?32:N,O=e.size,I=e.disabled,U=e.notFoundContent,A=e.status,B=e.showArrow,R=f(e,["prefixCls","bordered","className","getPopupContainer","dropdownClassName","popupClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","showArrow"]),q=u.useContext(c.E_),K=q.getPopupContainer,L=q.getPrefixCls,D=q.renderEmpty,F=q.direction,H=q.virtual,W=q.dropdownMatchSelectWidth,G=u.useContext(g.Z),Q=L("select",n),j=L(),X=(0,Z.ri)(Q,F),V=X.compactSize,z=X.compactItemClassnames,Y=u.useMemo((function(){var e=R.mode;if("combobox"!==e)return e===v?"combobox":e}),[R.mode]),$="multiple"===Y||"tags"===Y,J=void 0!==B?B:R.loading||!($||"combobox"===Y),ee=(0,u.useContext)(h.aM),te=ee.status,ae=ee.hasFeedback,oe=ee.isFormItemInput,re=ee.feedbackIcon,ne=(0,m.F)(te,A);a=void 0!==U?U:"combobox"===Y?null:(D||p.Z)("Select");var le=(0,b.Z)((0,r.Z)((0,r.Z)({},R),{multiple:$,hasFeedback:ae,feedbackIcon:re,showArrow:J,prefixCls:Q})),ie=le.suffixIcon,se=le.itemIcon,ue=le.removeIcon,ce=le.clearIcon,pe=(0,s.Z)(R,["suffixIcon","itemIcon"]),de=l()(S||w,(0,o.Z)({},"".concat(Q,"-dropdown-").concat(F),"rtl"===F)),ge=V||O||G,he=u.useContext(d.Z),Pe=null!=I?I:he,me=l()((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},"".concat(Q,"-lg"),"large"===ge),"".concat(Q,"-sm"),"small"===ge),"".concat(Q,"-rtl"),"rtl"===F),"".concat(Q,"-borderless"),!y),"".concat(Q,"-in-form-item"),oe),(0,m.Z)(Q,ne,ae),z,C);return u.createElement(i.ZP,(0,r.Z)({ref:t,virtual:H,dropdownMatchSelectWidth:W},pe,{transitionName:(0,P.mL)(j,(0,P.q0)(_),R.transitionName),listHeight:T,listItemHeight:M,mode:Y,prefixCls:Q,placement:void 0!==_?_:"rtl"===F?"bottomRight":"bottomLeft",direction:F,inputIcon:ie,menuItemSelectedIcon:se,removeIcon:ue,clearIcon:ce,notFoundContent:a,className:me,getPopupContainer:x||K,dropdownClassName:de,showArrow:ae||B,disabled:Pe}))},y=u.forwardRef(E);y.SECRET_COMBOBOX_MODE_DO_NOT_USE=v,y.Option=i.Wx,y.OptGroup=i.Xo,t.Z=y},1260:function(e,t){var a={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=a.F1&&t<=a.F12)return!1;switch(t){case a.ALT:case a.CAPS_LOCK:case a.CONTEXT_MENU:case a.CTRL:case a.DOWN:case a.END:case a.ESC:case a.HOME:case a.INSERT:case a.LEFT:case a.MAC_FF_META:case a.META:case a.NUMLOCK:case a.NUM_CENTER:case a.PAGE_DOWN:case a.PAGE_UP:case a.PAUSE:case a.PRINT_SCREEN:case a.RIGHT:case a.SHIFT:case a.UP:case a.WIN_KEY:case a.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=a.ZERO&&e<=a.NINE)return!0;if(e>=a.NUM_ZERO&&e<=a.NUM_MULTIPLY)return!0;if(e>=a.A&&e<=a.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case a.SPACE:case a.QUESTION_MARK:case a.NUM_PLUS:case a.NUM_MINUS:case a.NUM_PERIOD:case a.NUM_DIVISION:case a.SEMICOLON:case a.DASH:case a.EQUALS:case a.COMMA:case a.PERIOD:case a.SLASH:case a.APOSTROPHE:case a.SINGLE_QUOTE:case a.OPEN_SQUARE_BRACKET:case a.BACKSLASH:case a.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};t.Z=a},41045:function(e,t,a){a.d(t,{Z:function(){return s}});var o=a(98037),r="".concat("accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap"," ").concat("onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError").split(/[\s\n]+/),n="aria-",l="data-";function i(e,t){return 0===e.indexOf(t)}function s(e){var t,a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t=!1===a?{aria:!0,data:!0,attr:!0}:!0===a?{aria:!0}:(0,o.Z)({},a);var s={};return Object.keys(e).forEach((function(a){(t.aria&&("role"===a||i(a,n))||t.data&&i(a,l)||t.attr&&r.includes(a))&&(s[a]=e[a])})),s}}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[6465,2096],{8429:function(e,t,n){"use strict";n.r(t);var o=n(48305),r=n.n(o),i=n(65609),a=n(20710),c=n(94978),s=n(69325),u=n(78060),l=n.n(u),d=n(32890),f=n(61508),p=n(45520),h=n(93481),v=n(75271),m=n(72317),g=n(52676),y=d.Z.Countdown;t.default=function(e){var t=e.systemInfo,n=(0,v.useState)(!1),o=r()(n,2),u=o[0],d=o[1],x=(0,v.useState)(""),b=r()(x,2),Z=b[0],P=b[1],_=(0,v.useRef)(),k=function(e){p.Z.confirm({width:500,title:m.ZP.get("更新"),content:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("div",{children:m.ZP.get("已经是最新版了!")}),(0,g.jsxs)("div",{style:{fontSize:12,fontWeight:400,marginTop:5},children:[m.ZP.get("青龙")," ",e.lastVersion," ",m.ZP.get("是目前检测到的最新可用版本了。")]})]}),okText:m.ZP.get("重新下载"),onOk:function(){w(),c.W.put("".concat(a.Z.apiPrefix,"system/update")).then((function(e){})).catch((function(e){console.log(e)}))}})},C=function(e){var n=e.lastVersion,o=e.lastLog;p.Z.confirm({width:500,title:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("div",{children:m.ZP.get("更新可用")}),(0,g.jsxs)("div",{style:{fontSize:12,fontWeight:400,marginTop:5},children:[m.ZP.get("新版本")," ",n," ",m.ZP.get("可用,你使用的版本为")," ",t.version,"。"]})]}),content:(0,g.jsx)("pre",{children:(0,g.jsx)(l(),{children:o})}),okText:m.ZP.get("下载更新"),cancelText:m.ZP.get("以后再说"),onOk:function(){w(),c.W.put("".concat(a.Z.apiPrefix,"system/update")).then((function(e){})).catch((function(e){console.log(e)}))}})},w=function(){P(""),_.current=p.Z.info({width:600,maskClosable:!1,closable:!1,keyboard:!1,okButtonProps:{disabled:!0},title:m.ZP.get("下载更新中..."),centered:!0,content:(0,g.jsx)("pre",{children:(0,g.jsx)(l(),{children:Z})})})},j=function(e){c.W.put("".concat(a.Z.apiPrefix,"update/").concat(e)).then((function(e){f.ZP.success({content:(0,g.jsxs)("span",{children:[m.ZP.get("系统将在"),(0,g.jsx)(y,{className:"inline-countdown",format:"ss",value:Date.now()+3e4}),m.ZP.get("秒后自动刷新")]}),duration:30}),(0,i.o4)(),setTimeout((function(){window.location.reload()}),3e4)})).catch((function(e){console.log(e)}))};(0,v.useEffect)((function(){if(Z){var e=Z.includes("失败,请检查");_.current.update({maskClosable:e,closable:e,okButtonProps:{disabled:!e},content:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("pre",{children:(0,g.jsx)(l(),{children:Z})}),(0,g.jsx)("div",{id:"log-identifier",style:{paddingBottom:5}})]})})}}),[Z]);var O=(0,v.useCallback)((function(e){var t=e.message;t.includes("失败,请检查")&&f.ZP.error(m.ZP.get("更新失败,请检查网络及日志或稍后再试")),setTimeout((function(){document.querySelector("#log-identifier").scrollIntoView({behavior:"smooth"})}),600),t.includes("更新包下载成功")&&setTimeout((function(){p.Z.confirm({width:600,maskClosable:!1,title:m.ZP.get("确认重启"),centered:!0,content:m.ZP.get("系统安装包下载成功,确认重启"),okText:m.ZP.get("重启"),onOk:function(){j("system")},onCancel:function(){_.current.update({maskClosable:!0,closable:!0,okButtonProps:{disabled:!1}})}})}),1e3),P((function(e){return"".concat(e).concat(t)}))}),[]);return(0,v.useEffect)((function(){var e=s.Z.getInstance();return e.subscribe("updateSystemVersion",O),function(){e.unsubscribe("updateSystemVersion",O)}}),[]),(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(h.Z,{type:"primary",onClick:function(){u||(d(!0),f.ZP.loading(m.ZP.get("检查更新中..."),0),c.W.put("".concat(a.Z.apiPrefix,"system/update-check")).then((function(e){var t=e.code,n=e.data;f.ZP.destroy(),200===t&&(n.hasNewVersion?C(n):k(n))})).catch((function(e){f.ZP.destroy(),console.log(e)})).finally((function(){d(!1)})))},children:m.ZP.get("检查更新")}),(0,g.jsx)(h.Z,{type:"primary",onClick:function(){return j("reload")},style:{marginLeft:8},children:m.ZP.get("重新启动")})]})}},73591:function(e,t,n){"use strict";n.r(t);var o=n(26068),r=n.n(o),i=n(48305),a=n.n(i),c=n(72317),s=n(75271),u=n(72338),l=n(61508),d=n(45520),f=n(94747),p=n(17082),h=n(56646),v=n(93481),m=n(35181),g=n(6367),y=n(71571),x=n(20710),b=n(94978),Z=n(8429),P=n(87105),_=(n(39817),n(79231)),k=n(84522),C=n(86443),w=n(19334),j=n.n(w),O=n(65609),I=n(52676),E={"log-remove-frequency":"logRemoveFrequency","cron-concurrency":"cronConcurrency"};t.default=function(e){var t=e.systemInfo,n=e.reloadTheme,o=localStorage.getItem("qinglong_dark_theme")||"auto",i=(0,s.useState)(),w=a()(i,2),S=w[0],F=w[1],N=u.Z.useForm(),T=a()(N,1)[0],M=(0,s.useState)(!1),R=a()(M,2),A=R[0],z=R[1],B=(0,C.default)(c.ZP.get("上传")),W=(0,C.default)(c.ZP.get("下载")),q=y||{},L=q.enable,H=q.disable,D=(q.exportGeneratedCSS,q.setFetchMethod),V=q.auto,G=function(e){b.W.put("".concat(x.Z.apiPrefix,"system/config/").concat(e),j()(S,E[e])).then((function(e){var t=e.code;e.data;200===t&&l.ZP.success(c.ZP.get("更新成功"))})).catch((function(e){console.log(e)}))};return(0,s.useEffect)((function(){b.W.get("".concat(x.Z.apiPrefix,"system/config")).then((function(e){var t=e.code,n=e.data;200===t&&n.info&&F(n.info)})).catch((function(e){console.log(e)}))}),[]),(0,I.jsxs)(u.Z,{layout:"vertical",form:T,children:[(0,I.jsx)(u.Z.Item,{label:c.ZP.get("主题"),name:"theme",initialValue:o,children:(0,I.jsxs)(f.ZP.Group,{onChange:function(e){var t=e.target.value;localStorage.setItem("qinglong_dark_theme",e.target.value),D(fetch),"dark"===t?L({}):"light"===t?H():V({}),n()},value:o,optionType:"button",buttonStyle:"solid",children:[(0,I.jsx)(f.ZP.Button,{value:"light",style:{width:70,textAlign:"center"},children:c.ZP.get("亮色")}),(0,I.jsx)(f.ZP.Button,{value:"dark",style:{width:66,textAlign:"center"},children:c.ZP.get("暗色")}),(0,I.jsx)(f.ZP.Button,{value:"auto",style:{width:129,textAlign:"center"},children:c.ZP.get("跟随系统")})]})}),(0,I.jsx)(u.Z.Item,{label:c.ZP.get("日志删除频率"),name:"frequency",tooltip:c.ZP.get("每x天自动删除x天以前的日志"),children:(0,I.jsxs)(p.Z.Group,{compact:!0,children:[(0,I.jsx)(h.Z,{addonBefore:c.ZP.get("每"),addonAfter:c.ZP.get("天"),style:{width:180},min:0,value:null==S?void 0:S.logRemoveFrequency,onChange:function(e){F(r()(r()({},S),{},{logRemoveFrequency:e}))}}),(0,I.jsx)(v.Z,{type:"primary",onClick:function(){G("log-remove-frequency")},style:{width:84},children:c.ZP.get("确认")})]})}),(0,I.jsx)(u.Z.Item,{label:c.ZP.get("定时任务并发数"),name:"frequency",children:(0,I.jsxs)(p.Z.Group,{compact:!0,children:[(0,I.jsx)(h.Z,{style:{width:180},min:1,value:null==S?void 0:S.cronConcurrency,onChange:function(e){F(r()(r()({},S),{},{cronConcurrency:e}))}}),(0,I.jsx)(v.Z,{type:"primary",onClick:function(){G("cron-concurrency")},style:{width:84},children:c.ZP.get("确认")})]})}),(0,I.jsx)(u.Z.Item,{label:c.ZP.get("语言"),name:"lang",children:(0,I.jsx)(m.Z,{defaultValue:localStorage.getItem("lang")||"",style:{width:264},onChange:function(e){localStorage.setItem("lang",e),setTimeout((function(){window.location.reload()}),500)},options:[{value:"",label:c.ZP.get("跟随系统")},{value:"zh",label:"简体中文"},{value:"en",label:"English"}]})}),(0,I.jsxs)(u.Z.Item,{label:c.ZP.get("数据备份还原"),name:"frequency",children:[(0,I.jsx)(v.Z,{type:"primary",onClick:function(){z(!0),b.W.put("".concat(x.Z.apiPrefix,"system/data/export"),{},{responseType:"blob",timeout:864e5,onDownloadProgress:function(e){e.progress&&W(parseFloat((100*e.progress).toFixed(1)))}}).then((function(e){(0,P.saveAs)(e,"data.tgz")})).catch((function(e){console.log(e)})).finally((function(){return z(!1)}))},loading:A,children:A?c.ZP.get("生成数据中..."):c.ZP.get("备份")}),(0,I.jsx)(g.Z,{method:"put",showUploadList:!1,maxCount:1,action:"".concat(x.Z.apiPrefix,"system/data/import"),onChange:function(e){var t=e.file,n=e.event;null!=n&&n.percent&&B(Math.min(parseFloat(null==n?void 0:n.percent.toFixed(1)),99)),"done"===t.status&&(B(100),d.Z.confirm({width:600,maskClosable:!1,title:c.ZP.get("确认重启"),centered:!0,content:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)("div",{children:c.ZP.get("备份数据上传成功,确认覆盖数据")}),(0,I.jsxs)("div",{children:[c.ZP.get("如果恢复失败,可进入容器执行")," ql reload data"]})]}),okText:c.ZP.get("重启"),onOk:function(){b.W.put("".concat(x.Z.apiPrefix,"update/data")).then((function(){l.ZP.success({content:(0,I.jsxs)("span",{children:[c.ZP.get("系统将在"),(0,I.jsx)(k.Z,{className:"inline-countdown",format:"ss",value:Date.now()+3e4}),c.ZP.get("秒后自动刷新")]}),duration:30}),(0,O.o4)(),setTimeout((function(){window.location.reload()}),3e4)})).catch((function(e){console.log(e)}))}})),"error"===t.status&&l.ZP.error("上传失败")},name:"data",headers:{Authorization:"Bearer ".concat(localStorage.getItem(x.Z.authKey))},children:(0,I.jsx)(v.Z,{icon:(0,I.jsx)(_.Z,{}),style:{marginLeft:8},children:c.ZP.get("还原数据")})})]}),(0,I.jsx)(u.Z.Item,{label:c.ZP.get("检查更新"),name:"update",children:(0,I.jsx)(Z.default,{systemInfo:t})})]})}},86443:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return u}});var o=n(72317),r=n(46016),i=n(45520),a=n(75271),c=n(52676),s=function(e){var t=e.percent;return(0,c.jsx)(r.Z,{style:{display:"flex",justifyContent:"center"},type:"circle",percent:t})};function u(e){var t=(0,a.useRef)();return function(n){t.current?(t.current.update({title:"".concat(e).concat(n>=100?o.ZP.get("成功"):o.ZP.get("中...")),content:(0,c.jsx)(s,{percent:n}),okButtonProps:{disabled:100!==n}}),100===n&&setTimeout((function(){var e;null===(e=t.current)||void 0===e||e.destroy(),t.current=null}))):t.current=i.Z.info({width:600,maskClosable:!1,title:"".concat(e).concat(n>=100?o.ZP.get("成功"):o.ZP.get("中...")),centered:!0,content:(0,c.jsx)(s,{percent:n}),okButtonProps:{disabled:!0}})}}},69325:function(e,t,n){"use strict";var o=n(15558),r=n.n(o),i=n(67825),a=n.n(i),c=n(90228),s=n.n(c),u=n(87999),l=n.n(u),d=n(25298),f=n.n(d),p=n(17069),h=n.n(p),v=n(82092),m=n.n(v),g=n(78078),y=n.n(g),x=["type"],b=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};f()(this,e),m()(this,"url",void 0),m()(this,"socket",null),m()(this,"subscriptions",new Map),m()(this,"options",void 0),m()(this,"reconnectAttempts",0),m()(this,"heartbeatTimeout",null),m()(this,"state","closed"),this.url=t,this.options={maxReconnectAttempts:n.maxReconnectAttempts||5,reconnectInterval:n.reconnectInterval||3e3,heartbeatInterval:n.heartbeatInterval||3e4},this.init()}var t,n;return h()(e,[{key:"init",value:(n=l()(s()().mark((function e(){var t=this;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,this.state="connecting",this.emit("connecting");case 3:if(!(this.reconnectAttempts<this.options.maxReconnectAttempts)){e.next=16;break}return this.socket=new(y())(this.url),this.setupEventListeners(),this.startHeartbeat(),e.next=9,this.waitForClose();case 9:return this.stopHeartbeat(),this.socket=null,this.reconnectAttempts++,e.next=14,new Promise((function(e){return setTimeout(e,t.options.reconnectInterval)}));case 14:e.next=3;break;case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),this.handleError(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,18]])}))),function(){return n.apply(this,arguments)})},{key:"setupEventListeners",value:function(){var e=this;this.socket&&(this.socket.onopen=function(){e.state="open",e.emit("open")},this.socket.onmessage=function(t){var n=JSON.parse(t.data);e.dispatchMessage(n)},this.socket.onclose=function(){e.state="closed",e.emit("close")})}},{key:"waitForClose",value:(t=l()(s()().mark((function e(){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((null===(t=this.socket)||void 0===t?void 0:t.readyState)===y().CLOSED){e.next=5;break}return e.next=3,new Promise((function(e){return setTimeout(e,100)}));case 3:e.next=0;break;case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"subscribe",value:function(e,t){var n=this.subscriptions.get(e)||new Set;if(!n.has(t)){n.add(t),this.subscriptions.set(e,n);var o={action:"subscribe",topic:e};this.send(o)}}},{key:"unsubscribe",value:function(e,t){var n=this.subscriptions.get(e)||new Set;if(n.has(t)){n.delete(t);var o={action:"unsubscribe",topic:e};this.send(o)}}},{key:"send",value:function(e){var t;(null===(t=this.socket)||void 0===t?void 0:t.readyState)===y().OPEN&&this.socket.send(JSON.stringify(e))}},{key:"dispatchMessage",value:function(e){var t=e.type,n=a()(e,x),o=this.subscriptions.get(t)||new Set;r()(o).forEach((function(e){return e(n)}))}},{key:"startHeartbeat",value:function(){var e=this;this.heartbeatTimeout=setInterval((function(){var t;(null===(t=e.socket)||void 0===t?void 0:t.readyState)===y().OPEN&&e.socket.send(JSON.stringify({type:"heartbeat"}))}),this.options.heartbeatInterval)}},{key:"stopHeartbeat",value:function(){this.heartbeatTimeout&&clearInterval(this.heartbeatTimeout)}},{key:"close",value:function(){this.socket&&(this.state="closed",this.stopHeartbeat(),this.socket.close(),this.emit("close"))}},{key:"handleError",value:function(e){console.error("WebSocket错误:",e),this.emit("error",e)}},{key:"on",value:function(e,t){}},{key:"emit",value:function(e,t){}}],[{key:"getInstance",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0;return e.instance||(e.instance=new e(t,n)),e.instance}}]),e}();m()(b,"instance",null),t.Z=b},39817:function(){},92767:function(e,t,n){"use strict";function o(e){return Object.keys(e).reduce((function(t,n){return!n.startsWith("data-")&&!n.startsWith("aria-")&&"role"!==n||n.startsWith("data-__")||(t[n]=e[n]),t}),{})}n.d(t,{Z:function(){return o}})},27916:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var o=n(99459),r=n(75271);function i(){var e=r.useReducer((function(e){return e+1}),0);return(0,o.Z)(e,2)[1]}},94747:function(e,t,n){"use strict";n.d(t,{ZP:function(){return S}});var o=n(2053),r=n(57904),i=n(99459),a=n(82187),c=n.n(a),s=n(6522),u=n(75271),l=n(96820),d=n(38470),f=n(92767),p=u.createContext(null),h=p.Provider,v=p,m=u.createContext(null),g=m.Provider,y=n(46206),x=n(3083),b=n(30107),Z=n(5663),P=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n},_=function(e,t){var n,i,a=u.useContext(v),s=u.useContext(m),d=u.useContext(l.E_),f=d.getPrefixCls,p=d.direction,h=u.useRef(),g=(0,x.sQ)(t,h),_=(0,u.useContext)(Z.aM).isFormItemInput,k=e.prefixCls,C=e.className,w=e.children,j=e.style,O=P(e,["prefixCls","className","children","style"]),I=f("radio",k),E="button"===((null==a?void 0:a.optionType)||s)?"".concat(I,"-button"):I,S=(0,o.Z)({},O),F=u.useContext(b.Z);a&&(S.name=a.name,S.onChange=function(t){var n,o;null===(n=e.onChange)||void 0===n||n.call(e,t),null===(o=null==a?void 0:a.onChange)||void 0===o||o.call(a,t)},S.checked=e.value===a.value,S.disabled=null!==(n=S.disabled)&&void 0!==n?n:a.disabled),S.disabled=null!==(i=S.disabled)&&void 0!==i?i:F;var N=c()("".concat(E,"-wrapper"),(0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)({},"".concat(E,"-wrapper-checked"),S.checked),"".concat(E,"-wrapper-disabled"),S.disabled),"".concat(E,"-wrapper-rtl"),"rtl"===p),"".concat(E,"-wrapper-in-form-item"),_),C);return u.createElement("label",{className:N,style:j,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave},u.createElement(y.Z,(0,o.Z)({},S,{type:"radio",prefixCls:E,ref:g})),void 0!==w?u.createElement("span",null,w):null)};var k=u.forwardRef(_),C=u.forwardRef((function(e,t){var n=u.useContext(l.E_),a=n.getPrefixCls,p=n.direction,v=u.useContext(d.Z),m=(0,s.Z)(e.defaultValue,{value:e.value}),g=(0,i.Z)(m,2),y=g[0],x=g[1],b=e.prefixCls,Z=e.className,P=void 0===Z?"":Z,_=e.options,C=e.buttonStyle,w=void 0===C?"outline":C,j=e.disabled,O=e.children,I=e.size,E=e.style,S=e.id,F=e.onMouseEnter,N=e.onMouseLeave,T=e.onFocus,M=e.onBlur,R=a("radio",b),A="".concat(R,"-group"),z=O;_&&_.length>0&&(z=_.map((function(e){return"string"==typeof e||"number"==typeof e?u.createElement(k,{key:e.toString(),prefixCls:R,disabled:j,value:e,checked:y===e},e):u.createElement(k,{key:"radio-group-value-options-".concat(e.value),prefixCls:R,disabled:e.disabled||j,value:e.value,checked:y===e.value,style:e.style},e.label)})));var B=I||v,W=c()(A,"".concat(A,"-").concat(w),(0,r.Z)((0,r.Z)({},"".concat(A,"-").concat(B),B),"".concat(A,"-rtl"),"rtl"===p),P);return u.createElement("div",(0,o.Z)({},(0,f.Z)(e),{className:W,style:E,onMouseEnter:F,onMouseLeave:N,onFocus:T,onBlur:M,id:S,ref:t}),u.createElement(h,{value:{onChange:function(t){var n=y,o=t.target.value;"value"in e||x(o);var r=e.onChange;r&&o!==n&&r(t)},value:y,disabled:e.disabled,name:e.name,optionType:e.optionType}},z))})),w=u.memo(C),j=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n},O=function(e,t){var n=u.useContext(l.E_).getPrefixCls,r=e.prefixCls,i=j(e,["prefixCls"]),a=n("radio",r);return u.createElement(g,{value:"button"},u.createElement(k,(0,o.Z)({prefixCls:a},i,{type:"radio",ref:t})))},I=u.forwardRef(O),E=k;E.Button=I,E.Group=w,E.__ANT_RADIO=!0;var S=E},35181:function(e,t,n){"use strict";var o=n(57904),r=n(2053),i=n(82187),a=n.n(i),c=n(77168),s=n(2021),u=n(75271),l=n(96820),d=n(83289),f=n(30107),p=n(38470),h=n(5663),v=n(21485),m=n(28800),g=n(50528),y=n(81393),x=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n},b="SECRET_COMBOBOX_MODE_DO_NOT_USE",Z=function(e,t){var n,i=e.prefixCls,Z=e.bordered,P=void 0===Z||Z,_=e.className,k=e.getPopupContainer,C=e.dropdownClassName,w=e.popupClassName,j=e.listHeight,O=void 0===j?256:j,I=e.placement,E=e.listItemHeight,S=void 0===E?32:E,F=e.size,N=e.disabled,T=e.notFoundContent,M=e.status,R=e.showArrow,A=x(e,["prefixCls","bordered","className","getPopupContainer","dropdownClassName","popupClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","showArrow"]),z=u.useContext(l.E_),B=z.getPopupContainer,W=z.getPrefixCls,q=z.renderEmpty,L=z.direction,H=z.virtual,D=z.dropdownMatchSelectWidth,V=u.useContext(p.Z),G=W("select",i),$=W(),J=(0,y.ri)(G,L),U=J.compactSize,X=J.compactItemClassnames,K=u.useMemo((function(){var e=A.mode;if("combobox"!==e)return e===b?"combobox":e}),[A.mode]),Q="multiple"===K||"tags"===K,Y=void 0!==R?R:A.loading||!(Q||"combobox"===K),ee=(0,u.useContext)(h.aM),te=ee.status,ne=ee.hasFeedback,oe=ee.isFormItemInput,re=ee.feedbackIcon,ie=(0,m.F)(te,M);n=void 0!==T?T:"combobox"===K?null:(q||d.Z)("Select");var ae=(0,g.Z)((0,r.Z)((0,r.Z)({},A),{multiple:Q,hasFeedback:ne,feedbackIcon:re,showArrow:Y,prefixCls:G})),ce=ae.suffixIcon,se=ae.itemIcon,ue=ae.removeIcon,le=ae.clearIcon,de=(0,s.Z)(A,["suffixIcon","itemIcon"]),fe=a()(w||C,(0,o.Z)({},"".concat(G,"-dropdown-").concat(L),"rtl"===L)),pe=U||F||V,he=u.useContext(f.Z),ve=null!=N?N:he,me=a()((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},"".concat(G,"-lg"),"large"===pe),"".concat(G,"-sm"),"small"===pe),"".concat(G,"-rtl"),"rtl"===L),"".concat(G,"-borderless"),!P),"".concat(G,"-in-form-item"),oe),(0,m.Z)(G,ie,ne),X,_);return u.createElement(c.ZP,(0,r.Z)({ref:t,virtual:H,dropdownMatchSelectWidth:D},de,{transitionName:(0,v.mL)($,(0,v.q0)(I),A.transitionName),listHeight:O,listItemHeight:S,mode:K,prefixCls:G,placement:void 0!==I?I:"rtl"===L?"bottomRight":"bottomLeft",direction:L,inputIcon:ce,menuItemSelectedIcon:se,removeIcon:ue,clearIcon:le,notFoundContent:n,className:me,getPopupContainer:k||B,dropdownClassName:fe,showArrow:ne||R,disabled:ve}))},P=u.forwardRef(Z);P.SECRET_COMBOBOX_MODE_DO_NOT_USE=b,P.Option=c.Wx,P.OptGroup=c.Xo,t.Z=P},88987:function(e,t,n){var o=n(71519),r=n(82999),i=n(76111),a=n(50506),c=n(80845);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}s.prototype.clear=o,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=c,e.exports=s},175:function(e,t,n){var o=n(2173),r=n(33752),i=n(10548),a=n(63410),c=n(3564);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}s.prototype.clear=o,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=c,e.exports=s},35922:function(e,t,n){var o=n(47758)(n(29165),"Map");e.exports=o},9440:function(e,t,n){var o=n(7140),r=n(56504),i=n(88833),a=n(80953),c=n(70724);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}s.prototype.clear=o,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=c,e.exports=s},28486:function(e){e.exports=function(e,t){for(var n=-1,o=t.length,r=e.length;++n<o;)e[r+n]=t[n];return e}},62718:function(e,t,n){var o=n(42448);e.exports=function(e,t){for(var n=e.length;n--;)if(o(e[n][0],t))return n;return-1}},84742:function(e,t,n){var o=n(80732),r=n(55073);e.exports=function(e){return r(e)&&"[object Arguments]"==o(e)}},58939:function(e,t,n){var o=n(92042),r=n(90654),i=n(36838),a=n(51059),c=/^\[object .+?Constructor\]$/,s=Function.prototype,u=Object.prototype,l=s.toString,d=u.hasOwnProperty,f=RegExp("^"+l.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||r(e))&&(o(e)?f:c).test(a(e))}},36633:function(e,t,n){var o=n(29165)["__core-js_shared__"];e.exports=o},67707:function(e,t,n){var o=n(3880);e.exports=function(e,t){var n=e.__data__;return o(t)?n["string"==typeof t?"string":"hash"]:n.map}},47758:function(e,t,n){var o=n(58939),r=n(9149);e.exports=function(e,t){var n=r(e,t);return o(n)?n:void 0}},9149:function(e){e.exports=function(e,t){return null==e?void 0:e[t]}},71519:function(e,t,n){var o=n(37722);e.exports=function(){this.__data__=o?o(null):{},this.size=0}},82999:function(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},76111:function(e,t,n){var o=n(37722),r=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(o){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return r.call(t,e)?t[e]:void 0}},50506:function(e,t,n){var o=n(37722),r=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return o?void 0!==t[e]:r.call(t,e)}},80845:function(e,t,n){var o=n(37722);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=o&&void 0===t?"__lodash_hash_undefined__":t,this}},91010:function(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var o=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==o||"symbol"!=o&&t.test(e))&&e>-1&&e%1==0&&e<n}},3880:function(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},90654:function(e,t,n){var o,r=n(36633),i=(o=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"";e.exports=function(e){return!!i&&i in e}},2173:function(e){e.exports=function(){this.__data__=[],this.size=0}},33752:function(e,t,n){var o=n(62718),r=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=o(t,e);return!(n<0)&&(n==t.length-1?t.pop():r.call(t,n,1),--this.size,!0)}},10548:function(e,t,n){var o=n(62718);e.exports=function(e){var t=this.__data__,n=o(t,e);return n<0?void 0:t[n][1]}},63410:function(e,t,n){var o=n(62718);e.exports=function(e){return o(this.__data__,e)>-1}},3564:function(e,t,n){var o=n(62718);e.exports=function(e,t){var n=this.__data__,r=o(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}},7140:function(e,t,n){var o=n(88987),r=n(175),i=n(35922);e.exports=function(){this.size=0,this.__data__={hash:new o,map:new(i||r),string:new o}}},56504:function(e,t,n){var o=n(67707);e.exports=function(e){var t=o(this,e).delete(e);return this.size-=t?1:0,t}},88833:function(e,t,n){var o=n(67707);e.exports=function(e){return o(this,e).get(e)}},80953:function(e,t,n){var o=n(67707);e.exports=function(e){return o(this,e).has(e)}},70724:function(e,t,n){var o=n(67707);e.exports=function(e,t){var n=o(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}},37722:function(e,t,n){var o=n(47758)(Object,"create");e.exports=o},51059:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},42448:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},30353:function(e,t,n){var o=n(84742),r=n(55073),i=Object.prototype,a=i.hasOwnProperty,c=i.propertyIsEnumerable,s=o(function(){return arguments}())?o:function(e){return r(e)&&a.call(e,"callee")&&!c.call(e,"callee")};e.exports=s},92042:function(e,t,n){var o=n(80732),r=n(36838);e.exports=function(e){if(!r(e))return!1;var t=o(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},17216:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},46206:function(e,t,n){"use strict";var o=n(2053),r=n(98037),i=n(57904),a=n(99459),c=n(53162),s=n(82187),u=n.n(s),l=n(6522),d=n(75271),f=["prefixCls","className","style","checked","disabled","defaultChecked","type","onChange"],p=(0,d.forwardRef)((function(e,t){var n,s=e.prefixCls,p=void 0===s?"rc-checkbox":s,h=e.className,v=e.style,m=e.checked,g=e.disabled,y=e.defaultChecked,x=void 0!==y&&y,b=e.type,Z=void 0===b?"checkbox":b,P=e.onChange,_=(0,c.Z)(e,f),k=(0,d.useRef)(null),C=(0,l.Z)(x,{value:m}),w=(0,a.Z)(C,2),j=w[0],O=w[1];(0,d.useImperativeHandle)(t,(function(){return{focus:function(){var e;null===(e=k.current)||void 0===e||e.focus()},blur:function(){var e;null===(e=k.current)||void 0===e||e.blur()},input:k.current}}));var I=u()(p,h,(n={},(0,i.Z)(n,"".concat(p,"-checked"),j),(0,i.Z)(n,"".concat(p,"-disabled"),g),n));return d.createElement("span",{className:I,style:v},d.createElement("input",(0,o.Z)({},_,{className:"".concat(p,"-input"),ref:k,onChange:function(t){g||("checked"in e||O(t.target.checked),null==P||P({target:(0,r.Z)((0,r.Z)({},e),{},{type:Z,checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:g,checked:!!j,type:Z})),d.createElement("span",{className:"".concat(p,"-inner")}))}));t.Z=p}}]);
1
+ (self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[6465,2096],{73236:function(e,t,n){"use strict";n.r(t);var o=n(48305),r=n.n(o),i=n(52076),a=n(3475),c=n(16314),s=n(65814),u=n(78060),l=n.n(u),d=n(32890),f=n(61508),p=n(45520),h=n(93481),v=n(75271),m=n(72317),g=n(52676),y=d.Z.Countdown;t.default=function(e){var t=e.systemInfo,n=(0,v.useState)(!1),o=r()(n,2),u=o[0],d=o[1],x=(0,v.useState)(""),b=r()(x,2),Z=b[0],P=b[1],_=(0,v.useRef)(),k=function(e){p.Z.confirm({width:500,title:m.ZP.get("更新"),content:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("div",{children:m.ZP.get("已经是最新版了!")}),(0,g.jsxs)("div",{style:{fontSize:12,fontWeight:400,marginTop:5},children:[m.ZP.get("青龙")," ",e.lastVersion," ",m.ZP.get("是目前检测到的最新可用版本了。")]})]}),okText:m.ZP.get("重新下载"),onOk:function(){w(),c.W.put("".concat(a.Z.apiPrefix,"system/update")).then((function(e){})).catch((function(e){console.log(e)}))}})},C=function(e){var n=e.lastVersion,o=e.lastLog;p.Z.confirm({width:500,title:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("div",{children:m.ZP.get("更新可用")}),(0,g.jsxs)("div",{style:{fontSize:12,fontWeight:400,marginTop:5},children:[m.ZP.get("新版本")," ",n," ",m.ZP.get("可用,你使用的版本为")," ",t.version,"。"]})]}),content:(0,g.jsx)("pre",{children:(0,g.jsx)(l(),{children:o})}),okText:m.ZP.get("下载更新"),cancelText:m.ZP.get("以后再说"),onOk:function(){w(),c.W.put("".concat(a.Z.apiPrefix,"system/update")).then((function(e){})).catch((function(e){console.log(e)}))}})},w=function(){P(""),_.current=p.Z.info({width:600,maskClosable:!1,closable:!1,keyboard:!1,okButtonProps:{disabled:!0},title:m.ZP.get("下载更新中..."),centered:!0,content:(0,g.jsx)("pre",{children:(0,g.jsx)(l(),{children:Z})})})},j=function(e){c.W.put("".concat(a.Z.apiPrefix,"update/").concat(e)).then((function(e){f.ZP.success({content:(0,g.jsxs)("span",{children:[m.ZP.get("系统将在"),(0,g.jsx)(y,{className:"inline-countdown",format:"ss",value:Date.now()+3e4}),m.ZP.get("秒后自动刷新")]}),duration:30}),(0,i.o4)(),setTimeout((function(){window.location.reload()}),3e4)})).catch((function(e){console.log(e)}))};(0,v.useEffect)((function(){if(Z){var e=Z.includes("失败,请检查");_.current.update({maskClosable:e,closable:e,okButtonProps:{disabled:!e},content:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)("pre",{children:(0,g.jsx)(l(),{children:Z})}),(0,g.jsx)("div",{id:"log-identifier",style:{paddingBottom:5}})]})})}}),[Z]);var O=(0,v.useCallback)((function(e){var t=e.message;t.includes("失败,请检查")&&f.ZP.error(m.ZP.get("更新失败,请检查网络及日志或稍后再试")),setTimeout((function(){document.querySelector("#log-identifier").scrollIntoView({behavior:"smooth"})}),600),t.includes("更新包下载成功")&&setTimeout((function(){p.Z.confirm({width:600,maskClosable:!1,title:m.ZP.get("确认重启"),centered:!0,content:m.ZP.get("系统安装包下载成功,确认重启"),okText:m.ZP.get("重启"),onOk:function(){j("system")},onCancel:function(){_.current.update({maskClosable:!0,closable:!0,okButtonProps:{disabled:!1}})}})}),1e3),P((function(e){return"".concat(e).concat(t)}))}),[]);return(0,v.useEffect)((function(){var e=s.Z.getInstance();return e.subscribe("updateSystemVersion",O),function(){e.unsubscribe("updateSystemVersion",O)}}),[]),(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(h.Z,{type:"primary",onClick:function(){u||(d(!0),f.ZP.loading(m.ZP.get("检查更新中..."),0),c.W.put("".concat(a.Z.apiPrefix,"system/update-check")).then((function(e){var t=e.code,n=e.data;f.ZP.destroy(),200===t&&(n.hasNewVersion?C(n):k(n))})).catch((function(e){f.ZP.destroy(),console.log(e)})).finally((function(){d(!1)})))},children:m.ZP.get("检查更新")}),(0,g.jsx)(h.Z,{type:"primary",onClick:function(){return j("reload")},style:{marginLeft:8},children:m.ZP.get("重新启动")})]})}},85657:function(e,t,n){"use strict";n.r(t);var o=n(26068),r=n.n(o),i=n(48305),a=n.n(i),c=n(72317),s=n(75271),u=n(72338),l=n(61508),d=n(45520),f=n(94747),p=n(17082),h=n(56646),v=n(93481),m=n(35181),g=n(6367),y=n(71571),x=n(3475),b=n(16314),Z=n(73236),P=n(87105),_=(n(68251),n(79231)),k=n(84522),C=n(32916),w=n(19334),j=n.n(w),O=n(52076),I=n(52676),E={"log-remove-frequency":"logRemoveFrequency","cron-concurrency":"cronConcurrency"};t.default=function(e){var t=e.systemInfo,n=e.reloadTheme,o=localStorage.getItem("qinglong_dark_theme")||"auto",i=(0,s.useState)(),w=a()(i,2),S=w[0],F=w[1],N=u.Z.useForm(),T=a()(N,1)[0],M=(0,s.useState)(!1),R=a()(M,2),A=R[0],z=R[1],B=(0,C.default)(c.ZP.get("上传")),W=(0,C.default)(c.ZP.get("下载")),q=y||{},L=q.enable,H=q.disable,D=(q.exportGeneratedCSS,q.setFetchMethod),V=q.auto,G=function(e){b.W.put("".concat(x.Z.apiPrefix,"system/config/").concat(e),j()(S,E[e])).then((function(e){var t=e.code;e.data;200===t&&l.ZP.success(c.ZP.get("更新成功"))})).catch((function(e){console.log(e)}))};return(0,s.useEffect)((function(){b.W.get("".concat(x.Z.apiPrefix,"system/config")).then((function(e){var t=e.code,n=e.data;200===t&&n.info&&F(n.info)})).catch((function(e){console.log(e)}))}),[]),(0,I.jsxs)(u.Z,{layout:"vertical",form:T,children:[(0,I.jsx)(u.Z.Item,{label:c.ZP.get("主题"),name:"theme",initialValue:o,children:(0,I.jsxs)(f.ZP.Group,{onChange:function(e){var t=e.target.value;localStorage.setItem("qinglong_dark_theme",e.target.value),D(fetch),"dark"===t?L({}):"light"===t?H():V({}),n()},value:o,optionType:"button",buttonStyle:"solid",children:[(0,I.jsx)(f.ZP.Button,{value:"light",style:{width:70,textAlign:"center"},children:c.ZP.get("亮色")}),(0,I.jsx)(f.ZP.Button,{value:"dark",style:{width:66,textAlign:"center"},children:c.ZP.get("暗色")}),(0,I.jsx)(f.ZP.Button,{value:"auto",style:{width:129,textAlign:"center"},children:c.ZP.get("跟随系统")})]})}),(0,I.jsx)(u.Z.Item,{label:c.ZP.get("日志删除频率"),name:"frequency",tooltip:c.ZP.get("每x天自动删除x天以前的日志"),children:(0,I.jsxs)(p.Z.Group,{compact:!0,children:[(0,I.jsx)(h.Z,{addonBefore:c.ZP.get("每"),addonAfter:c.ZP.get("天"),style:{width:180},min:0,value:null==S?void 0:S.logRemoveFrequency,onChange:function(e){F(r()(r()({},S),{},{logRemoveFrequency:e}))}}),(0,I.jsx)(v.Z,{type:"primary",onClick:function(){G("log-remove-frequency")},style:{width:84},children:c.ZP.get("确认")})]})}),(0,I.jsx)(u.Z.Item,{label:c.ZP.get("定时任务并发数"),name:"frequency",children:(0,I.jsxs)(p.Z.Group,{compact:!0,children:[(0,I.jsx)(h.Z,{style:{width:180},min:1,value:null==S?void 0:S.cronConcurrency,onChange:function(e){F(r()(r()({},S),{},{cronConcurrency:e}))}}),(0,I.jsx)(v.Z,{type:"primary",onClick:function(){G("cron-concurrency")},style:{width:84},children:c.ZP.get("确认")})]})}),(0,I.jsx)(u.Z.Item,{label:c.ZP.get("语言"),name:"lang",children:(0,I.jsx)(m.Z,{defaultValue:localStorage.getItem("lang")||"",style:{width:264},onChange:function(e){localStorage.setItem("lang",e),setTimeout((function(){window.location.reload()}),500)},options:[{value:"",label:c.ZP.get("跟随系统")},{value:"zh",label:"简体中文"},{value:"en",label:"English"}]})}),(0,I.jsxs)(u.Z.Item,{label:c.ZP.get("数据备份还原"),name:"frequency",children:[(0,I.jsx)(v.Z,{type:"primary",onClick:function(){z(!0),b.W.put("".concat(x.Z.apiPrefix,"system/data/export"),{},{responseType:"blob",timeout:864e5,onDownloadProgress:function(e){e.progress&&W(parseFloat((100*e.progress).toFixed(1)))}}).then((function(e){(0,P.saveAs)(e,"data.tgz")})).catch((function(e){console.log(e)})).finally((function(){return z(!1)}))},loading:A,children:A?c.ZP.get("生成数据中..."):c.ZP.get("备份")}),(0,I.jsx)(g.Z,{method:"put",showUploadList:!1,maxCount:1,action:"".concat(x.Z.apiPrefix,"system/data/import"),onChange:function(e){var t=e.file,n=e.event;null!=n&&n.percent&&B(Math.min(parseFloat(null==n?void 0:n.percent.toFixed(1)),99)),"done"===t.status&&(B(100),d.Z.confirm({width:600,maskClosable:!1,title:c.ZP.get("确认重启"),centered:!0,content:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)("div",{children:c.ZP.get("备份数据上传成功,确认覆盖数据")}),(0,I.jsxs)("div",{children:[c.ZP.get("如果恢复失败,可进入容器执行")," ql reload data"]})]}),okText:c.ZP.get("重启"),onOk:function(){b.W.put("".concat(x.Z.apiPrefix,"update/data")).then((function(){l.ZP.success({content:(0,I.jsxs)("span",{children:[c.ZP.get("系统将在"),(0,I.jsx)(k.Z,{className:"inline-countdown",format:"ss",value:Date.now()+3e4}),c.ZP.get("秒后自动刷新")]}),duration:30}),(0,O.o4)(),setTimeout((function(){window.location.reload()}),3e4)})).catch((function(e){console.log(e)}))}})),"error"===t.status&&l.ZP.error("上传失败")},name:"data",headers:{Authorization:"Bearer ".concat(localStorage.getItem(x.Z.authKey))},children:(0,I.jsx)(v.Z,{icon:(0,I.jsx)(_.Z,{}),style:{marginLeft:8},children:c.ZP.get("还原数据")})})]}),(0,I.jsx)(u.Z.Item,{label:c.ZP.get("检查更新"),name:"update",children:(0,I.jsx)(Z.default,{systemInfo:t})})]})}},32916:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return u}});var o=n(72317),r=n(46016),i=n(45520),a=n(75271),c=n(52676),s=function(e){var t=e.percent;return(0,c.jsx)(r.Z,{style:{display:"flex",justifyContent:"center"},type:"circle",percent:t})};function u(e){var t=(0,a.useRef)();return function(n){t.current?(t.current.update({title:"".concat(e).concat(n>=100?o.ZP.get("成功"):o.ZP.get("中...")),content:(0,c.jsx)(s,{percent:n}),okButtonProps:{disabled:100!==n}}),100===n&&setTimeout((function(){var e;null===(e=t.current)||void 0===e||e.destroy(),t.current=null}))):t.current=i.Z.info({width:600,maskClosable:!1,title:"".concat(e).concat(n>=100?o.ZP.get("成功"):o.ZP.get("中...")),centered:!0,content:(0,c.jsx)(s,{percent:n}),okButtonProps:{disabled:!0}})}}},65814:function(e,t,n){"use strict";var o=n(15558),r=n.n(o),i=n(67825),a=n.n(i),c=n(90228),s=n.n(c),u=n(87999),l=n.n(u),d=n(25298),f=n.n(d),p=n(17069),h=n.n(p),v=n(82092),m=n.n(v),g=n(78078),y=n.n(g),x=["type"],b=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};f()(this,e),m()(this,"url",void 0),m()(this,"socket",null),m()(this,"subscriptions",new Map),m()(this,"options",void 0),m()(this,"reconnectAttempts",0),m()(this,"heartbeatTimeout",null),m()(this,"state","closed"),this.url=t,this.options={maxReconnectAttempts:n.maxReconnectAttempts||5,reconnectInterval:n.reconnectInterval||3e3,heartbeatInterval:n.heartbeatInterval||3e4},this.init()}var t,n;return h()(e,[{key:"init",value:(n=l()(s()().mark((function e(){var t=this;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,this.state="connecting",this.emit("connecting");case 3:if(!(this.reconnectAttempts<this.options.maxReconnectAttempts)){e.next=16;break}return this.socket=new(y())(this.url),this.setupEventListeners(),this.startHeartbeat(),e.next=9,this.waitForClose();case 9:return this.stopHeartbeat(),this.socket=null,this.reconnectAttempts++,e.next=14,new Promise((function(e){return setTimeout(e,t.options.reconnectInterval)}));case 14:e.next=3;break;case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),this.handleError(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,18]])}))),function(){return n.apply(this,arguments)})},{key:"setupEventListeners",value:function(){var e=this;this.socket&&(this.socket.onopen=function(){e.state="open",e.emit("open")},this.socket.onmessage=function(t){var n=JSON.parse(t.data);e.dispatchMessage(n)},this.socket.onclose=function(){e.state="closed",e.emit("close")})}},{key:"waitForClose",value:(t=l()(s()().mark((function e(){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((null===(t=this.socket)||void 0===t?void 0:t.readyState)===y().CLOSED){e.next=5;break}return e.next=3,new Promise((function(e){return setTimeout(e,100)}));case 3:e.next=0;break;case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"subscribe",value:function(e,t){var n=this.subscriptions.get(e)||new Set;if(!n.has(t)){n.add(t),this.subscriptions.set(e,n);var o={action:"subscribe",topic:e};this.send(o)}}},{key:"unsubscribe",value:function(e,t){var n=this.subscriptions.get(e)||new Set;if(n.has(t)){n.delete(t);var o={action:"unsubscribe",topic:e};this.send(o)}}},{key:"send",value:function(e){var t;(null===(t=this.socket)||void 0===t?void 0:t.readyState)===y().OPEN&&this.socket.send(JSON.stringify(e))}},{key:"dispatchMessage",value:function(e){var t=e.type,n=a()(e,x),o=this.subscriptions.get(t)||new Set;r()(o).forEach((function(e){return e(n)}))}},{key:"startHeartbeat",value:function(){var e=this;this.heartbeatTimeout=setInterval((function(){var t;(null===(t=e.socket)||void 0===t?void 0:t.readyState)===y().OPEN&&e.socket.send(JSON.stringify({type:"heartbeat"}))}),this.options.heartbeatInterval)}},{key:"stopHeartbeat",value:function(){this.heartbeatTimeout&&clearInterval(this.heartbeatTimeout)}},{key:"close",value:function(){this.socket&&(this.state="closed",this.stopHeartbeat(),this.socket.close(),this.emit("close"))}},{key:"handleError",value:function(e){console.error("WebSocket错误:",e),this.emit("error",e)}},{key:"on",value:function(e,t){}},{key:"emit",value:function(e,t){}}],[{key:"getInstance",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0;return e.instance||(e.instance=new e(t,n)),e.instance}}]),e}();m()(b,"instance",null),t.Z=b},68251:function(){},92767:function(e,t,n){"use strict";function o(e){return Object.keys(e).reduce((function(t,n){return!n.startsWith("data-")&&!n.startsWith("aria-")&&"role"!==n||n.startsWith("data-__")||(t[n]=e[n]),t}),{})}n.d(t,{Z:function(){return o}})},27916:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var o=n(99459),r=n(75271);function i(){var e=r.useReducer((function(e){return e+1}),0);return(0,o.Z)(e,2)[1]}},94747:function(e,t,n){"use strict";n.d(t,{ZP:function(){return S}});var o=n(2053),r=n(57904),i=n(99459),a=n(82187),c=n.n(a),s=n(6522),u=n(75271),l=n(96820),d=n(38470),f=n(92767),p=u.createContext(null),h=p.Provider,v=p,m=u.createContext(null),g=m.Provider,y=n(46206),x=n(3083),b=n(30107),Z=n(5663),P=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n},_=function(e,t){var n,i,a=u.useContext(v),s=u.useContext(m),d=u.useContext(l.E_),f=d.getPrefixCls,p=d.direction,h=u.useRef(),g=(0,x.sQ)(t,h),_=(0,u.useContext)(Z.aM).isFormItemInput,k=e.prefixCls,C=e.className,w=e.children,j=e.style,O=P(e,["prefixCls","className","children","style"]),I=f("radio",k),E="button"===((null==a?void 0:a.optionType)||s)?"".concat(I,"-button"):I,S=(0,o.Z)({},O),F=u.useContext(b.Z);a&&(S.name=a.name,S.onChange=function(t){var n,o;null===(n=e.onChange)||void 0===n||n.call(e,t),null===(o=null==a?void 0:a.onChange)||void 0===o||o.call(a,t)},S.checked=e.value===a.value,S.disabled=null!==(n=S.disabled)&&void 0!==n?n:a.disabled),S.disabled=null!==(i=S.disabled)&&void 0!==i?i:F;var N=c()("".concat(E,"-wrapper"),(0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)({},"".concat(E,"-wrapper-checked"),S.checked),"".concat(E,"-wrapper-disabled"),S.disabled),"".concat(E,"-wrapper-rtl"),"rtl"===p),"".concat(E,"-wrapper-in-form-item"),_),C);return u.createElement("label",{className:N,style:j,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave},u.createElement(y.Z,(0,o.Z)({},S,{type:"radio",prefixCls:E,ref:g})),void 0!==w?u.createElement("span",null,w):null)};var k=u.forwardRef(_),C=u.forwardRef((function(e,t){var n=u.useContext(l.E_),a=n.getPrefixCls,p=n.direction,v=u.useContext(d.Z),m=(0,s.Z)(e.defaultValue,{value:e.value}),g=(0,i.Z)(m,2),y=g[0],x=g[1],b=e.prefixCls,Z=e.className,P=void 0===Z?"":Z,_=e.options,C=e.buttonStyle,w=void 0===C?"outline":C,j=e.disabled,O=e.children,I=e.size,E=e.style,S=e.id,F=e.onMouseEnter,N=e.onMouseLeave,T=e.onFocus,M=e.onBlur,R=a("radio",b),A="".concat(R,"-group"),z=O;_&&_.length>0&&(z=_.map((function(e){return"string"==typeof e||"number"==typeof e?u.createElement(k,{key:e.toString(),prefixCls:R,disabled:j,value:e,checked:y===e},e):u.createElement(k,{key:"radio-group-value-options-".concat(e.value),prefixCls:R,disabled:e.disabled||j,value:e.value,checked:y===e.value,style:e.style},e.label)})));var B=I||v,W=c()(A,"".concat(A,"-").concat(w),(0,r.Z)((0,r.Z)({},"".concat(A,"-").concat(B),B),"".concat(A,"-rtl"),"rtl"===p),P);return u.createElement("div",(0,o.Z)({},(0,f.Z)(e),{className:W,style:E,onMouseEnter:F,onMouseLeave:N,onFocus:T,onBlur:M,id:S,ref:t}),u.createElement(h,{value:{onChange:function(t){var n=y,o=t.target.value;"value"in e||x(o);var r=e.onChange;r&&o!==n&&r(t)},value:y,disabled:e.disabled,name:e.name,optionType:e.optionType}},z))})),w=u.memo(C),j=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n},O=function(e,t){var n=u.useContext(l.E_).getPrefixCls,r=e.prefixCls,i=j(e,["prefixCls"]),a=n("radio",r);return u.createElement(g,{value:"button"},u.createElement(k,(0,o.Z)({prefixCls:a},i,{type:"radio",ref:t})))},I=u.forwardRef(O),E=k;E.Button=I,E.Group=w,E.__ANT_RADIO=!0;var S=E},35181:function(e,t,n){"use strict";var o=n(57904),r=n(2053),i=n(82187),a=n.n(i),c=n(77168),s=n(2021),u=n(75271),l=n(96820),d=n(83289),f=n(30107),p=n(38470),h=n(5663),v=n(21485),m=n(28800),g=n(50528),y=n(81393),x=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n},b="SECRET_COMBOBOX_MODE_DO_NOT_USE",Z=function(e,t){var n,i=e.prefixCls,Z=e.bordered,P=void 0===Z||Z,_=e.className,k=e.getPopupContainer,C=e.dropdownClassName,w=e.popupClassName,j=e.listHeight,O=void 0===j?256:j,I=e.placement,E=e.listItemHeight,S=void 0===E?32:E,F=e.size,N=e.disabled,T=e.notFoundContent,M=e.status,R=e.showArrow,A=x(e,["prefixCls","bordered","className","getPopupContainer","dropdownClassName","popupClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","showArrow"]),z=u.useContext(l.E_),B=z.getPopupContainer,W=z.getPrefixCls,q=z.renderEmpty,L=z.direction,H=z.virtual,D=z.dropdownMatchSelectWidth,V=u.useContext(p.Z),G=W("select",i),$=W(),J=(0,y.ri)(G,L),U=J.compactSize,X=J.compactItemClassnames,K=u.useMemo((function(){var e=A.mode;if("combobox"!==e)return e===b?"combobox":e}),[A.mode]),Q="multiple"===K||"tags"===K,Y=void 0!==R?R:A.loading||!(Q||"combobox"===K),ee=(0,u.useContext)(h.aM),te=ee.status,ne=ee.hasFeedback,oe=ee.isFormItemInput,re=ee.feedbackIcon,ie=(0,m.F)(te,M);n=void 0!==T?T:"combobox"===K?null:(q||d.Z)("Select");var ae=(0,g.Z)((0,r.Z)((0,r.Z)({},A),{multiple:Q,hasFeedback:ne,feedbackIcon:re,showArrow:Y,prefixCls:G})),ce=ae.suffixIcon,se=ae.itemIcon,ue=ae.removeIcon,le=ae.clearIcon,de=(0,s.Z)(A,["suffixIcon","itemIcon"]),fe=a()(w||C,(0,o.Z)({},"".concat(G,"-dropdown-").concat(L),"rtl"===L)),pe=U||F||V,he=u.useContext(f.Z),ve=null!=N?N:he,me=a()((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},"".concat(G,"-lg"),"large"===pe),"".concat(G,"-sm"),"small"===pe),"".concat(G,"-rtl"),"rtl"===L),"".concat(G,"-borderless"),!P),"".concat(G,"-in-form-item"),oe),(0,m.Z)(G,ie,ne),X,_);return u.createElement(c.ZP,(0,r.Z)({ref:t,virtual:H,dropdownMatchSelectWidth:D},de,{transitionName:(0,v.mL)($,(0,v.q0)(I),A.transitionName),listHeight:O,listItemHeight:S,mode:K,prefixCls:G,placement:void 0!==I?I:"rtl"===L?"bottomRight":"bottomLeft",direction:L,inputIcon:ce,menuItemSelectedIcon:se,removeIcon:ue,clearIcon:le,notFoundContent:n,className:me,getPopupContainer:k||B,dropdownClassName:fe,showArrow:ne||R,disabled:ve}))},P=u.forwardRef(Z);P.SECRET_COMBOBOX_MODE_DO_NOT_USE=b,P.Option=c.Wx,P.OptGroup=c.Xo,t.Z=P},88987:function(e,t,n){var o=n(71519),r=n(82999),i=n(76111),a=n(50506),c=n(80845);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}s.prototype.clear=o,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=c,e.exports=s},175:function(e,t,n){var o=n(2173),r=n(33752),i=n(10548),a=n(63410),c=n(3564);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}s.prototype.clear=o,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=c,e.exports=s},35922:function(e,t,n){var o=n(47758)(n(29165),"Map");e.exports=o},9440:function(e,t,n){var o=n(7140),r=n(56504),i=n(88833),a=n(80953),c=n(70724);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}s.prototype.clear=o,s.prototype.delete=r,s.prototype.get=i,s.prototype.has=a,s.prototype.set=c,e.exports=s},28486:function(e){e.exports=function(e,t){for(var n=-1,o=t.length,r=e.length;++n<o;)e[r+n]=t[n];return e}},62718:function(e,t,n){var o=n(42448);e.exports=function(e,t){for(var n=e.length;n--;)if(o(e[n][0],t))return n;return-1}},84742:function(e,t,n){var o=n(80732),r=n(55073);e.exports=function(e){return r(e)&&"[object Arguments]"==o(e)}},58939:function(e,t,n){var o=n(92042),r=n(90654),i=n(36838),a=n(51059),c=/^\[object .+?Constructor\]$/,s=Function.prototype,u=Object.prototype,l=s.toString,d=u.hasOwnProperty,f=RegExp("^"+l.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||r(e))&&(o(e)?f:c).test(a(e))}},36633:function(e,t,n){var o=n(29165)["__core-js_shared__"];e.exports=o},67707:function(e,t,n){var o=n(3880);e.exports=function(e,t){var n=e.__data__;return o(t)?n["string"==typeof t?"string":"hash"]:n.map}},47758:function(e,t,n){var o=n(58939),r=n(9149);e.exports=function(e,t){var n=r(e,t);return o(n)?n:void 0}},9149:function(e){e.exports=function(e,t){return null==e?void 0:e[t]}},71519:function(e,t,n){var o=n(37722);e.exports=function(){this.__data__=o?o(null):{},this.size=0}},82999:function(e){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},76111:function(e,t,n){var o=n(37722),r=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(o){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return r.call(t,e)?t[e]:void 0}},50506:function(e,t,n){var o=n(37722),r=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return o?void 0!==t[e]:r.call(t,e)}},80845:function(e,t,n){var o=n(37722);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=o&&void 0===t?"__lodash_hash_undefined__":t,this}},91010:function(e){var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var o=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==o||"symbol"!=o&&t.test(e))&&e>-1&&e%1==0&&e<n}},3880:function(e){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},90654:function(e,t,n){var o,r=n(36633),i=(o=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"";e.exports=function(e){return!!i&&i in e}},2173:function(e){e.exports=function(){this.__data__=[],this.size=0}},33752:function(e,t,n){var o=n(62718),r=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=o(t,e);return!(n<0)&&(n==t.length-1?t.pop():r.call(t,n,1),--this.size,!0)}},10548:function(e,t,n){var o=n(62718);e.exports=function(e){var t=this.__data__,n=o(t,e);return n<0?void 0:t[n][1]}},63410:function(e,t,n){var o=n(62718);e.exports=function(e){return o(this.__data__,e)>-1}},3564:function(e,t,n){var o=n(62718);e.exports=function(e,t){var n=this.__data__,r=o(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}},7140:function(e,t,n){var o=n(88987),r=n(175),i=n(35922);e.exports=function(){this.size=0,this.__data__={hash:new o,map:new(i||r),string:new o}}},56504:function(e,t,n){var o=n(67707);e.exports=function(e){var t=o(this,e).delete(e);return this.size-=t?1:0,t}},88833:function(e,t,n){var o=n(67707);e.exports=function(e){return o(this,e).get(e)}},80953:function(e,t,n){var o=n(67707);e.exports=function(e){return o(this,e).has(e)}},70724:function(e,t,n){var o=n(67707);e.exports=function(e,t){var n=o(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}},37722:function(e,t,n){var o=n(47758)(Object,"create");e.exports=o},51059:function(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},42448:function(e){e.exports=function(e,t){return e===t||e!=e&&t!=t}},30353:function(e,t,n){var o=n(84742),r=n(55073),i=Object.prototype,a=i.hasOwnProperty,c=i.propertyIsEnumerable,s=o(function(){return arguments}())?o:function(e){return r(e)&&a.call(e,"callee")&&!c.call(e,"callee")};e.exports=s},92042:function(e,t,n){var o=n(80732),r=n(36838);e.exports=function(e){if(!r(e))return!1;var t=o(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},17216:function(e){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},46206:function(e,t,n){"use strict";var o=n(2053),r=n(98037),i=n(57904),a=n(99459),c=n(53162),s=n(82187),u=n.n(s),l=n(6522),d=n(75271),f=["prefixCls","className","style","checked","disabled","defaultChecked","type","onChange"],p=(0,d.forwardRef)((function(e,t){var n,s=e.prefixCls,p=void 0===s?"rc-checkbox":s,h=e.className,v=e.style,m=e.checked,g=e.disabled,y=e.defaultChecked,x=void 0!==y&&y,b=e.type,Z=void 0===b?"checkbox":b,P=e.onChange,_=(0,c.Z)(e,f),k=(0,d.useRef)(null),C=(0,l.Z)(x,{value:m}),w=(0,a.Z)(C,2),j=w[0],O=w[1];(0,d.useImperativeHandle)(t,(function(){return{focus:function(){var e;null===(e=k.current)||void 0===e||e.focus()},blur:function(){var e;null===(e=k.current)||void 0===e||e.blur()},input:k.current}}));var I=u()(p,h,(n={},(0,i.Z)(n,"".concat(p,"-checked"),j),(0,i.Z)(n,"".concat(p,"-disabled"),g),n));return d.createElement("span",{className:I,style:v},d.createElement("input",(0,o.Z)({},_,{className:"".concat(p,"-input"),ref:k,onChange:function(t){g||("checked"in e||O(t.target.checked),null==P||P({target:(0,r.Z)((0,r.Z)({},e),{},{type:Z,checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:g,checked:!!j,type:Z})),d.createElement("span",{className:"".concat(p,"-inner")}))}));t.Z=p}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[3308],{69870:function(t,n){n.Z={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"}},81372:function(t,n,e){var o=e(98037),r=e(75271),c=e(69870),i=e(64720),u=function(t,n){return r.createElement(i.Z,(0,o.Z)((0,o.Z)({},t),{},{ref:n,icon:c.Z}))},a=r.forwardRef(u);n.Z=a},86443:function(t,n,e){e.r(n),e.d(n,{default:function(){return l}});var o=e(72317),r=e(46016),c=e(45520),i=e(75271),u=e(52676),a=function(t){var n=t.percent;return(0,u.jsx)(r.Z,{style:{display:"flex",justifyContent:"center"},type:"circle",percent:n})};function l(t){var n=(0,i.useRef)();return function(e){n.current?(n.current.update({title:"".concat(t).concat(e>=100?o.ZP.get("成功"):o.ZP.get("中...")),content:(0,u.jsx)(a,{percent:e}),okButtonProps:{disabled:100!==e}}),100===e&&setTimeout((function(){var t;null===(t=n.current)||void 0===t||t.destroy(),n.current=null}))):n.current=c.Z.info({width:600,maskClosable:!1,title:"".concat(t).concat(e>=100?o.ZP.get("成功"):o.ZP.get("中...")),centered:!0,content:(0,u.jsx)(a,{percent:e}),okButtonProps:{disabled:!0}})}}},21485:function(t,n,e){e.d(n,{mL:function(){return a},q0:function(){return u}});var o=function(){return{height:0,opacity:0}},r=function(t){return{height:t.scrollHeight,opacity:1}},c=function(t,n){return!0===(null==n?void 0:n.deadline)||"height"===n.propertyName},i={motionName:"ant-motion-collapse",onAppearStart:o,onEnterStart:o,onAppearActive:r,onEnterActive:r,onLeaveStart:function(t){return{height:t?t.offsetHeight:0}},onLeaveActive:o,onAppearEnd:c,onEnterEnd:c,onLeaveEnd:c,motionDeadline:500},u=((0,e(86428).b)("bottomLeft","bottomRight","topLeft","topRight"),function(t){return void 0===t||"topLeft"!==t&&"topRight"!==t?"slide-up":"slide-down"}),a=function(t,n,e){return void 0!==e?e:"".concat(t,"-").concat(n)};n.ZP=i}}]);
1
+ "use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[3308],{69870:function(t,n){n.Z={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"}},81372:function(t,n,e){var o=e(98037),r=e(75271),c=e(69870),i=e(64720),u=function(t,n){return r.createElement(i.Z,(0,o.Z)((0,o.Z)({},t),{},{ref:n,icon:c.Z}))},a=r.forwardRef(u);n.Z=a},32916:function(t,n,e){e.r(n),e.d(n,{default:function(){return l}});var o=e(72317),r=e(46016),c=e(45520),i=e(75271),u=e(52676),a=function(t){var n=t.percent;return(0,u.jsx)(r.Z,{style:{display:"flex",justifyContent:"center"},type:"circle",percent:n})};function l(t){var n=(0,i.useRef)();return function(e){n.current?(n.current.update({title:"".concat(t).concat(e>=100?o.ZP.get("成功"):o.ZP.get("中...")),content:(0,u.jsx)(a,{percent:e}),okButtonProps:{disabled:100!==e}}),100===e&&setTimeout((function(){var t;null===(t=n.current)||void 0===t||t.destroy(),n.current=null}))):n.current=c.Z.info({width:600,maskClosable:!1,title:"".concat(t).concat(e>=100?o.ZP.get("成功"):o.ZP.get("中...")),centered:!0,content:(0,u.jsx)(a,{percent:e}),okButtonProps:{disabled:!0}})}}},21485:function(t,n,e){e.d(n,{mL:function(){return a},q0:function(){return u}});var o=function(){return{height:0,opacity:0}},r=function(t){return{height:t.scrollHeight,opacity:1}},c=function(t,n){return!0===(null==n?void 0:n.deadline)||"height"===n.propertyName},i={motionName:"ant-motion-collapse",onAppearStart:o,onEnterStart:o,onAppearActive:r,onEnterActive:r,onLeaveStart:function(t){return{height:t?t.offsetHeight:0}},onLeaveActive:o,onAppearEnd:c,onEnterEnd:c,onLeaveEnd:c,motionDeadline:500},u=((0,e(86428).b)("bottomLeft","bottomRight","topLeft","topRight"),function(t){return void 0===t||"topLeft"!==t&&"topRight"!==t?"slide-up":"slide-down"}),a=function(t,n,e){return void 0!==e?e:"".concat(t,"-").concat(n)};n.ZP=i}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[5530],{69870:function(e,t){t.Z={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"}},81372:function(e,t,r){var a=r(98037),n=r(75271),o=r(69870),l=r(64720),i=function(e,t){return n.createElement(l.Z,(0,a.Z)((0,a.Z)({},e),{},{ref:t,icon:o.Z}))},s=n.forwardRef(i);t.Z=s},67303:function(e,t,r){r.r(t);var a=r(48305),n=r.n(a),o=r(72317),l=r(75271),i=r(50691),s=r(61508),c=r(17082),u=r(93481),p=r(72338),g=r(70892),f=r(6367),d=r(16314),h=r(3475),m=r(98783),b=r(63392),P=r.n(b),v=r(34014),y=r(1371),Z=r(79231),x=r(69822),w=(r(94095),r(52676)),k=i.Z.Title,j=i.Z.Link;t.default=function(e){var t=e.user,r=e.userChange,a=(0,l.useState)(!1),i=n()(a,2),b=i[0],B=i[1],q=(0,l.useState)(),C=n()(q,2),S=C[0],E=C[1],O=(0,l.useState)(!1),_=n()(O,2),T=_[0],A=_[1],R=(0,l.useState)(),K=n()(R,2),U=K[0],z=K[1],I=(0,l.useState)(),W=n()(I,2),H=W[0],M=W[1],N=(0,l.useState)(),Q=n()(N,2),X=Q[0],D=Q[1],G=function(){d.W.put("".concat(h.Z.apiPrefix,"user/two-factor/deactive")).then((function(e){var t=e.code,a=e.data;200===t&&a&&(E(!1),r())})).catch((function(e){console.log(e)}))},L=function(){d.W.get("".concat(h.Z.apiPrefix,"user/two-factor/init")).then((function(e){var t=e.code,r=e.data;200===t&&z(r)})).catch((function(e){console.log(e)}))};return(0,l.useEffect)((function(){E(t&&t.twoFactorActivated),D(t.avatar&&"".concat(h.Z.apiPrefix,"static/").concat(t.avatar))}),[t]),T?(0,w.jsx)(w.Fragment,{children:U?(0,w.jsxs)("div",{children:[(0,w.jsx)(k,{level:5,children:o.ZP.get("第一步")}),o.ZP.get("下载两步验证手机应用,比如 Google Authenticator 、"),(0,w.jsx)(j,{href:"https://www.microsoft.com/en-us/security/mobile-authenticator-app",target:"_blank",children:"Microsoft Authenticator"}),"、",(0,w.jsx)(j,{href:"https://authy.com/download/",target:"_blank",children:"Authy"}),"、",(0,w.jsx)(j,{href:"https://support.1password.com/one-time-passwords/",target:"_blank",children:"1Password"}),"、",(0,w.jsx)(j,{href:"https://support.logmeininc.com/lastpass/help/lastpass-authenticator-lp030014",target:"_blank",children:"LastPass Authenticator"}),(0,w.jsx)(k,{style:{marginTop:5},level:5,children:o.ZP.get("第二步")}),o.ZP.get("使用手机应用扫描二维码,或者输入秘钥")," ",null==U?void 0:U.secret,(0,w.jsx)("div",{style:{marginTop:10},children:(0,w.jsx)(P(),{style:{border:"1px solid #21262d",borderRadius:6},includeMargin:!0,size:187,value:null==U?void 0:U.url})}),(0,w.jsx)(k,{style:{marginTop:5},level:5,children:o.ZP.get("第三步")}),o.ZP.get("输入手机应用上的6位数字"),(0,w.jsx)(c.Z,{style:{margin:"10px 0 10px 0",display:"block",maxWidth:200},value:H,onChange:function(e){return M(e.target.value)},placeholder:"123456"}),(0,w.jsx)(u.Z,{type:"primary",loading:b,onClick:function(){B(!0),d.W.put("".concat(h.Z.apiPrefix,"user/two-factor/active"),{code:H}).then((function(e){var t=e.code,a=e.data;200===t&&(a?(s.ZP.success(o.ZP.get("激活成功")),A(!1),E(!0),r()):s.ZP.success(o.ZP.get("验证失败")))})).catch((function(e){console.log(e)})).finally((function(){return B(!1)}))},children:o.ZP.get("完成设置")})]}):(0,w.jsx)(v.Z,{})}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)("div",{style:{fontSize:18,borderBottom:"1px solid #f0f0f0",marginBottom:8,paddingBottom:4},children:o.ZP.get("修改用户名密码")}),(0,w.jsxs)(p.Z,{onFinish:function(e){d.W.put("".concat(h.Z.apiPrefix,"user"),{username:e.username,password:e.password}).then((function(e){var t=e.code;e.data;200===t&&(localStorage.removeItem(h.Z.authKey),m.history.push("/login"))})).catch((function(e){console.log(e)}))},layout:"vertical",children:[(0,w.jsx)(p.Z.Item,{label:o.ZP.get("用户名"),name:"username",rules:[{required:!0}],hasFeedback:!0,style:{maxWidth:300},children:(0,w.jsx)(c.Z,{autoComplete:"username",placeholder:o.ZP.get("用户名")})}),(0,w.jsx)(p.Z.Item,{label:o.ZP.get("密码"),name:"password",rules:[{required:!0},{pattern:/^(?!admin$).*$/,message:o.ZP.get("密码不能为admin")}],hasFeedback:!0,style:{maxWidth:300},children:(0,w.jsx)(c.Z,{type:"password",autoComplete:"current-password",placeholder:o.ZP.get("密码")})}),(0,w.jsx)(u.Z,{type:"primary",htmlType:"submit",children:o.ZP.get("保存")})]}),(0,w.jsx)("div",{style:{fontSize:18,borderBottom:"1px solid #f0f0f0",marginBottom:8,paddingBottom:4,marginTop:16},children:o.ZP.get("两步验证")}),(0,w.jsx)(u.Z,{type:"primary",danger:S,onClick:function(){S?G():(L(),A(!0))},children:S?o.ZP.get("禁用"):o.ZP.get("启用")}),(0,w.jsx)("div",{style:{fontSize:18,borderBottom:"1px solid #f0f0f0",marginBottom:8,paddingBottom:4,marginTop:16},children:o.ZP.get("头像")}),(0,w.jsx)(g.C,{size:128,shape:"square",icon:(0,w.jsx)(y.Z,{}),src:X}),(0,w.jsx)(x.Z,{rotationSlider:!0,children:(0,w.jsx)(f.Z,{method:"put",showUploadList:!1,maxCount:1,action:"".concat(h.Z.apiPrefix,"user/avatar"),onChange:function(e){e.file&&e.file.response&&(D("".concat(h.Z.apiPrefix,"static/").concat(e.file.response.data)),r())},name:"avatar",headers:{Authorization:"Bearer ".concat(localStorage.getItem(h.Z.authKey))},children:(0,w.jsx)(u.Z,{icon:(0,w.jsx)(Z.Z,{}),style:{marginLeft:8},children:o.ZP.get("更换头像")})})})]})}},3475:function(e,t,r){var a=r(72317),n=window.__ENV__QlBaseUrl||"/";t.Z={siteName:a.ZP.get("青龙"),baseUrl:n,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:a.ZP.get("中文"),flag:"/china.svg"}],defaultLanguage:"en"},scopes:[{name:a.ZP.get("定时任务"),value:"crons"},{name:a.ZP.get("环境变量"),value:"envs"},{name:a.ZP.get("订阅管理"),value:"subscriptions"},{name:a.ZP.get("配置文件"),value:"configs"},{name:a.ZP.get("脚本管理"),value:"scripts"},{name:a.ZP.get("日志管理"),value:"logs"},{name:a.ZP.get("依赖管理"),value:"dependencies"},{name:a.ZP.get("系统信息"),value:"system"}],scopesMap:{crons:a.ZP.get("定时任务"),envs:a.ZP.get("环境变量"),subscriptions:a.ZP.get("订阅管理"),configs:a.ZP.get("配置文件"),scripts:a.ZP.get("脚本管理"),logs:a.ZP.get("日志管理"),dependencies:a.ZP.get("依赖管理"),system:a.ZP.get("系统信息")},notificationModes:[{value:"gotify",label:"Gotify"},{value:"ntfy",label:"Ntfy"},{value:"goCqHttpBot",label:"GoCqHttpBot"},{value:"serverChan",label:a.ZP.get("Server酱")},{value:"pushDeer",label:"PushDeer"},{value:"bark",label:"Bark"},{value:"telegramBot",label:a.ZP.get("Telegram机器人")},{value:"dingtalkBot",label:a.ZP.get("钉钉机器人")},{value:"weWorkBot",label:a.ZP.get("企业微信机器人")},{value:"weWorkApp",label:a.ZP.get("企业微信应用")},{value:"aibotk",label:a.ZP.get("智能微秘书")},{value:"iGot",label:"IGot"},{value:"pushPlus",label:"PushPlus"},{value:"wePlusBot",label:a.ZP.get("微加机器人")},{value:"wxPusherBot",label:"wxPusher"},{value:"chat",label:a.ZP.get("群晖chat")},{value:"email",label:a.ZP.get("邮箱")},{value:"lark",label:a.ZP.get("飞书机器人")},{value:"pushMe",label:"PushMe"},{value:"chronocat",label:"Chronocat"},{value:"webhook",label:a.ZP.get("自定义通知")},{value:"closed",label:a.ZP.get("已关闭")}],notificationModeMap:{gotify:[{label:"gotifyUrl",tip:a.ZP.get("gotify的url地址,例如 https://push.example.de:8080"),required:!0},{label:"gotifyToken",tip:a.ZP.get("gotify的消息应用token码"),required:!0},{label:"gotifyPriority",tip:a.ZP.get("推送消息的优先级")}],ntfy:[{label:"ntfyUrl",tip:a.ZP.get("ntfy的url地址,例如 https://ntfy.sh"),required:!0},{label:"ntfyTopic",tip:a.ZP.get("ntfy的消息应用topic"),required:!0},{label:"ntfyPriority",tip:a.ZP.get("推送消息的优先级")}],chat:[{label:"chatUrl",tip:a.ZP.get("chat的url地址"),required:!0},{label:"chatToken",tip:a.ZP.get("chat的token码"),required:!0}],goCqHttpBot:[{label:"goCqHttpBotUrl",tip:a.ZP.get("推送到个人QQ: http://127.0.0.1/send_private_msg,群:http://127.0.0.1/send_group_msg"),required:!0},{label:"goCqHttpBotToken",tip:a.ZP.get("访问密钥"),required:!0},{label:"goCqHttpBotQq",tip:a.ZP.get("如果GOBOT_URL设置 /send_private_msg 则需要填入 user_id=个人QQ 相反如果是 /send_group_msg 则需要填入 group_id=QQ群"),required:!0}],serverChan:[{label:"serverChanKey",tip:a.ZP.get("Server酱SENDKEY"),required:!0}],pushDeer:[{label:"pushDeerKey",tip:a.ZP.get("PushDeer的Key,https://github.com/easychen/pushdeer"),required:!0},{label:"pushDeerUrl",tip:a.ZP.get("PushDeer的自架API endpoint,默认是 https://api2.pushdeer.com/message/push")}],bark:[{label:"barkPush",tip:a.ZP.get("Bark的信息IP/设备码,例如:https://api.day.app/XXXXXXXX"),required:!0},{label:"barkIcon",tip:a.ZP.get("BARK推送图标,自定义推送图标 (需iOS15或以上才能显示)")},{label:"barkSound",tip:a.ZP.get("BARK推送铃声,铃声列表去APP查看复制填写")},{label:"barkGroup",tip:a.ZP.get("BARK推送消息的分组,默认为qinglong")},{label:"barkLevel",tip:a.ZP.get("BARK推送消息的时效性,默认为active")},{label:"barkUrl",tip:a.ZP.get("BARK推送消息的跳转URL")},{label:"barkArchive",tip:a.ZP.get("BARK是否保存推送消息")}],telegramBot:[{label:"telegramBotToken",tip:a.ZP.get("telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw"),required:!0},{label:"telegramBotUserId",tip:a.ZP.get("telegram用户的id,例如:129xxx206"),required:!0},{label:"telegramBotProxyHost",tip:a.ZP.get("代理IP")},{label:"telegramBotProxyPort",tip:a.ZP.get("代理端口")},{label:"telegramBotProxyAuth",tip:a.ZP.get("telegram代理配置认证参数,用户名与密码用英文冒号连接 user:password")},{label:"telegramBotApiHost",tip:a.ZP.get("telegram api自建的反向代理地址,默认tg官方api")}],dingtalkBot:[{label:"dingtalkBotToken",tip:a.ZP.get("钉钉机器人webhook token,例如:5a544165465465645d0f31dca676e7bd07415asdasd"),required:!0},{label:"dingtalkBotSecret",tip:a.ZP.get("密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串")}],weWorkBot:[{label:"weWorkBotKey",tip:a.ZP.get("企业微信机器人的webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa"),required:!0},{label:"weWorkOrigin",tip:a.ZP.get("企业微信代理地址")}],weWorkApp:[{label:"weWorkAppKey",tip:a.ZP.get("corpid、corpsecret、touser(注:多个成员ID使用|隔开)、agentid、消息类型(选填,不填默认文本消息类型) 注意用,号隔开(英文输入法的逗号),例如:wwcfrs,B-76WERQ,qinglong,1000001,2COat"),required:!0},{label:"weWorkOrigin",tip:a.ZP.get("企业微信代理地址")}],aibotk:[{label:"aibotkKey",tip:a.ZP.get("密钥key,智能微秘书个人中心获取apikey,申请地址:https://wechat.aibotk.com/signup?from=ql"),required:!0},{label:"aibotkType",tip:a.ZP.get("发送的目标,群组或者好友"),required:!0,placeholder:a.ZP.get("请输入要发送的目标"),items:[{value:"room",label:a.ZP.get("群聊")},{value:"contact",label:a.ZP.get("好友")}]},{label:"aibotkName",tip:a.ZP.get("要发送的用户昵称或群名,如果目标是群,需要填群名,如果目标是好友,需要填好友昵称"),required:!0}],iGot:[{label:"iGotPushKey",tip:a.ZP.get("iGot的信息推送key,例如:https://push.hellyw.com/XXXXXXXX"),required:!0}],pushPlus:[{label:"pushPlusToken",tip:a.ZP.get("微信扫码登录后一对一推送或一对多推送下面的token(您的Token),不提供PUSH_PLUS_USER则默认为一对一推送,参考 https://www.pushplus.plus/"),required:!0},{label:"pushPlusUser",tip:a.ZP.get("一对多推送的“群组编码”(一对多推送下面->您的群组(如无则创建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送)")},{label:"pushplusTemplate",tip:a.ZP.get("发送模板")},{label:"pushplusChannel",tip:a.ZP.get("发送渠道")},{label:"pushplusWebhook",tip:a.ZP.get("webhook编码")},{label:"pushplusCallbackUrl",tip:a.ZP.get("发送结果回调地址")},{label:"pushplusTo",tip:a.ZP.get("好友令牌")}],wePlusBot:[{label:"wePlusBotToken",tip:a.ZP.get("用户令牌,扫描登录后 我的—>设置->令牌 中获取,参考 https://www.weplusbot.com/"),required:!0},{label:"wePlusBotReceiver",tip:a.ZP.get("消息接收人")},{label:"wePlusBotVersion",tip:a.ZP.get("调用版本;专业版填写pro,个人版填写personal,为空默认使用专业版")}],wxPusherBot:[{label:"wxPusherBotAppToken",tip:a.ZP.get("wxPusherBot的appToken"),required:!0},{label:"wxPusherBotTopicIds",tip:a.ZP.get("wxPusherBot的topicIds"),required:!1},{label:"wxPusherBotUids",tip:a.ZP.get("wxPusherBot的uids"),required:!1}],lark:[{label:"larkKey",tip:a.ZP.get("飞书群组机器人:https://www.feishu.cn/hc/zh-CN/articles/360024984973"),required:!0}],email:[{label:"emailService",tip:a.ZP.get("邮箱服务名称,比如126、163、Gmail、QQ等,支持列表https://github.com/nodemailer/nodemailer/blob/master/lib/well-known/services.json"),required:!0},{label:"emailUser",tip:a.ZP.get("邮箱地址"),required:!0},{label:"emailPass",tip:a.ZP.get("SMTP 登录密码,也可能为特殊口令,视具体邮件服务商说明而定"),required:!0}],pushMe:[{label:"pushMeKey",tip:a.ZP.get("PushMe的Key,https://push.i-i.me/"),required:!0},{label:"pushMeUrl",tip:a.ZP.get("自建的PushMeServer消息接口地址,例如:http://127.0.0.1:3010,不填则使用官方消息接口"),required:!1}],chronocat:[{label:"chronocatURL",tip:a.ZP.get("Chronocat Red 服务的连接地址 https://chronocat.vercel.app/install/docker/official/"),required:!0},{label:"chronocatQQ",tip:a.ZP.get("个人:user_id=个人QQ 群则填入group_id=QQ群 多个用英文;隔开同时支持个人和群 如:user_id=xxx;group_id=xxxx;group_id=xxxxx"),required:!0},{label:"chronocatToken",tip:a.ZP.get("docker安装在持久化config目录下的chronocat.yml文件可找到"),required:!0}],webhook:[{label:"webhookMethod",tip:a.ZP.get("请求方法"),required:!0,items:[{value:"GET"},{value:"POST"},{value:"PUT"}]},{label:"webhookContentType",tip:a.ZP.get("请求头Content-Type"),required:!0,items:[{value:"text/plain"},{value:"application/json"},{value:"multipart/form-data"},{value:"application/x-www-form-urlencoded"}]},{label:"webhookUrl",tip:a.ZP.get("请求链接以http或者https开头。url或者body中必须包含$title,$content可选,对应api内容的位置"),required:!0,placeholder:"https://xxx.cn/api?content=$title\n"},{label:"webhookHeaders",tip:a.ZP.get("请求头格式Custom-Header1: Header1,多个换行分割"),placeholder:"Custom-Header1: Header1\nCustom-Header2: Header2"},{label:"webhookBody",tip:a.ZP.get("请求体格式key1: value1,多个换行分割。url或者body中必须包含$title,$content可选,对应api内容的位置"),placeholder:"key1: $title\nkey2: $content"}]},documentTitleMap:{"/login":a.ZP.get("登录"),"/initialization":a.ZP.get("初始化"),"/crontab":a.ZP.get("定时任务"),"/env":a.ZP.get("环境变量"),"/subscription":a.ZP.get("订阅管理"),"/config":a.ZP.get("配置文件"),"/script":a.ZP.get("脚本管理"),"/diff":a.ZP.get("对比工具"),"/log":a.ZP.get("日志管理"),"/setting":a.ZP.get("系统设置"),"/error":a.ZP.get("错误日志"),"/dependence":a.ZP.get("依赖管理")},dependenceTypes:["nodejs","python3","linux"]}},16314:function(e,t,r){r.d(t,{W:function(){return b}});var a=r(90228),n=r.n(a),o=r(87999),l=r.n(o),i=r(72317),s=r(61508),c=r(33839),u=r(3475),p=r(98783),g=r(69313),f=r(52676);s.ZP.config({duration:2});var d=Date.now(),h=g.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"];h.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})),h.interceptors.response.use(function(){var e=l()(n()().mark((function e(t){var r,a,o;return n()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.status,![502,504].includes(r)){e.next=5;break}p.history.push("/error"),e.next=18;break;case 5:if(401!==r){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!==(a=t.data).code&&(o=a.message||a.data)&&c.Z.error({message:o,description:(0,f.jsx)(f.Fragment,{children:null==a?void 0:a.errors.map((function(e){return(0,f.jsx)("div",{children:e.message})}))})}),e.abrupt("return",a);case 15:e.prev=15,e.t0=e.catch(9);case 17:case 18:return e.abrupt("return",t);case 19:case"end":return e.stop()}}),e,null,[[9,15]])})));return function(t){return e.apply(this,arguments)}}(),(function(e){if(e.response){var t=e.response.data?e.response.data.message||e.message:e.response.statusText,r=e.response.status;if([502,504].includes(r))p.history.push("/error");else if(401===r)"/login"!==p.history.location.pathname&&(s.ZP.error(i.ZP.get("登录已过期,请重新登录")),localStorage.removeItem(u.Z.authKey),p.history.push("/login"));else{var a,n,o;if("function"==typeof(null===(a=e.config)||void 0===a?void 0:a.onError))return null===(o=e.config)||void 0===o?void 0:o.onError(e.response);c.Z.error({message:t,description:(0,f.jsx)(f.Fragment,{children:null===(n=e.response)||void 0===n||null===(n=n.data)||void 0===n||null===(n=n.errors)||void 0===n?void 0:n.map((function(e){return(0,f.jsxs)("div",{children:[e.message," (",e.value,")"]})}))})})}}else console.log(e.message);return Promise.reject(e)}));var b=h},27916:function(e,t,r){r.d(t,{Z:function(){return o}});var a=r(99459),n=r(75271);function o(){var e=n.useReducer((function(e){return e+1}),0);return(0,a.Z)(e,2)[1]}},70892:function(e,t,r){r.d(t,{C:function(){return O}});var a=r(2053),n=r(57904),o=r(24744),l=r(99459),i=r(82187),s=r.n(i),c=r(28526),u=r(3083),p=r(75271),g=r(96820),f=r(71343),d=r(46555),h=p.createContext("default"),m=function(e){var t=e.children,r=e.size;return p.createElement(h.Consumer,null,(function(e){return p.createElement(h.Provider,{value:r||e},t)}))},b=h,P=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]])}return r},v=function(e,t){var r=p.useContext(b),i=p.useState(1),h=(0,l.Z)(i,2),m=h[0],v=h[1],y=p.useState(!1),Z=(0,l.Z)(y,2),x=Z[0],w=Z[1],k=p.useState(!0),j=(0,l.Z)(k,2),B=j[0],q=j[1],C=p.useRef(null),S=p.useRef(null),E=(0,u.sQ)(t,C),O=p.useContext(g.E_).getPrefixCls,_=function(){if(S.current&&C.current){var t=S.current.offsetWidth,r=C.current.offsetWidth;if(0!==t&&0!==r){var a=e.gap,n=void 0===a?4:a;2*n<r&&v(r-2*n<t?(r-2*n)/t:1)}}};p.useEffect((function(){w(!0)}),[]),p.useEffect((function(){q(!0),v(1)}),[e.src]),p.useEffect((function(){_()}),[e.gap]);var T,A=e.prefixCls,R=e.shape,K=void 0===R?"circle":R,U=e.size,z=void 0===U?"default":U,I=e.src,W=e.srcSet,H=e.icon,M=e.className,N=e.alt,Q=e.draggable,X=e.children,D=e.crossOrigin,G=P(e,["prefixCls","shape","size","src","srcSet","icon","className","alt","draggable","children","crossOrigin"]),L="default"===z?r:z,F=Object.keys("object"===(0,o.Z)(L)&&L||{}).some((function(e){return["xs","sm","md","lg","xl","xxl"].includes(e)})),$=(0,f.Z)(F),V=p.useMemo((function(){if("object"!==(0,o.Z)(L))return{};var e=d.c4.find((function(e){return $[e]})),t=L[e];return t?{width:t,height:t,lineHeight:"".concat(t,"px"),fontSize:H?t/2:18}:{}}),[$,L]),J=O("avatar",A),Y=s()((0,n.Z)((0,n.Z)({},"".concat(J,"-lg"),"large"===L),"".concat(J,"-sm"),"small"===L)),ee=p.isValidElement(I),te=s()(J,Y,(0,n.Z)((0,n.Z)((0,n.Z)({},"".concat(J,"-").concat(K),!!K),"".concat(J,"-image"),ee||I&&B),"".concat(J,"-icon"),!!H),M),re="number"==typeof L?{width:L,height:L,lineHeight:"".concat(L,"px"),fontSize:H?L/2:18}:{};if("string"==typeof I&&B)T=p.createElement("img",{src:I,draggable:Q,srcSet:W,onError:function(){var t=e.onError;!1!==(t?t():void 0)&&q(!1)},alt:N,crossOrigin:D});else if(ee)T=I;else if(H)T=H;else if(x||1!==m){var ae="scale(".concat(m,") translateX(-50%)"),ne={msTransform:ae,WebkitTransform:ae,transform:ae},oe="number"==typeof L?{lineHeight:"".concat(L,"px")}:{};T=p.createElement(c.Z,{onResize:_},p.createElement("span",{className:"".concat(J,"-string"),ref:S,style:(0,a.Z)((0,a.Z)({},oe),ne)},X))}else T=p.createElement("span",{className:"".concat(J,"-string"),style:{opacity:0},ref:S},X);return delete G.onError,delete G.gap,p.createElement("span",(0,a.Z)({},G,{style:(0,a.Z)((0,a.Z)((0,a.Z)({},re),V),G.style),className:te,ref:E}),T)};var y=p.forwardRef(v),Z=r(22615),x=function(e){return e?"function"==typeof e?e():e:null},w=r(21485),k=r(59816),j=function(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]])}return r},B=function(e){var t=e.title,r=e.content,a=e.prefixCls;return p.createElement(p.Fragment,null,t&&p.createElement("div",{className:"".concat(a,"-title")},x(t)),p.createElement("div",{className:"".concat(a,"-inner-content")},x(r)))};var q=p.forwardRef((function(e,t){var r=e.prefixCls,n=e.title,o=e.content,l=e._overlay,i=e.placement,s=void 0===i?"top":i,c=e.trigger,u=void 0===c?"hover":c,f=e.mouseEnterDelay,d=void 0===f?.1:f,h=e.mouseLeaveDelay,m=void 0===h?.1:h,b=e.overlayStyle,P=void 0===b?{}:b,v=j(e,["prefixCls","title","content","_overlay","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),y=p.useContext(g.E_).getPrefixCls,Z=y("popover",r),x=y(),q=p.useMemo((function(){return l||(n||o?p.createElement(B,{prefixCls:Z,title:n,content:o}):null)}),[l,n,o,Z]);return p.createElement(k.Z,(0,a.Z)({placement:s,trigger:u,mouseEnterDelay:d,mouseLeaveDelay:m,overlayStyle:P},v,{prefixCls:Z,ref:t,overlay:q,transitionName:(0,w.mL)(x,"zoom-big",v.transitionName)}))})),C=r(5555),S=function(e){var t=p.useContext(g.E_),r=t.getPrefixCls,a=t.direction,o=e.prefixCls,l=e.className,i=void 0===l?"":l,c=e.maxCount,u=e.maxStyle,f=e.size,d=r("avatar-group",o),h=s()(d,(0,n.Z)({},"".concat(d,"-rtl"),"rtl"===a),i),b=e.children,P=e.maxPopoverPlacement,v=void 0===P?"top":P,x=e.maxPopoverTrigger,w=void 0===x?"hover":x,k=(0,Z.Z)(b).map((function(e,t){return(0,C.Tm)(e,{key:"avatar-key-".concat(t)})})),j=k.length;if(c&&c<j){var B=k.slice(0,c),S=k.slice(c,j);return B.push(p.createElement(q,{key:"avatar-popover-key",content:S,trigger:w,placement:v,overlayClassName:"".concat(d,"-popover")},p.createElement(y,{style:u},"+".concat(j-c)))),p.createElement(m,{size:f},p.createElement("div",{className:h,style:e.style},B))}return p.createElement(m,{size:f},p.createElement("div",{className:h,style:e.style},k))},E=y;E.Group=S;var O=E},71343:function(e,t,r){var a=r(75271),n=r(27916),o=r(46555);t.Z=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=(0,a.useRef)({}),r=(0,n.Z)();return(0,a.useEffect)((function(){var a=o.ZP.subscribe((function(a){t.current=a,e&&r()}));return function(){return o.ZP.unsubscribe(a)}}),[]),t.current}},58504:function(e,t,r){r(5860)},15767:function(e,t,r){r.d(t,{CR:function(){return c},Jh:function(){return s},ZT:function(){return n},_T:function(){return l},ev:function(){return u},mG:function(){return i},pi:function(){return o}});var a=function(e,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},a(e,t)};function n(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,a=arguments.length;r<a;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},o.apply(this,arguments)};function l(e,t){var r={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(r[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(a=Object.getOwnPropertySymbols(e);n<a.length;n++)t.indexOf(a[n])<0&&Object.prototype.propertyIsEnumerable.call(e,a[n])&&(r[a[n]]=e[a[n]])}return r}function i(e,t,r,a){return new(r||(r=Promise))((function(n,o){function l(e){try{s(a.next(e))}catch(e){o(e)}}function i(e){try{s(a.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(l,i)}s((a=a.apply(e,t||[])).next())}))}function s(e,t){var r,a,n,o={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]},l=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return l.next=i(0),l.throw=i(1),l.return=i(2),"function"==typeof Symbol&&(l[Symbol.iterator]=function(){return this}),l;function i(i){return function(s){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;l&&(l=0,i[0]&&(o=0)),o;)try{if(r=1,a&&(n=2&i[0]?a.return:i[0]?a.throw||((n=a.return)&&n.call(a),0):a.next)&&!(n=n.call(a,i[1])).done)return n;switch(a=0,n&&(i=[2&i[0],n.value]),i[0]){case 0:case 1:n=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,a=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(n=o.trys,(n=n.length>0&&n[n.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!n||i[1]>n[0]&&i[1]<n[3])){o.label=i[1];break}if(6===i[0]&&o.label<n[1]){o.label=n[1],n=i;break}if(n&&o.label<n[2]){o.label=n[2],o.ops.push(i);break}n[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],a=0}finally{r=n=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}Object.create;function c(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var a,n,o=r.call(e),l=[];try{for(;(void 0===t||t-- >0)&&!(a=o.next()).done;)l.push(a.value)}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return l}function u(e,t,r){if(r||2===arguments.length)for(var a,n=0,o=t.length;n<o;n++)!a&&n in t||(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}Object.create;"function"==typeof SuppressedError&&SuppressedError}}]);