@whyour/qinglong 2.17.12-rc.2 → 2.17.13
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/README-en.md +1 -1
- package/README.md +2 -2
- package/docker/docker-compose.yml +3 -8
- package/package.json +37 -40
- package/sample/config.sample.sh +21 -2
- package/sample/notify.js +90 -8
- package/sample/notify.py +77 -6
- package/shell/start.sh +6 -1
- package/static/build/config/util.js +4 -1
- package/static/build/data/notify.js +16 -1
- package/static/build/loaders/express.js +3 -3
- package/static/build/loaders/update.js +2 -2
- package/static/build/schedule/index.js +0 -1
- package/static/build/services/notify.js +50 -4
- package/static/build/services/schedule.js +1 -1
- package/static/build/services/system.js +2 -2
- package/static/dist/{827.efeeec44.async.js → 105.85a5c47a.async.js} +1 -1
- package/static/dist/{4588.46a3a31e.async.js → 1083.f86ce804.async.js} +1 -1
- package/static/dist/1149.33cb7e7a.async.js +1 -0
- package/static/dist/119.89e2d610.async.js +1 -0
- package/static/dist/{9631.042017c3.async.js → 1352.ab6da08e.async.js} +1 -1
- package/static/dist/1690.f0290540.async.js +1 -0
- package/static/dist/1742.6cbe5aca.async.js +1 -0
- package/static/dist/1765.d8e002d7.async.js +1 -0
- package/static/dist/1885.e0d00d2d.async.js +1 -0
- package/static/dist/2081.d0d781b1.async.js +1 -0
- package/static/dist/2096.383c1047.async.js +1 -0
- package/static/dist/2237.4d3def87.async.js +1 -0
- package/static/dist/2325.dfa32834.async.js +1 -0
- package/static/dist/2338.d678967d.async.js +1 -0
- package/static/dist/255.12f03ab2.async.js +1 -0
- package/static/dist/2625.675b6a18.chunk.css +1 -0
- package/static/dist/2634.a765cd37.async.js +1 -0
- package/static/dist/{8605.f56664b9.async.js → 2742.4852aac8.async.js} +1 -1
- package/static/dist/2821.be3dc88e.async.js +1 -0
- package/static/dist/2890.9e373f5b.async.js +1 -0
- package/static/dist/{4658.8a9e2830.async.js → 3034.6413c38e.async.js} +1 -1
- package/static/dist/3382.a584a111.async.js +1 -0
- package/static/dist/{2755.f6377d52.async.js → 3383.041eee73.async.js} +1 -1
- package/static/dist/3390.fb4b6851.async.js +1 -0
- package/static/dist/3481.333c2962.async.js +1 -0
- package/static/dist/3600.7637c822.async.js +1 -0
- package/static/dist/4046.7fbcfa02.async.js +1 -0
- package/static/dist/4642.260d2a8e.async.js +1 -0
- package/static/dist/4799.2c2c56e5.async.js +1 -0
- package/static/dist/4865.98e5a005.async.js +1 -0
- package/static/dist/4902.54ecbdb5.async.js +1 -0
- package/static/dist/5171.7fc6d0a2.async.js +1 -0
- package/static/dist/5312.5545b3ed.async.js +1 -0
- package/static/dist/5481.624d0e07.async.js +1 -0
- package/static/dist/5520.ff2cfd6b.async.js +1 -0
- package/static/dist/{8167.8f9d5e88.async.js → 5653.4fce7ce8.async.js} +1 -1
- package/static/dist/5970.10ac4f16.async.js +1 -0
- package/static/dist/6013.2d7bb12a.async.js +1 -0
- package/static/dist/6016.9c379049.async.js +1 -0
- package/static/dist/6035.5889ddc7.async.js +1 -0
- package/static/dist/6159.55cb068a.async.js +1 -0
- package/static/dist/{5394.de174420.async.js → 6247.b550d996.async.js} +1 -1
- package/static/dist/6341.673fb65c.async.js +1 -0
- package/static/dist/6439.7ef6c5e3.async.js +1 -0
- package/static/dist/{6141.db67ebff.async.js → 6541.a6d499de.async.js} +1 -1
- package/static/dist/6646.5fc37228.async.js +1 -0
- package/static/dist/6707.801b886b.async.js +1 -0
- package/static/dist/6872.42f939f1.async.js +1 -0
- package/static/dist/691.187a388c.async.js +1 -0
- package/static/dist/{1667.94045304.async.js → 7025.f4080d63.async.js} +1 -1
- package/static/dist/7285.d561cf26.async.js +1 -0
- package/static/dist/7355.5e5e573b.async.js +1 -0
- package/static/dist/7384.065ccae2.async.js +1 -0
- package/static/dist/739.6be5552a.async.js +1 -0
- package/static/dist/7528.d8b76d8a.async.js +1 -0
- package/static/dist/7802.6b73f16a.async.js +1 -0
- package/static/dist/{9120.ef78d517.async.js → 8060.8b699029.async.js} +1 -1
- package/static/dist/{8078.4add9375.async.js → 8078.8586c875.async.js} +1 -1
- package/static/dist/8142.e3e82eda.async.js +1 -0
- package/static/dist/852.15be2189.async.js +1 -0
- package/static/dist/8528.3dffc548.async.js +1 -0
- package/static/dist/872.10bd0974.async.js +1 -0
- package/static/dist/872.3fffed15.chunk.css +1 -0
- package/static/dist/8982.d2dba153.async.js +1 -0
- package/static/dist/9065.df8d5dcc.async.js +1 -0
- package/static/dist/9066.605168f8.async.js +1 -0
- package/static/dist/955.3c9481f7.async.js +1 -0
- package/static/dist/9730.30083c91.async.js +1 -0
- package/static/dist/9761.627ca3b5.async.js +1 -0
- package/static/dist/index.html +8 -7
- package/static/dist/layouts__index.1fce90e0.chunk.css +1 -0
- package/static/dist/layouts__index.c164d41f.async.js +1 -0
- package/static/dist/preload_helper.2e4c8e3f.js +1 -0
- package/static/dist/src__pages__404.6871535b.async.js +1 -0
- package/static/dist/src__pages__config__index.39b5f99f.async.js +1 -0
- package/static/dist/src__pages__crontab__detail.6f7c3205.async.js +1 -0
- package/static/dist/src__pages__crontab__index.7163c445.async.js +1 -0
- package/static/dist/src__pages__crontab__logModal.c88ea3b7.async.js +1 -0
- package/static/dist/src__pages__crontab__modal.328fee41.async.js +1 -0
- package/static/dist/{src__pages__crontab__type.a798cac7.async.js → src__pages__crontab__type.5895ed02.async.js} +1 -1
- package/static/dist/src__pages__crontab__viewCreateModal.ffcf7a24.async.js +1 -0
- package/static/dist/src__pages__crontab__viewManageModal.c71ebc5a.async.js +1 -0
- package/static/dist/src__pages__dependence__index.edec638b.async.js +1 -0
- package/static/dist/src__pages__dependence__logModal.f123e2ac.async.js +1 -0
- package/static/dist/src__pages__dependence__modal.9fd1176b.async.js +1 -0
- package/static/dist/{src__pages__dependence__type.860703e8.async.js → src__pages__dependence__type.bdac3725.async.js} +1 -1
- package/static/dist/src__pages__diff__index.8ba53a1e.async.js +1 -0
- package/static/dist/src__pages__env__editNameModal.c35e96f9.async.js +1 -0
- package/static/dist/src__pages__env__index.c799138c.async.js +1 -0
- package/static/dist/src__pages__env__modal.3b0ca9a6.async.js +1 -0
- package/static/dist/src__pages__error__index.0221fcd9.async.js +1 -0
- package/static/dist/src__pages__initialization__index.346725d1.async.js +1 -0
- package/static/dist/src__pages__log__index.2fd615f2.async.js +1 -0
- package/static/dist/src__pages__login__index.1dd6e684.async.js +1 -0
- package/static/dist/src__pages__script__editModal.28caeb56.async.js +1 -0
- package/static/dist/src__pages__script__editNameModal.1155d34c.async.js +1 -0
- package/static/dist/src__pages__script__index.b893a14e.async.js +1 -0
- package/static/dist/src__pages__script__renameModal.dabfccfd.async.js +1 -0
- package/static/dist/src__pages__script__saveModal.04d43882.async.js +1 -0
- package/static/dist/src__pages__script__setting.9d5ad53c.async.js +1 -0
- package/static/dist/src__pages__setting__about.3a1a6f3b.async.js +1 -0
- package/static/dist/src__pages__setting__appModal.7b3bff1e.async.js +1 -0
- package/static/dist/src__pages__setting__checkUpdate.0dfdaf7c.async.js +1 -0
- package/static/dist/src__pages__setting__dependence.a9b7ed43.async.js +1 -0
- package/static/dist/src__pages__setting__index.636a04c7.async.js +1 -0
- package/static/dist/src__pages__setting__loginLog.fc87584a.async.js +1 -0
- package/static/dist/src__pages__setting__notification.97b1d997.async.js +1 -0
- package/static/dist/src__pages__setting__other.34ccb2e8.async.js +1 -0
- package/static/dist/src__pages__setting__progress.75143dca.async.js +1 -0
- package/static/dist/src__pages__setting__security.c777fb87.async.js +1 -0
- package/static/dist/src__pages__setting__systemLog.63e9c69d.async.js +1 -0
- package/static/dist/src__pages__subscription__index.69a6de02.async.js +1 -0
- package/static/dist/src__pages__subscription__logModal.b3c7c02c.async.js +1 -0
- package/static/dist/src__pages__subscription__modal.aefaf070.async.js +1 -0
- package/static/dist/umi.916b40e1.js +1 -0
- package/static/dist/umi.a4d14b92.css +1 -0
- package/version.yaml +8 -10
- package/static/dist/1186.39086229.async.js +0 -1
- package/static/dist/1431.36b64dc5.async.js +0 -1
- package/static/dist/1467.6163d4ee.async.js +0 -1
- package/static/dist/2099.a46e32fc.async.js +0 -1
- package/static/dist/2182.59dcf306.chunk.css +0 -1
- package/static/dist/2260.6c4d0bd0.async.js +0 -1
- package/static/dist/2393.3d8adf53.async.js +0 -1
- package/static/dist/2618.7a71aedf.async.js +0 -1
- package/static/dist/2715.292538bc.async.js +0 -1
- package/static/dist/2796.9a52d80e.async.js +0 -1
- package/static/dist/2899.03668225.async.js +0 -1
- package/static/dist/29.32a92099.async.js +0 -1
- package/static/dist/3435.2670d41f.async.js +0 -1
- package/static/dist/3435.d2d0a2c7.chunk.css +0 -1
- package/static/dist/3669.d39d1a9d.async.js +0 -1
- package/static/dist/380.33bc8989.async.js +0 -1
- package/static/dist/3800.f0507af4.async.js +0 -1
- package/static/dist/4039.badd6267.async.js +0 -1
- package/static/dist/4124.980265f2.async.js +0 -1
- package/static/dist/4163.17026fe1.async.js +0 -1
- package/static/dist/419.908ca086.async.js +0 -1
- package/static/dist/4424.a840b858.async.js +0 -1
- package/static/dist/4645.d909733e.async.js +0 -1
- package/static/dist/4674.1b3db685.async.js +0 -1
- package/static/dist/4925.9b770864.async.js +0 -1
- package/static/dist/5310.4cd7a0c1.async.js +0 -1
- package/static/dist/5484.68655765.async.js +0 -1
- package/static/dist/573.21675f9c.async.js +0 -1
- package/static/dist/5830.9be47cbb.async.js +0 -1
- package/static/dist/6035.48d17c03.async.js +0 -1
- package/static/dist/6064.a5141a7d.async.js +0 -1
- package/static/dist/641.f0614d96.async.js +0 -1
- package/static/dist/6712.05e15d48.async.js +0 -1
- package/static/dist/6805.ae3d4019.async.js +0 -1
- package/static/dist/694.0baa21db.async.js +0 -1
- package/static/dist/6986.6a4ae181.async.js +0 -1
- package/static/dist/7346.7096e3b3.async.js +0 -1
- package/static/dist/7362.e740709d.async.js +0 -1
- package/static/dist/7393.ea2d5ba3.async.js +0 -1
- package/static/dist/745.3be9ce9f.async.js +0 -1
- package/static/dist/7742.51617038.async.js +0 -1
- package/static/dist/7787.b041d555.async.js +0 -1
- package/static/dist/7987.5bace809.async.js +0 -1
- package/static/dist/8298.978b54ae.async.js +0 -1
- package/static/dist/833.87a694db.async.js +0 -1
- package/static/dist/8430.0291dda0.async.js +0 -1
- package/static/dist/8432.d8d0ade6.async.js +0 -1
- package/static/dist/858.1a385b25.async.js +0 -1
- package/static/dist/8934.55adca8f.async.js +0 -1
- package/static/dist/9065.a1341834.async.js +0 -1
- package/static/dist/9504.22415050.async.js +0 -1
- package/static/dist/9673.ac17e45d.async.js +0 -1
- package/static/dist/9847.d72d4b37.async.js +0 -1
- package/static/dist/layouts__index.2f94d49c.async.js +0 -1
- package/static/dist/layouts__index.35164d74.chunk.css +0 -1
- package/static/dist/src__pages__404.e1ca45fd.async.js +0 -1
- package/static/dist/src__pages__config__index.c778a0e0.async.js +0 -1
- package/static/dist/src__pages__crontab__detail.34c9ca68.async.js +0 -1
- package/static/dist/src__pages__crontab__index.f196124c.async.js +0 -1
- package/static/dist/src__pages__crontab__logModal.91357c7c.async.js +0 -1
- package/static/dist/src__pages__crontab__modal.6fa9520e.async.js +0 -1
- package/static/dist/src__pages__crontab__viewCreateModal.1fe0e251.async.js +0 -1
- package/static/dist/src__pages__crontab__viewManageModal.c6dcfcf8.async.js +0 -1
- package/static/dist/src__pages__dependence__index.aca3926b.async.js +0 -1
- package/static/dist/src__pages__dependence__logModal.07786c7c.async.js +0 -1
- package/static/dist/src__pages__dependence__modal.e67d0ff6.async.js +0 -1
- package/static/dist/src__pages__diff__index.82b124a8.async.js +0 -1
- package/static/dist/src__pages__env__editNameModal.38d65f05.async.js +0 -1
- package/static/dist/src__pages__env__index.f545d035.async.js +0 -1
- package/static/dist/src__pages__env__modal.6fad122b.async.js +0 -1
- package/static/dist/src__pages__error__index.c5c8ed46.async.js +0 -1
- package/static/dist/src__pages__initialization__index.a26591c2.async.js +0 -1
- package/static/dist/src__pages__log__index.bc06b12f.async.js +0 -1
- package/static/dist/src__pages__login__index.e4257741.async.js +0 -1
- package/static/dist/src__pages__script__editModal.be12c9e5.async.js +0 -1
- package/static/dist/src__pages__script__editNameModal.e7f7fea1.async.js +0 -1
- package/static/dist/src__pages__script__index.4fdb14ad.async.js +0 -1
- package/static/dist/src__pages__script__renameModal.436dedbf.async.js +0 -1
- package/static/dist/src__pages__script__saveModal.f65940c2.async.js +0 -1
- package/static/dist/src__pages__script__setting.b4891488.async.js +0 -1
- package/static/dist/src__pages__setting__about.d7cea886.async.js +0 -1
- package/static/dist/src__pages__setting__appModal.48994718.async.js +0 -1
- package/static/dist/src__pages__setting__checkUpdate.0dd2f8d5.async.js +0 -1
- package/static/dist/src__pages__setting__dependence.b6d378b3.async.js +0 -1
- package/static/dist/src__pages__setting__index.45c54c51.async.js +0 -1
- package/static/dist/src__pages__setting__loginLog.4ba597ea.async.js +0 -1
- package/static/dist/src__pages__setting__notification.7df85f89.async.js +0 -1
- package/static/dist/src__pages__setting__other.2c4534ef.async.js +0 -1
- package/static/dist/src__pages__setting__progress.57907231.async.js +0 -1
- package/static/dist/src__pages__setting__security.e26348a7.async.js +0 -1
- package/static/dist/src__pages__setting__systemLog.a77a9995.async.js +0 -1
- package/static/dist/src__pages__subscription__index.0f0a7c0a.async.js +0 -1
- package/static/dist/src__pages__subscription__logModal.8d68bb96.async.js +0 -1
- package/static/dist/src__pages__subscription__modal.26538bfd.async.js +0 -1
- package/static/dist/umi.8a0eaca6.css +0 -1
- package/static/dist/umi.ae45a508.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[2340,4642],{82337: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")})]})]})]})}},20112: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(94978),P=n(20710),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)}))})})]})})}},8429:function(e,t,n){"use strict";n.r(t);var o=n(48305),r=n.n(o),i=n(65609),a=n(20710),s=n(94978),l=n(69325),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("重新启动")})]})}},75887: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(20710),h=n(94978),f=(n(39817),n(78060)),m=n.n(f),Z=n(19334),x=n.n(Z),P=n(69325),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})})]})}},99918: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(20710),y=n(40872),b=n(94978),w=n(20112),k=n(28423),j=n(28068),C=n(88939),S=n(13494),_=n(20228),q=n(51578),I=n(73591),B=n(82337),T=n(31038),M=(n(39817),n(30502)),W=n(24915),E=n(75887),D=n(52676),A=d.Z.Text,F="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)(A,{copyable:!0,children:t.client_id})}},{title:"Client Secret",dataIndex:"client_secret",key:"client_secret",render:function(e,t){return(0,D.jsx)(A,{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)(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 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)(A,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",c.ZP.get("的Secret吗"),(0,D.jsx)("br",{}),(0,D.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=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(){F&&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()(F?[]:[{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)(W.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)(E.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})]})}},20228: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}})})}},51578: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(94978),f=n(20710),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("保存")})]})})}},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),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(20710),v=n(94978),y=n(8429),b=n(87105),w=(n(39817),n(79231)),k=n(84522),j=n(86443),C=n(19334),S=n.n(C),_=n(65609),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(),W=a()(M,1)[0],E=(0,l.useState)(!1),D=a()(E,2),A=D[0],F=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:W,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(){F(!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 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&&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})})]})}},86443: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}})}}},13494: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(94978),f=n(20710),m=n(31038),Z=n(63392),x=n.n(Z),P=n(40276),v=n(1371),y=n(79231),b=n(69822),w=(n(72540),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],W=T[1],E=(0,a.useState)(),D=r()(E,2),A=D[0],F=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&&F(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: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: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("激活成功")),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?N():(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)(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("更换头像")})})})]})}},24915: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(94978),v=n(20710),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,W=/\[\ue880warn\]/g,E=/\[\ue602error\]/g,D="system-log-info",A="system-warn-info",F="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=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}}),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=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}}),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})]})}},20710: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"]}},94978:function(e,t,n){"use strict";n.d(t,{W:function(){return f}});var o=n(90228),r=n.n(o),i=n(87999),a=n.n(i),s=n(72317),l=n(61508),c=n(20710),u=n(31038),d=n(74799);l.ZP.config({duration:2});var g=Date.now(),p=d.Z.create({timeout:6e4,params:{t:g}}),h=["/api/user/login","/open/auth/token","/api/user/two-factor/login","/api/system","/api/user/init","/api/user/notification/init"];p.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})),p.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}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!==(o=t.data).code&&(i=o.message||o.data)&&l.ZP.error({content:i,style:{maxWidth:500,margin:"0 auto"}}),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.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 o,r;if("function"==typeof(null===(o=e.config)||void 0===o?void 0:o.onError))return null===(r=e.config)||void 0===r?void 0:r.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=p},65609: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"},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"}},69325: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},39817:function(){},50810:function(){}}]);
|
|
@@ -0,0 +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}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[7213],{51578: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(94978),P=a(20710),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"),E=l()(f,2),y=E[0],v=E[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){v(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:y,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("保存")})]})})}},20710: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"]}},94978:function(e,t,a){a.d(t,{W:function(){return P}});var o=a(90228),r=a.n(o),n=a(87999),l=a.n(n),i=a(72317),s=a(61508),u=a(20710),c=a(31038),p=a(74799);s.ZP.config({duration:2});var d=Date.now(),g=p.Z.create({timeout:6e4,params:{t:d}}),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(u.Z.authKey);return t&&!h.includes(e.url)?(e.headers.Authorization="Bearer ".concat(t),e):e})),g.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}c.history.push("/error"),e.next=18;break;case 5:if(401!==a){e.next=9;break}"/login"!==c.history.location.pathname&&(localStorage.removeItem(u.Z.authKey),c.history.push("/login")),e.next=18;break;case 9:return e.prev=9,200!==(o=t.data).code&&(n=o.message||o.data)&&s.ZP.error({content:n,style:{maxWidth:500,margin:"0 auto"}}),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.data:e.response.statusText,a=e.response.status;if([502,504].includes(a))c.history.push("/error");else if(401===a)"/login"!==c.history.location.pathname&&(s.ZP.error(i.ZP.get("登录已过期,请重新登录")),localStorage.removeItem(u.Z.authKey),c.history.push("/login"));else{var o,r;if("function"==typeof(null===(o=e.config)||void 0===o?void 0:o.onError))return null===(r=e.config)||void 0===r?void 0:r.onError(e.response);s.ZP.error({content:t,style:{maxWidth:500,margin:"0 auto"}})}}else console.log(e.message);return Promise.reject(e)}));var P=g},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},E="SECRET_COMBOBOX_MODE_DO_NOT_USE",y=function(e,t){var a,n=e.prefixCls,y=e.bordered,v=void 0===y||y,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,H=q.direction,F=q.virtual,W=q.dropdownMatchSelectWidth,G=u.useContext(g.Z),Q=L("select",n),X=L(),j=(0,Z.ri)(Q,H),V=j.compactSize,z=j.compactItemClassnames,Y=u.useMemo((function(){var e=R.mode;if("combobox"!==e)return e===E?"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(H),"rtl"===H)),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"===H),"".concat(Q,"-borderless"),!v),"".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:F,dropdownMatchSelectWidth:W},pe,{transitionName:(0,P.mL)(X,(0,P.q0)(_),R.transitionName),listHeight:T,listItemHeight:M,mode:Y,prefixCls:Q,placement:void 0!==_?_:"rtl"===H?"bottomRight":"bottomLeft",direction:H,inputIcon:ie,menuItemSelectedIcon:se,removeIcon:ue,clearIcon:ce,notFoundContent:a,className:me,getPopupContainer:x||K,dropdownClassName:de,showArrow:ae||B,disabled:Pe}))},v=u.forwardRef(y);v.SECRET_COMBOBOX_MODE_DO_NOT_USE=E,v.Option=i.Wx,v.OptGroup=i.Xo,t.Z=v},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}}}]);
|
|
@@ -0,0 +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}}]);
|
|
@@ -0,0 +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}}]);
|
|
@@ -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},13494: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(94978),h=r(20710),m=r(31038),b=r(63392),P=r.n(b),y=r(40276),Z=r(1371),v=r(79231),x=r(69822),w=(r(72540),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],W=K[1],z=(0,l.useState)(),I=n()(z,2),H=I[0],M=I[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&&W(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)(y.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)(Z.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)(v.Z,{}),style:{marginLeft:8},children:o.ZP.get("更换头像")})})})]})}},20710: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"]}},94978:function(e,t,r){r.d(t,{W:function(){return h}});var a=r(90228),n=r.n(a),o=r(87999),l=r.n(o),i=r(72317),s=r(61508),c=r(20710),u=r(31038),p=r(74799);s.ZP.config({duration:2});var g=Date.now(),f=p.Z.create({timeout:6e4,params:{t:g}}),d=["/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(c.Z.authKey);return t&&!d.includes(e.url)?(e.headers.Authorization="Bearer ".concat(t),e):e})),f.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}u.history.push("/error"),e.next=18;break;case 5:if(401!==r){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!==(a=t.data).code&&(o=a.message||a.data)&&s.ZP.error({content:o,style:{maxWidth:500,margin:"0 auto"}}),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.data:e.response.statusText,r=e.response.status;if([502,504].includes(r))u.history.push("/error");else if(401===r)"/login"!==u.history.location.pathname&&(s.ZP.error(i.ZP.get("登录已过期,请重新登录")),localStorage.removeItem(c.Z.authKey),u.history.push("/login"));else{var a,n;if("function"==typeof(null===(a=e.config)||void 0===a?void 0:a.onError))return null===(n=e.config)||void 0===n?void 0:n.onError(e.response);s.ZP.error({content:t,style:{maxWidth:500,margin:"0 auto"}})}}else console.log(e.message);return Promise.reject(e)}));var h=f},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},y=function(e,t){var r=p.useContext(b),i=p.useState(1),h=(0,l.Z)(i,2),m=h[0],y=h[1],Z=p.useState(!1),v=(0,l.Z)(Z,2),x=v[0],w=v[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&&y(r-2*n<t?(r-2*n)/t:1)}}};p.useEffect((function(){w(!0)}),[]),p.useEffect((function(){q(!0),y(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,W=void 0===U?"default":U,z=e.src,I=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"===W?r:W,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(z),te=s()(J,Y,(0,n.Z)((0,n.Z)((0,n.Z)({},"".concat(J,"-").concat(K),!!K),"".concat(J,"-image"),ee||z&&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 z&&B)T=p.createElement("img",{src:z,draggable:Q,srcSet:I,onError:function(){var t=e.onError;!1!==(t?t():void 0)&&q(!1)},alt:N,crossOrigin:D});else if(ee)T=z;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 Z=p.forwardRef(y),v=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,y=j(e,["prefixCls","title","content","_overlay","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),Z=p.useContext(g.E_).getPrefixCls,v=Z("popover",r),x=Z(),q=p.useMemo((function(){return l||(n||o?p.createElement(B,{prefixCls:v,title:n,content:o}):null)}),[l,n,o,v]);return p.createElement(k.Z,(0,a.Z)({placement:s,trigger:u,mouseEnterDelay:d,mouseLeaveDelay:m,overlayStyle:P},y,{prefixCls:v,ref:t,overlay:q,transitionName:(0,w.mL)(x,"zoom-big",y.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,y=void 0===P?"top":P,x=e.maxPopoverTrigger,w=void 0===x?"hover":x,k=(0,v.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:y,overlayClassName:"".concat(d,"-popover")},p.createElement(Z,{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=Z;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}},43543:function(e,t,r){r(55214)},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}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[8490],{75875:function(e,t,a){a.d(t,{iN:function(){return Z},R_:function(){return d}});var r=a(96299),n=a(28556),o=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function i(e){var t=e.r,a=e.g,n=e.b,o=(0,r.py)(t,a,n);return{h:360*o.h,s:o.s,v:o.v}}function c(e){var t=e.r,a=e.g,n=e.b;return"#".concat((0,r.vq)(t,a,n,!1))}function l(e,t,a){var r=a/100;return{r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b}}function s(e,t,a){var r;return(r=Math.round(e.h)>=60&&Math.round(e.h)<=240?a?Math.round(e.h)-2*t:Math.round(e.h)+2*t:a?Math.round(e.h)+2*t:Math.round(e.h)-2*t)<0?r+=360:r>=360&&(r-=360),r}function u(e,t,a){return 0===e.h&&0===e.s?e.s:((r=a?e.s-.16*t:4===t?e.s+.16:e.s+.05*t)>1&&(r=1),a&&5===t&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2)));var r}function f(e,t,a){var r;return(r=a?e.v+.05*t:e.v-.15*t)>1&&(r=1),Number(r.toFixed(2))}function d(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=[],r=(0,n.uA)(e),d=5;d>0;d-=1){var p=i(r),g=c((0,n.uA)({h:s(p,d,!0),s:u(p,d,!0),v:f(p,d,!0)}));a.push(g)}a.push(c(r));for(var h=1;h<=4;h+=1){var m=i(r),b=c((0,n.uA)({h:s(m,h),s:u(m,h),v:f(m,h)}));a.push(b)}return"dark"===t.theme?o.map((function(e){var r=e.index,o=e.opacity;return c(l((0,n.uA)(t.backgroundColor||"#141414"),(0,n.uA)(a[r]),100*o))})):a}var p=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];p.primary=p[5];var g=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];g.primary=g[5];var h=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];h.primary=h[5];var m=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];m.primary=m[5];var b=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];b.primary=b[5];var v=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];v.primary=v[5];var y=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];y.primary=y[5];var P=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];P.primary=P[5];var Z=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Z.primary=Z[5];var E=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];E.primary=E[5];var x=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];x.primary=x[5];var C=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];C.primary=C[5];var k=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];k.primary=k[5];var w=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];w.primary=w[5];var N=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];N.primary=N[5];var T=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];T.primary=T[5];var _=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];_.primary=_[5];var M=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];M.primary=M[5];var S=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];S.primary=S[5];var A=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];A.primary=A[5];var U=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];U.primary=U[5];var R=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];R.primary=R[5];var I=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];I.primary=I[5];var O=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];O.primary=O[5];var B=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];B.primary=B[5];var q=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];q.primary=q[5]},48881:function(e,t,a){a.d(t,{Z:function(){return Z}});var r=a(2053),n=a(99459),o=a(57904),i=a(53162),c=a(75271),l=a(82187),s=a.n(l),u=a(75875),f=a(28771),d=a(98037),p=a(39765),g=["icon","className","onClick","style","primaryColor","secondaryColor"],h={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};var m=function(e){var t=e.icon,a=e.className,r=e.onClick,n=e.style,o=e.primaryColor,l=e.secondaryColor,s=(0,i.Z)(e,g),u=c.useRef(),f=h;if(o&&(f={primaryColor:o,secondaryColor:l||(0,p.pw)(o)}),(0,p.C3)(u),(0,p.Kp)((0,p.r)(t),"icon should be icon definiton, but got ".concat(t)),!(0,p.r)(t))return null;var m=t;return m&&"function"==typeof m.icon&&(m=(0,d.Z)((0,d.Z)({},m),{},{icon:m.icon(f.primaryColor,f.secondaryColor)})),(0,p.R_)(m.icon,"svg-".concat(m.name),(0,d.Z)((0,d.Z)({className:a,onClick:r,style:n,"data-icon":m.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},s),{},{ref:u}))};m.displayName="IconReact",m.getTwoToneColors=function(){return(0,d.Z)({},h)},m.setTwoToneColors=function(e){var t=e.primaryColor,a=e.secondaryColor;h.primaryColor=t,h.secondaryColor=a||(0,p.pw)(t),h.calculated=!!a};var b=m;function v(e){var t=(0,p.H9)(e),a=(0,n.Z)(t,2),r=a[0],o=a[1];return b.setTwoToneColors({primaryColor:r,secondaryColor:o})}var y=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];v(u.iN.primary);var P=c.forwardRef((function(e,t){var a=e.className,l=e.icon,u=e.spin,d=e.rotate,g=e.tabIndex,h=e.onClick,m=e.twoToneColor,v=(0,i.Z)(e,y),P=c.useContext(f.Z),Z=P.prefixCls,E=void 0===Z?"anticon":Z,x=P.rootClassName,C=s()(x,E,(0,o.Z)((0,o.Z)({},"".concat(E,"-").concat(l.name),!!l.name),"".concat(E,"-spin"),!!u||"loading"===l.name),a),k=g;void 0===k&&h&&(k=-1);var w=d?{msTransform:"rotate(".concat(d,"deg)"),transform:"rotate(".concat(d,"deg)")}:void 0,N=(0,p.H9)(m),T=(0,n.Z)(N,2),_=T[0],M=T[1];return c.createElement("span",(0,r.Z)({role:"img","aria-label":l.name},v,{ref:t,tabIndex:k,onClick:h,className:C}),c.createElement(b,{icon:l,primaryColor:_,secondaryColor:M,style:w}))}));P.displayName="AntdIcon",P.getTwoToneColor=function(){var e=b.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor},P.setTwoToneColor=v;var Z=P},28771:function(e,t,a){var r=(0,a(75271).createContext)({});t.Z=r},39765:function(e,t,a){a.d(t,{R_:function(){return m},pw:function(){return b},r:function(){return g},H9:function(){return v},vD:function(){return y},C3:function(){return P},Kp:function(){return p}});var r=a(98037),n=a(24744),o=a(75875),i=a(61984);function c(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}function l(e){return function(e){return c(e)instanceof ShadowRoot}(e)?c(e):null}var s=a(7432),u=a(75271),f=a(28771);function d(e){return e.replace(/-(.)/g,(function(e,t){return t.toUpperCase()}))}function p(e,t){(0,s.ZP)(e,"[@ant-design/icons] ".concat(t))}function g(e){return"object"===(0,n.Z)(e)&&"string"==typeof e.name&&"string"==typeof e.theme&&("object"===(0,n.Z)(e.icon)||"function"==typeof e.icon)}function h(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,a){var r=e[a];if("class"===a)t.className=r,delete t.class;else delete t[a],t[d(a)]=r;return t}),{})}function m(e,t,a){return a?u.createElement(e.tag,(0,r.Z)((0,r.Z)({key:t},h(e.attrs)),a),(e.children||[]).map((function(a,r){return m(a,"".concat(t,"-").concat(e.tag,"-").concat(r))}))):u.createElement(e.tag,(0,r.Z)({key:t},h(e.attrs)),(e.children||[]).map((function(a,r){return m(a,"".concat(t,"-").concat(e.tag,"-").concat(r))})))}function b(e){return(0,o.R_)(e)[0]}function v(e){return e?Array.isArray(e)?e:[e]:[]}var y={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},P=function(e){var t=(0,u.useContext)(f.Z),a=t.csp,r=t.prefixCls,n="\n.anticon {\n display: inline-flex;\n align-items: center;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";r&&(n=n.replace(/anticon/g,r)),(0,u.useEffect)((function(){var t=l(e.current);(0,i.hq)(n,"@ant-design-icons",{prepend:!0,csp:a,attachTo:t})}),[])}},24915:function(e,t,a){a.r(t),a.d(t,{default:function(){return j}});var r=a(90228),n=a.n(r),o=a(87999),i=a.n(o),c=a(48305),l=a.n(c),s=a(72317),u=a(75271),f=a(71742),d=a(19116),p=a(61508),g=a(93481),h=a(20553),m=a(98705),b=a(54075),v=a(2727),y=a(94978),P=a(20710),Z=a(31352),E=a(11333),x=a.n(E),C=a(25298),k=a.n(C),w=a(17069),N=a.n(w),T=a(82092),_=a.n(T),M=a(5174),S=a(80403),A=/\[\ue6f5info\]/g,U=/\[\ue67fdebug\]/g,R=/\[\ue880warn\]/g,I=/\[\ue602error\]/g,O="system-log-info",B="system-warn-info",q="system-error-info",H="system-debug-info",D=M.lg.fromClass(function(){function e(t){k()(this,e),_()(this,"decorations",void 0),this.decorations=this.getDecorations(t)}return N()(e,[{key:"update",value:function(e){e.docChanged&&(this.decorations=this.getDecorations(e.view))}},{key:"getDecorations",value:function(e){for(var t,a=new S.f_,r=e.state.doc.toString();null!==(t=A.exec(r));){var n=M.p.mark({class:O});a.add(t.index,t.index+t[0].length,n)}return a.finish()}}]),e}(),{decorations:function(e){return e.decorations}}),K=M.lg.fromClass(function(){function e(t){k()(this,e),_()(this,"decorations",void 0),this.decorations=this.getDecorations(t)}return N()(e,[{key:"update",value:function(e){e.docChanged&&(this.decorations=this.getDecorations(e.view))}},{key:"getDecorations",value:function(e){for(var t,a=new S.f_,r=e.state.doc.toString();null!==(t=R.exec(r));){var n=M.p.mark({class:B});a.add(t.index,t.index+t[0].length,n)}return a.finish()}}]),e}(),{decorations:function(e){return e.decorations}}),L=M.lg.fromClass(function(){function e(t){k()(this,e),_()(this,"decorations",void 0),this.decorations=this.getDecorations(t)}return N()(e,[{key:"update",value:function(e){e.docChanged&&(this.decorations=this.getDecorations(e.view))}},{key:"getDecorations",value:function(e){for(var t,a=new S.f_,r=e.state.doc.toString();null!==(t=U.exec(r));){var n=M.p.mark({class:H});a.add(t.index,t.index+t[0].length,n)}return a.finish()}}]),e}(),{decorations:function(e){return e.decorations}}),F=M.lg.fromClass(function(){function e(t){k()(this,e),_()(this,"decorations",void 0),this.decorations=this.getDecorations(t)}return N()(e,[{key:"update",value:function(e){e.docChanged&&(this.decorations=this.getDecorations(e.view))}},{key:"getDecorations",value:function(e){for(var t,a=new S.f_,r=e.state.doc.toString();null!==(t=I.exec(r));){var n=M.p.mark({class:q});a.add(t.index,t.index+t[0].length,n)}return a.finish()}}]),e}(),{decorations:function(e){return e.decorations}}),G=M.tk.baseTheme({".system-log-info":{color:"#2196F3"},".system-warn-info":{color:"#FFB827"},".system-error-info":{color:"#FA5151"},".system-debug-info":{color:"#009A29"}}),Q=a(52676),W=d.Z.RangePicker,j=function(e){var t=e.height,a=e.theme,r=(0,u.useRef)(null),o=(0,u.useRef)(),c=(0,u.useState)(["",""]),d=l()(c,2),E=d[0],C=d[1],k=(0,u.useState)(""),w=l()(k,2),N=w[0],T=w[1],_=(0,Z.Z)((function(){return y.W.get("".concat(P.Z.apiPrefix,"system/log?startTime=").concat(E[0],"&endTime=").concat(E[1]),{responseType:"blob"})}),{refreshDeps:[E],onSuccess:function(e){return i()(n()().mark((function t(){return n()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.t0=T,t.next=3,e.text();case 3:t.t1=t.sent,(0,t.t0)(t.t1);case 5:case"end":return t.stop()}}),t)})))()}}),M=_.loading,S=_.refresh,A=function(e){r.current.scrollDOM.scrollTo({top:"start"===e?0:r.current.scrollDOM.scrollHeight})};return(0,Q.jsxs)("div",{style:{position:"relative"},children:[(0,Q.jsxs)("div",{children:[(0,Q.jsx)(W,{style:{marginBottom:12,marginRight:12},disabledDate:function(e){return e>x()()||e<x()().subtract(7,"days")},defaultValue:[x()(),x()()],onOpenChange:function(e){o.current=!!e&&["",""]},onCalendarChange:function(e,t,a){var r=a.range;o.current&&"boolean"!=typeof o.current&&("start"===r&&(o.current[0]=t[0]),"end"===r&&(o.current[1]=t[1]),o.current[0]&&o.current[1]&&C(t))}}),(0,Q.jsx)(g.Z,{onClick:function(){y.W.delete("".concat(P.Z.apiPrefix,"system/log")).then((function(e){p.ZP.success("删除成功"),S()}))},children:s.ZP.get("清空日志")})]}),N?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(f.ZP,{maxHeight:"".concat(t,"px"),value:N,onCreateEditor:function(e){r.current=e},extensions:[L,F,D,K,G],readOnly:!0,theme:a.includes("dark")?"dark":"light"}),(0,Q.jsxs)("div",{style:{position:"absolute",bottom:20,right:20,display:"flex",flexDirection:"column",gap:10},children:[(0,Q.jsx)(g.Z,{size:"small",icon:(0,Q.jsx)(b.Z,{}),onClick:function(){A("start")}}),(0,Q.jsx)(g.Z,{size:"small",icon:(0,Q.jsx)(v.Z,{}),onClick:function(){A("end")}})]})]}):M?(0,Q.jsx)(h.Z,{}):(0,Q.jsx)(m.Z,{image:m.Z.PRESENTED_IMAGE_SIMPLE})]})}},20710:function(e,t,a){var r=a(72317),n=window.__ENV__QlBaseUrl||"/";t.Z={siteName:r.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: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:"ntfy",label:"Ntfy"},{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:"wxPusherBot",label:"wxPusher"},{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("推送消息的优先级")}],ntfy:[{label:"ntfyUrl",tip:r.ZP.get("ntfy的url地址,例如 https://ntfy.sh"),required:!0},{label:"ntfyTopic",tip:r.ZP.get("ntfy的消息应用topic"),required:!0},{label:"ntfyPriority",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("一对多推送的“群组编码”(一对多推送下面->您的群组(如无则创建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送)")},{label:"pushplusTemplate",tip:r.ZP.get("发送模板")},{label:"pushplusChannel",tip:r.ZP.get("发送渠道")},{label:"pushplusWebhook",tip:r.ZP.get("webhook编码")},{label:"pushplusCallbackUrl",tip:r.ZP.get("发送结果回调地址")},{label:"pushplusTo",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,为空默认使用专业版")}],wxPusherBot:[{label:"wxPusherBotAppToken",tip:r.ZP.get("wxPusherBot的appToken"),required:!0},{label:"wxPusherBotTopicIds",tip:r.ZP.get("wxPusherBot的topicIds"),required:!1},{label:"wxPusherBotUids",tip:r.ZP.get("wxPusherBot的uids"),required:!1}],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"]}},94978:function(e,t,a){a.d(t,{W:function(){return h}});var r=a(90228),n=a.n(r),o=a(87999),i=a.n(o),c=a(72317),l=a(61508),s=a(20710),u=a(31038),f=a(74799);l.ZP.config({duration:2});var d=Date.now(),p=f.Z.create({timeout:6e4,params:{t:d}}),g=["/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(s.Z.authKey);return t&&!g.includes(e.url)?(e.headers.Authorization="Bearer ".concat(t),e):e})),p.interceptors.response.use(function(){var e=i()(n()().mark((function e(t){var a,r,o;return n()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.status,![502,504].includes(a)){e.next=5;break}u.history.push("/error"),e.next=18;break;case 5:if(401!==a){e.next=9;break}"/login"!==u.history.location.pathname&&(localStorage.removeItem(s.Z.authKey),u.history.push("/login")),e.next=18;break;case 9:return e.prev=9,200!==(r=t.data).code&&(o=r.message||r.data)&&l.ZP.error({content:o,style:{maxWidth:500,margin:"0 auto"}}),e.abrupt("return",r);case 15:e.prev=15,e.t0=e.catch(9);case 17:case 18:return e.abrupt("return",t);case 19:case"end":return e.stop()}}),e,null,[[9,15]])})));return function(t){return e.apply(this,arguments)}}(),(function(e){if(e.response){var t=e.response.data?e.response.data.message||e.message||e.response.data:e.response.statusText,a=e.response.status;if([502,504].includes(a))u.history.push("/error");else if(401===a)"/login"!==u.history.location.pathname&&(l.ZP.error(c.ZP.get("登录已过期,请重新登录")),localStorage.removeItem(s.Z.authKey),u.history.push("/login"));else{var r,n;if("function"==typeof(null===(r=e.config)||void 0===r?void 0:r.onError))return null===(n=e.config)||void 0===n?void 0:n.onError(e.response);l.ZP.error({content:t,style:{maxWidth:500,margin:"0 auto"}})}}else console.log(e.message);return Promise.reject(e)}));var h=p},28800:function(e,t,a){a.d(t,{F:function(){return c},Z:function(){return i}});var r=a(57904),n=a(82187),o=a.n(n);(0,a(86428).b)("warning","error","");function i(e,t,a){return o()((0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)({},"".concat(e,"-status-success"),"success"===t),"".concat(e,"-status-warning"),"warning"===t),"".concat(e,"-status-error"),"error"===t),"".concat(e,"-status-validating"),"validating"===t),"".concat(e,"-has-feedback"),a))}var c=function(e,t){return t||e}},98705:function(e,t,a){a.d(t,{Z:function(){return m}});var r=a(57904),n=a(2053),o=a(82187),i=a.n(o),c=a(75271),l=a(96820),s=a(76595),u=function(){var e=(0,c.useContext(l.E_).getPrefixCls)("empty-img-default");return c.createElement("svg",{className:e,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},c.createElement("g",{fill:"none",fillRule:"evenodd"},c.createElement("g",{transform:"translate(24 31.67)"},c.createElement("ellipse",{className:"".concat(e,"-ellipse"),cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),c.createElement("path",{className:"".concat(e,"-path-1"),d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z"}),c.createElement("path",{className:"".concat(e,"-path-2"),d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",transform:"translate(13.56)"}),c.createElement("path",{className:"".concat(e,"-path-3"),d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"}),c.createElement("path",{className:"".concat(e,"-path-4"),d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z"})),c.createElement("path",{className:"".concat(e,"-path-5"),d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z"}),c.createElement("g",{className:"".concat(e,"-g"),transform:"translate(149.65 15.383)"},c.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),c.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},f=function(){var e=(0,c.useContext(l.E_).getPrefixCls)("empty-img-simple");return c.createElement("svg",{className:e,width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},c.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},c.createElement("ellipse",{className:"".concat(e,"-ellipse"),cx:"32",cy:"33",rx:"32",ry:"7"}),c.createElement("g",{className:"".concat(e,"-g"),fillRule:"nonzero"},c.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),c.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",className:"".concat(e,"-path")}))))},d=function(e,t){var a={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(a[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(a[r[n]]=e[r[n]])}return a},p=c.createElement(u,null),g=c.createElement(f,null),h=function(e){var t=e.className,a=e.prefixCls,o=e.image,u=void 0===o?p:o,f=e.description,h=e.children,m=e.imageStyle,b=d(e,["className","prefixCls","image","description","children","imageStyle"]),v=c.useContext(l.E_),y=v.getPrefixCls,P=v.direction;return c.createElement(s.Z,{componentName:"Empty"},(function(e){var o=y("empty",a),l=void 0!==f?f:e.description,s="string"==typeof l?l:"empty",d=null;return d="string"==typeof u?c.createElement("img",{alt:s,src:u}):u,c.createElement("div",(0,n.Z)({className:i()(o,(0,r.Z)((0,r.Z)({},"".concat(o,"-normal"),u===g),"".concat(o,"-rtl"),"rtl"===P),t)},b),c.createElement("div",{className:"".concat(o,"-image"),style:m},d),l&&c.createElement("div",{className:"".concat(o,"-description")},l),h&&c.createElement("div",{className:"".concat(o,"-footer")},h))}))};h.PRESENTED_IMAGE_DEFAULT=p,h.PRESENTED_IMAGE_SIMPLE=g;var m=h},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}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[7953],{49385:function(e,t){t.Z={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"}},44084:function(e,t,n){var r=n(2053),i=n(75271),c=n(15618),o=n(48881),a=function(e,t){return i.createElement(o.Z,(0,r.Z)({},e,{ref:t,icon:c.Z}))},s=i.forwardRef(a);t.Z=s},15631:function(e,t,n){var r=n(2053),i=n(75271),c=n(49385),o=n(48881),a=function(e,t){return i.createElement(o.Z,(0,r.Z)({},e,{ref:t,icon:c.Z}))},s=i.forwardRef(a);t.Z=s},86935:function(e,t,n){var r=n(2053),i=n(75271),c=n(22260),o=n(48881),a=function(e,t){return i.createElement(o.Z,(0,r.Z)({},e,{ref:t,icon:c.Z}))},s=i.forwardRef(a);t.Z=s},88939:function(e,t,n){var r=n(2053),i=n(75271),c=n(19579),o=n(48881),a=function(e,t){return i.createElement(o.Z,(0,r.Z)({},e,{ref:t,icon:c.Z}))},s=i.forwardRef(a);t.Z=s},28423:function(e,t,n){var r=n(2053),i=n(75271),c=n(17338),o=n(48881),a=function(e,t){return i.createElement(o.Z,(0,r.Z)({},e,{ref:t,icon:c.Z}))},s=i.forwardRef(a);t.Z=s},97953:function(e,t,n){var r=n(2053),i=n(75271),c=n(38930),o=n(48881),a=function(e,t){return i.createElement(o.Z,(0,r.Z)({},e,{ref:t,icon:c.Z}))},s=i.forwardRef(a);t.Z=s},56958:function(e,t,n){n.d(t,{Z:function(){return s}});var r=n(2053),i=n(75271),c={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 1024c-69.1 0-136.2-13.5-199.3-40.2C251.7 958 197 921 150 874c-47-47-84-101.7-109.8-162.7C13.5 648.2 0 581.1 0 512c0-19.9 16.1-36 36-36s36 16.1 36 36c0 59.4 11.6 117 34.6 171.3 22.2 52.4 53.9 99.5 94.3 139.9 40.4 40.4 87.5 72.2 139.9 94.3C395 940.4 452.6 952 512 952c59.4 0 117-11.6 171.3-34.6 52.4-22.2 99.5-53.9 139.9-94.3 40.4-40.4 72.2-87.5 94.3-139.9C940.4 629 952 571.4 952 512c0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.2C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3s-13.5 136.2-40.2 199.3C958 772.3 921 827 874 874c-47 47-101.8 83.9-162.7 109.7-63.1 26.8-130.2 40.3-199.3 40.3z"}}]},name:"loading-3-quarters",theme:"outlined"},o=n(48881),a=function(e,t){return i.createElement(o.Z,(0,r.Z)({},e,{ref:t,icon:c}))};var s=i.forwardRef(a)},1704:function(e,t,n){n.d(t,{Z:function(){return s}});var r=n(2053),i=n(75271),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372 0-89 31.3-170.8 83.5-234.8l523.3 523.3C682.8 852.7 601 884 512 884zm288.5-137.2L277.2 223.5C341.2 171.3 423 140 512 140c205.4 0 372 166.6 372 372 0 89-31.3 170.8-83.5 234.8z"}}]},name:"stop",theme:"outlined"},o=n(48881),a=function(e,t){return i.createElement(o.Z,(0,r.Z)({},e,{ref:t,icon:c}))};var s=i.forwardRef(a)},30502:function(e,t,n){n.d(t,{Z:function(){return l}});var r=n(75271);var i=r["undefined"!=typeof document&&void 0!==document.createElement?"useLayoutEffect":"useEffect"];var c=e=>{const t=r.useRef(e);return r.useEffect((()=>{t.current=e})),t};function o(){}let a;const s=e=>a||(a=function(e){let t=!1,n=[];const r=new Map,i=new(e||window.ResizeObserver)(((e,i)=>{n=n.concat(e),t||window.requestAnimationFrame((function(){const e=new Set;for(let t=0;t<n.length;t++){if(e.has(n[t].target))continue;e.add(n[t].target);const c=r.get(n[t].target);null==c||c.forEach((e=>e(n[t],i)))}n=[],t=!1})),t=!0}));return{observer:i,subscribe(e,t){var n;i.observe(e);const c=null!==(n=r.get(e))&&void 0!==n?n:[];c.push(t),r.set(e,c)},unsubscribe(e,t){var n;const c=null!==(n=r.get(e))&&void 0!==n?n:[];if(1===c.length)return i.unobserve(e),void r.delete(e);const o=c.indexOf(t);-1!==o&&c.splice(o,1),r.set(e,c)}}}(e));var l=function(e,t,n={}){const r=s(n.polyfill),a=c(t);return i((()=>{let t=!1;const n=e&&"current"in e?e.current:e;if(!n)return o;function i(e,n){t||a.current(e,n)}return r.subscribe(n,i),()=>{t=!0,r.unsubscribe(n,i)}}),[e,r,a]),r.observer}},46108:function(e,t,n){var r=n(48305),i=n.n(r),c=n(75271),o=n(30502),a=n(65609);t.Z=function(e,t){var n=(0,c.useState)(0),r=i()(n,2),s=r[0],l=r[1];return(0,o.Z)(e,(function(e){var n=e.target;n.classList.contains("ant-table-wrapper")||(n=e.target.querySelector(".ant-table-wrapper")),l((0,a.W9)({extraHeight:t,target:n}))})),s}},64274:function(e,t,n){n.r(t),n.d(t,{IntervalSchedule:function(){return A},SubscriptionStatus:function(){return M},SubscriptionType:function(){return H},default:function(){return D}});var r=n(15558),i=n.n(r),c=n(48305),o=n.n(c),a=n(26068),s=n.n(a),l=n(72317),u=n(75271),f=n(50691),d=n(17082),p=n(47667),h=n(63505),g=n(45520),v=n(32253),b=n(61508),m=n(85950),Z=n(93481),x=n(10948),y=n(15631),k=n(56958),P=n(86935),w=n(28423),C=n(44084),S=n(1704),j=n(88939),E=n(97953),O=n(20710),I=n(40872),R=n(94978),_=n(2237),z=n(31038),N=n(41772),F=n(46108),T=n(69325),B=n(52676),W=f.Z.Text,q=f.Z.Paragraph,L=d.Z.Search,M=function(e){return e[e.running=0]="running",e[e.idle=1]="idle",e[e.disabled=2]="disabled",e[e.queued=3]="queued",e}({}),A=function(e){return e.days="天",e.hours="时",e.minutes="分",e.seconds="秒",e}({}),H=function(e){return e["private-repo"]="私有仓库",e["public-repo"]="公开仓库",e.file="单文件",e}({}),D=function(){var e=(0,z.useOutletContext)(),t=e.headerStyle,n=e.isPhone,r=[{title:l.ZP.get("名称"),dataIndex:"name",key:"name",width:150,sorter:{compare:function(e,t){return e.name.localeCompare(t.name)},multiple:2}},{title:l.ZP.get("链接"),dataIndex:"url",key:"url",sorter:{compare:function(e,t){return e.name.localeCompare(t.name)},multiple:2},render:function(e,t){return(0,B.jsx)(q,{style:{wordBreak:"break-all",marginBottom:0},ellipsis:{tooltip:e,rows:2},children:e})}},{title:l.ZP.get("类型"),dataIndex:"type",key:"type",width:130,render:function(e,t){return H[t.type]}},{title:l.ZP.get("分支"),dataIndex:"branch",key:"branch",width:130,render:function(e,t){return t.branch||"-"}},{title:l.ZP.get("定时规则"),width:180,render:function(e,t){if("interval"===t.schedule_type){var n=t.interval_schedule,r=n.type,i=n.value;return"每".concat(i).concat(A[r])}return t.schedule}},{title:l.ZP.get("状态"),key:"status",dataIndex:"status",width:110,filters:[{text:l.ZP.get("运行中"),value:0},{text:l.ZP.get("空闲中"),value:1},{text:l.ZP.get("已禁用"),value:2}],onFilter:function(e,t){return t.is_disabled&&0!==t.status?2===e:t.status===e},render:function(e,t){return(0,B.jsxs)(B.Fragment,{children:[(!t.is_disabled||t.status!==M.idle)&&(0,B.jsxs)(B.Fragment,{children:[t.status===M.idle&&(0,B.jsx)(p.Z,{icon:(0,B.jsx)(y.Z,{}),color:"default",children:l.ZP.get("空闲中")}),t.status===M.running&&(0,B.jsx)(p.Z,{icon:(0,B.jsx)(k.Z,{spin:!0}),color:"processing",children:l.ZP.get("运行中")})]}),1===t.is_disabled&&t.status===M.idle&&(0,B.jsx)(p.Z,{icon:(0,B.jsx)(P.Z,{}),color:"error",children:l.ZP.get("已禁用")})]})}},{title:l.ZP.get("操作"),key:"action",width:140,render:function(e,t,n){return(0,B.jsxs)(h.Z,{size:"middle",children:[t.status===M.idle&&(0,B.jsx)("a",{onClick:function(e){e.stopPropagation(),Ce(t,n)},children:l.ZP.get("运行")}),t.status!==M.idle&&(0,B.jsx)("a",{onClick:function(e){e.stopPropagation(),Se(t,n)},children:l.ZP.get("停止")}),(0,B.jsx)("a",{onClick:function(e){e.stopPropagation(),ye(s()(s()({},t),{},{timestamp:Date.now()}))},children:l.ZP.get("日志")}),(0,B.jsx)(Ee,{record:t,index:n},"more")]})}}],c=(0,u.useState)([]),a=o()(c,2),f=a[0],d=a[1],D=(0,u.useState)(!0),$=o()(D,2),J=$[0],V=$[1],K=(0,u.useState)(!1),U=o()(K,2),Y=U[0],G=U[1],Q=(0,u.useState)(),X=o()(Q,2),ee=X[0],te=X[1],ne=(0,u.useState)(""),re=o()(ne,2),ie=re[0],ce=re[1],oe=(0,u.useState)(1),ae=o()(oe,2),se=ae[0],le=ae[1],ue=(0,u.useState)(20),fe=o()(ue,2),de=fe[0],pe=fe[1],he=(0,u.useState)(!1),ge=o()(he,2),ve=ge[0],be=ge[1],me=(0,u.useState)(),Ze=o()(me,2),xe=Ze[0],ye=Ze[1],ke=(0,u.useRef)(null),Pe=(0,F.Z)(ke),we=(0,u.useRef)(!1),Ce=function(e,t){g.Z.confirm({title:l.ZP.get("确认运行"),content:(0,B.jsxs)(B.Fragment,{children:[l.ZP.get("确认运行定时任务")," ",(0,B.jsx)(W,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",l.ZP.get("吗")]}),onOk:function(){R.W.put("".concat(O.Z.apiPrefix,"subscriptions/run"),[e.id]).then((function(t){var n=t.code;t.data;if(200===n){var r=i()(f),c=r.findIndex((function(t){return t.id===e.id}));-1!==c&&(r.splice(c,1,s()(s()({},e),{},{status:M.running})),d(r))}}))},onCancel:function(){console.log("Cancel")}})},Se=function(e,t){g.Z.confirm({title:l.ZP.get("确认停止"),content:(0,B.jsxs)(B.Fragment,{children:[l.ZP.get("确认停止定时任务")," ",(0,B.jsx)(W,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",l.ZP.get("吗")]}),onOk:function(){R.W.put("".concat(O.Z.apiPrefix,"subscriptions/stop"),[e.id]).then((function(t){var n=t.code;t.data;if(200===n){var r=i()(f),c=r.findIndex((function(t){return t.id===e.id}));-1!==c&&(r.splice(c,1,s()(s()({},e),{},{pid:null,status:M.idle})),d(r))}}))},onCancel:function(){console.log("Cancel")}})},je=function(e){we.current=e.target.checked},Ee=function(e){var t=e.record,n=e.index;return(0,B.jsx)(m.Z,{placement:"bottomRight",trigger:["click"],menu:{items:[{label:l.ZP.get("编辑"),key:"edit",icon:(0,B.jsx)(w.Z,{})},{label:1===t.is_disabled?l.ZP.get("启用"):l.ZP.get("禁用"),key:"enableOrDisable",icon:1===t.is_disabled?(0,B.jsx)(C.Z,{}):(0,B.jsx)(S.Z,{})},{label:l.ZP.get("删除"),key:"delete",icon:(0,B.jsx)(j.Z,{})}],onClick:function(e){var r=e.key;e.domEvent.stopPropagation(),Oe(r,t,n)}},children:(0,B.jsx)("a",{onClick:function(e){return e.stopPropagation()},children:(0,B.jsx)(E.Z,{})})})},Oe=function(e,t,n){switch(e){case"edit":!function(e,t){te(e),G(!0)}(t);break;case"enableOrDisable":!function(e,t){g.Z.confirm({title:"确认".concat(1===e.is_disabled?l.ZP.get("启用"):l.ZP.get("禁用")),content:(0,B.jsxs)(B.Fragment,{children:[l.ZP.get("确认"),1===e.is_disabled?l.ZP.get("启用"):l.ZP.get("禁用"),l.ZP.get("定时订阅")," ",(0,B.jsx)(W,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",l.ZP.get("吗")]}),onOk:function(){R.W.put("".concat(O.Z.apiPrefix,"subscriptions/").concat(1===e.is_disabled?"enable":"disable"),[e.id]).then((function(t){var n=t.code;if(t.data,200===n){var r=1===e.is_disabled?0:1,c=i()(f),o=c.findIndex((function(t){return t.id===e.id}));-1!==o&&(c.splice(o,1,s()(s()({},e),{},{is_disabled:r})),d(c))}}))},onCancel:function(){console.log("Cancel")}})}(t);break;case"delete":!function(e,t){g.Z.confirm({title:l.ZP.get("确认删除"),content:(0,B.jsxs)(B.Fragment,{children:[l.ZP.get("确认删除定时订阅")," ",(0,B.jsx)(W,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",l.ZP.get("吗"),(0,B.jsx)("div",{style:{marginTop:20},children:(0,B.jsx)(v.Z,{onChange:je,children:l.ZP.get("同时删除关联任务和脚本")})})]}),onOk:function(){R.W.delete("".concat(O.Z.apiPrefix,"subscriptions"),{data:[e.id],params:{force:we.current}}).then((function(t){var n=t.code;if(t.data,200===n){b.ZP.success(l.ZP.get("删除成功"));var r=i()(f),c=r.findIndex((function(t){return t.id===e.id}));-1!==c&&(r.splice(c,1),d(r))}}))},onCancel:function(){console.log("Cancel")}})}(t)}},Ie=function(e){var t=f.findIndex((function(t){return t.id===e.id})),n=i()(f);-1===t?n.unshift(e):n.splice(t,1,s()({},e)),d(n)},Re=(0,u.useCallback)((function(e){e.message;var t=e.references;d((function(e){for(var n=i()(e),r=function(r){var i=e.findIndex((function(e){return e.id===t[r]}));-1!==i&&n.splice(i,1,s()(s()({},e[i]),{},{status:M.idle}))},c=0;c<t.length;c++)r(c);return n}))}),[]);return(0,u.useEffect)((function(){var e=T.Z.getInstance();return e.subscribe("runSubscriptionEnd",Re),function(){e.unsubscribe("runSubscriptionEnd",Re)}}),[]),(0,u.useEffect)((function(){xe&&(localStorage.setItem("logSubscription",xe.id),be(!0))}),[xe]),(0,u.useEffect)((function(){V(!0),R.W.get("".concat(O.Z.apiPrefix,"subscriptions?searchValue=").concat(ie)).then((function(e){var t=e.code,n=e.data;200===t&&(d(n),le(1))})).finally((function(){return V(!1)}))}),[ie]),(0,u.useEffect)((function(){pe(parseInt(localStorage.getItem("pageSize")||"20"))}),[]),(0,B.jsxs)(I.ZP,{className:"ql-container-wrapper subscriptiontab-wrapper",title:l.ZP.get("订阅管理"),extra:[(0,B.jsx)(L,{placeholder:l.ZP.get("请输入名称或者关键词"),style:{width:"auto"},enterButton:!0,allowClear:!0,loading:J,onSearch:function(e){ce(e.trim())}}),(0,B.jsx)(Z.Z,{type:"primary",onClick:function(){return te(null),void G(!0)},children:l.ZP.get("创建订阅")},"2")],header:{style:t},children:[(0,B.jsx)(x.Z,{ref:ke,columns:r,pagination:{current:se,onChange:function(e,t){le(e),pe(t),localStorage.setItem("pageSize",t+"")},pageSize:de,showSizeChanger:!0,simple:n,defaultPageSize:20,showTotal:function(e,t){return"第 ".concat(t[0],"-").concat(t[1]," 条/总共 ").concat(e," 条")},pageSizeOptions:[20,100,500,1e3]},dataSource:f,rowKey:"id",size:"middle",scroll:{x:1e3,y:Pe},loading:J,rowClassName:function(e,t){return e.isPinned?"pinned-subscription subscription":"subscription"}}),(0,B.jsx)(_.default,{visible:Y,handleCancel:function(e){G(!1),e&&Ie(e)},subscription:ee}),(0,B.jsx)(N.default,{visible:ve,handleCancel:function(){be(!1)},subscription:xe})]})}},41772:function(e,t,n){n.r(t);var r=n(48305),i=n.n(r),c=n(72317),o=n(75271),a=n(45520),s=n(93481),l=n(94978),u=n(20710),f=n(56958),d=n(44084),p=n(40276),h=n(65609),g=n(78060),v=n.n(g),b=n(52676);t.default=function(e){var t=e.subscription,n=e.handleCancel,r=e.visible,g=e.data,m=e.logUrl,Z=(0,o.useState)(c.ZP.get("启动中...")),x=i()(Z,2),y=x[0],k=x[1],P=(0,o.useState)(!0),w=i()(P,2),C=w[0],S=w[1],j=(0,o.useState)(!0),E=i()(j,2),O=E[0],I=E[1],R=(0,o.useState)(!1),_=i()(R,2),z=_[0],N=_[1],F=function e(n){n&&S(!0),l.W.get(m||"".concat(u.Z.apiPrefix,"subscriptions/").concat(t.id,"/log")).then((function(n){var r=n.code,i=n.data;if(200===r&&localStorage.getItem("logSubscription")===String(t.id)){var o=i;k(o||c.ZP.get("暂无日志")),I(o&&!(0,h.x$)(o)),o&&!(0,h.x$)(o)&&setTimeout((function(){e()}),2e3)}})).finally((function(){n&&S(!1)}))},T=function(){localStorage.removeItem("logSubscription"),n()};return(0,o.useEffect)((function(){t&&t.id&&r&&F(!0)}),[t,r]),(0,o.useEffect)((function(){g&&k(g)}),[g]),(0,o.useEffect)((function(){N(document.body.clientWidth<768)}),[]),(0,b.jsx)(a.Z,{title:(0,b.jsxs)(b.Fragment,{children:[(O||C)&&(0,b.jsx)(f.Z,{spin:!0}),!O&&!C&&(0,b.jsx)(d.Z,{}),(0,b.jsx)("span",{style:{marginLeft:5},children:t&&t.name})]}),open:r,centered:!0,className:"log-modal",forceRender:!0,onOk:function(){return T()},onCancel:function(){return T()},footer:[(0,b.jsx)(s.Z,{type:"primary",onClick:function(){return T()},children:c.ZP.get("知道了")})],children:(0,b.jsx)("div",{className:"log-container",children:C?(0,b.jsx)(p.Z,{}):(0,b.jsx)("pre",{style:z?{fontFamily:"Source Code Pro",zoom:.83}:{},children:(0,b.jsx)(v(),{children:y})})})})}},69325:function(e,t,n){var r=n(15558),i=n.n(r),c=n(67825),o=n.n(c),a=n(90228),s=n.n(a),l=n(87999),u=n.n(l),f=n(25298),d=n.n(f),p=n(17069),h=n.n(p),g=n(82092),v=n.n(g),b=n(78078),m=n.n(b),Z=["type"],x=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};d()(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 h()(e,[{key:"init",value:(n=u()(s()().mark((function e(){var t=this;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,this.state="connecting",this.emit("connecting");case 3:if(!(this.reconnectAttempts<this.options.maxReconnectAttempts)){e.next=16;break}return this.socket=new(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()(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)===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 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)===m().OPEN&&this.socket.send(JSON.stringify(e))}},{key:"dispatchMessage",value:function(e){var t=e.type,n=o()(e,Z),r=this.subscriptions.get(t)||new Set;i()(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)===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()(x,"instance",null),t.Z=x},47667:function(e,t,n){n.d(t,{Z:function(){return y}});var r=n(57904),i=n(2053),c=n(99459),o=n(32324),a=n(82187),s=n.n(a),l=n(2021),u=n(75271),f=n(96820),d=n(1667),p=n(74244),h=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},g=function(e){var t=e.prefixCls,n=e.className,c=e.checked,o=e.onChange,a=e.onClick,l=h(e,["prefixCls","className","checked","onChange","onClick"]),d=(0,u.useContext(f.E_).getPrefixCls)("tag",t),p=s()(d,(0,r.Z)((0,r.Z)({},"".concat(d,"-checkable"),!0),"".concat(d,"-checkable-checked"),c),n);return u.createElement("span",(0,i.Z)({},l,{className:p,onClick:function(e){null==o||o(!c),null==a||a(e)}}))},v=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n},b=new RegExp("^(".concat(d.Y.join("|"),")(-inverse)?$")),m=new RegExp("^(".concat(d.E.join("|"),")$")),Z=function(e,t){var n=e.prefixCls,a=e.className,d=e.style,h=e.children,g=e.icon,Z=e.color,x=e.onClose,y=e.closeIcon,k=e.closable,P=void 0!==k&&k,w=v(e,["prefixCls","className","style","children","icon","color","onClose","closeIcon","closable"]),C=u.useContext(f.E_),S=C.getPrefixCls,j=C.direction,E=u.useState(!0),O=(0,c.Z)(E,2),I=O[0],R=O[1];u.useEffect((function(){"visible"in w&&R(w.visible)}),[w.visible]);var _=function(){return!!Z&&(b.test(Z)||m.test(Z))},z=(0,i.Z)({backgroundColor:Z&&!_()?Z:void 0},d),N=_(),F=S("tag",n),T=s()(F,(0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)({},"".concat(F,"-").concat(Z),N),"".concat(F,"-has-color"),Z&&!N),"".concat(F,"-hidden"),!I),"".concat(F,"-rtl"),"rtl"===j),a),B=function(e){e.stopPropagation(),null==x||x(e),e.defaultPrevented||"visible"in w||R(!1)},W="onClick"in w||h&&"a"===h.type,q=(0,l.Z)(w,["visible"]),L=g||null,M=L?u.createElement(u.Fragment,null,L,u.createElement("span",null,h)):h,A=u.createElement("span",(0,i.Z)({},q,{ref:t,className:T,style:z}),M,P?y?u.createElement("span",{className:"".concat(F,"-close-icon"),onClick:B},y):u.createElement(o.Z,{className:"".concat(F,"-close-icon"),onClick:B}):null);return W?u.createElement(p.Z,null,A):A},x=u.forwardRef(Z);x.CheckableTag=g;var y=x}}]);
|