@whyour/qinglong 2.21.0 → 2.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dockerignore +13 -0
- package/.env.example +7 -0
- package/AGENTS.md +2 -2
- package/README-en.md +24 -0
- package/README.md +24 -0
- package/back/protos/api.proto +9 -1
- package/back/protos/cron.proto +4 -1
- package/deploy/kubernetes/README.md +81 -0
- package/deploy/kubernetes/base/kustomization.yaml +5 -0
- package/deploy/kubernetes/base/qinglong.yaml +95 -0
- package/deploy/kubernetes/overlays/example/kustomization.yaml +10 -0
- package/docker/Dockerfile +31 -12
- package/docker/Dockerfile.310 +31 -12
- package/docker/Dockerfile.debian +22 -14
- package/docker/Dockerfile.debian310 +24 -14
- package/docker/build-manifest.cjs +28 -0
- package/docker/verify-build.cjs +49 -0
- package/docs/releases/2.22.0-validation.md +49 -0
- package/docs/releases/2.22.0.md +54 -0
- package/ecosystem.config.js +10 -1
- package/package.json +11 -6
- package/sample/config.sample.sh +17 -2
- package/sample/notify.js +118 -0
- package/sample/notify.py +93 -0
- package/scripts/benchmark-execution.cjs +96 -0
- package/scripts/write-build-info.cjs +27 -0
- package/shell/api.sh +41 -14
- package/shell/check.sh +59 -19
- package/shell/lang/en.sh +6 -0
- package/shell/lang/zh.sh +6 -0
- package/shell/node_path_cache.sh +128 -0
- package/shell/otask.sh +10 -1
- package/shell/preload/sitecustomize.js +5 -1
- package/shell/share.sh +26 -9
- package/shell/start.sh +6 -3
- package/shell/task.sh +13 -3
- package/shell/update.sh +65 -4
- package/static/build/api/clientIp.js +42 -0
- package/static/build/api/config.js +8 -16
- package/static/build/api/cron.js +39 -3
- package/static/build/api/dashboard.js +50 -6
- package/static/build/api/env.js +2 -2
- package/static/build/api/health.js +2 -2
- package/static/build/api/index.js +4 -0
- package/static/build/api/log.js +39 -19
- package/static/build/api/retention.js +63 -0
- package/static/build/api/script.js +23 -22
- package/static/build/api/subscription.js +16 -2
- package/static/build/api/system.js +31 -9
- package/static/build/api/user.js +75 -15
- package/static/build/app.js +63 -54
- package/static/build/bootstrap/database.js +51 -0
- package/static/build/config/const.js +2 -0
- package/static/build/config/grpcCerts.js +4 -4
- package/static/build/config/index.js +0 -4
- package/static/build/config/share.js +5 -4
- package/static/build/config/util.js +136 -41
- package/static/build/data/cron.js +1 -0
- package/static/build/data/notify.js +18 -1
- package/static/build/data/sock.js +1 -0
- package/static/build/loaders/app.js +8 -6
- package/static/build/loaders/db.js +5 -35
- package/static/build/loaders/deps.js +30 -22
- package/static/build/loaders/express.js +44 -32
- package/static/build/loaders/initData.js +10 -7
- package/static/build/loaders/initFile.js +1 -1
- package/static/build/loaders/initTask.js +3 -2
- package/static/build/loaders/server.js +1 -1
- package/static/build/loaders/sock.js +72 -6
- package/static/build/middlewares/monitoring.js +12 -33
- package/static/build/middlewares/protectedPathCase.js +17 -0
- package/static/build/protos/api.js +78 -2
- package/static/build/protos/cron.js +21 -4
- package/static/build/protos/health.js +1 -1
- package/static/build/schedule/addCron.js +76 -10
- package/static/build/schedule/api.js +5 -2
- package/static/build/schedule/client.js +38 -6
- package/static/build/schedule/delCron.js +11 -1
- package/static/build/schedule/health.js +72 -7
- package/static/build/services/config.js +5 -42
- package/static/build/services/cron.js +353 -164
- package/static/build/services/dependence.js +66 -18
- package/static/build/services/grpc.js +2 -2
- package/static/build/services/health.js +4 -7
- package/static/build/services/http.js +9 -3
- package/static/build/services/log.js +2 -3
- package/static/build/services/metrics.js +46 -14
- package/static/build/services/notify.js +73 -5
- package/static/build/services/retention.js +123 -0
- package/static/build/services/schedule.js +57 -33
- package/static/build/services/script.js +4 -5
- package/static/build/services/subscription.js +57 -34
- package/static/build/services/system.js +49 -11
- package/static/build/services/user.js +244 -31
- package/static/build/shared/auth.js +22 -3
- package/static/build/shared/authMutation.js +17 -0
- package/static/build/shared/childProcess.js +82 -0
- package/static/build/shared/clientIp.js +27 -0
- package/static/build/shared/errors.js +9 -0
- package/static/build/shared/fileAccess.js +60 -0
- package/static/build/shared/i18n.js +62 -4
- package/static/build/shared/logReader.js +85 -0
- package/static/build/shared/logStreamManager.js +80 -60
- package/static/build/shared/pLimit.js +3 -2
- package/static/build/shared/password.js +30 -0
- package/static/build/shared/retention.js +58 -0
- package/static/build/shared/runCron.js +28 -15
- package/static/build/shared/schedulerMutationLock.js +44 -0
- package/static/build/shared/schedulerReadiness.js +82 -0
- package/static/build/shared/schemaMigrations.js +58 -0
- package/static/build/shared/startupProcess.js +48 -0
- package/static/build/shared/store.js +7 -0
- package/static/build/shared/trustProxy.js +119 -0
- package/static/build/validation/schedule.js +12 -3
- package/static/dist/{1885.e1ea09f6.async.js → 1885.b8f427bf.async.js} +1 -1
- package/static/dist/2031.6af40025.async.js +1 -0
- package/static/dist/2693.51c2636b.async.js +1 -0
- package/static/dist/{2890.9e373f5b.async.js → 2890.add55e85.async.js} +1 -1
- package/static/dist/2901.2ca95295.async.js +1 -0
- package/static/dist/445.a65ff63b.async.js +1 -0
- package/static/dist/4736.1d2b5cb6.async.js +1 -0
- package/static/dist/{4859.6592cebb.async.js → 4859.97d6653c.async.js} +1 -1
- package/static/dist/{6013.4e38de36.async.js → 6013.db535339.async.js} +1 -1
- package/static/dist/6212.9e6d9913.async.js +1 -0
- package/static/dist/{6339.ab305e96.async.js → 6431.4603ad0e.async.js} +1 -1
- package/static/dist/{6872.42f939f1.async.js → 6872.a503ef55.async.js} +1 -1
- package/static/dist/7231.f7e5b668.async.js +1 -0
- package/static/dist/{7355.f9f263d8.async.js → 7355.fca746f5.async.js} +1 -1
- package/static/dist/{7508.7dcee91c.async.js → 7508.d90eac63.async.js} +1 -1
- package/static/dist/{7984.594296a5.async.js → 7984.eaac7402.async.js} +1 -1
- package/static/dist/8844.a0fef08e.async.js +1 -0
- package/static/dist/index.html +2 -2
- package/static/dist/layouts__index.633d3553.async.js +1 -0
- package/static/dist/preload_helper.cf7de3fa.js +1 -0
- package/static/dist/{src__pages__config__index.a22ff7dc.async.js → src__pages__config__index.9aba4054.async.js} +1 -1
- package/static/dist/src__pages__crontab__detail.86b2eebb.async.js +1 -0
- package/static/dist/src__pages__crontab__index.ae4e06f2.async.js +1 -0
- package/static/dist/{src__pages__crontab__logModal.0b8cce8c.async.js → src__pages__crontab__logModal.930535e2.async.js} +1 -1
- package/static/dist/src__pages__crontab__modal.a2c8fdcc.async.js +1 -0
- package/static/dist/src__pages__crontab__viewCreateModal.7b4f9cbe.async.js +1 -0
- package/static/dist/src__pages__crontab__viewManageModal.cd454ea0.async.js +1 -0
- package/static/dist/src__pages__dashboard__index.243c5a35.async.js +1 -0
- package/static/dist/src__pages__dashboard__taskResultModal.7795d6e1.async.js +1 -0
- package/static/dist/src__pages__dependence__index.874d501f.async.js +1 -0
- package/static/dist/src__pages__dependence__logModal.154efe7a.async.js +1 -0
- package/static/dist/src__pages__dependence__modal.a29c1a0f.async.js +1 -0
- package/static/dist/{src__pages__diff__index.013b7c75.async.js → src__pages__diff__index.1714b941.async.js} +1 -1
- package/static/dist/src__pages__env__editNameModal.c13d47d2.async.js +1 -0
- package/static/dist/src__pages__env__index.fd6fd2b0.async.js +1 -0
- package/static/dist/src__pages__env__modal.4d71adb3.async.js +1 -0
- package/static/dist/src__pages__error__index.aae50c94.async.js +1 -0
- package/static/dist/src__pages__initialization__index.82a2e967.async.js +1 -0
- package/static/dist/src__pages__log__index.71250e0d.async.js +1 -0
- package/static/dist/{src__pages__login__index.8c813eb1.async.js → src__pages__login__index.a0fd5ed8.async.js} +1 -1
- package/static/dist/src__pages__script__editModal.22acdf7c.async.js +1 -0
- package/static/dist/src__pages__script__editNameModal.1a521cc0.async.js +1 -0
- package/static/dist/src__pages__script__index.a18b2692.async.js +1 -0
- package/static/dist/src__pages__script__renameModal.0ab029e7.async.js +1 -0
- package/static/dist/src__pages__script__saveModal.8965b74c.async.js +1 -0
- package/static/dist/src__pages__script__setting.35ad4f02.async.js +1 -0
- package/static/dist/src__pages__setting__appModal.7eaeb9d3.async.js +1 -0
- package/static/dist/src__pages__setting__checkUpdate.d175b154.async.js +1 -0
- package/static/dist/src__pages__setting__clientIp.3a8711ed.async.js +1 -0
- package/static/dist/src__pages__setting__dependence.9c0f749b.async.js +1 -0
- package/static/dist/src__pages__setting__index.cb397741.async.js +1 -0
- package/static/dist/src__pages__setting__loginLog.e0a1f54d.async.js +1 -0
- package/static/dist/src__pages__setting__notification.2ffe4e5a.async.js +1 -0
- package/static/dist/src__pages__setting__other.3d0b8492.async.js +1 -0
- package/static/dist/{src__pages__setting__progress.8823ac90.async.js → src__pages__setting__progress.2ccae3d7.async.js} +1 -1
- package/static/dist/src__pages__setting__security.e2d71ebb.async.js +1 -0
- package/static/dist/src__pages__setting__systemLog.b3046955.async.js +1 -0
- package/static/dist/src__pages__subscription__index.43086a06.async.js +1 -0
- package/static/dist/src__pages__subscription__logModal.cdba5139.async.js +1 -0
- package/static/dist/src__pages__subscription__modal.38991e1e.async.js +1 -0
- package/static/dist/{umi.ca04a019.js → umi.fc019050.js} +1 -1
- package/test/back/auth-security.test.cjs +74 -0
- package/test/back/build-provenance.test.cjs +150 -0
- package/test/back/cron-log-name.test.cjs +110 -0
- package/test/back/cron-validation.test.cjs +45 -0
- package/test/back/dashboard-failures.test.cjs +173 -0
- package/test/back/database-bootstrap.test.cjs +193 -0
- package/test/back/dependence-cache-status.test.cjs +125 -0
- package/test/back/deprecated-file-routes.test.cjs +82 -0
- package/test/back/ecosystem.test.cjs +28 -0
- package/test/back/env-name-parsing.test.cjs +96 -0
- package/test/back/execution-lifecycle.test.cjs +236 -0
- package/test/back/file-access-security.test.cjs +47 -0
- package/test/back/fileTreeListing.test.cjs +57 -0
- package/test/back/grpc-cron-response.test.cjs +60 -0
- package/test/back/http-exclusive-listen.test.cjs +31 -0
- package/test/back/http-security.test.cjs +213 -0
- package/test/back/listen-security.test.cjs +67 -0
- package/test/back/log-path-security.test.cjs +158 -0
- package/test/back/logReader.test.cjs +72 -0
- package/test/back/manual-execution.test.cjs +85 -0
- package/test/back/manual-stop-claim.test.cjs +220 -0
- package/test/back/metrics.test.cjs +34 -0
- package/test/back/monitoring.test.cjs +73 -0
- package/test/back/node-path-cache.test.cjs +173 -0
- package/test/back/node-path-lock.test.cjs +178 -0
- package/test/back/npm-publication.test.cjs +70 -0
- package/test/back/primary-apm.test.cjs +24 -0
- package/test/back/process-exit-state.test.cjs +81 -0
- package/test/back/process-stop-signal.test.cjs +77 -0
- package/test/back/protected-path-case.test.cjs +58 -0
- package/test/back/qlServiceLogCommand.test.cjs +128 -0
- package/test/back/retention.test.cjs +131 -0
- package/test/back/role-loading.test.cjs +118 -0
- package/test/back/schedule-health.test.cjs +86 -0
- package/test/back/scheduler-file-lock.test.cjs +51 -0
- package/test/back/scheduler-mutation.test.cjs +312 -0
- package/test/back/scheduler-readiness.test.cjs +85 -0
- package/test/back/scheduler-reconciliation.test.cjs +152 -0
- package/test/back/scheduler-rpc-timeout.test.cjs +49 -0
- package/test/back/schema-migrations.test.cjs +127 -0
- package/test/back/shell-api-parsing.test.cjs +184 -0
- package/test/back/sock-polling.test.cjs +297 -0
- package/test/back/sock-security.test.cjs +72 -0
- package/test/back/start-env-preservation.test.cjs +53 -0
- package/test/back/stop-failure-feedback.test.cjs +158 -0
- package/test/back/stop-race.test.cjs +167 -0
- package/test/back/subscription-cleanup.test.cjs +53 -0
- package/test/back/subscription-stop-state.test.cjs +66 -0
- package/test/back/system-dependence-cache.test.cjs +126 -0
- package/test/back/task-time.test.cjs +116 -0
- package/test/back/user-api.test.cjs +99 -0
- package/test/back/user-security.test.cjs +248 -0
- package/test/back/worker-apm.test.cjs +84 -0
- package/test/back/wpush-grpc.test.cjs +115 -0
- package/test/front/cron-log-pagination.test.cjs +214 -0
- package/test/front/http-auth.test.cjs +152 -0
- package/test/front/http-error.test.cjs +29 -0
- package/test/helpers/load-security-module.cjs +42 -0
- package/version.yaml +19 -34
- package/CLAUDE.md +0 -43
- package/static/dist/1147.c420132e.async.js +0 -1
- package/static/dist/134.54df9e38.async.js +0 -1
- package/static/dist/2208.f7ba3dfa.async.js +0 -1
- package/static/dist/2286.164bb089.async.js +0 -1
- package/static/dist/3191.63263871.async.js +0 -1
- package/static/dist/4902.555f92ab.async.js +0 -1
- package/static/dist/5520.ff2cfd6b.async.js +0 -1
- package/static/dist/6431.c50479be.async.js +0 -1
- package/static/dist/8826.2447a104.async.js +0 -1
- package/static/dist/layouts__index.a7a2bfe0.async.js +0 -1
- package/static/dist/preload_helper.0431c0f3.js +0 -1
- package/static/dist/src__pages__crontab__detail.b9c36808.async.js +0 -1
- package/static/dist/src__pages__crontab__index.fed99fd0.async.js +0 -1
- package/static/dist/src__pages__crontab__modal.f7041c7c.async.js +0 -1
- package/static/dist/src__pages__crontab__viewCreateModal.4d589f66.async.js +0 -1
- package/static/dist/src__pages__crontab__viewManageModal.0e317746.async.js +0 -1
- package/static/dist/src__pages__dashboard__index.b30f2f47.async.js +0 -1
- package/static/dist/src__pages__dependence__index.3d87ceac.async.js +0 -1
- package/static/dist/src__pages__dependence__logModal.0681830b.async.js +0 -1
- package/static/dist/src__pages__dependence__modal.11124896.async.js +0 -1
- package/static/dist/src__pages__env__editNameModal.5d264b25.async.js +0 -1
- package/static/dist/src__pages__env__index.baa27d4e.async.js +0 -1
- package/static/dist/src__pages__env__modal.7f2ef1bc.async.js +0 -1
- package/static/dist/src__pages__error__index.f156b45e.async.js +0 -1
- package/static/dist/src__pages__initialization__index.e96d4ba8.async.js +0 -1
- package/static/dist/src__pages__log__index.e0978bae.async.js +0 -1
- package/static/dist/src__pages__script__editModal.cbf4ec0e.async.js +0 -1
- package/static/dist/src__pages__script__editNameModal.3e7e100d.async.js +0 -1
- package/static/dist/src__pages__script__index.2765d1b8.async.js +0 -1
- package/static/dist/src__pages__script__renameModal.5e987ef5.async.js +0 -1
- package/static/dist/src__pages__script__saveModal.3f9d23d6.async.js +0 -1
- package/static/dist/src__pages__script__setting.a535793a.async.js +0 -1
- package/static/dist/src__pages__setting__appModal.251cd14f.async.js +0 -1
- package/static/dist/src__pages__setting__checkUpdate.46efe057.async.js +0 -1
- package/static/dist/src__pages__setting__dependence.8a7a9529.async.js +0 -1
- package/static/dist/src__pages__setting__index.cc85fdfb.async.js +0 -1
- package/static/dist/src__pages__setting__loginLog.cea6056c.async.js +0 -1
- package/static/dist/src__pages__setting__notification.390fc905.async.js +0 -1
- package/static/dist/src__pages__setting__other.b22d2165.async.js +0 -1
- package/static/dist/src__pages__setting__security.598720a8.async.js +0 -1
- package/static/dist/src__pages__setting__systemLog.67406721.async.js +0 -1
- package/static/dist/src__pages__subscription__index.d0ab2abc.async.js +0 -1
- package/static/dist/src__pages__subscription__logModal.3864b37f.async.js +0 -1
- package/static/dist/src__pages__subscription__modal.3562c670.async.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[5722],{59362:function(e,t,n){"use strict";n.r(t);var r=n(90228),o=n.n(r),a=n(87999),i=n.n(a),c=n(48305),s=n.n(c),u=n(72317),l=n(75271),d=n(61508),f=n(47667),h=n(44974),p=n(93481),m=n(17355),v=n(56212),y=n(3475),E=n(16483),g=n.n(E),C=n(52676),O=function(e){return e[e["成功"]=0]="成功",e[e["失败"]=1]="失败",e}(O||{}),S=function(e){return e[e.success=0]="success",e[e.error=1]="error",e}(S||{});t.default=function(e){var t=e.data,n=e.height,r=(0,l.useState)([]),a=s()(r,2),c=a[0],E=a[1];(0,l.useEffect)((function(){v.W.get("".concat(y.Z.apiPrefix,"user/ip-blacklist")).then((function(e){var t=e.code,n=e.data;200===t&&E(n||[])}))}),[]);var M=function(){var e=i()(o()().mark((function e(t,n){var r;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n){e.next=6;break}return e.next=3,v.W.delete("".concat(y.Z.apiPrefix,"user/ip-blacklist"),{data:{ip:t}});case 3:e.t0=e.sent,e.next=9;break;case 6:return e.next=8,v.W.put("".concat(y.Z.apiPrefix,"user/ip-blacklist"),{ip:t});case 8:e.t0=e.sent;case 9:200===(r=e.t0).code&&(E(r.data||[]),d.ZP.success(r.message));case 11:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),N=[{title:u.ZP.get("序号"),width:50,render:function(e,t,n){return n+1}},{title:u.ZP.get("登录时间"),dataIndex:"timestamp",key:"timestamp",width:120,render:function(e,t){return g()(t.timestamp).format("YYYY-MM-DD HH:mm:ss")}},{title:u.ZP.get("登录地址"),dataIndex:"address",width:120,key:"address"},{title:u.ZP.get("登录IP"),dataIndex:"ip",width:100,key:"ip"},{title:u.ZP.get("登录设备"),dataIndex:"platform",key:"platform",width:80},{title:u.ZP.get("登录状态"),dataIndex:"status",key:"status",width:80,render:function(e,t){return(0,C.jsx)(f.Z,{color:S[t.status],style:{marginRight:0},children:u.ZP.get(O[t.status])})}},{title:u.ZP.get("操作"),key:"action",width:100,render:function(e,t){if(!t.ip||1!==t.status)return null;var n=c.includes(t.ip),r=n?"移出黑名单":"加入黑名单";return(0,C.jsx)(h.Z,{title:u.ZP.get(n?"确认移出 IP 黑名单":"确认加入 IP 黑名单"),onConfirm:function(){return M(t.ip,n)},children:(0,C.jsx)(p.Z,{type:"link",danger:!n,size:"small",children:u.ZP.get(r)})})}}];return(0,C.jsx)(C.Fragment,{children:(0,C.jsx)(m.Z,{columns:N,pagination:!1,dataSource:t,rowKey:function(e){return"".concat(e.ip,"-").concat(e.timestamp)},size:"middle",scroll:{x:1e3,y:n}})})}},71846:function(e,t,n){"use strict";var r=n(2053),o=n(99459),a=n(82290),i=n(75271),c=n(93481),s=n(45068);function u(e){return!(!e||!e.then)}t.Z=function(e){var t=i.useRef(!1),n=i.useRef(null),l=(0,a.Z)(!1),d=(0,o.Z)(l,2),f=d[0],h=d[1],p=e.close,m=function(){null==p||p.apply(void 0,arguments)};i.useEffect((function(){var t=null;return e.autoFocus&&(t=setTimeout((function(){var e;null===(e=n.current)||void 0===e||e.focus()}))),function(){t&&clearTimeout(t)}}),[]);var v=e.type,y=e.children,E=e.prefixCls,g=e.buttonProps;return i.createElement(c.Z,(0,r.Z)({},(0,s.n)(v),{onClick:function(n){var r=e.actionFn;if(!t.current)if(t.current=!0,r){var o;if(e.emitEvent){if(o=r(n),e.quitOnNullishReturnValue&&!u(o))return t.current=!1,void m(n)}else if(r.length)o=r(p),t.current=!1;else if(!(o=r()))return void m();!function(e){u(e)&&(h(!0),e.then((function(){h(!1,!0),m.apply(void 0,arguments),t.current=!1}),(function(e){return h(!1,!0),t.current=!1,Promise.reject(e)})))}(o)}else m()},loading:f,prefixCls:E},g,{ref:n}),y)}},43150:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var r=function(e){return e?"function"==typeof e?e():e:null}},43541:function(e,t,n){"use strict";n.d(t,{fk:function(){return i},jD:function(){return a}});var r,o=n(71254),a=function(){return(0,o.Z)()&&window.document.documentElement},i=function(){if(!a())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}},44974:function(e,t,n){"use strict";n.d(t,{Z:function(){return M}});var r=n(2053),o=n(99459),a=n(17555),i=n(82187),c=n.n(i),s=n(6522),u=n(1260),l=n(75271),d=n(96820),f=n(63845),h=n(5555),p=n(93481),m=n(45068),v=n(71846),y=n(76595),E=n(94611),g=n(43150),C=function(e){var t=e.prefixCls,n=e.okButtonProps,o=e.cancelButtonProps,a=e.title,i=e.cancelText,c=e.okText,s=e.okType,u=e.icon,f=e.showCancel,h=void 0===f||f,C=e.close,O=e.onConfirm,S=e.onCancel,M=l.useContext(d.E_).getPrefixCls;return l.createElement(y.Z,{componentName:"Popconfirm",defaultLocale:E.Z.Popconfirm},(function(e){return l.createElement("div",{className:"".concat(t,"-inner-content")},l.createElement("div",{className:"".concat(t,"-message")},u&&l.createElement("span",{className:"".concat(t,"-message-icon")},u),l.createElement("div",{className:"".concat(t,"-message-title")},(0,g.Z)(a))),l.createElement("div",{className:"".concat(t,"-buttons")},h&&l.createElement(p.Z,(0,r.Z)({onClick:S,size:"small"},o),null!=i?i:e.cancelText),l.createElement(v.Z,{buttonProps:(0,r.Z)((0,r.Z)({size:"small"},(0,m.n)(s)),n),actionFn:O,close:C,prefixCls:M("btn"),quitOnNullishReturnValue:!0,emitEvent:!0},null!=c?c:e.okText)))}))},O=void 0,S=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},M=l.forwardRef((function(e,t){var n=e.prefixCls,i=e.placement,p=void 0===i?"top":i,m=e.trigger,v=void 0===m?"click":m,y=e.okType,E=void 0===y?"primary":y,g=e.icon,M=void 0===g?l.createElement(a.Z,null):g,N=e.children,b=e.overlayClassName,w=e.onOpenChange,_=e.onVisibleChange,P=S(e,["prefixCls","placement","trigger","okType","icon","children","overlayClassName","onOpenChange","onVisibleChange"]),T=l.useContext(d.E_).getPrefixCls,x=(0,s.Z)(!1,{value:void 0!==e.open?e.open:e.visible,defaultValue:void 0!==e.defaultOpen?e.defaultOpen:e.defaultVisible}),$=(0,o.Z)(x,2),D=$[0],Z=$[1],I=function(e,t){Z(e,!0),null==_||_(e,t),null==w||w(e,t)},k=T("popover",n),A=T("popconfirm",n),U=c()(A,b);return l.createElement(f.Z,(0,r.Z)({},P,{trigger:v,prefixCls:k,placement:p,onOpenChange:function(t){var n=e.disabled;void 0!==n&&n||I(t)},open:D,ref:t,overlayClassName:U,_overlay:l.createElement(C,(0,r.Z)({okType:E,icon:M},e,{prefixCls:k,close:function(e){I(!1,e)},onConfirm:function(t){var n;return null===(n=e.onConfirm)||void 0===n?void 0:n.call(O,t)},onCancel:function(t){var n;I(!1,t),null===(n=e.onCancel)||void 0===n||n.call(O,t)}}))}),(0,h.Tm)(N,{onKeyDown:function(e){var t,n;l.isValidElement(N)&&(null===(n=null==N?void 0:(t=N.props).onKeyDown)||void 0===n||n.call(t,e)),function(e){e.keyCode===u.Z.ESC&&D&&I(!1,e)}(e)}}))}))},63845:function(e,t,n){"use strict";var r=n(2053),o=n(75271),a=n(43150),i=n(21485),c=n(96820),s=n(59816),u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},l=function(e){var t=e.title,n=e.content,r=e.prefixCls;return o.createElement(o.Fragment,null,t&&o.createElement("div",{className:"".concat(r,"-title")},(0,a.Z)(t)),o.createElement("div",{className:"".concat(r,"-inner-content")},(0,a.Z)(n)))},d=o.forwardRef((function(e,t){var n=e.prefixCls,a=e.title,d=e.content,f=e._overlay,h=e.placement,p=void 0===h?"top":h,m=e.trigger,v=void 0===m?"hover":m,y=e.mouseEnterDelay,E=void 0===y?.1:y,g=e.mouseLeaveDelay,C=void 0===g?.1:g,O=e.overlayStyle,S=void 0===O?{}:O,M=u(e,["prefixCls","title","content","_overlay","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),N=o.useContext(c.E_).getPrefixCls,b=N("popover",n),w=N(),_=o.useMemo((function(){return f||(a||d?o.createElement(l,{prefixCls:b,title:a,content:d}):null)}),[f,a,d,b]);return o.createElement(s.Z,(0,r.Z)({placement:p,trigger:v,mouseEnterDelay:E,mouseLeaveDelay:C,overlayStyle:S},M,{prefixCls:b,ref:t,overlay:_,transitionName:(0,i.mL)(w,"zoom-big",M.transitionName)}))}));t.Z=d},47667:function(e,t,n){"use strict";n.d(t,{Z:function(){return O}});var r=n(57904),o=n(2053),a=n(99459),i=n(32324),c=n(82187),s=n.n(c),u=n(2021),l=n(75271),d=n(96820),f=n(1667),h=n(74244),p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},m=function(e){var t=e.prefixCls,n=e.className,a=e.checked,i=e.onChange,c=e.onClick,u=p(e,["prefixCls","className","checked","onChange","onClick"]),f=(0,l.useContext(d.E_).getPrefixCls)("tag",t),h=s()(f,(0,r.Z)((0,r.Z)({},"".concat(f,"-checkable"),!0),"".concat(f,"-checkable-checked"),a),n);return l.createElement("span",(0,o.Z)({},u,{className:h,onClick:function(e){null==i||i(!a),null==c||c(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 o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},y=new RegExp("^(".concat(f.Y.join("|"),")(-inverse)?$")),E=new RegExp("^(".concat(f.E.join("|"),")$")),g=function(e,t){var n=e.prefixCls,c=e.className,f=e.style,p=e.children,m=e.icon,g=e.color,C=e.onClose,O=e.closeIcon,S=e.closable,M=void 0!==S&&S,N=v(e,["prefixCls","className","style","children","icon","color","onClose","closeIcon","closable"]),b=l.useContext(d.E_),w=b.getPrefixCls,_=b.direction,P=l.useState(!0),T=(0,a.Z)(P,2),x=T[0],$=T[1];l.useEffect((function(){"visible"in N&&$(N.visible)}),[N.visible]);var D=function(){return!!g&&(y.test(g)||E.test(g))},Z=(0,o.Z)({backgroundColor:g&&!D()?g:void 0},f),I=D(),k=w("tag",n),A=s()(k,(0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)({},"".concat(k,"-").concat(g),I),"".concat(k,"-has-color"),g&&!I),"".concat(k,"-hidden"),!x),"".concat(k,"-rtl"),"rtl"===_),c),U=function(e){e.stopPropagation(),null==C||C(e),e.defaultPrevented||"visible"in N||$(!1)},L="onClick"in N||p&&"a"===p.type,R=(0,u.Z)(N,["visible"]),F=m||null,H=F?l.createElement(l.Fragment,null,F,l.createElement("span",null,p)):p,j=l.createElement("span",(0,o.Z)({},R,{ref:t,className:A,style:Z}),H,M?O?l.createElement("span",{className:"".concat(k,"-close-icon"),onClick:U},O):l.createElement(i.Z,{className:"".concat(k,"-close-icon"),onClick:U}):null);return L?l.createElement(h.Z,null,j):j},C=l.forwardRef(g);C.CheckableTag=m;var O=C},16483:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,n=36e5,r="millisecond",o="second",a="minute",i="hour",c="day",s="week",u="month",l="quarter",d="year",f="date",h="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|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,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},y=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},E={s:y,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),o=n%60;return(t<=0?"+":"-")+y(r,2,"0")+":"+y(o,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),o=t.clone().add(r,u),a=n-o<0,i=t.clone().add(r+(a?-1:1),u);return+(-(r+(n-o)/(a?o-i:i-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:d,w:s,d:c,D:f,h:i,m:a,s:o,ms:r,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},g="en",C={};C[g]=v;var O="$isDayjsObject",S=function(e){return e instanceof w||!(!e||!e[O])},M=function e(t,n,r){var o;if(!t)return g;if("string"==typeof t){var a=t.toLowerCase();C[a]&&(o=a),n&&(C[a]=n,o=a);var i=t.split("-");if(!o&&i.length>1)return e(i[0])}else{var c=t.name;C[c]=t,o=c}return!r&&o&&(g=o),o||!r&&g},N=function(e,t){if(S(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new w(n)},b=E;b.l=M,b.i=S,b.w=function(e,t){return N(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var w=function(){function v(e){this.$L=M(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[O]=!0}var y=v.prototype;return y.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(b.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(p);if(r){var o=r[2]-1||0,a=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],o,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},y.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},y.$utils=function(){return b},y.isValid=function(){return!(this.$d.toString()===h)},y.isSame=function(e,t){var n=N(e);return this.startOf(t)<=n&&n<=this.endOf(t)},y.isAfter=function(e,t){return N(e)<this.startOf(t)},y.isBefore=function(e,t){return this.endOf(t)<N(e)},y.$g=function(e,t,n){return b.u(e)?this[t]:this.set(n,e)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(e,t){var n=this,r=!!b.u(t)||t,l=b.p(e),h=function(e,t){var o=b.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?o:o.endOf(c)},p=function(e,t){return b.w(n.toDate()[e].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},m=this.$W,v=this.$M,y=this.$D,E="set"+(this.$u?"UTC":"");switch(l){case d:return r?h(1,0):h(31,11);case u:return r?h(1,v):h(0,v+1);case s:var g=this.$locale().weekStart||0,C=(m<g?m+7:m)-g;return h(r?y-C:y+(6-C),v);case c:case f:return p(E+"Hours",0);case i:return p(E+"Minutes",1);case a:return p(E+"Seconds",2);case o:return p(E+"Milliseconds",3);default:return this.clone()}},y.endOf=function(e){return this.startOf(e,!1)},y.$set=function(e,t){var n,s=b.p(e),l="set"+(this.$u?"UTC":""),h=(n={},n[c]=l+"Date",n[f]=l+"Date",n[u]=l+"Month",n[d]=l+"FullYear",n[i]=l+"Hours",n[a]=l+"Minutes",n[o]=l+"Seconds",n[r]=l+"Milliseconds",n)[s],p=s===c?this.$D+(t-this.$W):t;if(s===u||s===d){var m=this.clone().set(f,1);m.$d[h](p),m.init(),this.$d=m.set(f,Math.min(this.$D,m.daysInMonth())).$d}else h&&this.$d[h](p);return this.init(),this},y.set=function(e,t){return this.clone().$set(e,t)},y.get=function(e){return this[b.p(e)]()},y.add=function(r,l){var f,h=this;r=Number(r);var p=b.p(l),m=function(e){var t=N(h);return b.w(t.date(t.date()+Math.round(e*r)),h)};if(p===u)return this.set(u,this.$M+r);if(p===d)return this.set(d,this.$y+r);if(p===c)return m(1);if(p===s)return m(7);var v=(f={},f[a]=t,f[i]=n,f[o]=e,f)[p]||1,y=this.$d.getTime()+r*v;return b.w(y,this)},y.subtract=function(e,t){return this.add(-1*e,t)},y.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||h;var r=e||"YYYY-MM-DDTHH:mm:ssZ",o=b.z(this),a=this.$H,i=this.$m,c=this.$M,s=n.weekdays,u=n.months,l=n.meridiem,d=function(e,n,o,a){return e&&(e[n]||e(t,r))||o[n].slice(0,a)},f=function(e){return b.s(a%12||12,e,"0")},p=l||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(m,(function(e,r){return r||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return b.s(t.$y,4,"0");case"M":return c+1;case"MM":return b.s(c+1,2,"0");case"MMM":return d(n.monthsShort,c,u,3);case"MMMM":return d(u,c);case"D":return t.$D;case"DD":return b.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return d(n.weekdaysMin,t.$W,s,2);case"ddd":return d(n.weekdaysShort,t.$W,s,3);case"dddd":return s[t.$W];case"H":return String(a);case"HH":return b.s(a,2,"0");case"h":return f(1);case"hh":return f(2);case"a":return p(a,i,!0);case"A":return p(a,i,!1);case"m":return String(i);case"mm":return b.s(i,2,"0");case"s":return String(t.$s);case"ss":return b.s(t.$s,2,"0");case"SSS":return b.s(t.$ms,3,"0");case"Z":return o}return null}(e)||o.replace(":","")}))},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(r,f,h){var p,m=this,v=b.p(f),y=N(r),E=(y.utcOffset()-this.utcOffset())*t,g=this-y,C=function(){return b.m(m,y)};switch(v){case d:p=C()/12;break;case u:p=C();break;case l:p=C()/3;break;case s:p=(g-E)/6048e5;break;case c:p=(g-E)/864e5;break;case i:p=g/n;break;case a:p=g/t;break;case o:p=g/e;break;default:p=g}return h?p:b.a(p)},y.daysInMonth=function(){return this.endOf(u).$D},y.$locale=function(){return C[this.$L]},y.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=M(e,t,!0);return r&&(n.$L=r),n},y.clone=function(){return b.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},v}(),_=w.prototype;return N.prototype=_,[["$ms",r],["$s",o],["$m",a],["$H",i],["$W",c],["$M",u],["$y",d],["$D",f]].forEach((function(e){_[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),N.extend=function(e,t){return e.$i||(e(t,w,N),e.$i=!0),N},N.locale=M,N.isDayjs=S,N.unix=function(e){return N(1e3*e)},N.en=C[g],N.Ls=C,N.p={},N}()},32568:function(e,t,n){"use strict";n.d(t,{G:function(){return a}});var r=n(71254),o=function(e){if((0,r.Z)()&&window.document.documentElement){var t=Array.isArray(e)?e:[e],n=window.document.documentElement;return t.some((function(e){return e in n.style}))}return!1};function a(e,t){return Array.isArray(e)||void 0===t?o(e):function(e,t){if(!o(e))return!1;var n=document.createElement("div"),r=n.style[e];return n.style[e]=t,n.style[e]!==r}(e,t)}},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 c}});var r,o=n(61984);function a(e){var t="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),n=document.createElement("div");n.id=t;var r,a,i=n.style;if(i.position="absolute",i.left="0",i.top="0",i.width="100px",i.height="100px",i.overflow="scroll",e){var c=getComputedStyle(e);i.scrollbarColor=c.scrollbarColor,i.scrollbarWidth=c.scrollbarWidth;var s=getComputedStyle(e,"::-webkit-scrollbar"),u=parseInt(s.width,10),l=parseInt(s.height,10);try{var d=u?"width: ".concat(s.width,";"):"",f=l?"height: ".concat(s.height,";"):"";(0,o.hq)("\n#".concat(t,"::-webkit-scrollbar {\n").concat(d,"\n").concat(f,"\n}"),t)}catch(e){console.error(e),r=u,a=l}}document.body.appendChild(n);var h=e&&r&&!isNaN(r)?r:n.offsetWidth-n.clientWidth,p=e&&a&&!isNaN(a)?a:n.offsetHeight-n.clientHeight;return document.body.removeChild(n),(0,o.jL)(t),{width:h,height:p}}function i(e){return"undefined"==typeof document?0:((e||void 0===r)&&(r=a()),r.width)}function c(e){return"undefined"!=typeof document&&e&&e instanceof Element?a(e):{width:0,height:0}}},41045:function(e,t,n){"use strict";n.d(t,{Z:function(){return s}});var r=n(98037),o="".concat("accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap"," ").concat("onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError").split(/[\s\n]+/),a="aria-",i="data-";function c(e,t){return 0===e.indexOf(t)}function s(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 s={};return Object.keys(e).forEach((function(n){(t.aria&&("role"===n||c(n,a))||t.data&&c(n,i)||t.attr&&o.includes(n))&&(s[n]=e[n])})),s}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[7213],{61160:function(e,n,t){t.r(n);var o=t(26068),a=t.n(o),r=t(48305),c=t.n(r),i=t(72317),s=t(75271),l=t(35181),d=t(72338),u=t(61508),E=t(17082),p=t(93481),m=t(56212),f=t(3475),h=t(52676),C=l.Z.Option;n.default=function(e){var n=e.data,t=(0,s.useState)(!1),o=c()(t,2),r=o[0],N=o[1],S=(0,s.useState)("closed"),O=c()(S,2),M=O[0],g=O[1],_=(0,s.useState)([]),I=c()(_,2),T=I[0],y=I[1],P=d.Z.useForm(),U=c()(P,1)[0],b=function(e){g(e);var n=f.Z.notificationModeMap[e];y(n||[])};return(0,s.useEffect)((function(){n&&n.type&&(b(n.type),U.setFieldsValue(a()({},n)))}),[n]),(0,h.jsx)("div",{children:(0,h.jsxs)(d.Z,{onFinish:function(e){N(!0),"closed"==e.type&&(e.type=""),m.W.put("".concat(f.Z.apiPrefix,"user/notification"),e).then((function(n){var t=n.code;n.data;200===t&&u.ZP.success(e.type?i.ZP.get("通知发送成功"):i.ZP.get("通知关闭成功"))})).catch((function(e){console.log(e)})).finally((function(){return N(!1)}))},form:U,layout:"vertical",children:[(0,h.jsx)(d.Z.Item,{label:i.ZP.get("通知方式"),name:"type",rules:[{required:!0}],style:{maxWidth:400},initialValue:M,children:(0,h.jsx)(l.Z,{onChange:b,disabled:r,children:f.Z.notificationModes.map((function(e){return(0,h.jsx)(C,{value:e.value,children:e.label},e.value)}))})}),T.map((function(e){return(0,h.jsx)(d.Z.Item,{label:e.label,name:e.label,extra:(0,h.jsx)("span",{dangerouslySetInnerHTML:{__html:e.tip}}),rules:[{required:e.required}],style:{maxWidth:400},children:e.items?(0,h.jsx)(l.Z,{placeholder:e.placeholder||"".concat(i.ZP.get("请选择")," ").concat(e.label),disabled:r,children:e.items.map((function(e){return(0,h.jsx)(C,{value:e.value,children:e.label||e.value},e.value)}))}):(0,h.jsx)(E.Z.TextArea,{disabled:r,autoSize:{minRows:1,maxRows:5},placeholder:e.placeholder||"".concat(i.ZP.get("请输入")," ").concat(e.label)})},e.label)})),(0,h.jsx)(p.Z,{type:"primary",htmlType:"submit",disabled:r,children:r?i.ZP.get("测试中..."):i.ZP.get("保存")})]})})}},43541:function(e,n,t){t.d(n,{fk:function(){return c},jD:function(){return r}});var o,a=t(71254),r=function(){return(0,a.Z)()&&window.document.documentElement},c=function(){if(!r())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,n,t){var o=t(57904),a=t(2053),r=t(82187),c=t.n(r),i=t(77168),s=t(2021),l=t(75271),d=t(96820),u=t(83289),E=t(30107),p=t(38470),m=t(5663),f=t(21485),h=t(28800),C=t(50528),N=t(81393),S=function(e,n){var t={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&n.indexOf(o)<0&&(t[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(o=Object.getOwnPropertySymbols(e);a<o.length;a++)n.indexOf(o[a])<0&&Object.prototype.propertyIsEnumerable.call(e,o[a])&&(t[o[a]]=e[o[a]])}return t},O="SECRET_COMBOBOX_MODE_DO_NOT_USE",M=function(e,n){var t,r=e.prefixCls,M=e.bordered,g=void 0===M||M,_=e.className,I=e.getPopupContainer,T=e.dropdownClassName,y=e.popupClassName,P=e.listHeight,U=void 0===P?256:P,b=e.placement,A=e.listItemHeight,v=void 0===A?32:A,x=e.size,R=e.disabled,Z=e.notFoundContent,L=e.status,w=e.showArrow,F=S(e,["prefixCls","bordered","className","getPopupContainer","dropdownClassName","popupClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","showArrow"]),D=l.useContext(d.E_),H=D.getPopupContainer,K=D.getPrefixCls,W=D.renderEmpty,k=D.direction,j=D.virtual,G=D.dropdownMatchSelectWidth,B=l.useContext(p.Z),V=K("select",r),Q=K(),q=(0,N.ri)(V,k),X=q.compactSize,Y=q.compactItemClassnames,z=l.useMemo((function(){var e=F.mode;if("combobox"!==e)return e===O?"combobox":e}),[F.mode]),J="multiple"===z||"tags"===z,$=void 0!==w?w:F.loading||!(J||"combobox"===z),ee=(0,l.useContext)(m.aM),ne=ee.status,te=ee.hasFeedback,oe=ee.isFormItemInput,ae=ee.feedbackIcon,re=(0,h.F)(ne,L);t=void 0!==Z?Z:"combobox"===z?null:(W||u.Z)("Select");var ce=(0,C.Z)((0,a.Z)((0,a.Z)({},F),{multiple:J,hasFeedback:te,feedbackIcon:ae,showArrow:$,prefixCls:V})),ie=ce.suffixIcon,se=ce.itemIcon,le=ce.removeIcon,de=ce.clearIcon,ue=(0,s.Z)(F,["suffixIcon","itemIcon"]),Ee=c()(y||T,(0,o.Z)({},"".concat(V,"-dropdown-").concat(k),"rtl"===k)),pe=X||x||B,me=l.useContext(E.Z),fe=null!=R?R:me,he=c()((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},"".concat(V,"-lg"),"large"===pe),"".concat(V,"-sm"),"small"===pe),"".concat(V,"-rtl"),"rtl"===k),"".concat(V,"-borderless"),!g),"".concat(V,"-in-form-item"),oe),(0,h.Z)(V,re,te),Y,_);return l.createElement(i.ZP,(0,a.Z)({ref:n,virtual:j,dropdownMatchSelectWidth:G},ue,{transitionName:(0,f.mL)(Q,(0,f.q0)(b),F.transitionName),listHeight:U,listItemHeight:v,mode:z,prefixCls:V,placement:void 0!==b?b:"rtl"===k?"bottomRight":"bottomLeft",direction:k,inputIcon:ie,menuItemSelectedIcon:se,removeIcon:le,clearIcon:de,notFoundContent:t,className:he,getPopupContainer:I||H,dropdownClassName:Ee,showArrow:te||w,disabled:fe}))},g=l.forwardRef(M);g.SECRET_COMBOBOX_MODE_DO_NOT_USE=O,g.Option=i.Wx,g.OptGroup=i.Xo,n.Z=g},1260:function(e,n){var t={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 n=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||n>=t.F1&&n<=t.F12)return!1;switch(n){case t.ALT:case t.CAPS_LOCK:case t.CONTEXT_MENU:case t.CTRL:case t.DOWN:case t.END:case t.ESC:case t.HOME:case t.INSERT:case t.LEFT:case t.MAC_FF_META:case t.META:case t.NUMLOCK:case t.NUM_CENTER:case t.PAGE_DOWN:case t.PAGE_UP:case t.PAUSE:case t.PRINT_SCREEN:case t.RIGHT:case t.SHIFT:case t.UP:case t.WIN_KEY:case t.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=t.ZERO&&e<=t.NINE)return!0;if(e>=t.NUM_ZERO&&e<=t.NUM_MULTIPLY)return!0;if(e>=t.A&&e<=t.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case t.SPACE:case t.QUESTION_MARK:case t.NUM_PLUS:case t.NUM_MINUS:case t.NUM_PERIOD:case t.NUM_DIVISION:case t.SEMICOLON:case t.DASH:case t.EQUALS:case t.COMMA:case t.PERIOD:case t.SLASH:case t.APOSTROPHE:case t.SINGLE_QUOTE:case t.OPEN_SQUARE_BRACKET:case t.BACKSLASH:case t.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};n.Z=t},41045:function(e,n,t){t.d(n,{Z:function(){return s}});var o=t(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]+/),r="aria-",c="data-";function i(e,n){return 0===e.indexOf(n)}function s(e){var n,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];n=!1===t?{aria:!0,data:!0,attr:!0}:!0===t?{aria:!0}:(0,o.Z)({},t);var s={};return Object.keys(e).forEach((function(t){(n.aria&&("role"===t||i(t,r))||n.data&&i(t,c)||n.attr&&a.includes(t))&&(s[t]=e[t])})),s}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[6465],{73236:function(e,t,n){"use strict";n.r(t);var o=n(48305),i=n.n(o),r=n(48916),a=n(3475),s=n(56212),c=n(65814),l=n(78060),u=n.n(l),d=n(32890),h=n(61508),p=n(22901),f=n(93481),g=n(75271),v=n(72317),m=n(52676),Z=d.Z.Countdown;t.default=function(e){var t=e.systemInfo,n=(0,g.useState)(!1),o=i()(n,2),l=o[0],d=o[1],x=(0,g.useState)(""),y=i()(x,2),P=y[0],b=y[1],j=(0,g.useRef)(),k=(0,g.useRef)(),_=function(e){p.Z.confirm({width:500,title:v.ZP.get("更新"),content:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{children:v.ZP.get("已经是最新版了!")}),(0,m.jsxs)("div",{style:{fontSize:12,fontWeight:400,marginTop:5},children:[v.ZP.get("青龙")," ",e.lastVersion," ",v.ZP.get("是目前检测到的最新可用版本了。")]})]}),okText:v.ZP.get("重新下载"),onOk:function(){C(),s.W.put("".concat(a.Z.apiPrefix,"system/update")).then((function(e){})).catch((function(e){console.log(e)}))}})},w=function(e){var n=e.lastVersion,o=e.lastLog;p.Z.confirm({width:500,title:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{children:v.ZP.get("更新可用")}),(0,m.jsxs)("div",{style:{fontSize:12,fontWeight:400,marginTop:5},children:[v.ZP.get("新版本")," ",n," ",v.ZP.get("可用,你使用的版本为")," ",t.version,"。"]})]}),content:(0,m.jsx)("pre",{children:(0,m.jsx)(u(),{children:o})}),okText:v.ZP.get("下载更新"),cancelText:v.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(""),j.current=p.Z.info({width:600,maskClosable:!1,closable:!1,keyboard:!1,okButtonProps:{disabled:!0},title:v.ZP.get("下载更新中..."),centered:!0,content:(0,m.jsx)("pre",{children:(0,m.jsx)(u(),{children:P})})})},S=function(e){s.W.put("".concat(a.Z.apiPrefix,"update/").concat(e)).then((function(e){h.ZP.success({content:(0,m.jsxs)("span",{children:[v.ZP.get("系统将在"),(0,m.jsx)(Z,{className:"inline-countdown",format:"ss",value:Date.now()+3e4}),v.ZP.get("秒后自动刷新")]}),duration:30}),(0,r.o4)(),setTimeout((function(){window.location.reload()}),3e4)})).catch((function(e){console.log(e)}))};(0,g.useEffect)((function(){if(P){var e="failed"===k.current;j.current.update({maskClosable:e,closable:e,okButtonProps:{disabled:!e},content:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("pre",{children:(0,m.jsx)(u(),{children:P})}),(0,m.jsx)("div",{id:"log-identifier",style:{paddingBottom:5}})]})})}}),[P]);var I=(0,g.useCallback)((function(e){var t=e.message,n=e.status;"failed"===n&&(k.current="failed",h.ZP.error(v.ZP.get("更新失败,请检查网络及日志或稍后再试"))),"success"===n&&(k.current="success",setTimeout((function(){p.Z.confirm({width:600,maskClosable:!1,title:v.ZP.get("确认重启"),centered:!0,content:v.ZP.get("系统安装包下载成功,确认重启"),okText:v.ZP.get("重启"),onOk:function(){S("system")},onCancel:function(){j.current.update({maskClosable:!0,closable:!0,okButtonProps:{disabled:!1}})}})}),1e3)),setTimeout((function(){var e;null===(e=document.querySelector("#log-identifier"))||void 0===e||e.scrollIntoView({behavior:"smooth"})}),600),t&&b((function(e){return"".concat(e).concat(t)}))}),[]);return(0,g.useEffect)((function(){var e=c.Z.getInstance();return e.subscribe("updateSystemVersion",I),function(){e.unsubscribe("updateSystemVersion",I)}}),[]),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(f.Z,{type:"primary",onClick:function(){l||(d(!0),h.ZP.loading(v.ZP.get("检查更新中..."),0),s.W.put("".concat(a.Z.apiPrefix,"system/update-check")).then((function(e){var t=e.code,n=e.data;h.ZP.destroy(),200===t&&(n.hasNewVersion?w(n):_(n))})).catch((function(e){h.ZP.destroy(),console.log(e)})).finally((function(){d(!1)})))},children:v.ZP.get("检查更新")}),(0,m.jsx)(f.Z,{type:"primary",onClick:function(){return S("reload")},style:{marginLeft:8},children:v.ZP.get("重新启动")})]})}},85657:function(e,t,n){"use strict";n.r(t);var o=n(26068),i=n.n(o),r=n(48305),a=n.n(r),s=n(72317),c=n(75271),l=n(72338),u=n(61508),d=n(22901),h=n(94747),p=n(17082),f=n(93481),g=n(56646),v=n(32253),m=n(35181),Z=n(6367),x=n(71571),y=n(3475),P=n(56212),b=n(73236),j=n(87105),k=(n(68251),n(79231)),_=n(84522),w=n(32916),C=n(19334),S=n.n(C),I=n(48916),O=n(97302),T=n(52676),F={"panel-title":"panelTitle","log-remove-frequency":"logRemoveFrequency","cron-concurrency":"cronConcurrency",timezone:"timezone","global-ssh-key":"globalSshKey"},B=[{value:"base",label:s.ZP.get("基础数据"),disabled:!0},{value:"config",label:s.ZP.get("配置文件")},{value:"scripts",label:s.ZP.get("脚本文件")},{value:"log",label:s.ZP.get("日志文件")},{value:"deps",label:s.ZP.get("依赖文件")},{value:"syslog",label:s.ZP.get("系统日志")},{value:"dep_cache",label:s.ZP.get("依赖缓存")},{value:"raw",label:s.ZP.get("远程脚本缓存")},{value:"repo",label:s.ZP.get("远程仓库缓存")},{value:"ssh.d",label:s.ZP.get("SSH 文件缓存")}];t.default=function(e){var t=e.systemInfo,n=e.reloadSystemConfig,o=e.reloadTheme,r=localStorage.getItem("qinglong_dark_theme")||"auto",C=(0,c.useState)(),z=a()(C,2),E=z[0],R=z[1],A=l.Z.useForm(),N=a()(A,1)[0],M=(0,c.useState)(!1),W=a()(M,2),D=W[0],q=W[1],H=(0,w.default)(s.ZP.get("上传")),L=(0,w.default)(s.ZP.get("下载")),G=(0,c.useState)(!1),V=a()(G,2),K=V[0],$=V[1],U=(0,c.useState)(["base"]),J=a()(U,2),X=J[0],Q=J[1],Y=(0,c.useState)(!1),ee=a()(Y,2),te=ee[0],ne=ee[1],oe=(0,c.useState)([]),ie=a()(oe,2),re=ie[0],ae=ie[1],se=(0,c.useState)(!1),ce=a()(se,2),le=ce[0],ue=ce[1],de=x||{},he=de.enable,pe=de.disable,fe=(de.exportGeneratedCSS,de.setFetchMethod),ge=de.auto,ve=function(e){P.W.put("".concat(y.Z.apiPrefix,"system/config/").concat(e),S()(E,F[e])).then((function(t){var o=t.code;t.data;200===o&&(u.ZP.success(s.ZP.get("更新成功")),"panel-title"===e&&n())})).catch((function(e){console.log(e)}))},me=function(){return{runningInstanceRetentionDays:(null==E?void 0:E.runningInstanceRetentionDays)||0,cronStatRetentionDays:(null==E?void 0:E.cronStatRetentionDays)||0}},Ze=function(e){if(!e)return"0 B";var t=["B","KiB","MiB","GiB"],n=Math.min(Math.floor(Math.log(e)/Math.log(1024)),t.length-1);return"".concat((e/Math.pow(1024,n)).toFixed(n?1:0)," ").concat(t[n])};return(0,c.useEffect)((function(){P.W.get("".concat(y.Z.apiPrefix,"system/config")).then((function(e){var t=e.code,n=e.data;200===t&&n.info&&R(n.info)})).catch((function(e){console.log(e)}))}),[]),(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(l.Z,{layout:"vertical",form:N,children:[(0,T.jsx)(l.Z.Item,{label:s.ZP.get("主题"),name:"theme",initialValue:r,children:(0,T.jsxs)(h.ZP.Group,{onChange:function(e){var t=e.target.value;localStorage.setItem("qinglong_dark_theme",e.target.value),fe(fetch),"dark"===t?he({}):"light"===t?pe():ge({}),o()},value:r,optionType:"button",buttonStyle:"solid",children:[(0,T.jsx)(h.ZP.Button,{value:"light",style:{width:70,textAlign:"center"},children:s.ZP.get("亮色")}),(0,T.jsx)(h.ZP.Button,{value:"dark",style:{width:66,textAlign:"center"},children:s.ZP.get("暗色")}),(0,T.jsx)(h.ZP.Button,{value:"auto",style:{width:129,textAlign:"center"},children:s.ZP.get("跟随系统")})]})}),(0,T.jsx)(l.Z.Item,{label:s.ZP.get("面板标题"),name:"panelTitle",tooltip:s.ZP.get("自定义面板的站点标题,留空使用默认值“青龙”"),children:(0,T.jsxs)(p.Z.Group,{compact:!0,children:[(0,T.jsx)(p.Z,{style:{width:180},maxLength:100,value:(null==E?void 0:E.panelTitle)||"",placeholder:s.ZP.get("留空使用默认值“青龙”"),onChange:function(e){R(i()(i()({},E),{},{panelTitle:e.target.value}))}}),(0,T.jsx)(f.Z,{type:"primary",onClick:function(){ve("panel-title")},style:{width:84},children:s.ZP.get("确认")})]})}),(0,T.jsx)(l.Z.Item,{label:s.ZP.get("日志删除频率"),name:"frequency",tooltip:s.ZP.get("每x天自动删除x天以前的日志"),children:(0,T.jsxs)(p.Z.Group,{compact:!0,children:[(0,T.jsx)(g.Z,{addonBefore:s.ZP.get("每"),addonAfter:s.ZP.get("天"),style:{width:180},placeholder:s.ZP.get("未启用"),min:0,value:null==E?void 0:E.logRemoveFrequency,onChange:function(e){R(i()(i()({},E),{},{logRemoveFrequency:e}))}}),(0,T.jsx)(f.Z,{type:"primary",onClick:function(){ve("log-remove-frequency")},style:{width:84},children:s.ZP.get("确认")})]})}),(0,T.jsxs)(l.Z.Item,{label:s.ZP.get("历史数据保留与手动清理"),tooltip:s.ZP.get("保留天数为0时禁用对应清理,预览不会删除数据"),children:[(0,T.jsx)("div",{style:{marginBottom:8},children:(0,T.jsx)(g.Z,{addonBefore:s.ZP.get("运行实例"),addonAfter:s.ZP.get("天"),min:0,max:3650,value:(null==E?void 0:E.runningInstanceRetentionDays)||0,onChange:function(e){R(i()(i()({},E),{},{runningInstanceRetentionDays:e}))}})}),(0,T.jsx)("div",{style:{marginBottom:8},children:(0,T.jsx)(g.Z,{addonBefore:s.ZP.get("任务统计"),addonAfter:s.ZP.get("天"),min:0,max:3650,value:(null==E?void 0:E.cronStatRetentionDays)||0,onChange:function(e){R(i()(i()({},E),{},{cronStatRetentionDays:e}))}})}),(0,T.jsx)("div",{style:{marginBottom:8},children:(0,T.jsx)(v.Z.Group,{value:re,options:[{label:s.ZP.get("清除 Node 依赖缓存"),value:"node"},{label:s.ZP.get("清除 Python 依赖缓存"),value:"python3"}],onChange:function(e){return ae(e)}})}),(0,T.jsx)("div",{style:{marginBottom:8},children:(0,T.jsx)(v.Z,{checked:le,onChange:function(e){return ue(e.target.checked)},children:s.ZP.get("清理后压缩数据库")})}),(0,T.jsx)(f.Z,{onClick:function(){P.W.put("".concat(y.Z.apiPrefix,"system/storage-retention/config"),me()).then((function(e){200===e.code&&u.ZP.success(s.ZP.get("更新成功"))}))},style:{marginRight:8},children:s.ZP.get("保存设置")}),(0,T.jsx)(f.Z,{danger:!0,loading:te,onClick:function(){ne(!0);var e=i()(i()({},me()),{},{dependenceCacheTypes:re,compactDatabase:le});P.W.post("".concat(y.Z.apiPrefix,"system/storage-retention/preview"),e).then((function(t){var n=t.code,o=t.data;200===n&&d.Z.confirm({width:560,centered:!0,title:s.ZP.get("确认清理存储数据"),okText:s.ZP.get("确认清理"),cancelText:s.ZP.get("取消"),okButtonProps:{danger:!0},content:(0,T.jsxs)("div",{children:[(0,T.jsxs)("p",{children:[s.ZP.get("将删除历史运行实例"),": ",o.runningInstances]}),(0,T.jsxs)("p",{children:[s.ZP.get("将删除任务统计"),": ",o.cronStats]}),(0,T.jsxs)("p",{children:[s.ZP.get("将清除依赖缓存"),": ",o.dependenceCaches.length," (",Ze(o.dependenceCacheBytes),")"]}),o.dependenceCaches.length>0&&(0,T.jsx)("p",{children:s.ZP.get("清理依赖缓存后相关依赖需要重新安装")}),le&&(0,T.jsx)("p",{children:s.ZP.get("数据库压缩期间可能暂时阻塞请求")}),(0,T.jsx)("p",{children:s.ZP.get("此操作不可恢复,请确认已完成必要备份")})]}),onOk:function(){return ne(!0),P.W.post("".concat(y.Z.apiPrefix,"system/storage-retention/cleanup"),i()(i()({},e),{},{confirmation:"CLEAN"})).then((function(e){200===e.code&&u.ZP.success(s.ZP.get("清理完成"))})).finally((function(){return ne(!1)}))}})})).finally((function(){return ne(!1)}))},children:s.ZP.get("预览清理")})]}),(0,T.jsx)(l.Z.Item,{label:s.ZP.get("定时任务并发数"),name:"frequency",children:(0,T.jsxs)(p.Z.Group,{compact:!0,children:[(0,T.jsx)(g.Z,{style:{width:180},min:4,value:null==E?void 0:E.cronConcurrency,placeholder:s.ZP.get("默认为 CPU 个数"),onChange:function(e){R(i()(i()({},E),{},{cronConcurrency:e}))}}),(0,T.jsx)(f.Z,{type:"primary",onClick:function(){ve("cron-concurrency")},style:{width:84},children:s.ZP.get("确认")})]})}),(0,T.jsx)(l.Z.Item,{label:s.ZP.get("时区"),name:"timezone",children:(0,T.jsxs)(p.Z.Group,{compact:!0,children:[(0,T.jsx)(m.Z,{value:null==E?void 0:E.timezone,style:{width:180},onChange:function(e){R(i()(i()({},E),{},{timezone:e}))},options:O.z.map((function(e){return{value:e,label:e}})),showSearch:!0,filterOption:function(e,t){var n;return(null==t||null===(n=t.value)||void 0===n?void 0:n.toLowerCase().indexOf(e.toLowerCase()))>=0}}),(0,T.jsx)(f.Z,{type:"primary",onClick:function(){ve("timezone")},style:{width:84},children:s.ZP.get("确认")})]})}),(0,T.jsxs)(l.Z.Item,{label:s.ZP.get("全局SSH私钥"),name:"globalSshKey",tooltip:s.ZP.get("用于访问所有私有仓库的全局SSH私钥"),children:[(0,T.jsx)(p.Z.Group,{compact:!0,children:(0,T.jsx)(p.Z.TextArea,{value:(null==E?void 0:E.globalSshKey)||"",style:{width:264},autoSize:{minRows:3,maxRows:8},placeholder:s.ZP.get("请输入完整的SSH私钥内容"),onChange:function(e){R(i()(i()({},E),{},{globalSshKey:e.target.value}))}})}),(0,T.jsx)(f.Z,{type:"primary",onClick:function(){ve("global-ssh-key")},style:{width:264,marginTop:8},children:s.ZP.get("确认")})]}),(0,T.jsx)(l.Z.Item,{label:s.ZP.get("语言"),name:"lang",children:(0,T.jsx)(m.Z,{defaultValue:localStorage.getItem("lang")||"",style:{width:264},onChange:function(e){var t;localStorage.setItem("lang",e);var n=e||(null===(t=navigator.language)||void 0===t?void 0:t.slice(0,2))||"zh";P.W.put("".concat(y.Z.apiPrefix,"system/config/lang"),{lang:n}).catch((function(){})),setTimeout((function(){window.location.reload()}),500)},options:[{value:"",label:s.ZP.get("跟随系统")},{value:"zh",label:"简体中文"},{value:"en",label:"English"}]})}),(0,T.jsxs)(l.Z.Item,{label:s.ZP.get("数据备份还原"),name:"frequency",children:[(0,T.jsx)(f.Z,{type:"primary",onClick:function(){Q(["base"]),$(!0)},loading:D,children:D?s.ZP.get("生成数据中..."):s.ZP.get("备份")}),(0,T.jsx)(Z.Z,{method:"put",showUploadList:!1,maxCount:1,action:"".concat(y.Z.apiPrefix,"system/data/import"),onChange:function(e){var t=e.file,n=e.event;null!=n&&n.percent&&H(Math.min(parseFloat(null==n?void 0:n.percent.toFixed(1)),99)),"done"===t.status&&(H(100),d.Z.confirm({width:600,maskClosable:!1,title:s.ZP.get("确认重启"),centered:!0,content:(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("div",{children:s.ZP.get("备份数据上传成功,确认覆盖数据")}),(0,T.jsxs)("div",{children:[s.ZP.get("如果恢复失败,可进入容器执行")," ql reload data"]})]}),okText:s.ZP.get("重启"),onOk:function(){P.W.put("".concat(y.Z.apiPrefix,"update/data")).then((function(){u.ZP.success({content:(0,T.jsxs)("span",{children:[s.ZP.get("系统将在"),(0,T.jsx)(_.Z,{className:"inline-countdown",format:"ss",value:Date.now()+3e4}),s.ZP.get("秒后自动刷新")]}),duration:30}),(0,I.o4)(),setTimeout((function(){window.location.reload()}),3e4)})).catch((function(e){console.log(e)}))}})),"error"===t.status&&u.ZP.error(s.ZP.get("上传失败"))},name:"data",headers:{Authorization:"Bearer ".concat(localStorage.getItem(y.Z.authKey))},children:(0,T.jsx)(f.Z,{icon:(0,T.jsx)(k.Z,{}),style:{marginLeft:8},children:s.ZP.get("还原数据")})})]}),(0,T.jsx)(l.Z.Item,{label:s.ZP.get("检查更新"),name:"update",children:(0,T.jsx)(b.default,{systemInfo:t})})]}),(0,T.jsx)(d.Z,{title:s.ZP.get("选择备份模块"),open:K,onOk:function(){q(!0),P.W.put("".concat(y.Z.apiPrefix,"system/data/export"),{type:X},{responseType:"blob",timeout:864e5,onDownloadProgress:function(e){e.progress&&L(parseFloat((100*e.progress).toFixed(1)))}}).then((function(e){(0,j.saveAs)(e,"data.tgz")})).catch((function(e){console.log(e)})).finally((function(){q(!1),$(!1)}))},onCancel:function(){return $(!1)},okText:s.ZP.get("开始备份"),cancelText:s.ZP.get("取消"),okButtonProps:{loading:D},children:(0,T.jsx)(v.Z.Group,{value:X,onChange:function(e){Q(e)},style:{width:"100%",display:"flex",flexWrap:"wrap",gap:"8px 16px"},children:B.map((function(e){return(0,T.jsx)(v.Z,{value:e.value,disabled:e.disabled,style:{marginLeft:0},children:e.label},e.value)}))})})]})}},32916:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return l}});var o=n(72317),i=n(46016),r=n(22901),a=n(75271),s=n(52676),c=function(e){var t=e.percent;return(0,s.jsx)(i.Z,{style:{display:"flex",justifyContent:"center"},type:"circle",percent:t})};function l(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)(c,{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=r.Z.info({width:600,maskClosable:!1,title:"".concat(e).concat(n>=100?o.ZP.get("成功"):o.ZP.get("中...")),centered:!0,content:(0,s.jsx)(c,{percent:n}),okButtonProps:{disabled:!0}})}}},65814:function(e,t,n){"use strict";var o=n(15558),i=n.n(o),r=n(67825),a=n.n(r),s=n(90228),c=n.n(s),l=n(87999),u=n.n(l),d=n(25298),h=n.n(d),p=n(17069),f=n.n(p),g=n(82092),v=n.n(g),m=n(78078),Z=n.n(m),x=["type"],y=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};h()(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 f()(e,[{key:"init",value:(n=u()(c()().mark((function e(){var t=this;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,this.state="connecting",this.emit("connecting");case 3:if(!(this.reconnectAttempts<this.options.maxReconnectAttempts)){e.next=16;break}return this.socket=new(Z())(this.url),this.setupEventListeners(),this.startHeartbeat(),e.next=9,this.waitForClose();case 9:return this.stopHeartbeat(),this.socket=null,this.reconnectAttempts++,e.next=14,new Promise((function(e){return setTimeout(e,t.options.reconnectInterval)}));case 14:e.next=3;break;case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),this.handleError(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,18]])}))),function(){return 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()(c()().mark((function e(){var t;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((null===(t=this.socket)||void 0===t?void 0:t.readyState)===Z().CLOSED){e.next=5;break}return e.next=3,new Promise((function(e){return setTimeout(e,100)}));case 3:e.next=0;break;case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"subscribe",value:function(e,t){var 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)===Z().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;i()(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)===Z().OPEN&&e.socket.send(JSON.stringify({type:"heartbeat"}))}),this.options.heartbeatInterval)}},{key:"stopHeartbeat",value:function(){this.heartbeatTimeout&&clearInterval(this.heartbeatTimeout)}},{key:"close",value:function(){this.socket&&(this.state="closed",this.stopHeartbeat(),this.socket.close(),this.emit("close"))}},{key:"handleError",value:function(e){console.error("WebSocket错误:",e),this.emit("error",e)}},{key:"on",value:function(e,t){}},{key:"emit",value:function(e,t){}}],[{key:"getInstance",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0;return e.instance||(e.instance=new e(t,n)),e.instance}}]),e}();v()(y,"instance",null),t.Z=y},68251:function(){},27916:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var o=n(99459),i=n(75271);function r(){var e=i.useReducer((function(e){return e+1}),0);return(0,o.Z)(e,2)[1]}},35181:function(e,t,n){"use strict";var o=n(57904),i=n(2053),r=n(82187),a=n.n(r),s=n(77168),c=n(2021),l=n(75271),u=n(96820),d=n(83289),h=n(30107),p=n(38470),f=n(5663),g=n(21485),v=n(28800),m=n(50528),Z=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 i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n},y="SECRET_COMBOBOX_MODE_DO_NOT_USE",P=function(e,t){var n,r=e.prefixCls,P=e.bordered,b=void 0===P||P,j=e.className,k=e.getPopupContainer,_=e.dropdownClassName,w=e.popupClassName,C=e.listHeight,S=void 0===C?256:C,I=e.placement,O=e.listItemHeight,T=void 0===O?32:O,F=e.size,B=e.disabled,z=e.notFoundContent,E=e.status,R=e.showArrow,A=x(e,["prefixCls","bordered","className","getPopupContainer","dropdownClassName","popupClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","showArrow"]),N=l.useContext(u.E_),M=N.getPopupContainer,W=N.getPrefixCls,D=N.renderEmpty,q=N.direction,H=N.virtual,L=N.dropdownMatchSelectWidth,G=l.useContext(p.Z),V=W("select",r),K=W(),$=(0,Z.ri)(V,q),U=$.compactSize,J=$.compactItemClassnames,X=l.useMemo((function(){var e=A.mode;if("combobox"!==e)return e===y?"combobox":e}),[A.mode]),Q="multiple"===X||"tags"===X,Y=void 0!==R?R:A.loading||!(Q||"combobox"===X),ee=(0,l.useContext)(f.aM),te=ee.status,ne=ee.hasFeedback,oe=ee.isFormItemInput,ie=ee.feedbackIcon,re=(0,v.F)(te,E);n=void 0!==z?z:"combobox"===X?null:(D||d.Z)("Select");var ae=(0,m.Z)((0,i.Z)((0,i.Z)({},A),{multiple:Q,hasFeedback:ne,feedbackIcon:ie,showArrow:Y,prefixCls:V})),se=ae.suffixIcon,ce=ae.itemIcon,le=ae.removeIcon,ue=ae.clearIcon,de=(0,c.Z)(A,["suffixIcon","itemIcon"]),he=a()(w||_,(0,o.Z)({},"".concat(V,"-dropdown-").concat(q),"rtl"===q)),pe=U||F||G,fe=l.useContext(h.Z),ge=null!=B?B:fe,ve=a()((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},"".concat(V,"-lg"),"large"===pe),"".concat(V,"-sm"),"small"===pe),"".concat(V,"-rtl"),"rtl"===q),"".concat(V,"-borderless"),!b),"".concat(V,"-in-form-item"),oe),(0,v.Z)(V,re,ne),J,j);return l.createElement(s.ZP,(0,i.Z)({ref:t,virtual:H,dropdownMatchSelectWidth:L},de,{transitionName:(0,g.mL)(K,(0,g.q0)(I),A.transitionName),listHeight:S,listItemHeight:T,mode:X,prefixCls:V,placement:void 0!==I?I:"rtl"===q?"bottomRight":"bottomLeft",direction:q,inputIcon:se,menuItemSelectedIcon:ce,removeIcon:le,clearIcon:ue,notFoundContent:n,className:ve,getPopupContainer:k||M,dropdownClassName:he,showArrow:ne||R,disabled:ge}))},b=l.forwardRef(P);b.SECRET_COMBOBOX_MODE_DO_NOT_USE=y,b.Option=s.Wx,b.OptGroup=s.Xo,t.Z=b},88987:function(e,t,n){var o=n(71519),i=n(82999),r=n(76111),a=n(50506),s=n(80845);function c(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])}}c.prototype.clear=o,c.prototype.delete=i,c.prototype.get=r,c.prototype.has=a,c.prototype.set=s,e.exports=c},175:function(e,t,n){var o=n(2173),i=n(33752),r=n(10548),a=n(63410),s=n(3564);function c(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])}}c.prototype.clear=o,c.prototype.delete=i,c.prototype.get=r,c.prototype.has=a,c.prototype.set=s,e.exports=c},35922:function(e,t,n){var o=n(47758)(n(29165),"Map");e.exports=o},9440:function(e,t,n){var o=n(7140),i=n(56504),r=n(88833),a=n(80953),s=n(70724);function c(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])}}c.prototype.clear=o,c.prototype.delete=i,c.prototype.get=r,c.prototype.has=a,c.prototype.set=s,e.exports=c},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}},58939:function(e,t,n){var o=n(92042),i=n(90654),r=n(36838),a=n(51059),s=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,d=l.hasOwnProperty,h=RegExp("^"+u.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!r(e)||i(e))&&(o(e)?h:s).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),i=n(9149);e.exports=function(e,t){var n=i(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),i=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 i.call(t,e)?t[e]:void 0}},50506:function(e,t,n){var o=n(37722),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return o?void 0!==t[e]:i.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}},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,i=n(36633),r=(o=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"";e.exports=function(e){return!!r&&r in e}},2173:function(e){e.exports=function(){this.__data__=[],this.size=0}},33752:function(e,t,n){var o=n(62718),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=o(t,e);return!(n<0)&&(n==t.length-1?t.pop():i.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__,i=o(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},7140:function(e,t,n){var o=n(88987),i=n(175),r=n(35922);e.exports=function(){this.size=0,this.__data__={hash:new o,map:new(r||i),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),i=n.size;return n.set(e,t),this.size+=n.size==i?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}},92042:function(e,t,n){var o=n(80732),i=n(36838);e.exports=function(e){if(!i(e))return!1;var t=o(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[3308],{69870:function(t,n){n.Z={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"}},81372:function(t,n,e){var o=e(98037),r=e(75271),c=e(69870),i=e(64720),u=function(t,n){return r.createElement(i.Z,(0,o.Z)((0,o.Z)({},t),{},{ref:n,icon:c.Z}))},a=r.forwardRef(u);n.Z=a},32916:function(t,n,e){e.r(n),e.d(n,{default:function(){return l}});var o=e(72317),r=e(46016),c=e(
|
|
1
|
+
"use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[3308],{69870:function(t,n){n.Z={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"}},81372:function(t,n,e){var o=e(98037),r=e(75271),c=e(69870),i=e(64720),u=function(t,n){return r.createElement(i.Z,(0,o.Z)((0,o.Z)({},t),{},{ref:n,icon:c.Z}))},a=r.forwardRef(u);n.Z=a},32916:function(t,n,e){e.r(n),e.d(n,{default:function(){return l}});var o=e(72317),r=e(46016),c=e(22901),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 n=r(98037),o=r(75271),a=r(69870),c=r(64720),i=function(e,t){return o.createElement(c.Z,(0,n.Z)((0,n.Z)({},e),{},{ref:t,icon:a.Z}))},l=o.forwardRef(i);t.Z=l},67303:function(e,t,r){r.r(t);var n=r(48305),o=r.n(n),a=r(72317),c=r(75271),i=r(50691),l=r(61508),s=r(17082),u=r(93481),f=r(72338),p=r(19321),d=r(6367),m=r(56212),h=r(3475),y=r(98783),g=r(63392),v=r.n(g),x=r(34014),Z=r(1371),b=r(79231),w=r(69822),j=(r(94095),r(52676)),P=i.Z.Title,E=i.Z.Link;t.default=function(e){var t=e.user,r=e.userChange,n=(0,c.useState)(!1),i=o()(n,2),g=i[0],O=i[1],S=(0,c.useState)(),C=o()(S,2),k=C[0],_=C[1],T=(0,c.useState)(!1),z=o()(T,2),N=z[0],B=z[1],A=(0,c.useState)(),R=o()(A,2),W=R[0],I=R[1],L=(0,c.useState)(),F=o()(L,2),D=F[0],q=F[1],M=(0,c.useState)(),G=o()(M,2),H=G[0],K=G[1],Q=function(){m.W.put("".concat(h.Z.apiPrefix,"user/two-factor/deactivate")).then((function(e){var t=e.code,n=e.data;200===t&&n&&(_(!1),r())})).catch((function(e){console.log(e)}))},X=function(){m.W.get("".concat(h.Z.apiPrefix,"user/two-factor/init")).then((function(e){var t=e.code,r=e.data;200===t&&I(r)})).catch((function(e){console.log(e)}))};return(0,c.useEffect)((function(){_(t&&t.twoFactorActivated),K(t.avatar&&"".concat(h.Z.apiPrefix,"static/").concat(t.avatar))}),[t]),N?(0,j.jsx)(j.Fragment,{children:W?(0,j.jsxs)("div",{children:[(0,j.jsx)(P,{level:5,children:a.ZP.get("第一步")}),a.ZP.get("下载两步验证手机应用,比如 Google Authenticator 、"),(0,j.jsx)(E,{href:"https://www.microsoft.com/en-us/security/mobile-authenticator-app",target:"_blank",children:"Microsoft Authenticator"}),"、",(0,j.jsx)(E,{href:"https://authy.com/download/",target:"_blank",children:"Authy"}),"、",(0,j.jsx)(E,{href:"https://support.1password.com/one-time-passwords/",target:"_blank",children:"1Password"}),"、",(0,j.jsx)(E,{href:"https://support.logmeininc.com/lastpass/help/lastpass-authenticator-lp030014",target:"_blank",children:"LastPass Authenticator"}),(0,j.jsx)(P,{style:{marginTop:5},level:5,children:a.ZP.get("第二步")}),a.ZP.get("使用手机应用扫描二维码,或者输入秘钥")," ",null==W?void 0:W.secret,(0,j.jsx)("div",{style:{marginTop:10},children:(0,j.jsx)(v(),{style:{border:"1px solid #21262d",borderRadius:6},includeMargin:!0,size:187,value:null==W?void 0:W.url})}),(0,j.jsx)(P,{style:{marginTop:5},level:5,children:a.ZP.get("第三步")}),a.ZP.get("输入手机应用上的6位数字"),(0,j.jsx)(s.Z,{style:{margin:"10px 0 10px 0",display:"block",maxWidth:200},value:D,onChange:function(e){return q(e.target.value)},placeholder:"123456"}),(0,j.jsx)(u.Z,{type:"primary",loading:g,onClick:function(){O(!0),m.W.put("".concat(h.Z.apiPrefix,"user/two-factor/active"),{code:D}).then((function(e){var t=e.code,n=e.data;200===t&&(n?(l.ZP.success(a.ZP.get("激活成功")),B(!1),_(!0),r()):l.ZP.success(a.ZP.get("验证失败")))})).catch((function(e){console.log(e)})).finally((function(){return O(!1)}))},children:a.ZP.get("完成设置")})]}):(0,j.jsx)(x.Z,{})}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("div",{style:{fontSize:18,borderBottom:"1px solid #f0f0f0",marginBottom:8,paddingBottom:4},children:a.ZP.get("修改用户名密码")}),(0,j.jsxs)(f.Z,{onFinish:function(e){m.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),y.history.push("/login"))})).catch((function(e){console.log(e)}))},layout:"vertical",children:[(0,j.jsx)(f.Z.Item,{label:a.ZP.get("用户名"),name:"username",rules:[{required:!0}],hasFeedback:!0,style:{maxWidth:300},children:(0,j.jsx)(s.Z,{autoComplete:"username",placeholder:a.ZP.get("用户名")})}),(0,j.jsx)(f.Z.Item,{label:a.ZP.get("密码"),name:"password",rules:[{required:!0},{pattern:/^(?!admin$).*$/,message:a.ZP.get("密码不能为admin")}],hasFeedback:!0,style:{maxWidth:300},children:(0,j.jsx)(s.Z,{type:"password",autoComplete:"current-password",placeholder:a.ZP.get("密码")})}),(0,j.jsx)(u.Z,{type:"primary",htmlType:"submit",children:a.ZP.get("保存")})]}),(0,j.jsx)("div",{style:{fontSize:18,borderBottom:"1px solid #f0f0f0",marginBottom:8,paddingBottom:4,marginTop:16},children:a.ZP.get("两步验证")}),(0,j.jsx)(u.Z,{type:"primary",danger:k,onClick:function(){k?Q():(X(),B(!0))},children:k?a.ZP.get("禁用"):a.ZP.get("启用")}),(0,j.jsx)("div",{style:{fontSize:18,borderBottom:"1px solid #f0f0f0",marginBottom:8,paddingBottom:4,marginTop:16},children:a.ZP.get("头像")}),(0,j.jsx)(p.C,{size:128,shape:"square",icon:(0,j.jsx)(Z.Z,{}),src:H}),(0,j.jsx)(w.Z,{rotationSlider:!0,children:(0,j.jsx)(d.Z,{method:"put",showUploadList:!1,maxCount:1,action:"".concat(h.Z.apiPrefix,"user/avatar"),onChange:function(e){e.file&&e.file.response&&(K("".concat(h.Z.apiPrefix,"static/").concat(e.file.response.data)),r())},name:"avatar",headers:{Authorization:"Bearer ".concat(localStorage.getItem(h.Z.authKey))},children:(0,j.jsx)(u.Z,{icon:(0,j.jsx)(b.Z,{}),style:{marginLeft:8},children:a.ZP.get("更换头像")})})})]})}},43150:function(e,t,r){r.d(t,{Z:function(){return n}});var n=function(e){return e?"function"==typeof e?e():e:null}},27916:function(e,t,r){r.d(t,{Z:function(){return a}});var n=r(99459),o=r(75271);function a(){var e=o.useReducer((function(e){return e+1}),0);return(0,n.Z)(e,2)[1]}},19321:function(e,t,r){r.d(t,{C:function(){return O}});var n=r(2053),o=r(57904),a=r(24744),c=r(99459),i=r(82187),l=r.n(i),s=r(28526),u=r(3083),f=r(75271),p=r(96820),d=r(71343),m=r(46555),h=f.createContext("default"),y=function(e){var t=e.children,r=e.size;return f.createElement(h.Consumer,null,(function(e){return f.createElement(h.Provider,{value:r||e},t)}))},g=h,v=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r},x=function(e,t){var r=f.useContext(g),i=f.useState(1),h=(0,c.Z)(i,2),y=h[0],x=h[1],Z=f.useState(!1),b=(0,c.Z)(Z,2),w=b[0],j=b[1],P=f.useState(!0),E=(0,c.Z)(P,2),O=E[0],S=E[1],C=f.useRef(null),k=f.useRef(null),_=(0,u.sQ)(t,C),T=f.useContext(p.E_).getPrefixCls,z=function(){if(k.current&&C.current){var t=k.current.offsetWidth,r=C.current.offsetWidth;if(0!==t&&0!==r){var n=e.gap,o=void 0===n?4:n;2*o<r&&x(r-2*o<t?(r-2*o)/t:1)}}};f.useEffect((function(){j(!0)}),[]),f.useEffect((function(){S(!0),x(1)}),[e.src]),f.useEffect((function(){z()}),[e.gap]);var N,B=e.prefixCls,A=e.shape,R=void 0===A?"circle":A,W=e.size,I=void 0===W?"default":W,L=e.src,F=e.srcSet,D=e.icon,q=e.className,M=e.alt,G=e.draggable,H=e.children,K=e.crossOrigin,Q=v(e,["prefixCls","shape","size","src","srcSet","icon","className","alt","draggable","children","crossOrigin"]),X="default"===I?r:I,$=Object.keys("object"===(0,a.Z)(X)&&X||{}).some((function(e){return["xs","sm","md","lg","xl","xxl"].includes(e)})),J=(0,d.Z)($),U=f.useMemo((function(){if("object"!==(0,a.Z)(X))return{};var e=m.c4.find((function(e){return J[e]})),t=X[e];return t?{width:t,height:t,lineHeight:"".concat(t,"px"),fontSize:D?t/2:18}:{}}),[J,X]),V=T("avatar",B),Y=l()((0,o.Z)((0,o.Z)({},"".concat(V,"-lg"),"large"===X),"".concat(V,"-sm"),"small"===X)),ee=f.isValidElement(L),te=l()(V,Y,(0,o.Z)((0,o.Z)((0,o.Z)({},"".concat(V,"-").concat(R),!!R),"".concat(V,"-image"),ee||L&&O),"".concat(V,"-icon"),!!D),q),re="number"==typeof X?{width:X,height:X,lineHeight:"".concat(X,"px"),fontSize:D?X/2:18}:{};if("string"==typeof L&&O)N=f.createElement("img",{src:L,draggable:G,srcSet:F,onError:function(){var t=e.onError;!1!==(t?t():void 0)&&S(!1)},alt:M,crossOrigin:K});else if(ee)N=L;else if(D)N=D;else if(w||1!==y){var ne="scale(".concat(y,") translateX(-50%)"),oe={msTransform:ne,WebkitTransform:ne,transform:ne},ae="number"==typeof X?{lineHeight:"".concat(X,"px")}:{};N=f.createElement(s.Z,{onResize:z},f.createElement("span",{className:"".concat(V,"-string"),ref:k,style:(0,n.Z)((0,n.Z)({},ae),oe)},H))}else N=f.createElement("span",{className:"".concat(V,"-string"),style:{opacity:0},ref:k},H);return delete Q.onError,delete Q.gap,f.createElement("span",(0,n.Z)({},Q,{style:(0,n.Z)((0,n.Z)((0,n.Z)({},re),U),Q.style),className:te,ref:_}),N)};var Z=f.forwardRef(x),b=r(22615),w=r(63845),j=r(5555),P=function(e){var t=f.useContext(p.E_),r=t.getPrefixCls,n=t.direction,a=e.prefixCls,c=e.className,i=void 0===c?"":c,s=e.maxCount,u=e.maxStyle,d=e.size,m=r("avatar-group",a),h=l()(m,(0,o.Z)({},"".concat(m,"-rtl"),"rtl"===n),i),g=e.children,v=e.maxPopoverPlacement,x=void 0===v?"top":v,P=e.maxPopoverTrigger,E=void 0===P?"hover":P,O=(0,b.Z)(g).map((function(e,t){return(0,j.Tm)(e,{key:"avatar-key-".concat(t)})})),S=O.length;if(s&&s<S){var C=O.slice(0,s),k=O.slice(s,S);return C.push(f.createElement(w.Z,{key:"avatar-popover-key",content:k,trigger:E,placement:x,overlayClassName:"".concat(m,"-popover")},f.createElement(Z,{style:u},"+".concat(S-s)))),f.createElement(y,{size:d},f.createElement("div",{className:h,style:e.style},C))}return f.createElement(y,{size:d},f.createElement("div",{className:h,style:e.style},O))},E=Z;E.Group=P;var O=E},71343:function(e,t,r){var n=r(75271),o=r(27916),a=r(46555);t.Z=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=(0,n.useRef)({}),r=(0,o.Z)();return(0,n.useEffect)((function(){var n=a.ZP.subscribe((function(n){t.current=n,e&&r()}));return function(){return a.ZP.unsubscribe(n)}}),[]),t.current}},63845:function(e,t,r){var n=r(2053),o=r(75271),a=r(43150),c=r(21485),i=r(96820),l=r(59816),s=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r},u=function(e){var t=e.title,r=e.content,n=e.prefixCls;return o.createElement(o.Fragment,null,t&&o.createElement("div",{className:"".concat(n,"-title")},(0,a.Z)(t)),o.createElement("div",{className:"".concat(n,"-inner-content")},(0,a.Z)(r)))},f=o.forwardRef((function(e,t){var r=e.prefixCls,a=e.title,f=e.content,p=e._overlay,d=e.placement,m=void 0===d?"top":d,h=e.trigger,y=void 0===h?"hover":h,g=e.mouseEnterDelay,v=void 0===g?.1:g,x=e.mouseLeaveDelay,Z=void 0===x?.1:x,b=e.overlayStyle,w=void 0===b?{}:b,j=s(e,["prefixCls","title","content","_overlay","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),P=o.useContext(i.E_).getPrefixCls,E=P("popover",r),O=P(),S=o.useMemo((function(){return p||(a||f?o.createElement(u,{prefixCls:E,title:a,content:f}):null)}),[p,a,f,E]);return o.createElement(l.Z,(0,n.Z)({placement:m,trigger:y,mouseEnterDelay:v,mouseLeaveDelay:Z,overlayStyle:w},j,{prefixCls:E,ref:t,overlay:S,transitionName:(0,c.mL)(O,"zoom-big",j.transitionName)}))}));t.Z=f},58504:function(e,t,r){r(5860)},15767:function(e,t,r){r.d(t,{CR:function(){return u},Jh:function(){return l},Q_:function(){return p},XA:function(){return s},ZT:function(){return o},_T:function(){return c},ev:function(){return f},mG:function(){return i},pi:function(){return a}});var n=function(e,t){return n=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])},n(e,t)};function o(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}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var a=function(){return a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};function c(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}function i(e,t,r,n){return new(r||(r=Promise))((function(o,a){function c(e){try{l(n.next(e))}catch(e){a(e)}}function i(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(c,i)}l((n=n.apply(e,t||[])).next())}))}function l(e,t){var r,n,o,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return c.next=i(0),c.throw=i(1),c.return=i(2),"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function i(i){return function(l){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;c&&(c=0,i[0]&&(a=0)),a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,l])}}}Object.create;function s(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function u(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),c=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)c.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return c}function f(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}Object.create;function p(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}"function"==typeof SuppressedError&&SuppressedError}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[8490],{75875:function(e,n,t){t.d(n,{iN:function(){return C},R_:function(){return u}});var a=t(96299),r=t(28556),c=[{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 o(e){var n=e.r,t=e.g,r=e.b,c=(0,a.py)(n,t,r);return{h:360*c.h,s:c.s,v:c.v}}function i(e){var n=e.r,t=e.g,r=e.b;return"#".concat((0,a.vq)(n,t,r,!1))}function s(e,n,t){var a=t/100;return{r:(n.r-e.r)*a+e.r,g:(n.g-e.g)*a+e.g,b:(n.b-e.b)*a+e.b}}function f(e,n,t){var a;return(a=Math.round(e.h)>=60&&Math.round(e.h)<=240?t?Math.round(e.h)-2*n:Math.round(e.h)+2*n:t?Math.round(e.h)+2*n:Math.round(e.h)-2*n)<0?a+=360:a>=360&&(a-=360),a}function l(e,n,t){return 0===e.h&&0===e.s?e.s:((a=t?e.s-.16*n:4===n?e.s+.16:e.s+.05*n)>1&&(a=1),t&&5===n&&a>.1&&(a=.1),a<.06&&(a=.06),Number(a.toFixed(2)));var a}function d(e,n,t){var a;return(a=t?e.v+.05*n:e.v-.15*n)>1&&(a=1),Number(a.toFixed(2))}function u(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=[],a=(0,r.uA)(e),u=5;u>0;u-=1){var m=o(a),p=i((0,r.uA)({h:f(m,u,!0),s:l(m,u,!0),v:d(m,u,!0)}));t.push(p)}t.push(i(a));for(var E=1;E<=4;E+=1){var h=o(a),g=i((0,r.uA)({h:f(h,E),s:l(h,E),v:d(h,E)}));t.push(g)}return"dark"===n.theme?c.map((function(e){var a=e.index,c=e.opacity;return i(s((0,r.uA)(n.backgroundColor||"#141414"),(0,r.uA)(t[a]),100*c))})):t}var m=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];m.primary=m[5];var p=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];p.primary=p[5];var E=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];E.primary=E[5];var h=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];h.primary=h[5];var g=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];g.primary=g[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 b=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];b.primary=b[5];var C=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];C.primary=C[5];var N=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];N.primary=N[5];var x=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];x.primary=x[5];var _=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];_.primary=_[5];var M=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];M.primary=M[5];var T=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];T.primary=T[5];var S=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];S.primary=S[5];var A=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];A.primary=A[5];var O=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];O.primary=O[5];var R=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];R.primary=R[5];var w=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];w.primary=w[5];var I=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];I.primary=I[5];var Z=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];Z.primary=Z[5];var U=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];U.primary=U[5];var P=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];P.primary=P[5];var k=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];k.primary=k[5];var L=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];L.primary=L[5];var D=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];D.primary=D[5]},48881:function(e,n,t){t.d(n,{Z:function(){return C}});var a=t(2053),r=t(99459),c=t(57904),o=t(58006),i=t(75271),s=t(82187),f=t.n(s),l=t(75875),d=t(28771),u=t(98037),m=t(39765),p=["icon","className","onClick","style","primaryColor","secondaryColor"],E={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};var h=function(e){var n=e.icon,t=e.className,a=e.onClick,r=e.style,c=e.primaryColor,s=e.secondaryColor,f=(0,o.Z)(e,p),l=i.useRef(),d=E;if(c&&(d={primaryColor:c,secondaryColor:s||(0,m.pw)(c)}),(0,m.C3)(l),(0,m.Kp)((0,m.r)(n),"icon should be icon definiton, but got ".concat(n)),!(0,m.r)(n))return null;var h=n;return h&&"function"==typeof h.icon&&(h=(0,u.Z)((0,u.Z)({},h),{},{icon:h.icon(d.primaryColor,d.secondaryColor)})),(0,m.R_)(h.icon,"svg-".concat(h.name),(0,u.Z)((0,u.Z)({className:t,onClick:a,style:r,"data-icon":h.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},f),{},{ref:l}))};h.displayName="IconReact",h.getTwoToneColors=function(){return(0,u.Z)({},E)},h.setTwoToneColors=function(e){var n=e.primaryColor,t=e.secondaryColor;E.primaryColor=n,E.secondaryColor=t||(0,m.pw)(n),E.calculated=!!t};var g=h;function v(e){var n=(0,m.H9)(e),t=(0,r.Z)(n,2),a=t[0],c=t[1];return g.setTwoToneColors({primaryColor:a,secondaryColor:c})}var y=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];v(l.iN.primary);var b=i.forwardRef((function(e,n){var t=e.className,s=e.icon,l=e.spin,u=e.rotate,p=e.tabIndex,E=e.onClick,h=e.twoToneColor,v=(0,o.Z)(e,y),b=i.useContext(d.Z),C=b.prefixCls,N=void 0===C?"anticon":C,x=b.rootClassName,_=f()(x,N,(0,c.Z)((0,c.Z)({},"".concat(N,"-").concat(s.name),!!s.name),"".concat(N,"-spin"),!!l||"loading"===s.name),t),M=p;void 0===M&&E&&(M=-1);var T=u?{msTransform:"rotate(".concat(u,"deg)"),transform:"rotate(".concat(u,"deg)")}:void 0,S=(0,m.H9)(h),A=(0,r.Z)(S,2),O=A[0],R=A[1];return i.createElement("span",(0,a.Z)({role:"img","aria-label":s.name},v,{ref:n,tabIndex:M,onClick:E,className:_}),i.createElement(g,{icon:s,primaryColor:O,secondaryColor:R,style:T}))}));b.displayName="AntdIcon",b.getTwoToneColor=function(){var e=g.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor},b.setTwoToneColor=v;var C=b},28771:function(e,n,t){var a=(0,t(75271).createContext)({});n.Z=a},39765:function(e,n,t){t.d(n,{R_:function(){return h},pw:function(){return g},r:function(){return p},H9:function(){return v},vD:function(){return y},C3:function(){return b},Kp:function(){return m}});var a=t(98037),r=t(24744),c=t(75875),o=t(61984);function i(e){var n;return null==e||null===(n=e.getRootNode)||void 0===n?void 0:n.call(e)}function s(e){return function(e){return i(e)instanceof ShadowRoot}(e)?i(e):null}var f=t(7432),l=t(75271),d=t(28771);function u(e){return e.replace(/-(.)/g,(function(e,n){return n.toUpperCase()}))}function m(e,n){(0,f.ZP)(e,"[@ant-design/icons] ".concat(n))}function p(e){return"object"===(0,r.Z)(e)&&"string"==typeof e.name&&"string"==typeof e.theme&&("object"===(0,r.Z)(e.icon)||"function"==typeof e.icon)}function E(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(n,t){var a=e[t];if("class"===t)n.className=a,delete n.class;else delete n[t],n[u(t)]=a;return n}),{})}function h(e,n,t){return t?l.createElement(e.tag,(0,a.Z)((0,a.Z)({key:n},E(e.attrs)),t),(e.children||[]).map((function(t,a){return h(t,"".concat(n,"-").concat(e.tag,"-").concat(a))}))):l.createElement(e.tag,(0,a.Z)({key:n},E(e.attrs)),(e.children||[]).map((function(t,a){return h(t,"".concat(n,"-").concat(e.tag,"-").concat(a))})))}function g(e){return(0,c.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"},b=function(e){var n=(0,l.useContext)(d.Z),t=n.csp,a=n.prefixCls,r="\n.anticon {\n display: inline-flex;\n align-items: center;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";a&&(r=r.replace(/anticon/g,a)),(0,l.useEffect)((function(){var n=s(e.current);(0,o.hq)(r,"@ant-design-icons",{prepend:!0,csp:t,attachTo:n})}),[])}},76433:function(e,n,t){t.r(n),t.d(n,{default:function(){return B}});var a=t(90228),r=t.n(a),c=t(87999),o=t.n(c),i=t(48305),s=t.n(i),f=t(72317),l=t(75271),d=t(62808),u=t(19116),m=t(61508),p=t(93481),E=t(20553),h=t(98705),g=t(54075),v=t(2727),y=t(56212),b=t(3475),C=t(31352),N=t(11333),x=t.n(N),_=t(25298),M=t.n(_),T=t(17069),S=t.n(T),A=t(82092),O=t.n(A),R=t(18446),w=t(71529),I=/\[ℹ️info/g,Z=/\[⚠️debug/g,U=/\[❌warn/g,P=/\[🐛error/g,k="system-log-info",L="system-warn-info",D="system-error-info",F="system-debug-info",H=R.lg.fromClass(function(){function e(n){M()(this,e),O()(this,"decorations",void 0),this.decorations=this.getDecorations(n)}return S()(e,[{key:"update",value:function(e){e.docChanged&&(this.decorations=this.getDecorations(e.view))}},{key:"getDecorations",value:function(e){for(var n,t=new w.f_,a=e.state.doc.toString();null!==(n=I.exec(a));){var r=R.p.mark({class:k});t.add(n.index,n.index+n[0].length,r)}return t.finish()}}]),e}(),{decorations:function(e){return e.decorations}}),K=R.lg.fromClass(function(){function e(n){M()(this,e),O()(this,"decorations",void 0),this.decorations=this.getDecorations(n)}return S()(e,[{key:"update",value:function(e){e.docChanged&&(this.decorations=this.getDecorations(e.view))}},{key:"getDecorations",value:function(e){for(var n,t=new w.f_,a=e.state.doc.toString();null!==(n=U.exec(a));){var r=R.p.mark({class:L});t.add(n.index,n.index+n[0].length,r)}return t.finish()}}]),e}(),{decorations:function(e){return e.decorations}}),j=R.lg.fromClass(function(){function e(n){M()(this,e),O()(this,"decorations",void 0),this.decorations=this.getDecorations(n)}return S()(e,[{key:"update",value:function(e){e.docChanged&&(this.decorations=this.getDecorations(e.view))}},{key:"getDecorations",value:function(e){for(var n,t=new w.f_,a=e.state.doc.toString();null!==(n=Z.exec(a));){var r=R.p.mark({class:F});t.add(n.index,n.index+n[0].length,r)}return t.finish()}}]),e}(),{decorations:function(e){return e.decorations}}),V=R.lg.fromClass(function(){function e(n){M()(this,e),O()(this,"decorations",void 0),this.decorations=this.getDecorations(n)}return S()(e,[{key:"update",value:function(e){e.docChanged&&(this.decorations=this.getDecorations(e.view))}},{key:"getDecorations",value:function(e){for(var n,t=new w.f_,a=e.state.doc.toString();null!==(n=P.exec(a));){var r=R.p.mark({class:D});t.add(n.index,n.index+n[0].length,r)}return t.finish()}}]),e}(),{decorations:function(e){return e.decorations}}),z=R.tk.baseTheme({".system-log-info":{color:"#2196F3"},".system-warn-info":{color:"#FFB827"},".system-error-info":{color:"#FA5151"},".system-debug-info":{color:"#009A29"}}),G=t(52676),W=u.Z.RangePicker,B=function(e){var n=e.height,t=e.theme,a=(0,l.useRef)(null),c=(0,l.useRef)(),i=(0,l.useState)(["",""]),u=s()(i,2),N=u[0],_=u[1],M=(0,l.useState)(""),T=s()(M,2),S=T[0],A=T[1],O=(0,C.Z)((function(){return y.W.get("".concat(b.Z.apiPrefix,"system/log?startTime=").concat(N[0],"&endTime=").concat(N[1],"&limit=").concat(1048576),{responseType:"blob"})}),{refreshDeps:[N],onSuccess:function(e){return o()(r()().mark((function n(){return r()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.t0=A,n.next=3,e.text();case 3:n.t1=n.sent,(0,n.t0)(n.t1);case 5:case"end":return n.stop()}}),n)})))()}}),R=O.loading,w=O.refresh,I=function(e){a.current.scrollDOM.scrollTo({top:"start"===e?0:a.current.scrollDOM.scrollHeight})};return(0,G.jsxs)("div",{style:{position:"relative"},children:[(0,G.jsxs)("div",{children:[(0,G.jsx)(W,{style:{marginBottom:12,marginRight:12},disabledDate:function(e){return e>x()()||e<x()().subtract(7,"days")},defaultValue:[x()(),x()()],onOpenChange:function(e){c.current=!!e&&["",""]},onCalendarChange:function(e,n,t){var a=t.range;c.current&&"boolean"!=typeof c.current&&("start"===a&&(c.current[0]=n[0]),"end"===a&&(c.current[1]=n[1]),c.current[0]&&c.current[1]&&_(n))}}),(0,G.jsx)(p.Z,{onClick:function(){y.W.delete("".concat(b.Z.apiPrefix,"system/log")).then((function(e){m.ZP.success(f.ZP.get("删除成功")),w()}))},children:f.ZP.get("清空日志")})]}),S?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(d.ZP,{maxHeight:"".concat(n,"px"),value:S,onCreateEditor:function(e){a.current=e},extensions:[j,V,H,K,z],readOnly:!0,theme:t.includes("dark")?"dark":"light"}),(0,G.jsxs)("div",{style:{position:"absolute",bottom:20,right:20,display:"flex",flexDirection:"column",gap:10},children:[(0,G.jsx)(p.Z,{size:"small",icon:(0,G.jsx)(g.Z,{}),onClick:function(){I("start")}}),(0,G.jsx)(p.Z,{size:"small",icon:(0,G.jsx)(v.Z,{}),onClick:function(){I("end")}})]})]}):R?(0,G.jsx)(E.Z,{}):(0,G.jsx)(h.Z,{image:h.Z.PRESENTED_IMAGE_SIMPLE})]})}},28800:function(e,n,t){t.d(n,{F:function(){return i},Z:function(){return o}});var a=t(57904),r=t(82187),c=t.n(r);(0,t(86428).b)("warning","error","");function o(e,n,t){return c()((0,a.Z)((0,a.Z)((0,a.Z)((0,a.Z)((0,a.Z)({},"".concat(e,"-status-success"),"success"===n),"".concat(e,"-status-warning"),"warning"===n),"".concat(e,"-status-error"),"error"===n),"".concat(e,"-status-validating"),"validating"===n),"".concat(e,"-has-feedback"),t))}var i=function(e,n){return n||e}},98705:function(e,n,t){t.d(n,{Z:function(){return h}});var a=t(57904),r=t(2053),c=t(82187),o=t.n(c),i=t(75271),s=t(96820),f=t(76595),l=function(){var e=(0,i.useContext(s.E_).getPrefixCls)("empty-img-default");return i.createElement("svg",{className:e,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},i.createElement("g",{fill:"none",fillRule:"evenodd"},i.createElement("g",{transform:"translate(24 31.67)"},i.createElement("ellipse",{className:"".concat(e,"-ellipse"),cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),i.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"}),i.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)"}),i.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"}),i.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"})),i.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"}),i.createElement("g",{className:"".concat(e,"-g"),transform:"translate(149.65 15.383)"},i.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),i.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},d=function(){var e=(0,i.useContext(s.E_).getPrefixCls)("empty-img-simple");return i.createElement("svg",{className:e,width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},i.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},i.createElement("ellipse",{className:"".concat(e,"-ellipse"),cx:"32",cy:"33",rx:"32",ry:"7"}),i.createElement("g",{className:"".concat(e,"-g"),fillRule:"nonzero"},i.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"}),i.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")}))))},u=function(e,n){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&n.indexOf(a)<0&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)n.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(t[a[r]]=e[a[r]])}return t},m=i.createElement(l,null),p=i.createElement(d,null),E=function(e){var n=e.className,t=e.prefixCls,c=e.image,l=void 0===c?m:c,d=e.description,E=e.children,h=e.imageStyle,g=u(e,["className","prefixCls","image","description","children","imageStyle"]),v=i.useContext(s.E_),y=v.getPrefixCls,b=v.direction;return i.createElement(f.Z,{componentName:"Empty"},(function(e){var c=y("empty",t),s=void 0!==d?d:e.description,f="string"==typeof s?s:"empty",u=null;return u="string"==typeof l?i.createElement("img",{alt:f,src:l}):l,i.createElement("div",(0,r.Z)({className:o()(c,(0,a.Z)((0,a.Z)({},"".concat(c,"-normal"),l===p),"".concat(c,"-rtl"),"rtl"===b),n)},g),i.createElement("div",{className:"".concat(c,"-image"),style:h},u),s&&i.createElement("div",{className:"".concat(c,"-description")},s),E&&i.createElement("div",{className:"".concat(c,"-footer")},E))}))};E.PRESENTED_IMAGE_DEFAULT=m,E.PRESENTED_IMAGE_SIMPLE=p;var h=E},1260:function(e,n){var t={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 n=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||n>=t.F1&&n<=t.F12)return!1;switch(n){case t.ALT:case t.CAPS_LOCK:case t.CONTEXT_MENU:case t.CTRL:case t.DOWN:case t.END:case t.ESC:case t.HOME:case t.INSERT:case t.LEFT:case t.MAC_FF_META:case t.META:case t.NUMLOCK:case t.NUM_CENTER:case t.PAGE_DOWN:case t.PAGE_UP:case t.PAUSE:case t.PRINT_SCREEN:case t.RIGHT:case t.SHIFT:case t.UP:case t.WIN_KEY:case t.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=t.ZERO&&e<=t.NINE)return!0;if(e>=t.NUM_ZERO&&e<=t.NUM_MULTIPLY)return!0;if(e>=t.A&&e<=t.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case t.SPACE:case t.QUESTION_MARK:case t.NUM_PLUS:case t.NUM_MINUS:case t.NUM_PERIOD:case t.NUM_DIVISION:case t.SEMICOLON:case t.DASH:case t.EQUALS:case t.COMMA:case t.PERIOD:case t.SLASH:case t.APOSTROPHE:case t.SINGLE_QUOTE:case t.OPEN_SQUARE_BRACKET:case t.BACKSLASH:case t.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};n.Z=t}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[7953],{49385:function(e,t){"use strict";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){"use strict";var r=n(2053),a=n(75271),i=n(15618),o=n(48881),s=function(e,t){return a.createElement(o.Z,(0,r.Z)({},e,{ref:t,icon:i.Z}))},c=a.forwardRef(s);t.Z=c},15631:function(e,t,n){"use strict";var r=n(2053),a=n(75271),i=n(49385),o=n(48881),s=function(e,t){return a.createElement(o.Z,(0,r.Z)({},e,{ref:t,icon:i.Z}))},c=a.forwardRef(s);t.Z=c},86935:function(e,t,n){"use strict";var r=n(2053),a=n(75271),i=n(22260),o=n(48881),s=function(e,t){return a.createElement(o.Z,(0,r.Z)({},e,{ref:t,icon:i.Z}))},c=a.forwardRef(s);t.Z=c},88939:function(e,t,n){"use strict";var r=n(2053),a=n(75271),i=n(19579),o=n(48881),s=function(e,t){return a.createElement(o.Z,(0,r.Z)({},e,{ref:t,icon:i.Z}))},c=a.forwardRef(s);t.Z=c},28423:function(e,t,n){"use strict";var r=n(2053),a=n(75271),i=n(17338),o=n(48881),s=function(e,t){return a.createElement(o.Z,(0,r.Z)({},e,{ref:t,icon:i.Z}))},c=a.forwardRef(s);t.Z=c},97953:function(e,t,n){"use strict";var r=n(2053),a=n(75271),i=n(38930),o=n(48881),s=function(e,t){return a.createElement(o.Z,(0,r.Z)({},e,{ref:t,icon:i.Z}))},c=a.forwardRef(s);t.Z=c},56958:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(2053),a=n(75271),i={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),s=function(e,t){return a.createElement(o.Z,(0,r.Z)({},e,{ref:t,icon:i}))};var c=a.forwardRef(s)},1704:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(2053),a=n(75271),i={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),s=function(e,t){return a.createElement(o.Z,(0,r.Z)({},e,{ref:t,icon:i}))};var c=a.forwardRef(s)},30502:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(75271);var a=r["undefined"!=typeof document&&void 0!==document.createElement?"useLayoutEffect":"useEffect"];var i=e=>{const t=r.useRef(e);return r.useEffect((()=>{t.current=e})),t};function o(){}let s;const c=e=>s||(s=function(e){let t=!1,n=[];const r=new Map,a=new(e||window.ResizeObserver)(((e,a)=>{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 i=r.get(n[t].target);null==i||i.forEach((e=>e(n[t],a)))}n=[],t=!1})),t=!0}));return{observer:a,subscribe(e,t){var n;a.observe(e);const i=null!==(n=r.get(e))&&void 0!==n?n:[];i.push(t),r.set(e,i)},unsubscribe(e,t){var n;const i=null!==(n=r.get(e))&&void 0!==n?n:[];if(1===i.length)return a.unobserve(e),void r.delete(e);const o=i.indexOf(t);-1!==o&&i.splice(o,1),r.set(e,i)}}}(e));var l=function(e,t,n={}){const r=c(n.polyfill),s=i(t);return a((()=>{let t=!1;const n=e&&"current"in e?e.current:e;if(!n)return o;function a(e,n){t||s.current(e,n)}return r.subscribe(n,a),()=>{t=!0,r.unsubscribe(n,a)}}),[e,r,s]),r.observer}},72439:function(e,t,n){"use strict";var r=n(48305),a=n.n(r),i=n(75271),o=n(30502),s=n(48916);t.Z=function(e,t){var n=(0,i.useState)(0),r=a()(n,2),c=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,s.W9)({extraHeight:t,target:n}))})),c}},95921:function(e,t,n){"use strict";n.r(t),n.d(t,{IntervalSchedule:function(){return W},SubscriptionStatus:function(){return B},SubscriptionType:function(){return L},default:function(){return H}});var r=n(15558),a=n.n(r),i=n(48305),o=n.n(i),s=n(26068),c=n.n(s),l=n(72317),u=n(75271),d=n(50691),f=n(17082),p=n(47667),h=n(63505),g=n(22901),Z=n(32253),m=n(61508),v=n(85950),x=n(93481),b=n(17355),P=n(15631),y=n(56958),j=n(86935),k=n(28423),w=n(44084),C=n(1704),S=n(88939),E=n(97953),I=n(3475),O=n(47508),R=n(56212),_=n(23191),N=n(98783),T=n(1558),F=n(72439),z=n(65814),A=n(52676),q=d.Z.Text,V=d.Z.Paragraph,D=f.Z.Search,B=function(e){return e[e.running=0]="running",e[e.idle=1]="idle",e[e.disabled=2]="disabled",e[e.queued=3]="queued",e}({}),W=function(e){return e.days="天",e.hours="时",e.minutes="分",e.seconds="秒",e}({}),L=function(e){return e["private-repo"]="私有仓库",e["public-repo"]="公开仓库",e.file="单文件",e}({}),H=function(){var e=(0,N.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,A.jsx)(V,{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 L[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,a=n.value;return"每".concat(a).concat(W[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,A.jsxs)(A.Fragment,{children:[(!t.is_disabled||t.status!==B.idle)&&(0,A.jsxs)(A.Fragment,{children:[t.status===B.idle&&(0,A.jsx)(p.Z,{icon:(0,A.jsx)(P.Z,{}),color:"default",children:l.ZP.get("空闲中")}),t.status===B.running&&(0,A.jsx)(p.Z,{icon:(0,A.jsx)(y.Z,{spin:!0}),color:"processing",children:l.ZP.get("运行中")})]}),1===t.is_disabled&&t.status===B.idle&&(0,A.jsx)(p.Z,{icon:(0,A.jsx)(j.Z,{}),color:"error",children:l.ZP.get("已禁用")})]})}},{title:l.ZP.get("操作"),key:"action",width:140,render:function(e,t,n){return(0,A.jsxs)(h.Z,{size:"middle",children:[t.status===B.idle&&(0,A.jsx)("a",{onClick:function(e){e.stopPropagation(),we(t,n)},children:l.ZP.get("运行")}),t.status!==B.idle&&(0,A.jsx)("a",{onClick:function(e){e.stopPropagation(),Ce(t,n)},children:l.ZP.get("停止")}),(0,A.jsx)("a",{onClick:function(e){e.stopPropagation(),Pe(c()(c()({},t),{},{timestamp:Date.now()}))},children:l.ZP.get("日志")}),(0,A.jsx)(Ee,{record:t,index:n},"more")]})}}],i=(0,u.useState)([]),s=o()(i,2),d=s[0],f=s[1],H=(0,u.useState)(!0),K=o()(H,2),M=K[0],G=K[1],$=(0,u.useState)(!1),J=o()($,2),U=J[0],Y=J[1],Q=(0,u.useState)(),X=o()(Q,2),ee=X[0],te=X[1],ne=(0,u.useState)(""),re=o()(ne,2),ae=re[0],ie=re[1],oe=(0,u.useState)(1),se=o()(oe,2),ce=se[0],le=se[1],ue=(0,u.useState)(20),de=o()(ue,2),fe=de[0],pe=de[1],he=(0,u.useState)(!1),ge=o()(he,2),Ze=ge[0],me=ge[1],ve=(0,u.useState)(),xe=o()(ve,2),be=xe[0],Pe=xe[1],ye=(0,u.useRef)(null),je=(0,F.Z)(ye),ke=(0,u.useRef)(!1),we=function(e,t){g.Z.confirm({title:l.ZP.get("确认运行"),content:(0,A.jsxs)(A.Fragment,{children:[l.ZP.get("确认运行定时任务")," ",(0,A.jsx)(q,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",l.ZP.get("吗")]}),onOk:function(){R.W.put("".concat(I.Z.apiPrefix,"subscriptions/run"),[e.id]).then((function(t){var n=t.code;t.data;if(200===n){var r=a()(d),i=r.findIndex((function(t){return t.id===e.id}));-1!==i&&(r.splice(i,1,c()(c()({},e),{},{status:B.running})),f(r))}}))}})},Ce=function(e,t){g.Z.confirm({title:l.ZP.get("确认停止"),content:(0,A.jsxs)(A.Fragment,{children:[l.ZP.get("确认停止定时任务")," ",(0,A.jsx)(q,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",l.ZP.get("吗")]}),onOk:function(){R.W.put("".concat(I.Z.apiPrefix,"subscriptions/stop"),[e.id]).then((function(t){var n=t.code;t.data;if(200===n){var r=a()(d),i=r.findIndex((function(t){return t.id===e.id}));-1!==i&&(r.splice(i,1,c()(c()({},e),{},{pid:null,status:B.idle})),f(r))}}))}})},Se=function(e){ke.current=e.target.checked},Ee=function(e){var t=e.record,n=e.index;return(0,A.jsx)(v.Z,{placement:"bottomRight",trigger:["click"],menu:{items:[{label:l.ZP.get("编辑"),key:"edit",icon:(0,A.jsx)(k.Z,{})},{label:1===t.is_disabled?l.ZP.get("启用"):l.ZP.get("禁用"),key:"enableOrDisable",icon:1===t.is_disabled?(0,A.jsx)(w.Z,{}):(0,A.jsx)(C.Z,{})},{label:l.ZP.get("删除"),key:"delete",icon:(0,A.jsx)(S.Z,{})}],onClick:function(e){var r=e.key;e.domEvent.stopPropagation(),Ie(r,t,n)}},children:(0,A.jsx)("a",{onClick:function(e){return e.stopPropagation()},children:(0,A.jsx)(E.Z,{})})})},Ie=function(e,t,n){switch(e){case"edit":!function(e,t){te(e),Y(!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,A.jsxs)(A.Fragment,{children:[l.ZP.get("确认"),1===e.is_disabled?l.ZP.get("启用"):l.ZP.get("禁用"),l.ZP.get("定时订阅")," ",(0,A.jsx)(q,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",l.ZP.get("吗")]}),onOk:function(){R.W.put("".concat(I.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,i=a()(d),o=i.findIndex((function(t){return t.id===e.id}));-1!==o&&(i.splice(o,1,c()(c()({},e),{},{is_disabled:r})),f(i))}}))}})}(t);break;case"delete":!function(e,t){g.Z.confirm({title:l.ZP.get("确认删除"),content:(0,A.jsxs)(A.Fragment,{children:[l.ZP.get("确认删除定时订阅")," ",(0,A.jsx)(q,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",l.ZP.get("吗"),(0,A.jsx)("div",{style:{marginTop:20},children:(0,A.jsx)(Z.Z,{onChange:Se,children:l.ZP.get("同时删除关联任务和脚本")})})]}),onOk:function(){R.W.delete("".concat(I.Z.apiPrefix,"subscriptions"),{data:[e.id],params:{force:ke.current}}).then((function(t){var n=t.code;if(t.data,200===n){m.ZP.success(l.ZP.get("删除成功"));var r=a()(d),i=r.findIndex((function(t){return t.id===e.id}));-1!==i&&(r.splice(i,1),f(r))}}))}})}(t)}},Oe=function(e){var t=d.findIndex((function(t){return t.id===e.id})),n=a()(d);-1===t?n.unshift(e):n.splice(t,1,c()({},e)),f(n)},Re=(0,u.useCallback)((function(e){e.message;var t=e.references;f((function(e){for(var n=a()(e),r=function(r){var a=e.findIndex((function(e){return e.id===t[r]}));-1!==a&&n.splice(a,1,c()(c()({},e[a]),{},{status:B.idle}))},i=0;i<t.length;i++)r(i);return n}))}),[]);return(0,u.useEffect)((function(){var e=z.Z.getInstance();return e.subscribe("runSubscriptionEnd",Re),function(){e.unsubscribe("runSubscriptionEnd",Re)}}),[]),(0,u.useEffect)((function(){be&&(localStorage.setItem("logSubscription",be.id),me(!0))}),[be]),(0,u.useEffect)((function(){G(!0),R.W.get("".concat(I.Z.apiPrefix,"subscriptions?searchValue=").concat(ae)).then((function(e){var t=e.code,n=e.data;200===t&&(f(n),le(1))})).finally((function(){return G(!1)}))}),[ae]),(0,u.useEffect)((function(){pe(parseInt(localStorage.getItem("pageSize")||"20"))}),[]),(0,A.jsxs)(O.ZP,{className:"ql-container-wrapper subscriptiontab-wrapper",title:l.ZP.get("订阅管理"),extra:[(0,A.jsx)(D,{placeholder:l.ZP.get("请输入名称或者关键词"),style:{width:"auto"},enterButton:!0,allowClear:!0,loading:M,onSearch:function(e){ie(e.trim())}}),(0,A.jsx)(x.Z,{type:"primary",onClick:function(){return te(null),void Y(!0)},children:l.ZP.get("创建订阅")},"2")],header:{style:t},children:[(0,A.jsx)(b.Z,{ref:ye,columns:r,pagination:{current:ce,onChange:function(e,t){le(e),pe(t),localStorage.setItem("pageSize",t+"")},pageSize:fe,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:d,rowKey:"id",size:"middle",scroll:{x:1e3,y:je},loading:M,rowClassName:function(e,t){return e.isPinned?"pinned-subscription subscription":"subscription"}}),U&&(0,A.jsx)(_.default,{handleCancel:function(e){Y(!1),e&&Oe(e)},subscription:ee}),Ze&&(0,A.jsx)(T.default,{handleCancel:function(){me(!1)},subscription:be})]})}},1558:function(e,t,n){"use strict";n.r(t);var r=n(48305),a=n.n(r),i=n(72317),o=n(75271),s=n(22901),c=n(93481),l=n(56212),u=n(3475),d=n(56958),f=n(44084),p=n(34014),h=n(48916),g=n(78060),Z=n.n(g),m=n(52676);t.default=function(e){var t=e.subscription,n=e.handleCancel,r=e.data,g=e.logUrl,v=(0,o.useState)(i.ZP.get("启动中...")),x=a()(v,2),b=x[0],P=x[1],y=(0,o.useState)(!0),j=a()(y,2),k=j[0],w=j[1],C=(0,o.useState)(!0),S=a()(C,2),E=S[0],I=S[1],O=(0,o.useState)(!1),R=a()(O,2),_=R[0],N=R[1],T=function e(n){n&&w(!0),l.W.get(g||"".concat(u.Z.apiPrefix,"subscriptions/").concat(t.id,"/log")).then((function(n){var r=n.code,a=n.data;if(200===r&&localStorage.getItem("logSubscription")===String(t.id)){var o=a;P(o||i.ZP.get("暂无日志")),I(o&&!(0,h.x$)(o)),o&&!(0,h.x$)(o)&&setTimeout((function(){e()}),2e3)}})).finally((function(){n&&w(!1)}))},F=function(){localStorage.removeItem("logSubscription"),n()};return(0,o.useEffect)((function(){t&&t.id&&T(!0)}),[t]),(0,o.useEffect)((function(){r&&P(r)}),[r]),(0,o.useEffect)((function(){N(document.body.clientWidth<768)}),[]),(0,m.jsx)(s.Z,{title:(0,m.jsxs)(m.Fragment,{children:[(E||k)&&(0,m.jsx)(d.Z,{spin:!0}),!E&&!k&&(0,m.jsx)(f.Z,{}),(0,m.jsx)("span",{style:{marginLeft:5},children:t&&t.name})]}),open:!0,centered:!0,className:"log-modal",forceRender:!0,onOk:function(){return F()},onCancel:function(){return F()},footer:[(0,m.jsx)(c.Z,{type:"primary",onClick:function(){return F()},children:i.ZP.get("知道了")})],children:(0,m.jsx)("div",{className:"log-container",children:k?(0,m.jsx)(p.Z,{}):(0,m.jsx)("pre",{style:_?{fontFamily:"Source Code Pro",zoom:.83}:{},children:(0,m.jsx)(Z(),{children:b})})})})}},23191:function(e,t,n){"use strict";n.r(t);var r=n(335),a=n.n(r),i=n(90228),o=n.n(i),s=n(26068),c=n.n(s),l=n(87999),u=n.n(l),d=n(48305),f=n.n(d),p=n(72317),h=n(75271),g=n(35181),Z=n(72338),m=n(61508),v=n(17082),x=n(56646),b=n(22901),P=n(94747),y=n(9171),j=n(56212),k=n(3475),w=n(91379),C=n.n(w),S=n(46207),E=n.n(S),I=n(52676),O=g.Z.Option,R=/([^\/\:]+\/[^\/]+)(?=\.git)/,_=/([^\/\:]+\/[^\/\.]+)\.[a-z]+(\?[^\s]*)?(#.*)?$/;t.default=function(e){var t,n=e.subscription,r=e.handleCancel,i=Z.Z.useForm(),s=f()(i,1)[0],l=(0,h.useState)(!1),d=f()(l,2),w=d[0],S=d[1],N=(0,h.useState)((null==n?void 0:n.type)||"public-repo"),T=f()(N,2),F=T[0],z=T[1],A=(0,h.useState)((null==n?void 0:n.schedule_type)||"crontab"),q=f()(A,2),V=q[0],D=q[1],B=(0,h.useState)((null==n?void 0:n.pull_type)||"ssh-key"),W=f()(B,2),L=W[0],H=W[1],K=function(){var e=u()(o()().mark((function e(t){var a,i,s,l,u;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return S(!0),a=n?"put":"post",i=c()(c()({},t),{},{autoAddCron:Boolean(t.autoAddCron),autoDelCron:Boolean(t.autoDelCron)}),n&&(i.id=n.id),e.prev=4,e.next=7,j.W[a]("".concat(k.Z.apiPrefix,"subscriptions"),i);case 7:s=e.sent,l=s.code,u=s.data,200===l&&(m.ZP.success(n?p.ZP.get("更新订阅成功"):p.ZP.get("创建订阅成功")),r(u)),S(!1),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),S(!1);case 17:case"end":return e.stop()}}),e,null,[[4,14]])})));return function(t){return e.apply(this,arguments)}}(),M=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:F,r="",a="file"===n?_:R;return a.test(e)&&(r=e.match(a)[1].replaceAll("/","_").replaceAll(".","_")),t&&(r=r+"_"+t),r},G=function(e){var t=e.value,n=e.onChange,r=(0,h.useState)("days"),a=f()(r,2),i=a[0],o=a[1],s=(0,h.useState)(),c=f()(s,2),l=c[0],u=c[1];return(0,h.useEffect)((function(){t&&(o(t.type),u(t.value))}),[t]),(0,I.jsxs)(v.Z.Group,{compact:!0,children:[(0,I.jsx)(x.Z,{addonBefore:p.ZP.get("每"),precision:0,min:1,value:l,style:{width:"calc(100% - 58px)"},onChange:function(e){u(e||1),e?null==n||n({type:i,value:e}):null==n||n(null)}}),(0,I.jsxs)(g.Z,{value:i,onChange:function(e){o(e),l&&l>0&&(null==n||n({type:e,value:l}))},children:[(0,I.jsx)(O,{value:"days",children:p.ZP.get("天")}),(0,I.jsx)(O,{value:"hours",children:p.ZP.get("时")}),(0,I.jsx)(O,{value:"minutes",children:p.ZP.get("分")}),(0,I.jsx)(O,{value:"seconds",children:p.ZP.get("秒")})]})]})},$=function(e){e.value,e.onChange;return"ssh-key"===e.type?(0,I.jsx)(Z.Z.Item,{name:["pull_option","private_key"],label:p.ZP.get("私钥"),rules:[{required:!0}],children:(0,I.jsx)(v.Z.TextArea,{rows:4,autoSize:{minRows:1,maxRows:6},placeholder:p.ZP.get("请输入私钥")})}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Z.Z.Item,{name:["pull_option","username"],label:p.ZP.get("用户名"),rules:[{required:!0}],children:(0,I.jsx)(v.Z,{placeholder:p.ZP.get("请输入认证用户名")})}),(0,I.jsx)(Z.Z.Item,{name:["pull_option","password"],tooltip:p.ZP.get("Github已不支持密码认证,请使用Token方式"),label:p.ZP.get("密码/Token"),rules:[{required:!0}],children:(0,I.jsx)(v.Z,{placeholder:p.ZP.get("请输入密码或者Token")})})]})},J=(0,h.useCallback)((function(e){var t=e.clipboardData.getData("text");if(t.startsWith("ql ")){var n=function(e){var t,n=[],r="",i=!1,o=!1,s=!1,c=a()(e);try{for(c.s();!(t=c.n()).done;){var l=t.value;if(i){if('"'===l){i=!1,s=!0;continue}r+=l}else if(o){if("'"===l){o=!1,s=!0;continue}r+=l}else'"'===l?(i=!0,s=!1):"'"===l?(o=!0,s=!1):" "===l||"\t"===l?(r||s)&&(n.push(r),r="",s=!1):(r+=l,s=!1)}}catch(e){c.e(e)}finally{c.f()}return(r||s)&&n.push(r),n}(t),r=n[1],i=n[2]||"",o=n[3]||"",c=n[4]||"",l=n[5]||"",u=n[6]||"",d=n[7]||"",f="raw"===r?"file":i.startsWith("http")?"public-repo":"private-repo";s.setFieldsValue({type:f,url:i,whitelist:o,blacklist:c,dependences:l,branch:u,extensions:d,alias:M(i,u,f)}),z(f)}}),[]),U=(0,h.useCallback)((function(e){var t=e.clipboardData.getData("text");(t.includes("ql repo")||t.includes("ql raw"))&&e.preventDefault()}),[]);return(0,h.useEffect)((function(){return window.addEventListener("paste",J),function(){window.removeEventListener("paste",J)}}),[]),(0,I.jsx)(b.Z,{title:n?p.ZP.get("编辑订阅"):p.ZP.get("创建订阅"),open:!0,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 r()},confirmLoading:w,children:(0,I.jsxs)(Z.Z,{form:s,name:"form_in_modal",layout:"vertical",initialValues:c()(c()({},n),(t=n,c()(c()({},t),{},{autoAddCron:!!E()(null==t?void 0:t.autoAddCron)||Boolean(null==t?void 0:t.autoAddCron),autoDelCron:!!E()(null==t?void 0:t.autoDelCron)||Boolean(null==t?void 0:t.autoDelCron)}))),children:[(0,I.jsx)(Z.Z.Item,{name:"name",label:p.ZP.get("名称"),rules:[{required:!0}],children:(0,I.jsx)(v.Z,{placeholder:p.ZP.get("支持拷贝 ql repo/raw 命令,粘贴导入"),onPaste:U})}),(0,I.jsx)(Z.Z.Item,{name:"type",label:p.ZP.get("类型"),rules:[{required:!0}],initialValue:"public-repo",children:(0,I.jsxs)(P.ZP.Group,{onChange:function(e){z(e.target.value);var t=s.getFieldValue("url"),n=s.getFieldValue("branch");s.setFieldsValue({alias:M(t,n,e.target.value)}),t&&s.validateFields(["url"])},children:[(0,I.jsx)(P.ZP,{value:"public-repo",children:p.ZP.get("公开仓库")}),(0,I.jsx)(P.ZP,{value:"private-repo",children:p.ZP.get("私有仓库")}),(0,I.jsx)(P.ZP,{value:"file",children:p.ZP.get("单文件")})]})}),(0,I.jsx)(Z.Z.Item,{name:"url",label:p.ZP.get("链接"),rules:[{required:!0},{pattern:"file"===F?_:R}],children:(0,I.jsx)(v.Z.TextArea,{autoSize:{minRows:1,maxRows:5},placeholder:p.ZP.get("请输入订阅链接"),onPaste:U,onChange:function(e){var t=s.getFieldValue("branch");s.setFieldsValue({alias:M(e.target.value,t)})}})}),"file"!==F&&(0,I.jsx)(Z.Z.Item,{name:"branch",label:p.ZP.get("分支"),children:(0,I.jsx)(v.Z,{placeholder:p.ZP.get("请输入分支"),onPaste:U,onChange:function(e){var t=s.getFieldValue("url");s.setFieldsValue({alias:M(t,e.target.value)})}})}),(0,I.jsx)(Z.Z.Item,{name:"alias",label:p.ZP.get("唯一值"),rules:[{required:!0,message:""}],tooltip:p.ZP.get("唯一值用于日志目录和私钥别名"),children:(0,I.jsx)(v.Z,{placeholder:p.ZP.get("自动生成"),disabled:!0})}),"private-repo"===F&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Z.Z.Item,{name:"pull_type",label:p.ZP.get("拉取方式"),initialValue:"ssh-key",rules:[{required:!0}],children:(0,I.jsxs)(P.ZP.Group,{onChange:function(e){H(e.target.value)},children:[(0,I.jsx)(P.ZP,{value:"ssh-key",children:p.ZP.get("私钥")}),(0,I.jsx)(P.ZP,{value:"user-pwd",children:p.ZP.get("用户名密码/Token")})]})}),(0,I.jsx)($,{type:L})]}),(0,I.jsx)(Z.Z.Item,{name:"schedule_type",label:p.ZP.get("定时类型"),initialValue:"crontab",rules:[{required:!0}],children:(0,I.jsxs)(P.ZP.Group,{onChange:function(e){D(e.target.value),s.setFieldsValue({schedule:""})},children:[(0,I.jsx)(P.ZP,{value:"crontab",children:"crontab"}),(0,I.jsx)(P.ZP,{value:"interval",children:"interval"})]})}),(0,I.jsx)(Z.Z.Item,{name:"crontab"===V?"schedule":"interval_schedule",label:p.ZP.get("定时规则"),rules:[{required:!0},{validator:function(e,t){try{return"interval"===V||!t||C().parse(t).hasNext()?Promise.resolve():Promise.reject(p.ZP.get("Subscription表达式格式有误"))}catch(e){return Promise.reject(p.ZP.get("Subscription表达式格式有误"))}}}],children:"interval"===V?(0,I.jsx)(G,{}):(0,I.jsx)(v.Z,{onPaste:U,placeholder:p.ZP.get("秒(可选) 分 时 天 月 周")})}),"file"!==F&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(Z.Z.Item,{name:"whitelist",label:p.ZP.get("白名单"),tooltip:p.ZP.get("多个关键词竖线分割,支持正则表达式"),children:(0,I.jsx)(v.Z.TextArea,{rows:4,autoSize:{minRows:1,maxRows:5},placeholder:p.ZP.get("请输入脚本筛选白名单关键词,多个关键词竖线分割"),onPaste:U})}),(0,I.jsx)(Z.Z.Item,{name:"blacklist",label:p.ZP.get("黑名单"),tooltip:p.ZP.get("多个关键词竖线分割,支持正则表达式"),children:(0,I.jsx)(v.Z.TextArea,{rows:4,autoSize:{minRows:1,maxRows:5},placeholder:p.ZP.get("请输入脚本筛选黑名单关键词,多个关键词竖线分割"),onPaste:U})}),(0,I.jsx)(Z.Z.Item,{name:"dependences",label:p.ZP.get("依赖文件"),tooltip:p.ZP.get("多个关键词竖线分割,支持正则表达式"),children:(0,I.jsx)(v.Z.TextArea,{rows:4,autoSize:{minRows:1,maxRows:5},placeholder:p.ZP.get("请输入脚本依赖文件关键词,多个关键词竖线分割"),onPaste:U})}),(0,I.jsx)(Z.Z.Item,{name:"extensions",label:p.ZP.get("文件后缀"),tooltip:p.ZP.get("仓库需要拉取的文件后缀,多个后缀空格分隔,默认使用配置文件中的RepoFileExtensions"),children:(0,I.jsx)(v.Z,{onPaste:U,placeholder:p.ZP.get("请输入文件后缀")})}),(0,I.jsx)(Z.Z.Item,{name:"sub_before",label:p.ZP.get("执行前"),tooltip:p.ZP.get("运行订阅前执行的命令,比如 cp/mv/python3 xxx.py/node xxx.js"),children:(0,I.jsx)(v.Z.TextArea,{onPaste:U,rows:4,autoSize:{minRows:1,maxRows:5},placeholder:p.ZP.get("请输入运行订阅前要执行的命令")})}),(0,I.jsx)(Z.Z.Item,{name:"sub_after",label:p.ZP.get("执行后"),tooltip:p.ZP.get("运行订阅后执行的命令,比如 cp/mv/python3 xxx.py/node xxx.js"),children:(0,I.jsx)(v.Z.TextArea,{onPaste:U,rows:4,autoSize:{minRows:1,maxRows:5},placeholder:p.ZP.get("请输入运行订阅后要执行的命令")})})]}),(0,I.jsx)(Z.Z.Item,{name:"proxy",label:p.ZP.get("代理"),tooltip:p.ZP.get("公开仓库支持HTTP/SOCK5代理,私有仓库支持SOCK5代理"),children:(0,I.jsx)(v.Z,{onPaste:U,placeholder:"private-repo"===F?"SOCK5代理,例如 IP:PORT":"HTTP/SOCK5代理,例如 http://127.0.0.1:1080"})}),(0,I.jsxs)(Z.Z.Item,{style:{marginBottom:0},className:"inline-form-item",children:[(0,I.jsx)(Z.Z.Item,{name:"autoAddCron",label:p.ZP.get("自动添加任务"),valuePropName:"checked",initialValue:!0,children:(0,I.jsx)(y.Z,{})}),(0,I.jsx)(Z.Z.Item,{name:"autoDelCron",label:p.ZP.get("自动删除任务"),valuePropName:"checked",initialValue:!0,children:(0,I.jsx)(y.Z,{})})]})]})})}},65814:function(e,t,n){"use strict";var r=n(15558),a=n.n(r),i=n(67825),o=n.n(i),s=n(90228),c=n.n(s),l=n(87999),u=n.n(l),d=n(25298),f=n.n(d),p=n(17069),h=n.n(p),g=n(82092),Z=n.n(g),m=n(78078),v=n.n(m),x=["type"],b=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};f()(this,e),Z()(this,"url",void 0),Z()(this,"socket",null),Z()(this,"subscriptions",new Map),Z()(this,"options",void 0),Z()(this,"reconnectAttempts",0),Z()(this,"heartbeatTimeout",null),Z()(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()(c()().mark((function e(){var t=this;return c()().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(v())(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()(c()().mark((function e(){var t;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((null===(t=this.socket)||void 0===t?void 0:t.readyState)===v().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)===v().OPEN&&this.socket.send(JSON.stringify(e))}},{key:"dispatchMessage",value:function(e){var t=e.type,n=o()(e,x),r=this.subscriptions.get(t)||new Set;a()(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)===v().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}();Z()(b,"instance",null),t.Z=b},9171:function(e,t,n){"use strict";n.d(t,{Z:function(){return P}});var r=n(2053),a=n(57904),i=n(24727),o=n(82187),s=n.n(o),c=n(99459),l=n(58006),u=n(75271),d=n(6522),f=n(1260),p=u.forwardRef((function(e,t){var n,r=e.prefixCls,i=void 0===r?"rc-switch":r,o=e.className,p=e.checked,h=e.defaultChecked,g=e.disabled,Z=e.loadingIcon,m=e.checkedChildren,v=e.unCheckedChildren,x=e.onClick,b=e.onChange,P=e.onKeyDown,y=(0,l.Z)(e,["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"]),j=(0,d.Z)(!1,{value:p,defaultValue:h}),k=(0,c.Z)(j,2),w=k[0],C=k[1];function S(e,t){var n=w;return g||(C(n=e),null==b||b(n,t)),n}var E=s()(i,o,(n={},(0,a.Z)(n,"".concat(i,"-checked"),w),(0,a.Z)(n,"".concat(i,"-disabled"),g),n));return u.createElement("button",Object.assign({},y,{type:"button",role:"switch","aria-checked":w,disabled:g,className:E,ref:t,onKeyDown:function(e){e.which===f.Z.LEFT?S(!1,e):e.which===f.Z.RIGHT&&S(!0,e),null==P||P(e)},onClick:function(e){var t=S(!w,e);null==x||x(t,e)}}),Z,u.createElement("span",{className:"".concat(i,"-inner")},w?m:v))}));p.displayName="Switch";var h=p,g=n(96820),Z=n(30107),m=n(38470),v=n(74244),x=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},b=u.forwardRef((function(e,t){var n=e.prefixCls,o=e.size,c=e.disabled,l=e.loading,d=e.className,f=void 0===d?"":d,p=x(e,["prefixCls","size","disabled","loading","className"]),b=u.useContext(g.E_),P=b.getPrefixCls,y=b.direction,j=u.useContext(m.Z),k=u.useContext(Z.Z),w=(null!=c?c:k)||l,C=P("switch",n),S=u.createElement("div",{className:"".concat(C,"-handle")},l&&u.createElement(i.Z,{className:"".concat(C,"-loading-icon")})),E=s()((0,a.Z)((0,a.Z)((0,a.Z)({},"".concat(C,"-small"),"small"===(o||j)),"".concat(C,"-loading"),l),"".concat(C,"-rtl"),"rtl"===y),f);return u.createElement(v.Z,{insertExtraNode:!0},u.createElement(h,(0,r.Z)({},p,{prefixCls:C,className:E,disabled:w,ref:t,loadingIcon:S})))}));b.__ANT_SWITCH=!0;var P=b},47667:function(e,t,n){"use strict";n.d(t,{Z:function(){return P}});var r=n(57904),a=n(2053),i=n(99459),o=n(32324),s=n(82187),c=n.n(s),l=n(2021),u=n(75271),d=n(96820),f=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 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=function(e){var t=e.prefixCls,n=e.className,i=e.checked,o=e.onChange,s=e.onClick,l=h(e,["prefixCls","className","checked","onChange","onClick"]),f=(0,u.useContext(d.E_).getPrefixCls)("tag",t),p=c()(f,(0,r.Z)((0,r.Z)({},"".concat(f,"-checkable"),!0),"".concat(f,"-checkable-checked"),i),n);return u.createElement("span",(0,a.Z)({},l,{className:p,onClick:function(e){null==o||o(!i),null==s||s(e)}}))},Z=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},m=new RegExp("^(".concat(f.Y.join("|"),")(-inverse)?$")),v=new RegExp("^(".concat(f.E.join("|"),")$")),x=function(e,t){var n=e.prefixCls,s=e.className,f=e.style,h=e.children,g=e.icon,x=e.color,b=e.onClose,P=e.closeIcon,y=e.closable,j=void 0!==y&&y,k=Z(e,["prefixCls","className","style","children","icon","color","onClose","closeIcon","closable"]),w=u.useContext(d.E_),C=w.getPrefixCls,S=w.direction,E=u.useState(!0),I=(0,i.Z)(E,2),O=I[0],R=I[1];u.useEffect((function(){"visible"in k&&R(k.visible)}),[k.visible]);var _=function(){return!!x&&(m.test(x)||v.test(x))},N=(0,a.Z)({backgroundColor:x&&!_()?x:void 0},f),T=_(),F=C("tag",n),z=c()(F,(0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)({},"".concat(F,"-").concat(x),T),"".concat(F,"-has-color"),x&&!T),"".concat(F,"-hidden"),!O),"".concat(F,"-rtl"),"rtl"===S),s),A=function(e){e.stopPropagation(),null==b||b(e),e.defaultPrevented||"visible"in k||R(!1)},q="onClick"in k||h&&"a"===h.type,V=(0,l.Z)(k,["visible"]),D=g||null,B=D?u.createElement(u.Fragment,null,D,u.createElement("span",null,h)):h,W=u.createElement("span",(0,a.Z)({},V,{ref:t,className:z,style:N}),B,j?P?u.createElement("span",{className:"".concat(F,"-close-icon"),onClick:A},P):u.createElement(o.Z,{className:"".concat(F,"-close-icon"),onClick:A}):null);return q?u.createElement(p.Z,null,W):W},b=u.forwardRef(x);b.CheckableTag=g;var P=b},46207:function(e){e.exports=function(e){return null==e}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[578],{75875:function(n,e,r){r.d(e,{iN:function(){return x},R_:function(){return s}});var a=r(96299),t=r(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 c(n){var e=n.r,r=n.g,t=n.b,o=(0,a.py)(e,r,t);return{h:360*o.h,s:o.s,v:o.v}}function i(n){var e=n.r,r=n.g,t=n.b;return"#".concat((0,a.vq)(e,r,t,!1))}function f(n,e,r){var a=r/100;return{r:(e.r-n.r)*a+n.r,g:(e.g-n.g)*a+n.g,b:(e.b-n.b)*a+n.b}}function d(n,e,r){var a;return(a=Math.round(n.h)>=60&&Math.round(n.h)<=240?r?Math.round(n.h)-2*e:Math.round(n.h)+2*e:r?Math.round(n.h)+2*e:Math.round(n.h)-2*e)<0?a+=360:a>=360&&(a-=360),a}function u(n,e,r){return 0===n.h&&0===n.s?n.s:((a=r?n.s-.16*e:4===e?n.s+.16:n.s+.05*e)>1&&(a=1),r&&5===e&&a>.1&&(a=.1),a<.06&&(a=.06),Number(a.toFixed(2)));var a}function l(n,e,r){var a;return(a=r?n.v+.05*e:n.v-.15*e)>1&&(a=1),Number(a.toFixed(2))}function s(n){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[],a=(0,t.uA)(n),s=5;s>0;s-=1){var p=c(a),b=i((0,t.uA)({h:d(p,s,!0),s:u(p,s,!0),v:l(p,s,!0)}));r.push(b)}r.push(i(a));for(var m=1;m<=4;m+=1){var v=c(a),y=i((0,t.uA)({h:d(v,m),s:u(v,m),v:l(v,m)}));r.push(y)}return"dark"===e.theme?o.map((function(n){var a=n.index,o=n.opacity;return i(f((0,t.uA)(e.backgroundColor||"#141414"),(0,t.uA)(r[a]),100*o))})):r}var p=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];p.primary=p[5];var b=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];b.primary=b[5];var m=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];m.primary=m[5];var v=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];v.primary=v[5];var y=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];y.primary=y[5];var g=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];g.primary=g[5];var h=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];h.primary=h[5];var C=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];C.primary=C[5];var x=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];x.primary=x[5];var Z=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];Z.primary=Z[5];var w=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];w.primary=w[5];var k=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];k.primary=k[5];var E=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];E.primary=E[5];var N=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];N.primary=N[5];var T=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];T.primary=T[5];var R=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];R.primary=R[5];var A=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];A.primary=A[5];var S=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];S.primary=S[5];var j=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];j.primary=j[5];var L=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];L.primary=L[5];var _=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];_.primary=_[5];var I=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];I.primary=I[5];var M=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];M.primary=M[5];var P=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];P.primary=P[5];var q=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];q.primary=q[5];var H=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];H.primary=H[5]},48881:function(n,e,r){r.d(e,{Z:function(){return x}});var a=r(2053),t=r(99459),o=r(57904),c=r(58006),i=r(75271),f=r(82187),d=r.n(f),u=r(75875),l=r(28771),s=r(98037),p=r(39765),b=["icon","className","onClick","style","primaryColor","secondaryColor"],m={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};var v=function(n){var e=n.icon,r=n.className,a=n.onClick,t=n.style,o=n.primaryColor,f=n.secondaryColor,d=(0,c.Z)(n,b),u=i.useRef(),l=m;if(o&&(l={primaryColor:o,secondaryColor:f||(0,p.pw)(o)}),(0,p.C3)(u),(0,p.Kp)((0,p.r)(e),"icon should be icon definiton, but got ".concat(e)),!(0,p.r)(e))return null;var v=e;return v&&"function"==typeof v.icon&&(v=(0,s.Z)((0,s.Z)({},v),{},{icon:v.icon(l.primaryColor,l.secondaryColor)})),(0,p.R_)(v.icon,"svg-".concat(v.name),(0,s.Z)((0,s.Z)({className:r,onClick:a,style:t,"data-icon":v.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},d),{},{ref:u}))};v.displayName="IconReact",v.getTwoToneColors=function(){return(0,s.Z)({},m)},v.setTwoToneColors=function(n){var e=n.primaryColor,r=n.secondaryColor;m.primaryColor=e,m.secondaryColor=r||(0,p.pw)(e),m.calculated=!!r};var y=v;function g(n){var e=(0,p.H9)(n),r=(0,t.Z)(e,2),a=r[0],o=r[1];return y.setTwoToneColors({primaryColor:a,secondaryColor:o})}var h=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];g(u.iN.primary);var C=i.forwardRef((function(n,e){var r=n.className,f=n.icon,u=n.spin,s=n.rotate,b=n.tabIndex,m=n.onClick,v=n.twoToneColor,g=(0,c.Z)(n,h),C=i.useContext(l.Z),x=C.prefixCls,Z=void 0===x?"anticon":x,w=C.rootClassName,k=d()(w,Z,(0,o.Z)((0,o.Z)({},"".concat(Z,"-").concat(f.name),!!f.name),"".concat(Z,"-spin"),!!u||"loading"===f.name),r),E=b;void 0===E&&m&&(E=-1);var N=s?{msTransform:"rotate(".concat(s,"deg)"),transform:"rotate(".concat(s,"deg)")}:void 0,T=(0,p.H9)(v),R=(0,t.Z)(T,2),A=R[0],S=R[1];return i.createElement("span",(0,a.Z)({role:"img","aria-label":f.name},g,{ref:e,tabIndex:E,onClick:m,className:k}),i.createElement(y,{icon:f,primaryColor:A,secondaryColor:S,style:N}))}));C.displayName="AntdIcon",C.getTwoToneColor=function(){var n=y.getTwoToneColors();return n.calculated?[n.primaryColor,n.secondaryColor]:n.primaryColor},C.setTwoToneColor=g;var x=C},28771:function(n,e,r){var a=(0,r(75271).createContext)({});e.Z=a},44084:function(n,e,r){var a=r(2053),t=r(75271),o=r(15618),c=r(48881),i=function(n,e){return t.createElement(c.Z,(0,a.Z)({},n,{ref:e,icon:o.Z}))},f=t.forwardRef(i);e.Z=f},56958:function(n,e,r){r.d(e,{Z:function(){return f}});var a=r(2053),t=r(75271),o={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 1024c-69.1 0-136.2-13.5-199.3-40.2C251.7 958 197 921 150 874c-47-47-84-101.7-109.8-162.7C13.5 648.2 0 581.1 0 512c0-19.9 16.1-36 36-36s36 16.1 36 36c0 59.4 11.6 117 34.6 171.3 22.2 52.4 53.9 99.5 94.3 139.9 40.4 40.4 87.5 72.2 139.9 94.3C395 940.4 452.6 952 512 952c59.4 0 117-11.6 171.3-34.6 52.4-22.2 99.5-53.9 139.9-94.3 40.4-40.4 72.2-87.5 94.3-139.9C940.4 629 952 571.4 952 512c0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.2C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3s-13.5 136.2-40.2 199.3C958 772.3 921 827 874 874c-47 47-101.8 83.9-162.7 109.7-63.1 26.8-130.2 40.3-199.3 40.3z"}}]},name:"loading-3-quarters",theme:"outlined"},c=r(48881),i=function(n,e){return t.createElement(c.Z,(0,a.Z)({},n,{ref:e,icon:o}))};var f=t.forwardRef(i)},39765:function(n,e,r){r.d(e,{R_:function(){return v},pw:function(){return y},r:function(){return b},H9:function(){return g},vD:function(){return h},C3:function(){return C},Kp:function(){return p}});var a=r(98037),t=r(24744),o=r(75875),c=r(61984);function i(n){var e;return null==n||null===(e=n.getRootNode)||void 0===e?void 0:e.call(n)}function f(n){return function(n){return i(n)instanceof ShadowRoot}(n)?i(n):null}var d=r(7432),u=r(75271),l=r(28771);function s(n){return n.replace(/-(.)/g,(function(n,e){return e.toUpperCase()}))}function p(n,e){(0,d.ZP)(n,"[@ant-design/icons] ".concat(e))}function b(n){return"object"===(0,t.Z)(n)&&"string"==typeof n.name&&"string"==typeof n.theme&&("object"===(0,t.Z)(n.icon)||"function"==typeof n.icon)}function m(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(n).reduce((function(e,r){var a=n[r];if("class"===r)e.className=a,delete e.class;else delete e[r],e[s(r)]=a;return e}),{})}function v(n,e,r){return r?u.createElement(n.tag,(0,a.Z)((0,a.Z)({key:e},m(n.attrs)),r),(n.children||[]).map((function(r,a){return v(r,"".concat(e,"-").concat(n.tag,"-").concat(a))}))):u.createElement(n.tag,(0,a.Z)({key:e},m(n.attrs)),(n.children||[]).map((function(r,a){return v(r,"".concat(e,"-").concat(n.tag,"-").concat(a))})))}function y(n){return(0,o.R_)(n)[0]}function g(n){return n?Array.isArray(n)?n:[n]:[]}var h={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},C=function(n){var e=(0,u.useContext)(l.Z),r=e.csp,a=e.prefixCls,t="\n.anticon {\n display: inline-flex;\n align-items: center;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";a&&(t=t.replace(/anticon/g,a)),(0,u.useEffect)((function(){var e=f(n.current);(0,c.hq)(t,"@ant-design-icons",{prepend:!0,csp:r,attachTo:e})}),[])}},1558:function(n,e,r){r.r(e);var a=r(48305),t=r.n(a),o=r(72317),c=r(75271),i=r(22901),f=r(93481),d=r(56212),u=r(3475),l=r(56958),s=r(44084),p=r(34014),b=r(48916),m=r(78060),v=r.n(m),y=r(52676);e.default=function(n){var e=n.subscription,r=n.handleCancel,a=n.data,m=n.logUrl,g=(0,c.useState)(o.ZP.get("启动中...")),h=t()(g,2),C=h[0],x=h[1],Z=(0,c.useState)(!0),w=t()(Z,2),k=w[0],E=w[1],N=(0,c.useState)(!0),T=t()(N,2),R=T[0],A=T[1],S=(0,c.useState)(!1),j=t()(S,2),L=j[0],_=j[1],I=function n(r){r&&E(!0),d.W.get(m||"".concat(u.Z.apiPrefix,"subscriptions/").concat(e.id,"/log")).then((function(r){var a=r.code,t=r.data;if(200===a&&localStorage.getItem("logSubscription")===String(e.id)){var c=t;x(c||o.ZP.get("暂无日志")),A(c&&!(0,b.x$)(c)),c&&!(0,b.x$)(c)&&setTimeout((function(){n()}),2e3)}})).finally((function(){r&&E(!1)}))},M=function(){localStorage.removeItem("logSubscription"),r()};return(0,c.useEffect)((function(){e&&e.id&&I(!0)}),[e]),(0,c.useEffect)((function(){a&&x(a)}),[a]),(0,c.useEffect)((function(){_(document.body.clientWidth<768)}),[]),(0,y.jsx)(i.Z,{title:(0,y.jsxs)(y.Fragment,{children:[(R||k)&&(0,y.jsx)(l.Z,{spin:!0}),!R&&!k&&(0,y.jsx)(s.Z,{}),(0,y.jsx)("span",{style:{marginLeft:5},children:e&&e.name})]}),open:!0,centered:!0,className:"log-modal",forceRender:!0,onOk:function(){return M()},onCancel:function(){return M()},footer:[(0,y.jsx)(f.Z,{type:"primary",onClick:function(){return M()},children:o.ZP.get("知道了")})],children:(0,y.jsx)("div",{className:"log-container",children:k?(0,y.jsx)(p.Z,{}):(0,y.jsx)("pre",{style:L?{fontFamily:"Source Code Pro",zoom:.83}:{},children:(0,y.jsx)(v(),{children:C})})})})}},21485:function(n,e,r){r.d(e,{mL:function(){return f},q0:function(){return i}});var a=function(){return{height:0,opacity:0}},t=function(n){return{height:n.scrollHeight,opacity:1}},o=function(n,e){return!0===(null==e?void 0:e.deadline)||"height"===e.propertyName},c={motionName:"ant-motion-collapse",onAppearStart:a,onEnterStart:a,onAppearActive:t,onEnterActive:t,onLeaveStart:function(n){return{height:n?n.offsetHeight:0}},onLeaveActive:a,onAppearEnd:o,onEnterEnd:o,onLeaveEnd:o,motionDeadline:500},i=((0,r(86428).b)("bottomLeft","bottomRight","topLeft","topRight"),function(n){return void 0===n||"topLeft"!==n&&"topRight"!==n?"slide-up":"slide-down"}),f=function(n,e,r){return void 0!==r?r:"".concat(n,"-").concat(e)};e.ZP=c}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[73,2096],{23191:function(e,t,n){"use strict";n.r(t);var a=n(335),l=n.n(a),o=n(90228),r=n.n(o),i=n(26068),s=n.n(i),c=n(87999),u=n.n(c),d=n(48305),p=n.n(d),m=n(72317),f=n(75271),h=n(35181),Z=n(72338),v=n(61508),x=n(17082),g=n(56646),b=n(22901),P=n(94747),C=n(9171),y=n(56212),w=n(3475),j=n(91379),k=n.n(j),O=n(46207),I=n.n(O),E=n(52676),_=h.Z.Option,S=/([^\/\:]+\/[^\/]+)(?=\.git)/,N=/([^\/\:]+\/[^\/\.]+)\.[a-z]+(\?[^\s]*)?(#.*)?$/;t.default=function(e){var t,n=e.subscription,a=e.handleCancel,o=Z.Z.useForm(),i=p()(o,1)[0],c=(0,f.useState)(!1),d=p()(c,2),j=d[0],O=d[1],R=(0,f.useState)((null==n?void 0:n.type)||"public-repo"),F=p()(R,2),T=F[0],A=F[1],D=(0,f.useState)((null==n?void 0:n.schedule_type)||"crontab"),V=p()(D,2),q=V[0],M=V[1],z=(0,f.useState)((null==n?void 0:n.pull_type)||"ssh-key"),B=p()(z,2),H=B[0],L=B[1],W=function(){var e=u()(r()().mark((function e(t){var l,o,i,c,u;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return O(!0),l=n?"put":"post",o=s()(s()({},t),{},{autoAddCron:Boolean(t.autoAddCron),autoDelCron:Boolean(t.autoDelCron)}),n&&(o.id=n.id),e.prev=4,e.next=7,y.W[l]("".concat(w.Z.apiPrefix,"subscriptions"),o);case 7:i=e.sent,c=i.code,u=i.data,200===c&&(v.ZP.success(n?m.ZP.get("更新订阅成功"):m.ZP.get("创建订阅成功")),a(u)),O(!1),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),O(!1);case 17:case"end":return e.stop()}}),e,null,[[4,14]])})));return function(t){return e.apply(this,arguments)}}(),G=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:T,a="",l="file"===n?N:S;return l.test(e)&&(a=e.match(l)[1].replaceAll("/","_").replaceAll(".","_")),t&&(a=a+"_"+t),a},K=function(e){var t=e.value,n=e.onChange,a=(0,f.useState)("days"),l=p()(a,2),o=l[0],r=l[1],i=(0,f.useState)(),s=p()(i,2),c=s[0],u=s[1];return(0,f.useEffect)((function(){t&&(r(t.type),u(t.value))}),[t]),(0,E.jsxs)(x.Z.Group,{compact:!0,children:[(0,E.jsx)(g.Z,{addonBefore:m.ZP.get("每"),precision:0,min:1,value:c,style:{width:"calc(100% - 58px)"},onChange:function(e){u(e||1),e?null==n||n({type:o,value:e}):null==n||n(null)}}),(0,E.jsxs)(h.Z,{value:o,onChange:function(e){r(e),c&&c>0&&(null==n||n({type:e,value:c}))},children:[(0,E.jsx)(_,{value:"days",children:m.ZP.get("天")}),(0,E.jsx)(_,{value:"hours",children:m.ZP.get("时")}),(0,E.jsx)(_,{value:"minutes",children:m.ZP.get("分")}),(0,E.jsx)(_,{value:"seconds",children:m.ZP.get("秒")})]})]})},X=function(e){e.value,e.onChange;return"ssh-key"===e.type?(0,E.jsx)(Z.Z.Item,{name:["pull_option","private_key"],label:m.ZP.get("私钥"),rules:[{required:!0}],children:(0,E.jsx)(x.Z.TextArea,{rows:4,autoSize:{minRows:1,maxRows:6},placeholder:m.ZP.get("请输入私钥")})}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Z.Z.Item,{name:["pull_option","username"],label:m.ZP.get("用户名"),rules:[{required:!0}],children:(0,E.jsx)(x.Z,{placeholder:m.ZP.get("请输入认证用户名")})}),(0,E.jsx)(Z.Z.Item,{name:["pull_option","password"],tooltip:m.ZP.get("Github已不支持密码认证,请使用Token方式"),label:m.ZP.get("密码/Token"),rules:[{required:!0}],children:(0,E.jsx)(x.Z,{placeholder:m.ZP.get("请输入密码或者Token")})})]})},U=(0,f.useCallback)((function(e){var t=e.clipboardData.getData("text");if(t.startsWith("ql ")){var n=function(e){var t,n=[],a="",o=!1,r=!1,i=!1,s=l()(e);try{for(s.s();!(t=s.n()).done;){var c=t.value;if(o){if('"'===c){o=!1,i=!0;continue}a+=c}else if(r){if("'"===c){r=!1,i=!0;continue}a+=c}else'"'===c?(o=!0,i=!1):"'"===c?(r=!0,i=!1):" "===c||"\t"===c?(a||i)&&(n.push(a),a="",i=!1):(a+=c,i=!1)}}catch(e){s.e(e)}finally{s.f()}return(a||i)&&n.push(a),n}(t),a=n[1],o=n[2]||"",r=n[3]||"",s=n[4]||"",c=n[5]||"",u=n[6]||"",d=n[7]||"",p="raw"===a?"file":o.startsWith("http")?"public-repo":"private-repo";i.setFieldsValue({type:p,url:o,whitelist:r,blacklist:s,dependences:c,branch:u,extensions:d,alias:G(o,u,p)}),A(p)}}),[]),Q=(0,f.useCallback)((function(e){var t=e.clipboardData.getData("text");(t.includes("ql repo")||t.includes("ql raw"))&&e.preventDefault()}),[]);return(0,f.useEffect)((function(){return window.addEventListener("paste",U),function(){window.removeEventListener("paste",U)}}),[]),(0,E.jsx)(b.Z,{title:n?m.ZP.get("编辑订阅"):m.ZP.get("创建订阅"),open:!0,forceRender:!0,centered:!0,maskClosable:!1,onOk:function(){i.validateFields().then((function(e){W(e)})).catch((function(e){console.log("Validate Failed:",e)}))},onCancel:function(){return a()},confirmLoading:j,children:(0,E.jsxs)(Z.Z,{form:i,name:"form_in_modal",layout:"vertical",initialValues:s()(s()({},n),(t=n,s()(s()({},t),{},{autoAddCron:!!I()(null==t?void 0:t.autoAddCron)||Boolean(null==t?void 0:t.autoAddCron),autoDelCron:!!I()(null==t?void 0:t.autoDelCron)||Boolean(null==t?void 0:t.autoDelCron)}))),children:[(0,E.jsx)(Z.Z.Item,{name:"name",label:m.ZP.get("名称"),rules:[{required:!0}],children:(0,E.jsx)(x.Z,{placeholder:m.ZP.get("支持拷贝 ql repo/raw 命令,粘贴导入"),onPaste:Q})}),(0,E.jsx)(Z.Z.Item,{name:"type",label:m.ZP.get("类型"),rules:[{required:!0}],initialValue:"public-repo",children:(0,E.jsxs)(P.ZP.Group,{onChange:function(e){A(e.target.value);var t=i.getFieldValue("url"),n=i.getFieldValue("branch");i.setFieldsValue({alias:G(t,n,e.target.value)}),t&&i.validateFields(["url"])},children:[(0,E.jsx)(P.ZP,{value:"public-repo",children:m.ZP.get("公开仓库")}),(0,E.jsx)(P.ZP,{value:"private-repo",children:m.ZP.get("私有仓库")}),(0,E.jsx)(P.ZP,{value:"file",children:m.ZP.get("单文件")})]})}),(0,E.jsx)(Z.Z.Item,{name:"url",label:m.ZP.get("链接"),rules:[{required:!0},{pattern:"file"===T?N:S}],children:(0,E.jsx)(x.Z.TextArea,{autoSize:{minRows:1,maxRows:5},placeholder:m.ZP.get("请输入订阅链接"),onPaste:Q,onChange:function(e){var t=i.getFieldValue("branch");i.setFieldsValue({alias:G(e.target.value,t)})}})}),"file"!==T&&(0,E.jsx)(Z.Z.Item,{name:"branch",label:m.ZP.get("分支"),children:(0,E.jsx)(x.Z,{placeholder:m.ZP.get("请输入分支"),onPaste:Q,onChange:function(e){var t=i.getFieldValue("url");i.setFieldsValue({alias:G(t,e.target.value)})}})}),(0,E.jsx)(Z.Z.Item,{name:"alias",label:m.ZP.get("唯一值"),rules:[{required:!0,message:""}],tooltip:m.ZP.get("唯一值用于日志目录和私钥别名"),children:(0,E.jsx)(x.Z,{placeholder:m.ZP.get("自动生成"),disabled:!0})}),"private-repo"===T&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Z.Z.Item,{name:"pull_type",label:m.ZP.get("拉取方式"),initialValue:"ssh-key",rules:[{required:!0}],children:(0,E.jsxs)(P.ZP.Group,{onChange:function(e){L(e.target.value)},children:[(0,E.jsx)(P.ZP,{value:"ssh-key",children:m.ZP.get("私钥")}),(0,E.jsx)(P.ZP,{value:"user-pwd",children:m.ZP.get("用户名密码/Token")})]})}),(0,E.jsx)(X,{type:H})]}),(0,E.jsx)(Z.Z.Item,{name:"schedule_type",label:m.ZP.get("定时类型"),initialValue:"crontab",rules:[{required:!0}],children:(0,E.jsxs)(P.ZP.Group,{onChange:function(e){M(e.target.value),i.setFieldsValue({schedule:""})},children:[(0,E.jsx)(P.ZP,{value:"crontab",children:"crontab"}),(0,E.jsx)(P.ZP,{value:"interval",children:"interval"})]})}),(0,E.jsx)(Z.Z.Item,{name:"crontab"===q?"schedule":"interval_schedule",label:m.ZP.get("定时规则"),rules:[{required:!0},{validator:function(e,t){try{return"interval"===q||!t||k().parse(t).hasNext()?Promise.resolve():Promise.reject(m.ZP.get("Subscription表达式格式有误"))}catch(e){return Promise.reject(m.ZP.get("Subscription表达式格式有误"))}}}],children:"interval"===q?(0,E.jsx)(K,{}):(0,E.jsx)(x.Z,{onPaste:Q,placeholder:m.ZP.get("秒(可选) 分 时 天 月 周")})}),"file"!==T&&(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(Z.Z.Item,{name:"whitelist",label:m.ZP.get("白名单"),tooltip:m.ZP.get("多个关键词竖线分割,支持正则表达式"),children:(0,E.jsx)(x.Z.TextArea,{rows:4,autoSize:{minRows:1,maxRows:5},placeholder:m.ZP.get("请输入脚本筛选白名单关键词,多个关键词竖线分割"),onPaste:Q})}),(0,E.jsx)(Z.Z.Item,{name:"blacklist",label:m.ZP.get("黑名单"),tooltip:m.ZP.get("多个关键词竖线分割,支持正则表达式"),children:(0,E.jsx)(x.Z.TextArea,{rows:4,autoSize:{minRows:1,maxRows:5},placeholder:m.ZP.get("请输入脚本筛选黑名单关键词,多个关键词竖线分割"),onPaste:Q})}),(0,E.jsx)(Z.Z.Item,{name:"dependences",label:m.ZP.get("依赖文件"),tooltip:m.ZP.get("多个关键词竖线分割,支持正则表达式"),children:(0,E.jsx)(x.Z.TextArea,{rows:4,autoSize:{minRows:1,maxRows:5},placeholder:m.ZP.get("请输入脚本依赖文件关键词,多个关键词竖线分割"),onPaste:Q})}),(0,E.jsx)(Z.Z.Item,{name:"extensions",label:m.ZP.get("文件后缀"),tooltip:m.ZP.get("仓库需要拉取的文件后缀,多个后缀空格分隔,默认使用配置文件中的RepoFileExtensions"),children:(0,E.jsx)(x.Z,{onPaste:Q,placeholder:m.ZP.get("请输入文件后缀")})}),(0,E.jsx)(Z.Z.Item,{name:"sub_before",label:m.ZP.get("执行前"),tooltip:m.ZP.get("运行订阅前执行的命令,比如 cp/mv/python3 xxx.py/node xxx.js"),children:(0,E.jsx)(x.Z.TextArea,{onPaste:Q,rows:4,autoSize:{minRows:1,maxRows:5},placeholder:m.ZP.get("请输入运行订阅前要执行的命令")})}),(0,E.jsx)(Z.Z.Item,{name:"sub_after",label:m.ZP.get("执行后"),tooltip:m.ZP.get("运行订阅后执行的命令,比如 cp/mv/python3 xxx.py/node xxx.js"),children:(0,E.jsx)(x.Z.TextArea,{onPaste:Q,rows:4,autoSize:{minRows:1,maxRows:5},placeholder:m.ZP.get("请输入运行订阅后要执行的命令")})})]}),(0,E.jsx)(Z.Z.Item,{name:"proxy",label:m.ZP.get("代理"),tooltip:m.ZP.get("公开仓库支持HTTP/SOCK5代理,私有仓库支持SOCK5代理"),children:(0,E.jsx)(x.Z,{onPaste:Q,placeholder:"private-repo"===T?"SOCK5代理,例如 IP:PORT":"HTTP/SOCK5代理,例如 http://127.0.0.1:1080"})}),(0,E.jsxs)(Z.Z.Item,{style:{marginBottom:0},className:"inline-form-item",children:[(0,E.jsx)(Z.Z.Item,{name:"autoAddCron",label:m.ZP.get("自动添加任务"),valuePropName:"checked",initialValue:!0,children:(0,E.jsx)(C.Z,{})}),(0,E.jsx)(Z.Z.Item,{name:"autoDelCron",label:m.ZP.get("自动删除任务"),valuePropName:"checked",initialValue:!0,children:(0,E.jsx)(C.Z,{})})]})]})})}},92767:function(e,t,n){"use strict";function a(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 a}})},94747:function(e,t,n){"use strict";n.d(t,{ZP:function(){return S}});var a=n(2053),l=n(57904),o=n(99459),r=n(82187),i=n.n(r),s=n(6522),c=n(75271),u=n(96820),d=n(38470),p=n(92767),m=c.createContext(null),f=m.Provider,h=m,Z=c.createContext(null),v=Z.Provider,x=n(46206),g=n(3083),b=n(30107),P=n(5663),C=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(a=Object.getOwnPropertySymbols(e);l<a.length;l++)t.indexOf(a[l])<0&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(n[a[l]]=e[a[l]])}return n},y=function(e,t){var n,o,r=c.useContext(h),s=c.useContext(Z),d=c.useContext(u.E_),p=d.getPrefixCls,m=d.direction,f=c.useRef(),v=(0,g.sQ)(t,f),y=(0,c.useContext)(P.aM).isFormItemInput,w=e.prefixCls,j=e.className,k=e.children,O=e.style,I=C(e,["prefixCls","className","children","style"]),E=p("radio",w),_="button"===((null==r?void 0:r.optionType)||s)?"".concat(E,"-button"):E,S=(0,a.Z)({},I),N=c.useContext(b.Z);r&&(S.name=r.name,S.onChange=function(t){var n,a;null===(n=e.onChange)||void 0===n||n.call(e,t),null===(a=null==r?void 0:r.onChange)||void 0===a||a.call(r,t)},S.checked=e.value===r.value,S.disabled=null!==(n=S.disabled)&&void 0!==n?n:r.disabled),S.disabled=null!==(o=S.disabled)&&void 0!==o?o:N;var R=i()("".concat(_,"-wrapper"),(0,l.Z)((0,l.Z)((0,l.Z)((0,l.Z)({},"".concat(_,"-wrapper-checked"),S.checked),"".concat(_,"-wrapper-disabled"),S.disabled),"".concat(_,"-wrapper-rtl"),"rtl"===m),"".concat(_,"-wrapper-in-form-item"),y),j);return c.createElement("label",{className:R,style:O,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave},c.createElement(x.Z,(0,a.Z)({},S,{type:"radio",prefixCls:_,ref:v})),void 0!==k?c.createElement("span",null,k):null)};var w=c.forwardRef(y),j=c.forwardRef((function(e,t){var n=c.useContext(u.E_),r=n.getPrefixCls,m=n.direction,h=c.useContext(d.Z),Z=(0,s.Z)(e.defaultValue,{value:e.value}),v=(0,o.Z)(Z,2),x=v[0],g=v[1],b=e.prefixCls,P=e.className,C=void 0===P?"":P,y=e.options,j=e.buttonStyle,k=void 0===j?"outline":j,O=e.disabled,I=e.children,E=e.size,_=e.style,S=e.id,N=e.onMouseEnter,R=e.onMouseLeave,F=e.onFocus,T=e.onBlur,A=r("radio",b),D="".concat(A,"-group"),V=I;y&&y.length>0&&(V=y.map((function(e){return"string"==typeof e||"number"==typeof e?c.createElement(w,{key:e.toString(),prefixCls:A,disabled:O,value:e,checked:x===e},e):c.createElement(w,{key:"radio-group-value-options-".concat(e.value),prefixCls:A,disabled:e.disabled||O,value:e.value,checked:x===e.value,style:e.style},e.label)})));var q=E||h,M=i()(D,"".concat(D,"-").concat(k),(0,l.Z)((0,l.Z)({},"".concat(D,"-").concat(q),q),"".concat(D,"-rtl"),"rtl"===m),C);return c.createElement("div",(0,a.Z)({},(0,p.Z)(e),{className:M,style:_,onMouseEnter:N,onMouseLeave:R,onFocus:F,onBlur:T,id:S,ref:t}),c.createElement(f,{value:{onChange:function(t){var n=x,a=t.target.value;"value"in e||g(a);var l=e.onChange;l&&a!==n&&l(t)},value:x,disabled:e.disabled,name:e.name,optionType:e.optionType}},V))})),k=c.memo(j),O=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(a=Object.getOwnPropertySymbols(e);l<a.length;l++)t.indexOf(a[l])<0&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(n[a[l]]=e[a[l]])}return n},I=function(e,t){var n=c.useContext(u.E_).getPrefixCls,l=e.prefixCls,o=O(e,["prefixCls"]),r=n("radio",l);return c.createElement(v,{value:"button"},c.createElement(w,(0,a.Z)({prefixCls:r},o,{type:"radio",ref:t})))},E=c.forwardRef(I),_=w;_.Button=E,_.Group=k,_.__ANT_RADIO=!0;var S=_},35181:function(e,t,n){"use strict";var a=n(57904),l=n(2053),o=n(82187),r=n.n(o),i=n(77168),s=n(2021),c=n(75271),u=n(96820),d=n(83289),p=n(30107),m=n(38470),f=n(5663),h=n(21485),Z=n(28800),v=n(50528),x=n(81393),g=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(a=Object.getOwnPropertySymbols(e);l<a.length;l++)t.indexOf(a[l])<0&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(n[a[l]]=e[a[l]])}return n},b="SECRET_COMBOBOX_MODE_DO_NOT_USE",P=function(e,t){var n,o=e.prefixCls,P=e.bordered,C=void 0===P||P,y=e.className,w=e.getPopupContainer,j=e.dropdownClassName,k=e.popupClassName,O=e.listHeight,I=void 0===O?256:O,E=e.placement,_=e.listItemHeight,S=void 0===_?32:_,N=e.size,R=e.disabled,F=e.notFoundContent,T=e.status,A=e.showArrow,D=g(e,["prefixCls","bordered","className","getPopupContainer","dropdownClassName","popupClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","showArrow"]),V=c.useContext(u.E_),q=V.getPopupContainer,M=V.getPrefixCls,z=V.renderEmpty,B=V.direction,H=V.virtual,L=V.dropdownMatchSelectWidth,W=c.useContext(m.Z),G=M("select",o),K=M(),X=(0,x.ri)(G,B),U=X.compactSize,Q=X.compactItemClassnames,$=c.useMemo((function(){var e=D.mode;if("combobox"!==e)return e===b?"combobox":e}),[D.mode]),J="multiple"===$||"tags"===$,Y=void 0!==A?A:D.loading||!(J||"combobox"===$),ee=(0,c.useContext)(f.aM),te=ee.status,ne=ee.hasFeedback,ae=ee.isFormItemInput,le=ee.feedbackIcon,oe=(0,Z.F)(te,T);n=void 0!==F?F:"combobox"===$?null:(z||d.Z)("Select");var re=(0,v.Z)((0,l.Z)((0,l.Z)({},D),{multiple:J,hasFeedback:ne,feedbackIcon:le,showArrow:Y,prefixCls:G})),ie=re.suffixIcon,se=re.itemIcon,ce=re.removeIcon,ue=re.clearIcon,de=(0,s.Z)(D,["suffixIcon","itemIcon"]),pe=r()(k||j,(0,a.Z)({},"".concat(G,"-dropdown-").concat(B),"rtl"===B)),me=U||N||W,fe=c.useContext(p.Z),he=null!=R?R:fe,Ze=r()((0,a.Z)((0,a.Z)((0,a.Z)((0,a.Z)((0,a.Z)({},"".concat(G,"-lg"),"large"===me),"".concat(G,"-sm"),"small"===me),"".concat(G,"-rtl"),"rtl"===B),"".concat(G,"-borderless"),!C),"".concat(G,"-in-form-item"),ae),(0,Z.Z)(G,oe,ne),Q,y);return c.createElement(i.ZP,(0,l.Z)({ref:t,virtual:H,dropdownMatchSelectWidth:L},de,{transitionName:(0,h.mL)(K,(0,h.q0)(E),D.transitionName),listHeight:I,listItemHeight:S,mode:$,prefixCls:G,placement:void 0!==E?E:"rtl"===B?"bottomRight":"bottomLeft",direction:B,inputIcon:ie,menuItemSelectedIcon:se,removeIcon:ce,clearIcon:ue,notFoundContent:n,className:Ze,getPopupContainer:w||q,dropdownClassName:pe,showArrow:ne||A,disabled:he}))},C=c.forwardRef(P);C.SECRET_COMBOBOX_MODE_DO_NOT_USE=b,C.Option=i.Wx,C.OptGroup=i.Xo,t.Z=C},9171:function(e,t,n){"use strict";n.d(t,{Z:function(){return P}});var a=n(2053),l=n(57904),o=n(24727),r=n(82187),i=n.n(r),s=n(99459),c=n(58006),u=n(75271),d=n(6522),p=n(1260),m=u.forwardRef((function(e,t){var n,a=e.prefixCls,o=void 0===a?"rc-switch":a,r=e.className,m=e.checked,f=e.defaultChecked,h=e.disabled,Z=e.loadingIcon,v=e.checkedChildren,x=e.unCheckedChildren,g=e.onClick,b=e.onChange,P=e.onKeyDown,C=(0,c.Z)(e,["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"]),y=(0,d.Z)(!1,{value:m,defaultValue:f}),w=(0,s.Z)(y,2),j=w[0],k=w[1];function O(e,t){var n=j;return h||(k(n=e),null==b||b(n,t)),n}var I=i()(o,r,(n={},(0,l.Z)(n,"".concat(o,"-checked"),j),(0,l.Z)(n,"".concat(o,"-disabled"),h),n));return u.createElement("button",Object.assign({},C,{type:"button",role:"switch","aria-checked":j,disabled:h,className:I,ref:t,onKeyDown:function(e){e.which===p.Z.LEFT?O(!1,e):e.which===p.Z.RIGHT&&O(!0,e),null==P||P(e)},onClick:function(e){var t=O(!j,e);null==g||g(t,e)}}),Z,u.createElement("span",{className:"".concat(o,"-inner")},j?v:x))}));m.displayName="Switch";var f=m,h=n(96820),Z=n(30107),v=n(38470),x=n(74244),g=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(a=Object.getOwnPropertySymbols(e);l<a.length;l++)t.indexOf(a[l])<0&&Object.prototype.propertyIsEnumerable.call(e,a[l])&&(n[a[l]]=e[a[l]])}return n},b=u.forwardRef((function(e,t){var n=e.prefixCls,r=e.size,s=e.disabled,c=e.loading,d=e.className,p=void 0===d?"":d,m=g(e,["prefixCls","size","disabled","loading","className"]),b=u.useContext(h.E_),P=b.getPrefixCls,C=b.direction,y=u.useContext(v.Z),w=u.useContext(Z.Z),j=(null!=s?s:w)||c,k=P("switch",n),O=u.createElement("div",{className:"".concat(k,"-handle")},c&&u.createElement(o.Z,{className:"".concat(k,"-loading-icon")})),I=i()((0,l.Z)((0,l.Z)((0,l.Z)({},"".concat(k,"-small"),"small"===(r||y)),"".concat(k,"-loading"),c),"".concat(k,"-rtl"),"rtl"===C),p);return u.createElement(x.Z,{insertExtraNode:!0},u.createElement(f,(0,a.Z)({},m,{prefixCls:k,className:I,disabled:j,ref:t,loadingIcon:O})))}));b.__ANT_SWITCH=!0;var P=b},46207:function(e){e.exports=function(e){return null==e}},46206:function(e,t,n){"use strict";var a=n(2053),l=n(98037),o=n(57904),r=n(99459),i=n(58006),s=n(82187),c=n.n(s),u=n(6522),d=n(75271),p=["prefixCls","className","style","checked","disabled","defaultChecked","type","onChange"],m=(0,d.forwardRef)((function(e,t){var n,s=e.prefixCls,m=void 0===s?"rc-checkbox":s,f=e.className,h=e.style,Z=e.checked,v=e.disabled,x=e.defaultChecked,g=void 0!==x&&x,b=e.type,P=void 0===b?"checkbox":b,C=e.onChange,y=(0,i.Z)(e,p),w=(0,d.useRef)(null),j=(0,u.Z)(g,{value:Z}),k=(0,r.Z)(j,2),O=k[0],I=k[1];(0,d.useImperativeHandle)(t,(function(){return{focus:function(){var e;null===(e=w.current)||void 0===e||e.focus()},blur:function(){var e;null===(e=w.current)||void 0===e||e.blur()},input:w.current}}));var E=c()(m,f,(n={},(0,o.Z)(n,"".concat(m,"-checked"),O),(0,o.Z)(n,"".concat(m,"-disabled"),v),n));return d.createElement("span",{className:E,style:h},d.createElement("input",(0,a.Z)({},y,{className:"".concat(m,"-input"),ref:w,onChange:function(t){v||("checked"in e||I(t.target.checked),null==C||C({target:(0,l.Z)((0,l.Z)({},e),{},{type:P,checked:t.target.checked}),stopPropagation:function(){t.stopPropagation()},preventDefault:function(){t.preventDefault()},nativeEvent:t.nativeEvent}))},disabled:v,checked:!!O,type:P})),d.createElement("span",{className:"".concat(m,"-inner")}))}));t.Z=m},16130:function(){},6057:function(){}}]);
|