@whyour/qinglong 2.17.10-rc.2 → 2.17.10-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whyour/qinglong",
3
- "version": "2.17.10-rc.2",
3
+ "version": "2.17.10-rc.3",
4
4
  "description": "Timed task management platform supporting Python3, JavaScript, Shell, Typescript",
5
5
  "repository": {
6
6
  "type": "git",
@@ -10,6 +10,6 @@
10
10
  </head>
11
11
  <body>
12
12
  <div id="root"></div>
13
- <script src="./umi.3f48f15a.js"></script>
13
+ <script src="./umi.98bad287.js"></script>
14
14
 
15
15
  </body></html>
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[9914,7243],{38582:function(e,t,n){var i=(0,n(55258).Z)({scriptUrl:["//at.alicdn.com/t/c/font_3354854_lc939gab1iq.js"]});t.Z=i},9839:function(e,t,n){var i=n(54306),a=n.n(i),s=n(63313),c=n(61761),r=n(40141);t.Z=function(e,t){var n=(0,s.useState)(0),i=a()(n,2),o=i[0],l=i[1];return(0,c.Z)(e,(function(e){var n=e.target;n.classList.contains("ant-table-wrapper")||(n=e.target.querySelector(".ant-table-wrapper")),l((0,r.W9)({extraHeight:t,target:n}))})),o}},51578:function(e,t,n){n.r(t),n.d(t,{default:function(){return J}});var i=n(93525),a=n.n(i),s=n(54306),c=n.n(s),r=n(57213),o=n.n(r),l=n(88265),u=n(63313),d=n(92260),f=n(22159),h=n(2947),p=n(51704),g=n(15367),v=n(84163),x=n(24378),m=n(94674),Z=n(86986),y=n(28557),j=n(38101),k=n(76657),P=n(20209),b=n(32320),S=n(97674),w=n(5868),C=n(13740),I=n(42011),D=n(15207),F=n(23435),E=n(57229),O=n(53261),A=n(12701),W=n(66255),T=n(71467),q=n(14851),L=n(9839),H=n(52053),R=n.n(H),N=n(21758),B=n(57190),Y=n(38582),z=n(11527),M=d.Z.Text,_=f.Z.Search,V={0:{icon:(0,z.jsx)(y.Z,{spin:!0}),color:"processing"},1:{icon:(0,z.jsx)(j.Z,{}),color:"success"},2:{icon:(0,z.jsx)(k.Z,{}),color:"error"},3:{icon:(0,z.jsx)(y.Z,{spin:!0}),color:"processing"},4:{icon:(0,z.jsx)(j.Z,{}),color:"success"},5:{icon:(0,z.jsx)(k.Z,{}),color:"error"},6:{icon:(0,z.jsx)(P.Z,{}),color:"default"},7:{icon:(0,z.jsx)(b.Z,{}),color:"default"}},J=function(){var e=(0,q.useOutletContext)(),t=e.headerStyle,n=e.isPhone,i=[{title:l.ZP.get("序号"),width:90,render:function(e,t,n){return(0,z.jsxs)("span",{style:{cursor:"text"},children:[n+1," "]})}},{title:l.ZP.get("名称"),dataIndex:"name",width:180,key:"name"},{title:l.ZP.get("状态"),key:"status",width:120,dataIndex:"status",filters:[{text:l.ZP.get("队列中"),value:B.DependenceStatus.queued},{text:l.ZP.get("安装中"),value:B.DependenceStatus.installing},{text:l.ZP.get("已安装"),value:B.DependenceStatus.installed},{text:l.ZP.get("安装失败"),value:B.DependenceStatus.installFailed},{text:l.ZP.get("删除中"),value:B.DependenceStatus.removing},{text:l.ZP.get("已删除"),value:B.DependenceStatus.removed},{text:l.ZP.get("删除失败"),value:B.DependenceStatus.removeFailed},{text:l.ZP.get("已取消"),value:B.DependenceStatus.cancelled}],render:function(e,t,n){var i,a;return(0,z.jsx)(h.Z,{size:"middle",style:{cursor:"text"},children:(0,z.jsx)(p.Z,{color:null===(i=V[t.status])||void 0===i?void 0:i.color,icon:null===(a=V[t.status])||void 0===a?void 0:a.icon,style:{marginRight:0},children:l.ZP.get(B.Status[t.status])})})}},{title:l.ZP.get("备注"),dataIndex:"remark",width:100,key:"remark"},{title:l.ZP.get("更新时间"),key:"updatedAt",dataIndex:"updatedAt",width:150,render:function(e){return(0,z.jsx)("span",{children:R()(e).format("YYYY-MM-DD HH:mm:ss")})}},{title:l.ZP.get("创建时间"),key:"createdAt",dataIndex:"createdAt",width:150,render:function(e){return(0,z.jsx)("span",{children:R()(e).format("YYYY-MM-DD HH:mm:ss")})}},{title:l.ZP.get("操作"),key:"action",width:140,render:function(e,t,i){var a=!n;return(0,z.jsxs)(h.Z,{size:"middle",children:[![B.Status["队列中"],B.Status["已取消"]].includes(t.status)&&(0,z.jsx)(g.Z,{title:a?l.ZP.get("日志"):"",children:(0,z.jsx)("a",{onClick:function(){ue(o()(o()({},t),{},{timestamp:Date.now()}))},children:(0,z.jsx)(S.Z,{})})}),[B.Status["队列中"],B.Status["安装中"],B.Status["删除中"]].includes(t.status)?(0,z.jsx)(g.Z,{title:a?l.ZP.get("取消安装"):"",children:(0,z.jsx)("a",{onClick:function(){return be(t)},children:(0,z.jsx)(Y.Z,{type:"ql-icon-quxiaoanzhuang"})})}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(g.Z,{title:a?l.ZP.get("重新安装"):"",children:(0,z.jsx)("a",{onClick:function(){return Pe(t,i)},children:(0,z.jsx)(w.Z,{})})}),B.Status["已安装"]===t.status&&(0,z.jsx)(g.Z,{title:a?l.ZP.get("删除"):"",children:(0,z.jsx)("a",{onClick:function(){return ke(t,i)},children:(0,z.jsx)(C.Z,{})})}),(0,z.jsx)(g.Z,{title:a?l.ZP.get("强制删除"):"",children:(0,z.jsx)("a",{onClick:function(){return ke(t,i,!0)},children:(0,z.jsx)(I.Z,{})})})]})]})}}],s=(0,u.useState)([]),r=c()(s,2),d=r[0],f=r[1],y=(0,u.useState)(!0),j=c()(y,2),k=j[0],P=j[1],b=(0,u.useState)(!1),H=c()(b,2),J=H[0],K=H[1],G=(0,u.useState)(),U=c()(G,2),Q=U[0],X=U[1],$=(0,u.useState)([]),ee=c()($,2),te=ee[0],ne=ee[1],ie=(0,u.useState)(""),ae=c()(ie,2),se=ae[0],ce=ae[1],re=(0,u.useState)(),oe=c()(re,2),le=oe[0],ue=oe[1],de=(0,u.useState)(!1),fe=c()(de,2),he=fe[0],pe=fe[1],ge=(0,u.useState)("nodejs"),ve=c()(ge,2),xe=ve[0],me=ve[1],Ze=(0,u.useRef)(null),ye=(0,L.Z)(Ze,59),je=function(e){P(!0),E.W.get("".concat(D.Z.apiPrefix,"dependencies?searchValue=").concat(se,"&type=").concat(xe,"&status=").concat(e||"")).then((function(e){var t=e.code,n=e.data;200===t&&f(n)})).finally((function(){return P(!1)}))},ke=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];v.Z.confirm({title:l.ZP.get("确认删除"),content:(0,z.jsxs)(z.Fragment,{children:[l.ZP.get("确认删除依赖")," ",(0,z.jsx)(M,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",l.ZP.get("吗")]}),onOk:function(){E.W.delete("".concat(D.Z.apiPrefix,"dependencies").concat(n?"/force":""),{data:[e.id]}).then((function(e){var t=e.code,i=e.data;if(200===t&&n){var s=d.findIndex((function(e){return e.id===i[0].id}));if(-1!==s){var c=a()(d);c.splice(s,1),f(c)}}}))},onCancel:function(){console.log("Cancel")}})},Pe=function(e,t){v.Z.confirm({title:l.ZP.get("确认重新安装"),content:(0,z.jsxs)(z.Fragment,{children:[l.ZP.get("确认重新安装")," ",(0,z.jsx)(M,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",l.ZP.get("吗")]}),onOk:function(){E.W.put("".concat(D.Z.apiPrefix,"dependencies/reinstall"),[e.id]).then((function(e){var t=e.code,n=e.data;200===t&&Se(n[0])}))},onCancel:function(){console.log("Cancel")}})},be=function(e){v.Z.confirm({title:l.ZP.get("确认取消安装"),content:(0,z.jsxs)(z.Fragment,{children:[l.ZP.get("确认取消安装")," ",(0,z.jsx)(M,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",l.ZP.get("吗")]}),onOk:function(){E.W.put("".concat(D.Z.apiPrefix,"dependencies/cancel"),[e.id]).then((function(){je()}))},onCancel:function(){console.log("Cancel")}})},Se=function(e){var t=a()(d);if(Array.isArray(e))t.unshift.apply(t,a()(e));else{var n=d.findIndex((function(t){return t.id===e.id}));-1!==n&&t.splice(n,1,o()({},e))}f(t)},we={selectedRowKeys:te,onChange:function(e){ne(e)}},Ce=function(e){var t=e?"/force":"";v.Z.confirm({title:l.ZP.get("确认删除"),content:(0,z.jsx)(z.Fragment,{children:l.ZP.get("确认删除选中的依赖吗")}),onOk:function(){E.W.delete("".concat(D.Z.apiPrefix,"dependencies").concat(t),{data:te}).then((function(e){var t=e.code;e.data;200===t&&(ne([]),je())}))},onCancel:function(){console.log("Cancel")}})};(0,u.useEffect)((function(){je()}),[se,xe]),(0,u.useEffect)((function(){le&&(localStorage.setItem("logDependence",le.id),pe(!0))}),[le]);var Ie=(0,u.useCallback)((function(e){var t=e.message,n=e.references,i=void 0;t.includes("开始时间")&&n.length>0&&(i=t.includes("安装")?B.Status["安装中"]:B.Status["删除中"]),t.includes("结束时间")&&n.length>0&&(i=t.includes("安装")?t.includes("成功")?B.Status["已安装"]:B.Status["安装失败"]:t.includes("成功")?B.Status["已删除"]:B.Status["删除失败"])===B.Status["已删除"]?setTimeout((function(){f((function(e){for(var t=a()(e),i=function(i){var a=e.findIndex((function(e){return e.id===n[i]}));-1!==a&&t.splice(a,1)},s=0;s<n.length;s++)i(s);return t}))}),300):"number"==typeof i&&f((function(e){for(var t=a()(e),s=function(a){var s=e.findIndex((function(e){return e.id===n[a]}));-1!==s&&t.splice(s,1,o()(o()({},e[s]),{},{status:i}))},c=0;c<n.length;c++)s(c);return t}))}),[]);(0,u.useEffect)((function(){var e=N.Z.getInstance();return e.subscribe("installDependence",Ie),e.subscribe("uninstallDependence",Ie),function(){e.unsubscribe("installDependence",Ie),e.unsubscribe("uninstallDependence",Ie)}}),[]);var De=(0,z.jsxs)("div",{ref:Ze,children:[te.length>0&&(0,z.jsxs)("div",{style:{marginBottom:16},children:[(0,z.jsx)(x.Z,{type:"primary",style:{marginBottom:5,marginLeft:8},onClick:function(){v.Z.confirm({title:l.ZP.get("确认重新安装"),content:(0,z.jsx)(z.Fragment,{children:l.ZP.get("确认重新安装选中的依赖吗")}),onOk:function(){E.W.put("".concat(D.Z.apiPrefix,"dependencies/reinstall"),te).then((function(e){var t=e.code;e.data,200===t&&(ne([]),je())}))},onCancel:function(){console.log("Cancel")}})},children:l.ZP.get("批量安装")}),(0,z.jsx)(x.Z,{type:"primary",style:{marginBottom:5,marginLeft:8},onClick:function(){return Ce(!1)},children:l.ZP.get("批量删除")}),(0,z.jsx)(x.Z,{type:"primary",style:{marginBottom:5,marginLeft:8},onClick:function(){return Ce(!0)},children:l.ZP.get("批量强制删除")}),(0,z.jsxs)("span",{style:{marginLeft:8},children:[l.ZP.get("已选择"),(0,z.jsx)("a",{children:null==te?void 0:te.length}),l.ZP.get("项")]})]}),(0,z.jsx)(A.W,{backend:W.PD,children:(0,z.jsx)(m.Z,{columns:i,rowSelection:we,pagination:!1,dataSource:d,rowKey:"id",size:"middle",scroll:{x:768,y:ye},loading:k,onChange:function(e,t){je(null==t?void 0:t.status)}})})]});return(0,z.jsxs)(F.ZP,{className:"ql-container-wrapper dependence-wrapper ql-container-wrapper-has-tab",title:l.ZP.get("依赖管理"),extra:[(0,z.jsx)(_,{placeholder:l.ZP.get("请输入名称"),style:{width:"auto"},enterButton:!0,loading:k,onSearch:function(e){ce(e.trim())}}),(0,z.jsx)(x.Z,{type:"primary",onClick:function(){return X(null),void K(!0)},children:l.ZP.get("创建依赖")},"2")],header:{style:t},children:[(0,z.jsx)(Z.Z,{defaultActiveKey:"nodejs",size:"small",tabPosition:"top",style:{height:"100%"},destroyInactiveTabPane:!0,onChange:function(e){ne([]),me(e)},items:[{key:"nodejs",label:"NodeJs",children:De},{key:"python3",label:"Python3",children:De},{key:"linux",label:"Linux",children:De}]}),(0,z.jsx)(O.default,{visible:J,handleCancel:function(e){K(!1),e&&Se(e)},dependence:Q,defaultType:xe}),le&&(0,z.jsx)(T.default,{visible:he,handleCancel:function(e){if(pe(!1),e){var t=d.findIndex((function(e){return e.id===le.id})),n=a()(d);-1!==t&&(n.splice(t,1),f(n))}else a()(d).map((function(e){return e.id})).includes(le.id)&&function(e){E.W.get("".concat(D.Z.apiPrefix,"dependencies/").concat(e.id)).then((function(t){var n=t.code,i=t.data;if(200===n){var s=d.findIndex((function(t){return t.id===e.id})),c=a()(d);-1!==s&&(c.splice(s,1,o()(o()({},e),i)),f(c))}})).finally((function(){return P(!1)}))}(le)},dependence:le})]})}},71467:function(e,t,n){n.r(t);var i=n(54306),a=n.n(i),s=n(88265),c=n(63313),r=n(84163),o=n(24378),l=n(57229),u=n(15207),d=n(65601),f=n(38101),h=n(4574),p=n(99120),g=n.n(p),v=n(21758),x=n(57190),m=n(11527);t.default=function(e){var t=e.dependence,n=e.handleCancel,i=e.visible,p=(0,c.useState)(""),Z=a()(p,2),y=Z[0],j=Z[1],k=(0,c.useState)(!0),P=a()(k,2),b=P[0],S=P[1],w=(0,c.useState)(!1),C=a()(w,2),I=C[0],D=C[1],F=(0,c.useState)(!0),E=a()(F,2),O=E[0],A=E[1],W=(0,c.useState)(!1),T=a()(W,2),q=T[0],L=T[1],H=(0,c.useState)(!1),R=a()(H,2),N=R[0],B=R[1],Y=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];localStorage.removeItem("logDependence"),n(e)};(0,c.useEffect)((function(){t&&(A(!0),l.W.get("".concat(u.Z.apiPrefix,"dependencies/").concat(t.id)).then((function(e){var n=e.code,i=e.data;if(200===n&&localStorage.getItem("logDependence")===String(t.id)){var a=((null==i?void 0:i.log)||[]).join("");j(a),S(!a.includes("结束时间")),L(a.includes("删除失败"))}})).finally((function(){A(!1)})))}),[t]);var z=function(e){var n=e.message,i=e.references;i.length>0&&i.includes(t.id)&&[x.Status["删除中"],x.Status["安装中"]].includes(t.status)&&(n.includes("结束时间")&&(S(!1),L(n.includes("删除失败"))),j((function(e){return"".concat(e).concat(n)})))};return(0,c.useEffect)((function(){var e=v.Z.getInstance();return e.subscribe("installDependence",z),e.subscribe("uninstallDependence",z),function(){e.unsubscribe("installDependence",z),e.unsubscribe("uninstallDependence",z)}}),[t]),(0,c.useEffect)((function(){D(document.body.clientWidth<768)}),[]),(0,m.jsx)(r.Z,{title:(0,m.jsxs)(m.Fragment,{children:[b&&(0,m.jsx)(d.Z,{spin:!0}),!b&&(0,m.jsx)(f.Z,{}),(0,m.jsxs)("span",{style:{marginLeft:5},children:[s.ZP.get("日志 -")," ",t&&t.name]})," "]}),open:i,centered:!0,className:"log-modal",forceRender:!0,onOk:function(){return Y()},onCancel:function(){return Y()},footer:[(0,m.jsx)(o.Z,{type:"primary",onClick:function(){q?(B(!0),l.W.delete("".concat(u.Z.apiPrefix,"dependencies/force"),{data:[t.id]}).then((function(e){var t=e.code;e.data,200===t&&Y(!0)})).finally((function(){B(!1)}))):Y()},loading:N,children:q?s.ZP.get("强制删除"):s.ZP.get("知道了")})],children:(0,m.jsx)("div",{className:"log-container",children:O?(0,m.jsx)(h.Z,{}):(0,m.jsx)("pre",{style:I?{fontFamily:"Source Code Pro",zoom:.83}:{},children:(0,m.jsx)(g(),{children:y})})})})}},53261:function(e,t,n){n.r(t);var i=n(25359),a=n.n(i),s=n(57213),c=n.n(s),r=n(49811),o=n.n(r),l=n(54306),u=n.n(l),d=n(88265),f=n(63313),h=n(28756),p=n(67393),g=n(84163),v=n(84468),x=n(22159),m=n(57229),Z=n(15207),y=n(11527),j=h.Z.Option,k=function(e){return e[e.nodejs=0]="nodejs",e[e.python3=1]="python3",e[e.linux=2]="linux",e}(k||{});t.default=function(e){var t=e.dependence,n=e.handleCancel,i=e.visible,s=e.defaultType,r=p.Z.useForm(),l=u()(r,1)[0],P=(0,f.useState)(!1),b=u()(P,2),S=b[0],w=b[1],C=function(){var e=o()(a()().mark((function e(i){var s,r,o,l,u,d,f,h,p,g;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return w(!0),s=i.name,r=i.split,o=i.type,l=i.remark,u=t?"put":"post",t?d=c()(c()({},i),{},{id:t.id}):"1"===r?(f=s.includes("&")?"&":"\n",d=s.split(f).map((function(e){return{name:e,type:o,remark:l}}))):d=[{name:s,type:o,remark:l}],e.prev=4,e.next=7,m.W[u]("".concat(Z.Z.apiPrefix,"dependencies"),d);case 7:h=e.sent,p=h.code,g=h.data,200===p&&n(g),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,f.useEffect)((function(){l.resetFields()}),[t,i]),(0,y.jsx)(g.Z,{title:t?d.ZP.get("编辑依赖"):d.ZP.get("创建依赖"),open:i,forceRender:!0,centered:!0,maskClosable:!1,onOk:function(){l.validateFields().then((function(e){C(e)})).catch((function(e){console.log("Validate Failed:",e)}))},onCancel:function(){return n()},confirmLoading:S,children:(0,y.jsxs)(p.Z,{form:l,layout:"vertical",name:"dependence_modal",initialValues:t,children:[(0,y.jsx)(p.Z.Item,{name:"type",label:d.ZP.get("依赖类型"),initialValue:k[s],children:(0,y.jsx)(h.Z,{children:Z.Z.dependenceTypes.map((function(e,t){return(0,y.jsx)(j,{value:t,children:e},t)}))})}),!t&&(0,y.jsx)(p.Z.Item,{name:"split",label:d.ZP.get("自动拆分"),initialValue:"0",tooltip:d.ZP.get("多个依赖是否换行分割"),children:(0,y.jsxs)(v.ZP.Group,{children:[(0,y.jsx)(v.ZP,{value:"1",children:d.ZP.get("是")}),(0,y.jsx)(v.ZP,{value:"0",children:d.ZP.get("否")})]})}),(0,y.jsx)(p.Z.Item,{name:"name",label:d.ZP.get("名称"),rules:[{required:!0,message:d.ZP.get("请输入依赖名称,支持指定版本"),whitespace:!0}],children:(0,y.jsx)(x.Z.TextArea,{rows:4,autoSize:{minRows:1,maxRows:5},placeholder:d.ZP.get("请输入依赖名称")})}),(0,y.jsx)(p.Z.Item,{name:"remark",label:d.ZP.get("备注"),children:(0,y.jsx)(x.Z,{placeholder:d.ZP.get("请输入备注")})})]})})}},57190:function(e,t,n){n.r(t),n.d(t,{DependenceStatus:function(){return i},Status:function(){return a}});var i=function(e){return e[e.installing=0]="installing",e[e.installed=1]="installed",e[e.installFailed=2]="installFailed",e[e.removing=3]="removing",e[e.removed=4]="removed",e[e.removeFailed=5]="removeFailed",e[e.queued=6]="queued",e[e.cancelled=7]="cancelled",e}({}),a=function(e){return e[e["安装中"]=0]="安装中",e[e["已安装"]=1]="已安装",e[e["安装失败"]=2]="安装失败",e[e["删除中"]=3]="删除中",e[e["已删除"]=4]="已删除",e[e["删除失败"]=5]="删除失败",e[e["队列中"]=6]="队列中",e[e["已取消"]=7]="已取消",e}({})},21758:function(e,t,n){var i=n(93525),a=n.n(i),s=n(12342),c=n.n(s),r=n(25359),o=n.n(r),l=n(49811),u=n.n(l),d=n(21140),f=n.n(d),h=n(63466),p=n.n(h),g=n(52510),v=n.n(g),x=n(78078),m=n.n(x),Z=["type"],y=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};f()(this,e),v()(this,"url",void 0),v()(this,"socket",null),v()(this,"subscriptions",new Map),v()(this,"options",void 0),v()(this,"reconnectAttempts",0),v()(this,"heartbeatTimeout",null),v()(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 p()(e,[{key:"init",value:(n=u()(o()().mark((function e(){var t=this;return o()().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(m())(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()(o()().mark((function e(){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((null===(t=this.socket)||void 0===t?void 0:t.readyState)===m().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 i={action:"subscribe",topic:e};this.send(i)}}},{key:"unsubscribe",value:function(e,t){var n=this.subscriptions.get(e)||new Set;if(n.has(t)){n.delete(t);var i={action:"unsubscribe",topic:e};this.send(i)}}},{key:"send",value:function(e){var t;(null===(t=this.socket)||void 0===t?void 0:t.readyState)===m().OPEN&&this.socket.send(JSON.stringify(e))}},{key:"dispatchMessage",value:function(e){var t=e.type,n=c()(e,Z),i=this.subscriptions.get(t)||new Set;a()(i).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)===m().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}();v()(y,"instance",null),t.Z=y}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[2340,833],{76834:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return h}});var r=n(88265),o=(n(63313),n(92260)),i=n(23797),a="container___nww32",s="right___o0xXT",l="title___DHxWh",c="desc___frhI6",u=n(52053),d=n.n(u),p=n(11527),g=o.Z.Link,h=function(e){var t=e.systemInfo;return(0,p.jsxs)("div",{className:a,children:[(0,p.jsx)("img",{alt:"logo",style:{width:140,marginRight:20},src:"https://qn.whyour.cn/logo.png"}),(0,p.jsxs)("div",{className:s,children:[(0,p.jsx)("span",{className:l,children:r.ZP.get("青龙")}),(0,p.jsx)("span",{className:c,children:r.ZP.get("支持python3、javascript、shell、typescript 的定时任务管理面板")}),(0,p.jsxs)(i.Z,{children:[(0,p.jsxs)(i.Z.Item,{label:r.ZP.get("版本"),span:3,children:["develop"===(null==t?void 0:t.branch)?r.ZP.get("开发版"):r.ZP.get("正式版")," ","v",t.version]}),(0,p.jsx)(i.Z.Item,{label:r.ZP.get("更新时间"),span:3,children:d()(1e3*t.publishTime).format("YYYY-MM-DD HH:mm")}),(0,p.jsx)(i.Z.Item,{label:r.ZP.get("更新日志"),span:3,children:(0,p.jsx)(g,{href:"https://qn.whyour.cn/version.yaml?t=".concat(Date.now()),target:"_blank",children:r.ZP.get("查看")})})]}),(0,p.jsxs)("div",{children:[(0,p.jsx)(g,{href:"https://github.com/whyour/qinglong",target:"_blank",style:{marginRight:15},children:"Github"}),(0,p.jsx)(g,{href:"https://t.me/jiao_long",target:"_blank",style:{marginRight:15},children:r.ZP.get("Telegram频道")}),(0,p.jsx)(g,{href:"https://github.com/whyour/qinglong/issues",target:"_blank",children:r.ZP.get("提交BUG")})]})]})]})}},32659:function(e,t,n){"use strict";n.r(t);var r=n(25359),o=n.n(r),i=n(57213),a=n.n(i),s=n(49811),l=n.n(s),c=n(54306),u=n.n(c),d=n(88265),p=n(63313),g=n(67393),h=n(9835),f=n(84163),m=n(22159),Z=n(28756),x=n(57229),P=n(15207),v=n(11527);t.default=function(e){var t=e.app,n=e.handleCancel,r=e.visible,i=g.Z.useForm(),s=u()(i,1)[0],c=(0,p.useState)(!1),y=u()(c,2),b=y[0],w=y[1],k=function(){var e=l()(o()().mark((function e(r){var i,s,l,c,u;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return w(!0),i=t?"put":"post",s=a()({},r),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,p.useEffect)((function(){s.resetFields()}),[t,r]),(0,v.jsx)(f.Z,{title:t?d.ZP.get("编辑应用"):d.ZP.get("创建应用"),open:r,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)(g.Z,{form:s,layout:"vertical",name:"form_app_modal",initialValues:t,children:[(0,v.jsx)(g.Z.Item,{name:"name",label:d.ZP.get("名称"),rules:[{validator:function(e,t){return["system"].includes(t)?Promise.reject(new Error(d.ZP.get("名称不能为保留关键字"))):Promise.resolve()}}],children:(0,v.jsx)(m.Z,{placeholder:d.ZP.get("请输入应用名称")})}),(0,v.jsx)(g.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)}))})})]})})}},78008:function(e,t,n){"use strict";n.r(t);var r=n(54306),o=n.n(r),i=n(40141),a=n(15207),s=n(57229),l=n(21758),c=n(99120),u=n.n(c),d=n(89065),p=n(9835),g=n(84163),h=n(24378),f=n(63313),m=n(88265),Z=n(11527),x=d.Z.Countdown;t.default=function(e){var t=e.systemInfo,n=(0,f.useState)(!1),r=o()(n,2),c=r[0],d=r[1],P=(0,f.useState)(""),v=o()(P,2),y=v[0],b=v[1],w=(0,f.useRef)(),k=function(e){g.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,r=e.lastLog;g.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:r})}),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=g.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){p.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("失败,请检查")&&p.ZP.error(m.ZP.get("更新失败,请检查网络及日志或稍后再试")),setTimeout((function(){document.querySelector("#log-identifier").scrollIntoView({behavior:"smooth"})}),600),t.includes("更新包下载成功")&&setTimeout((function(){g.Z.confirm({width:600,maskClosable:!1,title:m.ZP.get("确认重启"),centered:!0,content:m.ZP.get("系统安装包下载成功,确认重启"),okText:m.ZP.get("重启"),onOk:function(){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),p.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;p.ZP.destroy(),200===t&&(n.hasNewVersion?j(n):k(n))})).catch((function(e){p.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("重新启动")})]})}},27609:function(e,t,n){"use strict";n.r(t);var r=n(57213),o=n.n(r),i=n(54306),a=n.n(i),s=n(88265),l=n(63313),c=n(67393),u=n(9835),d=n(22159),p=n(24378),g=n(15207),h=n(57229),f=(n(10761),n(99120)),m=n.n(f),Z=n(19334),x=n.n(Z),P=n(21758),v=n(11527),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],r=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(g.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(g.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(g.Z.apiPrefix,"system/config")).then((function(e){var t=e.code,n=e.data;200===t&&n.info&&r(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){r(o()(o()({},n),{},{dependenceProxy:e.target.value}))}}),(0,v.jsx)(p.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){r(o()(o()({},n),{},{nodeMirror:e.target.value}))}}),(0,v.jsx)(p.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){r(o()(o()({},n),{},{pythonMirror:e.target.value}))}}),(0,v.jsx)(p.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){r(o()(o()({},n),{},{linuxMirror:e.target.value}))}}),(0,v.jsx)(p.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})})]})}},41306:function(e,t,n){"use strict";n.r(t);var r=n(57213),o=n.n(r),i=n(93525),a=n.n(i),s=n(54306),l=n.n(s),c=n(88265),u=n(63313),d=n(92260),p=n(51704),g=n(2947),h=n(15367),f=n(84163),m=n(9835),Z=n(24378),x=n(86986),P=n(94674),v=n(15207),y=n(23435),b=n(57229),w=n(32659),k=n(32132),j=n(85234),C=n(13740),S=n(5565),_=n(55396),q=n(24023),I=n(123),B=n(76834),T=n(14851),M=(n(10761),n(61761)),W=n(87159),E=n(27609),R=n(11527),A=d.Z.Text,F="demo"===window.__ENV__DeployEnv;t.default=function(){var e=(0,T.useOutletContext)(),t=e.headerStyle,n=e.isPhone,r=e.user,i=e.theme,s=e.reloadUser,d=e.reloadTheme,H=e.systemInfo,V=[{title:c.ZP.get("名称"),dataIndex:"name",key:"name"},{title:"Client ID",dataIndex:"client_id",key:"client_id",render:function(e,t){return(0,R.jsx)(A,{copyable:!0,children:t.client_id})}},{title:"Client Secret",dataIndex:"client_secret",key:"client_secret",render:function(e,t){return(0,R.jsx)(A,{copyable:{text:t.client_secret},children:"*******"})}},{title:c.ZP.get("权限"),dataIndex:"scopes",key:"scopes",width:500,render:function(e,t){return(0,R.jsx)("div",{style:{display:"flex",gap:4,flexWrap:"wrap"},children:t.scopes.map((function(e){return(0,R.jsx)(p.Z,{style:{marginRight:0},children:v.Z.scopesMap[e]},e)}))})}},{title:c.ZP.get("操作"),key:"action",render:function(e,t,r){var o=!n;return(0,R.jsxs)(g.Z,{size:"middle",style:{paddingLeft:8},children:[(0,R.jsx)(h.Z,{title:o?c.ZP.get("编辑"):"",children:(0,R.jsx)("a",{onClick:function(){return ye(t,r)},children:(0,R.jsx)(k.Z,{})})}),(0,R.jsx)(h.Z,{title:o?c.ZP.get("重置secret"):"",children:(0,R.jsx)("a",{onClick:function(){return we(t,r)},children:(0,R.jsx)(j.Z,{})})}),(0,R.jsx)(h.Z,{title:o?c.ZP.get("删除"):"",children:(0,R.jsx)("a",{onClick:function(){return be(t,r)},children:(0,R.jsx)(C.Z,{})})})]})}}],D=(0,u.useState)(!0),L=l()(D,2),O=L[0],z=L[1],K=(0,u.useState)([]),N=l()(K,2),U=N[0],G=N[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],re=(0,u.useState)("security"),oe=l()(re,2),ie=oe[0],ae=oe[1],se=(0,u.useState)([]),le=l()(se,2),ce=le[0],ue=le[1],de=(0,u.useState)(),pe=l()(de,2),ge=pe[0],he=pe[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(){z(!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 z(!1)}))},ye=function(e,t){ne(e),$(!0)},be=function(e,t){f.Z.confirm({title:c.ZP.get("确认删除"),content:(0,R.jsxs)(R.Fragment,{children:[c.ZP.get("确认删除应用")," ",(0,R.jsx)(A,{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 r=a()(U);r.splice(t,1),G(r)}}))},onCancel:function(){console.log("Cancel")}})},we=function(e,t){f.Z.confirm({title:c.ZP.get("确认重置"),content:(0,R.jsxs)(R.Fragment,{children:[c.ZP.get("确认重置应用")," ",(0,R.jsx)(A,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",c.ZP.get("的Secret吗"),(0,R.jsx)("br",{}),(0,R.jsx)(A,{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=U.findIndex((function(t){return t.id===e.id})),n=a()(U);-1===t?n.push(e):n.splice(t,1,o()({},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(){F&&ve()}),[]),(0,R.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,R.jsx)(Z.Z,{type:"primary",onClick:function(){return ne(null),void $(!0)},children:c.ZP.get("创建应用")},"2")]:[],children:[(0,R.jsx)("div",{ref:fe,style:{height:"100%"},children:(0,R.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()(F?[]:[{key:"security",label:c.ZP.get("安全设置"),children:(0,R.jsx)(S.default,{user:r,userChange:s})}]),[{key:"app",label:c.ZP.get("应用设置"),children:(0,R.jsx)(P.Z,{columns:V,pagination:!1,dataSource:U,rowKey:"id",size:"middle",scroll:{x:1e3,y:xe},loading:O})},{key:"notification",label:c.ZP.get("通知设置"),children:(0,R.jsx)(q.default,{data:ge})},{key:"syslog",label:c.ZP.get("系统日志"),children:(0,R.jsx)(W.default,{height:xe,theme:i})},{key:"login",label:c.ZP.get("登录日志"),children:(0,R.jsx)(_.default,{height:xe,data:ce})},{key:"dependence",label:c.ZP.get("依赖设置"),children:(0,R.jsx)(E.default,{})},{key:"other",label:c.ZP.get("其他设置"),children:(0,R.jsx)(I.default,{reloadTheme:d,systemInfo:H})},{key:"about",label:c.ZP.get("关于"),children:(0,R.jsx)(B.default,{systemInfo:H})}])})}),(0,R.jsx)(w.default,{visible:X,handleCancel:function(e){$(!1),e&&ke(e)},app:te})]})}},55396:function(e,t,n){"use strict";n.r(t);var r=n(88265),o=(n(63313),n(92260)),i=n(51704),a=n(94674),s=n(52053),l=n.n(s),c=n(11527),u=(o.Z.Text,o.Z.Link,function(e){return e[e["成功"]=0]="成功",e[e["失败"]=1]="失败",e}(u||{})),d=function(e){return e[e.success=0]="success",e[e.error=1]="error",e}(d||{}),p=[{title: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 l()(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,c.jsx)(i.Z,{color:d[t.status],style:{marginRight:0},children:r.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:p,pagination:!1,dataSource:t,rowKey:"id",size:"middle",scroll:{x:1e3,y:n}})})}},24023:function(e,t,n){"use strict";n.r(t);var r=n(57213),o=n.n(r),i=n(54306),a=n.n(i),s=n(88265),l=n(63313),c=n(28756),u=n(67393),d=n(9835),p=n(22159),g=n(24378),h=n(57229),f=n(15207),m=n(11527),Z=c.Z.Option;t.default=function(e){var t=e.data,n=(0,l.useState)(!1),r=a()(n,2),i=r[0],x=r[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(o()({},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)(p.Z.TextArea,{disabled:i,autoSize:{minRows:1,maxRows:5},placeholder:e.placeholder||"".concat(s.ZP.get("请输入")," ").concat(e.label)})},e.label)})),(0,m.jsx)(g.Z,{type:"primary",htmlType:"submit",disabled:i,children:i?s.ZP.get("测试中..."):s.ZP.get("保存")})]})})}},123:function(e,t,n){"use strict";n.r(t);var r=n(57213),o=n.n(r),i=n(54306),a=n.n(i),s=n(88265),l=n(63313),c=n(67393),u=n(9835),d=n(84163),p=n(84468),g=n(22159),h=n(55484),f=n(24378),m=n(28756),Z=n(57679),x=n(71571),P=n(15207),v=n(57229),y=n(78008),b=n(87105),w=(n(10761),n(59953)),k=n(41422),j=n(7154),C=n(19334),S=n.n(C),_=n(40141),q=n(11527),I={"log-remove-frequency":"logRemoveFrequency","cron-concurrency":"cronConcurrency"};t.default=function(e){var t=e.systemInfo,n=e.reloadTheme,r=localStorage.getItem("qinglong_dark_theme")||"auto",i=(0,l.useState)(),C=a()(i,2),B=C[0],T=C[1],M=c.Z.useForm(),W=a()(M,1)[0],E=(0,l.useState)(!1),R=a()(E,2),A=R[0],F=R[1],H=(0,j.default)(s.ZP.get("上传")),V=(0,j.default)(s.ZP.get("下载")),D=x||{},L=D.enable,O=D.disable,z=(D.exportGeneratedCSS,D.setFetchMethod),K=D.auto,N=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:W,children:[(0,q.jsx)(c.Z.Item,{label:s.ZP.get("主题"),name:"theme",initialValue:r,children:(0,q.jsxs)(p.ZP.Group,{onChange:function(e){var t=e.target.value;localStorage.setItem("qinglong_dark_theme",e.target.value),z(fetch),"dark"===t?L({}):"light"===t?O():K({}),n()},value:r,optionType:"button",buttonStyle:"solid",children:[(0,q.jsx)(p.ZP.Button,{value:"light",style:{width:70,textAlign:"center"},children:s.ZP.get("亮色")}),(0,q.jsx)(p.ZP.Button,{value:"dark",style:{width:66,textAlign:"center"},children:s.ZP.get("暗色")}),(0,q.jsx)(p.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)(g.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(o()(o()({},B),{},{logRemoveFrequency:e}))}}),(0,q.jsx)(f.Z,{type:"primary",onClick:function(){N("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)(g.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(o()(o()({},B),{},{cronConcurrency:e}))}}),(0,q.jsx)(f.Z,{type:"primary",onClick:function(){N("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(){F(!0),v.W.put("".concat(P.Z.apiPrefix,"system/data/export"),{},{responseType:"blob",timeout:864e5,onDownloadProgress:function(e){e.progress&&V(parseFloat((100*e.progress).toFixed(1)))}}).then((function(e){(0,b.saveAs)(e,"data.tgz")})).catch((function(e){console.log(e)})).finally((function(){return F(!1)}))},loading:A,children:A?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&&H(Math.min(parseFloat(null==n?void 0:n.percent.toFixed(1)),99)),"done"===t.status&&(H(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})})]})}},7154:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return c}});var r=n(88265),o=n(13800),i=n(84163),a=n(63313),s=n(11527),l=function(e){var t=e.percent;return(0,s.jsx)(o.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?r.ZP.get("成功"):r.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?r.ZP.get("成功"):r.ZP.get("中...")),centered:!0,content:(0,s.jsx)(l,{percent:n}),okButtonProps:{disabled:!0}})}}},5565:function(e,t,n){"use strict";n.r(t);var r=n(54306),o=n.n(r),i=n(88265),a=n(63313),s=n(92260),l=n(9835),c=n(22159),u=n(24378),d=n(67393),p=n(83535),g=n(57679),h=n(57229),f=n(15207),m=n(14851),Z=n(48039),x=n.n(Z),P=n(4574),v=n(3513),y=n(59953),b=n(24244),w=(n(73324),n(11527)),k=s.Z.Title,j=s.Z.Link;t.default=function(e){var t=e.user,n=e.userChange,r=(0,a.useState)(!1),s=o()(r,2),Z=s[0],C=s[1],S=(0,a.useState)(),_=o()(S,2),q=_[0],I=_[1],B=(0,a.useState)(!1),T=o()(B,2),M=T[0],W=T[1],E=(0,a.useState)(),R=o()(E,2),A=R[0],F=R[1],H=(0,a.useState)(),V=o()(H,2),D=V[0],L=V[1],O=(0,a.useState)(),z=o()(O,2),K=z[0],N=z[1],U=function(){h.W.put("".concat(f.Z.apiPrefix,"user/two-factor/deactive")).then((function(e){var t=e.code,r=e.data;200===t&&r&&(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&&F(n)})).catch((function(e){console.log(e)}))};return(0,a.useEffect)((function(){I(t&&t.twoFactorActivated),N(t.avatar&&"".concat(f.Z.apiPrefix,"static/").concat(t.avatar))}),[t]),M?(0,w.jsx)(w.Fragment,{children:A?(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==A?void 0:A.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==A?void 0:A.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:D,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:D}).then((function(e){var t=e.code,r=e.data;200===t&&(r?(l.ZP.success(i.ZP.get("激活成功")),W(!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?U():(G(),W(!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)(p.C,{size:128,shape:"square",icon:(0,w.jsx)(v.Z,{}),src:K}),(0,w.jsx)(b.Z,{rotationSlider:!0,children:(0,w.jsx)(g.Z,{method:"put",showUploadList:!1,maxCount:1,action:"".concat(f.Z.apiPrefix,"user/avatar"),onChange:function(e){e.file&&e.file.response&&(N("".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("更换头像")})})})]})}},87159:function(e,t,n){"use strict";n.r(t);var r=n(25359),o=n.n(r),i=n(49811),a=n.n(i),s=n(54306),l=n.n(s),c=n(63313),u=n(31988),d=n(63720),p=n(9835),g=n(24378),h=n(27705),f=n(84540),m=n(90724),Z=n(21410),x=n(57229),P=n(15207),v=n(19631),y=n(11333),b=n.n(y),w=n(11527),k=d.Z.RangePicker;t.default=function(e){var t=e.height,n=e.theme,r=(0,c.useRef)(null),i=(0,c.useRef)(),s=(0,c.useState)(["",""]),d=l()(s,2),y=d[0],j=d[1],C=(0,c.useState)(""),S=l()(C,2),_=S[0],q=S[1],I=(0,v.Z)((function(){return x.W.get("".concat(P.Z.apiPrefix,"system/log?startTime=").concat(y[0],"&endTime=").concat(y[1]),{responseType:"blob"})}),{refreshDeps:[y],onSuccess:function(e){return a()(o()().mark((function t(){return o()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=q,t.next=3,e.text();case 3:t.t1=t.sent,(0,t.t0)(t.t1);case 5:case"end":return t.stop()}}),t)})))()}}),B=I.loading,T=I.refresh,M=function(e){r.current.scrollDOM.scrollTo({top:"start"===e?0:r.current.scrollDOM.scrollHeight})};return(0,w.jsxs)("div",{style:{position:"relative"},children:[(0,w.jsxs)("div",{children:[(0,w.jsx)(k,{style:{marginBottom:12,marginRight:12},disabledDate:function(e){return e>b()()||e<b()().subtract(7,"days")},defaultValue:[b()(),b()()],onOpenChange:function(e){i.current=!!e&&["",""]},onCalendarChange:function(e,t,n){var r=n.range;i.current&&"boolean"!=typeof i.current&&("start"===r&&(i.current[0]=t[0]),"end"===r&&(i.current[1]=t[1]),i.current[0]&&i.current[1]&&j(t))}}),(0,w.jsx)(g.Z,{onClick:function(){x.W.delete("".concat(P.Z.apiPrefix,"system/log")).then((function(e){p.ZP.success("删除成功"),T()}))},children:"清空日志"})]}),_?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(u.ZP,{maxHeight:"".concat(t,"px"),value:_,onCreateEditor:function(e){r.current=e},readOnly:!0,theme:n.includes("dark")?"dark":"light"}),(0,w.jsxs)("div",{style:{position:"absolute",bottom:20,right:20,display:"flex",flexDirection:"column",gap:10},children:[(0,w.jsx)(g.Z,{size:"small",icon:(0,w.jsx)(m.Z,{}),onClick:function(){M("start")}}),(0,w.jsx)(g.Z,{size:"small",icon:(0,w.jsx)(Z.Z,{}),onClick:function(){M("end")}})]})]}):B?(0,w.jsx)(h.Z,{}):(0,w.jsx)(f.Z,{image:f.Z.PRESENTED_IMAGE_SIMPLE})]})}},15207:function(e,t,n){"use strict";var r=n(88265),o=window.__ENV__QlBaseUrl||"/";t.Z={siteName:r.ZP.get("青龙"),baseUrl:o,apiPrefix:"".concat(o,"api/"),authKey:"token",layouts:[{name:"primary",include:[/.*/],exclude:[/(\/(en|zh))*\/login/]}],i18n:{languages:[{key:"pt-br",title:"Português",flag:"/portugal.svg"},{key:"en",title:"English",flag:"/america.svg"},{key:"zh",title:r.ZP.get("中文"),flag:"/china.svg"}],defaultLanguage:"en"},scopes:[{name:r.ZP.get("定时任务"),value:"crons"},{name:r.ZP.get("环境变量"),value:"envs"},{name:r.ZP.get("订阅管理"),value:"subscriptions"},{name:r.ZP.get("配置文件"),value:"configs"},{name:r.ZP.get("脚本管理"),value:"scripts"},{name:r.ZP.get("日志管理"),value:"logs"},{name:r.ZP.get("依赖管理"),value:"dependencies"},{name:r.ZP.get("系统信息"),value:"system"}],scopesMap:{crons:r.ZP.get("定时任务"),envs:r.ZP.get("环境变量"),subscriptions:r.ZP.get("订阅管理"),configs:r.ZP.get("配置文件"),scripts:r.ZP.get("脚本管理"),logs:r.ZP.get("日志管理"),dependencies:r.ZP.get("依赖管理"),system:r.ZP.get("系统信息")},notificationModes:[{value:"gotify",label:"Gotify"},{value:"goCqHttpBot",label:"GoCqHttpBot"},{value:"serverChan",label:r.ZP.get("Server酱")},{value:"pushDeer",label:"PushDeer"},{value:"bark",label:"Bark"},{value:"telegramBot",label:r.ZP.get("Telegram机器人")},{value:"dingtalkBot",label:r.ZP.get("钉钉机器人")},{value:"weWorkBot",label:r.ZP.get("企业微信机器人")},{value:"weWorkApp",label:r.ZP.get("企业微信应用")},{value:"aibotk",label:r.ZP.get("智能微秘书")},{value:"iGot",label:"IGot"},{value:"pushPlus",label:"PushPlus"},{value:"wePlusBot",label:r.ZP.get("微加机器人")},{value:"chat",label:r.ZP.get("群晖chat")},{value:"email",label:r.ZP.get("邮箱")},{value:"lark",label:r.ZP.get("飞书机器人")},{value:"pushMe",label:"PushMe"},{value:"chronocat",label:"Chronocat"},{value:"webhook",label:r.ZP.get("自定义通知")},{value:"closed",label:r.ZP.get("已关闭")}],notificationModeMap:{gotify:[{label:"gotifyUrl",tip:r.ZP.get("gotify的url地址,例如 https://push.example.de:8080"),required:!0},{label:"gotifyToken",tip:r.ZP.get("gotify的消息应用token码"),required:!0},{label:"gotifyPriority",tip:r.ZP.get("推送消息的优先级")}],chat:[{label:"chatUrl",tip:r.ZP.get("chat的url地址"),required:!0},{label:"chatToken",tip:r.ZP.get("chat的token码"),required:!0}],goCqHttpBot:[{label:"goCqHttpBotUrl",tip:r.ZP.get("推送到个人QQ: http://127.0.0.1/send_private_msg,群:http://127.0.0.1/send_group_msg"),required:!0},{label:"goCqHttpBotToken",tip:r.ZP.get("访问密钥"),required:!0},{label:"goCqHttpBotQq",tip:r.ZP.get("如果GOBOT_URL设置 /send_private_msg 则需要填入 user_id=个人QQ 相反如果是 /send_group_msg 则需要填入 group_id=QQ群"),required:!0}],serverChan:[{label:"serverChanKey",tip:r.ZP.get("Server酱SENDKEY"),required:!0}],pushDeer:[{label:"pushDeerKey",tip:r.ZP.get("PushDeer的Key,https://github.com/easychen/pushdeer"),required:!0},{label:"pushDeerUrl",tip:r.ZP.get("PushDeer的自架API endpoint,默认是 https://api2.pushdeer.com/message/push")}],bark:[{label:"barkPush",tip:r.ZP.get("Bark的信息IP/设备码,例如:https://api.day.app/XXXXXXXX"),required:!0},{label:"barkIcon",tip:r.ZP.get("BARK推送图标,自定义推送图标 (需iOS15或以上才能显示)")},{label:"barkSound",tip:r.ZP.get("BARK推送铃声,铃声列表去APP查看复制填写")},{label:"barkGroup",tip:r.ZP.get("BARK推送消息的分组,默认为qinglong")},{label:"barkLevel",tip:r.ZP.get("BARK推送消息的时效性,默认为active")},{label:"barkUrl",tip:r.ZP.get("BARK推送消息的跳转URL")},{label:"barkArchive",tip:r.ZP.get("BARK是否保存推送消息")}],telegramBot:[{label:"telegramBotToken",tip:r.ZP.get("telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw"),required:!0},{label:"telegramBotUserId",tip:r.ZP.get("telegram用户的id,例如:129xxx206"),required:!0},{label:"telegramBotProxyHost",tip:r.ZP.get("代理IP")},{label:"telegramBotProxyPort",tip:r.ZP.get("代理端口")},{label:"telegramBotProxyAuth",tip:r.ZP.get("telegram代理配置认证参数,用户名与密码用英文冒号连接 user:password")},{label:"telegramBotApiHost",tip:r.ZP.get("telegram api自建的反向代理地址,默认tg官方api")}],dingtalkBot:[{label:"dingtalkBotToken",tip:r.ZP.get("钉钉机器人webhook token,例如:5a544165465465645d0f31dca676e7bd07415asdasd"),required:!0},{label:"dingtalkBotSecret",tip:r.ZP.get("密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串")}],weWorkBot:[{label:"weWorkBotKey",tip:r.ZP.get("企业微信机器人的webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa"),required:!0},{label:"weWorkOrigin",tip:r.ZP.get("企业微信代理地址")}],weWorkApp:[{label:"weWorkAppKey",tip:r.ZP.get("corpid、corpsecret、touser(注:多个成员ID使用|隔开)、agentid、消息类型(选填,不填默认文本消息类型) 注意用,号隔开(英文输入法的逗号),例如:wwcfrs,B-76WERQ,qinglong,1000001,2COat"),required:!0},{label:"weWorkOrigin",tip:r.ZP.get("企业微信代理地址")}],aibotk:[{label:"aibotkKey",tip:r.ZP.get("密钥key,智能微秘书个人中心获取apikey,申请地址:https://wechat.aibotk.com/signup?from=ql"),required:!0},{label:"aibotkType",tip:r.ZP.get("发送的目标,群组或者好友"),required:!0,placeholder:r.ZP.get("请输入要发送的目标"),items:[{value:"room",label:r.ZP.get("群聊")},{value:"contact",label:r.ZP.get("好友")}]},{label:"aibotkName",tip:r.ZP.get("要发送的用户昵称或群名,如果目标是群,需要填群名,如果目标是好友,需要填好友昵称"),required:!0}],iGot:[{label:"iGotPushKey",tip:r.ZP.get("iGot的信息推送key,例如:https://push.hellyw.com/XXXXXXXX"),required:!0}],pushPlus:[{label:"pushPlusToken",tip:r.ZP.get("微信扫码登录后一对一推送或一对多推送下面的token(您的Token),不提供PUSH_PLUS_USER则默认为一对一推送,参考 https://www.pushplus.plus/"),required:!0},{label:"pushPlusUser",tip:r.ZP.get("一对多推送的“群组编码”(一对多推送下面->您的群组(如无则创建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送)")}],wePlusBot:[{label:"wePlusBotToken",tip:r.ZP.get("用户令牌,扫描登录后 我的—>设置->令牌 中获取,参考 https://www.weplusbot.com/"),required:!0},{label:"wePlusBotReceiver",tip:r.ZP.get("消息接收人")},{label:"wePlusBotVersion",tip:r.ZP.get("调用版本;专业版填写pro,个人版填写personal,为空默认使用专业版")}],lark:[{label:"larkKey",tip:r.ZP.get("飞书群组机器人:https://www.feishu.cn/hc/zh-CN/articles/360024984973"),required:!0}],email:[{label:"emailService",tip:r.ZP.get("邮箱服务名称,比如126、163、Gmail、QQ等,支持列表https://github.com/nodemailer/nodemailer/blob/master/lib/well-known/services.json"),required:!0},{label:"emailUser",tip:r.ZP.get("邮箱地址"),required:!0},{label:"emailPass",tip:r.ZP.get("SMTP 登录密码,也可能为特殊口令,视具体邮件服务商说明而定"),required:!0}],pushMe:[{label:"pushMeKey",tip:r.ZP.get("PushMe的Key,https://push.i-i.me/"),required:!0},{label:"pushMeUrl",tip:r.ZP.get("自建的PushMeServer消息接口地址,例如:http://127.0.0.1:3010,不填则使用官方消息接口"),required:!1}],chronocat:[{label:"chronocatURL",tip:r.ZP.get("Chronocat Red 服务的连接地址 https://chronocat.vercel.app/install/docker/official/"),required:!0},{label:"chronocatQQ",tip:r.ZP.get("个人:user_id=个人QQ 群则填入group_id=QQ群 多个用英文;隔开同时支持个人和群 如:user_id=xxx;group_id=xxxx;group_id=xxxxx"),required:!0},{label:"chronocatToken",tip:r.ZP.get("docker安装在持久化config目录下的chronocat.yml文件可找到"),required:!0}],webhook:[{label:"webhookMethod",tip:r.ZP.get("请求方法"),required:!0,items:[{value:"GET"},{value:"POST"},{value:"PUT"}]},{label:"webhookContentType",tip:r.ZP.get("请求头Content-Type"),required:!0,items:[{value:"text/plain"},{value:"application/json"},{value:"multipart/form-data"},{value:"application/x-www-form-urlencoded"}]},{label:"webhookUrl",tip:r.ZP.get("请求链接以http或者https开头。url或者body中必须包含$title,$content可选,对应api内容的位置"),required:!0,placeholder:"https://xxx.cn/api?content=$title\n"},{label:"webhookHeaders",tip:r.ZP.get("请求头格式Custom-Header1: Header1,多个换行分割"),placeholder:"Custom-Header1: Header1\nCustom-Header2: Header2"},{label:"webhookBody",tip:r.ZP.get("请求体格式key1: value1,多个换行分割。url或者body中必须包含$title,$content可选,对应api内容的位置"),placeholder:"key1: $title\nkey2: $content"}]},documentTitleMap:{"/login":r.ZP.get("登录"),"/initialization":r.ZP.get("初始化"),"/crontab":r.ZP.get("定时任务"),"/env":r.ZP.get("环境变量"),"/subscription":r.ZP.get("订阅管理"),"/config":r.ZP.get("配置文件"),"/script":r.ZP.get("脚本管理"),"/diff":r.ZP.get("对比工具"),"/log":r.ZP.get("日志管理"),"/setting":r.ZP.get("系统设置"),"/error":r.ZP.get("错误日志"),"/dependence":r.ZP.get("依赖管理")},dependenceTypes:["nodejs","python3","linux"]}},57229:function(e,t,n){"use strict";n.d(t,{W:function(){return f}});var r=n(25359),o=n.n(r),i=n(49811),a=n.n(i),s=n(88265),l=n(9835),c=n(15207),u=n(14851),d=n(73669);l.ZP.config({duration:2});var p=Date.now(),g=d.Z.create({timeout:6e4,params:{t:p}}),h=["/api/user/login","/open/auth/token","/api/user/two-factor/login","/api/system","/api/user/init","/api/user/notification/init"];g.interceptors.request.use((function(e){var t=localStorage.getItem(c.Z.authKey);return t&&!h.includes(e.url)?(e.headers.Authorization="Bearer ".concat(t),e):e})),g.interceptors.response.use(function(){var e=a()(o()().mark((function e(t){var n,r,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.status,![502,504].includes(n)){e.next=5;break}u.history.push("/error"),e.next=18;break;case 5:if(401!==n){e.next=9;break}"/login"!==u.history.location.pathname&&(localStorage.removeItem(c.Z.authKey),u.history.push("/login")),e.next=18;break;case 9:return e.prev=9,200!==(r=t.data).code&&(i=r.message||r.data)&&l.ZP.error({content:i,style:{maxWidth:500,margin:"0 auto"}}),e.abrupt("return",r);case 15:e.prev=15,e.t0=e.catch(9);case 17:case 18:return e.abrupt("return",t);case 19:case"end":return e.stop()}}),e,null,[[9,15]])})));return function(t){return e.apply(this,arguments)}}(),(function(e){if(e.response){var t=e.response.data?e.response.data.message||e.message||e.response.data:e.response.statusText,n=e.response.status;if([502,504].includes(n))u.history.push("/error");else if(401===n)"/login"!==u.history.location.pathname&&(l.ZP.error(s.ZP.get("登录已过期,请重新登录")),localStorage.removeItem(c.Z.authKey),u.history.push("/login"));else{var r,o;if("function"==typeof(null===(r=e.config)||void 0===r?void 0:r.onError))return null===(o=e.config)||void 0===o?void 0:o.onError(e.response);l.ZP.error({content:t,style:{maxWidth:500,margin:"0 auto"}})}}else console.log(e.message);return Promise.reject(e)}));var f=g},40141:function(e,t,n){"use strict";n.d(t,{ZP:function(){return c},I1:function(){return p},o4:function(){return P},w7:function(){return d},DY:function(){return g},FA:function(){return f},rS:function(){return Z},H$:function(){return x},W9:function(){return u},x$:function(){return h}});var r=n(93525),o=n.n(r),i=n(88265),a={".py":"python",".js":"javascript",".mjs":"javascript",".sh":"shell",".ts":"typescript"},s=n(11186),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,".")},r="unknow";t(/windows|win32|win64|wow32|wow64/g)?r="windows":t(/macintosh|macintel/g)?r="macos":t(/x11/g)?r="linux":t(/android|adr/g)?r="android":t(/ios|iphone|ipad|ipod|iwatch/g)&&(r="ios");var o="unknow";"windows"===r?t(/windows nt 5.0|windows 2000/g)?o="2000":t(/windows nt 5.1|windows xp/g)?o="xp":t(/windows nt 5.2|windows 2003/g)?o="2003":t(/windows nt 6.0|windows vista/g)?o="vista":t(/windows nt 6.1|windows 7/g)?o="7":t(/windows nt 6.2|windows 8/g)?o="8":t(/windows nt 6.3|windows 8.1/g)?o="8.1":t(/windows nt 10.0|windows 10/g)&&(o="10"):"macos"===r?o=n(/os x [\d._]+/g):"android"===r?o=n(/android [\d._]+/g):"ios"===r&&(o=n(/os [\d._]+/g));var i="unknow";"windows"===r||"macos"===r||"linux"===r?i="desktop":("android"===r||"ios"===r||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 p=Object.assign({engine:a,engineVs:l,platform:i,supporter:s,supporterVs:c,system:r,systemVs:o},"none"===u?{}:{shell:u,shellVs:d});return console.log("%c\n .d88b. d888888b d8b db d888b db .d88b. d8b db d888b \n.8P Y8. `88' 888o 88 88' Y8b 88 .8P Y8. 888o 88 88' Y8b \n88 88 88 88V8o 88 88 88 88 88 88V8o 88 88 \n88 88 88 88 V8o88 88 ooo 88 88 88 88 V8o88 88 ooo \n`8P d8' .88. 88 V888 88. ~8~ 88booo. `8b d8' 88 V888 88. ~8~ \n `Y88'Y8 Y888888P VP V8P Y888P Y88888P `Y88P' VP V8P Y888P \n \n \n","color: blue;font-size: 14px;"),console.log("%c忘形雨笠烟蓑,知心牧唱樵歌。明月清风共我,闲人三个,从他今古消磨。\n","color: yellow;font-size: 18px;"),console.log("%c青龙运行环境:\n\n系统:".concat(p.system,"/").concat(p.systemVs,"\n浏览器:").concat(p.supporter,"/").concat(p.supporterVs,"\n内核:").concat(p.engine,"/").concat(p.engineVs),"color: green;font-size: 14px;font-weight: bold;"),p}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.extraHeight,n=e.target;void 0===t&&(t=99);var r=null,o=0;(r=n||document.querySelector(".ant-table-wrapper"))&&(o=r.getBoundingClientRect().top);var i=document.body.clientHeight-o-t;return i}function d(e,t){var n,r,o=window.URL||window.webkitURL||window,i=new Blob([t]),a=document.createElementNS("http://www.w3.org/1999/xhtml","a");a.href=o.createObjectURL(i),a.download=e,n=a,(r=document.createEvent("MouseEvents")).initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(r)}function p(e,t,n){var r=o()(e),i=[];return function e(r){if(r)for(var o=0;o<(null==r?void 0:r.length);o++){if(t(r[o]))return n?void(r[o].children?r[o].children.unshift(n):r[o].children=[n]):void r.splice(o,1);r[o].children&&(i.push(r[o].key),e(r[o].children))}}(r),r}function g(e,t){var n;return function e(r){if(r)for(var o=0;o<(null==r?void 0:r.length);o++)t(r[o])?n=r[o]:r[o].children&&e(r[o].children)}(o()(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 r,o;n.startsWith("/ql/data/scripts")&&(n=n.replace("/ql/data/scripts/",""));var i=n.lastIndexOf("/");return i>=0?(o=n.slice(i+1),r=n.slice(0,i)):(o=n,r=""),[o,r]}}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);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"}},21758:function(e,t,n){"use strict";var r=n(93525),o=n.n(r),i=n(12342),a=n.n(i),s=n(25359),l=n.n(s),c=n(49811),u=n.n(c),d=n(21140),p=n.n(d),g=n(63466),h=n.n(g),f=n(52510),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]:{};p()(this,e),m()(this,"url",void 0),m()(this,"socket",null),m()(this,"subscriptions",new Map),m()(this,"options",void 0),m()(this,"reconnectAttempts",0),m()(this,"heartbeatTimeout",null),m()(this,"state","closed"),this.url=t,this.options={maxReconnectAttempts: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 r={action:"subscribe",topic:e};this.send(r)}}},{key:"unsubscribe",value:function(e,t){var n=this.subscriptions.get(e)||new Set;if(n.has(t)){n.delete(t);var r={action:"unsubscribe",topic:e};this.send(r)}}},{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),r=this.subscriptions.get(t)||new Set;o()(r).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},10761:function(){},38433:function(){}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[5722],{55396:function(e,t,n){"use strict";n.r(t);var r=n(88265),o=(n(63313),n(92260)),i=n(51704),a=n(94674),s=n(52053),c=n.n(s),u=n(11527),l=(o.Z.Text,o.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)(i.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)(a.Z,{columns:f,pagination:!1,dataSource:t,rowKey:"id",size:"middle",scroll:{x:1e3,y:n}})})}},68098:function(e,t,n){"use strict";n.d(t,{fk:function(){return a},jD:function(){return i}});var r,o=n(46594),i=function(){return(0,o.Z)()&&window.document.documentElement},a=function(){if(!i())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}},51704:function(e,t,n){"use strict";n.d(t,{Z:function(){return v}});var r=n(22481),o=n(88028),i=n(41171),a=n(5132),s=n(84875),c=n.n(s),u=n(54331),l=n(63313),d=n(82259),f=n(31124),h=n(1570),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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},p=function(e){var t,n=e.prefixCls,i=e.className,a=e.checked,s=e.onChange,u=e.onClick,f=m(e,["prefixCls","className","checked","onChange","onClick"]),h=(0,l.useContext(d.E_).getPrefixCls)("tag",n),p=c()(h,(t={},(0,r.Z)(t,"".concat(h,"-checkable"),!0),(0,r.Z)(t,"".concat(h,"-checkable-checked"),a),t),i);return l.createElement("span",(0,o.Z)({},f,{className:p,onClick:function(e){null==s||s(!a),null==u||u(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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},y=new RegExp("^(".concat(f.Y.join("|"),")(-inverse)?$")),g=new RegExp("^(".concat(f.E.join("|"),")$")),M=function(e,t){var n,s=e.prefixCls,f=e.className,m=e.style,p=e.children,M=e.icon,S=e.color,v=e.onClose,O=e.closeIcon,C=e.closable,N=void 0!==C&&C,$=E(e,["prefixCls","className","style","children","icon","color","onClose","closeIcon","closable"]),_=l.useContext(d.E_),T=_.getPrefixCls,w=_.direction,D=l.useState(!0),I=(0,i.Z)(D,2),P=I[0],U=I[1];l.useEffect((function(){"visible"in $&&U($.visible)}),[$.visible]);var b=function(){return!!S&&(y.test(S)||g.test(S))},A=(0,o.Z)({backgroundColor:S&&!b()?S:void 0},m),L=b(),x=T("tag",s),R=c()(x,(n={},(0,r.Z)(n,"".concat(x,"-").concat(S),L),(0,r.Z)(n,"".concat(x,"-has-color"),S&&!L),(0,r.Z)(n,"".concat(x,"-hidden"),!P),(0,r.Z)(n,"".concat(x,"-rtl"),"rtl"===w),n),f),k=function(e){e.stopPropagation(),null==v||v(e),e.defaultPrevented||"visible"in $||U(!1)},Z="onClick"in $||p&&"a"===p.type,F=(0,u.Z)($,["visible"]),H=M||null,K=H?l.createElement(l.Fragment,null,H,l.createElement("span",null,p)):p,W=l.createElement("span",(0,o.Z)({},F,{ref:t,className:R,style:A}),K,N?O?l.createElement("span",{className:"".concat(x,"-close-icon"),onClick:k},O):l.createElement(a.Z,{className:"".concat(x,"-close-icon"),onClick:k}):null);return Z?l.createElement(h.Z,null,W):W},S=l.forwardRef(M);S.CheckableTag=p;var v=S},52053:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,n=36e5,r="millisecond",o="second",i="minute",a="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])+"]"}},y=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},g={s:y,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+y(r,2,"0")+":"+y(o,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()),o=t.clone().add(r,u),i=n-o<0,a=t.clone().add(r+(i?-1:1),u);return+(-(r+(n-o)/(i?o-a:a-o))||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:a,m:i,s:o,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=function(e){return e instanceof $},O=function e(t,n,r){var o;if(!t)return M;if("string"==typeof t){var i=t.toLowerCase();S[i]&&(o=i),n&&(S[i]=n,o=i);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var s=t.name;S[s]=t,o=s}return!r&&o&&(M=o),o||!r&&M},C=function(e,t){if(v(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new $(n)},N=g;N.l=O,N.i=v,N.w=function(e,t){return C(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)}var y=E.prototype;return y.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(N.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 o=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},y.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()},y.$utils=function(){return N},y.isValid=function(){return!(this.$d.toString()===h)},y.isSame=function(e,t){var n=C(e);return this.startOf(t)<=n&&n<=this.endOf(t)},y.isAfter=function(e,t){return C(e)<this.startOf(t)},y.isBefore=function(e,t){return this.endOf(t)<C(e)},y.$g=function(e,t,n){return N.u(e)?this[t]:this.set(n,e)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(e,t){var n=this,r=!!N.u(t)||t,l=N.p(e),h=function(e,t){var o=N.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?o:o.endOf(s)},m=function(e,t){return N.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,y=this.$D,g="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?y-S:y+(6-S),E);case s:case f:return m(g+"Hours",0);case a:return m(g+"Minutes",1);case i:return m(g+"Seconds",2);case o:return m(g+"Milliseconds",3);default:return this.clone()}},y.endOf=function(e){return this.startOf(e,!1)},y.$set=function(e,t){var n,c=N.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[a]=l+"Hours",n[i]=l+"Minutes",n[o]=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},y.set=function(e,t){return this.clone().$set(e,t)},y.get=function(e){return this[N.p(e)]()},y.add=function(r,l){var f,h=this;r=Number(r);var m=N.p(l),p=function(e){var t=C(h);return N.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[i]=t,f[a]=n,f[o]=e,f)[m]||1,y=this.$d.getTime()+r*E;return N.w(y,this)},y.subtract=function(e,t){return this.add(-1*e,t)},y.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||h;var r=e||"YYYY-MM-DDTHH:mm:ssZ",o=N.z(this),i=this.$H,a=this.$m,s=this.$M,c=n.weekdays,u=n.months,l=function(e,n,o,i){return e&&(e[n]||e(t,r))||o[n].slice(0,i)},d=function(e){return N.s(i%12||12,e,"0")},f=n.meridiem||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r},m={YY:String(this.$y).slice(-2),YYYY:N.s(this.$y,4,"0"),M:s+1,MM:N.s(s+1,2,"0"),MMM:l(n.monthsShort,s,u,3),MMMM:l(u,s),D:this.$D,DD:N.s(this.$D,2,"0"),d:String(this.$W),dd:l(n.weekdaysMin,this.$W,c,2),ddd:l(n.weekdaysShort,this.$W,c,3),dddd:c[this.$W],H:String(i),HH:N.s(i,2,"0"),h:d(1),hh:d(2),a:f(i,a,!0),A:f(i,a,!1),m:String(a),mm:N.s(a,2,"0"),s:String(this.$s),ss:N.s(this.$s,2,"0"),SSS:N.s(this.$ms,3,"0"),Z:o};return r.replace(p,(function(e,t){return t||m[e]||o.replace(":","")}))},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(r,f,h){var m,p=N.p(f),E=C(r),y=(E.utcOffset()-this.utcOffset())*t,g=this-E,M=N.m(this,E);return M=(m={},m[d]=M/12,m[u]=M,m[l]=M/3,m[c]=(g-y)/6048e5,m[s]=(g-y)/864e5,m[a]=g/n,m[i]=g/t,m[o]=g/e,m)[p]||g,h?M:N.a(M)},y.daysInMonth=function(){return this.endOf(u).$D},y.$locale=function(){return S[this.$L]},y.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=O(e,t,!0);return r&&(n.$L=r),n},y.clone=function(){return N.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},E}(),_=$.prototype;return C.prototype=_,[["$ms",r],["$s",o],["$m",i],["$H",a],["$W",s],["$M",u],["$y",d],["$D",f]].forEach((function(e){_[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),C.extend=function(e,t){return e.$i||(e(t,$,C),e.$i=!0),C},C.locale=O,C.isDayjs=v,C.unix=function(e){return C(1e3*e)},C.en=S[M],C.Ls=S,C.p={},C}()},32602: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},74423:function(e,t,n){"use strict";var r;function o(e){if("undefined"==typeof document)return 0;if(e||void 0===r){var t=document.createElement("div");t.style.width="100%",t.style.height="200px";var n=document.createElement("div"),o=n.style;o.position="absolute",o.top="0",o.left="0",o.pointerEvents="none",o.visibility="hidden",o.width="200px",o.height="150px",o.overflow="hidden",n.appendChild(t),document.body.appendChild(n);var i=t.offsetWidth;n.style.overflow="scroll";var a=t.offsetWidth;i===a&&(a=n.clientWidth),document.body.removeChild(n),r=i-a}return r}function i(e){var t=e.match(/^(.*)px$/),n=Number(null==t?void 0:t[1]);return Number.isNaN(n)?o():n}function a(e){if(!("undefined"!=typeof document&&e&&e instanceof Element))return{width:0,height:0};var t=getComputedStyle(e,"::-webkit-scrollbar"),n=t.width,r=t.height;return{width:i(n),height:i(r)}}n.d(t,{Z:function(){return o},o:function(){return a}})},35019:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(2595),o="".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]+/),i="aria-",a="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,i))||t.data&&s(n,a)||t.attr&&o.includes(n))&&(c[n]=e[n])})),c}}}]);