diff --git a/mail-vue/package-lock.json b/mail-vue/package-lock.json index b2e79a3..a91f751 100644 --- a/mail-vue/package-lock.json +++ b/mail-vue/package-lock.json @@ -21,9 +21,9 @@ "path": "^0.12.7", "pinia": "^3.0.2", "pinia-plugin-persistedstate": "^4.2.0", - "screenfull": "^6.0.2", "vue": "^3.5.13", "vue-cropper": "^1.1.4", + "vue-i18n": "^11.1.10", "vue-router": "^4.5.0" }, "devDependencies": { @@ -571,6 +571,50 @@ "vue": ">=3" } }, + "node_modules/@intlify/core-base": { + "version": "11.1.10", + "resolved": "https://registry.npmmirror.com/@intlify/core-base/-/core-base-11.1.10.tgz", + "integrity": "sha512-JhRb40hD93Vk0BgMgDc/xMIFtdXPHoytzeK6VafBNOj6bb6oUZrGamXkBKecMsmGvDQQaPRGG2zpa25VCw8pyw==", + "license": "MIT", + "dependencies": { + "@intlify/message-compiler": "11.1.10", + "@intlify/shared": "11.1.10" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/kazupon" + } + }, + "node_modules/@intlify/message-compiler": { + "version": "11.1.10", + "resolved": "https://registry.npmmirror.com/@intlify/message-compiler/-/message-compiler-11.1.10.tgz", + "integrity": "sha512-TABl3c8tSLWbcD+jkQTyBhrnW251dzqW39MPgEUCsd69Ua3ceoimsbIzvkcPzzZvt1QDxNkenMht+5//V3JvLQ==", + "license": "MIT", + "dependencies": { + "@intlify/shared": "11.1.10", + "source-map-js": "^1.0.2" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/kazupon" + } + }, + "node_modules/@intlify/shared": { + "version": "11.1.10", + "resolved": "https://registry.npmmirror.com/@intlify/shared/-/shared-11.1.10.tgz", + "integrity": "sha512-6ZW/f3Zzjxfa1Wh0tYQI5pLKUtU+SY7l70pEG+0yd0zjcsYcK0EBt6Fz30Dy0tZhEqemziQQy2aNU3GJzyrMUA==", + "license": "MIT", + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/kazupon" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.8", "resolved": "https://registry.npmmirror.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", @@ -3186,17 +3230,6 @@ "license": "ISC", "optional": true }, - "node_modules/screenfull": { - "version": "6.0.2", - "resolved": "https://registry.npmmirror.com/screenfull/-/screenfull-6.0.2.tgz", - "integrity": "sha512-AQdy8s4WhNvUZ6P8F6PB21tSPIYKniic+Ogx0AacBMjKP1GUHN2E9URxQHtCusiwxudnCKkdy4GrHXPPJSkCCw==", - "engines": { - "node": "^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/scule": { "version": "1.3.0", "resolved": "https://registry.npmmirror.com/scule/-/scule-1.3.0.tgz", @@ -3815,6 +3848,26 @@ "integrity": "sha512-5m98vBsCEI9rbS4JxELxXidtAui3qNyTHLHg67Qbn7g8cg+E6LcnC+hh3SM/p94x6mFh6KRxT1ttnta+wCYqWA==", "license": "ISC" }, + "node_modules/vue-i18n": { + "version": "11.1.10", + "resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-11.1.10.tgz", + "integrity": "sha512-C+IwnSg8QDSOAox0gdFYP5tsKLx5jNWxiawNoiNB/Tw4CReXmM1VJMXbduhbrEzAFLhreqzfDocuSVjGbxQrag==", + "license": "MIT", + "dependencies": { + "@intlify/core-base": "11.1.10", + "@intlify/shared": "11.1.10", + "@vue/devtools-api": "^6.5.0" + }, + "engines": { + "node": ">= 16" + }, + "funding": { + "url": "https://github.com/sponsors/kazupon" + }, + "peerDependencies": { + "vue": "^3.0.0" + } + }, "node_modules/vue-router": { "version": "4.5.0", "resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-4.5.0.tgz", diff --git a/mail-vue/package.json b/mail-vue/package.json index 8499d3b..c093b0b 100644 --- a/mail-vue/package.json +++ b/mail-vue/package.json @@ -23,9 +23,9 @@ "path": "^0.12.7", "pinia": "^3.0.2", "pinia-plugin-persistedstate": "^4.2.0", - "screenfull": "^6.0.2", "vue": "^3.5.13", "vue-cropper": "^1.1.4", + "vue-i18n": "^11.1.10", "vue-router": "^4.5.0" }, "devDependencies": { diff --git a/mail-vue/src/App.vue b/mail-vue/src/App.vue index b69b93b..377b175 100644 --- a/mail-vue/src/App.vue +++ b/mail-vue/src/App.vue @@ -1,9 +1,13 @@ \ No newline at end of file diff --git a/mail-vue/src/axios/index.js b/mail-vue/src/axios/index.js index 1831dc5..a13b3f0 100644 --- a/mail-vue/src/axios/index.js +++ b/mail-vue/src/axios/index.js @@ -1,12 +1,16 @@ import axios from "axios"; import router from "@/router"; +import i18n from "@/i18n/index.js"; +import {useSettingStore} from "@/store/setting.js"; let http = axios.create({ baseURL: import.meta.env.VITE_BASE_URL }); http.interceptors.request.use(config => { + const { lang } = useSettingStore(); config.headers.Authorization = `${localStorage.getItem('token')}` + config.headers['accept-language'] = lang return config }) @@ -62,7 +66,7 @@ http.interceptors.response.use((res) => { return Promise.reject(error) } else if (error.message.includes('Network Error')) { ElMessage({ - message: '网络错误,请检查网络连接', + message: i18n.global.t('networkErrorMsg'), type: 'error', plain: true, grouping: true, @@ -70,7 +74,7 @@ http.interceptors.response.use((res) => { }) } else if (error.code === 'ECONNABORTED') { ElMessage({ - message: '请求超时,请稍后重试', + message: i18n.global.t('timeoutErrorMsg'), type: 'error', plain: true, grouping: true @@ -78,7 +82,7 @@ http.interceptors.response.use((res) => { ElMessage.error('') } else if (error.response) { ElMessage({ - message: `服务器繁忙`, + message: i18n.global.t('serverBusyErrorMsg'), type: 'error', plain: true, grouping: true, @@ -86,7 +90,7 @@ http.interceptors.response.use((res) => { }) } else { ElMessage({ - message: '请求失败,请稍后再试', + message: i18n.global.t('reqFailErrorMsg'), type: 'error', plain: true, grouping: true, diff --git a/mail-vue/src/components/email-scroll/index.vue b/mail-vue/src/components/email-scroll/index.vue index 5500186..3678018 100644 --- a/mail-vue/src/components/email-scroll/index.vue +++ b/mail-vue/src/components/email-scroll/index.vue @@ -18,7 +18,7 @@
- 共 {{ total }} 封 + {{$t('emailCount', {total: total})}}
@@ -33,7 +33,7 @@ :data-checked="item.checked" @click="jumpDetails(item)" > - +
@@ -45,7 +45,7 @@
- 已删除 + {{$t('deleted')}}
@@ -151,10 +151,10 @@
-
没有更多数据了
+
{{$t('noMoreData')}}
- +
@@ -172,6 +172,7 @@ import {useEmailStore} from "@/store/email.js"; import {useUiStore} from "@/store/ui.js"; import {useSettingStore} from "@/store/setting.js"; import {fromNow} from "@/utils/day.js"; +import {useI18n} from "vue-i18n"; const props = defineProps({ getEmailList: Function, @@ -216,7 +217,7 @@ const props = defineProps({ const emit = defineEmits(['jump', 'refresh-before', 'delete-draft']) - +const { t } = useI18n() const settingStore = useSettingStore() const uiStore = useUiStore(); const emailStore = useEmailStore(); @@ -260,7 +261,6 @@ onBeforeRouteLeave(() => { scrollTop = scroll.value.scrollTop }) - watch( () => emailList.map(item => item.checked), () => { @@ -282,7 +282,6 @@ watch(() => emailStore.cancelStarEmailId, () => { emailList.forEach(email => { if (email.emailId === emailStore.cancelStarEmailId) { email.isStar = 0 - console.log('取消') } }) }) @@ -366,9 +365,9 @@ function changeAccountShow() { } const handleDelete = () => { - ElMessageBox.confirm('确认批量删除这些邮件吗?', { - confirmButtonText: '确定', - cancelButtonText: '取消', + ElMessageBox.confirm(t('delEmailsConfirm'), { + confirmButtonText: t('confirm'), + cancelButtonText: t('cancel'), type: 'warning' }).then(() => { @@ -381,7 +380,7 @@ const handleDelete = () => { const emailIds = getSelectedMailsIds(); props.emailDelete(emailIds).then(() => { ElMessage({ - message: '删除成功', + message: t('delSuccessMsg'), type: 'success', plain: true }) @@ -651,7 +650,7 @@ function loadData() { justify-content: center; } - .sys-email-checkbox { + .all-email-checkbox { display: flex; padding-left: 15px; padding-right: 20px; diff --git a/mail-vue/src/components/send-percent/index.vue b/mail-vue/src/components/send-percent/index.vue index a12ff0e..ed80a86 100644 --- a/mail-vue/src/components/send-percent/index.vue +++ b/mail-vue/src/components/send-percent/index.vue @@ -3,15 +3,15 @@
{{value}}% - 邮件正在发送中 + {{desc}}
diff --git a/mail-vue/src/directives/perm.js b/mail-vue/src/directives/perm.js deleted file mode 100644 index 43f91eb..0000000 --- a/mail-vue/src/directives/perm.js +++ /dev/null @@ -1,21 +0,0 @@ -import { useUserStore } from "@/store/user.js"; - -export default { - mounted(el, binding) { - const userStore = useUserStore(); - const permKeys = userStore.user.permKeys; - const value = binding.value; - - if (permKeys.includes('*')) { - return; - } - - const hasPermission = Array.isArray(value) - ? value.some(key => permKeys.includes(key)) - : permKeys.includes(value); - - if (!hasPermission) { - el.parentNode && el.parentNode.removeChild(el); - } - } -} diff --git a/mail-vue/src/i18n/en.js b/mail-vue/src/i18n/en.js new file mode 100644 index 0000000..9aae14f --- /dev/null +++ b/mail-vue/src/i18n/en.js @@ -0,0 +1,252 @@ +const en = { + inbox: 'Inbox', + drafts: 'Drafts', + sent: 'Sent', + starred: 'Starred', + settings: 'Settings', + analytics: 'Analytics', + allUsers: 'All users', + allMail: 'All mail', + permissions: 'Role', + inviteCode: 'Invite code', + SystemSettings: 'System settings', + noMoreData: 'No more data', + noMessagesFound: 'No messages found', + addAccount: 'Add account', + emailAccount: 'Email', + deleteUser: 'Delete account', + deleteUserBtn: 'Delete', + changePassword: 'Change password', + newPassword: 'New password', + confirmPassword: 'Confirm password', + add: 'Add', + manage: 'Manage', + rename: 'Rename', + delete: 'Delete', + save: 'Save', + profile: 'Profile', + change: 'Change', + changePwdBtn: 'Change', + username: 'Username', + password: 'Password', + delAccount: 'Delete account', + delAccountMsg: 'This will permanently delete your account and data. It cannot be reactivated.', + totalReceived: 'Total received', + totalSent: 'Total sent', + totalMailboxes: 'Total accounts', + totalUsers: 'Total users', + deleted: 'Deleted', + active: 'Active', + emailSource: 'Email source', + userGrowth: 'User growth', + emailGrowth: 'Email growth', + emailSent: 'Sent', + emailReceived: 'Received', + sentToday: 'Sent today', + total: 'Total', + growthTotalUsers: 'Total users', + searchByEmail: 'Enter email to search', + tabEmailAddress: 'Email', + tabReceived: 'Received', + tabSent: 'Sent', + tabMailboxes: 'Accounts', + tabRegisteredAt: 'Registered at', + tabStatus: 'Status', + tabRole: 'Role', + roleName: 'Name', + role: 'Name', + all: 'All', + normal: 'Normal', + banned: 'Banned', + reset: 'Reset', + restore: 'Restore', + tabSetting: 'Settings', + registrationIp: 'Registration IP', + recentIP: 'Recent IP', + recentActivity: 'Recent activity', + loginDevice: 'Login device', + loginSystem: 'Login system', + browserLogin: 'Browser Login', + noPerm: 'Unauthorized', + noLimit: 'Unlimited', + blocked: 'Blocked', + sendCount: 'Send email : ', + accountCount: 'Add account : ', + action: 'Action', + chgPwd: 'Pwd', + perm: 'Role', + btnBan: 'Ban', + admin: 'Admin', + addUser: 'Add user', + select: 'Select', + unknown: 'Unknown', + changePerm: 'Change role', + from: 'From', + subject: 'Subject', + sender: 'Sender', + user: 'User', + searchByContent: 'Enter text to search', + noRecipient: 'No recipient', + received: 'Received', + selectEmail: 'Email', + order: 'Order', + default: 'Default', + description: 'Description', + removeBody: 'Remove body', + removeAll: 'Remove all', + expand: 'Expand', + collapse: 'Collapse', + daily: 'Daily', + emailBlock: '*Intercept all incoming emails to @example.com', + searchRegKeyDesc: 'Enter invite code to search', + remainingUses: 'Remaining uses', + exhausted: 'Exhausted', + validUntil: 'Valid until', + expired: 'Expired', + copy: 'Copy', + history: 'History', + addRegKey: 'Add invite code', + regKey: 'Invite code', + noCodeFound: 'No messages found', + useHistory: 'Usage history', + date: 'Date', + roleDesc: 'Role', + noSubject: 'No subject', + recipient: 'To', + delivered: 'Delivered', + complained: 'Complained', + delayed: 'Delayed', + bounced: 'Bounced', + attachments: 'Attachments', + attCount: 'Total {total}', + emailCount: 'Total {total}', + error404: '404 Not Found', + home: 'Home', + loginBtn: 'Sign in', + regBtn: 'Sign up', + loginTitle: 'Sign in to your account to access email', + regTitle: 'Sign up for an account to use email', + confirmPwd: 'Confirm password', + regKeyOptional: 'Invite code (Optional)', + noAccount: 'Don\'t have an account? \u200B', + hasAccount: 'Already have an account? \u200B', + regSwitch: 'Sign up', + loginSwitch: 'Sign in', + websiteSetting: 'Website', + websiteReg: 'Sign up', + multipleEmail: 'Multiple accounts', + multipleEmailDesc: 'Enable this feature to allow users to add multiple accounts', + physicallyWipeData: 'Physically wipe data', + physicallyWipeDataDesc: 'This action will permanently erase all deleted data', + customization: 'Customization', + websiteTitle: 'Title', + loginBoxOpacity: 'Login box opacity', + loginBackground: 'Background', + emailSetting: 'Email', + receiveEmails: 'Receive email', + autoRefresh: 'Auto refresh', + autoRefreshDesc: 'Automatically fetch the latest emails from the server', + sendEmail: 'Send email', + resendToken: 'Resend Token', + R2OS: 'R2 Object storage', + osDomain: 'Domain', + emailPush: 'Email push', + tgBot: 'Telegram bot', + disable: 'Disable', + disabled: 'Disabled', + otherEmail: 'Forwarding to external email', + forwardingRules: 'Forwarding Rules', + forwardAll: 'All', + rules: 'Rules', + turnstileSetting: 'Turnstile', + signUpVerification: 'Sign up verification', + addEmailVerification: 'Add account verification', + about: 'About', + version: 'Version', + community: 'Community', + changeTitle: 'Change title', + addResendTokenDesc: 'Input to add; leave empty to delete.', + addOsDomain: 'Add domain', + domainDesc: 'Domain', + addTurnstileSecret: 'Add turnstile secret', + backgroundCropping: 'Background cropping', + tgBotDesc: 'Forward received emails to a Telegram bot', + tgBotToken: 'Bot token', + toBotTokenDesc: 'Multiple user chat_ids, separated by commas', + otherEmailDec: 'emails can be forwarded to other providers, but must be verified via cloudflare', + otherEmailInputDesc: 'Separate multiple email addresses with commas.', + forwardingRulesDesc: 'Rule-based forwarding only forwards emails received by the specified address.', + ruleEmailsInputDesc: 'Separate multiple email addresses with commas.', + resendTokenList: 'Token list', + domain: 'Domain', + optional: 'Optional', + subjectInputDesc: 'Please enter the email subject.', + changeUserName: 'Change username', + sendSeparately: 'Separately', + send: 'Send', + reply: 'Reply', + confirm: 'Confirm', + cancel: 'Cancel', + delEmailConfirm: 'Confirm deleting this email?', + delSuccessMsg: 'Deleted successfully', + emptyEmailMsg: 'Email cannot be empty', + notEmailMsg: 'Invalid email', + emptyPwdMsg: 'Password cannot be empty', + pwdLengthMsg: 'Password must be at least 6 characters', + confirmPwdFailMsg: 'The two passwords do not match', + emptyRegKeyMsg: 'Invite code cannot be empty', + regSuccessMsg: 'Sign up successful', + copySuccessMsg: 'Copied successfully', + copyFailMsg: 'Copy failed', + clearRegKey: 'Confirm clearing all invalid invite codes?', + clearSuccess: 'Cleared successfully', + emptyRole: 'Role cannot be empty', + emptyTimeMsg: 'Valid until time cannot be empty', + emptyCountMsg: 'Available count cannot be empty', + addSuccessMsg: 'Addition successful', + delConfirm: 'Confirm deleting {msg}?', + emptyRoleNameMsg: 'Role name cannot be empty', + changSuccessMsg: 'Changes saved successfully', + changeRoleTitle: 'Change role', + addRoleTitle: 'Add role', + emptyUserNameMsg: 'Name cannot be empty', + delAccountConfirm: 'Confirm deleting current account and all associated data?', + clearAllDelConfirm: 'This action is irreversible. Enter DELETE to proceed', + warning: 'Warning', + delInputPattern: 'DELETE', + inputErrorMessage: 'Please enter DELETE to confirm', + delBackgroundConfirm: 'Confirm deleting this background?', + enable: 'Enable', + enabled: 'Enabled', + reSendConfirm: 'Confirm reset of {msg} send total?', + reSuccessMsg: 'Reset successful', + restoreConfirm: 'Confirm restoring {msg}?', + normalRestore: 'Normal restore', + allRestore: 'Includes deleted data', + restoreSuccessMsg: 'Restore successful', + banRestore: 'Confirm banning {msg}?', + signOut: 'Sign out', + clearContentConfirm: 'Are you sure to clear all content?', + attLimitMsg: 'Attachment size limit: 28MB', + emptyRecipientMsg: 'Recipient email cannot be empty', + emptySubjectMsg: 'Subject cannot be empty', + emptyContentMsg: 'Content cannot be empty', + noSeparateSendMsg: 'Separate sending does not support attachments yet', + sendSuccessMsg: 'Send successful', + sendFailMsg: 'Send failed', + saveDraftConfirm: 'Save draft?', + delEmailsConfirm: 'Confirm batch delete these emails?', + sending: 'Sending Email...', + sendingErrorMsg: 'Sending in progress', + networkErrorMsg: 'Network error. Check your internet', + timeoutErrorMsg: 'Timeout. Try again later', + serverBusyErrorMsg: 'Server busy. Please try again later.', + reqFailErrorMsg: 'Request failed. Try again later.', + mailDetails: 'Message', + language: 'Language', + totalUserAccount: '{msg}', + sendBanned: 'Banned', + wrote: 'wrote' +} + +export default en diff --git a/mail-vue/src/i18n/index.js b/mail-vue/src/i18n/index.js new file mode 100644 index 0000000..c6a5119 --- /dev/null +++ b/mail-vue/src/i18n/index.js @@ -0,0 +1,12 @@ +import { createI18n } from 'vue-i18n'; +import en from './en.js' +import zh from './zh.js' +const i18n = createI18n({ + legacy: false, + messages: { + en, + zh + }, +}); + +export default i18n; \ No newline at end of file diff --git a/mail-vue/src/i18n/zh.js b/mail-vue/src/i18n/zh.js new file mode 100644 index 0000000..7687849 --- /dev/null +++ b/mail-vue/src/i18n/zh.js @@ -0,0 +1,251 @@ +const zh = { + inbox: '收件箱', + drafts: '草稿箱', + sent: '已发送', + starred: '星标邮件', + settings: '个人设置', + analytics: '分析页', + allUsers: '用户列表', + allMail: '全部邮件', + permissions: '权限控制', + inviteCode: '注册密钥', + SystemSettings: '系统设置', + noMoreData: '没有更多数据了', + noMessagesFound: '没有任何邮件', + addAccount: '添加邮箱', + emailAccount: '邮箱', + deleteUser: '删除账户', + deleteUserBtn: '删除账户', + changePassword: '修改密码', + newPassword: '新的密码', + confirmPassword: '旧的密码', + add: '添加', + manage: '管理', + rename: '改名', + delete: '删除', + save: '保存', + profile: '个人信息', + change: '修改', + changePwdBtn: '修改密码', + username: '用户名', + password: '密码', + delAccount: '删除账户', + delAccountMsg: '此操作将永久删除您的账户及其所有数据,无法恢复', + totalReceived: '收件数量', + totalSent: '发送数量', + totalMailboxes: '邮箱数量', + totalUsers: '用户数量', + deleted: '已删除', + active: '正常', + emailSource: '邮件来源', + userGrowth: '用户增长', + emailGrowth: '邮件增长', + emailSent: '发送', + emailReceived: '接收', + sentToday: '今日发件', + total: '次数', + growthTotalUsers: '用户数', + searchByEmail: '输入邮箱搜索', + tabEmailAddress: '用户邮箱', + tabReceived: '收件数量', + tabSent: '发件数量', + tabMailboxes: '邮箱数量', + tabRegisteredAt: '注册时间', + tabStatus: '状态', + tabRole: '权限身份', + roleName: '名字', + role: '权限身份', + all: '全部', + normal: '正常', + banned: '封禁', + reset: '重置', + restore: '恢复', + tabSetting: '设置', + registrationIp: '注册IP', + recentIP: '近期IP', + recentActivity: '近期活动', + loginDevice: '登录设备', + loginSystem: '登录系统', + browserLogin: '登录浏览器', + noPerm: '无权限', + noLimit: '无限制', + blocked: '被禁用', + sendCount: '邮件发送 :', + accountCount: '邮箱添加 :', + action: '操作', + chgPwd: '改密', + perm: '权限', + btnBan: '禁用', + admin: '超级管理员', + addUser: '添加用户', + select: '请选择', + unknown: '未知', + changePerm: '修改权限', + from: '发件人', + subject: '主题', + sender: '发件人', + user: '用户', + searchByContent: '输入内容查询', + noRecipient: '无收件人', + received: '已接收', + selectEmail: '邮箱', + order: '排序', + default: '默认', + description: '描述', + removeBody: '移除正文', + removeAll: '丢弃邮件', + expand: '展开', + collapse: '收起', + daily: '每天', + emailBlock: '输入邮箱拦截收件, 拦截所有前缀 *@example.com', + searchRegKeyDesc: '输入注册码搜索', + remainingUses: '剩余次数', + exhausted: '已用尽', + validUntil: '有效至期', + expired: '已过期', + copy: '复制', + history: '记录', + addRegKey: '添加注册码', + regKey: '注册码', + noCodeFound: '没有任何注册码', + useHistory: '使用记录', + date: '时间', + roleDesc: '权限身份', + noSubject: '无主题', + recipient: '收件人', + delivered: '发送成功', + complained: '被标记为垃圾', + delayed: '发送被延迟', + bounced: '发送失败', + attachments: '附件列表', + attCount: '共 {total} 个', + emailCount: '共 {total} 封', + error404: '404错误, 找不到页面', + home: '返回首页', + loginBtn: '登录', + regBtn: '注册', + loginTitle: '输入账号信息以开始使用邮箱系统', + regTitle: '输入账号密码以开始注册邮箱系统', + confirmPwd: '确认密码', + regKeyOptional: '注册码(可选)', + noAccount: '还没有账号?', + hasAccount: '已有账号?', + regSwitch: '创建账号', + loginSwitch: '去登录', + websiteSetting: '网站设置', + websiteReg: '用户注册', + multipleEmail: '多号模式', + multipleEmailDesc: '开启后账号栏出现一个用户可以添加多个邮箱', + physicallyWipeData: '物理清空数据', + physicallyWipeDataDesc: '该操作会物理清空所有已被删除的数据', + customization: '个性化设置', + websiteTitle: '网站标题', + loginBoxOpacity: '登录透明', + loginBackground: '登录背景', + emailSetting: '邮件设置', + receiveEmails: '邮件接收', + autoRefresh: '自动刷新', + autoRefreshDesc: '轮询请求服务器获取最新邮件', + sendEmail: '邮件发送', + resendToken: '添加 Resend Token', + R2OS: 'R2 对象存储', + osDomain: '访问域名', + emailPush: '邮件推送', + tgBot: 'Telegram 机器人', + disable: '关闭', + disabled: '已关闭', + otherEmail: '第三方邮箱', + forwardingRules: '转发规则', + forwardAll: '全部转发', + rules: '规则转发', + turnstileSetting: 'Turnstile 人机验证', + signUpVerification: '注册验证', + addEmailVerification: '添加验证', + about: '关于', + version: '版本', + community: '交流', + changeTitle: '修改标题', + addResendTokenDesc: '输入内容添加,不填则删除', + addOsDomain: '添加访对象存储问域名', + domainDesc: '域名', + addTurnstileSecret: '添加 Turnstile 密钥', + backgroundCropping: '背景截图', + tgBotDesc: '可以将接收的邮件转发到Tg机器人', + tgBotToken: '机器人 token', + toBotTokenDesc: '用户 chat_id 多个用,分开', + otherEmailDec: '可以将邮件转到其他服务商邮箱,需要在cloudflare验证邮箱', + otherEmailInputDesc: '多个邮箱用, 分开', + forwardingRulesDesc: '规则转发只会转发设置邮箱所接收的邮件', + ruleEmailsInputDesc: '多个邮箱用, 分开', + resendTokenList: 'Token 列表', + domain: '域名', + optional: '可选', + subjectInputDesc: '请输入邮件主题', + changeUserName: '修改用户名', + sendSeparately: '分别发送', + send: '发送', + reply: '回复', + confirm: '确定', + cancel: '取消', + delEmailConfirm: '确认删除该邮件吗?', + delSuccessMsg: '删除成功', + emptyEmailMsg: '邮箱不能为空', + notEmailMsg: '输入的邮箱不合法', + emptyPwdMsg: '密码不能为空', + pwdLengthMsg: '密码最少六位', + confirmPwdFailMsg: '两次密码输入不一致', + emptyRegKeyMsg: '注册码不能为空', + regSuccessMsg: '注册成功', + copySuccessMsg: '复制成功', + copyFailMsg: '复制失败', + clearRegKey: '确认清除所有不可用的注册码?', + clearSuccess: '清除成功', + emptyRole: '身份类型不能为空', + emptyTimeMsg: '有效时间不能为空', + emptyCountMsg: '可用次数不能为空', + addSuccessMsg: '添加成功', + delConfirm: '确认删除{msg}吗?', + emptyRoleNameMsg: '身份名不能为空', + changSuccessMsg: '修改成功', + changeRoleTitle: '修改身份', + addRoleTitle: '添加身份', + emptyUserNameMsg: '用户名不能为空', + delAccountConfirm: '确认删除当前账号及所有数据吗?', + clearAllDelConfirm: '此操作不可逆转, 输入 确认删除 继续操作', + warning: '警告', + delInputPattern: '确认删除', + inputErrorMessage: '请输入确认删除', + delBackgroundConfirm: '确定要删除这个背景吗?', + enable: '启用', + enabled: '已启用', + reSendConfirm: '确认重置 {msg} 发件次数吗?', + reSuccessMsg: '重置成功', + restoreConfirm: '确认要恢复 {msg} 吗?', + normalRestore: '普通恢复', + allRestore: '包括已删除的数据', + restoreSuccessMsg: '恢复成功', + banRestore: '确认禁用 {msg} 吗?', + signOut: '退出', + clearContentConfirm: '确定要清空所有内容吗?', + attLimitMsg: '附件大小限制28mb', + emptyRecipientMsg: '收件人邮箱地址不能为空', + emptySubjectMsg: '主题不能为空', + emptyContentMsg: '邮件正文不能为空', + noSeparateSendMsg: '分别发送暂时不支持附件', + sendSuccessMsg: '发送成功', + sendFailMsg: '发送失败', + saveDraftConfirm: '是否保存草稿?', + delEmailsConfirm: '确认批量删除这些邮件吗?', + sending: '邮件正在发送中', + sendingErrorMsg: '邮件正在发送中', + networkErrorMsg: '网络错误,请检查网络连接', + timeoutErrorMsg: '请求超时,请稍后重试', + serverBusyErrorMsg: '服务器繁忙,请稍后重试', + reqFailErrorMsg: '请求失败,请稍后再试', + mailDetails: '邮件详情', + language: '网站语言', + totalUserAccount: '{msg} 个', + sendBan: '已禁用', + wrote: '来信' +} +export default zh \ No newline at end of file diff --git a/mail-vue/src/init/init.js b/mail-vue/src/init/init.js index 5bec4cc..434df80 100644 --- a/mail-vue/src/init/init.js +++ b/mail-vue/src/init/init.js @@ -1,10 +1,10 @@ -import { useUserStore } from "@/store/user.js"; -import { useSettingStore } from "@/store/setting.js"; -import { useAccountStore } from "@/store/account.js"; -import { loginUserInfo } from "@/request/my.js"; -import { permsToRouter } from "@/utils/perm.js"; +import {useUserStore} from "@/store/user.js"; +import {useSettingStore} from "@/store/setting.js"; +import {useAccountStore} from "@/store/account.js"; +import {loginUserInfo} from "@/request/my.js"; +import {permsToRouter} from "@/perm/perm.js"; import router from "@/router"; -import { websiteConfig } from "@/request/setting.js"; +import {websiteConfig} from "@/request/setting.js"; import {cvtR2Url} from "@/utils/convert.js"; export async function init() { @@ -16,6 +16,12 @@ export async function init() { const token = localStorage.getItem('token'); + console.log(settingStore.lang) + + if (!settingStore.lang) { + settingStore.lang = navigator.language.split('-')[0] + } + let setting = null; if (token) { diff --git a/mail-vue/src/layout/account/index.vue b/mail-vue/src/layout/account/index.vue index c7c98f1..1e076f5 100644 --- a/mail-vue/src/layout/account/index.vue +++ b/mail-vue/src/layout/account/index.vue @@ -21,8 +21,8 @@ @@ -61,23 +61,23 @@
-
没有更多数据了
+
{{$t('noMoreData')}}
- +
- +
- + -
- -
@@ -76,9 +73,10 @@ import {useUserStore} from "@/store/user.js"; import { useRoute } from "vue-router"; import {computed, ref} from "vue"; import {useSettingStore} from "@/store/setting.js"; -import hasPerm from "@/utils/perm.js"; -import screenfull from "screenfull"; +import { hasPerm } from "@/perm/perm.js" +import {useI18n} from "vue-i18n"; +const { t } = useI18n(); const route = useRoute(); const settingStore = useSettingStore(); const userStore = useUserStore(); @@ -91,23 +89,27 @@ const accountCount = computed(() => { const sendType = computed(() => { + if (settingStore.settings.send === 1) { + return t('disabled') + } + if (!hasPerm('email:send')) { - return '无权限' + return t('noPerm') } if (!userStore.user.role.sendCount) { - return '无限制' + return t('noLimit') } if (userStore.user.role.sendCount < 0) { - return '无次数' + return t('blocked') } if (userStore.user.role.sendType === 'day') { - return '每天' + return t('daily') } if (userStore.user.role.sendType === 'count') { - return '次数' + return t('total') } }) @@ -150,10 +152,6 @@ function formatName(email) { return email[0]?.toUpperCase() || '' } -function full() { - screenfull.toggle(); -} - -
- ${f} -
- `}function s(){if(!a||!r.value)return;const l=r.value,u=a.querySelector(".shadow-content");if(!u)return;const c=l.offsetWidth,f=l.offsetHeight,d=u.scrollWidth,h=u.scrollHeight;if(d===0||h===0)return;const p=c/d,v=f/h,g=Math.min(p,v),m=a.host;m.style.zoom=g}return jt(()=>{i(),a=n.value.attachShadow({mode:"open"}),o(),s()}),je(()=>t.html,()=>{o(),s()}),(l,u)=>(R(),Q("div",{class:"content-box",ref_key:"contentBox",ref:r},[I("div",{ref_key:"container",ref:n,class:"content-html"},null,512)],512))}},Ble=Jn($le,[["__scopeId","data-v-01c24297"]]);function Fle(e){return Gt.get("/sysEmail/list",{params:{...e}})}function y$(e){return Gt.delete("/sysEmail/delete?emailIds="+e)}const Vle={class:"box"},zle={class:"header-actions"},Hle={key:0,class:"star"},Wle={class:"container"},Ule={class:"email-title"},Kle={class:"content"},jle={class:"email-info"},Yle={class:"send"},Gle={class:"send-name"},qle={class:"send-name-title"},Xle={class:"receive"},Zle={class:"receive-email"},Jle={class:"date"},Qle={key:1,class:"email-text"},eue={key:0,class:"att"},tue={class:"att-title"},nue={class:"att-box"},rue=["onClick"],aue=["onClick"],iue={style:{color:"rgba(24, 36, 48, 0.6)"}},oue={class:"opt-icon att-icon"},sue=["href"],lue={__name:"index",setup(e){const t=El(),n=La(),r=ys(),a=Ml(),i=zne(),o=a.contentData.email,s=j(!1),l=Ut([]);je(()=>r.currentAccountId,()=>{g()});function u(){t.writerRef.openReply(o)}function c(b){return b?JSON.parse(b).message:""}function f(b){b=b||"";const w=n.settings.r2Domain;return b.replace(/{{domain}}/g,w+"/")}function d(b){if(!h(b))return;const w=sf(b);l.length=0,l.push(w),s.value=!0}function h(b){return["png","jpg","jpeg","bmp","gif","jfif"].includes(c$(b))}function p(b){return b=JSON.parse(b),b.map(w=>w.address).join(", ")}function v(){o.isStar?(o.isStar=0,Mf(o.emailId).then(()=>{o.isStar=0,a.cancelStarEmailId=o.emailId,setTimeout(()=>a.cancelStarEmailId=0),a.starScroll?.deleteEmail([o.emailId])}).catch(b=>{console.error(b),o.isStar=1})):(o.isStar=1,Ef(o.emailId).then(()=>{o.isStar=1,a.addStarEmailId=o.emailId,setTimeout(()=>a.addStarEmailId=0),a.starScroll?.addItem(o)}).catch(b=>{console.error(b),o.isStar=0}))}const g=()=>{i.back()},m=()=>{ua.confirm("确认删除该邮件吗?",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{a.contentData.delType==="logic"?dp(o.emailId).then(()=>{xt({message:"删除成功",type:"success",plain:!0}),a.deleteIds=[o.emailId]}):y$(o.emailId).then(()=>{xt({message:"删除成功",type:"success",plain:!0}),a.deleteIds=[o.emailId]}),i.back()})};return(b,w)=>{const _=h7,C=ya,x=wN,T=vs("perm");return R(),Q("div",Vle,[I("div",zle,[V(y(nt),{class:"icon",icon:"material-symbols-light:arrow-back-ios-new",width:"20",height:"20",onClick:g}),Ot(V(y(nt),{class:"icon",icon:"uiw:delete",width:"16",height:"16",onClick:m},null,512),[[T,"email:delete"]]),y(a).contentData.showStar?(R(),Q("span",Hle,[y(o).isStar?(R(),le(y(nt),{key:0,class:"icon",onClick:v,icon:"fluent-color:star-16",width:"21",height:"20"})):(R(),le(y(nt),{key:1,class:"icon",onClick:v,icon:"solar:star-line-duotone",width:"19",height:"19"}))])):ye("",!0),y(a).contentData.showReply?(R(),le(y(nt),{key:1,class:"icon",onClick:u,icon:"carbon:reply",width:"20",height:"20"})):ye("",!0)]),w[4]||(w[4]=I("div",null,null,-1)),V(C,{class:"scrollbar"},{default:X(()=>[I("div",Wle,[I("div",Ule,Ae(y(o).subject),1),I("div",Kle,[I("div",jle,[I("div",null,[I("div",Yle,[w[1]||(w[1]=I("span",{class:"send-source"},"发件人",-1)),I("div",Gle,[I("span",qle,Ae(y(o).name),1),I("span",null,"<"+Ae(y(o).sendEmail)+">",1)])]),I("div",Xle,[w[2]||(w[2]=I("span",{class:"source"},"收件人",-1)),I("span",Zle,Ae(p(y(o).recipient)),1)]),I("div",Jle,[I("div",null,Ae(y(p$)(y(o).createTime)),1)])]),y(o).status===3?(R(),le(_,{key:0,closable:!1,title:"发送失败: "+c(y(o).message),class:"email-msg",type:"error","show-icon":""},null,8,["title"])):ye("",!0),y(o).status===4?(R(),le(_,{key:1,closable:!1,title:"被标记为垃圾邮件",class:"email-msg",type:"warning","show-icon":""})):ye("",!0),y(o).status===5?(R(),le(_,{key:2,closable:!1,title:"邮件发送被延迟",class:"email-msg",type:"warning","show-icon":""})):ye("",!0)]),V(C,{class:q(["htm-scrollbar",y(o).attList.length===0?"bottom-distance":""])},{default:X(()=>[y(o).content?(R(),le(Ble,{key:0,html:f(y(o).content)},null,8,["html"])):(R(),Q("pre",Qle,Ae(y(o).text),1))]),_:1},8,["class"]),y(o).attList.length>0?(R(),Q("div",eue,[I("div",tue,[w[3]||(w[3]=I("span",null,"附件列表",-1)),I("span",null,"共 "+Ae(y(o).attList.length)+" 个",1)]),I("div",nue,[(R(!0),Q(mt,null,en(y(o).attList,M=>(R(),Q("div",{class:"att-item",key:M.attId},[I("div",{class:"att-icon",onClick:E=>d(M.key)},[V(y(nt),{icon:y(h$)(M.filename),width:"20",height:"20"},null,8,["icon"])],8,rue),I("div",{class:"att-name",onClick:E=>d(M.key)},Ae(M.filename),9,aue),I("div",iue,Ae(y(f$)(M.size)),1),I("div",oue,[h(M.filename)?(R(),le(y(nt),{key:0,icon:"hugeicons:view",width:"22",height:"22",onClick:E=>d(M.key)},null,8,["onClick"])):ye("",!0),I("a",{href:y(sf)(M.key),download:""},[V(y(nt),{icon:"system-uicons:push-down",width:"22",height:"22"})],8,sue)])]))),128))])])):ye("",!0)])])]),_:1}),s.value?(R(),le(x,{key:0,"url-list":l,"show-progress":"",onClose:w[0]||(w[0]=M=>s.value=!1)},null,8,["url-list"])):ye("",!0)])}}},uue=Jn(lue,[["__scopeId","data-v-f5e596d3"]]),cue=Object.freeze(Object.defineProperty({__proto__:null,default:uue},Symbol.toStringTag,{value:"Module"})),fue={class:"box"},due={class:"pass"},hue={class:"pass-item"},pue={key:0,class:"edit-name-input"},vue={key:1,class:"user-name"},gue={class:"pass-item"},mue={class:"pass-item"},yue={class:"del-email"},bue={class:"update-pwd"},_ue=Object.assign({name:"setting"},{__name:"index",setup(e){const t=ys(),n=Ti(),r=j(!1),a=j(!1),i=j(null);function o(){i.value=n.user.name,a.value=!0}function s(){if(!i.value){xt({message:"用户名不能为空",type:"error",plain:!0});return}a.value=!1;let d=i.value;d!==n.user.name&&(n.user.name=i.value,o$(n.user.accountId,d).then(()=>{xt({message:"修改成功",type:"success",plain:!0}),t.changeUserAccountName=d}).catch(()=>{n.user.name=d}))}const l=j(!1),u=Ut({password:"",newPwd:""}),c=()=>{ua.confirm("确认删除当前账号及所有数据吗?",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{zae().then(()=>{localStorage.removeItem("token"),jn.replace("/login"),xt({message:"删除成功",type:"success",plain:!0})})})};function f(){if(!u.password){xt({message:"密码不能为空",type:"error",plain:!0});return}if(u.password.length<6){xt({message:"密码不能小于6位",type:"error",plain:!0});return}if(u.password!==u.newPwd){xt({message:"两次密码输入不一致",type:"error",plain:!0});return}r.value=!0,Vae(u.password).then(()=>{xt({message:"修改成功",type:"success",plain:!0}),l.value=!1,r.value=!1,u.password="",u.newPwd=""}).catch(()=>{r.value=!1})}return(d,h)=>{const p=Sr,v=$r,g=Cf,m=vs("perm");return R(),Q("div",fue,[I("div",due,[h[9]||(h[9]=I("div",{class:"title"},"账户与密码",-1)),I("div",hue,[h[5]||(h[5]=I("div",null,"用户名",-1)),I("div",null,[a.value?(R(),Q("span",pue,[V(p,{modelValue:i.value,"onUpdate:modelValue":h[0]||(h[0]=b=>i.value=b)},null,8,["modelValue"]),I("span",{class:"edit-name",onClick:s}," 保存 ")])):(R(),Q("span",vue,[I("span",null,Ae(y(n).user.name),1),I("span",{class:"edit-name",onClick:o}," 修改 ")]))])]),I("div",gue,[h[6]||(h[6]=I("div",null,"邮箱",-1)),I("div",null,Ae(y(n).user.email),1)]),I("div",mue,[h[8]||(h[8]=I("div",null,"密码",-1)),I("div",null,[V(v,{type:"primary",onClick:h[1]||(h[1]=b=>l.value=!0)},{default:X(()=>h[7]||(h[7]=[Xe("修改密码")])),_:1})])])]),Ot((R(),Q("div",yue,[h[11]||(h[11]=I("div",{class:"title"},"删除账户",-1)),h[12]||(h[12]=I("div",{style:{color:"#585d69"}}," 此操作将永久删除您的账户及其所有数据,无法恢复 ",-1)),I("div",null,[V(v,{type:"primary",onClick:c},{default:X(()=>h[10]||(h[10]=[Xe("删除账户")])),_:1})])])),[[m,"my:delete"]]),V(g,{modelValue:l.value,"onUpdate:modelValue":h[4]||(h[4]=b=>l.value=b),title:"修改密码",width:"340"},{default:X(()=>[I("div",bue,[V(p,{type:"password",placeholder:"新的密码",modelValue:u.password,"onUpdate:modelValue":h[2]||(h[2]=b=>u.password=b)},null,8,["modelValue"]),V(p,{type:"password",placeholder:"确认密码",modelValue:u.newPwd,"onUpdate:modelValue":h[3]||(h[3]=b=>u.newPwd=b)},null,8,["modelValue"]),V(v,{type:"primary",loading:r.value,onClick:f},{default:X(()=>h[13]||(h[13]=[Xe("保存")])),_:1},8,["loading"])])]),_:1},8,["modelValue"])])}}}),wue=Jn(_ue,[["__scopeId","data-v-baf665e7"]]),Sue=Object.freeze(Object.defineProperty({__proto__:null,default:wue},Symbol.toStringTag,{value:"Module"})),Cue=Object.assign({name:"star"},{__name:"index",setup(e){const t=j({}),n=Ml();function r(i){n.contentData.email=i,n.contentData.delType="logic",n.contentData.showStar=!0,n.contentData.showReply=!0,jn.push("/content")}function a(i){n.cancelStarEmailId=i.emailId,t.value.deleteEmail([i.emailId])}return jt(()=>{n.starScroll=t}),(i,o)=>(R(),le(hp,{type:"star",ref_key:"scroll",ref:t,"allow-star":!1,"cancel-success":a,getEmailList:y(Ele),emailDelete:y(dp),"star-add":y(Ef),"star-cancel":y(Mf),onJump:r,actionLeft:"6px","show-account-icon":!1},null,8,["getEmailList","emailDelete","star-add","star-cancel"]))}}),xue=Object.freeze(Object.defineProperty({__proto__:null,default:Cue},Symbol.toStringTag,{value:"Module"})),Tue={id:"login-box"},kue={key:0,id:"background-wrap"},Eue={class:"form-wrapper"},Mue={class:"container"},Aue={class:"form-title"},Iue={key:0,class:"form-desc"},Due={key:1,class:"form-desc"},Pue={key:2},Oue={style:{color:"#333"}},Lue={key:3},Rue={style:{color:"#333"}},Nue=["data-sitekey"],$ue={__name:"index",setup(e){eL(_=>({"61d5d6b4":v.value}));const t=ys(),n=Ti(),r=La(),a=j(!1),i=j("login"),o=Ut({email:"",password:""}),s=j(),l=j(""),u=Ut({email:"",password:"",confirmPassword:"",code:null}),c=r.domainList,f=j(!1);l.value=c[0];const d=j(!1);let h="",p=null;window.onTurnstileSuccess=_=>{h=_,setTimeout(()=>{d.value=!1},2e3)};const v=Y(()=>`rgba(255, 255, 255, ${r.settings.loginOpacity})`),g=Y(()=>r.settings.background?{"background-image":`url(${sf(r.settings.background)})`,"background-repeat":"no-repeat","background-size":"cover","background-position":"center"}:""),m=()=>{s.value.toggleMenu()},b=()=>{if(!o.email){xt({message:"邮箱不能为空",type:"error",plain:!0});return}if(!vl(o.email+l.value)){xt({message:"输入的邮箱不合法",type:"error",plain:!0});return}if(!o.password){xt({message:"密码不能为空",type:"error",plain:!0});return}a.value=!0,uoe(o.email+l.value,o.password).then(async _=>{localStorage.setItem("token",_.token);const C=await Tm();t.currentAccountId=C.accountId,n.user=C,K3(C.permKeys).forEach(T=>{jn.addRoute("layout",T)}),await jn.replace({name:"layout"})}).finally(()=>{a.value=!1})};function w(){if(!u.email){xt({message:"邮箱不能为空",type:"error",plain:!0});return}if(!vl(u.email+l.value)){xt({message:"输入的邮箱不合法",type:"error",plain:!0});return}if(!u.password){xt({message:"密码不能为空",type:"error",plain:!0});return}if(u.password.length<6){xt({message:"密码最少六位",type:"error",plain:!0});return}if(u.password!==u.confirmPassword){xt({message:"两次密码输入不一致",type:"error",plain:!0});return}if(r.settings.regKey===0&&!u.code){xt({message:"注册码不能为空",type:"error",plain:!0});return}if(!h&&r.settings.registerVerify===0){d.value=!0,Nt(p?()=>{window.turnstile.reset(p)}:()=>{p=window.turnstile.render(".register-turnstile")});return}f.value=!0;const _={email:u.email+l.value,password:u.password,token:h,code:u.code};foe(_).then(()=>{i.value="login",u.email="",u.password="",u.confirmPassword="",u.code="",f.value=!1,p=null,h="",xt({message:"注册成功",type:"success",plain:!0})}).catch(C=>{C.code===400&&(h="",window.turnstile.reset(p),d.value=!0),f.value=!1})}return(_,C)=>{const x=kl,T=Tl,M=Sr,E=$r;return R(),Q("div",Tue,[y(r).settings.background?(R(),Q("div",{key:1,style:Ft(g.value)},null,4)):(R(),Q("div",kue,C[11]||(C[11]=[I6('
',5)]))),I("div",Eue,[I("div",Mue,[I("span",Aue,Ae(y(r).settings.title),1),i.value==="login"?(R(),Q("span",Iue,"请输入账号信息以开始使用邮箱系统")):(R(),Q("span",Due,"请输入账号密码以开始注册邮箱系统")),i.value==="login"?(R(),Q("div",Pue,[V(M,{class:"email-input",modelValue:o.email,"onUpdate:modelValue":C[1]||(C[1]=A=>o.email=A),type:"text",placeholder:"邮箱",autocomplete:"off"},{append:X(()=>[I("div",{onClick:Pt(m,["stop"])},[V(T,{ref_key:"mySelect",ref:s,modelValue:l.value,"onUpdate:modelValue":C[0]||(C[0]=A=>l.value=A),placeholder:"请选择",class:"select"},{default:X(()=>[(R(!0),Q(mt,null,en(y(c),A=>(R(),le(x,{key:A,label:A,value:A},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),I("div",Oue,[I("span",null,Ae(l.value),1),V(y(nt),{class:"setting-icon",icon:"mingcute:down-small-fill",width:"20",height:"20"})])])]),_:1},8,["modelValue"]),V(M,{modelValue:o.password,"onUpdate:modelValue":C[2]||(C[2]=A=>o.password=A),placeholder:"密码",type:"password",autocomplete:"off"},null,8,["modelValue"]),V(E,{class:"btn",type:"primary",onClick:b,loading:a.value},{default:X(()=>C[12]||(C[12]=[Xe("登录 ")])),_:1},8,["loading"])])):(R(),Q("div",Lue,[V(M,{class:"email-input",modelValue:u.email,"onUpdate:modelValue":C[4]||(C[4]=A=>u.email=A),type:"text",placeholder:"邮箱",autocomplete:"off"},{append:X(()=>[I("div",{onClick:Pt(m,["stop"])},[V(T,{ref_key:"mySelect",ref:s,modelValue:l.value,"onUpdate:modelValue":C[3]||(C[3]=A=>l.value=A),placeholder:"请选择",class:"select"},{default:X(()=>[(R(!0),Q(mt,null,en(y(c),A=>(R(),le(x,{key:A,label:A,value:A},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),I("div",Rue,[I("span",null,Ae(l.value),1),V(y(nt),{class:"setting-icon",icon:"mingcute:down-small-fill",width:"20",height:"20"})])])]),_:1},8,["modelValue"]),V(M,{modelValue:u.password,"onUpdate:modelValue":C[5]||(C[5]=A=>u.password=A),placeholder:"密码",type:"password",autocomplete:"off"},null,8,["modelValue"]),V(M,{modelValue:u.confirmPassword,"onUpdate:modelValue":C[6]||(C[6]=A=>u.confirmPassword=A),placeholder:"确认密码",type:"password",autocomplete:"off"},null,8,["modelValue"]),y(r).settings.regKey===0?(R(),le(M,{key:0,modelValue:u.code,"onUpdate:modelValue":C[7]||(C[7]=A=>u.code=A),placeholder:"注册码",type:"text",autocomplete:"off"},null,8,["modelValue"])):ye("",!0),y(r).settings.regKey===2?(R(),le(M,{key:1,modelValue:u.code,"onUpdate:modelValue":C[8]||(C[8]=A=>u.code=A),placeholder:"注册码(可选)",type:"text",autocomplete:"off"},null,8,["modelValue"])):ye("",!0),Ot(I("div",{class:"register-turnstile","data-sitekey":y(r).settings.siteKey,"data-callback":"onTurnstileSuccess"},null,8,Nue),[[kn,d.value]]),V(E,{class:"btn",type:"primary",onClick:w,loading:f.value},{default:X(()=>C[13]||(C[13]=[Xe("注册 ")])),_:1},8,["loading"])])),y(r).settings.register===0?(R(),Q(mt,{key:4},[i.value==="login"?(R(),Q("div",{key:0,class:"switch",onClick:C[9]||(C[9]=A=>i.value="register")},C[14]||(C[14]=[Xe("还没有账号? "),I("span",null,"创建账号",-1)]))):(R(),Q("div",{key:1,class:"switch",onClick:C[10]||(C[10]=A=>i.value="login")},C[15]||(C[15]=[Xe("已有账号? "),I("span",null,"去登录",-1)])))],64)):ye("",!0)])])])}}},Bue=Jn($ue,[["__scopeId","data-v-1bc7e9ad"]]),Fue=Object.freeze(Object.defineProperty({__proto__:null,default:Bue},Symbol.toStringTag,{value:"Module"})),Vue={},zue={class:"scrollbar-flex-content"};function Hue(e,t){const n=ya;return R(),le(n,null,{default:X(()=>[I("div",zue,[(R(),Q(mt,null,en(1e3,r=>I("p",{key:r,class:"scrollbar-demo-item"},Ae(r),1)),64))])]),_:1})}const Wue=Jn(Vue,[["render",Hue],["__scopeId","data-v-fbb8d012"]]),Uue=Object.freeze(Object.defineProperty({__proto__:null,default:Wue},Symbol.toStringTag,{value:"Module"})),Kue={class:"box-404"},jue={__name:"index",setup(e){let t=window.innerWidth<1025;return(n,r)=>{const a=$r,i=jy;return R(),Q("div",Kue,[V(i,{"image-size":y(t)?120:0,class:"empty",description:"404错误, 找不到页面"},{default:X(()=>[V(a,{type:"primary",onClick:r[0]||(r[0]=o=>y(jn).replace({name:"layout"}))},{default:X(()=>r[1]||(r[1]=[Xe("返回首页")])),_:1})]),_:1},8,["image-size"])])}}},Yue=Jn(jue,[["__scopeId","data-v-d503c420"]]),Gue=Object.freeze(Object.defineProperty({__proto__:null,default:Yue},Symbol.toStringTag,{value:"Module"}));function que(e){return Gt.get("/user/list",{params:{...e}})}function Xue(e){return Gt.put("/user/setPwd",e)}function Zue(e){return Gt.put("/user/setStatus",e)}function Jue(e){return Gt.put("/user/setType",e)}function Que(e){return Gt.delete("/user/delete",{params:{userId:e}})}function ece(e){return Gt.post("/user/add",e)}function tce(e){return Gt.put("/user/resetSendCount",{userId:e})}function nce(e,t){return Gt.put("/user/restore",{userId:e,type:t})}function rce(e){return Gt.post("/role/add",e)}function ace(){return Gt.get("/role/permTree")}function ice(){return Gt.get("/role/list")}function oce(e){return Gt.put("/role/set",e)}function sce(e){return Gt.delete("/role/delete",{params:{roleId:e}})}function lce(e){return Gt.put("/role/setDefault",{roleId:e})}function Zd(){return Gt.get("/role/selectUse")}const kx=qu("role",{state:()=>({refresh:0}),actions:{refreshSelect(){this.refresh++}}}),uce={class:"user-box"},cce={class:"header-actions"},fce={class:"search"},dce={class:"details"},hce={key:0},pce={key:1},vce={key:2},gce={key:3},mce={key:4},yce={class:"email-row"},bce={class:"type"},_ce={key:0,class:"pagination"},wce={class:"dialog-box"},Sce={class:"dialog-box"},Cce={class:"container"},xce={style:{color:"#333"}},Tce=Object.assign({name:"user"},{__name:"index",setup(e){const t=kx(),n=Ti(),r=La(),a=["normal","del"],i=[{text:"正常",value:"normal"},{text:"删除",value:"del"}],o=j(!1),s=j(230),l=j(40),u=j(null),c=j(!0),f=j(!0),d=j(!0),h=j(!0),p=j(!0),v=j(null),g=j(!1),m=j("prev, pager, next, sizes, total"),b=j(""),w=j(!1),_=j([]),C=j(0),x=j(!0),T=j(null),M=r.domainList,E=Ut({email:"",suffix:r.domainList[0],password:"",type:null}),A=Ut({email:"",num:1,size:15,timeSort:0,status:-1});let L={};const F=Ut({password:null,type:-1,userId:0}),H=j(!1),U=j(!1),P=j(!1),N=j(!1),z=j(10),$=j(!1),O=j(!0),W=Ut([]),ee=j({}),te=j(0);Zd().then(G=>{W.length=0,W.push(...G)});const re=localStorage.getItem("user-params");if(re){const G=JSON.parse(re);A.num=G.num,A.size=G.size,A.timeSort=G.timeSort,A.status=G.status}je(()=>A,()=>{localStorage.setItem("user-params",JSON.stringify(A))},{deep:!0}),je(()=>t.refresh,()=>{Zd().then(G=>{W.length=0,W.push(...G)})}),je(()=>n.refreshList,()=>{be(!1)}),be();const ce=Ut({send:["normal","del"],account:["normal","del"],receive:["normal","del"]});function ie(G){G.send&&(ce.send=G.send),G.account&&(ce.account=G.account),G.receive&&(ce.receive=G.receive)}function de(G){return ce.send.length===2?G.sendEmailCount+G.delSendEmailCount:ce.send.includes("normal")?G.sendEmailCount:ce.send.includes("del")?G.delSendEmailCount:0}function se(G){return ce.account.length===2?G.accountCount+G.delAccountCount:ce.account.includes("normal")?G.accountCount:ce.account.includes("del")?G.delAccountCount:0}function _e(G){return ce.receive.length===2?G.receiveEmailCount+G.delReceiveEmailCount:ce.receive.includes("normal")?G.receiveEmailCount:ce.receive.includes("del")?G.delReceiveEmailCount:0}function pe(G){if(G.isDel===1)return"恢复";if(G.status===0)return"禁用";if(G.status===1)return"启用"}const $e=G=>G.row.email;function De(){w.value=!w.value,te.value++}const Z=()=>{ee.value.toggleMenu()};function ne(){E.email="",E.suffix=r.domainList[0],E.type=null,E.password=""}function oe(){H.value=!0}function ve(){if(!E.email){xt({message:"邮箱不能为空",type:"error",plain:!0});return}if(!vl(E.email+E.suffix)){xt({message:"非法邮箱",type:"error",plain:!0});return}if(!E.password){xt({message:"密码不能为空",type:"error",plain:!0});return}if(E.password.length<6){xt({message:"密码至少六位",type:"error",plain:!0});return}if(!E.type){xt({message:"身份类型不能为空",type:"error",plain:!0});return}U.value=!0;const G={...E};G.email=G.email+G.suffix,ece(G).then(()=>{U.value=!1,H.value=!1,xt({message:"添加成功",type:"success",plain:!0}),ne(),be(!1)}).finally(me=>{U.value=!1})}function Oe(G){if(G.sendAction.sendType==="day")return"每天";if(G.sendAction.sendType==="count")return"总数"}function Le(G){return G.sendAction.hasPerm?G.sendAction.sendCount?G.sendCount+"/"+G.sendAction.sendCount+"次":"无限制":"无权限"}function et(G){if(G===0)return"超级管理员";const me=W.findIndex(dt=>dt.roleId===G);return me>-1?W[me].name:""}function Fe(G){ua.confirm(`确认重置${G.email}发件次数吗?`,{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{tce(G.userId).then(()=>{xt({message:"重置成功",type:"success",plain:!0}),G.sendCount=0})})}function Ye(G){ua.confirm(`确认删除${G.email}吗?`,{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{Que(G.userId).then(()=>{xt({message:"删除成功",type:"success",plain:!0}),be(!1)})})}function Ue(G){const me=j(0);ua.confirm(null,{confirmButtonText:"确定",cancelButtonText:"取消",message:()=>St("div",[St("div",{class:"mb-2"},`确认要恢复 ${G.email}`),St(zy,{modelValue:me.value,"onUpdate:modelValue":dt=>me.value=dt},[St(mm,{label:"option1",value:0},"普通恢复"),St(mm,{label:"option2",value:1},"包括已删除的数据")])]),type:"warning"}).then(()=>{nce(G.userId,me.value).then(()=>{G.isDel=0,xt({message:"恢复成功",type:"success",plain:!0})})})}function yt(G){G.status===0?ua.confirm(`确认禁用 ${G.email} 吗?`,{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{Je(G)}):Je(G)}function Je(G){let me=G.status?0:1;Zue({status:me,userId:G.userId}).then(()=>{G.status=me,xt({message:"设置成功",type:"success",plain:!0})})}function Re(){$.value=!0,Jue({type:F.type,userId:F.userId}).then(()=>{L.type=F.type,P.value=!1,xt({message:"设置成功",type:"success",plain:!0})}).finally(()=>{$.value=!1})}function ot(){F.password=null,F.userId=0,F.type=0}function Dt(){A.num=1,be()}function Lt(){if(!F.password){xt({message:"密码不能为空",type:"error",plain:!0});return}if(F.password.length<6){xt({message:"密码最少六位",type:"error",plain:!0});return}$.value=!0,Xue({password:F.password,userId:F.userId}).then(()=>{N.value=!1,xt({message:"设置成功",type:"success",plain:!0})}).finally(()=>{$.value=!1})}function Qe(G){L=G,F.userId=G.userId,F.type=G.type,P.value=!0}function fe(G){F.userId=G.userId,N.value=!0}function ht(){A.email="",A.num=1,A.status=-1,A.timeSort=0,be(),Zd().then(G=>{W.length=0,W.push(...G)})}function fn(){A.num=1,A.timeSort=A.timeSort?0:1,be()}function tt(G){A.num=G,be()}function Ce(G){A.size=G,be()}function be(G=!0){O.value=G;const me={...A};me.status===-2&&(delete me.status,me.isDel=1),que(me).then(dt=>{_.value=dt.list,C.value=dt.total,T.value?.setScrollTop(0)}).finally(()=>{O.value=!1,x.value=!1})}window.onresize=()=>{Ve()},Ve();function Ve(){const G=window.innerWidth;h.value=G>1090,d.value=G>1200,f.value=G>650,c.value=G>685,p.value=G>767,s.value=G>480?230:null,u.value=G<480?75:null,l.value=G<480?25:40,z.value=G<768?7:11,v.value=G<480?90:null,m.value=G<768?"pager":"prev, pager, next,sizes, total",g.value=G<768,b.value=G<380?"small":""}return(G,me)=>{const dt=Sr,$t=kl,rt=Tl,Qn=Gu,nr=$r,vr=Gy,xr=Uy,vn=Ky,at=lp,Ju=Yy,Ai=oQ,Ra=ya,Bo=Cf;return R(),Q("div",uce,[I("div",cce,[V(y(nt),{class:"icon",icon:"ion:add-outline",width:"23",height:"23",onClick:oe}),I("div",fce,[V(dt,{modelValue:A.email,"onUpdate:modelValue":me[0]||(me[0]=wt=>A.email=wt),class:"search-input",placeholder:"输入邮箱名搜索"},null,8,["modelValue"])]),V(rt,{modelValue:A.status,"onUpdate:modelValue":me[1]||(me[1]=wt=>A.status=wt),placeholder:"Select",class:"status-select"},{default:X(()=>[(R(),le($t,{key:-1,label:"全部",value:-1})),(R(),le($t,{key:0,label:"正常",value:0})),(R(),le($t,{key:1,label:"封禁",value:1})),(R(),le($t,{key:-2,label:"删除",value:-2}))]),_:1},8,["modelValue"]),V(y(nt),{class:"icon",icon:"iconoir:search",onClick:Dt,width:"20",height:"20"}),A.timeSort===1?(R(),le(y(nt),{key:0,class:"icon",onClick:fn,icon:"material-symbols-light:timer-arrow-down-outline",width:"28",height:"28"})):(R(),le(y(nt),{key:1,class:"icon",onClick:fn,icon:"material-symbols-light:timer-arrow-up-outline",width:"28",height:"28"})),V(y(nt),{class:"icon",icon:"ion:reload",width:"18",height:"18",onClick:ht}),V(y(nt),{class:"icon",icon:"pepicons-pencil:expand",width:"26",height:"26",onClick:De})]),V(Ra,{ref_key:"scrollbarRef",ref:T,class:"scrollbar"},{default:X(()=>[I("div",null,[I("div",{class:q(["loading",O.value?"loading-show":"loading-hide"])},[V(us)],2),(R(),le(Ju,{onFilterChange:ie,"empty-text":x.value?"":null,"default-expand-all":w.value,data:_.value,"preserve-expanded-content":o.value,style:{width:"100%"},key:te.value},{default:X(()=>[V(vr,{width:l.value,type:"expand"},{default:X(wt=>[I("div",dce,[c.value?ye("",!0):(R(),Q("div",hce,[me[11]||(me[11]=I("span",{class:"details-item-title"},"发件数量:",-1)),Xe(Ae(wt.row.sendEmailCount),1)])),f.value?ye("",!0):(R(),Q("div",pce,[me[12]||(me[12]=I("span",{class:"details-item-title"},"邮箱数量:",-1)),Xe(Ae(wt.row.accountCount),1)])),d.value?ye("",!0):(R(),Q("div",vce,[me[13]||(me[13]=I("span",{class:"details-item-title"},"注册时间:",-1)),Xe(Ae(y(Xd)(wt.row.createTime).format("YYYY-MM-DD HH:mm:ss")),1)])),p.value?ye("",!0):(R(),Q("div",gce,[me[14]||(me[14]=I("span",{class:"details-item-title"},"身份类型:",-1)),Xe(" "+Ae(et(wt.row.type)),1)])),h.value?ye("",!0):(R(),Q("div",mce,[me[18]||(me[18]=I("span",{class:"details-item-title"},"状态:",-1)),wt.row.isDel===1?(R(),le(Qn,{key:0,"disable-transitions":"",type:"info"},{default:X(()=>me[15]||(me[15]=[Xe("删除")])),_:1})):wt.row.status===0?(R(),le(Qn,{key:1,"disable-transitions":"",type:"primary"},{default:X(()=>me[16]||(me[16]=[Xe("正常")])),_:1})):wt.row.status===1?(R(),le(Qn,{key:2,"disable-transitions":"",type:"danger"},{default:X(()=>me[17]||(me[17]=[Xe("封禁")])),_:1})):ye("",!0)])),I("div",null,[me[19]||(me[19]=I("span",{class:"details-item-title"},"注册IP:",-1)),Xe(Ae(wt.row.createIp||"未知"),1)]),I("div",null,[me[20]||(me[20]=I("span",{class:"details-item-title"},"近期IP:",-1)),Xe(Ae(wt.row.activeIp||"未知"),1)]),I("div",null,[me[21]||(me[21]=I("span",{class:"details-item-title"},"近期活动:",-1)),Xe(Ae(wt.row.activeTime?y(Xd)(wt.row.activeTime).format("YYYY-MM-DD"):"未知"),1)]),I("div",null,[me[22]||(me[22]=I("span",{class:"details-item-title"},"登录设备:",-1)),Xe(Ae(wt.row.device||"未知"),1)]),I("div",null,[me[23]||(me[23]=I("span",{class:"details-item-title"},"登录系统:",-1)),Xe(Ae(wt.row.os||"未知"),1)]),I("div",null,[me[24]||(me[24]=I("span",{class:"details-item-title"},"登录浏览器:",-1)),Xe(Ae(wt.row.browser||"未知"),1)]),I("div",null,[me[26]||(me[26]=I("span",{class:"details-item-title"},"发件次数:",-1)),I("span",null,Ae(Le(wt.row)),1),wt.row.sendAction.hasPerm?(R(),le(Qn,{key:0,style:{"margin-left":"10px"}},{default:X(()=>[Xe(Ae(Oe(wt.row)),1)]),_:2},1024)):ye("",!0),wt.row.sendAction.hasPerm&&wt.row.sendAction.sendCount?(R(),le(nr,{key:1,size:"small",style:{"margin-left":"10px"},onClick:xn=>Fe(wt.row),type:"primary"},{default:X(()=>me[25]||(me[25]=[Xe("重置 ")])),_:2},1032,["onClick"])):ye("",!0)])])]),_:1},8,["width"]),V(vr,{"show-overflow-tooltip":"","tooltip-formatter":$e,label:"用户邮箱","min-width":s.value},{default:X(wt=>[I("div",yce,Ae(wt.row.email),1)]),_:1},8,["min-width"]),V(vr,{formatter:_e,"label-class-name":"receive","column-key":"receive","filtered-value":a,filters:i,width:v.value,label:"收件数量",prop:"receiveEmailCount"},null,8,["width"]),c.value?(R(),le(vr,{key:0,formatter:de,"label-class-name":"send","column-key":"send","filtered-value":a,filters:i,label:"发件数量",prop:"sendEmailCount"})):ye("",!0),f.value?(R(),le(vr,{key:1,formatter:se,"label-class-name":"account","column-key":"account","filtered-value":a,filters:i,label:"邮箱数量",prop:"accountCount"})):ye("",!0),d.value?(R(),le(vr,{key:2,label:"注册时间","min-width":"160",prop:"createTime"},{default:X(wt=>[Xe(Ae(y(Xd)(wt.row.createTime).format("YYYY-MM-DD HH:mm:ss")),1)]),_:1})):ye("",!0),h.value?(R(),le(vr,{key:3,"min-width":"60px",label:"状态",prop:"status"},{default:X(wt=>[wt.row.isDel===1?(R(),le(Qn,{key:0,"disable-transitions":"",type:"info"},{default:X(()=>me[27]||(me[27]=[Xe("删除")])),_:1})):wt.row.status===0?(R(),le(Qn,{key:1,"disable-transitions":"",type:"primary"},{default:X(()=>me[28]||(me[28]=[Xe("正常")])),_:1})):wt.row.status===1?(R(),le(Qn,{key:2,"disable-transitions":"",type:"danger"},{default:X(()=>me[29]||(me[29]=[Xe("封禁")])),_:1})):ye("",!0)]),_:1})):ye("",!0),p.value?(R(),le(vr,{key:4,label:"身份类型","min-width":"140",prop:"type"},{default:X(wt=>[I("div",bce,Ae(et(wt.row.type)),1)]),_:1})):ye("",!0),V(vr,{label:"设置",width:u.value},{default:X(wt=>[V(at,{trigger:"click"},{dropdown:X(()=>[V(vn,null,{default:X(()=>[V(xr,{onClick:xn=>fe(wt.row)},{default:X(()=>me[31]||(me[31]=[Xe("改密")])),_:2},1032,["onClick"]),V(xr,{onClick:xn=>Qe(wt.row)},{default:X(()=>me[32]||(me[32]=[Xe("权限")])),_:2},1032,["onClick"]),wt.row.isDel!==1?(R(),le(xr,{key:0,onClick:xn=>yt(wt.row)},{default:X(()=>[Xe(Ae(pe(wt.row)),1)]),_:2},1032,["onClick"])):(R(),le(xr,{key:1,onClick:xn=>Ue(wt.row)},{default:X(()=>me[33]||(me[33]=[Xe("恢复")])),_:2},1032,["onClick"])),V(xr,{onClick:xn=>Ye(wt.row)},{default:X(()=>me[34]||(me[34]=[Xe("删除")])),_:2},1032,["onClick"])]),_:2},1024)]),default:X(()=>[V(nr,{size:"small",type:"primary"},{default:X(()=>me[30]||(me[30]=[Xe("操作")])),_:1})]),_:2},1024)]),_:1},8,["width"])]),_:1},8,["empty-text","default-expand-all","data","preserve-expanded-content"])),C.value>10?(R(),Q("div",_ce,[V(Ai,{size:b.value,"current-page":A.num,"page-size":A.size,"pager-count":z.value,"page-sizes":[10,15,20,25,30,50],background:"",layout:m.value,total:C.value,onSizeChange:Ce,onCurrentChange:tt},null,8,["size","current-page","page-size","pager-count","layout","total"]),g.value?(R(),le(Ai,{key:0,size:b.value,"current-page":A.num,"page-size":A.size,"pager-count":z.value,"page-sizes":[10,15,20,25,30,50],background:"",layout:"sizes, total",total:C.value,onSizeChange:Ce,onCurrentChange:tt},null,8,["size","current-page","page-size","pager-count","total"])):ye("",!0)])):ye("",!0)])]),_:1},512),V(Bo,{class:"dialog",modelValue:N.value,"onUpdate:modelValue":me[3]||(me[3]=wt=>N.value=wt),title:"修改密码",onClosed:ot},{default:X(()=>[I("div",wce,[V(dt,{modelValue:F.password,"onUpdate:modelValue":me[2]||(me[2]=wt=>F.password=wt),type:"password",placeholder:"密码",autocomplete:"off"},null,8,["modelValue"]),V(nr,{class:"btn",type:"primary",loading:$.value,onClick:Lt},{default:X(()=>me[35]||(me[35]=[Xe("保存 ")])),_:1},8,["loading"])])]),_:1},8,["modelValue"]),V(Bo,{class:"dialog",modelValue:P.value,"onUpdate:modelValue":me[5]||(me[5]=wt=>P.value=wt),title:"设置权限",onClosed:ot},{default:X(()=>[I("div",Sce,[F.type===0?(R(),le(dt,{key:0,disabled:"","model-value":"超级管理员"})):(R(),le(rt,{key:1,modelValue:F.type,"onUpdate:modelValue":me[4]||(me[4]=wt=>F.type=wt),placeholder:"Select"},{default:X(()=>[(R(!0),Q(mt,null,en(W,wt=>(R(),le($t,{label:wt.name,value:wt.roleId,key:wt.roleId},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])),V(nr,{disabled:F.type===0,class:"btn",loading:$.value,type:"primary",onClick:Re},{default:X(()=>me[36]||(me[36]=[Xe("保存 ")])),_:1},8,["disabled","loading"])])]),_:1},8,["modelValue"]),V(Bo,{modelValue:H.value,"onUpdate:modelValue":me[10]||(me[10]=wt=>H.value=wt),title:"添加用户"},{default:X(()=>[I("div",Cce,[V(dt,{modelValue:E.email,"onUpdate:modelValue":me[7]||(me[7]=wt=>E.email=wt),type:"text",placeholder:"邮箱",autocomplete:"off"},{append:X(()=>[I("div",{onClick:Pt(Z,["stop"])},[V(rt,{ref_key:"mySelect",ref:ee,modelValue:E.suffix,"onUpdate:modelValue":me[6]||(me[6]=wt=>E.suffix=wt),placeholder:"请选择",class:"select"},{default:X(()=>[(R(!0),Q(mt,null,en(y(M),wt=>(R(),le($t,{key:wt,label:wt,value:wt},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),I("div",xce,[I("span",null,Ae(E.suffix),1),V(y(nt),{class:"setting-icon",icon:"mingcute:down-small-fill",width:"20",height:"20"})])])]),_:1},8,["modelValue"]),V(dt,{type:"password",modelValue:E.password,"onUpdate:modelValue":me[8]||(me[8]=wt=>E.password=wt),placeholder:"密码"},null,8,["modelValue"]),V(rt,{modelValue:E.type,"onUpdate:modelValue":me[9]||(me[9]=wt=>E.type=wt),placeholder:"身份类型"},{default:X(()=>[(R(!0),Q(mt,null,en(W,wt=>(R(),le($t,{label:wt.name,value:wt.roleId,key:wt.roleId},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),V(nr,{class:"btn",type:"primary",onClick:ve,loading:U.value},{default:X(()=>me[37]||(me[37]=[Xe("添加 ")])),_:1},8,["loading"])])]),_:1},8,["modelValue"])])}}}),kce=Jn(Tce,[["__scopeId","data-v-9c38398c"]]),Ece=Object.freeze(Object.defineProperty({__proto__:null,default:kce},Symbol.toStringTag,{value:"Module"})),Mce={class:"perm-box"},Ace={class:"header-actions"},Ice={key:0,class:"loading"},Dce={class:"role-name"},Pce={key:0},Oce={class:"description"},Lce={class:"dialog-box"},Rce={class:"dialog-input"},Nce=Object.assign({name:"role"},{__name:"index",setup(e){const t=Ti(),n=kx(),r=j(!1),a=Ut([]),i=j([]),o=j({}),s=j(!1),l=j(!1),u=j(!0),c=j(null),f=j(null),d=j(200),h=Ut({title:"",type:""}),p=Ut({name:null,description:null,banEmail:[],banEmailType:0,sendType:"count",sendCount:0,accountCount:0,sort:0,isDefault:0}),v=j(!1);let g={};L(),ace().then(U=>{a.push(...U)});function m(U){const P=Array.from(new Set(U.split(/[,,]/).map(N=>N.trim()).filter(N=>N)));p.banEmail.splice(p.banEmail.length-1,1),P.forEach(N=>{vl(N)&&!p.banEmail.includes(N)&&p.banEmail.push(N)})}function b(){h.type==="add"?A():x()}function w(U){lce(U.roleId).then(()=>{xt({message:"设置成功",type:"success",plain:!0}),F()})}function _(U){ua.confirm(`确认删除 ${U.name} 吗?`,{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{sce(U.roleId).then(()=>{xt({message:"删除成功",type:"success",plain:!0}),F(),t.refreshUserList(),n.refreshSelect()})})}function C(U){if(U){const P=o.value?.store.nodesMap;for(const N in P)P[N].expanded=!0}else{const P=o.value?.store.nodesMap;for(const N in P)P[N].expanded=!1}}function x(){if(!p.name){xt({message:"身份名不能为空",type:"error",plain:!0});return}const U={...p,roleId:g.roleId},P=o.value.getCheckedKeys(),N=o.value.getHalfCheckedKeys();U.permIds=[...P,...N],s.value=!0,oce(U).then(()=>{xt({message:"修改成功",type:"success",plain:!0}),i.value.map($=>$.name).includes(U.name)||n.refreshSelect(),r.value=!1,F()}).finally(()=>{s.value=!1})}function T(){p.name=null,p.description=null,p.sort=0,p.sendType="count",p.sendCount=0,p.accountCount=0,p.banEmail=[],p.banEmailType=0,o.value.setCheckedKeys([])}function M(U){g=U,h.title="修改身份",h.type="set",r.value=!0,p.sort=U.sort,p.name=U.name,p.description=U.description,p.sendType=U.sendType,p.sendCount=U.sendCount,p.accountCount=U.accountCount,p.banEmail=U.banEmail,Nt(()=>{o.value.setCheckedKeys(U.permIds)})}function E(){h.title="添加身份",h.type="add",r.value=!0}function A(){const U={...p},P=o.value.getCheckedKeys(),N=o.value.getHalfCheckedKeys();U.permIds=[...P,...N],s.value=!0,rce(U).then(()=>{xt({message:"添加成功",type:"success",plain:!0}),r.value=!1,F(),n.refreshSelect()}).finally(()=>{s.value=!1})}function L(){l.value=!0,i.length=0,F()}function F(){ice().then(U=>{i.value=U}).finally(()=>{l.value=!1})}function H(){u.value=window.innerWidth>767,c.value=window.innerWidth<480?75:null,f.value=window.innerWidth<480?75:null,d.value=window.innerWidth<480?180:200}return H(),window.onresize=()=>{H()},(U,P)=>{const N=Gy,z=Gu,$=$r,O=Uy,W=Ky,ee=lp,te=Yy,re=ya,ce=Sr,ie=rx,de=mm,se=zy,_e=nx,pe=XR,$e=kl,De=Tl,Z=Oo,ne=qee,oe=Cf;return R(),Q("div",Mce,[I("div",Ace,[V(y(nt),{class:"icon",icon:"ion:add-outline",width:"23",height:"23",onClick:E}),V(y(nt),{class:"icon",icon:"ion:reload",width:"18",height:"18",onClick:L})]),l.value?(R(),Q("div",Ice,[V(us)])):(R(),le(re,{key:1,class:"perm-scrollbar"},{default:X(()=>[I("div",null,[V(te,{data:i.value,style:{width:"100%"}},{default:X(()=>[V(N,{width:"10"}),V(N,{label:"身份名称",prop:"name","min-width":d.value},{default:X(ve=>[I("div",Dce,[I("span",null,Ae(ve.row.name),1),ve.row.isDefault?(R(),Q("span",Pce,[V(z,{class:"def-tag"},{default:X(()=>P[12]||(P[12]=[Xe("默认")])),_:1})])):ye("",!0)])]),_:1},8,["min-width"]),V(N,{label:"排序",width:f.value,prop:"sort"},null,8,["width"]),u.value?(R(),le(N,{key:0,label:"描述","min-width":"200",prop:"description"},{default:X(ve=>[I("div",Oce,[I("span",null,Ae(ve.row.description),1)])]),_:1})):ye("",!0),V(N,{label:"操作",width:c.value},{default:X(ve=>[V(ee,{trigger:"click"},{dropdown:X(()=>[V(W,null,{default:X(()=>[V(O,{onClick:Oe=>M(ve.row)},{default:X(()=>P[14]||(P[14]=[Xe("修改")])),_:2},1032,["onClick"]),V(O,{onClick:Oe=>w(ve.row)},{default:X(()=>P[15]||(P[15]=[Xe("默认")])),_:2},1032,["onClick"]),V(O,{onClick:Oe=>_(ve.row)},{default:X(()=>P[16]||(P[16]=[Xe("删除")])),_:2},1032,["onClick"])]),_:2},1024)]),default:X(()=>[V($,{size:"small",type:"primary"},{default:X(()=>P[13]||(P[13]=[Xe("操作")])),_:1})]),_:2},1024)]),_:1},8,["width"])]),_:1},8,["data"])])]),_:1})),V(oe,{top:"5vh",class:"dialog",modelValue:r.value,"onUpdate:modelValue":P[11]||(P[11]=ve=>r.value=ve),title:h.title,onClosed:T},{default:X(()=>[I("div",Lce,[V(ce,{class:"dialog-input",modelValue:p.name,"onUpdate:modelValue":P[0]||(P[0]=ve=>p.name=ve),type:"text",maxlength:12,placeholder:"身份名称",autocomplete:"off"},null,8,["modelValue"]),V(ce,{class:"dialog-input",modelValue:p.description,"onUpdate:modelValue":P[1]||(P[1]=ve=>p.description=ve),maxlength:30,type:"text",placeholder:"描述",autocomplete:"off"},null,8,["modelValue"]),V(ie,{class:q(["dialog-input-tag",p.banEmail.length===0?"dialog-input":""]),"tag-type":"warning",modelValue:p.banEmail,"onUpdate:modelValue":P[2]||(P[2]=ve=>p.banEmail=ve),onAddTag:m,type:"text",placeholder:"输入邮箱拦截收件, 拦截所有前缀 *@example.com",autocomplete:"off"},null,8,["class","modelValue"]),p.banEmail.length>0?(R(),le(se,{key:0,class:"dialog-radio",modelValue:p.banEmailType,"onUpdate:modelValue":P[3]||(P[3]=ve=>p.banEmailType=ve)},{default:X(()=>[V(de,{label:"丢弃邮件",value:0}),V(de,{label:"移除正文",value:1})]),_:1},8,["modelValue"])):ye("",!0),I("div",Rce,[V(_e,{placeholder:"排序",min:0,max:9999,modelValue:p.sort,"onUpdate:modelValue":P[4]||(P[4]=ve=>p.sort=ve),modelModifiers:{number:!0},"controls-position":"right",autocomplete:"off"},null,8,["modelValue"])]),V(se,{modelValue:v.value,"onUpdate:modelValue":P[5]||(P[5]=ve=>v.value=ve),size:"small",onChange:C,class:"perm-expand"},{default:X(()=>[V(pe,{label:"展开",value:!0}),V(pe,{label:"收起",value:!1})]),_:1},8,["modelValue"]),V(ne,{"expand-on-click-node":!1,"check-on-click-node":!1,ref_key:"tree",ref:o,data:a,"show-checkbox":"","node-key":"permId","default-expand-all":v.value,props:{label:"name"}},{default:X(({node:ve,data:Oe})=>[I("div",null,[I("span",null,Ae(ve.label),1),Oe.permKey==="email:send"?(R(),Q("span",{key:0,class:"send-num",onClick:P[8]||(P[8]=Pt(()=>{},["stop"]))},[V(_e,{modelValue:p.sendCount,"onUpdate:modelValue":P[6]||(P[6]=Le=>p.sendCount=Le),"controls-position":"right",max:99999,size:"small",placeholder:"数量"},null,8,["modelValue"]),V(De,{modelValue:p.sendType,"onUpdate:modelValue":P[7]||(P[7]=Le=>p.sendType=Le),placeholder:"Select",size:"small",style:{width:"60px","margin-left":"5px"}},{default:X(()=>[V($e,{label:"总数",value:"count"}),V($e,{label:"每天",value:"day"})]),_:1},8,["modelValue"]),V(Z,{effect:"dark",content:"零无限制 负数无次数"},{default:X(()=>[V(y(nt),{class:"warning",icon:"fe:warning",width:"18",height:"18"})]),_:1})])):ye("",!0),Oe.permKey==="account:add"?(R(),Q("span",{key:1,class:"send-num",onClick:P[10]||(P[10]=Pt(()=>{},["stop"]))},[V(_e,{modelValue:p.accountCount,"onUpdate:modelValue":P[9]||(P[9]=Le=>p.accountCount=Le),"controls-position":"right",min:0,max:99999,size:"small",placeholder:"数量"},null,8,["modelValue"])])):ye("",!0)])]),_:1},8,["data","default-expand-all"]),V($,{class:"btn",type:"primary",loading:s.value,onClick:b},{default:X(()=>P[17]||(P[17]=[Xe("保存 ")])),_:1},8,["loading"])])]),_:1},8,["modelValue","title"])])}}}),$ce=Jn(Nce,[["__scopeId","data-v-c93d9307"]]),Bce=Object.freeze(Object.defineProperty({__proto__:null,default:$ce},Symbol.toStringTag,{value:"Module"}));function Im(e,t="14px sans-serif"){const n=document.createElement("canvas");n.width=2e3,n.style.width="1000px";const r=n.getContext("2d");return r.font=t,r.measureText(e).width}const Fce={class:"settings-container"},Vce={key:0,class:"loading"},zce={class:"scroll-body"},Hce={class:"card-grid"},Wce={class:"settings-card"},Uce={class:"card-content"},Kce={class:"setting-item"},jce={class:"setting-item"},Yce={class:"setting-item"},Gce={class:"setting-item"},qce={class:"setting-item"},Xce={class:"settings-card"},Zce={class:"card-content"},Jce={class:"setting-item"},Qce={class:"email-title"},efe={class:"setting-item"},tfe={class:"setting-item personalized"},nfe={class:"background-btn"},rfe={class:"settings-card"},afe={class:"card-content"},ife={class:"setting-item"},ofe={class:"setting-item"},sfe={class:"setting-item"},lfe={class:"setting-item"},ufe={class:"settings-card"},cfe={class:"card-content"},ffe={class:"setting-item"},dfe={class:"r2domain"},hfe={class:"settings-card"},pfe={class:"card-content"},vfe={class:"setting-item"},gfe={class:"forward"},mfe={class:"setting-item"},yfe={class:"forward"},bfe={class:"setting-item"},_fe={class:"forward"},wfe={class:"settings-card"},Sfe={class:"card-content"},Cfe={class:"setting-item"},xfe={class:"setting-item"},Tfe={class:"setting-item"},kfe={class:"bot-verify"},Efe={class:"setting-item"},Mfe={class:"bot-verify"},Afe={class:"settings-card about"},Ife={class:"card-content"},Dfe={class:"concerning-item"},Pfe={class:"cropper"},Ofe={class:"cut-button"},Lfe={class:"forward-head"},Rfe={class:"forward-set-body"},Nfe={class:"dialog-footer"},$fe={class:"forward-head"},Bfe={class:"forward-set-body"},Ffe={class:"dialog-footer"},Vfe={class:"forward-head"},zfe={class:"forward-set-body"},Hfe={class:"dialog-footer"},Wfe=Object.assign({name:"sys-setting"},{__name:"index",setup(e){const t=j(!0),n=j(),r=j(""),a=j(!1),i=ys(),o=Ti(),s=j(!1),l=j(!1),u=j(!1),c=j(!1),f=j(!1),d=j(!1),h=j(!1),p=j(!1),v=La(),{settings:g}=Gne(v),m=j(""),b=j(!1),w=j(""),_=j(0);let C="{}";const x=Ut({domain:"",token:""}),T=Ut({siteKey:"",secretKey:""}),M=[{label:"开启",value:0},{label:"关闭",value:1},{label:"可选",value:2}],E=[{label:"关闭",value:0},{label:"3s",value:3},{label:"5s",value:5},{label:"7s",value:7},{label:"10s",value:10},{label:"15s",value:15},{label:"20s",value:20}],A=j([]),L=j(0),F=j(""),H=j([]),U=j(0),P=j(0),N=j(0),z=j(0),$=j([]),O=Y(()=>{let Qe=Object.keys(g.value.resendTokens).map(fe=>({key:fe,value:g.value.resendTokens[fe]}));if(Qe.length>0){const fe=Qe.reduce((fn,tt)=>fn.key.length>tt.key.length?fn:tt).key;P.value=Im(fe)+30;const ht=Qe.reduce((fn,tt)=>fn.value.length>tt.value.length?fn:tt).value;N.value=Im(ht)+30}return Qe});IM().then(Qe=>{g.value=Qe,x.domain=g.value.domainList[0],_.value=g.value.loginOpacity,t.value=!1});function W(){if(L.value=g.value.tgBotStatus,F.value=g.value.tgBotToken,A.value=[],g.value.tgChatId){const Qe=g.value.tgChatId.split(",");A.value.push(...Qe)}f.value=!0}function ee(){p.value=!0}function te(){if(H.value=[],U.value=g.value.forwardStatus,g.value.forwardEmail){const Qe=g.value.forwardEmail.split(",");H.value.push(...Qe)}d.value=!0}function re(){if(z.value=g.value.ruleType,$.value=[],g.value.ruleEmail){const Qe=g.value.ruleEmail.split(",");$.value.push(...Qe)}h.value=!0}function ce(Qe){const fe=Array.from(new Set(Qe.split(/[,,]/).map(ht=>ht.trim()).filter(ht=>ht)));H.value.splice(H.value.length-1,1),fe.forEach(ht=>{vl(ht)&&!H.value.includes(ht)&&H.value.push(ht)})}function ie(Qe){const fe=Array.from(new Set(Qe.split(/[,,]/).map(ht=>ht.trim()).filter(ht=>ht)));$.value.splice($.value.length-1,1),fe.forEach(ht=>{vl(ht)&&!$.value.includes(ht)&&$.value.push(ht)})}function de(Qe){const fe=Array.from(new Set(Qe.split(/[,,]/).map(ht=>ht.trim()).filter(ht=>ht)));A.value.splice(A.value.length-1,1),fe.forEach(ht=>{isNaN(Number(ht))||A.value.push(ht)})}function se(){const Qe={tgBotToken:F.value,tgBotStatus:L.value,tgChatId:A.value+""};Lt(Qe)}function _e(){const Qe={forwardStatus:U.value,forwardEmail:H.value+""};Lt(Qe)}function pe(){const Qe={ruleEmail:$.value+"",ruleType:z.value};Lt(Qe)}function $e(){const Qe={};Qe.loginOpacity=_.value,Lt(Qe,!0)}const De=ss($e,1e3,{leading:!1,trailing:!0});function Z(){ua.prompt('此操作不可逆转, 输入 确认删除 继续操作',{confirmButtonText:"确定",cancelButtonText:"取消",dangerouslyUseHTMLString:!0,title:"警告",type:"warning",inputPattern:/^确认删除$/,inputErrorMessage:"请输入确认删除"}).then(()=>{Uae().then(()=>{xt({message:"删除成功",type:"success",plain:!0})})})}function ne(){ua.confirm("确定要删除这个背景吗?",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{g.value.background=null,Lt({background:null})})}function oe(){const Qe={};Qe.siteKey=T.siteKey,Qe.secretKey=T.secretKey,Lt(Qe)}function ve(){b.value=!0,n.value.getCropData(Qe=>{Wae(Qe).then(fe=>{g.value.background=fe,a.value=!1,xt({message:"设置成功",type:"success",plain:!0})}).finally(()=>{b.value=!1})})}function Oe(){const Qe=document.createElement("input");Qe.setAttribute("type","file"),Qe.setAttribute("accept","image/*"),Qe.click(),Qe.onchange=async fe=>{r.value=URL.createObjectURL(fe.target.files[0]),a.value=!0}}function Le(){const Qe={r2Domain:w.value};if(Qe.r2Domain&&!Qe.r2Domain.startsWith("http")){xt({message:"域名必须以http或https开头",type:"error",plain:!0});return}Lt(Qe)}function et(){l.value=!0}function Fe(){const Qe={resendTokens:{}},fe=x.domain.slice(1);Qe.resendTokens[fe]=x.token,Lt(Qe)}function Ye(){({...g.value},C=JSON.stringify(g.value))}function Ue(){x.token=""}function yt(){return b.value?!1:(Ye(),!0)}function Je(Qe){const fe={...g.value};delete fe.siteKey,delete fe.secretKey,delete fe.resendTokens,Lt(fe,!1)}function Re(){IM().then(Qe=>{v.settings=Qe,v.domainList=Qe.domainList})}function ot(){Lt({title:m.value})}function Dt(Qe){const fe=document.createElement("a");fe.href=Qe,fe.target="_blank",fe.click()}function Lt(Qe,fe=!0){b.value||(b.value=!0,Hae(Qe).then(()=>{b.value=!1,xt({message:"设置成功",type:"success",plain:!0}),g.value.manyEmail===1&&(i.currentAccountId=o.user.accountId),fe&&Re(),s.value=!1,u.value=!1,l.value=!1,c.value=!1,f.value=!1,d.value=!1,h.value=!1}).catch(ht=>{console.log(ht),_.value=g.value.loginOpacity,g.value={...g.value,...JSON.parse(C)}}).finally(()=>{b.value=!1}))}return(Qe,fe)=>{const ht=EQ,fn=kl,tt=Tl,Ce=Oo,be=$r,Ve=nx,G=$Z,me=Sr,dt=Cf,$t=Kt("vueCropper"),rt=rx,Qn=mm,nr=zy,vr=Gy,xr=Yy,vn=ya;return R(),Q("div",Fce,[t.value?(R(),Q("div",Vce,[V(us)])):(R(),le(vn,{key:1,class:"scroll"},{default:X(()=>[I("div",zce,[I("div",Hce,[I("div",Wce,[fe[46]||(fe[46]=I("div",{class:"card-title"},"网站设置",-1)),I("div",Uce,[I("div",Kce,[fe[41]||(fe[41]=I("div",null,[I("span",null,"用户注册")],-1)),I("div",null,[V(ht,{onChange:Je,"before-change":yt,"active-value":0,"inactive-value":1,modelValue:y(g).register,"onUpdate:modelValue":fe[0]||(fe[0]=at=>y(g).register=at)},null,8,["modelValue"])])]),I("div",jce,[fe[42]||(fe[42]=I("div",null,[I("span",null,"注册码")],-1)),I("div",null,[V(tt,{onChange:Je,style:{width:"80px"},modelValue:y(g).regKey,"onUpdate:modelValue":fe[1]||(fe[1]=at=>y(g).regKey=at),placeholder:"Select"},{default:X(()=>[(R(),Q(mt,null,en(M,at=>V(fn,{key:at.value,label:at.label,value:at.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])]),I("div",Yce,[fe[43]||(fe[43]=I("div",null,[I("span",null,"添加邮箱")],-1)),I("div",null,[V(ht,{onChange:Je,"before-change":yt,"active-value":0,"inactive-value":1,modelValue:y(g).addEmail,"onUpdate:modelValue":fe[2]||(fe[2]=at=>y(g).addEmail=at)},null,8,["modelValue"])])]),I("div",Gce,[I("div",null,[fe[44]||(fe[44]=I("span",null,"多号模式",-1)),V(Ce,{effect:"dark",content:"开启后账号栏出现一个用户可以添加多个邮箱"},{default:X(()=>[V(y(nt),{class:"warning",icon:"fe:warning",width:"18",height:"18"})]),_:1})]),I("div",null,[V(ht,{onChange:Je,"before-change":yt,"active-value":0,"inactive-value":1,modelValue:y(g).manyEmail,"onUpdate:modelValue":fe[3]||(fe[3]=at=>y(g).manyEmail=at)},null,8,["modelValue"])])]),I("div",qce,[I("div",null,[fe[45]||(fe[45]=I("span",null,"物理清空数据",-1)),V(Ce,{effect:"dark",content:"该操作会物理清空所有已被删除的数据"},{default:X(()=>[V(y(nt),{class:"warning",icon:"fe:warning",width:"18",height:"18"})]),_:1})]),I("div",null,[V(be,{class:"opt-button",style:{"margin-top":"0"},onClick:Z,size:"small",type:"primary"},{default:X(()=>[V(y(nt),{icon:"material-symbols:delete-outline-rounded",width:"16",height:"16"})]),_:1})])])])]),I("div",Xce,[fe[50]||(fe[50]=I("div",{class:"card-title"},"个性化设置",-1)),I("div",Zce,[I("div",Jce,[fe[47]||(fe[47]=I("div",{class:"title-item"},[I("span",null,"网站标题")],-1)),I("div",Qce,[I("span",null,Ae(y(g).title),1),V(be,{class:"opt-button",size:"small",type:"primary",onClick:fe[4]||(fe[4]=at=>s.value=!0)},{default:X(()=>[V(y(nt),{icon:"lsicon:edit-outline",width:"16",height:"16"})]),_:1})])]),I("div",efe,[fe[48]||(fe[48]=I("div",{class:"title-item"},[I("span",null,"登录透明")],-1)),I("div",null,[V(Ve,{size:"small",modelValue:_.value,"onUpdate:modelValue":fe[5]||(fe[5]=at=>_.value=at),onChange:y(De),precision:2,step:.01,max:1,min:0},null,8,["modelValue","onChange"])])]),I("div",tfe,[fe[49]||(fe[49]=I("div",null,[I("span",null,"登录背景")],-1)),I("div",null,[V(G,{class:"background",src:y(sf)(y(g).background),"preview-src-list":[y(sf)(y(g).background)],"show-progress":"",fit:"cover"},{error:X(()=>[I("div",{class:"error-image",onClick:Oe},[V(y(nt),{icon:"ph:image",width:"24",height:"24"})])]),_:1},8,["src","preview-src-list"]),I("div",nfe,[V(be,{class:"opt-button",size:"small",type:"primary",onClick:Oe},{default:X(()=>[V(y(nt),{icon:"lsicon:edit-outline",width:"16",height:"16"})]),_:1}),V(be,{class:"opt-button",size:"small",type:"primary",onClick:ne},{default:X(()=>[V(y(nt),{icon:"material-symbols:delete-outline-rounded",width:"16",height:"16"})]),_:1})])])])])]),I("div",rfe,[fe[55]||(fe[55]=I("div",{class:"card-title"},"邮件设置",-1)),I("div",afe,[I("div",ife,[fe[51]||(fe[51]=I("div",null,[I("span",null,"邮件接收")],-1)),I("div",null,[V(ht,{onChange:Je,"before-change":yt,"active-value":0,"inactive-value":1,modelValue:y(g).receive,"onUpdate:modelValue":fe[6]||(fe[6]=at=>y(g).receive=at)},null,8,["modelValue"])])]),I("div",ofe,[I("div",null,[fe[52]||(fe[52]=I("span",null,"轮询刷新",-1)),V(Ce,{effect:"dark",content:"轮询请求服务器获取最新邮件"},{default:X(()=>[V(y(nt),{class:"warning",icon:"fe:warning",width:"18",height:"18"})]),_:1})]),I("div",null,[V(tt,{onChange:Je,style:{width:"80px"},modelValue:y(g).autoRefreshTime,"onUpdate:modelValue":fe[7]||(fe[7]=at=>y(g).autoRefreshTime=at),placeholder:"Select"},{default:X(()=>[(R(),Q(mt,null,en(E,at=>V(fn,{key:at.value,label:at.label,value:at.value},null,8,["label","value"])),64))]),_:1},8,["modelValue"])])]),I("div",sfe,[fe[53]||(fe[53]=I("div",null,[I("span",null,"邮件发送")],-1)),I("div",null,[V(ht,{onChange:Je,"before-change":yt,"active-value":0,"inactive-value":1,modelValue:y(g).send,"onUpdate:modelValue":fe[8]||(fe[8]=at=>y(g).send=at)},null,8,["modelValue"])])]),I("div",lfe,[fe[54]||(fe[54]=I("div",null,[I("span",null,"添加 Resend Token")],-1)),I("div",null,[V(be,{class:"opt-button",style:{"margin-top":"0"},onClick:ee,size:"small",type:"primary"},{default:X(()=>[V(y(nt),{icon:"ic:round-list",width:"18",height:"18"})]),_:1}),V(be,{class:"opt-button",style:{"margin-top":"0"},onClick:et,size:"small",type:"primary"},{default:X(()=>[V(y(nt),{icon:"material-symbols:add-rounded",width:"16",height:"16"})]),_:1})])])])]),I("div",ufe,[fe[57]||(fe[57]=I("div",{class:"card-title"},"R2对象存储",-1)),I("div",cfe,[I("div",ffe,[fe[56]||(fe[56]=I("div",null,[I("span",null,"访问域名")],-1)),I("div",dfe,[I("span",null,Ae(y(g).r2Domain||"空"),1),V(be,{class:"opt-button",size:"small",type:"primary",onClick:fe[9]||(fe[9]=at=>u.value=!0)},{default:X(()=>[V(y(nt),{icon:"lsicon:edit-outline",width:"16",height:"16"})]),_:1})])])])]),I("div",hfe,[fe[61]||(fe[61]=I("div",{class:"card-title"},"邮件推送",-1)),I("div",pfe,[I("div",vfe,[fe[58]||(fe[58]=I("div",null,[I("span",null,"Telegram 机器人")],-1)),I("div",gfe,[I("span",null,Ae(y(g).tgBotStatus===0?"已开启":"已关闭"),1),V(be,{class:"opt-button",size:"small",type:"primary",onClick:W},{default:X(()=>[V(y(nt),{icon:"fluent:settings-48-regular",width:"18",height:"18"})]),_:1})])]),I("div",mfe,[fe[59]||(fe[59]=I("div",null,[I("span",null,"第三方邮箱")],-1)),I("div",yfe,[I("span",null,Ae(y(g).forwardStatus===0?"已开启":"已关闭"),1),V(be,{class:"opt-button",size:"small",type:"primary",onClick:te},{default:X(()=>[V(y(nt),{icon:"fluent:settings-48-regular",width:"18",height:"18"})]),_:1})])]),I("div",bfe,[fe[60]||(fe[60]=I("div",null,[I("span",null,"转发规则")],-1)),I("div",_fe,[I("span",null,Ae(y(g).ruleType===0?"全部转发":"规则转发"),1),V(be,{class:"opt-button",size:"small",type:"primary",onClick:re},{default:X(()=>[V(y(nt),{icon:"fluent:settings-48-regular",width:"18",height:"18"})]),_:1})])])])]),I("div",wfe,[fe[66]||(fe[66]=I("div",{class:"card-title"},"Turnstile 人机验证",-1)),I("div",Sfe,[I("div",Cfe,[fe[62]||(fe[62]=I("div",null,[I("span",null,"注册验证")],-1)),I("div",null,[V(ht,{onChange:Je,"before-change":yt,"active-value":0,"inactive-value":1,modelValue:y(g).registerVerify,"onUpdate:modelValue":fe[10]||(fe[10]=at=>y(g).registerVerify=at)},null,8,["modelValue"])])]),I("div",xfe,[fe[63]||(fe[63]=I("div",null,[I("span",null,"添加验证")],-1)),I("div",null,[V(ht,{onChange:Je,"before-change":yt,"active-value":0,"inactive-value":1,modelValue:y(g).addEmailVerify,"onUpdate:modelValue":fe[11]||(fe[11]=at=>y(g).addEmailVerify=at)},null,8,["modelValue"])])]),I("div",Tfe,[fe[64]||(fe[64]=I("div",null,[I("span",null,"Site Key")],-1)),I("div",kfe,[I("span",null,Ae(y(g).siteKey),1),V(be,{class:"opt-button",size:"small",type:"primary",onClick:fe[12]||(fe[12]=at=>c.value=!0)},{default:X(()=>[V(y(nt),{icon:"lsicon:edit-outline",width:"16",height:"16"})]),_:1})])]),I("div",Efe,[fe[65]||(fe[65]=I("div",null,[I("span",null,"Secret Key")],-1)),I("div",Mfe,[I("span",null,Ae(y(g).secretKey),1),V(be,{class:"opt-button",size:"small",type:"primary",onClick:fe[13]||(fe[13]=at=>c.value=!0)},{default:X(()=>[V(y(nt),{icon:"lsicon:edit-outline",width:"16",height:"16"})]),_:1})])])])]),I("div",Afe,[fe[71]||(fe[71]=I("div",{class:"card-title"},"关于",-1)),I("div",Ife,[fe[70]||(fe[70]=I("div",{class:"concerning-item"},[I("span",null,"版本:"),I("span",null,"v1.4.0")],-1)),I("div",Dfe,[fe[69]||(fe[69]=I("span",null,"交流:",-1)),V(be,{onClick:fe[14]||(fe[14]=at=>Dt("https://t.me/cloud_mail_tg"))},{icon:X(()=>[V(y(nt),{icon:"logos:telegram",width:"30",height:"30"})]),default:X(()=>[fe[67]||(fe[67]=Xe(" telegram "))]),_:1}),V(be,{onClick:fe[15]||(fe[15]=at=>Dt("https://github.com/eoao/cloud-mail"))},{icon:X(()=>[V(y(nt),{icon:"codicon:github-inverted",width:"22",height:"22"})]),default:X(()=>[fe[68]||(fe[68]=Xe(" github "))]),_:1})])])])])]),V(dt,{modelValue:s.value,"onUpdate:modelValue":fe[17]||(fe[17]=at=>s.value=at),title:"修改标题",width:"340",onClosed:fe[18]||(fe[18]=at=>m.value="")},{default:X(()=>[I("form",null,[V(me,{type:"text",placeholder:"网站标题",modelValue:m.value,"onUpdate:modelValue":fe[16]||(fe[16]=at=>m.value=at)},null,8,["modelValue"]),V(be,{type:"primary",loading:b.value,onClick:ot},{default:X(()=>fe[72]||(fe[72]=[Xe("保存")])),_:1},8,["loading"])])]),_:1},8,["modelValue"]),V(dt,{modelValue:l.value,"onUpdate:modelValue":fe[21]||(fe[21]=at=>l.value=at),title:"添加 Resend Token",width:"340",onClosed:Ue},{default:X(()=>[I("form",null,[V(tt,{style:{"margin-bottom":"15px"},modelValue:x.domain,"onUpdate:modelValue":fe[19]||(fe[19]=at=>x.domain=at),placeholder:"Select"},{default:X(()=>[(R(!0),Q(mt,null,en(y(v).domainList,at=>(R(),le(fn,{key:at,label:at,value:at},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),V(me,{type:"text",placeholder:"输入内容添加,不填则删除",modelValue:x.token,"onUpdate:modelValue":fe[20]||(fe[20]=at=>x.token=at)},null,8,["modelValue"]),V(be,{type:"primary",loading:b.value,onClick:Fe},{default:X(()=>fe[73]||(fe[73]=[Xe("保存")])),_:1},8,["loading"])])]),_:1},8,["modelValue"]),V(dt,{modelValue:u.value,"onUpdate:modelValue":fe[23]||(fe[23]=at=>u.value=at),title:"添加R2访问域名",width:"340",onClosed:fe[24]||(fe[24]=at=>w.value="")},{default:X(()=>[I("form",null,[V(me,{type:"text",placeholder:"R2访问域名",modelValue:w.value,"onUpdate:modelValue":fe[22]||(fe[22]=at=>w.value=at)},null,8,["modelValue"]),V(be,{type:"primary",loading:b.value,onClick:Le},{default:X(()=>fe[74]||(fe[74]=[Xe("保存")])),_:1},8,["loading"])])]),_:1},8,["modelValue"]),V(dt,{modelValue:c.value,"onUpdate:modelValue":fe[27]||(fe[27]=at=>c.value=at),title:"添加 Turnstile 密钥",width:"340",onClosed:fe[28]||(fe[28]=at=>{T.secretKey="",T.siteKey=""})},{default:X(()=>[I("form",null,[V(me,{type:"text",placeholder:"siteKey",modelValue:T.siteKey,"onUpdate:modelValue":fe[25]||(fe[25]=at=>T.siteKey=at)},null,8,["modelValue"]),V(me,{type:"text",style:{"margin-top":"15px"},placeholder:"secretKey",modelValue:T.secretKey,"onUpdate:modelValue":fe[26]||(fe[26]=at=>T.secretKey=at)},null,8,["modelValue"]),V(be,{type:"primary",loading:b.value,onClick:oe},{default:X(()=>fe[75]||(fe[75]=[Xe("保存")])),_:1},8,["loading"])])]),_:1},8,["modelValue"]),V(dt,{modelValue:a.value,"onUpdate:modelValue":fe[29]||(fe[29]=at=>a.value=at),title:"背景截图",class:"cut-dialog"},{default:X(()=>[I("div",Pfe,[V($t,{ref_key:"cropper",ref:n,img:r.value,fixedNumber:[16,9],outputType:"jpeg",fixed:!0,centerBox:!0,full:!0,autoCrop:!0,outputSize:.92},null,8,["img"])]),I("div",Ofe,[V(be,{type:"primary",loading:b.value,onClick:ve},{default:X(()=>fe[76]||(fe[76]=[Xe("保存")])),_:1},8,["loading"])])]),_:1},8,["modelValue"]),V(dt,{modelValue:f.value,"onUpdate:modelValue":fe[33]||(fe[33]=at=>f.value=at),title:"Telegram 机器人",class:"forward-dialog"},{header:X(()=>[I("div",Lfe,[fe[77]||(fe[77]=I("span",{class:"forward-set-title"},"Telegram 机器人",-1)),V(Ce,{effect:"dark",content:"可以将接收的邮件转发到Tg机器人"},{default:X(()=>[V(y(nt),{class:"warning",icon:"fe:warning",width:"18",height:"18"})]),_:1})])]),footer:X(()=>[I("div",Nfe,[V(ht,{modelValue:L.value,"onUpdate:modelValue":fe[32]||(fe[32]=at=>L.value=at),"active-value":0,"inactive-value":1,"active-text":"开启","inactive-text":"关闭"},null,8,["modelValue"]),V(be,{loading:b.value,type:"primary",onClick:se},{default:X(()=>fe[78]||(fe[78]=[Xe(" 保存 ")])),_:1},8,["loading"])])]),default:X(()=>[I("div",Rfe,[V(me,{placeholder:"机器人 token",modelValue:F.value,"onUpdate:modelValue":fe[30]||(fe[30]=at=>F.value=at)},null,8,["modelValue"]),V(rt,{"tag-type":"warning",placeholder:"用户 chat_id 多个用,分开 12345,54321",modelValue:A.value,"onUpdate:modelValue":fe[31]||(fe[31]=at=>A.value=at),onAddTag:de},null,8,["modelValue"])])]),_:1},8,["modelValue"]),V(dt,{modelValue:d.value,"onUpdate:modelValue":fe[36]||(fe[36]=at=>d.value=at),class:"forward-dialog"},{header:X(()=>[I("div",$fe,[fe[79]||(fe[79]=I("span",{class:"forward-set-title"},"第三方邮箱",-1)),V(Ce,{effect:"dark",content:"可以将邮件转到其他服务商邮箱,需要在cloudflare验证邮箱"},{default:X(()=>[V(y(nt),{class:"warning",icon:"fe:warning",width:"18",height:"18"})]),_:1})])]),footer:X(()=>[I("div",Ffe,[V(ht,{modelValue:U.value,"onUpdate:modelValue":fe[35]||(fe[35]=at=>U.value=at),"active-value":0,"inactive-value":1,"active-text":"开启","inactive-text":"关闭"},null,8,["modelValue"]),V(be,{loading:b.value,type:"primary",onClick:_e},{default:X(()=>fe[80]||(fe[80]=[Xe(" 保存 ")])),_:1},8,["loading"])])]),default:X(()=>[I("div",Bfe,[V(rt,{"tag-type":"warning",placeholder:"多个邮箱用, 分开 example1.com,example2.com",modelValue:H.value,"onUpdate:modelValue":fe[34]||(fe[34]=at=>H.value=at),onAddTag:ce},null,8,["modelValue"])])]),_:1},8,["modelValue"]),V(dt,{modelValue:h.value,"onUpdate:modelValue":fe[39]||(fe[39]=at=>h.value=at),class:"forward-dialog"},{header:X(()=>[I("div",Vfe,[fe[81]||(fe[81]=I("span",{class:"forward-set-title"},"转发规则",-1)),V(Ce,{effect:"dark",content:"规则转发只会转发设置邮箱所接收的邮件"},{default:X(()=>[V(y(nt),{class:"warning",icon:"fe:warning",width:"18",height:"18"})]),_:1})])]),footer:X(()=>[I("div",Hfe,[V(nr,{modelValue:z.value,"onUpdate:modelValue":fe[38]||(fe[38]=at=>z.value=at)},{default:X(()=>[V(Qn,{value:0},{default:X(()=>fe[82]||(fe[82]=[Xe("全部转发")])),_:1}),V(Qn,{value:1},{default:X(()=>fe[83]||(fe[83]=[Xe("规则转发")])),_:1})]),_:1},8,["modelValue"]),V(be,{loading:b.value,type:"primary",onClick:pe},{default:X(()=>fe[84]||(fe[84]=[Xe(" 保存 ")])),_:1},8,["loading"])])]),default:X(()=>[I("div",zfe,[V(rt,{placeholder:"多个邮箱用, 分开 example1.com,example2.com","tag-type":"success",modelValue:$.value,"onUpdate:modelValue":fe[37]||(fe[37]=at=>$.value=at),onAddTag:ie},null,8,["modelValue"])])]),_:1},8,["modelValue"]),V(dt,{class:"resend-table",modelValue:p.value,"onUpdate:modelValue":fe[40]||(fe[40]=at=>p.value=at),title:"Token 列表"},{default:X(()=>[V(xr,{data:O.value},{default:X(()=>[V(vr,{"min-width":P.value,property:"key",label:"域名","show-overflow-tooltip":!0},null,8,["min-width"]),V(vr,{width:N.value,property:"value",label:"token",fixed:"right","show-overflow-tooltip":!0},null,8,["width"])]),_:1},8,["data"])]),_:1},8,["modelValue"])]),_:1}))])}}}),Ufe=Jn(Wfe,[["__scopeId","data-v-7ccbc2d3"]]),Kfe=Object.freeze(Object.defineProperty({__proto__:null,default:Ufe},Symbol.toStringTag,{value:"Module"}));function jfe(e){return Gt.get("/regKey/list",{params:{...e}})}function Yfe(e){return Gt.post("/regKey/add",e)}function Gfe(e){return Gt.delete("/regKey/delete?regKeyIds="+e)}function qfe(){return Gt.delete("/regKey/clearNotUse")}function Xfe(e){return Gt.get("/regKey/history",{params:{regKeyId:e}})}const Zfe={class:"reg-key"},Jfe={class:"header-actions"},Qfe={class:"search"},ede={class:"code-box"},tde={class:"code-item"},nde={class:"code-info"},rde={class:"info-left"},ade={class:"info-left-item"},ide=["onClick"],ode={class:"info-left-item"},sde={key:0},lde={class:"info-left-item"},ude={class:"info-left-item"},cde={key:0},fde={class:"info-right"},dde={key:0,class:"empty"},hde={class:"container"},pde=Object.assign({name:"reg-key"},{__name:"index",setup(e){const t=kx();La();const n=Ut({code:""}),r=Ut([]),a=j(!1),i=j(!1),o=j(!0),s=j(!0),l=j(!1),u=Ut([]),c=j(0),f=j(0),d=j(!1),h=window.innerWidth<1025,p=Ut({code:"",count:1,roleId:null,expireTime:null}),v=Ut([]);C(!0),Zd().then(U=>{r.length=0,r.push(...U)}),je(()=>t.refresh,()=>{Zd().then(U=>{r.length=0,r.push(...U)})});function g(U){u.length=0,d.value=!0,Xfe(U.regKeyId).then(P=>{if(u.push(...P),P.length>0){const N=P.reduce(($,O)=>$.email.length>O.email.length?$:O).email;c.value=Im(N)+30,c.value=c.value<300?c.value:300;const z=P.reduce(($,O)=>$.createTime.length>O.email.createTime?$:O);f.value=Im(z)+30}}).finally(()=>{d.value=!1}),l.value=!0}function m(U){const P=Xd(U.createTime),N=kt().year();return P.year()===N?P.format("M月D日 HH:mm"):P.format("YYYY年M月D日 HH:mm")}function b(U){U=Xd(U);const P=kt().year();return U.year()===P?U.format("M月D日"):U.format("YYYY年M月D日")}function w(){n.code=null,C(!0)}function _(){C(!0)}function C(U=!1){U&&(o.value=!0),jfe(n).then(P=>{v.length=0,v.push(...P),o.value=!1,s.value=!1})}async function x(U){try{await navigator.clipboard.writeText(U),xt({message:"复制成功",type:"success",plain:!0})}catch(P){console.error("复制失败:",P),xt({message:"复制失败",type:"error",plain:!0})}}function T(){p.code=M()}function M(U=8){const P="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let N="";for(let z=0;z{qfe().then(()=>{xt({message:"清除成功",type:"success",plain:!0}),C()})})}function A(){if(!p.code){xt({message:"注册码不能为空",type:"error",plain:!0});return}if(!p.roleId){xt({message:"身份类型不能为空",type:"error",plain:!0});return}if(!p.expireTime){xt({message:"有效时间不能为空",type:"error",plain:!0});return}if(!p.count){xt({message:"使用次数不能为空",type:"error",plain:!0});return}a.value=!0,Yfe(p).then(()=>{i.value=!1,F(),xt({message:"添加成功",type:"success",plain:!0}),C()}).finally(()=>{a.value=!1})}function L(U){ua.confirm(`确认删除${U.code}吗?`,{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{Gfe([U.regKeyId]).then(()=>{C(),xt({message:"删除成功",type:"success",plain:!0})})})}function F(){p.code=""}function H(){T(),i.value=!0}return(U,P)=>{const N=Sr,z=Gu,$=Uy,O=Ky,W=lp,ee=jy,te=ya,re=kl,ce=Tl,ie=gX,de=nx,se=$r,_e=Cf,pe=Gy,$e=Yy;return R(),Q("div",Zfe,[I("div",Jfe,[V(y(nt),{class:"icon",icon:"ion:add-outline",width:"23",height:"23",onClick:H}),I("div",Qfe,[V(N,{modelValue:n.code,"onUpdate:modelValue":P[0]||(P[0]=De=>n.code=De),class:"search-input",placeholder:"输入注册码搜索"},null,8,["modelValue"])]),V(y(nt),{class:"icon",icon:"iconoir:search",onClick:_,width:"20",height:"20"}),V(y(nt),{class:"icon",icon:"ion:reload",width:"18",height:"18",onClick:w}),V(y(nt),{class:"icon",icon:"fluent:broom-sparkle-16-regular",width:"22",height:"22",onClick:E})]),V(te,{class:"scrollbar",style:Ft(`background: ${v.length>0?"#FAFCFF;":"#FFF"}`)},{default:X(()=>[I("div",{class:q(["loading",o.value?"loading-show":"loading-hide"])},[V(us)],2),I("div",ede,[(R(!0),Q(mt,null,en(v,De=>(R(),Q("div",tde,[I("div",nde,[I("div",rde,[I("div",ade,[I("span",{class:"code",onClick:Z=>x(De.code)},Ae(De.code),9,ide)]),I("div",ode,[P[8]||(P[8]=I("div",null,"剩余次数:",-1)),De.count?(R(),Q("div",sde,Ae(De.count),1)):(R(),le(z,{key:1,type:"danger"},{default:X(()=>P[7]||(P[7]=[Xe("已用尽")])),_:1}))]),I("div",lde,[P[9]||(P[9]=I("div",null,"权限身份:",-1)),V(z,null,{default:X(()=>[Xe(Ae(De.roleName),1)]),_:2},1024)]),I("div",ude,[P[11]||(P[11]=I("div",null,"有效至期:",-1)),De.expireTime?(R(),Q("div",cde,Ae(b(De.expireTime)),1)):(R(),le(z,{key:1,type:"danger"},{default:X(()=>P[10]||(P[10]=[Xe("已过期")])),_:1}))])]),I("div",fde,[V(W,{class:"setting"},{dropdown:X(()=>[V(O,null,{default:X(()=>[V($,{onClick:Z=>x(De.code)},{default:X(()=>P[12]||(P[12]=[Xe("复制")])),_:2},1032,["onClick"]),V($,{onClick:Z=>g(De)},{default:X(()=>P[13]||(P[13]=[Xe("记录")])),_:2},1032,["onClick"]),V($,{onClick:Z=>L(De)},{default:X(()=>P[14]||(P[14]=[Xe("删除")])),_:2},1032,["onClick"])]),_:2},1024)]),default:X(()=>[V(y(nt),{icon:"fluent:settings-24-filled",width:"21",height:"21",color:"#909399"})]),_:2},1024)])])]))),256))]),v.length===0?(R(),Q("div",dde,[s.value?ye("",!0):(R(),le(ee,{key:0,"image-size":h?120:0,description:"没有任何注册码"},null,8,["image-size"]))])):ye("",!0)]),_:1},8,["style"]),V(_e,{modelValue:i.value,"onUpdate:modelValue":P[5]||(P[5]=De=>i.value=De),title:"添加注册码"},{default:X(()=>[I("div",hde,[V(N,{modelValue:p.code,"onUpdate:modelValue":P[1]||(P[1]=De=>p.code=De),placeholder:"注册码"},{suffix:X(()=>[V(y(nt),{onClick:Pt(T,["stop"]),class:"gen-code",icon:"bitcoin-icons:refresh-filled",width:"24",height:"24"})]),_:1},8,["modelValue"]),V(ce,{modelValue:p.roleId,"onUpdate:modelValue":P[2]||(P[2]=De=>p.roleId=De),placeholder:"身份类型"},{default:X(()=>[(R(!0),Q(mt,null,en(r,De=>(R(),le(re,{label:De.name,value:De.roleId,key:De.roleId},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),V(ie,{modelValue:p.expireTime,"onUpdate:modelValue":P[3]||(P[3]=De=>p.expireTime=De),type:"date",placeholder:"有效至期"},null,8,["modelValue"]),V(de,{modelValue:p.count,"onUpdate:modelValue":P[4]||(P[4]=De=>p.count=De),min:1,max:99999},null,8,["modelValue"]),V(se,{class:"btn",type:"primary",onClick:A,loading:a.value},{default:X(()=>P[15]||(P[15]=[Xe("添加 ")])),_:1},8,["loading"])])]),_:1},8,["modelValue"]),V(_e,{class:"history-list",modelValue:l.value,"onUpdate:modelValue":P[6]||(P[6]=De=>l.value=De),title:"使用记录"},{default:X(()=>[I("div",{class:q(["loading",d.value?"loading-show":"loading-hide"])},[V(us)],2),d.value?ye("",!0):(R(),le($e,{key:0,data:u,fit:!0,style:{height:"100%"}},{default:X(()=>[V(pe,{"min-width":c.value,property:"email",label:"用户","show-overflow-tooltip":!0},null,8,["min-width"]),V(pe,{width:f.value,formatter:m,property:"createTime",label:"时间",fixed:"right","show-overflow-tooltip":!0},null,8,["width"])]),_:1},8,["data"]))]),_:1},8,["modelValue"])])}}}),vde=Jn(pde,[["__scopeId","data-v-8a0c0f4e"]]),gde=Object.freeze(Object.defineProperty({__proto__:null,default:vde},Symbol.toStringTag,{value:"Module"})),mde={class:"email-list-box"},yde={style:{color:"#333",display:"flex"}},bde=Object.assign({name:"sys-email"},{__name:"index",setup(e){const t=Ml(),n=j({}),r=j(""),a=j(),i=()=>{a.value.toggleMenu()},o=Ut({timeSort:0,type:"receive",userEmail:null,accountEmail:null,name:null,subject:null,searchType:"name"}),s=Y(()=>{if(o.searchType==="user")return"用户";if(o.searchType==="account")return"邮箱";if(o.searchType==="name")return"发件人";if(o.searchType==="subject")return"主题"}),l=localStorage.getItem("sys-email-params");if(l){const p=JSON.parse(l);o.type=p.type,o.timeSort=p.timeSort,o.status=p.status,o.searchType=p.searchType}je(()=>o,()=>{localStorage.setItem("sys-email-params",JSON.stringify(o))},{deep:!0});function u(){r.value=null,o.timeSort=0,o.type="receive",o.userEmail=null,o.accountEmail=null,o.name=null,o.subject=null,o.searchType="name"}function c(){o.userEmail=null,o.accountEmail=null,o.name=null,o.subject=null,o.searchType==="user"&&(o.userEmail=r.value),o.searchType==="account"&&(o.accountEmail=r.value),o.searchType==="name"&&(o.name=r.value),o.searchType==="subject"&&(o.subject=r.value),n.value.refreshList()}function f(){o.timeSort=o.timeSort?0:1,n.value.refreshList()}function d(p){t.contentData.email=p,t.contentData.delType="physics",t.contentData.showStar=!1,t.contentData.showReply=!1,jn.push("/content")}function h(p,v){return Fle({emailId:p,size:v,...o})}return(p,v)=>{const g=kl,m=Tl,b=Sr;return R(),Q("div",mde,[V(hp,{ref_key:"sysEmailScroll",ref:n,"get-emailList":h,"email-delete":y(y$),"star-add":y(Ef),"star-cancel":y(Mf),"show-star":!1,"show-user-info":"","show-status":"",actionLeft:"4px","show-account-icon":!1,onJump:d,onRefreshBefore:u,type:"sys-email"},{first:X(()=>[V(b,{modelValue:r.value,"onUpdate:modelValue":v[1]||(v[1]=w=>r.value=w),placeholder:"输入内容查询",class:"search-input"},{prefix:X(()=>[I("div",{onClick:Pt(i,["stop"])},[V(m,{ref_key:"mySelect",ref:a,modelValue:o.searchType,"onUpdate:modelValue":v[0]||(v[0]=w=>o.searchType=w),placeholder:"请选择",class:"select"},{default:X(()=>[V(g,{key:"3",label:"发件人",value:"name"}),V(g,{key:"4",label:"主题",value:"subject"}),V(g,{key:"1",label:"用户",value:"user"}),V(g,{key:"2",label:"邮箱",value:"account"})]),_:1},8,["modelValue"]),I("div",yde,[I("span",null,Ae(s.value),1),V(y(nt),{class:"setting-icon",icon:"mingcute:down-small-fill",width:"20",height:"20"})])])]),_:1},8,["modelValue"]),V(m,{modelValue:o.type,"onUpdate:modelValue":v[2]||(v[2]=w=>o.type=w),placeholder:"Select",class:"status-select"},{default:X(()=>[V(g,{key:"1",label:"全部",value:"all"}),V(g,{key:"3",label:"已接收",value:"receive"}),V(g,{key:"2",label:"已发送",value:"send"}),V(g,{key:"4",label:"已删除",value:"delete"}),V(g,{key:"4",label:"无人收件",value:"noone"})]),_:1},8,["modelValue"]),V(y(nt),{class:"icon",icon:"iconoir:search",onClick:c,width:"20",height:"20"}),o.timeSort===0?(R(),le(y(nt),{key:0,class:"icon",onClick:f,icon:"material-symbols-light:timer-arrow-down-outline",width:"28",height:"28"})):(R(),le(y(nt),{key:1,class:"icon",onClick:f,icon:"material-symbols-light:timer-arrow-up-outline",width:"28",height:"28"}))]),_:1},8,["email-delete","star-add","star-cancel"])])}}}),_de=Jn(bde,[["__scopeId","data-v-a19439f3"]]),wde=Object.freeze(Object.defineProperty({__proto__:null,default:_de},Symbol.toStringTag,{value:"Module"}));function Sde(e){return py()?(vy(e),!0):!1}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function Cde(e,t=!1,n="Timeout"){return new Promise((r,a)=>{setTimeout(t?()=>a(n):r,e)})}function xde(e){return e}function Tde([e,t,n,r]){const a=(c,f)=>1-3*f+3*c,i=(c,f)=>3*f-6*c,o=c=>3*c,s=(c,f,d)=>((a(f,d)*c+i(f,d))*c+o(f))*c,l=(c,f,d)=>3*a(f,d)*c*c+2*i(f,d)*c+o(f),u=c=>{let f=c;for(let d=0;d<4;++d){const h=l(f,e,n);if(h===0)return f;const p=s(f,e,n)-c;f-=p/h}return f};return c=>e===t&&n===r?c:s(u(c),t,r)}function lA(e,t,n){return e+n*(t-e)}function r_(e){return(typeof e=="number"?[e]:e)||[]}function kde(e,t,n,r={}){var a,i;const o=ii(t),s=ii(n),l=r_(o),u=r_(s),c=(a=ii(r.duration))!=null?a:1e3,f=Date.now(),d=Date.now()+c,h=typeof r.transition=="function"?r.transition:(i=ii(r.transition))!=null?i:xde,p=typeof h=="function"?h:Tde(h);return new Promise(v=>{e.value=o;const g=()=>{var m;if((m=r.abort)!=null&&m.call(r)){v();return}const b=Date.now(),w=p((b-f)/c),_=r_(e.value).map((C,x)=>lA(l[x],u[x],w));Array.isArray(e.value)?e.value=_.map((C,x)=>{var T,M;return lA((T=l[x])!=null?T:0,(M=u[x])!=null?M:0,w)}):typeof e.value=="number"&&(e.value=_[0]),b{const i=ii(e);return typeof i=="number"?i:i.map(ii)},a=j(r());return je(r,async i=>{var o,s;if(ii(t.disabled))return;const l=++n;if(t.delay&&await Cde(ii(t.delay)),l!==n)return;const u=Array.isArray(i)?i.map(ii):ii(i);(o=t.onStarted)==null||o.call(t),await kde(a,a.value,u,{...t,abort:()=>{var c;return l!==n||((c=t.abort)==null?void 0:c.call(t))}}),(s=t.onFinished)==null||s.call(t)},{deep:!0}),je(()=>ii(t.disabled),i=>{i&&(n++,a.value=r())}),Sde(()=>{n++}),Y(()=>ii(t.disabled)?r():a.value)}/*! ***************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Nw=function(e,t){return Nw=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])},Nw(e,t)};function Yt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Nw(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Ede=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),Mde=function(){function e(){this.browser=new Ede,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return e}(),Xt=new Mde;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Xt.wxa=!0,Xt.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?Xt.worker=!0:!Xt.hasGlobalWindow||"Deno"in window?(Xt.node=!0,Xt.svgSupported=!0):Ade(navigator.userAgent,Xt);function Ade(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),a=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),i=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);r&&(n.firefox=!0,n.version=r[1]),a&&(n.ie=!0,n.version=a[1]),i&&(n.edge=!0,n.version=i[1],n.newEdge=+i[1].split(".")[0]>18),o&&(n.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,t.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported=typeof document<"u";var s=document.documentElement.style;t.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}var Ex=12,Ide="sans-serif",$u=Ex+"px "+Ide,Dde=20,Pde=100,Ode="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function Lde(e){var t={};if(typeof JSON>"u")return t;for(var n=0;n=0)s=o*n.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",r[l]+":0",a[u]+":0",r[1-l]+":auto",a[1-u]+":auto",""].join("!important;"),e.appendChild(o),n.push(o)}return n}function lhe(e,t,n){for(var r=n?"invTrans":"trans",a=t[r],i=t.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=e[u].getBoundingClientRect(),f=2*u,d=c.left,h=c.top;o.push(d,h),l=l&&i&&d===i[f]&&h===i[f+1],s.push(e[u].offsetLeft,e[u].offsetTop)}return l&&a?a:(t.srcCoords=o,t[r]=n?cA(s,o):cA(o,s))}function P$(e){return e.nodeName.toUpperCase()==="CANVAS"}var uhe=/([&<>"'])/g,che={"&":"&","<":"<",">":">",'"':""","'":"'"};function la(e){return e==null?"":(e+"").replace(uhe,function(t,n){return che[n]})}var fhe=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,i_=[],dhe=Xt.browser.firefox&&+Xt.browser.version.split(".")[0]<39;function Hw(e,t,n,r){return n=n||{},r?dA(e,t,n):dhe&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX!=null?(n.zrX=t.offsetX,n.zrY=t.offsetY):dA(e,t,n),n}function dA(e,t,n){if(Xt.domSupported&&e.getBoundingClientRect){var r=t.clientX,a=t.clientY;if(P$(e)){var i=e.getBoundingClientRect();n.zrX=r-i.left,n.zrY=a-i.top;return}else if(zw(i_,e,r,a)){n.zrX=i_[0],n.zrY=i_[1];return}}n.zrX=n.zrY=0}function Nx(e){return e||window.event}function ri(e,t,n){if(t=Nx(t),t.zrX!=null)return t;var r=t.type,a=r&&r.indexOf("touch")>=0;if(a){var o=r!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&Hw(e,o,t,n)}else{Hw(e,t,t,n);var i=hhe(t);t.zrDelta=i?i/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&fhe.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function hhe(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var a=Math.abs(r!==0?r:n),i=r>0?-1:r<0?1:n>0?-1:1;return 3*a*i}function phe(e,t,n,r){e.addEventListener(t,n,r)}function vhe(e,t,n,r){e.removeEventListener(t,n,r)}var O$=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0},ghe=function(){function e(){this._track=[]}return e.prototype.recognize=function(t,n,r){return this._doTrack(t,n,r),this._recognize(t)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(t,n,r){var a=t.touches;if(a){for(var i={points:[],touches:[],target:n,event:t},o=0,s=a.length;o1&&r&&r.length>1){var i=hA(r)/hA(a);!isFinite(i)&&(i=1),t.pinchScale=i;var o=mhe(r);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:e[0].target,event:t}}}}};function rl(){return[1,0,0,1,0,0]}function gp(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function $x(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function al(e,t,n){var r=t[0]*n[0]+t[2]*n[1],a=t[1]*n[0]+t[3]*n[1],i=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],l=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=a,e[2]=i,e[3]=o,e[4]=s,e[5]=l,e}function Rm(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function c0(e,t,n,r){r===void 0&&(r=[0,0]);var a=t[0],i=t[2],o=t[4],s=t[1],l=t[3],u=t[5],c=Math.sin(n),f=Math.cos(n);return e[0]=a*f+s*c,e[1]=-a*c+s*f,e[2]=i*f+l*c,e[3]=-i*c+f*l,e[4]=f*(o-r[0])+c*(u-r[1])+r[0],e[5]=f*(u-r[1])-c*(o-r[0])+r[1],e}function L$(e,t,n){var r=n[0],a=n[1];return e[0]=t[0]*r,e[1]=t[1]*a,e[2]=t[2]*r,e[3]=t[3]*a,e[4]=t[4]*r,e[5]=t[5]*a,e}function mp(e,t){var n=t[0],r=t[2],a=t[4],i=t[1],o=t[3],s=t[5],l=n*o-i*r;return l?(l=1/l,e[0]=o*l,e[1]=-i*l,e[2]=-r*l,e[3]=n*l,e[4]=(r*s-o*a)*l,e[5]=(i*a-n*s)*l,e):null}function yhe(e){var t=rl();return $x(t,e),t}const bhe=Object.freeze(Object.defineProperty({__proto__:null,clone:yhe,copy:$x,create:rl,identity:gp,invert:mp,mul:al,rotate:c0,scale:L$,translate:Rm},Symbol.toStringTag,{value:"Module"}));var Qt=function(){function e(t,n){this.x=t||0,this.y=n||0}return e.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(t,n){return this.x=t,this.y=n,this},e.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},e.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},e.prototype.scale=function(t){this.x*=t,this.y*=t},e.prototype.scaleAndAdd=function(t,n){this.x+=t.x*n,this.y+=t.y*n},e.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},e.prototype.dot=function(t){return this.x*t.x+this.y*t.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},e.prototype.distance=function(t){var n=this.x-t.x,r=this.y-t.y;return Math.sqrt(n*n+r*r)},e.prototype.distanceSquare=function(t){var n=this.x-t.x,r=this.y-t.y;return n*n+r*r},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(t){if(t){var n=this.x,r=this.y;return this.x=t[0]*n+t[2]*r+t[4],this.y=t[1]*n+t[3]*r+t[5],this}},e.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},e.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},e.set=function(t,n,r){t.x=n,t.y=r},e.copy=function(t,n){t.x=n.x,t.y=n.y},e.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},e.lenSquare=function(t){return t.x*t.x+t.y*t.y},e.dot=function(t,n){return t.x*n.x+t.y*n.y},e.add=function(t,n,r){t.x=n.x+r.x,t.y=n.y+r.y},e.sub=function(t,n,r){t.x=n.x-r.x,t.y=n.y-r.y},e.scale=function(t,n,r){t.x=n.x*r,t.y=n.y*r},e.scaleAndAdd=function(t,n,r,a){t.x=n.x+r.x*a,t.y=n.y+r.y*a},e.lerp=function(t,n,r,a){var i=1-a;t.x=i*n.x+a*r.x,t.y=i*n.y+a*r.y},e}(),vv=Math.min,gv=Math.max,Wl=new Qt,Ul=new Qt,Kl=new Qt,jl=new Qt,Qf=new Qt,ed=new Qt,Sn=function(){function e(t,n,r,a){r<0&&(t=t+r,r=-r),a<0&&(n=n+a,a=-a),this.x=t,this.y=n,this.width=r,this.height=a}return e.prototype.union=function(t){var n=vv(t.x,this.x),r=vv(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=gv(t.x+t.width,this.x+this.width)-n:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=gv(t.y+t.height,this.y+this.height)-r:this.height=t.height,this.x=n,this.y=r},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(t){var n=this,r=t.width/n.width,a=t.height/n.height,i=rl();return Rm(i,i,[-n.x,-n.y]),L$(i,i,[r,a]),Rm(i,i,[t.x,t.y]),i},e.prototype.intersect=function(t,n){if(!t)return!1;t instanceof e||(t=e.create(t));var r=this,a=r.x,i=r.x+r.width,o=r.y,s=r.y+r.height,l=t.x,u=t.x+t.width,c=t.y,f=t.y+t.height,d=!(ip&&(p=w,vp&&(p=_,m=r.x&&t<=r.x+r.width&&n>=r.y&&n<=r.y+r.height},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(t,n){t.x=n.x,t.y=n.y,t.width=n.width,t.height=n.height},e.applyTransform=function(t,n,r){if(!r){t!==n&&e.copy(t,n);return}if(r[1]<1e-5&&r[1]>-1e-5&&r[2]<1e-5&&r[2]>-1e-5){var a=r[0],i=r[3],o=r[4],s=r[5];t.x=n.x*a+o,t.y=n.y*i+s,t.width=n.width*a,t.height=n.height*i,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}Wl.x=Kl.x=n.x,Wl.y=jl.y=n.y,Ul.x=jl.x=n.x+n.width,Ul.y=Kl.y=n.y+n.height,Wl.transform(r),jl.transform(r),Ul.transform(r),Kl.transform(r),t.x=vv(Wl.x,Ul.x,Kl.x,jl.x),t.y=vv(Wl.y,Ul.y,Kl.y,jl.y);var l=gv(Wl.x,Ul.x,Kl.x,jl.x),u=gv(Wl.y,Ul.y,Kl.y,jl.y);t.width=l-t.x,t.height=u-t.y},e}(),R$="silent";function _he(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:whe}}function whe(){O$(this.event)}var She=function(e){zn(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.handler=null,n}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Lo),td=function(){function e(t,n){this.x=t,this.y=n}return e}(),Che=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],s_=new Sn(0,0,0,0),N$=function(e){zn(t,e);function t(n,r,a,i,o){var s=e.call(this)||this;return s._hovered=new td(0,0),s.storage=n,s.painter=r,s.painterRoot=i,s._pointerSize=o,a=a||new She,s.proxy=null,s.setHandlerProxy(a),s._draggingMgr=new ahe(s),s}return t.prototype.setHandlerProxy=function(n){this.proxy&&this.proxy.dispose(),n&&(he(Che,function(r){n.on&&n.on(r,this[r],this)},this),n.handler=this),this.proxy=n},t.prototype.mousemove=function(n){var r=n.zrX,a=n.zrY,i=$$(this,r,a),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=i?new td(r,a):this.findHover(r,a),u=l.target,c=this.proxy;c.setCursor&&c.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",n),this.dispatchToElement(l,"mousemove",n),u&&u!==s&&this.dispatchToElement(l,"mouseover",n)},t.prototype.mouseout=function(n){var r=n.zrEventControl;r!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",n),r!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:n})},t.prototype.resize=function(){this._hovered=new td(0,0)},t.prototype.dispatch=function(n,r){var a=this[n];a&&a.call(this,r)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(n){var r=this.proxy;r.setCursor&&r.setCursor(n)},t.prototype.dispatchToElement=function(n,r,a){n=n||{};var i=n.target;if(!(i&&i.silent)){for(var o="on"+r,s=_he(r,n,a);i&&(i[o]&&(s.cancelBubble=!!i[o].call(i,s)),i.trigger(r,s),i=i.__hostTarget?i.__hostTarget:i.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(r,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(r,s)}))}},t.prototype.findHover=function(n,r,a){var i=this.storage.getDisplayList(),o=new td(n,r);if(pA(i,o,n,r,a),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,c=new Sn(n-u,r-u,l,l),f=i.length-1;f>=0;f--){var d=i[f];d!==a&&!d.ignore&&!d.ignoreCoarsePointer&&(!d.parent||!d.parent.ignoreCoarsePointer)&&(s_.copy(d.getBoundingRect()),d.transform&&s_.applyTransform(d.transform),s_.intersect(c)&&s.push(d))}if(s.length)for(var h=4,p=Math.PI/12,v=Math.PI*2,g=0;g4)return;this._downPoint=null}this.dispatchToElement(i,e,t)}});function xhe(e,t,n){if(e[e.rectHover?"rectContain":"contain"](t,n)){for(var r=e,a=void 0,i=!1;r;){if(r.ignoreClip&&(i=!0),!i){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(a=!0);var s=r.__hostTarget;r=s||r.parent}return a?R$:!0}return!1}function pA(e,t,n,r,a){for(var i=e.length-1;i>=0;i--){var o=e[i],s=void 0;if(o!==a&&!o.ignore&&(s=xhe(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==R$)){t.target=o;break}}}function $$(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var B$=32,nd=7;function The(e){for(var t=0;e>=B$;)t|=e&1,e>>=1;return e+t}function vA(e,t,n,r){var a=t+1;if(a===n)return 1;if(r(e[a++],e[t])<0){for(;a=0;)a++;return a-t}function khe(e,t,n){for(n--;t>>1,a(i,e[l])<0?s=l:o=l+1;var u=r-o;switch(u){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;u>0;)e[o+u]=e[o+u-1],u--}e[o]=i}}function l_(e,t,n,r,a,i){var o=0,s=0,l=1;if(i(e,t[n+a])>0){for(s=r-a;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}else{for(s=a+1;ls&&(l=s);var u=o;o=a-l,l=a-u}for(o++;o>>1);i(e,t[n+c])>0?o=c+1:l=c}return l}function u_(e,t,n,r,a,i){var o=0,s=0,l=1;if(i(e,t[n+a])<0){for(s=a+1;ls&&(l=s);var u=o;o=a-l,l=a-u}else{for(s=r-a;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}for(o++;o>>1);i(e,t[n+c])<0?l=c:o=c+1}return l}function Ehe(e,t){var n=nd,r,a,i=0,o=[];r=[],a=[];function s(h,p){r[i]=h,a[i]=p,i+=1}function l(){for(;i>1;){var h=i-2;if(h>=1&&a[h-1]<=a[h]+a[h+1]||h>=2&&a[h-2]<=a[h]+a[h-1])a[h-1]a[h+1])break;c(h)}}function u(){for(;i>1;){var h=i-2;h>0&&a[h-1]=nd||T>=nd);if(M)break;C<0&&(C=0),C+=2}if(n=C,n<1&&(n=1),p===1){for(m=0;m=0;m--)e[x+m]=e[C+m];e[_]=o[w];return}for(var T=n;;){var M=0,E=0,A=!1;do if(t(o[w],e[b])<0){if(e[_--]=e[b--],M++,E=0,--p===0){A=!0;break}}else if(e[_--]=o[w--],E++,M=0,--g===1){A=!0;break}while((M|E)=0;m--)e[x+m]=e[C+m];if(p===0){A=!0;break}}if(e[_--]=o[w--],--g===1){A=!0;break}if(E=g-l_(e[b],o,0,g,g-1,t),E!==0){for(_-=E,w-=E,g-=E,x=_+1,C=w+1,m=0;m=nd||E>=nd);if(A)break;T<0&&(T=0),T+=2}if(n=T,n<1&&(n=1),g===1){for(_-=p,b-=p,x=_+1,C=b+1,m=p-1;m>=0;m--)e[x+m]=e[C+m];e[_]=o[w]}else{if(g===0)throw new Error;for(C=_-(g-1),m=0;ms&&(l=s),gA(e,n,n+l,n+i,t),i=l}o.pushRun(n,i),o.mergeRuns(),a-=i,n+=i}while(a!==0);o.forceMergeRuns()}}var To=1,Og=2,xd=4,mA=!1;function c_(){mA||(mA=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function yA(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Mhe=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=yA}return e.prototype.traverse=function(t,n){for(var r=0;r0&&(c.__clipPaths=[]),isNaN(c.z)&&(c_(),c.z=0),isNaN(c.z2)&&(c_(),c.z2=0),isNaN(c.zlevel)&&(c_(),c.zlevel=0),this._displayList[this._displayListLen++]=c}var f=t.getDecalElement&&t.getDecalElement();f&&this._updateAndAddDisplayable(f,n,r);var d=t.getTextGuideLine();d&&this._updateAndAddDisplayable(d,n,r);var h=t.getTextContent();h&&this._updateAndAddDisplayable(h,n,r)}},e.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},e.prototype.delRoot=function(t){if(t instanceof Array){for(var n=0,r=t.length;n=0&&this._roots.splice(a,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),Nm;Nm=Xt.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};var Jd={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:Math.pow(1024,e-1)},exponentialOut:function(e){return e===1?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)):n*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-Jd.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?Jd.bounceIn(e*2)*.5:Jd.bounceOut(e*2-1)*.5+.5}},mv=Math.pow,il=Math.sqrt,F$=1e-8,V$=1e-4,bA=il(3),yv=1/3,vo=Xu(),ui=Xu(),Fc=Xu();function Xs(e){return e>-1e-8&&eF$||e<-1e-8}function Lr(e,t,n,r,a){var i=1-a;return i*i*(i*e+3*a*t)+a*a*(a*r+3*i*n)}function _A(e,t,n,r,a){var i=1-a;return 3*(((t-e)*i+2*(n-t)*a)*i+(r-n)*a*a)}function $m(e,t,n,r,a,i){var o=r+3*(t-n)-e,s=3*(n-t*2+e),l=3*(t-e),u=e-a,c=s*s-3*o*l,f=s*l-9*o*u,d=l*l-3*s*u,h=0;if(Xs(c)&&Xs(f))if(Xs(s))i[0]=0;else{var p=-l/s;p>=0&&p<=1&&(i[h++]=p)}else{var v=f*f-4*c*d;if(Xs(v)){var g=f/c,p=-s/o+g,m=-g/2;p>=0&&p<=1&&(i[h++]=p),m>=0&&m<=1&&(i[h++]=m)}else if(v>0){var b=il(v),w=c*s+1.5*o*(-f+b),_=c*s+1.5*o*(-f-b);w<0?w=-mv(-w,yv):w=mv(w,yv),_<0?_=-mv(-_,yv):_=mv(_,yv);var p=(-s-(w+_))/(3*o);p>=0&&p<=1&&(i[h++]=p)}else{var C=(2*c*s-3*o*f)/(2*il(c*c*c)),x=Math.acos(C)/3,T=il(c),M=Math.cos(x),p=(-s-2*T*M)/(3*o),m=(-s+T*(M+bA*Math.sin(x)))/(3*o),E=(-s+T*(M-bA*Math.sin(x)))/(3*o);p>=0&&p<=1&&(i[h++]=p),m>=0&&m<=1&&(i[h++]=m),E>=0&&E<=1&&(i[h++]=E)}}return h}function H$(e,t,n,r,a){var i=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,l=0;if(Xs(o)){if(z$(i)){var u=-s/i;u>=0&&u<=1&&(a[l++]=u)}}else{var c=i*i-4*o*s;if(Xs(c))a[0]=-i/(2*o);else if(c>0){var f=il(c),u=(-i+f)/(2*o),d=(-i-f)/(2*o);u>=0&&u<=1&&(a[l++]=u),d>=0&&d<=1&&(a[l++]=d)}}return l}function Bm(e,t,n,r,a,i){var o=(t-e)*a+e,s=(n-t)*a+t,l=(r-n)*a+n,u=(s-o)*a+o,c=(l-s)*a+s,f=(c-u)*a+u;i[0]=e,i[1]=o,i[2]=u,i[3]=f,i[4]=f,i[5]=c,i[6]=l,i[7]=r}function Ahe(e,t,n,r,a,i,o,s,l,u,c){var f,d=.005,h=1/0,p,v,g,m;vo[0]=l,vo[1]=u;for(var b=0;b<1;b+=.05)ui[0]=Lr(e,n,a,o,b),ui[1]=Lr(t,r,i,s,b),g=Eu(vo,ui),g=0&&g=0&&u<=1&&(a[l++]=u)}}else{var c=o*o-4*i*s;if(Xs(c)){var u=-o/(2*i);u>=0&&u<=1&&(a[l++]=u)}else if(c>0){var f=il(c),u=(-o+f)/(2*i),d=(-o-f)/(2*i);u>=0&&u<=1&&(a[l++]=u),d>=0&&d<=1&&(a[l++]=d)}}return l}function W$(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function Fm(e,t,n,r,a){var i=(t-e)*r+e,o=(n-t)*r+t,s=(o-i)*r+i;a[0]=e,a[1]=i,a[2]=s,a[3]=s,a[4]=o,a[5]=n}function Phe(e,t,n,r,a,i,o,s,l){var u,c=.005,f=1/0;vo[0]=o,vo[1]=s;for(var d=0;d<1;d+=.05){ui[0]=xa(e,n,a,d),ui[1]=xa(t,r,i,d);var h=Eu(vo,ui);h=0&&h=1?1:$m(0,r,i,1,l,s)&&Lr(0,a,o,1,s[0])}}}var Rhe=function(){function e(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||da,this.ondestroy=t.ondestroy||da,this.onrestart=t.onrestart||da,t.easing&&this.setEasing(t.easing)}return e.prototype.step=function(t,n){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=n;return}var r=this._life,a=t-this._startTime-this._pausedTime,i=a/r;i<0&&(i=0),i=Math.min(i,1);var o=this.easingFunc,s=o?o(i):i;if(this.onframe(s),i===1)if(this.loop){var l=a%r;this._startTime=t-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(t){this.easing=t,this.easingFunc=Jt(t)?t:Jd[t]||U$(t)},e}(),K$=function(){function e(t){this.value=t}return e}(),Nhe=function(){function e(){this._len=0}return e.prototype.insert=function(t){var n=new K$(t);return this.insertEntry(n),n},e.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},e.prototype.remove=function(t){var n=t.prev,r=t.next;n?n.next=r:this.head=r,r?r.prev=n:this.tail=n,t.next=t.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),yp=function(){function e(t){this._list=new Nhe,this._maxSize=10,this._map={},this._maxSize=t}return e.prototype.put=function(t,n){var r=this._list,a=this._map,i=null;if(a[t]==null){var o=r.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=r.head;r.remove(l),delete a[l.key],i=l.value,this._lastRemovedEntry=l}s?s.value=n:s=new K$(n),s.key=t,r.insertEntry(s),a[t]=s}return i},e.prototype.get=function(t){var n=this._map[t],r=this._list;if(n!=null)return n!==r.tail&&(r.remove(n),r.insertEntry(n)),n.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),SA={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Ki(e){return e=Math.round(e),e<0?0:e>255?255:e}function $he(e){return e=Math.round(e),e<0?0:e>360?360:e}function Oh(e){return e<0?0:e>1?1:e}function f_(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?Ki(parseFloat(t)/100*255):Ki(parseInt(t,10))}function Mu(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?Oh(parseFloat(t)/100):Oh(parseFloat(t))}function d_(e,t,n){return n<0?n+=1:n>1&&(n-=1),n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function Zs(e,t,n){return e+(t-e)*n}function ti(e,t,n,r,a){return e[0]=t,e[1]=n,e[2]=r,e[3]=a,e}function Ww(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var j$=new yp(20),bv=null;function fc(e,t){bv&&Ww(bv,t),bv=j$.put(e,bv||t.slice())}function Ka(e,t){if(e){t=t||[];var n=j$.get(e);if(n)return Ww(t,n);e=e+"";var r=e.replace(/ /g,"").toLowerCase();if(r in SA)return Ww(t,SA[r]),fc(e,t),t;var a=r.length;if(r.charAt(0)==="#"){if(a===4||a===5){var i=parseInt(r.slice(1,4),16);if(!(i>=0&&i<=4095)){ti(t,0,0,0,1);return}return ti(t,(i&3840)>>4|(i&3840)>>8,i&240|(i&240)>>4,i&15|(i&15)<<4,a===5?parseInt(r.slice(4),16)/15:1),fc(e,t),t}else if(a===7||a===9){var i=parseInt(r.slice(1,7),16);if(!(i>=0&&i<=16777215)){ti(t,0,0,0,1);return}return ti(t,(i&16711680)>>16,(i&65280)>>8,i&255,a===9?parseInt(r.slice(7),16)/255:1),fc(e,t),t}return}var o=r.indexOf("("),s=r.indexOf(")");if(o!==-1&&s+1===a){var l=r.substr(0,o),u=r.substr(o+1,s-(o+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?ti(t,+u[0],+u[1],+u[2],1):ti(t,0,0,0,1);c=Mu(u.pop());case"rgb":if(u.length>=3)return ti(t,f_(u[0]),f_(u[1]),f_(u[2]),u.length===3?c:Mu(u[3])),fc(e,t),t;ti(t,0,0,0,1);return;case"hsla":if(u.length!==4){ti(t,0,0,0,1);return}return u[3]=Mu(u[3]),Uw(u,t),fc(e,t),t;case"hsl":if(u.length!==3){ti(t,0,0,0,1);return}return Uw(u,t),fc(e,t),t;default:return}}ti(t,0,0,0,1)}}function Uw(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=Mu(e[1]),a=Mu(e[2]),i=a<=.5?a*(r+1):a+r-a*r,o=a*2-i;return t=t||[],ti(t,Ki(d_(o,i,n+1/3)*255),Ki(d_(o,i,n)*255),Ki(d_(o,i,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function Bhe(e){if(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,a=Math.min(t,n,r),i=Math.max(t,n,r),o=i-a,s=(i+a)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(i+a):u=o/(2-i-a);var c=((i-t)/6+o/2)/o,f=((i-n)/6+o/2)/o,d=((i-r)/6+o/2)/o;t===i?l=d-f:n===i?l=1/3+c-d:r===i&&(l=2/3+f-c),l<0&&(l+=1),l>1&&(l-=1)}var h=[l*360,u,s];return e[3]!=null&&h.push(e[3]),h}}function Kw(e,t){var n=Ka(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return Al(n,n.length===4?"rgba":"rgb")}}function Fhe(e){var t=Ka(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}function Y$(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){n=n||[];var r=e*(t.length-1),a=Math.floor(r),i=Math.ceil(r),o=t[a],s=t[i],l=r-a;return n[0]=Ki(Zs(o[0],s[0],l)),n[1]=Ki(Zs(o[1],s[1],l)),n[2]=Ki(Zs(o[2],s[2],l)),n[3]=Oh(Zs(o[3],s[3],l)),n}}var Vhe=Y$;function Bx(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){var r=e*(t.length-1),a=Math.floor(r),i=Math.ceil(r),o=Ka(t[a]),s=Ka(t[i]),l=r-a,u=Al([Ki(Zs(o[0],s[0],l)),Ki(Zs(o[1],s[1],l)),Ki(Zs(o[2],s[2],l)),Oh(Zs(o[3],s[3],l))],"rgba");return n?{color:u,leftIndex:a,rightIndex:i,value:r}:u}}var zhe=Bx;function Hhe(e,t,n,r){var a=Ka(e);if(e)return a=Bhe(a),t!=null&&(a[0]=$he(t)),n!=null&&(a[1]=Mu(n)),r!=null&&(a[2]=Mu(r)),Al(Uw(a),"rgba")}function Whe(e,t){var n=Ka(e);if(n&&t!=null)return n[3]=Oh(t),Al(n,"rgba")}function Al(e,t){if(!(!e||!e.length)){var n=e[0]+","+e[1]+","+e[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(n+=","+e[3]),t+"("+n+")"}}function Lh(e,t){var n=Ka(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}function Uhe(){return Al([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],"rgb")}var CA=new yp(100);function jw(e){if(Bt(e)){var t=CA.get(e);return t||(t=Kw(e,-.1),CA.put(e,t)),t}else if(pp(e)){var n=ct({},e);return n.colorStops=zt(e.colorStops,function(r){return{offset:r.offset,color:Kw(r.color,-.1)}}),n}return e}const Khe=Object.freeze(Object.defineProperty({__proto__:null,fastLerp:Y$,fastMapToColor:Vhe,lerp:Bx,lift:Kw,liftColor:jw,lum:Lh,mapToColor:zhe,modifyAlpha:Whe,modifyHSL:Hhe,parse:Ka,random:Uhe,stringify:Al,toHex:Fhe},Symbol.toStringTag,{value:"Module"}));function jhe(e){return e.type==="linear"}function Yhe(e){return e.type==="radial"}(function(){return Xt.hasGlobalWindow&&Jt(window.btoa)?function(e){return window.btoa(unescape(encodeURIComponent(e)))}:typeof Buffer<"u"?function(e){return Buffer.from(e).toString("base64")}:function(e){return null}})();var Yw=Array.prototype.slice;function qo(e,t,n){return(t-e)*n+e}function h_(e,t,n,r){for(var a=t.length,i=0;ir?t:e,i=Math.min(n,r),o=a[i-1]||{color:[0,0,0,0],offset:0},s=i;so;if(s)r.length=o;else for(var l=i;l=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(t,n,r){this._needsSort=!0;var a=this.keyframes,i=a.length,o=!1,s=TA,l=n;if(va(n)){var u=Zhe(n);s=u,(u===1&&!Bn(n[0])||u===2&&!Bn(n[0][0]))&&(o=!0)}else if(Bn(n)&&!Ph(n))s=wv;else if(Bt(n))if(!isNaN(+n))s=wv;else{var c=Ka(n);c&&(l=c,s=Td)}else if(pp(n)){var f=ct({},l);f.colorStops=zt(n.colorStops,function(h){return{offset:h.offset,color:Ka(h.color)}}),jhe(n)?s=Gw:Yhe(n)&&(s=qw),l=f}i===0?this.valType=s:(s!==this.valType||s===TA)&&(o=!0),this.discrete=this.discrete||o;var d={time:t,value:l,rawValue:n,percent:0};return r&&(d.easing=r,d.easingFunc=Jt(r)?r:Jd[r]||U$(r)),a.push(d),d},e.prototype.prepare=function(t,n){var r=this.keyframes;this._needsSort&&r.sort(function(v,g){return v.time-g.time});for(var a=this.valType,i=r.length,o=r[i-1],s=this.discrete,l=Sv(a),u=kA(a),c=0;c=0&&!(o[c].percent<=n);c--);c=d(c,s-2)}else{for(c=f;cn);c++);c=d(c-1,s-2)}p=o[c+1],h=o[c]}if(h&&p){this._lastFr=c,this._lastFrP=n;var g=p.percent-h.percent,m=g===0?1:d((n-h.percent)/g,1);p.easingFunc&&(m=p.easingFunc(m));var b=r?this._additiveValue:u?rd:t[l];if((Sv(i)||u)&&!b&&(b=this._additiveValue=[]),this.discrete)t[l]=m<1?h.rawValue:p.rawValue;else if(Sv(i))i===Ng?h_(b,h[a],p[a],m):Ghe(b,h[a],p[a],m);else if(kA(i)){var w=h[a],_=p[a],C=i===Gw;t[l]={type:C?"linear":"radial",x:qo(w.x,_.x,m),y:qo(w.y,_.y,m),colorStops:zt(w.colorStops,function(T,M){var E=_.colorStops[M];return{offset:qo(T.offset,E.offset,m),color:Rg(h_([],T.color,E.color,m))}}),global:_.global},C?(t[l].x2=qo(w.x2,_.x2,m),t[l].y2=qo(w.y2,_.y2,m)):t[l].r=qo(w.r,_.r,m)}else if(u)h_(b,h[a],p[a],m),r||(t[l]=Rg(b));else{var x=qo(h[a],p[a],m);r?this._additiveValue=x:t[l]=x}r&&this._addToTarget(t)}}},e.prototype._addToTarget=function(t){var n=this.valType,r=this.propName,a=this._additiveValue;n===wv?t[r]=t[r]+a:n===Td?(Ka(t[r],rd),_v(rd,rd,a,1),t[r]=Rg(rd)):n===Ng?_v(t[r],t[r],a,1):n===G$&&xA(t[r],t[r],a,1)},e}(),Fx=function(){function e(t,n,r,a){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=n,n&&a){l0("Can' use additive animation on looped animation.");return}this._additiveAnimators=a,this._allowDiscrete=r}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(t){this._target=t},e.prototype.when=function(t,n,r){return this.whenWithKeys(t,n,Gn(n),r)},e.prototype.whenWithKeys=function(t,n,r,a){for(var i=this._tracks,o=0;o0&&l.addKeyframe(0,Lg(u),a),this._trackKeys.push(s)}l.addKeyframe(t,Lg(n[s]),a)}return this._maxTime=Math.max(this._maxTime,t),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var n=t.length,r=0;r0)){this._started=1;for(var n=this,r=[],a=this._maxTime||0,i=0;i1){var s=o.pop();i.addKeyframe(s.time,t[a]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}();function Ic(){return new Date().getTime()}var Qhe=function(e){zn(t,e);function t(n){var r=e.call(this)||this;return r._running=!1,r._time=0,r._pausedTime=0,r._pauseStart=0,r._paused=!1,n=n||{},r.stage=n.stage||{},r}return t.prototype.addClip=function(n){n.animation&&this.removeClip(n),this._head?(this._tail.next=n,n.prev=this._tail,n.next=null,this._tail=n):this._head=this._tail=n,n.animation=this},t.prototype.addAnimator=function(n){n.animation=this;var r=n.getClip();r&&this.addClip(r)},t.prototype.removeClip=function(n){if(n.animation){var r=n.prev,a=n.next;r?r.next=a:this._head=a,a?a.prev=r:this._tail=r,n.next=n.prev=n.animation=null}},t.prototype.removeAnimator=function(n){var r=n.getClip();r&&this.removeClip(r),n.animation=null},t.prototype.update=function(n){for(var r=Ic()-this._pausedTime,a=r-this._time,i=this._head;i;){var o=i.next,s=i.step(r,a);s&&(i.ondestroy(),this.removeClip(i)),i=o}this._time=r,n||(this.trigger("frame",a),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var n=this;this._running=!0;function r(){n._running&&(Nm(r),!n._paused&&n.update())}Nm(r)},t.prototype.start=function(){this._running||(this._time=Ic(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=Ic(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=Ic()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var n=this._head;n;){var r=n.next;n.prev=n.next=n.animation=null,n=r}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(n,r){r=r||{},this.start();var a=new Fx(n,r.loop);return this.addAnimator(a),a},t}(Lo),epe=300,p_=Xt.domSupported,v_=function(){var e=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},r=zt(e,function(a){var i=a.replace("mouse","pointer");return n.hasOwnProperty(i)?i:a});return{mouse:e,touch:t,pointer:r}}(),EA={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},MA=!1;function Xw(e){var t=e.pointerType;return t==="pen"||t==="touch"}function tpe(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function g_(e){e&&(e.zrByTouch=!0)}function npe(e,t){return ri(e.dom,new rpe(e,t),!0)}function q$(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var rpe=function(){function e(t,n){this.stopPropagation=da,this.stopImmediatePropagation=da,this.preventDefault=da,this.type=n.type,this.target=this.currentTarget=t.dom,this.pointerType=n.pointerType,this.clientX=n.clientX,this.clientY=n.clientY}return e}(),Li={mousedown:function(e){e=ri(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=ri(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",e)},mouseup:function(e){e=ri(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){e=ri(this.dom,e);var t=e.toElement||e.relatedTarget;q$(this,t)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){MA=!0,e=ri(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){MA||(e=ri(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){e=ri(this.dom,e),g_(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),Li.mousemove.call(this,e),Li.mousedown.call(this,e)},touchmove:function(e){e=ri(this.dom,e),g_(e),this.handler.processGesture(e,"change"),Li.mousemove.call(this,e)},touchend:function(e){e=ri(this.dom,e),g_(e),this.handler.processGesture(e,"end"),Li.mouseup.call(this,e),+new Date-+this.__lastTouchMomentlpe||e<-5e-5}var Gl=[],dc=[],y_=rl(),b_=Math.abs,Vx=function(){function e(){}return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},e.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},e.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},e.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},e.prototype.needLocalTransform=function(){return Yl(this.rotation)||Yl(this.x)||Yl(this.y)||Yl(this.scaleX-1)||Yl(this.scaleY-1)||Yl(this.skewX)||Yl(this.skewY)},e.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,n=this.needLocalTransform(),r=this.transform;if(!(n||t)){r&&(IA(r),this.invTransform=null);return}r=r||rl(),n?this.getLocalTransform(r):IA(r),t&&(n?al(r,t,r):$x(r,t)),this.transform=r,this._resolveGlobalScaleRatio(r)},e.prototype._resolveGlobalScaleRatio=function(t){var n=this.globalScaleRatio;if(n!=null&&n!==1){this.getGlobalScale(Gl);var r=Gl[0]<0?-1:1,a=Gl[1]<0?-1:1,i=((Gl[0]-r)*n+r)/Gl[0]||0,o=((Gl[1]-a)*n+a)/Gl[1]||0;t[0]*=i,t[1]*=i,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||rl(),mp(this.invTransform,t)},e.prototype.getComputedTransform=function(){for(var t=this,n=[];t;)n.push(t),t=t.parent;for(;t=n.pop();)t.updateTransform();return this.transform},e.prototype.setLocalTransform=function(t){if(t){var n=t[0]*t[0]+t[1]*t[1],r=t[2]*t[2]+t[3]*t[3],a=Math.atan2(t[1],t[0]),i=Math.PI/2+a-Math.atan2(t[3],t[2]);r=Math.sqrt(r)*Math.cos(i),n=Math.sqrt(n),this.skewX=i,this.skewY=0,this.rotation=-a,this.x=+t[4],this.y=+t[5],this.scaleX=n,this.scaleY=r,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,n=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||rl(),al(dc,t.invTransform,n),n=dc);var r=this.originX,a=this.originY;(r||a)&&(y_[4]=r,y_[5]=a,al(dc,n,y_),dc[4]-=r,dc[5]-=a,n=dc),this.setLocalTransform(n)}},e.prototype.getGlobalScale=function(t){var n=this.transform;return t=t||[],n?(t[0]=Math.sqrt(n[0]*n[0]+n[1]*n[1]),t[1]=Math.sqrt(n[2]*n[2]+n[3]*n[3]),n[0]<0&&(t[0]=-t[0]),n[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},e.prototype.transformCoordToLocal=function(t,n){var r=[t,n],a=this.invTransform;return a&&ha(r,r,a),r},e.prototype.transformCoordToGlobal=function(t,n){var r=[t,n],a=this.transform;return a&&ha(r,r,a),r},e.prototype.getLineScale=function(){var t=this.transform;return t&&b_(t[0]-1)>1e-10&&b_(t[3]-1)>1e-10?Math.sqrt(b_(t[0]*t[3]-t[2]*t[1])):1},e.prototype.copyTransform=function(t){upe(this,t)},e.getLocalTransform=function(t,n){n=n||[];var r=t.originX||0,a=t.originY||0,i=t.scaleX,o=t.scaleY,s=t.anchorX,l=t.anchorY,u=t.rotation||0,c=t.x,f=t.y,d=t.skewX?Math.tan(t.skewX):0,h=t.skewY?Math.tan(-t.skewY):0;if(r||a||s||l){var p=r+s,v=a+l;n[4]=-p*i-d*v*o,n[5]=-v*o-h*p*i}else n[4]=n[5]=0;return n[0]=i,n[3]=o,n[1]=h*i,n[2]=d*o,u&&c0(n,n,u),n[4]+=r+c,n[5]+=a+f,n},e.initDefaultProps=function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0}(),e}(),Rh=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function upe(e,t){for(var n=0;n=0?parseFloat(e)/100*t:parseFloat(e):e}function zm(e,t,n){var r=t.position||"inside",a=t.distance!=null?t.distance:5,i=n.height,o=n.width,s=i/2,l=n.x,u=n.y,c="left",f="top";if(r instanceof Array)l+=yl(r[0],n.width),u+=yl(r[1],n.height),c=null,f=null;else switch(r){case"left":l-=a,u+=s,c="right",f="middle";break;case"right":l+=a+o,u+=s,f="middle";break;case"top":l+=o/2,u-=a,c="center",f="bottom";break;case"bottom":l+=o/2,u+=i+a,c="center";break;case"inside":l+=o/2,u+=s,c="center",f="middle";break;case"insideLeft":l+=a,u+=s,f="middle";break;case"insideRight":l+=o-a,u+=s,c="right",f="middle";break;case"insideTop":l+=o/2,u+=a,c="center";break;case"insideBottom":l+=o/2,u+=i-a,c="center",f="bottom";break;case"insideTopLeft":l+=a,u+=a;break;case"insideTopRight":l+=o-a,u+=a,c="right";break;case"insideBottomLeft":l+=a,u+=i-a,f="bottom";break;case"insideBottomRight":l+=o-a,u+=i-a,c="right",f="bottom";break}return e=e||{},e.x=l,e.y=u,e.align=c,e.verticalAlign=f,e}var __="__zr_normal__",w_=Rh.concat(["ignore"]),cpe=Do(Rh,function(e,t){return e[t]=!0,e},{ignore:!1}),hc={},fpe=new Sn(0,0,0,0),f0=function(){function e(t){this.id=Ix(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return e.prototype._init=function(t){this.attr(t)},e.prototype.drift=function(t,n,r){switch(this.draggable){case"horizontal":n=0;break;case"vertical":t=0;break}var a=this.transform;a||(a=this.transform=[1,0,0,1,0,0]),a[4]+=t,a[5]+=n,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(t){var n=this._textContent;if(n&&(!n.ignore||t)){this.textConfig||(this.textConfig={});var r=this.textConfig,a=r.local,i=n.innerTransformable,o=void 0,s=void 0,l=!1;i.parent=a?this:null;var u=!1;if(i.copyTransform(n),r.position!=null){var c=fpe;r.layoutRect?c.copy(r.layoutRect):c.copy(this.getBoundingRect()),a||c.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(hc,r,c):zm(hc,r,c),i.x=hc.x,i.y=hc.y,o=hc.align,s=hc.verticalAlign;var f=r.origin;if(f&&r.rotation!=null){var d=void 0,h=void 0;f==="center"?(d=c.width*.5,h=c.height*.5):(d=yl(f[0],c.width),h=yl(f[1],c.height)),u=!0,i.originX=-i.x+d+(a?0:c.x),i.originY=-i.y+h+(a?0:c.y)}}r.rotation!=null&&(i.rotation=r.rotation);var p=r.offset;p&&(i.x+=p[0],i.y+=p[1],u||(i.originX=-p[0],i.originY=-p[1]));var v=r.inside==null?typeof r.position=="string"&&r.position.indexOf("inside")>=0:r.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),m=void 0,b=void 0,w=void 0;v&&this.canBeInsideText()?(m=r.insideFill,b=r.insideStroke,(m==null||m==="auto")&&(m=this.getInsideTextFill()),(b==null||b==="auto")&&(b=this.getInsideTextStroke(m),w=!0)):(m=r.outsideFill,b=r.outsideStroke,(m==null||m==="auto")&&(m=this.getOutsideFill()),(b==null||b==="auto")&&(b=this.getOutsideStroke(m),w=!0)),m=m||"#000",(m!==g.fill||b!==g.stroke||w!==g.autoStroke||o!==g.align||s!==g.verticalAlign)&&(l=!0,g.fill=m,g.stroke=b,g.autoStroke=w,g.align=o,g.verticalAlign=s,n.setDefaultTextStyle(g)),n.__dirty|=To,l&&n.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return"#fff"},e.prototype.getInsideTextStroke=function(t){return"#000"},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?eS:Qw},e.prototype.getOutsideStroke=function(t){var n=this.__zr&&this.__zr.getBackgroundColor(),r=typeof n=="string"&&Ka(n);r||(r=[255,255,255,1]);for(var a=r[3],i=this.__zr.isDarkMode(),o=0;o<3;o++)r[o]=r[o]*a+(i?0:255)*(1-a);return r[3]=1,Al(r,"rgba")},e.prototype.traverse=function(t,n){},e.prototype.attrKV=function(t,n){t==="textConfig"?this.setTextConfig(n):t==="textContent"?this.setTextContent(n):t==="clipPath"?this.setClipPath(n):t==="extra"?(this.extra=this.extra||{},ct(this.extra,n)):this[t]=n},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(t,n){if(typeof t=="string")this.attrKV(t,n);else if(Wt(t))for(var r=t,a=Gn(r),i=0;i0},e.prototype.getState=function(t){return this.states[t]},e.prototype.ensureState=function(t){var n=this.states;return n[t]||(n[t]={}),n[t]},e.prototype.clearStates=function(t){this.useState(__,!1,t)},e.prototype.useState=function(t,n,r,a){var i=t===__,o=this.hasState();if(!(!o&&i)){var s=this.currentStates,l=this.stateTransition;if(!(On(s,t)>=0&&(n||s.length===1))){var u;if(this.stateProxy&&!i&&(u=this.stateProxy(t)),u||(u=this.states&&this.states[t]),!u&&!i){l0("State "+t+" not exists.");return}i||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||a);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,u,this._normalState,n,!r&&!this.__inHover&&l&&l.duration>0,l);var f=this._textContent,d=this._textGuide;return f&&f.useState(t,n,r,c),d&&d.useState(t,n,r,c),i?(this.currentStates=[],this._normalState={}):n?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),u}}},e.prototype.useStates=function(t,n,r){if(!t.length)this.clearStates();else{var a=[],i=this.currentStates,o=t.length,s=o===i.length;if(s){for(var l=0;l0,p);var v=this._textContent,g=this._textGuide;v&&v.useStates(t,n,d),g&&g.useStates(t,n,d),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}},e.prototype.isSilent=function(){for(var t=this.silent,n=this.parent;!t&&n;){if(n.silent){t=!0;break}n=n.parent}return t},e.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var r=this.currentStates.slice();r.splice(n,1),this.useStates(r)}},e.prototype.replaceState=function(t,n,r){var a=this.currentStates.slice(),i=On(a,t),o=On(a,n)>=0;i>=0?o?a.splice(i,1):a[i]=n:r&&!o&&a.push(n),this.useStates(a)},e.prototype.toggleState=function(t,n){n?this.useState(t,!0):this.removeState(t)},e.prototype._mergeStates=function(t){for(var n={},r,a=0;a=0&&i.splice(o,1)}),this.animators.push(t),r&&r.animation.addAnimator(t),r&&r.wakeUp()},e.prototype.updateDuringAnimation=function(t){this.markRedraw()},e.prototype.stopAnimation=function(t,n){for(var r=this.animators,a=r.length,i=[],o=0;o0&&n.during&&i[0].during(function(p,v){n.during(v)});for(var d=0;d0||a.force&&!o.length){var M=void 0,E=void 0,A=void 0;if(s){E={},d&&(M={});for(var _=0;_=0&&(a.splice(i,0,n),this._doAdd(n))}return this},t.prototype.replace=function(n,r){var a=On(this._children,n);return a>=0&&this.replaceAt(r,a),this},t.prototype.replaceAt=function(n,r){var a=this._children,i=a[r];if(n&&n!==this&&n.parent!==this&&n!==i){a[r]=n,i.parent=null;var o=this.__zr;o&&i.removeSelfFromZr(o),this._doAdd(n)}return this},t.prototype._doAdd=function(n){n.parent&&n.parent.remove(n),n.parent=this;var r=this.__zr;r&&r!==n.__zr&&n.addSelfToZr(r),r&&r.refresh()},t.prototype.remove=function(n){var r=this.__zr,a=this._children,i=On(a,n);return i<0?this:(a.splice(i,1),n.parent=null,r&&n.removeSelfFromZr(r),r&&r.refresh(),this)},t.prototype.removeAll=function(){for(var n=this._children,r=this.__zr,a=0;a0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},e.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},e.prototype.findHover=function(t,n){if(!this._disposed)return this.handler.findHover(t,n)},e.prototype.on=function(t,n,r){return this._disposed||this.handler.on(t,n,r),this},e.prototype.off=function(t,n){this._disposed||this.handler.off(t,n)},e.prototype.trigger=function(t,n){this._disposed||this.handler.trigger(t,n)},e.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),n=0;n0){if(e<=a)return o;if(e>=i)return s}else{if(e>=a)return o;if(e<=i)return s}else{if(e===a)return o;if(e===i)return s}return(e-a)/l*u+o}function sn(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%";break}return Bt(e)?kpe(e).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):e==null?NaN:+e}function ir(e,t,n){return t==null&&(t=10),t=Math.min(Math.max(0,t),e4),e=(+e).toFixed(t),n?e:+e}function Epe(e){return e.sort(function(t,n){return t-n}),e}function bo(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(Math.round(e*t)/t===e)return n}return t4(e)}function t4(e){var t=e.toString().toLowerCase(),n=t.indexOf("e"),r=n>0?+t.slice(n+1):0,a=n>0?n:t.length,i=t.indexOf("."),o=i<0?0:a-1-i;return Math.max(0,o-r)}function n4(e,t){var n=Math.log,r=Math.LN10,a=Math.floor(n(e[1]-e[0])/r),i=Math.round(n(Math.abs(t[1]-t[0]))/r),o=Math.min(Math.max(-a+i,0),20);return isFinite(o)?o:20}function Mpe(e,t,n){if(!e[t])return 0;var r=r4(e,n);return r[t]||0}function r4(e,t){var n=Do(e,function(h,p){return h+(isNaN(p)?0:p)},0);if(n===0)return[];for(var r=Math.pow(10,t),a=zt(e,function(h){return(isNaN(h)?0:h)/n*r*100}),i=r*100,o=zt(a,function(h){return Math.floor(h)}),s=Do(o,function(h,p){return h+p},0),l=zt(a,function(h,p){return h-o[p]});su&&(u=l[f],c=f);++o[c],l[c]=0,++s}return zt(o,function(h){return h/r})}function Ape(e,t){var n=Math.max(bo(e),bo(t)),r=e+t;return n>e4?r:ir(r,n)}var Ipe=9007199254740991;function Wx(e){var t=Math.PI*2;return(e%t+t)%t}function Nh(e){return e>-1e-4&&e=10&&t++,t}function Ux(e,t){var n=d0(e),r=Math.pow(10,n),a=e/r,i;return t?a<1.5?i=1:a<2.5?i=2:a<4?i=3:a<7?i=5:i=10:a<1?i=1:a<2?i=2:a<3?i=3:a<5?i=5:i=10,e=i*r,n>=-20?+e.toFixed(n<0?-n:0):e}function Ppe(e,t){var n=(e.length-1)*t+1,r=Math.floor(n),a=+e[r-1],i=n-r;return i?a+i*(e[r]-a):a}function Ope(e){e.sort(function(l,u){return s(l,u,0)?-1:1});for(var t=-1/0,n=1,r=0;r=0||i&&On(i,l)<0)){var u=r.getShallow(l,t);u!=null&&(o[e[s][0]]=u)}}return o}}var nve=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],rve=Fh(nve),ave=function(){function e(){}return e.prototype.getAreaStyle=function(t,n){return rve(this,t,n)},e}(),aS=new yp(50);function ive(e){if(typeof e=="string"){var t=aS.get(e);return t&&t.image}else return e}function p4(e,t,n,r,a){if(e)if(typeof e=="string"){if(t&&t.__zrImageSrc===e||!n)return t;var i=aS.get(e),o={hostEl:n,cb:r,cbPayload:a};return i?(t=i.image,!p0(t)&&i.pending.push(o)):(t=cs.loadImage(e,NA,NA),t.__zrImageSrc=e,aS.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}else return e;else return t}function NA(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t=o;l++)s-=o;var u=ja(n,t);return u>s&&(n="",u=0),s=e-u,a.ellipsis=n,a.ellipsisWidth=u,a.contentWidth=s,a.containerWidth=e,a}function m4(e,t,n){var r=n.containerWidth,a=n.font,i=n.contentWidth;if(!r){e.textLine="",e.isTruncated=!1;return}var o=ja(t,a);if(o<=r){e.textLine=t,e.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=n.maxIterations){t+=n.ellipsis;break}var l=s===0?sve(t,i,n.ascCharWidth,n.cnCharWidth):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,l),o=ja(t,a)}t===""&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}function sve(e,t,n,r){for(var a=0,i=0,o=e.length;ip&&u){var v=Math.floor(p/s);c=c||d.length>v,d=d.slice(0,v)}if(e&&i&&f!=null)for(var g=g4(f,a,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),m={},b=0;bs&&k_(n,e.substring(s,u),t,o),k_(n,l[2],t,o,l[1]),s=T_.lastIndex}sa){var H=n.lines.length;x>0?(w.tokens=w.tokens.slice(0,x),m(w,C,_),n.lines=n.lines.slice(0,b+1)):n.lines=n.lines.slice(0,b),n.isTruncated=n.isTruncated||n.lines.length0&&p+r.accumWidth>r.width&&(c=t.split(` -`),u=!0),r.accumWidth=p}else{var v=y4(t,l,r.width,r.breakAll,r.accumWidth);r.accumWidth=v.accumWidth+h,f=v.linesWidths,c=v.lines}}else c=t.split(` -`);for(var g=0;g=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var hve=Do(",&?/;] ".split(""),function(e,t){return e[t]=!0,e},{});function pve(e){return dve(e)?!!hve[e]:!0}function y4(e,t,n,r,a){for(var i=[],o=[],s="",l="",u=0,c=0,f=0;fn:a+c+h>n){c?(s||l)&&(p?(s||(s=l,l="",u=0,c=u),i.push(s),o.push(c-u),l+=d,u+=h,s="",c=u):(l&&(s+=l,l="",u=0),i.push(s),o.push(c),s=d,c=h)):p?(i.push(l),o.push(u),l=d,u=h):(i.push(d),o.push(h));continue}c+=h,p?(l+=d,u+=h):(l&&(s+=l,l="",u=0),s+=d)}return!i.length&&!s&&(s=e,l="",u=0),l&&(s+=l),s&&(i.push(s),o.push(c)),i.length===1&&(c+=a),{accumWidth:c,lines:i,linesWidths:o}}var iS="__zr_style_"+Math.round(Math.random()*10),Au={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},v0={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Au[iS]=!0;var BA=["z","z2","invisible"],vve=["invisible"],wp=function(e){zn(t,e);function t(n){return e.call(this,n)||this}return t.prototype._init=function(n){for(var r=Gn(n),a=0;a1e-4){s[0]=e-n,s[1]=t-r,l[0]=e+n,l[1]=t+r;return}if(Cv[0]=I_(a)*n+e,Cv[1]=A_(a)*r+t,xv[0]=I_(i)*n+e,xv[1]=A_(i)*r+t,u(s,Cv,xv),c(l,Cv,xv),a=a%Xl,a<0&&(a=a+Xl),i=i%Xl,i<0&&(i=i+Xl),a>i&&!o?i+=Xl:aa&&(Tv[0]=I_(h)*n+e,Tv[1]=A_(h)*r+t,u(s,Tv,s),c(l,Tv,l))}var Dn={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Zl=[],Jl=[],lo=[],Es=[],uo=[],co=[],D_=Math.min,P_=Math.max,Ql=Math.cos,eu=Math.sin,Ko=Math.abs,oS=Math.PI,Bs=oS*2,O_=typeof Float32Array<"u",ad=[];function L_(e){var t=Math.round(e/oS*1e8)/1e8;return t%2*oS}function Gx(e,t){var n=L_(e[0]);n<0&&(n+=Bs);var r=n-e[0],a=e[1];a+=r,!t&&a-n>=Bs?a=n+Bs:t&&n-a>=Bs?a=n-Bs:!t&&n>a?a=n+(Bs-L_(n-a)):t&&n0&&(this._ux=Ko(r/Vm/t)||0,this._uy=Ko(r/Vm/n)||0)},e.prototype.setDPR=function(t){this.dpr=t},e.prototype.setContext=function(t){this._ctx=t},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(t,n){return this._drawPendingPt(),this.addData(Dn.M,t,n),this._ctx&&this._ctx.moveTo(t,n),this._x0=t,this._y0=n,this._xi=t,this._yi=n,this},e.prototype.lineTo=function(t,n){var r=Ko(t-this._xi),a=Ko(n-this._yi),i=r>this._ux||a>this._uy;if(this.addData(Dn.L,t,n),this._ctx&&i&&this._ctx.lineTo(t,n),i)this._xi=t,this._yi=n,this._pendingPtDist=0;else{var o=r*r+a*a;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=n,this._pendingPtDist=o)}return this},e.prototype.bezierCurveTo=function(t,n,r,a,i,o){return this._drawPendingPt(),this.addData(Dn.C,t,n,r,a,i,o),this._ctx&&this._ctx.bezierCurveTo(t,n,r,a,i,o),this._xi=i,this._yi=o,this},e.prototype.quadraticCurveTo=function(t,n,r,a){return this._drawPendingPt(),this.addData(Dn.Q,t,n,r,a),this._ctx&&this._ctx.quadraticCurveTo(t,n,r,a),this._xi=r,this._yi=a,this},e.prototype.arc=function(t,n,r,a,i,o){this._drawPendingPt(),ad[0]=a,ad[1]=i,Gx(ad,o),a=ad[0],i=ad[1];var s=i-a;return this.addData(Dn.A,t,n,r,r,a,s,0,o?0:1),this._ctx&&this._ctx.arc(t,n,r,a,i,o),this._xi=Ql(i)*r+t,this._yi=eu(i)*r+n,this},e.prototype.arcTo=function(t,n,r,a,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,n,r,a,i),this},e.prototype.rect=function(t,n,r,a){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,n,r,a),this.addData(Dn.R,t,n,r,a),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Dn.Z);var t=this._ctx,n=this._x0,r=this._y0;return t&&t.closePath(),this._xi=n,this._yi=r,this},e.prototype.fill=function(t){t&&t.fill(),this.toStatic()},e.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(t){var n=t.length;!(this.data&&this.data.length===n)&&O_&&(this.data=new Float32Array(n));for(var r=0;rc.length&&(this._expandData(),c=this.data);for(var f=0;f0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],n=0;n11&&(this.data=new Float32Array(t)))}},e.prototype.getBoundingRect=function(){lo[0]=lo[1]=uo[0]=uo[1]=Number.MAX_VALUE,Es[0]=Es[1]=co[0]=co[1]=-Number.MAX_VALUE;var t=this.data,n=0,r=0,a=0,i=0,o;for(o=0;or||Ko(w)>a||d===n-1)&&(v=Math.sqrt(b*b+w*w),i=g,o=m);break}case Dn.C:{var _=t[d++],C=t[d++],g=t[d++],m=t[d++],x=t[d++],T=t[d++];v=Ihe(i,o,_,C,g,m,x,T,10),i=x,o=T;break}case Dn.Q:{var _=t[d++],C=t[d++],g=t[d++],m=t[d++];v=Ohe(i,o,_,C,g,m,10),i=g,o=m;break}case Dn.A:var M=t[d++],E=t[d++],A=t[d++],L=t[d++],F=t[d++],H=t[d++],U=H+F;d+=1,p&&(s=Ql(F)*A+M,l=eu(F)*L+E),v=P_(A,L)*D_(Bs,Math.abs(H)),i=Ql(U)*A+M,o=eu(U)*L+E;break;case Dn.R:{s=i=t[d++],l=o=t[d++];var P=t[d++],N=t[d++];v=P*2+N*2;break}case Dn.Z:{var b=s-i,w=l-o;v=Math.sqrt(b*b+w*w),i=s,o=l;break}}v>=0&&(u[f++]=v,c+=v)}return this._pathLen=c,c},e.prototype.rebuildPath=function(t,n){var r=this.data,a=this._ux,i=this._uy,o=this._len,s,l,u,c,f,d,h=n<1,p,v,g=0,m=0,b,w=0,_,C;if(!(h&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,v=this._pathLen,b=n*v,!b)))e:for(var x=0;x0&&(t.lineTo(_,C),w=0),T){case Dn.M:s=u=r[x++],l=c=r[x++],t.moveTo(u,c);break;case Dn.L:{f=r[x++],d=r[x++];var E=Ko(f-u),A=Ko(d-c);if(E>a||A>i){if(h){var L=p[m++];if(g+L>b){var F=(b-g)/L;t.lineTo(u*(1-F)+f*F,c*(1-F)+d*F);break e}g+=L}t.lineTo(f,d),u=f,c=d,w=0}else{var H=E*E+A*A;H>w&&(_=f,C=d,w=H)}break}case Dn.C:{var U=r[x++],P=r[x++],N=r[x++],z=r[x++],$=r[x++],O=r[x++];if(h){var L=p[m++];if(g+L>b){var F=(b-g)/L;Bm(u,U,N,$,F,Zl),Bm(c,P,z,O,F,Jl),t.bezierCurveTo(Zl[1],Jl[1],Zl[2],Jl[2],Zl[3],Jl[3]);break e}g+=L}t.bezierCurveTo(U,P,N,z,$,O),u=$,c=O;break}case Dn.Q:{var U=r[x++],P=r[x++],N=r[x++],z=r[x++];if(h){var L=p[m++];if(g+L>b){var F=(b-g)/L;Fm(u,U,N,F,Zl),Fm(c,P,z,F,Jl),t.quadraticCurveTo(Zl[1],Jl[1],Zl[2],Jl[2]);break e}g+=L}t.quadraticCurveTo(U,P,N,z),u=N,c=z;break}case Dn.A:var W=r[x++],ee=r[x++],te=r[x++],re=r[x++],ce=r[x++],ie=r[x++],de=r[x++],se=!r[x++],_e=te>re?te:re,pe=Ko(te-re)>.001,$e=ce+ie,De=!1;if(h){var L=p[m++];g+L>b&&($e=ce+ie*(b-g)/L,De=!0),g+=L}if(pe&&t.ellipse?t.ellipse(W,ee,te,re,de,ce,$e,se):t.arc(W,ee,_e,ce,$e,se),De)break e;M&&(s=Ql(ce)*te+W,l=eu(ce)*re+ee),u=Ql($e)*te+W,c=eu($e)*re+ee;break;case Dn.R:s=u=r[x],l=c=r[x+1],f=r[x++],d=r[x++];var Z=r[x++],ne=r[x++];if(h){var L=p[m++];if(g+L>b){var oe=b-g;t.moveTo(f,d),t.lineTo(f+D_(oe,Z),d),oe-=Z,oe>0&&t.lineTo(f+Z,d+D_(oe,ne)),oe-=ne,oe>0&&t.lineTo(f+P_(Z-oe,0),d+ne),oe-=Z,oe>0&&t.lineTo(f,d+P_(ne-oe,0));break e}g+=L}t.rect(f,d,Z,ne);break;case Dn.Z:if(h){var L=p[m++];if(g+L>b){var F=(b-g)/L;t.lineTo(u*(1-F)+s*F,c*(1-F)+l*F);break e}g+=L}t.closePath(),u=s,c=l}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.CMD=Dn,e.initDefaultProps=function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),e}();function pc(e,t,n,r,a,i,o){if(a===0)return!1;var s=a,l=0,u=e;if(o>t+s&&o>r+s||oe+s&&i>n+s||it+f&&c>r+f&&c>i+f&&c>s+f||ce+f&&u>n+f&&u>a+f&&u>o+f||ut+u&&l>r+u&&l>i+u||le+u&&s>n+u&&s>a+u||sn||c+ua&&(a+=id);var d=Math.atan2(l,s);return d<0&&(d+=id),d>=r&&d<=a||d+id>=r&&d+id<=a}function Xo(e,t,n,r,a,i){if(i>t&&i>r||ia?s:0}var Ms=Fu.CMD,tu=Math.PI*2,Cve=1e-4;function xve(e,t){return Math.abs(e-t)t&&u>r&&u>i&&u>s||u1&&Tve(),h=Lr(t,r,i,s,oi[0]),d>1&&(p=Lr(t,r,i,s,oi[1]))),d===2?gt&&s>r&&s>i||s=0&&u<=1){for(var c=0,f=xa(t,r,i,u),d=0;dn||s<-n)return 0;var l=Math.sqrt(n*n-s*s);ra[0]=-l,ra[1]=l;var u=Math.abs(r-a);if(u<1e-4)return 0;if(u>=tu-1e-4){r=0,a=tu;var c=i?1:-1;return o>=ra[0]+e&&o<=ra[1]+e?c:0}if(r>a){var f=r;r=a,a=f}r<0&&(r+=tu,a+=tu);for(var d=0,h=0;h<2;h++){var p=ra[h];if(p+e>o){var v=Math.atan2(s,p),c=i?1:-1;v<0&&(v=tu+v),(v>=r&&v<=a||v+tu>=r&&v+tu<=a)&&(v>Math.PI/2&&v1&&(n||(s+=Xo(l,u,c,f,r,a))),g&&(l=i[p],u=i[p+1],c=l,f=u),v){case Ms.M:c=i[p++],f=i[p++],l=c,u=f;break;case Ms.L:if(n){if(pc(l,u,i[p],i[p+1],t,r,a))return!0}else s+=Xo(l,u,i[p],i[p+1],r,a)||0;l=i[p++],u=i[p++];break;case Ms.C:if(n){if(_ve(l,u,i[p++],i[p++],i[p++],i[p++],i[p],i[p+1],t,r,a))return!0}else s+=kve(l,u,i[p++],i[p++],i[p++],i[p++],i[p],i[p+1],r,a)||0;l=i[p++],u=i[p++];break;case Ms.Q:if(n){if(wve(l,u,i[p++],i[p++],i[p],i[p+1],t,r,a))return!0}else s+=Eve(l,u,i[p++],i[p++],i[p],i[p+1],r,a)||0;l=i[p++],u=i[p++];break;case Ms.A:var m=i[p++],b=i[p++],w=i[p++],_=i[p++],C=i[p++],x=i[p++];p+=1;var T=!!(1-i[p++]);d=Math.cos(C)*w+m,h=Math.sin(C)*_+b,g?(c=d,f=h):s+=Xo(l,u,d,h,r,a);var M=(r-m)*_/w+m;if(n){if(Sve(m,b,_,C,C+x,T,t,M,a))return!0}else s+=Mve(m,b,_,C,C+x,T,M,a);l=Math.cos(C+x)*w+m,u=Math.sin(C+x)*_+b;break;case Ms.R:c=l=i[p++],f=u=i[p++];var E=i[p++],A=i[p++];if(d=c+E,h=f+A,n){if(pc(c,f,d,f,t,r,a)||pc(d,f,d,h,t,r,a)||pc(d,h,c,h,t,r,a)||pc(c,h,c,f,t,r,a))return!0}else s+=Xo(d,f,d,h,r,a),s+=Xo(c,h,c,f,r,a);break;case Ms.Z:if(n){if(pc(l,u,c,f,t,r,a))return!0}else s+=Xo(l,u,c,f,r,a);l=c,u=f;break}}return!n&&!xve(u,f)&&(s+=Xo(l,u,c,f,r,a)||0),s!==0}function Ave(e,t,n){return b4(e,0,!1,t,n)}function Ive(e,t,n,r){return b4(e,t,!0,n,r)}var _4=Mn({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Au),Dve={style:Mn({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},v0.style)},R_=Rh.concat(["invisible","culling","z","z2","zlevel","parent"]),Rn=function(e){zn(t,e);function t(n){return e.call(this,n)||this}return t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var a=this._decalEl=this._decalEl||new t;a.buildPath===t.prototype.buildPath&&(a.buildPath=function(l){n.buildPath(l,n.shape)}),a.silent=!0;var i=a.style;for(var o in r)i[o]!==r[o]&&(i[o]=r[o]);i.fill=r.fill?r.decal:null,i.decal=null,i.shadowColor=null,r.strokeFirst&&(i.stroke=null);for(var s=0;s.5?Qw:r>.2?spe:eS}else if(n)return eS}return Qw},t.prototype.getInsideTextStroke=function(n){var r=this.style.fill;if(Bt(r)){var a=this.__zr,i=!!(a&&a.isDarkMode()),o=Lh(n,0)0))},t.prototype.hasFill=function(){var n=this.style,r=n.fill;return r!=null&&r!=="none"},t.prototype.getBoundingRect=function(){var n=this._rect,r=this.style,a=!n;if(a){var i=!1;this.path||(i=!0,this.createPathProxy());var o=this.path;(i||this.__dirty&xd)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),n=o.getBoundingRect()}if(this._rect=n,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=n.clone());if(this.__dirty||a){s.copy(n);var l=r.strokeNoScale?this.getLineScale():1,u=r.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;u=Math.max(u,c??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return n},t.prototype.contain=function(n,r){var a=this.transformCoordToLocal(n,r),i=this.getBoundingRect(),o=this.style;if(n=a[0],r=a[1],i.contain(n,r)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),Ive(s,l/u,n,r)))return!0}if(this.hasFill())return Ave(s,n,r)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=xd,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(n){return this.animate("shape",n)},t.prototype.updateDuringAnimation=function(n){n==="style"?this.dirtyStyle():n==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(n,r){n==="shape"?this.setShape(r):e.prototype.attrKV.call(this,n,r)},t.prototype.setShape=function(n,r){var a=this.shape;return a||(a=this.shape={}),typeof n=="string"?a[n]=r:ct(a,n),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&xd)},t.prototype.createStyle=function(n){return vp(_4,n)},t.prototype._innerSaveToNormal=function(n){e.prototype._innerSaveToNormal.call(this,n);var r=this._normalState;n.shape&&!r.shape&&(r.shape=ct({},this.shape))},t.prototype._applyStateObj=function(n,r,a,i,o,s){e.prototype._applyStateObj.call(this,n,r,a,i,o,s);var l=!(r&&i),u;if(r&&r.shape?o?i?u=r.shape:(u=ct({},a.shape),ct(u,r.shape)):(u=ct({},i?this.shape:a.shape),ct(u,r.shape)):l&&(u=a.shape),u)if(o){this.shape=ct({},this.shape);for(var c={},f=Gn(u),d=0;d0},t.prototype.hasFill=function(){var n=this.style,r=n.fill;return r!=null&&r!=="none"},t.prototype.createStyle=function(n){return vp(Pve,n)},t.prototype.setBoundingRect=function(n){this._rect=n},t.prototype.getBoundingRect=function(){var n=this.style;if(!this._rect){var r=n.text;r!=null?r+="":r="";var a=zx(r,n.font,n.textAlign,n.textBaseline);if(a.x+=n.x||0,a.y+=n.y||0,this.hasStroke()){var i=n.lineWidth;a.x-=i/2,a.y-=i/2,a.width+=i,a.height+=i}this._rect=a}return this._rect},t.initDefaultProps=function(){var n=t.prototype;n.dirtyRectTolerance=10}(),t}(wp);Hm.prototype.type="tspan";var Ove=Mn({x:0,y:0},Au),Lve={style:Mn({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},v0.style)};function Rve(e){return!!(e&&typeof e!="string"&&e.width&&e.height)}var Ro=function(e){zn(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createStyle=function(n){return vp(Ove,n)},t.prototype._getSize=function(n){var r=this.style,a=r[n];if(a!=null)return a;var i=Rve(r.image)?r.image:this.__image;if(!i)return 0;var o=n==="width"?"height":"width",s=r[o];return s==null?i[n]:i[n]/i[o]*s},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return Lve},t.prototype.getBoundingRect=function(){var n=this.style;return this._rect||(this._rect=new Sn(n.x||0,n.y||0,this.getWidth(),this.getHeight())),this._rect},t}(wp);Ro.prototype.type="image";function Nve(e,t){var n=t.x,r=t.y,a=t.width,i=t.height,o=t.r,s,l,u,c;a<0&&(n=n+a,a=-a),i<0&&(r=r+i,i=-i),typeof o=="number"?s=l=u=c=o:o instanceof Array?o.length===1?s=l=u=c=o[0]:o.length===2?(s=u=o[0],l=c=o[1]):o.length===3?(s=o[0],l=c=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],c=o[3]):s=l=u=c=0;var f;s+l>a&&(f=s+l,s*=a/f,l*=a/f),u+c>a&&(f=u+c,u*=a/f,c*=a/f),l+u>i&&(f=l+u,l*=i/f,u*=i/f),s+c>i&&(f=s+c,s*=i/f,c*=i/f),e.moveTo(n+s,r),e.lineTo(n+a-l,r),l!==0&&e.arc(n+a-l,r+l,l,-Math.PI/2,0),e.lineTo(n+a,r+i-u),u!==0&&e.arc(n+a-u,r+i-u,u,0,Math.PI/2),e.lineTo(n+c,r+i),c!==0&&e.arc(n+c,r+i-c,c,Math.PI/2,Math.PI),e.lineTo(n,r+s),s!==0&&e.arc(n+s,r+s,s,Math.PI,Math.PI*1.5)}var Dc=Math.round;function w4(e,t,n){if(t){var r=t.x1,a=t.x2,i=t.y1,o=t.y2;e.x1=r,e.x2=a,e.y1=i,e.y2=o;var s=n&&n.lineWidth;return s&&(Dc(r*2)===Dc(a*2)&&(e.x1=e.x2=mu(r,s,!0)),Dc(i*2)===Dc(o*2)&&(e.y1=e.y2=mu(i,s,!0))),e}}function S4(e,t,n){if(t){var r=t.x,a=t.y,i=t.width,o=t.height;e.x=r,e.y=a,e.width=i,e.height=o;var s=n&&n.lineWidth;return s&&(e.x=mu(r,s,!0),e.y=mu(a,s,!0),e.width=Math.max(mu(r+i,s,!1)-e.x,i===0?0:1),e.height=Math.max(mu(a+o,s,!1)-e.y,o===0?0:1)),e}}function mu(e,t,n){if(!t)return e;var r=Dc(e*2);return(r+Dc(t))%2===0?r/2:(r+(n?1:-1))/2}var $ve=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),Bve={},yr=function(e){zn(t,e);function t(n){return e.call(this,n)||this}return t.prototype.getDefaultShape=function(){return new $ve},t.prototype.buildPath=function(n,r){var a,i,o,s;if(this.subPixelOptimize){var l=S4(Bve,r,this.style);a=l.x,i=l.y,o=l.width,s=l.height,l.r=r.r,r=l}else a=r.x,i=r.y,o=r.width,s=r.height;r.r?Nve(n,r):n.rect(a,i,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(Rn);yr.prototype.type="rect";var WA={fill:"#000"},UA=2,Fve={style:Mn({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},v0.style)},dr=function(e){zn(t,e);function t(n){var r=e.call(this)||this;return r.type="text",r._children=[],r._defaultStyle=WA,r.attr(n),r}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var n=0;n0,F=n.width!=null&&(n.overflow==="truncate"||n.overflow==="break"||n.overflow==="breakAll"),H=o.calculatedLineHeight,U=0;U=0&&(U=x[H],U.align==="right");)this._placeToken(U,n,M,m,F,"right",w),E-=U.width,F-=U.width,H--;for(L+=(i-(L-g)-(b-F)-E)/2;A<=H;)U=x[A],this._placeToken(U,n,M,m,L+U.width/2,"center",w),L+=U.width,A++;m+=M}},t.prototype._placeToken=function(n,r,a,i,o,s,l){var u=r.rich[n.styleName]||{};u.text=n.text;var c=n.verticalAlign,f=i+a/2;c==="top"?f=i+n.height/2:c==="bottom"&&(f=i+a-n.height/2);var d=!n.isLineHolder&&N_(u);d&&this._renderBackground(u,r,s==="right"?o-n.width:s==="center"?o-n.width/2:o,f-n.height/2,n.width,n.height);var h=!!u.backgroundColor,p=n.textPadding;p&&(o=XA(o,s,p),f-=n.height/2-p[0]-n.innerHeight/2);var v=this._getOrCreateChild(Hm),g=v.createStyle();v.useStyle(g);var m=this._defaultStyle,b=!1,w=0,_=qA("fill"in u?u.fill:"fill"in r?r.fill:(b=!0,m.fill)),C=GA("stroke"in u?u.stroke:"stroke"in r?r.stroke:!h&&!l&&(!m.autoStroke||b)?(w=UA,m.stroke):null),x=u.textShadowBlur>0||r.textShadowBlur>0;g.text=n.text,g.x=o,g.y=f,x&&(g.shadowBlur=u.textShadowBlur||r.textShadowBlur||0,g.shadowColor=u.textShadowColor||r.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||r.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||r.textShadowOffsetY||0),g.textAlign=s,g.textBaseline="middle",g.font=n.font||$u,g.opacity=$c(u.opacity,r.opacity,1),jA(g,u),C&&(g.lineWidth=$c(u.lineWidth,r.lineWidth,w),g.lineDash=ln(u.lineDash,r.lineDash),g.lineDashOffset=r.lineDashOffset||0,g.stroke=C),_&&(g.fill=_);var T=n.contentWidth,M=n.contentHeight;v.setBoundingRect(new Sn(kd(g.x,T,g.textAlign),Ac(g.y,M,g.textBaseline),T,M))},t.prototype._renderBackground=function(n,r,a,i,o,s){var l=n.backgroundColor,u=n.borderWidth,c=n.borderColor,f=l&&l.image,d=l&&!f,h=n.borderRadius,p=this,v,g;if(d||n.lineHeight||u&&c){v=this._getOrCreateChild(yr),v.useStyle(v.createStyle()),v.style.fill=null;var m=v.shape;m.x=a,m.y=i,m.width=o,m.height=s,m.r=h,v.dirtyShape()}if(d){var b=v.style;b.fill=l||null,b.fillOpacity=ln(n.fillOpacity,1)}else if(f){g=this._getOrCreateChild(Ro),g.onload=function(){p.dirtyStyle()};var w=g.style;w.image=l.image,w.x=a,w.y=i,w.width=o,w.height=s}if(u&&c){var b=v.style;b.lineWidth=u,b.stroke=c,b.strokeOpacity=ln(n.strokeOpacity,1),b.lineDash=n.borderDash,b.lineDashOffset=n.borderDashOffset||0,v.strokeContainThreshold=0,v.hasFill()&&v.hasStroke()&&(b.strokeFirst=!0,b.lineWidth*=2)}var _=(v||g).style;_.shadowBlur=n.shadowBlur||0,_.shadowColor=n.shadowColor||"transparent",_.shadowOffsetX=n.shadowOffsetX||0,_.shadowOffsetY=n.shadowOffsetY||0,_.opacity=$c(n.opacity,r.opacity,1)},t.makeFont=function(n){var r="";return Wve(n)&&(r=[n.fontStyle,n.fontWeight,Hve(n.fontSize),n.fontFamily||"sans-serif"].join(" ")),r&&Vi(r)||n.textFont||n.font},t}(wp),Vve={left:!0,right:1,center:1},zve={top:1,bottom:1,middle:1},KA=["fontStyle","fontWeight","fontSize","fontFamily"];function Hve(e){return typeof e=="string"&&(e.indexOf("px")!==-1||e.indexOf("rem")!==-1||e.indexOf("em")!==-1)?e:isNaN(+e)?Ex+"px":e+"px"}function jA(e,t){for(var n=0;n=0,i=!1;if(e instanceof Rn){var o=C4(e),s=a&&o.selectFill||o.normalFill,l=a&&o.selectStroke||o.normalStroke;if(vc(s)||vc(l)){r=r||{};var u=r.style||{};u.fill==="inherit"?(i=!0,r=ct({},r),u=ct({},u),u.fill=s):!vc(u.fill)&&vc(s)?(i=!0,r=ct({},r),u=ct({},u),u.fill=jw(s)):!vc(u.stroke)&&vc(l)&&(i||(r=ct({},r),u=ct({},u)),u.stroke=jw(l)),r.style=u}}if(r&&r.z2==null){i||(r=ct({},r));var c=e.z2EmphasisLift;r.z2=e.z2+(c??Kve)}return r}function Zve(e,t,n){if(n&&n.z2==null){n=ct({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??jve)}return n}function Jve(e,t,n){var r=On(e.currentStates,t)>=0,a=e.style.opacity,i=r?null:qve(e,["opacity"],t,{opacity:1});n=n||{};var o=n.style||{};return o.opacity==null&&(n=ct({},n),o=ct({opacity:r?a:i.opacity*.1},o),n.style=o),n}function $_(e,t){var n=this.states[e];if(this.style){if(e==="emphasis")return Xve(this,e,t,n);if(e==="blur")return Jve(this,e,n);if(e==="select")return Zve(this,e,n)}return n}function Qve(e){e.stateProxy=$_;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=$_),n&&(n.stateProxy=$_)}function nI(e,t){!I4(e,t)&&!e.__highByOuter&&bs(e,x4)}function rI(e,t){!I4(e,t)&&!e.__highByOuter&&bs(e,T4)}function Um(e,t){e.__highByOuter|=1<<(t||0),bs(e,x4)}function Km(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&bs(e,T4)}function ege(e){bs(e,Zx)}function E4(e){bs(e,k4)}function M4(e){bs(e,Yve)}function A4(e){bs(e,Gve)}function I4(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function D4(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(a,i){var o=qx(i),s=a==="series",l=s?e.getViewOfSeriesModel(i):e.getViewOfComponentModel(i);!s&&r.push(l),o.isBlured&&(l.group.traverse(function(u){k4(u)}),s&&n.push(i)),o.isBlured=!1}),he(r,function(a){a&&a.toggleBlurSeries&&a.toggleBlurSeries(n,!1,t)})}function lS(e,t,n,r){var a=r.getModel();n=n||"coordinateSystem";function i(u,c){for(var f=0;f0){var s={dataIndex:o,seriesIndex:n.seriesIndex};i!=null&&(s.dataType=i),t.push(s)}})}),t}function jm(e,t,n){P4(e,!0),bs(e,Qve),sge(e,t,n)}function oge(e){P4(e,!1)}function Vu(e,t,n,r){r?oge(e):jm(e,t,n)}function sge(e,t,n){var r=En(e);t!=null?(r.focus=t,r.blurScope=n):r.focus&&(r.focus=null)}var iI=["emphasis","blur","select"],lge={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function ff(e,t,n,r){n=n||"itemStyle";for(var a=0;a1&&(o*=B_(p),s*=B_(p));var v=(a===i?-1:1)*B_((o*o*(s*s)-o*o*(h*h)-s*s*(d*d))/(o*o*(h*h)+s*s*(d*d)))||0,g=v*o*h/s,m=v*-s*d/o,b=(e+n)/2+Mv(f)*g-Ev(f)*m,w=(t+r)/2+Ev(f)*g+Mv(f)*m,_=uI([1,0],[(d-g)/o,(h-m)/s]),C=[(d-g)/o,(h-m)/s],x=[(-1*d-g)/o,(-1*h-m)/s],T=uI(C,x);if(dS(C,x)<=-1&&(T=od),dS(C,x)>=1&&(T=0),T<0){var M=Math.round(T/od*1e6)/1e6;T=od*2+M%2*od}c.addData(u,b,w,o,s,_,T,f,i)}var pge=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,vge=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function gge(e){var t=new Fu;if(!e)return t;var n=0,r=0,a=n,i=r,o,s=Fu.CMD,l=e.match(pge);if(!l)return t;for(var u=0;uU*U+P*P&&(M=A,E=L),{cx:M,cy:E,x0:-c,y0:-f,x1:M*(a/C-1),y1:E*(a/C-1)}}function xge(e){var t;if(It(e)){var n=e.length;if(!n)return e;n===1?t=[e[0],e[0],0,0]:n===2?t=[e[0],e[0],e[1],e[1]]:n===3?t=e.concat(e[2]):t=e}else t=[e,e,e,e];return t}function Tge(e,t){var n,r=Ed(t.r,0),a=Ed(t.r0||0,0),i=r>0,o=a>0;if(!(!i&&!o)){if(i||(r=a,a=0),a>r){var s=r;r=a,a=s}var l=t.startAngle,u=t.endAngle;if(!(isNaN(l)||isNaN(u))){var c=t.cx,f=t.cy,d=!!t.clockwise,h=fI(u-l),p=h>F_&&h%F_;if(p>Oi&&(h=p),!(r>Oi))e.moveTo(c,f);else if(h>F_-Oi)e.moveTo(c+r*mc(l),f+r*nu(l)),e.arc(c,f,r,l,u,!d),a>Oi&&(e.moveTo(c+a*mc(u),f+a*nu(u)),e.arc(c,f,a,u,l,d));else{var v=void 0,g=void 0,m=void 0,b=void 0,w=void 0,_=void 0,C=void 0,x=void 0,T=void 0,M=void 0,E=void 0,A=void 0,L=void 0,F=void 0,H=void 0,U=void 0,P=r*mc(l),N=r*nu(l),z=a*mc(u),$=a*nu(u),O=h>Oi;if(O){var W=t.cornerRadius;W&&(n=xge(W),v=n[0],g=n[1],m=n[2],b=n[3]);var ee=fI(r-a)/2;if(w=fo(ee,m),_=fo(ee,b),C=fo(ee,v),x=fo(ee,g),E=T=Ed(w,_),A=M=Ed(C,x),(T>Oi||M>Oi)&&(L=r*mc(u),F=r*nu(u),H=a*mc(l),U=a*nu(l),hOi){var pe=fo(m,E),$e=fo(b,E),De=Av(H,U,P,N,r,pe,d),Z=Av(L,F,z,$,r,$e,d);e.moveTo(c+De.cx+De.x0,f+De.cy+De.y0),E0&&e.arc(c+De.cx,f+De.cy,pe,zr(De.y0,De.x0),zr(De.y1,De.x1),!d),e.arc(c,f,r,zr(De.cy+De.y1,De.cx+De.x1),zr(Z.cy+Z.y1,Z.cx+Z.x1),!d),$e>0&&e.arc(c+Z.cx,f+Z.cy,$e,zr(Z.y1,Z.x1),zr(Z.y0,Z.x0),!d))}else e.moveTo(c+P,f+N),e.arc(c,f,r,l,u,!d);if(!(a>Oi)||!O)e.lineTo(c+z,f+$);else if(A>Oi){var pe=fo(v,A),$e=fo(g,A),De=Av(z,$,L,F,a,-$e,d),Z=Av(P,N,H,U,a,-pe,d);e.lineTo(c+De.cx+De.x0,f+De.cy+De.y0),A0&&e.arc(c+De.cx,f+De.cy,$e,zr(De.y0,De.x0),zr(De.y1,De.x1),!d),e.arc(c,f,a,zr(De.cy+De.y1,De.cx+De.x1),zr(Z.cy+Z.y1,Z.cx+Z.x1),d),pe>0&&e.arc(c+Z.cx,f+Z.cy,pe,zr(Z.y1,Z.x1),zr(Z.y0,Z.x0),!d))}else e.lineTo(c+z,f+$),e.arc(c,f,a,u,l,d)}e.closePath()}}}var kge=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e}(),Xi=function(e){zn(t,e);function t(n){return e.call(this,n)||this}return t.prototype.getDefaultShape=function(){return new kge},t.prototype.buildPath=function(n,r){Tge(n,r)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(Rn);Xi.prototype.type="sector";var Ege=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),_0=function(e){zn(t,e);function t(n){return e.call(this,n)||this}return t.prototype.getDefaultShape=function(){return new Ege},t.prototype.buildPath=function(n,r){var a=r.cx,i=r.cy,o=Math.PI*2;n.moveTo(a+r.r,i),n.arc(a,i,r.r,0,o,!1),n.moveTo(a+r.r0,i),n.arc(a,i,r.r0,0,o,!0)},t}(Rn);_0.prototype.type="ring";function Mge(e,t,n,r){var a=[],i=[],o=[],s=[],l,u,c,f;if(r){c=[1/0,1/0],f=[-1/0,-1/0];for(var d=0,h=e.length;d=2){if(r){var i=Mge(a,r,n,t.smoothConstraint);e.moveTo(a[0][0],a[0][1]);for(var o=a.length,s=0;s<(n?o:o-1);s++){var l=i[s*2],u=i[s*2+1],c=a[(s+1)%o];e.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{e.moveTo(a[0][0],a[0][1]);for(var s=1,f=a.length;sau[1]){if(s=!1,i)return s;var c=Math.abs(au[0]-ru[1]),f=Math.abs(ru[0]-au[1]);Math.min(c,f)>a.len()&&(c0){var f=c.duration,d=c.delay,h=c.easing,p={duration:f,delay:d||0,easing:h,done:i,force:!!i||!!o,setToFinal:!u,scope:e,during:o};s?t.animateFrom(n,p):t.animateTo(n,p)}else t.stopAnimation(),!s&&t.attr(n),o&&o(1),i&&i()}function Cr(e,t,n,r,a,i){e2("update",e,t,n,r,a,i)}function Zr(e,t,n,r,a,i){e2("enter",e,t,n,r,a,i)}function rh(e){if(!e.__zr)return!0;for(var t=0;tMath.abs(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function pI(e){return!e.isGroup}function Hge(e){return e.shape!=null}function G4(e,t,n){if(!e||!t)return;function r(o){var s={};return o.traverse(function(l){pI(l)&&l.anid&&(s[l.anid]=l)}),s}function a(o){var s={x:o.x,y:o.y,rotation:o.rotation};return Hge(o)&&(s.shape=ct({},o.shape)),s}var i=r(e);t.traverse(function(o){if(pI(o)&&o.anid){var s=i[o.anid];if(s){var l=a(o);o.attr(a(s)),Cr(o,l,n,En(o).dataIndex)}}})}function q4(e,t){return zt(e,function(n){var r=n[0];r=Xm(r,t.x),r=Zm(r,t.x+t.width);var a=n[1];return a=Xm(a,t.y),a=Zm(a,t.y+t.height),[r,a]})}function X4(e,t){var n=Xm(e.x,t.x),r=Zm(e.x+e.width,t.x+t.width),a=Xm(e.y,t.y),i=Zm(e.y+e.height,t.y+t.height);if(r>=n&&i>=a)return{x:n,y:a,width:r-n,height:i-a}}function x0(e,t,n){var r=ct({rectHover:!0},t),a=r.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},e)return e.indexOf("image://")===0?(a.image=e.slice(8),Mn(a,n),new Ro(r)):C0(e.replace("path://",""),r,n,"center")}function Wge(e,t,n,r,a){for(var i=0,o=a[a.length-1];i1)return!1;var g=V_(h,p,c,f)/d;return!(g<0||g>1)}function V_(e,t,n,r){return e*r-n*t}function Uge(e){return e<=1e-6&&e>=-1e-6}function T0(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,a=Bt(t)?{formatter:t}:t,i=n.mainType,o=n.componentIndex,s={componentType:i,name:r,$vars:["name"]};s[i+"Index"]=o;var l=e.formatterParamsExtra;l&&he(Gn(l),function(c){ml(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=En(e.el);u.componentMainType=i,u.componentIndex=o,u.tooltipConfig={name:r,option:Mn({content:r,encodeHTMLContent:!0,formatterParams:s},a)}}function vI(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function k0(e,t){if(e)if(It(e))for(var n=0;n=0&&s.push(l)}),s}}function nB(e,t){return wn(wn({},e,!0),t,!0)}const ime={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},ome={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var Jm="ZH",i2="EN",Vc=i2,zg={},o2={},rB=Xt.domSupported?function(){var e=(document.documentElement.lang||navigator.language||navigator.browserLanguage||Vc).toUpperCase();return e.indexOf(Jm)>-1?Jm:Vc}():Vc;function s2(e,t){e=e.toUpperCase(),o2[e]=new Yn(t),zg[e]=t}function sme(e){if(Bt(e)){var t=zg[e.toUpperCase()]||{};return e===Jm||e===i2?yn(t):wn(yn(t),yn(zg[Vc]),!1)}else return wn(yn(e),yn(zg[Vc]),!1)}function lme(e){return o2[e]}function ume(){return o2[Vc]}s2(i2,ime);s2(Jm,ome);var l2=1e3,u2=l2*60,ah=u2*60,di=ah*24,wI=di*365,Md={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},Pv="{yyyy}-{MM}-{dd}",SI={year:"{yyyy}",month:"{yyyy}-{MM}",day:Pv,hour:Pv+" "+Md.hour,minute:Pv+" "+Md.minute,second:Pv+" "+Md.second,millisecond:Md.none},W_=["year","month","day","hour","minute","second","millisecond"],aB=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function aa(e,t){return e+="","0000".substr(0,t-e.length)+e}function zc(e){switch(e){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return e}}function cme(e){return e===zc(e)}function fme(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Ep(e,t,n,r){var a=wi(e),i=a[c2(n)](),o=a[Hc(n)]()+1,s=Math.floor((o-1)/3)+1,l=a[A0(n)](),u=a["get"+(n?"UTC":"")+"Day"](),c=a[zh(n)](),f=(c-1)%12+1,d=a[I0(n)](),h=a[D0(n)](),p=a[P0(n)](),v=c>=12?"pm":"am",g=v.toUpperCase(),m=r instanceof Yn?r:lme(r||rB)||ume(),b=m.getModel("time"),w=b.get("month"),_=b.get("monthAbbr"),C=b.get("dayOfWeek"),x=b.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,v+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,aa(i%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,w[o-1]).replace(/{MMM}/g,_[o-1]).replace(/{MM}/g,aa(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,aa(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,C[u]).replace(/{ee}/g,x[u]).replace(/{e}/g,u+"").replace(/{HH}/g,aa(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,aa(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,aa(d,2)).replace(/{m}/g,d+"").replace(/{ss}/g,aa(h,2)).replace(/{s}/g,h+"").replace(/{SSS}/g,aa(p,3)).replace(/{S}/g,p+"")}function dme(e,t,n,r,a){var i=null;if(Bt(n))i=n;else if(Jt(n))i=n(e.value,t,{level:e.level});else{var o=ct({},Md);if(e.level>0)for(var s=0;s=0;--s)if(l[u]){i=l[u];break}i=i||o.none}if(It(i)){var f=e.level==null?0:e.level>=0?e.level:i.length+e.level;f=Math.min(f,i.length-1),i=i[f]}}return Ep(new Date(e.value),i,a,r)}function iB(e,t){var n=wi(e),r=n[Hc(t)]()+1,a=n[A0(t)](),i=n[zh(t)](),o=n[I0(t)](),s=n[D0(t)](),l=n[P0(t)](),u=l===0,c=u&&s===0,f=c&&o===0,d=f&&i===0,h=d&&a===1,p=h&&r===1;return p?"year":h?"month":d?"day":f?"hour":c?"minute":u?"second":"millisecond"}function CI(e,t,n){var r=Bn(e)?wi(e):e;switch(t=t||iB(e,n),t){case"year":return r[c2(n)]();case"half-year":return r[Hc(n)]()>=6?1:0;case"quarter":return Math.floor((r[Hc(n)]()+1)/4);case"month":return r[Hc(n)]();case"day":return r[A0(n)]();case"half-day":return r[zh(n)]()/24;case"hour":return r[zh(n)]();case"minute":return r[I0(n)]();case"second":return r[D0(n)]();case"millisecond":return r[P0(n)]()}}function c2(e){return e?"getUTCFullYear":"getFullYear"}function Hc(e){return e?"getUTCMonth":"getMonth"}function A0(e){return e?"getUTCDate":"getDate"}function zh(e){return e?"getUTCHours":"getHours"}function I0(e){return e?"getUTCMinutes":"getMinutes"}function D0(e){return e?"getUTCSeconds":"getSeconds"}function P0(e){return e?"getUTCMilliseconds":"getMilliseconds"}function hme(e){return e?"setUTCFullYear":"setFullYear"}function oB(e){return e?"setUTCMonth":"setMonth"}function sB(e){return e?"setUTCDate":"setDate"}function lB(e){return e?"setUTCHours":"setHours"}function uB(e){return e?"setUTCMinutes":"setMinutes"}function cB(e){return e?"setUTCSeconds":"setSeconds"}function fB(e){return e?"setUTCMilliseconds":"setMilliseconds"}function pme(e,t,n,r,a,i,o,s){var l=new dr({style:{text:e,font:t,align:n,verticalAlign:r,padding:a,rich:i,overflow:o?"truncate":null,lineHeight:s}});return l.getBoundingRect()}function f2(e){if(!i4(e))return Bt(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function d2(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,function(n,r){return r.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var Mp=Px;function vS(e,t,n){var r="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function a(c){return c&&Vi(c)?c:"-"}function i(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=t==="time",s=e instanceof Date;if(o||s){var l=o?wi(e):e;if(isNaN(+l)){if(s)return"-"}else return Ep(l,r,n)}if(t==="ordinal")return Dm(e)?a(e):Bn(e)&&i(e)?e+"":"-";var u=$h(e);return i(u)?f2(u):Dm(e)?a(e):typeof e=="boolean"?e+"":"-"}var xI=["a","b","c","d","e","f","g"],U_=function(e,t){return"{"+e+(t??"")+"}"};function h2(e,t,n){It(t)||(t=[t]);var r=t.length;if(!r)return"";for(var a=t[0].$vars||[],i=0;i':'';var o=n.markerId||"markerX";return{renderMode:i,content:"{"+o+"|} ",style:a==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}}function vme(e,t,n){(e==="week"||e==="month"||e==="quarter"||e==="half-year"||e==="year")&&(e=`MM-dd -yyyy`);var r=wi(t),a=n?"getUTC":"get",i=r[a+"FullYear"](),o=r[a+"Month"]()+1,s=r[a+"Date"](),l=r[a+"Hours"](),u=r[a+"Minutes"](),c=r[a+"Seconds"](),f=r[a+"Milliseconds"]();return e=e.replace("MM",aa(o,2)).replace("M",o).replace("yyyy",i).replace("yy",aa(i%100+"",2)).replace("dd",aa(s,2)).replace("d",s).replace("hh",aa(l,2)).replace("h",l).replace("mm",aa(u,2)).replace("m",u).replace("ss",aa(c,2)).replace("s",c).replace("SSS",aa(f,3)),e}function gme(e){return e&&e.charAt(0).toUpperCase()+e.substr(1)}function zu(e,t){return t=t||"transparent",Bt(e)?e:Wt(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}var Hg=he,mme=["left","right","top","bottom","width","height"],Ov=[["width","left","right"],["height","top","bottom"]];function p2(e,t,n,r,a){var i=0,o=0;r==null&&(r=1/0),a==null&&(a=1/0);var s=0;t.eachChild(function(l,u){var c=l.getBoundingRect(),f=t.childAt(u+1),d=f&&f.getBoundingRect(),h,p;if(e==="horizontal"){var v=c.width+(d?-d.x+c.x:0);h=i+v,h>r||l.newline?(i=0,h=v,o+=s+n,s=c.height):s=Math.max(s,c.height)}else{var g=c.height+(d?-d.y+c.y:0);p=o+g,p>a||l.newline?(i+=s+n,o=0,p=g,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=i,l.y=o,l.markRedraw(),e==="horizontal"?i=h+n:o=p+n)})}var ih=p2;er(p2,"vertical");er(p2,"horizontal");function df(e,t,n){n=Mp(n||0);var r=t.width,a=t.height,i=sn(e.left,r),o=sn(e.top,a),s=sn(e.right,r),l=sn(e.bottom,a),u=sn(e.width,r),c=sn(e.height,a),f=n[2]+n[0],d=n[1]+n[3],h=e.aspect;switch(isNaN(u)&&(u=r-s-d-i),isNaN(c)&&(c=a-l-f-o),h!=null&&(isNaN(u)&&isNaN(c)&&(h>r/a?u=r*.8:c=a*.8),isNaN(u)&&(u=h*c),isNaN(c)&&(c=u/h)),isNaN(i)&&(i=r-s-u-d),isNaN(o)&&(o=a-l-c-f),e.left||e.right){case"center":i=r/2-u/2-n[3];break;case"right":i=r-u-d;break}switch(e.top||e.bottom){case"middle":case"center":o=a/2-c/2-n[0];break;case"bottom":o=a-c-f;break}i=i||0,o=o||0,isNaN(u)&&(u=r-d-i-(s||0)),isNaN(c)&&(c=a-f-o-(l||0));var p=new Sn(i+n[3],o+n[0],u,c);return p.margin=n,p}function Hh(e){var t=e.layoutMode||e.constructor.layoutMode;return Wt(t)?t:t?{type:t}:null}function hf(e,t,n){var r=n&&n.ignoreSize;!It(r)&&(r=[r,r]);var a=o(Ov[0],0),i=o(Ov[1],1);u(Ov[0],e,a),u(Ov[1],e,i);function o(c,f){var d={},h=0,p={},v=0,g=2;if(Hg(c,function(w){p[w]=e[w]}),Hg(c,function(w){s(t,w)&&(d[w]=p[w]=t[w]),l(d,w)&&h++,l(p,w)&&v++}),r[f])return l(t,c[1])?p[c[2]]=null:l(t,c[2])&&(p[c[1]]=null),p;if(v===g||!h)return p;if(h>=g)return d;for(var m=0;m=0;l--)s=wn(s,a[l],!0);r.defaultOption=s}return r.defaultOption},t.prototype.getReferringComponents=function(n,r){var a=n+"Index",i=n+"Id";return _p(this.ecModel,n,{index:this.get(a,!0),id:this.get(i,!0)},r)},t.prototype.getBoxLayoutParams=function(){var n=this;return{left:n.get("left"),top:n.get("top"),right:n.get("right"),bottom:n.get("bottom"),width:n.get("width"),height:n.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(n){this.option.zlevel=n},t.protoInitialize=function(){var n=t.prototype;n.type="component",n.id="",n.name="",n.mainType="",n.subType="",n.componentIndex=0}(),t}(Yn);h4(In,Yn);h0(In);rme(In);ame(In,_me);function _me(e){var t=[];return he(In.getClassesByMainType(e),function(n){t=t.concat(n.dependencies||n.prototype.dependencies||[])}),t=zt(t,function(n){return _o(n).main}),e!=="dataset"&&On(t,"dataset")<=0&&t.unshift("dataset"),t}var hB="";typeof navigator<"u"&&(hB=navigator.platform||"");var yc="rgba(0, 0, 0, 0.2)";const wme={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:yc,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:yc,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:yc,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:yc,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:yc,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:yc,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:hB.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var pB=un(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Mi="original",Oa="arrayRows",ao="objectRows",No="keyedColumns",ol="typedArray",vB="unknown",os="column",Df="row",Pr={Must:1,Might:2,Not:3},gB=pr();function Sme(e){gB(e).datasetMap=un()}function Cme(e,t,n){var r={},a=v2(t);if(!a||!e)return r;var i=[],o=[],s=t.ecModel,l=gB(s).datasetMap,u=a.uid+"_"+n.seriesLayoutBy,c,f;e=e.slice(),he(e,function(v,g){var m=Wt(v)?v:e[g]={name:v};m.type==="ordinal"&&c==null&&(c=g,f=p(m)),r[m.name]=[]});var d=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});he(e,function(v,g){var m=v.name,b=p(v);if(c==null){var w=d.valueWayDim;h(r[m],w,b),h(o,w,b),d.valueWayDim+=b}else if(c===g)h(r[m],0,b),h(i,0,b);else{var w=d.categoryWayDim;h(r[m],w,b),h(o,w,b),d.categoryWayDim+=b}});function h(v,g,m){for(var b=0;bt)return e[r];return e[n-1]}function Ame(e,t,n,r,a,i,o){i=i||e;var s=t(i),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(a))return u[a];var c=o==null||!r?n:Mme(r,o);if(c=c||n,!(!c||!c.length)){var f=c[l];return a&&(u[a]=f),s.paletteIdx=(l+1)%c.length,f}}function Ime(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var Lv,sd,kI,EI="\0_ec_inner",Dme=1,m2=function(e){Yt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(n,r,a,i,o,s){i=i||{},this.option=null,this._theme=new Yn(i),this._locale=new Yn(o),this._optionManager=s},t.prototype.setOption=function(n,r,a){var i=II(r);this._optionManager.setOption(n,a,i),this._resetOption(null,i)},t.prototype.resetOption=function(n,r){return this._resetOption(n,II(r))},t.prototype._resetOption=function(n,r){var a=!1,i=this._optionManager;if(!n||n==="recreate"){var o=i.mountOption(n==="recreate");!this.option||n==="recreate"?kI(this,o):(this.restoreData(),this._mergeOption(o,r)),a=!0}if((n==="timeline"||n==="media")&&this.restoreData(),!n||n==="recreate"||n==="timeline"){var s=i.getTimelineOption(this);s&&(a=!0,this._mergeOption(s,r))}if(!n||n==="recreate"||n==="media"){var l=i.getMediaOption(this);l.length&&he(l,function(u){a=!0,this._mergeOption(u,r)},this)}return a},t.prototype.mergeOption=function(n){this._mergeOption(n,null)},t.prototype._mergeOption=function(n,r){var a=this.option,i=this._componentsMap,o=this._componentsCount,s=[],l=un(),u=r&&r.replaceMergeMainTypeMap;Sme(this),he(n,function(f,d){f!=null&&(In.hasClass(d)?d&&(s.push(d),l.set(d,!0)):a[d]=a[d]==null?yn(f):wn(a[d],f,!0))}),u&&u.each(function(f,d){In.hasClass(d)&&!l.get(d)&&(s.push(d),l.set(d,!0))}),In.topologicalTravel(s,In.getAllClassMainTypes(),c,this);function c(f){var d=Eme(this,f,pa(n[f])),h=i.get(f),p=h?u&&u.get(f)?"replaceMerge":"normalMerge":"replaceAll",v=Npe(h,d,p);Wpe(v,f,In),a[f]=null,i.set(f,null),o.set(f,0);var g=[],m=[],b=0,w;he(v,function(_,C){var x=_.existing,T=_.newOption;if(!T)x&&(x.mergeOption({},this),x.optionUpdated({},!1));else{var M=f==="series",E=In.getClass(f,_.keyInfo.subType,!M);if(!E)return;if(f==="tooltip"){if(w)return;w=!0}if(x&&x.constructor===E)x.name=_.keyInfo.name,x.mergeOption(T,this),x.optionUpdated(T,!1);else{var A=ct({componentIndex:C},_.keyInfo);x=new E(T,this,this,A),ct(x,A),_.brandNew&&(x.__requireNewView=!0),x.init(T,this,this),x.optionUpdated(null,!0)}}x?(g.push(x.option),m.push(x),b++):(g.push(void 0),m.push(void 0))},this),a[f]=g,i.set(f,m),o.set(f,b),f==="series"&&Lv(this)}this._seriesIndices||Lv(this)},t.prototype.getOption=function(){var n=yn(this.option);return he(n,function(r,a){if(In.hasClass(a)){for(var i=pa(r),o=i.length,s=!1,l=o-1;l>=0;l--)i[l]&&!Bh(i[l])?s=!0:(i[l]=null,!s&&o--);i.length=o,n[a]=i}}),delete n[EI],n},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(n){this._payload=n},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(n,r){var a=this._componentsMap.get(n);if(a){var i=a[r||0];if(i)return i;if(r==null){for(var o=0;o=t:n==="max"?e<=t:e===t}function Vme(e,t){return e.join(",")===t.join(",")}var Ii=he,Wh=Wt,DI=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function j_(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=DI.length;n=0;g--){var m=e[g];if(s||(p=m.data.rawIndexOf(m.stackedByDimension,h)),p>=0){var b=m.data.getByRawIndex(m.stackResultDimension,p);if(l==="all"||l==="positive"&&b>0||l==="negative"&&b<0||l==="samesign"&&d>=0&&b>0||l==="samesign"&&d<=0&&b<0){d=Ape(d,b),v=b;break}}}return r[0]=d,r[1]=v,r})})}var R0=function(){function e(t){this.data=t.data||(t.sourceFormat===No?{}:[]),this.sourceFormat=t.sourceFormat||vB,this.seriesLayoutBy=t.seriesLayoutBy||os,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var n=this.dimensionsDefine=t.dimensionsDefine;if(n)for(var r=0;rv&&(v=w)}h[0]=p,h[1]=v}},a=function(){return this._data?this._data.length/this._dimSize:0};BI=(t={},t[Oa+"_"+os]={pure:!0,appendData:i},t[Oa+"_"+Df]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[ao]={pure:!0,appendData:i},t[No]={pure:!0,appendData:function(o){var s=this._data;he(o,function(l,u){for(var c=s[u]||(s[u]=[]),f=0;f<(l||[]).length;f++)c.push(l[f])})}},t[Mi]={appendData:i},t[ol]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function i(o){for(var s=0;s=0&&(v=o.interpolatedValue[g])}return v!=null?v+"":""})}},e.prototype.getRawValue=function(t,n){return pf(this.getData(n),t)},e.prototype.formatTooltip=function(t,n,r){},e}();function HI(e){var t,n;return Wt(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function oh(e){return new aye(e)}var aye=function(){function e(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return e.prototype.perform=function(t){var n=this._upstream,r=t&&t.skip;if(this._dirty&&n){var a=this.context;a.data=a.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!r&&(i=this._plan(this.context));var o=c(this._modBy),s=this._modDataCount||0,l=c(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(i="reset");function c(b){return!(b>=1)&&(b=1),b}var f;(this._dirty||i==="reset")&&(this._dirty=!1,f=this._doReset(r)),this._modBy=l,this._modDataCount=u;var d=t&&t.step;if(n?this._dueEnd=n._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var h=this._dueIndex,p=Math.min(d!=null?this._dueIndex+d:1/0,this._dueEnd);if(!r&&(f||h1&&r>0?s:o}};return i;function o(){return t=e?null:la?-this._resultLT:0},e}(),oye=function(){function e(){}return e.prototype.getRawData=function(){throw new Error("not supported")},e.prototype.getRawDataItem=function(t){throw new Error("not supported")},e.prototype.cloneRawData=function(){},e.prototype.getDimensionInfo=function(t){},e.prototype.cloneAllDimensionInfo=function(){},e.prototype.count=function(){},e.prototype.retrieveValue=function(t,n){},e.prototype.retrieveValueFromItem=function(t,n){},e.prototype.convertValue=function(t,n){return Wg(t,n)},e}();function sye(e,t){var n=new oye,r=e.data,a=n.sourceFormat=e.sourceFormat,i=e.startIndex,o="";e.seriesLayoutBy!==os&&Ta(o);var s=[],l={},u=e.dimensionsDefine;if(u)he(u,function(v,g){var m=v.name,b={index:g,name:m,displayName:v.displayName};if(s.push(b),m!=null){var w="";ml(l,m)&&Ta(w),l[m]=b}});else for(var c=0;c65535?vye:gye}function _c(){return[1/0,-1/0]}function mye(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function KI(e,t,n,r,a){var i=DB[n||"float"];if(a){var o=e[t],s=o&&o.length;if(s!==r){for(var l=new i(r),u=0;ug[1]&&(g[1]=v)}return this._rawCount=this._count=l,{start:s,end:l}},e.prototype._initDataFromProvider=function(t,n,r){for(var a=this._provider,i=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=zt(o,function(b){return b.property}),c=0;cm[1]&&(m[1]=g)}}!a.persistent&&a.clean&&a.clean(),this._rawCount=this._count=n,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(t,n){if(!(n>=0&&n=0&&n=this._rawCount||t<0)return-1;if(!this._indices)return t;var n=this._indices,r=n[t];if(r!=null&&rt)i=o-1;else return o}return-1},e.prototype.indicesOfNearest=function(t,n,r){var a=this._chunks,i=a[t],o=[];if(!i)return o;r==null&&(r=1/0);for(var s=1/0,l=-1,u=0,c=0,f=this.count();c=0&&l<0)&&(s=p,l=h,u=0),h===l&&(o[u++]=c))}return o.length=u,o},e.prototype.getIndices=function(){var t,n=this._indices;if(n){var r=n.constructor,a=this._count;if(r===Array){t=new r(a);for(var i=0;i=f&&b<=d||isNaN(b))&&(l[u++]=v),v++}p=!0}else if(i===2){for(var g=h[a[0]],w=h[a[1]],_=t[a[1]][0],C=t[a[1]][1],m=0;m=f&&b<=d||isNaN(b))&&(x>=_&&x<=C||isNaN(x))&&(l[u++]=v),v++}p=!0}}if(!p)if(i===1)for(var m=0;m=f&&b<=d||isNaN(b))&&(l[u++]=T)}else for(var m=0;mt[A][1])&&(M=!1)}M&&(l[u++]=n.getRawIndex(m))}return um[1]&&(m[1]=g)}}}},e.prototype.lttbDownSample=function(t,n){var r=this.clone([t],!0),a=r._chunks,i=a[t],o=this.count(),s=0,l=Math.floor(1/n),u=this.getRawIndex(0),c,f,d,h=new(bc(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));h[s++]=u;for(var p=1;pc&&(c=f,d=_)}L>0&&Ls&&(v=s-c);for(var g=0;gp&&(p=b,h=c+g)}var w=this.getRawIndex(f),_=this.getRawIndex(h);fc-p&&(l=c-p,s.length=l);for(var v=0;vf[1]&&(f[1]=m),d[h++]=b}return i._count=h,i._indices=d,i._updateGetRawIdx(),i},e.prototype.each=function(t,n){if(this._count)for(var r=t.length,a=this._chunks,i=0,o=this.count();il&&(l=f)}return o=[s,l],this._extent[t]=o,o},e.prototype.getRawDataItem=function(t){var n=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(n);for(var r=[],a=this._chunks,i=0;i=0?this._indices[t]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function t(n,r,a,i){return Wg(n[i],this._dimensions[i])}q_={arrayRows:t,objectRows:function(n,r,a,i){return Wg(n[r],this._dimensions[i])},keyedColumns:t,original:function(n,r,a,i){var o=n&&(n.value==null?n:n.value);return Wg(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(n,r,a,i){return n[i]}}}(),e}(),yye=function(){function e(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return e.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},e.prototype._setLocalSource=function(t,n){this._sourceList=t,this._upstreamSignList=n,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var t=this._sourceHost,n=this._getUpstreamSourceManagers(),r=!!n.length,a,i;if(Rv(t)){var o=t,s=void 0,l=void 0,u=void 0;if(r){var c=n[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,i=[c._getVersionSign()]}else s=o.get("data",!0),l=ga(s)?ol:Mi,i=[];var f=this._getSourceMetaRawOption()||{},d=u&&u.metaRawOption||{},h=ln(f.seriesLayoutBy,d.seriesLayoutBy)||null,p=ln(f.sourceHeader,d.sourceHeader),v=ln(f.dimensions,d.dimensions),g=h!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||v;a=g?[gS(s,{seriesLayoutBy:h,sourceHeader:p,dimensions:v},l)]:[]}else{var m=t;if(r){var b=this._applyTransform(n);a=b.sourceList,i=b.upstreamSignList}else{var w=m.get("source",!0);a=[gS(w,this._getSourceMetaRawOption(),null)],i=[]}}this._setLocalSource(a,i)},e.prototype._applyTransform=function(t){var n=this._sourceHost,r=n.get("transform",!0),a=n.get("fromTransformResult",!0);if(a!=null){var i="";t.length!==1&&jI(i)}var o,s=[],l=[];return he(t,function(u){u.prepareSource();var c=u.getSource(a||0),f="";a!=null&&!c&&jI(f),s.push(c),l.push(u._getVersionSign())}),r?o=hye(r,s,{datasetIndex:n.componentIndex}):a!=null&&(o=[Xme(s[0])]),{sourceList:o,upstreamSignList:l}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),n=0;n1||n>0&&!e.noHeader;return he(e.blocks,function(a){var i=RB(a);i>=t&&(t=i+ +(r&&(!i||yS(a)&&!a.noHeader)))}),t}return 0}function Sye(e,t,n,r){var a=t.noHeader,i=xye(RB(t)),o=[],s=t.blocks||[];Po(!s||It(s)),s=s||[];var l=e.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(ml(u,l)){var c=new iye(u[l],null);s.sort(function(v,g){return c.evaluate(v.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}he(s,function(v,g){var m=t.valueFormatter,b=LB(v)(m?ct(ct({},e),{valueFormatter:m}):e,v,g>0?i.html:0,r);b!=null&&o.push(b)});var f=e.renderMode==="richText"?o.join(i.richText):bS(r,o.join(""),a?n:i.html);if(a)return f;var d=vS(t.header,"ordinal",e.useUTC),h=OB(r,e.renderMode).nameStyle,p=PB(r);return e.renderMode==="richText"?NB(e,d,h)+i.richText+f:bS(r,'
'+la(d)+"
"+f,n)}function Cye(e,t,n,r){var a=e.renderMode,i=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=e.useUTC,c=t.valueFormatter||e.valueFormatter||function(_){return _=It(_)?_:[_],zt(_,function(C,x){return vS(C,It(h)?h[x]:h,u)})};if(!(i&&o)){var f=s?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",a),d=i?"":vS(l,"ordinal",u),h=t.valueType,p=o?[]:c(t.value,t.dataIndex),v=!s||!i,g=!s&&i,m=OB(r,a),b=m.nameStyle,w=m.valueStyle;return a==="richText"?(s?"":f)+(i?"":NB(e,d,b))+(o?"":Eye(e,p,v,g,w)):bS(r,(s?"":f)+(i?"":Tye(d,!s,b))+(o?"":kye(p,v,g,w)),n)}}function YI(e,t,n,r,a,i){if(e){var o=LB(e),s={useUTC:a,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter};return o(s,e,0,i)}}function xye(e){return{html:_ye[e],richText:wye[e]}}function bS(e,t,n){var r='
',a="margin: "+n+"px 0 0",i=PB(e);return'
'+t+r+"
"}function Tye(e,t,n){var r=t?"margin-left:2px":"";return''+la(e)+""}function kye(e,t,n,r){var a=n?"10px":"20px",i=t?"float:right;margin-left:"+a:"";return e=It(e)?e:[e],''+zt(e,function(o){return la(o)}).join("  ")+""}function NB(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function Eye(e,t,n,r,a){var i=[a],o=r?10:20;return n&&i.push({padding:[0,0,0,o],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(It(t)?t.join(" "):t,i)}function Mye(e,t){var n=e.getData().getItemVisual(t,"style"),r=n[e.visualDrawType];return zu(r)}function $B(e,t){var n=e.get("padding");return n??(t==="richText"?[8,10]:10)}var X_=function(){function e(){this.richTextStyles={},this._nextStyleNameId=o4()}return e.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(t,n,r){var a=r==="richText"?this._generateStyleName():null,i=dB({color:n,type:t,renderMode:r,markerId:a});return Bt(i)?i:(this.richTextStyles[a]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(t,n){var r={};It(n)?he(n,function(i){return ct(r,i)}):ct(r,n);var a=this._generateStyleName();return this.richTextStyles[a]=r,"{"+a+"|"+t+"}"},e}();function Aye(e){var t=e.series,n=e.dataIndex,r=e.multipleSeries,a=t.getData(),i=a.mapDimensionsAll("defaultedTooltip"),o=i.length,s=t.getRawValue(n),l=It(s),u=Mye(t,n),c,f,d,h;if(o>1||l&&!o){var p=Iye(s,t,n,i,u);c=p.inlineValues,f=p.inlineValueTypes,d=p.blocks,h=p.inlineValues[0]}else if(o){var v=a.getDimensionInfo(i[0]);h=c=pf(a,n,i[0]),f=v.type}else h=c=l?s[0]:s;var g=Kx(t),m=g&&t.name||"",b=a.getName(n),w=r?m:b;return Uh("section",{header:m,noHeader:r||!g,sortParam:h,blocks:[Uh("nameValue",{markerType:"item",markerColor:u,name:w,noName:!Vi(w),value:c,valueType:f,dataIndex:n})].concat(d||[])})}function Iye(e,t,n,r,a){var i=t.getData(),o=Do(e,function(f,d,h){var p=i.getDimensionInfo(h);return f=f||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];r.length?he(r,function(f){c(pf(i,n,f),f)}):he(e,c);function c(f,d){var h=i.getDimensionInfo(d);!h||h.otherDims.tooltip===!1||(o?u.push(Uh("nameValue",{markerType:"subItem",markerColor:a,name:h.displayName,value:f,valueType:h.type})):(s.push(f),l.push(h.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var As=pr();function Nv(e,t){return e.getName(t)||e.getId(t)}var Dye="__universalTransitionEnabled",ma=function(e){Yt(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n._selectedDataIndicesMap={},n}return t.prototype.init=function(n,r,a){this.seriesIndex=this.componentIndex,this.dataTask=oh({count:Oye,reset:Lye}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(n,a);var i=As(this).sourceManager=new yye(this);i.prepareSource();var o=this.getInitialData(n,a);qI(o,this),this.dataTask.context.data=o,As(this).dataBeforeProcessed=o,GI(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(n,r){var a=Hh(this),i=a?O0(n):{},o=this.subType;In.hasClass(o)&&(o+="Series"),wn(n,r.getTheme().get(this.subType)),wn(n,this.getDefaultOption()),rS(n,"label",["show"]),this.fillDataTextStyle(n.data),a&&hf(n,i,a)},t.prototype.mergeOption=function(n,r){n=wn(this.option,n,!0),this.fillDataTextStyle(n.data);var a=Hh(this);a&&hf(this.option,n,a);var i=As(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(n,r);qI(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,As(this).dataBeforeProcessed=o,GI(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(n){if(n&&!ga(n))for(var r=["show"],a=0;athis.getShallow("animationThreshold")&&(r=!1),!!r},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(n,r,a){var i=this.ecModel,o=g2.prototype.getColorFromPalette.call(this,n,r,a);return o||(o=i.getColorFromPalette(n,r,a)),o},t.prototype.coordDimToDataDim=function(n){return this.getRawData().mapDimensionsAll(n)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(n,r){this._innerSelect(this.getData(r),n)},t.prototype.unselect=function(n,r){var a=this.option.selectedMap;if(a){var i=this.option.selectedMode,o=this.getData(r);if(i==="series"||a==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&a.push(o)}return a},t.prototype.isSelected=function(n,r){var a=this.option.selectedMap;if(!a)return!1;var i=this.getData(r);return(a==="all"||a[Nv(i,n)])&&!i.getItemModel(n).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[Dye])return!0;var n=this.option.universalTransition;return n?n===!0?!0:n&&n.enabled:!1},t.prototype._innerSelect=function(n,r){var a,i,o=this.option,s=o.selectedMode,l=r.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){Wt(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c0&&this._innerSelect(n,r)}},t.registerClass=function(n){return In.registerClass(n)},t.protoInitialize=function(){var n=t.prototype;n.type="series.__base__",n.seriesIndex=0,n.ignoreStyleOnData=!1,n.hasSymbolVisual=!1,n.defaultSymbol="circle",n.visualStyleAccessPath="itemStyle",n.visualDrawType="fill"}(),t}(In);ki(ma,rye);ki(ma,g2);h4(ma,In);function GI(e){var t=e.name;Kx(e)||(e.name=Pye(e)||t)}function Pye(e){var t=e.getRawData(),n=t.mapDimensionsAll("seriesName"),r=[];return he(n,function(a){var i=t.getDimensionInfo(a);i.displayName&&r.push(i.displayName)}),r.join(" ")}function Oye(e){return e.model.getRawData().count()}function Lye(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),Rye}function Rye(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function qI(e,t){he(k$(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,er(Nye,t))})}function Nye(e,t){var n=_S(e);return n&&n.setOutputEnd((t||this).count()),t}function _S(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var a=r.agentStubMap;a&&(r=a.get(e.uid))}return r}}var Ga=function(){function e(){this.group=new br,this.uid=M0("viewComponent")}return e.prototype.init=function(t,n){},e.prototype.render=function(t,n,r,a){},e.prototype.dispose=function(t,n){},e.prototype.updateView=function(t,n,r,a){},e.prototype.updateLayout=function(t,n,r,a){},e.prototype.updateVisual=function(t,n,r,a){},e.prototype.toggleBlurSeries=function(t,n,r){},e.prototype.eachRendered=function(t){var n=this.group;n&&n.traverse(t)},e}();Yx(Ga);h0(Ga);function w2(){var e=pr();return function(t){var n=e(t),r=t.pipelineContext,a=!!n.large,i=!!n.progressiveRender,o=n.large=!!(r&&r.large),s=n.progressiveRender=!!(r&&r.progressiveRender);return(a!==o||i!==s)&&"reset"}}var BB=pr(),$ye=w2(),Jr=function(){function e(){this.group=new br,this.uid=M0("viewChart"),this.renderTask=oh({plan:Bye,reset:Fye}),this.renderTask.context={view:this}}return e.prototype.init=function(t,n){},e.prototype.render=function(t,n,r,a){},e.prototype.highlight=function(t,n,r,a){var i=t.getData(a&&a.dataType);i&&ZI(i,a,"emphasis")},e.prototype.downplay=function(t,n,r,a){var i=t.getData(a&&a.dataType);i&&ZI(i,a,"normal")},e.prototype.remove=function(t,n){this.group.removeAll()},e.prototype.dispose=function(t,n){},e.prototype.updateView=function(t,n,r,a){this.render(t,n,r,a)},e.prototype.updateLayout=function(t,n,r,a){this.render(t,n,r,a)},e.prototype.updateVisual=function(t,n,r,a){this.render(t,n,r,a)},e.prototype.eachRendered=function(t){k0(this.group,t)},e.markUpdateMethod=function(t,n){BB(t).updateMethod=n},e.protoInitialize=function(){var t=e.prototype;t.type="chart"}(),e}();function XI(e,t,n){e&&cS(e)&&(t==="emphasis"?Um:Km)(e,n)}function ZI(e,t,n){var r=Bu(e,t),a=t&&t.highlightKey!=null?uge(t.highlightKey):null;r!=null?he(pa(r),function(i){XI(e.getItemGraphicEl(i),n,a)}):e.eachItemGraphicEl(function(i){XI(i,n,a)})}Yx(Jr);h0(Jr);function Bye(e){return $ye(e.model)}function Fye(e){var t=e.model,n=e.ecModel,r=e.api,a=e.payload,i=t.pipelineContext.progressiveRender,o=e.view,s=a&&BB(a).updateMethod,l=i?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,n,r,a),Vye[l]}var Vye={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},Qm="\0__throttleOriginMethod",JI="\0__throttleRate",QI="\0__throttleType";function $0(e,t,n){var r,a=0,i=0,o=null,s,l,u,c;t=t||0;function f(){i=new Date().getTime(),o=null,e.apply(l,u||[])}var d=function(){for(var h=[],p=0;p=0?f():o=setTimeout(f,-s),a=r};return d.clear=function(){o&&(clearTimeout(o),o=null)},d.debounceNextCall=function(h){c=h},d}function FB(e,t,n,r){var a=e[t];if(a){var i=a[Qm]||a,o=a[QI],s=a[JI];if(s!==n||o!==r){if(n==null)return e[t]=i;a=e[t]=$0(i,n,r==="debounce"),a[Qm]=i,a[QI]=r,a[JI]=n}return a}}function wS(e,t){var n=e[t];n&&n[Qm]&&(n.clear&&n.clear(),e[t]=n[Qm])}var eD=pr(),tD={itemStyle:Fh(tB,!0),lineStyle:Fh(eB,!0)},zye={lineStyle:"stroke",itemStyle:"fill"};function VB(e,t){var n=e.visualStyleMapper||tD[t];return n||(console.warn("Unknown style type '"+t+"'."),tD.itemStyle)}function zB(e,t){var n=e.visualDrawType||zye[t];return n||(console.warn("Unknown style type '"+t+"'."),"fill")}var Hye={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",a=e.getModel(r),i=VB(e,r),o=i(a),s=a.getShallow("decal");s&&(n.setVisual("decal",s),s.dirty=!0);var l=zB(e,r),u=o[l],c=Jt(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||f){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());o[l]||(o[l]=d,n.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||Jt(o.fill)?d:o.fill,o.stroke=o.stroke==="auto"||Jt(o.stroke)?d:o.stroke}if(n.setVisual("style",o),n.setVisual("drawType",l),!t.isSeriesFiltered(e)&&c)return n.setVisual("colorFromPalette",!1),{dataEach:function(h,p){var v=e.getDataParams(p),g=ct({},o);g[l]=c(v),h.setItemVisual(p,"style",g)}}}},ud=new Yn,Wye={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(!(e.ignoreStyleOnData||t.isSeriesFiltered(e))){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",a=VB(e,r),i=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[r]){ud.option=l[r];var u=a(ud),c=o.ensureUniqueItemVisual(s,"style");ct(c,u),ud.option.decal&&(o.setItemVisual(s,"decal",ud.option.decal),ud.option.decal.dirty=!0),i in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},Uye={performRawSeries:!0,overallReset:function(e){var t=un();e.eachSeries(function(n){var r=n.getColorBy();if(!n.isColorBySeries()){var a=n.type+"-"+r,i=t.get(a);i||(i={},t.set(a,i)),eD(n).scope=i}}),e.eachSeries(function(n){if(!(n.isColorBySeries()||e.isSeriesFiltered(n))){var r=n.getRawData(),a={},i=n.getData(),o=eD(n).scope,s=n.visualStyleAccessPath||"itemStyle",l=zB(n,s);i.each(function(u){var c=i.getRawIndex(u);a[c]=u}),r.each(function(u){var c=a[u],f=i.getItemVisual(c,"colorFromPalette");if(f){var d=i.ensureUniqueItemVisual(c,"style"),h=r.getName(u)||u+"",p=r.count();d[l]=n.getColorFromPalette(h,o,p)}})}})}},$v=Math.PI;function Kye(e,t){t=t||{},Mn(t,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new br,r=new yr({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var a=new dr({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),i=new yr({style:{fill:"none"},textContent:a,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});n.add(i);var o;return t.showSpinner&&(o=new Cp({shape:{startAngle:-$v/2,endAngle:-$v/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:$v*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:$v*3/2}).delay(300).start("circularInOut"),n.add(o)),n.resize=function(){var s=a.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(e.getWidth()-l*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),c=e.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:c}),i.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}var HB=function(){function e(t,n,r,a){this._stageTaskMap=un(),this.ecInstance=t,this.api=n,r=this._dataProcessorHandlers=r.slice(),a=this._visualHandlers=a.slice(),this._allHandlers=r.concat(a)}return e.prototype.restoreData=function(t,n){t.restoreData(n),this._stageTaskMap.each(function(r){var a=r.overallTask;a&&a.dirty()})},e.prototype.getPerformArgs=function(t,n){if(t.__pipeline){var r=this._pipelineMap.get(t.__pipeline.id),a=r.context,i=!n&&r.progressiveEnabled&&(!a||a.progressiveRender)&&t.__idxInPipeline>r.blockIndex,o=i?r.step:null,s=a&&a.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},e.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},e.prototype.updateStreamModes=function(t,n){var r=this._pipelineMap.get(t.uid),a=t.getData(),i=a.count(),o=r.progressiveEnabled&&n.incrementalPrepareRender&&i>=r.threshold,s=t.get("large")&&i>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?i:null;t.pipelineContext=r.context={progressiveRender:o,modDataCount:l,large:s}},e.prototype.restorePipelines=function(t){var n=this,r=n._pipelineMap=un();t.eachSeries(function(a){var i=a.getProgressive(),o=a.uid;r.set(o,{id:o,head:null,tail:null,threshold:a.getProgressiveThreshold(),progressiveEnabled:i&&!(a.preventIncremental&&a.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),n._pipe(a,a.dataTask)})},e.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,n=this.api.getModel(),r=this.api;he(this._allHandlers,function(a){var i=t.get(a.uid)||t.set(a.uid,{}),o="";Po(!(a.reset&&a.overallReset),o),a.reset&&this._createSeriesStageTask(a,i,n,r),a.overallReset&&this._createOverallStageTask(a,i,n,r)},this)},e.prototype.prepareView=function(t,n,r,a){var i=t.renderTask,o=i.context;o.model=n,o.ecModel=r,o.api=a,i.__block=!t.incrementalPrepareRender,this._pipe(n,i)},e.prototype.performDataProcessorTasks=function(t,n){this._performStageTasks(this._dataProcessorHandlers,t,n,{block:!0})},e.prototype.performVisualTasks=function(t,n,r){this._performStageTasks(this._visualHandlers,t,n,r)},e.prototype._performStageTasks=function(t,n,r,a){a=a||{};var i=!1,o=this;he(t,function(l,u){if(!(a.visualType&&a.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),f=c.seriesTaskMap,d=c.overallTask;if(d){var h,p=d.agentStubMap;p.each(function(g){s(a,g)&&(g.dirty(),h=!0)}),h&&d.dirty(),o.updatePayload(d,r);var v=o.getPerformArgs(d,a.block);p.each(function(g){g.perform(v)}),d.perform(v)&&(i=!0)}else f&&f.each(function(g,m){s(a,g)&&g.dirty();var b=o.getPerformArgs(g,a.block);b.skip=!l.performRawSeries&&n.isSeriesFiltered(g.context.model),o.updatePayload(g,r),g.perform(b)&&(i=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(t){var n;t.eachSeries(function(r){n=r.dataTask.perform()||n}),this.unfinished=n||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(t){var n=t.tail;do{if(n.__block){t.blockIndex=n.__idxInPipeline;break}n=n.getUpstream()}while(n)})},e.prototype.updatePayload=function(t,n){n!=="remain"&&(t.context.payload=n)},e.prototype._createSeriesStageTask=function(t,n,r,a){var i=this,o=n.seriesTaskMap,s=n.seriesTaskMap=un(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?r.eachRawSeries(c):l?r.eachRawSeriesByType(l,c):u&&u(r,a).each(c);function c(f){var d=f.uid,h=s.set(d,o&&o.get(d)||oh({plan:Xye,reset:Zye,count:Qye}));h.context={model:f,ecModel:r,api:a,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:i},i._pipe(f,h)}},e.prototype._createOverallStageTask=function(t,n,r,a){var i=this,o=n.overallTask=n.overallTask||oh({reset:jye});o.context={ecModel:r,api:a,overallReset:t.overallReset,scheduler:i};var s=o.agentStubMap,l=o.agentStubMap=un(),u=t.seriesType,c=t.getTargetSeries,f=!0,d=!1,h="";Po(!t.createOnAllSeries,h),u?r.eachRawSeriesByType(u,p):c?c(r,a).each(p):(f=!1,he(r.getSeries(),p));function p(v){var g=v.uid,m=l.set(g,s&&s.get(g)||(d=!0,oh({reset:Yye,onDirty:qye})));m.context={model:v,overallProgress:f},m.agent=o,m.__block=f,i._pipe(v,m)}d&&o.dirty()},e.prototype._pipe=function(t,n){var r=t.uid,a=this._pipelineMap.get(r);!a.head&&(a.head=n),a.tail&&a.tail.pipe(n),a.tail=n,n.__idxInPipeline=a.count++,n.__pipeline=a},e.wrapStageHandler=function(t,n){return Jt(t)&&(t={overallReset:t,seriesType:e0e(t)}),t.uid=M0("stageHandler"),n&&(t.visualType=n),t},e}();function jye(e){e.overallReset(e.ecModel,e.api,e.payload)}function Yye(e){return e.overallProgress&&Gye}function Gye(){this.agent.dirty(),this.getDownstream().dirty()}function qye(){this.agent&&this.agent.dirty()}function Xye(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function Zye(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=pa(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?zt(t,function(n,r){return WB(r)}):Jye}var Jye=WB(0);function WB(e){return function(t,n){var r=n.data,a=n.resetDefines[e];if(a&&a.dataEach)for(var i=t.start;i0&&h===u.length-d.length){var p=u.slice(0,h);p!=="data"&&(n.mainType=p,n[d.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(r[u]=l,c=!0),c||(a[u]=l)})}return{cptQuery:n,dataQuery:r,otherQuery:a}},e.prototype.filter=function(t,n){var r=this.eventInfo;if(!r)return!0;var a=r.targetEl,i=r.packedEvent,o=r.model,s=r.view;if(!o||!s)return!0;var l=n.cptQuery,u=n.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,i,"name")&&c(u,i,"dataIndex")&&c(u,i,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,n.otherQuery,a,i));function c(f,d,h,p){return f[h]==null||d[p||h]===f[h]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),SS=["symbol","symbolSize","symbolRotate","symbolOffset"],iD=SS.concat(["symbolKeepAspect"]),r0e={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual("legendIcon",e.legendIcon),!e.hasSymbolVisual)return;for(var r={},a={},i=!1,o=0;o=0&&yu(l)?l:.5;var u=e.createRadialGradient(o,s,0,o,s,l);return u}function xS(e,t,n){for(var r=t.type==="radial"?S0e(e,t,n):w0e(e,t,n),a=t.colorStops,i=0;i0)?null:e==="dashed"?[4*t,2*t]:e==="dotted"?[t]:Bn(e)?[e]:It(e)?e:null}function GB(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&x0e(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var a=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;a&&a!==1&&(n=zt(n,function(i){return i/a}),r/=a)}return[n,r]}var T0e=new Fu(!0);function ty(e){var t=e.stroke;return!(t==null||t==="none"||!(e.lineWidth>0))}function oD(e){return typeof e=="string"&&e!=="none"}function ny(e){var t=e.fill;return t!=null&&t!=="none"}function sD(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function lD(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function TS(e,t,n){var r=p4(t.image,t.__image,n);if(p0(r)){var a=e.createPattern(r,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&a&&a.setTransform){var i=new DOMMatrix;i.translateSelf(t.x||0,t.y||0),i.rotateSelf(0,0,(t.rotation||0)*E$),i.scaleSelf(t.scaleX||1,t.scaleY||1),a.setTransform(i)}return a}}function k0e(e,t,n,r){var a,i=ty(n),o=ny(n),s=n.strokePercent,l=s<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var c=t.path||T0e,f=t.__dirty;if(!r){var d=n.fill,h=n.stroke,p=o&&!!d.colorStops,v=i&&!!h.colorStops,g=o&&!!d.image,m=i&&!!h.image,b=void 0,w=void 0,_=void 0,C=void 0,x=void 0;(p||v)&&(x=t.getBoundingRect()),p&&(b=f?xS(e,d,x):t.__canvasFillGradient,t.__canvasFillGradient=b),v&&(w=f?xS(e,h,x):t.__canvasStrokeGradient,t.__canvasStrokeGradient=w),g&&(_=f||!t.__canvasFillPattern?TS(e,d,t):t.__canvasFillPattern,t.__canvasFillPattern=_),m&&(C=f||!t.__canvasStrokePattern?TS(e,h,t):t.__canvasStrokePattern,t.__canvasStrokePattern=_),p?e.fillStyle=b:g&&(_?e.fillStyle=_:o=!1),v?e.strokeStyle=w:m&&(C?e.strokeStyle=C:i=!1)}var T=t.getGlobalScale();c.setScale(T[0],T[1],t.segmentIgnoreThreshold);var M,E;e.setLineDash&&n.lineDash&&(a=GB(t),M=a[0],E=a[1]);var A=!0;(u||f&xd)&&(c.setDPR(e.dpr),l?c.setContext(null):(c.setContext(e),A=!1),c.reset(),t.buildPath(c,t.shape,r),c.toStatic(),t.pathUpdated()),A&&c.rebuildPath(e,l?s:1),M&&(e.setLineDash(M),e.lineDashOffset=E),r||(n.strokeFirst?(i&&lD(e,n),o&&sD(e,n)):(o&&sD(e,n),i&&lD(e,n))),M&&e.setLineDash([])}function E0e(e,t,n){var r=t.__image=p4(n.image,t.__image,t,t.onload);if(!(!r||!p0(r))){var a=n.x||0,i=n.y||0,o=t.getWidth(),s=t.getHeight(),l=r.width/r.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=r.width,s=r.height),n.sWidth&&n.sHeight){var u=n.sx||0,c=n.sy||0;e.drawImage(r,u,c,n.sWidth,n.sHeight,a,i,o,s)}else if(n.sx&&n.sy){var u=n.sx,c=n.sy,f=o-u,d=s-c;e.drawImage(r,u,c,f,d,a,i,o,s)}else e.drawImage(r,a,i,o,s)}}function M0e(e,t,n){var r,a=n.text;if(a!=null&&(a+=""),a){e.font=n.font||$u,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var i=void 0,o=void 0;e.setLineDash&&n.lineDash&&(r=GB(t),i=r[0],o=r[1]),i&&(e.setLineDash(i),e.lineDashOffset=o),n.strokeFirst?(ty(n)&&e.strokeText(a,n.x,n.y),ny(n)&&e.fillText(a,n.x,n.y)):(ny(n)&&e.fillText(a,n.x,n.y),ty(n)&&e.strokeText(a,n.x,n.y)),i&&e.setLineDash([])}}var uD=["shadowBlur","shadowOffsetX","shadowOffsetY"],cD=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function qB(e,t,n,r,a){var i=!1;if(!r&&(n=n||{},t===n))return!1;if(r||t.opacity!==n.opacity){ka(e,a),i=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?Au.opacity:o}(r||t.blend!==n.blend)&&(i||(ka(e,a),i=!0),e.globalCompositeOperation=t.blend||Au.blend);for(var s=0;s0&&n.unfinished);n.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(n,r,a){if(!this[Hr]){if(this._disposed){this.id;return}var i,o,s;if(Wt(r)&&(a=r.lazyUpdate,i=r.silent,o=r.replaceMerge,s=r.transition,r=r.notMerge),this[Hr]=!0,!this._model||r){var l=new Nme(this._api),u=this._theme,c=this._model=new m2;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(n,{replaceMerge:o},MS);var f={seriesTransition:s,optionChanged:!0};if(a)this[Sa]={silent:i,updateParams:f},this[Hr]=!1,this.getZr().wakeUp();else{try{Sc(this),Is.update.call(this,null,f)}catch(d){throw this[Sa]=null,this[Hr]=!1,d}this._ssr||this._zr.flush(),this[Sa]=null,this[Hr]=!1,cd.call(this,i),fd.call(this,i)}}},t.prototype.setTheme=function(){},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Xt.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(n){return this.renderToCanvas(n)},t.prototype.renderToCanvas=function(n){n=n||{};var r=this._zr.painter;return r.getRenderedCanvas({backgroundColor:n.backgroundColor||this._model.get("backgroundColor"),pixelRatio:n.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(n){n=n||{};var r=this._zr.painter;return r.renderToString({useViewBox:n.useViewBox})},t.prototype.getSvgDataURL=function(){if(Xt.svgSupported){var n=this._zr,r=n.storage.getDisplayList();return he(r,function(a){a.stopAnimation(null,!0)}),n.painter.toDataURL()}},t.prototype.getDataURL=function(n){if(this._disposed){this.id;return}n=n||{};var r=n.excludeComponents,a=this._model,i=[],o=this;he(r,function(l){a.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(i.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(n).toDataURL("image/"+(n&&n.type||"png"));return he(i,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(n){if(this._disposed){this.id;return}var r=n.type==="svg",a=this.group,i=Math.min,o=Math.max,s=1/0;if(oy[a]){var l=s,u=s,c=-s,f=-s,d=[],h=n&&n.pixelRatio||this.getDevicePixelRatio();he(Du,function(w,_){if(w.group===a){var C=r?w.getZr().painter.getSvgDom().innerHTML:w.renderToCanvas(yn(n)),x=w.getDom().getBoundingClientRect();l=i(x.left,l),u=i(x.top,u),c=o(x.right,c),f=o(x.bottom,f),d.push({dom:C,left:x.left,top:x.top})}}),l*=h,u*=h,c*=h,f*=h;var p=c-l,v=f-u,g=cs.createCanvas(),m=tS(g,{renderer:r?"svg":"canvas"});if(m.resize({width:p,height:v}),r){var b="";return he(d,function(w){var _=w.left-l,C=w.top-u;b+=''+w.dom+""}),m.painter.getSvgRoot().innerHTML=b,n.connectedBackgroundColor&&m.painter.setBackgroundColor(n.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}else return n.connectedBackgroundColor&&m.add(new yr({shape:{x:0,y:0,width:p,height:v},style:{fill:n.connectedBackgroundColor}})),he(d,function(w){var _=new Ro({style:{x:w.left*h-l,y:w.top*h-u,image:w.dom}});m.add(_)}),m.refreshImmediately(),g.toDataURL("image/"+(n&&n.type||"png"))}else return this.getDataURL(n)},t.prototype.convertToPixel=function(n,r){return t1(this,"convertToPixel",n,r)},t.prototype.convertFromPixel=function(n,r){return t1(this,"convertFromPixel",n,r)},t.prototype.containPixel=function(n,r){if(this._disposed){this.id;return}var a=this._model,i,o=x_(a,n);return he(o,function(s,l){l.indexOf("Models")>=0&&he(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)i=i||!!c.containPoint(r);else if(l==="seriesModels"){var f=this._chartsMap[u.__viewId];f&&f.containPoint&&(i=i||f.containPoint(r,u))}},this)},this),!!i},t.prototype.getVisual=function(n,r){var a=this._model,i=x_(a,n,{defaultMainType:"series"}),o=i.seriesModel,s=o.getData(),l=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?s.indexOfRawIndex(i.dataIndex):null;return l!=null?i0e(s,l,r):o0e(s,r)},t.prototype.getViewOfComponentModel=function(n){return this._componentsMap[n.__viewId]},t.prototype.getViewOfSeriesModel=function(n){return this._chartsMap[n.__viewId]},t.prototype._initEvents=function(){var n=this;he(Q0e,function(r){var a=function(i){var o=n.getModel(),s=i.target,l,u=r==="globalout";if(u?l={}:s&&Id(s,function(p){var v=En(p);if(v&&v.dataIndex!=null){var g=v.dataModel||o.getSeriesByIndex(v.seriesIndex);return l=g&&g.getDataParams(v.dataIndex,v.dataType,s)||{},!0}else if(v.eventData)return l=ct({},v.eventData),!0},!0),l){var c=l.componentType,f=l.componentIndex;(c==="markLine"||c==="markPoint"||c==="markArea")&&(c="series",f=l.seriesIndex);var d=c&&f!=null&&o.getComponent(c,f),h=d&&n[d.mainType==="series"?"_chartsMap":"_componentsMap"][d.__viewId];l.event=i,l.type=r,n._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:d,view:h},n.trigger(r,l)}};a.zrEventfulCallAtLast=!0,n._zr.on(r,a,n)}),he(sh,function(r,a){n._messageCenter.on(a,function(i){this.trigger(a,i)},n)}),he(["selectchanged"],function(r){n._messageCenter.on(r,function(a){this.trigger(r,a)},n)}),l0e(this._messageCenter,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var n=this.getDom();n&&c4(this.getDom(),T2,"");var r=this,a=r._api,i=r._model;he(r._componentsViews,function(o){o.dispose(i,a)}),he(r._chartsViews,function(o){o.dispose(i,a)}),r._zr.dispose(),r._dom=r._model=r._chartsMap=r._componentsMap=r._chartsViews=r._componentsViews=r._scheduler=r._api=r._zr=r._throttledZrFlush=r._theme=r._coordSysMgr=r._messageCenter=null,delete Du[r.id]},t.prototype.resize=function(n){if(!this[Hr]){if(this._disposed){this.id;return}this._zr.resize(n);var r=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!r){var a=r.resetOption("media"),i=n&&n.silent;this[Sa]&&(i==null&&(i=this[Sa].silent),a=!0,this[Sa]=null),this[Hr]=!0;try{a&&Sc(this),Is.update.call(this,{type:"resize",animation:ct({duration:0},n&&n.animation)})}catch(o){throw this[Hr]=!1,o}this[Hr]=!1,cd.call(this,i),fd.call(this,i)}}},t.prototype.showLoading=function(n,r){if(this._disposed){this.id;return}if(Wt(n)&&(r=n,n=""),n=n||"default",this.hideLoading(),!!AS[n]){var a=AS[n](this._api,r),i=this._zr;this._loadingFX=a,i.add(a)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(n){var r=ct({},n);return r.type=sh[n.type],r},t.prototype.dispatchAction=function(n,r){if(this._disposed){this.id;return}if(Wt(r)||(r={silent:!!r}),!!ay[n.type]&&this._model){if(this[Hr]){this._pendingActions.push(n);return}var a=r.silent;r1.call(this,n,a);var i=r.flush;i?this._zr.flush():i!==!1&&Xt.browser.weChat&&this._throttledZrFlush(),cd.call(this,a),fd.call(this,a)}},t.prototype.updateLabelLayout=function(){Ri.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(n){if(this._disposed){this.id;return}var r=n.seriesIndex,a=this.getModel(),i=a.getSeriesByIndex(r);i.appendData(n),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){Sc=function(f){var d=f._scheduler;d.restorePipelines(f._model),d.prepareStageTasks(),e1(f,!0),e1(f,!1),d.plan()},e1=function(f,d){for(var h=f._model,p=f._scheduler,v=d?f._componentsViews:f._chartsViews,g=d?f._componentsMap:f._chartsMap,m=f._zr,b=f._api,w=0;wd.get("hoverLayerThreshold")&&!Xt.node&&!Xt.worker&&d.eachSeries(function(g){if(!g.preventUsingHoverLayer){var m=f._chartsMap[g.__viewId];m.__alive&&m.eachRendered(function(b){b.states.emphasis&&(b.states.emphasis.hoverLayer=!0)})}})}function o(f,d){var h=f.get("blendMode")||null;d.eachRendered(function(p){p.isGroup||(p.style.blend=h)})}function s(f,d){if(!f.preventAutoZ){var h=f.get("z")||0,p=f.get("zlevel")||0;d.eachRendered(function(v){return l(v,h,p,-1/0),!0})}}function l(f,d,h,p){var v=f.getTextContent(),g=f.getTextGuideLine(),m=f.isGroup;if(m)for(var b=f.childrenRef(),w=0;w0?{duration:v,delay:h.get("delay"),easing:h.get("easing")}:null;d.eachRendered(function(m){if(m.states&&m.states.emphasis){if(rh(m))return;if(m instanceof Rn&&cge(m),m.__dirty){var b=m.prevStates;b&&m.useStates(b)}if(p){m.stateTransition=g;var w=m.getTextContent(),_=m.getTextGuideLine();w&&(w.stateTransition=g),_&&(_.stateTransition=g)}m.__dirty&&a(m)}})}CD=function(f){return new(function(d){Yt(h,d);function h(){return d!==null&&d.apply(this,arguments)||this}return h.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},h.prototype.getComponentByElement=function(p){for(;p;){var v=p.__ecComponentInfo;if(v!=null)return f._model.getComponent(v.mainType,v.index);p=p.parent}},h.prototype.enterEmphasis=function(p,v){Um(p,v),Qa(f)},h.prototype.leaveEmphasis=function(p,v){Km(p,v),Qa(f)},h.prototype.enterBlur=function(p){ege(p),Qa(f)},h.prototype.leaveBlur=function(p){E4(p),Qa(f)},h.prototype.enterSelect=function(p){M4(p),Qa(f)},h.prototype.leaveSelect=function(p){A4(p),Qa(f)},h.prototype.getModel=function(){return f.getModel()},h.prototype.getViewOfComponentModel=function(p){return f.getViewOfComponentModel(p)},h.prototype.getViewOfSeriesModel=function(p){return f.getViewOfSeriesModel(p)},h}(bB))(f)},f8=function(f){function d(h,p){for(var v=0;v=0)){TD.push(n);var i=HB.wrapStageHandler(n,a);i.__prio=t,i.__raw=n,e.push(i)}}function D2(e,t){AS[e]=t}function lbe(e){b$({createCanvas:e})}function y8(e,t,n){var r=t8("registerMap");r&&r(e,t,n)}function ube(e){var t=t8("getMap");return t&&t(e)}var b8=dye;Il(C2,Hye);Il(B0,Wye);Il(B0,Uye);Il(C2,r0e);Il(B0,a0e);Il(a8,N0e);M2(wB);A2(H0e,Gme);D2("default",Kye);Zu({type:Iu,event:Iu,update:Iu},da);Zu({type:Fg,event:Fg,update:Fg},da);Zu({type:eh,event:eh,update:eh},da);Zu({type:Vg,event:Vg,update:Vg},da);Zu({type:th,event:th,update:th},da);E2("light",t0e);E2("dark",jB);var cbe={};function dd(e){return e==null?0:e.length||1}function kD(e){return e}var fbe=function(){function e(t,n,r,a,i,o){this._old=t,this._new=n,this._oldKeyGetter=r||kD,this._newKeyGetter=a||kD,this.context=i,this._diffModeMultiple=o==="multiple"}return e.prototype.add=function(t){return this._add=t,this},e.prototype.update=function(t){return this._update=t,this},e.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},e.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},e.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},e.prototype.remove=function(t){return this._remove=t,this},e.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},e.prototype._executeOneToOne=function(){var t=this._old,n=this._new,r={},a=new Array(t.length),i=new Array(n.length);this._initIndexMap(t,null,a,"_oldKeyGetter"),this._initIndexMap(n,r,i,"_newKeyGetter");for(var o=0;o1){var c=l.shift();l.length===1&&(r[s]=l[0]),this._update&&this._update(c,o)}else u===1?(r[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(i,r)},e.prototype._executeMultiple=function(){var t=this._old,n=this._new,r={},a={},i=[],o=[];this._initIndexMap(t,r,i,"_oldKeyGetter"),this._initIndexMap(n,a,o,"_newKeyGetter");for(var s=0;s1&&d===1)this._updateManyToOne&&this._updateManyToOne(c,u),a[l]=null;else if(f===1&&d>1)this._updateOneToMany&&this._updateOneToMany(c,u),a[l]=null;else if(f===1&&d===1)this._update&&this._update(c,u),a[l]=null;else if(f>1&&d>1)this._updateManyToMany&&this._updateManyToMany(c,u),a[l]=null;else if(f>1)for(var h=0;h1)for(var s=0;s30}var hd=Wt,Ds=zt,ybe=typeof Int32Array>"u"?Array:Int32Array,bbe="e\0\0",ED=-1,_be=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],wbe=["_approximateExtent"],MD,Wv,pd,vd,o1,gd,s1,P2=function(){function e(t,n){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var r,a=!1;w8(t)?(r=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(a=!0,r=t),r=r||["x","y"];for(var i={},o=[],s={},l=!1,u={},c=0;c=n)){var r=this._store,a=r.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList,s=a.getSource().sourceFormat,l=s===Mi;if(l&&!a.pure)for(var u=[],c=t;c0},e.prototype.ensureUniqueItemVisual=function(t,n){var r=this._itemVisuals,a=r[t];a||(a=r[t]={});var i=a[n];return i==null&&(i=this.getVisual(n),It(i)?i=i.slice():hd(i)&&(i=ct({},i)),a[n]=i),i},e.prototype.setItemVisual=function(t,n,r){var a=this._itemVisuals[t]||{};this._itemVisuals[t]=a,hd(n)?ct(a,n):a[n]=r},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(t,n){hd(t)?ct(this._layout,t):this._layout[t]=n},e.prototype.getLayout=function(t){return this._layout[t]},e.prototype.getItemLayout=function(t){return this._itemLayouts[t]},e.prototype.setItemLayout=function(t,n,r){this._itemLayouts[t]=r?ct(this._itemLayouts[t]||{},n):n},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(t,n){var r=this.hostModel&&this.hostModel.seriesIndex;sS(r,this.dataType,t,n),this._graphicEls[t]=n},e.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},e.prototype.eachItemGraphicEl=function(t,n){he(this._graphicEls,function(r,a){r&&t&&t.call(n,r,a)})},e.prototype.cloneShallow=function(t){return t||(t=new e(this._schema?this._schema:Ds(this.dimensions,this._getDimInfo,this),this.hostModel)),o1(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(t,n){var r=this[t];Jt(r)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var a=r.apply(this,arguments);return n.apply(this,[a].concat(u0(arguments)))})},e.internalField=function(){MD=function(t){var n=t._invertedIndicesMap;he(n,function(r,a){var i=t._dimInfos[a],o=i.ordinalMeta,s=t._store;if(o){r=n[a]=new ybe(o.categories.length);for(var l=0;l1&&(l+="__ec__"+c),a[n]=l}}}(),e}();function Sbe(e,t){return O2(e,t).dimensions}function O2(e,t){y2(e)||(e=SB(e)),t=t||{};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],a=un(),i=[],o=xbe(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&x8(o),l=r===e.dimensionsDefine,u=l?C8(e):S8(r),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(e,o));for(var f=un(c),d=new IB(o),h=0;h0&&(r.name=a+(i-1)),i++,t.set(a,i)}}function xbe(e,t,n,r){var a=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return he(t,function(i){var o;Wt(i)&&(o=i.dimsDef)&&(a=Math.max(a,o.length))}),a}function Tbe(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var kbe=function(){function e(t){this.coordSysDims=[],this.axisMap=un(),this.categoryAxisMap=un(),this.coordSysName=t}return e}();function Ebe(e){var t=e.get("coordinateSystem"),n=new kbe(t),r=Mbe[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var Mbe={cartesian2d:function(e,t,n,r){var a=e.getReferringComponents("xAxis",zi).models[0],i=e.getReferringComponents("yAxis",zi).models[0];t.coordSysDims=["x","y"],n.set("x",a),n.set("y",i),Cc(a)&&(r.set("x",a),t.firstCategoryDimIndex=0),Cc(i)&&(r.set("y",i),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,n,r){var a=e.getReferringComponents("singleAxis",zi).models[0];t.coordSysDims=["single"],n.set("single",a),Cc(a)&&(r.set("single",a),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var a=e.getReferringComponents("polar",zi).models[0],i=a.findAxisModel("radiusAxis"),o=a.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],n.set("radius",i),n.set("angle",o),Cc(i)&&(r.set("radius",i),t.firstCategoryDimIndex=0),Cc(o)&&(r.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(e,t,n,r){t.coordSysDims=["lng","lat"]},parallel:function(e,t,n,r){var a=e.ecModel,i=a.getComponent("parallel",e.get("parallelIndex")),o=t.coordSysDims=i.dimensions.slice();he(i.parallelAxisIndex,function(s,l){var u=a.getComponent("parallelAxis",s),c=o[l];n.set(c,u),Cc(u)&&(r.set(c,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})}};function Cc(e){return e.get("type")==="category"}function T8(e,t,n){n=n||{};var r=n.byIndex,a=n.stackedCoordDimension,i,o,s;Abe(t)?i=t:(o=t.schema,i=o.dimensions,s=t.store);var l=!!(e&&e.get("stack")),u,c,f,d;if(he(i,function(b,w){Bt(b)&&(i[w]=b={name:b}),l&&!b.isExtraCoord&&(!r&&!u&&b.ordinalMeta&&(u=b),!c&&b.type!=="ordinal"&&b.type!=="time"&&(!a||a===b.coordDim)&&(c=b))}),c&&!r&&!u&&(r=!0),c){f="__\0ecstackresult_"+e.id,d="__\0ecstackedover_"+e.id,u&&(u.createInvertedIndices=!0);var h=c.coordDim,p=c.type,v=0;he(i,function(b){b.coordDim===h&&v++});var g={name:f,coordDim:h,coordDimIndex:v,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},m={name:d,coordDim:d,coordDimIndex:v+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(d,p),m.storeDimIndex=s.ensureCalculationDimension(f,p)),o.appendCalculationDimension(g),o.appendCalculationDimension(m)):(i.push(g),i.push(m))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:r,stackedOverDimension:d,stackResultDimension:f}}function Abe(e){return!w8(e.schema)}function Hu(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}function k8(e,t){return Hu(e,t)?e.getCalculationInfo("stackResultDimension"):t}function Ibe(e,t){var n=e.get("coordinateSystem"),r=L0.get(n),a;return t&&t.coordSysDims&&(a=zt(t.coordSysDims,function(i){var o={name:i},s=t.axisMap.get(i);if(s){var l=s.get("type");o.type=pbe(l)}return o})),a||(a=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||["x","y"]),a}function Dbe(e,t,n){var r,a;return n&&he(e,function(i,o){var s=i.coordDim,l=n.categoryAxisMap.get(s);l&&(r==null&&(r=o),i.ordinalMeta=l.getOrdinalMeta(),t&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(a=!0)}),!a&&r!=null&&(e[r].otherDims.itemName=0),r}function V0(e,t,n){n=n||{};var r=t.getSourceManager(),a,i=!1;a=r.getSource(),i=a.sourceFormat===Mi;var o=Ebe(t),s=Ibe(t,o),l=n.useEncodeDefaulter,u=Jt(l)?l:l?er(Cme,s,t):null,c={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i},f=O2(a,c),d=Dbe(f.dimensions,n.createInvertedIndices,o),h=i?null:r.getSharedDataStore(f),p=T8(t,{schema:f,store:h}),v=new P2(f,t);v.setCalculationInfo(p);var g=d!=null&&Pbe(a)?function(m,b,w,_){return _===d?w:this.defaultDimValueGetter(m,b,w,_)}:null;return v.hasItemOption=!1,v.initData(i?a:h,null,g),v}function Pbe(e){if(e.sourceFormat===Mi){var t=Obe(e.data||[]);return!It(bp(t))}}function Obe(e){for(var t=0;tn[1]&&(n[1]=t[1])},e.prototype.unionExtentFromData=function(t,n){this.unionExtent(t.getApproximateExtent(n))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(t,n){var r=this._extent;isNaN(t)||(r[0]=t),isNaN(n)||(r[1]=n)},e.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},e.prototype.isBlank=function(){return this._isBlank},e.prototype.setBlank=function(t){this._isBlank=t},e}();h0($o);var Lbe=0,IS=function(){function e(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++Lbe}return e.createByAxisModel=function(t){var n=t.option,r=n.data,a=r&&zt(r,Rbe);return new e({categories:a,needCollect:!a,deduplication:n.dedplication!==!1})},e.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},e.prototype.parseAndCollect=function(t){var n,r=this._needCollect;if(!Bt(t)&&!r)return t;if(r&&!this._deduplication)return n=this.categories.length,this.categories[n]=t,n;var a=this._getOrCreateMap();return n=a.get(t),n==null&&(r?(n=this.categories.length,this.categories[n]=t,a.set(t,n)):n=NaN),n},e.prototype._getOrCreateMap=function(){return this._map||(this._map=un(this.categories))},e}();function Rbe(e){return Wt(e)&&e.value!=null?e.value:e+""}function DS(e){return e.type==="interval"||e.type==="log"}function Nbe(e,t,n,r){var a={},i=e[1]-e[0],o=a.interval=Ux(i/t,!0);n!=null&&or&&(o=a.interval=r);var s=a.intervalPrecision=E8(o),l=a.niceTickExtent=[ir(Math.ceil(e[0]/o)*o,s),ir(Math.floor(e[1]/o)*o,s)];return $be(l,e),a}function l1(e){var t=Math.pow(10,d0(e)),n=e/t;return n?n===2?n=3:n===3?n=5:n*=2:n=1,ir(n*t)}function E8(e){return bo(e)+2}function AD(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function $be(e,t){!isFinite(e[0])&&(e[0]=t[0]),!isFinite(e[1])&&(e[1]=t[1]),AD(e,0,t),AD(e,1,t),e[0]>e[1]&&(e[0]=e[1])}function z0(e,t){return e>=t[0]&&e<=t[1]}function H0(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function W0(e,t){return e*(t[1]-t[0])+t[0]}var L2=function(e){Yt(t,e);function t(n){var r=e.call(this,n)||this;r.type="ordinal";var a=r.getSetting("ordinalMeta");return a||(a=new IS({})),It(a)&&(a=new IS({categories:zt(a,function(i){return Wt(i)?i.value:i})})),r._ordinalMeta=a,r._extent=r.getSetting("extent")||[0,a.categories.length-1],r}return t.prototype.parse=function(n){return n==null?NaN:Bt(n)?this._ordinalMeta.getOrdinal(n):Math.round(n)},t.prototype.contain=function(n){return n=this.parse(n),z0(n,this._extent)&&this._ordinalMeta.categories[n]!=null},t.prototype.normalize=function(n){return n=this._getTickNumber(this.parse(n)),H0(n,this._extent)},t.prototype.scale=function(n){return n=Math.round(W0(n,this._extent)),this.getRawOrdinalNumber(n)},t.prototype.getTicks=function(){for(var n=[],r=this._extent,a=r[0];a<=r[1];)n.push({value:a}),a++;return n},t.prototype.getMinorTicks=function(n){},t.prototype.setSortInfo=function(n){if(n==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var r=n.ordinalNumbers,a=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,r.length);o=0&&n=0&&n=n},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}($o);$o.registerClass(L2);var lu=ir,Pf=function(e){Yt(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="interval",n._interval=0,n._intervalPrecision=2,n}return t.prototype.parse=function(n){return n},t.prototype.contain=function(n){return z0(n,this._extent)},t.prototype.normalize=function(n){return H0(n,this._extent)},t.prototype.scale=function(n){return W0(n,this._extent)},t.prototype.setExtent=function(n,r){var a=this._extent;isNaN(n)||(a[0]=parseFloat(n)),isNaN(r)||(a[1]=parseFloat(r))},t.prototype.unionExtent=function(n){var r=this._extent;n[0]r[1]&&(r[1]=n[1]),this.setExtent(r[0],r[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(n){this._interval=n,this._niceExtent=this._extent.slice(),this._intervalPrecision=E8(n)},t.prototype.getTicks=function(n){var r=this._interval,a=this._extent,i=this._niceExtent,o=this._intervalPrecision,s=[];if(!r)return s;var l=1e4;a[0]l)return[];var c=s.length?s[s.length-1].value:i[1];return a[1]>c&&(n?s.push({value:lu(c+r,o)}):s.push({value:a[1]})),s},t.prototype.getMinorTicks=function(n){for(var r=this.getTicks(!0),a=[],i=this.getExtent(),o=1;oi[0]&&h0&&(i=i===null?s:Math.min(i,s))}n[r]=i}}return n}function D8(e){var t=Vbe(e),n=[];return he(e,function(r){var a=r.coordinateSystem,i=a.getBaseAxis(),o=i.getExtent(),s;if(i.type==="category")s=i.getBandWidth();else if(i.type==="value"||i.type==="time"){var l=i.dim+"_"+i.index,u=t[l],c=Math.abs(o[1]-o[0]),f=i.scale.getExtent(),d=Math.abs(f[1]-f[0]);s=u?c/d*u:c}else{var h=r.getData();s=Math.abs(o[1]-o[0])/h.count()}var p=sn(r.get("barWidth"),s),v=sn(r.get("barMaxWidth"),s),g=sn(r.get("barMinWidth")||(O8(r)?.5:1),s),m=r.get("barGap"),b=r.get("barCategoryGap");n.push({bandWidth:s,barWidth:p,barMaxWidth:v,barMinWidth:g,barGap:m,barCategoryGap:b,axisKey:R2(i),stackId:A8(r)})}),zbe(n)}function zbe(e){var t={};he(e,function(r,a){var i=r.axisKey,o=r.bandWidth,s=t[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;t[i]=s;var u=r.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=r.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var f=r.barMaxWidth;f&&(l[u].maxWidth=f);var d=r.barMinWidth;d&&(l[u].minWidth=d);var h=r.barGap;h!=null&&(s.gap=h);var p=r.barCategoryGap;p!=null&&(s.categoryGap=p)});var n={};return he(t,function(r,a){n[a]={};var i=r.stacks,o=r.bandWidth,s=r.categoryGap;if(s==null){var l=Gn(i).length;s=Math.max(35-l*4,15)+"%"}var u=sn(s,o),c=sn(r.gap,1),f=r.remainedWidth,d=r.autoWidthCount,h=(f-u)/(d+(d-1)*c);h=Math.max(h,0),he(i,function(m){var b=m.maxWidth,w=m.minWidth;if(m.width){var _=m.width;b&&(_=Math.min(_,b)),w&&(_=Math.max(_,w)),m.width=_,f-=_+c*_,d--}else{var _=h;b&&b<_&&(_=Math.min(b,f)),w&&w>_&&(_=w),_!==h&&(m.width=_,f-=_+c*_,d--)}}),h=(f-u)/(d+(d-1)*c),h=Math.max(h,0);var p=0,v;he(i,function(m,b){m.width||(m.width=h),v=m,p+=m.width*(1+c)}),v&&(p-=v.width*c);var g=-p/2;he(i,function(m,b){n[a][b]=n[a][b]||{bandWidth:o,offset:g,width:m.width},g+=m.width*(1+c)})}),n}function Hbe(e,t,n){if(e&&t){var r=e[R2(t)];return r}}function Wbe(e,t){var n=I8(e,t),r=D8(n);he(n,function(a){var i=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=A8(a),u=r[R2(s)][l],c=u.offset,f=u.width;i.setLayout({bandWidth:u.bandWidth,offset:c,size:f})})}function Ube(e){return{seriesType:e,plan:w2(),reset:function(t){if(P8(t)){var n=t.getData(),r=t.coordinateSystem,a=r.getBaseAxis(),i=r.getOtherAxis(a),o=n.getDimensionIndex(n.mapDimension(i.dim)),s=n.getDimensionIndex(n.mapDimension(a.dim)),l=t.get("showBackground",!0),u=n.mapDimension(i.dim),c=n.getCalculationInfo("stackResultDimension"),f=Hu(n,u)&&!!n.getCalculationInfo("stackedOnSeries"),d=i.isHorizontal(),h=Kbe(a,i),p=O8(t),v=t.get("barMinHeight")||0,g=c&&n.getDimensionIndex(c),m=n.getLayout("size"),b=n.getLayout("offset");return{progress:function(w,_){for(var C=w.count,x=p&&es(C*3),T=p&&l&&es(C*3),M=p&&es(C),E=r.master.getRect(),A=d?E.width:E.height,L,F=_.getStore(),H=0;(L=w.next())!=null;){var U=F.get(f?g:o,L),P=F.get(s,L),N=h,z=void 0;f&&(z=+U-F.get(o,L));var $=void 0,O=void 0,W=void 0,ee=void 0;if(d){var te=r.dataToPoint([U,P]);if(f){var re=r.dataToPoint([z,P]);N=re[0]}$=N,O=te[1]+b,W=te[0]-N,ee=m,Math.abs(W)0?n:1:n))}var jbe=function(e,t,n,r){for(;n>>1;e[a][1]a&&(this._approxInterval=a);var s=Uv.length,l=Math.min(jbe(Uv,this._approxInterval,0,s),s-1);this._interval=Uv[l][1],this._minLevelUnit=Uv[Math.max(l-1,0)][0]},t.prototype.parse=function(n){return Bn(n)?n:+wi(n)},t.prototype.contain=function(n){return z0(this.parse(n),this._extent)},t.prototype.normalize=function(n){return H0(this.parse(n),this._extent)},t.prototype.scale=function(n){return W0(n,this._extent)},t.type="time",t}(Pf),Uv=[["second",l2],["minute",u2],["hour",ah],["quarter-day",ah*6],["half-day",ah*12],["day",di*1.2],["half-week",di*3.5],["week",di*7],["month",di*31],["quarter",di*95],["half-year",wI/2],["year",wI]];function Ybe(e,t,n,r){var a=wi(t),i=wi(n),o=function(p){return CI(a,p,r)===CI(i,p,r)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},c=function(){return u()&&o("hour")},f=function(){return c()&&o("minute")},d=function(){return f()&&o("second")},h=function(){return d()&&o("millisecond")};switch(e){case"year":return s();case"month":return l();case"day":return u();case"hour":return c();case"minute":return f();case"second":return d();case"millisecond":return h()}}function Gbe(e,t){return e/=di,e>16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function qbe(e){var t=30*di;return e/=t,e>6?6:e>3?3:e>2?2:1}function Xbe(e){return e/=ah,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function ID(e,t){return e/=t?u2:l2,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function Zbe(e){return Ux(e,!0)}function Jbe(e,t,n){var r=new Date(e);switch(zc(t)){case"year":case"month":r[oB(n)](0);case"day":r[sB(n)](1);case"hour":r[lB(n)](0);case"minute":r[uB(n)](0);case"second":r[cB(n)](0),r[fB(n)](0)}return r.getTime()}function Qbe(e,t,n,r){var a=1e4,i=aB,o=0;function s(A,L,F,H,U,P,N){for(var z=new Date(L),$=L,O=z[H]();$1&&P===0&&F.unshift({value:F[0].value-$})}}for(var P=0;P=r[0]&&b<=r[1]&&f++)}var w=(r[1]-r[0])/t;if(f>w*1.5&&d>w/1.5||(u.push(g),f>w||e===i[h]))break}c=[]}}}for(var _=mr(zt(u,function(A){return mr(A,function(L){return L.value>=r[0]&&L.value<=r[1]&&!L.notAdd})}),function(A){return A.length>0}),C=[],x=_.length-1,h=0;h<_.length;++h)for(var T=_[h],M=0;M0;)i*=10;var s=[ir(n_e(r[0]/i)*i),ir(t_e(r[1]/i)*i)];this._interval=i,this._niceExtent=s}},t.prototype.calcNiceExtent=function(n){lh.calcNiceExtent.call(this,n),this._fixMin=n.fixMin,this._fixMax=n.fixMax},t.prototype.parse=function(n){return n},t.prototype.contain=function(n){return n=Di(n)/Di(this.base),z0(n,this._extent)},t.prototype.normalize=function(n){return n=Di(n)/Di(this.base),H0(n,this._extent)},t.prototype.scale=function(n){return n=W0(n,this._extent),Kv(this.base,n)},t.type="log",t}($o),R8=N2.prototype;R8.getMinorTicks=lh.getMinorTicks;R8.getLabel=lh.getLabel;function jv(e,t){return e_e(e,bo(t))}$o.registerClass(N2);var r_e=function(){function e(t,n,r){this._prepareParams(t,n,r)}return e.prototype._prepareParams=function(t,n,r){r[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var d=this._determinedMin,h=this._determinedMax;return d!=null&&(s=d,u=!0),h!=null&&(l=h,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:f}},e.prototype.modifyDataMinMax=function(t,n){this[i_e[t]]=n},e.prototype.setDeterminedMinMax=function(t,n){var r=a_e[t];this[r]=n},e.prototype.freeze=function(){this.frozen=!0},e}(),a_e={min:"_determinedMin",max:"_determinedMax"},i_e={min:"_dataMin",max:"_dataMax"};function o_e(e,t,n){var r=e.rawExtentInfo;return r||(r=new r_e(e,t,n),e.rawExtentInfo=r,r)}function Yv(e,t){return t==null?null:Ph(t)?NaN:e.parse(t)}function N8(e,t){var n=e.type,r=o_e(e,t,e.getExtent()).calculate();e.setBlank(r.isBlank);var a=r.min,i=r.max,o=t.ecModel;if(o&&n==="time"){var s=I8("bar",o),l=!1;if(he(s,function(f){l=l||f.getBaseAxis()===t.axis}),l){var u=D8(s),c=s_e(a,i,t,u);a=c.min,i=c.max}}return{extent:[a,i],fixMin:r.minFixed,fixMax:r.maxFixed}}function s_e(e,t,n,r){var a=n.axis.getExtent(),i=Math.abs(a[1]-a[0]),o=Hbe(r,n.axis);if(o===void 0)return{min:e,max:t};var s=1/0;he(o,function(h){s=Math.min(h.offset,s)});var l=-1/0;he(o,function(h){l=Math.max(h.offset+h.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=t-e,f=1-(s+l)/i,d=c/f-c;return t+=d*(l/u),e-=d*(s/u),{min:e,max:t}}function PS(e,t){var n=t,r=N8(e,n),a=r.extent,i=n.get("splitNumber");e instanceof N2&&(e.base=n.get("logBase"));var o=e.type,s=n.get("interval"),l=o==="interval"||o==="time";e.setExtent(a[0],a[1]),e.calcNiceExtent({splitNumber:i,fixMin:r.fixMin,fixMax:r.fixMax,minInterval:l?n.get("minInterval"):null,maxInterval:l?n.get("maxInterval"):null}),s!=null&&e.setInterval&&e.setInterval(s)}function $8(e,t){if(t=t||e.get("type"),t)switch(t){case"category":return new L2({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new L8({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new($o.getClass(t)||Pf)}}function l_e(e){var t=e.scale.getExtent(),n=t[0],r=t[1];return!(n>0&&r>0||n<0&&r<0)}function Of(e){var t=e.getLabelModel().get("formatter"),n=e.type==="category"?e.scale.getExtent()[0]:null;return e.scale.type==="time"?function(r){return function(a,i){return e.scale.getFormattedLabel(a,i,r)}}(t):Bt(t)?function(r){return function(a){var i=e.scale.getLabel(a),o=r.replace("{value}",i??"");return o}}(t):Jt(t)?function(r){return function(a,i){return n!=null&&(i=a.value-n),r($2(e,a),i,a.level!=null?{level:a.level}:null)}}(t):function(r){return e.scale.getLabel(r)}}function $2(e,t){return e.type==="category"?e.scale.getLabel(t):t.value}function u_e(e){var t=e.model,n=e.scale;if(!(!t.get(["axisLabel","show"])||n.isBlank())){var r,a,i=n.getExtent();n instanceof L2?a=n.count():(r=n.getTicks(),a=r.length);var o=e.getLabelModel(),s=Of(e),l,u=1;a>40&&(u=Math.ceil(a/40));for(var c=0;c=0||(PD.push(e),Jt(e)&&(e={install:e}),e.install(y_e))}var b_e=1e-8;function OD(e,t){return Math.abs(e-t)a&&(r=o,a=l)}if(r)return w_e(r.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},t.prototype.getBoundingRect=function(n){var r=this._rect;if(r&&!n)return r;var a=[1/0,1/0],i=[-1/0,-1/0],o=this.geometries;return he(o,function(s){s.type==="polygon"?RD(s.exterior,a,i,n):he(s.points,function(l){RD(l,a,i,n)})}),isFinite(a[0])&&isFinite(a[1])&&isFinite(i[0])&&isFinite(i[1])||(a[0]=a[1]=i[0]=i[1]=0),r=new Sn(a[0],a[1],i[0]-a[0],i[1]-a[1]),n||(this._rect=r),r},t.prototype.contain=function(n){var r=this.getBoundingRect(),a=this.geometries;if(!r.contain(n[0],n[1]))return!1;e:for(var i=0,o=a.length;i>1^-(s&1),l=l>>1^-(l&1),s+=a,l+=i,a=s,i=l,r.push([s/n,l/n])}return r}function BD(e,t){return e=C_e(e),zt(mr(e.features,function(n){return n.geometry&&n.properties&&n.geometry.coordinates.length>0}),function(n){var r=n.properties,a=n.geometry,i=[];switch(a.type){case"Polygon":var o=a.coordinates;i.push(new ND(o[0],o.slice(1)));break;case"MultiPolygon":he(a.coordinates,function(l){l[0]&&i.push(new ND(l[0],l.slice(1)))});break;case"LineString":i.push(new $D([a.coordinates]));break;case"MultiLineString":i.push(new $D(a.coordinates))}var s=new S_e(r[t||"name"],i,r.cp);return s.properties=r,s})}const x_e=Object.freeze(Object.defineProperty({__proto__:null,MAX_SAFE_INTEGER:Ipe,asc:Epe,getPercentWithPrecision:Mpe,getPixelPrecision:n4,getPrecision:bo,getPrecisionSafe:t4,isNumeric:i4,isRadianAroundZero:Nh,linearMap:$i,nice:Ux,numericToNumber:$h,parseDate:wi,quantile:Ppe,quantity:a4,quantityExponent:d0,reformIntervals:Ope,remRadian:Wx,round:ir},Symbol.toStringTag,{value:"Module"})),T_e=Object.freeze(Object.defineProperty({__proto__:null,format:Ep,parse:wi},Symbol.toStringTag,{value:"Module"})),k_e=Object.freeze(Object.defineProperty({__proto__:null,Arc:Cp,BezierCurve:S0,BoundingRect:Sn,Circle:Sp,CompoundPath:B4,Ellipse:b0,Group:br,Image:Ro,IncrementalDisplayable:z4,Line:Zi,LinearGradient:Qx,Polygon:w0,Polyline:If,RadialGradient:V4,Rect:yr,Ring:_0,Sector:Xi,Text:dr,clipPointsByRect:q4,clipRectByRect:X4,createIcon:x0,extendPath:W4,extendShape:H4,getShapeClass:U4,getTransform:Y4,initProps:Zr,makeImage:n2,makePath:C0,mergePath:j4,registerShape:Ei,resizePath:r2,updateProps:Cr},Symbol.toStringTag,{value:"Module"})),E_e=Object.freeze(Object.defineProperty({__proto__:null,addCommas:f2,capitalFirst:gme,encodeHTML:la,formatTime:vme,formatTpl:h2,getTextRect:pme,getTooltipMarker:dB,normalizeCssArray:Mp,toCamelCase:d2,truncateText:ove},Symbol.toStringTag,{value:"Module"})),M_e=Object.freeze(Object.defineProperty({__proto__:null,bind:Vn,clone:yn,curry:er,defaults:Mn,each:he,extend:ct,filter:mr,indexOf:On,inherits:Dx,isArray:It,isFunction:Jt,isObject:Wt,isString:Bt,map:zt,merge:wn,reduce:Do},Symbol.toStringTag,{value:"Module"}));var Yh=pr();function H8(e,t){var n=zt(t,function(r){return e.scale.parse(r)});return e.type==="time"&&n.length>0&&(n.sort(),n.unshift(n[0]),n.push(n[n.length-1])),n}function A_e(e){var t=e.getLabelModel().get("customValues");if(t){var n=Of(e),r=e.scale.getExtent(),a=H8(e,t),i=mr(a,function(o){return o>=r[0]&&o<=r[1]});return{labels:zt(i,function(o){var s={value:o};return{formattedLabel:n(s),rawLabel:e.scale.getLabel(s),tickValue:o}})}}return e.type==="category"?D_e(e):O_e(e)}function I_e(e,t){var n=e.getTickModel().get("customValues");if(n){var r=e.scale.getExtent(),a=H8(e,n);return{ticks:mr(a,function(i){return i>=r[0]&&i<=r[1]})}}return e.type==="category"?P_e(e,t):{ticks:zt(e.scale.getTicks(),function(i){return i.value})}}function D_e(e){var t=e.getLabelModel(),n=W8(e,t);return!t.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}function W8(e,t){var n=U8(e,"labels"),r=B2(t),a=K8(n,r);if(a)return a;var i,o;return Jt(r)?i=G8(e,r):(o=r==="auto"?L_e(e):r,i=Y8(e,o)),j8(n,r,{labels:i,labelCategoryInterval:o})}function P_e(e,t){var n=U8(e,"ticks"),r=B2(t),a=K8(n,r);if(a)return a;var i,o;if((!t.get("show")||e.scale.isBlank())&&(i=[]),Jt(r))i=G8(e,r,!0);else if(r==="auto"){var s=W8(e,e.getLabelModel());o=s.labelCategoryInterval,i=zt(s.labels,function(l){return l.tickValue})}else o=r,i=Y8(e,o,!0);return j8(n,r,{ticks:i,tickCategoryInterval:o})}function O_e(e){var t=e.scale.getTicks(),n=Of(e);return{labels:zt(t,function(r,a){return{level:r.level,formattedLabel:n(r,a),rawLabel:e.scale.getLabel(r),tickValue:r.value}})}}function U8(e,t){return Yh(e)[t]||(Yh(e)[t]=[])}function K8(e,t){for(var n=0;n40&&(s=Math.max(1,Math.floor(o/40)));for(var l=i[0],u=e.dataToCoord(l+1)-e.dataToCoord(l),c=Math.abs(u*Math.cos(r)),f=Math.abs(u*Math.sin(r)),d=0,h=0;l<=i[1];l+=s){var p=0,v=0,g=zx(n({value:l}),t.font,"center","top");p=g.width*1.3,v=g.height*1.3,d=Math.max(d,p,7),h=Math.max(h,v,7)}var m=d/c,b=h/f;isNaN(m)&&(m=1/0),isNaN(b)&&(b=1/0);var w=Math.max(0,Math.floor(Math.min(m,b))),_=Yh(e.model),C=e.getExtent(),x=_.lastAutoInterval,T=_.lastTickCount;return x!=null&&T!=null&&Math.abs(x-w)<=1&&Math.abs(T-o)<=1&&x>w&&_.axisExtent0===C[0]&&_.axisExtent1===C[1]?w=x:(_.lastTickCount=o,_.lastAutoInterval=w,_.axisExtent0=C[0],_.axisExtent1=C[1]),w}function N_e(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function Y8(e,t,n){var r=Of(e),a=e.scale,i=a.getExtent(),o=e.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=i[0],c=a.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=B8(e),d=o.get("showMinLabel")||f,h=o.get("showMaxLabel")||f;d&&u!==i[0]&&v(i[0]);for(var p=u;p<=i[1];p+=l)v(p);h&&p-l!==i[1]&&v(i[1]);function v(g){var m={value:g};s.push(n?g:{formattedLabel:r(m),rawLabel:a.getLabel(m),tickValue:g})}return s}function G8(e,t,n){var r=e.scale,a=Of(e),i=[];return he(r.getTicks(),function(o){var s=r.getLabel(o),l=o.value;t(o.value,s)&&i.push(n?l:{formattedLabel:a(o),rawLabel:s,tickValue:l})}),i}var FD=[0,1],q8=function(){function e(t,n,r){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=n,this._extent=r||[0,0]}return e.prototype.contain=function(t){var n=this._extent,r=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]);return t>=r&&t<=a},e.prototype.containData=function(t){return this.scale.contain(t)},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.getPixelPrecision=function(t){return n4(t||this.scale.getExtent(),this._extent)},e.prototype.setExtent=function(t,n){var r=this._extent;r[0]=t,r[1]=n},e.prototype.dataToCoord=function(t,n){var r=this._extent,a=this.scale;return t=a.normalize(t),this.onBand&&a.type==="ordinal"&&(r=r.slice(),VD(r,a.count())),$i(t,FD,r,n)},e.prototype.coordToData=function(t,n){var r=this._extent,a=this.scale;this.onBand&&a.type==="ordinal"&&(r=r.slice(),VD(r,a.count()));var i=$i(t,r,FD,n);return this.scale.scale(i)},e.prototype.pointToData=function(t,n){},e.prototype.getTicksCoords=function(t){t=t||{};var n=t.tickModel||this.getTickModel(),r=I_e(this,n),a=r.ticks,i=zt(a,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=n.get("alignWithLabel");return $_e(this,i,o,t.clamp),i},e.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),n=t.get("splitNumber");n>0&&n<100||(n=5);var r=this.scale.getMinorTicks(n),a=zt(r,function(i){return zt(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return a},e.prototype.getViewLabels=function(){return A_e(this).labels},e.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},e.prototype.getTickModel=function(){return this.model.getModel("axisTick")},e.prototype.getBandWidth=function(){var t=this._extent,n=this.scale.getExtent(),r=n[1]-n[0]+(this.onBand?1:0);r===0&&(r=1);var a=Math.abs(t[1]-t[0]);return Math.abs(a)/r},e.prototype.calculateCategoryInterval=function(){return R_e(this)},e}();function VD(e,t){var n=e[1]-e[0],r=t,a=n/r/2;e[0]+=a,e[1]-=a}function $_e(e,t,n,r){var a=t.length;if(!e.onBand||n||!a)return;var i=e.getExtent(),o,s;if(a===1)t[0].coord=i[0],o=t[1]={coord:i[1],tickValue:t[0].tickValue};else{var l=t[a-1].tickValue-t[0].tickValue,u=(t[a-1].coord-t[0].coord)/l;he(t,function(h){h.coord-=u/2});var c=e.scale.getExtent();s=1+c[1]-t[a-1].tickValue,o={coord:t[a-1].coord+u*s,tickValue:c[1]+1},t.push(o)}var f=i[0]>i[1];d(t[0].coord,i[0])&&(r?t[0].coord=i[0]:t.shift()),r&&d(i[0],t[0].coord)&&t.unshift({coord:i[0]}),d(i[1],o.coord)&&(r?o.coord=i[1]:t.pop()),r&&d(o.coord,i[1])&&t.push({coord:i[1]});function d(h,p){return h=ir(h),p=ir(p),f?h>p:h0){t=t/180*Math.PI,Js.fromArray(e[0]),rr.fromArray(e[1]),Or.fromArray(e[2]),Qt.sub(Qs,Js,rr),Qt.sub(go,Or,rr);var n=Qs.len(),r=go.len();if(!(n<.001||r<.001)){Qs.scale(1/n),go.scale(1/r);var a=Qs.dot(go),i=Math.cos(t);if(i1&&Qt.copy(ia,Or),ia.toArray(e[1])}}}}function W_e(e,t,n){if(n<=180&&n>0){n=n/180*Math.PI,Js.fromArray(e[0]),rr.fromArray(e[1]),Or.fromArray(e[2]),Qt.sub(Qs,rr,Js),Qt.sub(go,Or,rr);var r=Qs.len(),a=go.len();if(!(r<.001||a<.001)){Qs.scale(1/r),go.scale(1/a);var i=Qs.dot(t),o=Math.cos(n);if(i=l)Qt.copy(ia,Or);else{ia.scaleAndAdd(go,s/Math.tan(Math.PI/2-c));var f=Or.x!==rr.x?(ia.x-rr.x)/(Or.x-rr.x):(ia.y-rr.y)/(Or.y-rr.y);if(isNaN(f))return;f<0?Qt.copy(ia,rr):f>1&&Qt.copy(ia,Or)}ia.toArray(e[1])}}}}function f1(e,t,n,r){var a=n==="normal",i=a?e:e.ensureState(n);i.ignore=t;var o=r.get("smooth");o&&o===!0&&(o=.3),i.shape=i.shape||{},o>0&&(i.shape.smooth=o);var s=r.getModel("lineStyle").getLineStyle();a?e.useStyle(s):i.style=s}function U_e(e,t){var n=t.smooth,r=t.points;if(r)if(e.moveTo(r[0][0],r[0][1]),n>0&&r.length>=3){var a=Lm(r[0],r[1]),i=Lm(r[1],r[2]);if(!a||!i){e.lineTo(r[1][0],r[1][1]),e.lineTo(r[2][0],r[2][1]);return}var o=Math.min(a,i)*n,s=Dg([],r[1],r[0],o/a),l=Dg([],r[1],r[2],o/i),u=Dg([],s,l,.5);e.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),e.bezierCurveTo(l[0],l[1],l[0],l[1],r[2][0],r[2][1])}else for(var c=1;c0){w(E*M,0,o);var A=E+x;A<0&&_(-A*M,1)}else _(-x*M,1)}}function w(x,T,M){x!==0&&(u=!0);for(var E=T;E0)for(var A=0;A0;A--){var U=M[A-1]*H;w(-U,A,o)}}}function C(x){var T=x<0?-1:1;x=Math.abs(x);for(var M=Math.ceil(x/(o-1)),E=0;E0?w(M,0,E+1):w(-M,o-E-1,o),x-=M,x<=0)return}return u}function q_e(e,t,n,r){return G_e(e,"y","height",t,n)}function X_e(e){var t=[];e.sort(function(v,g){return g.priority-v.priority});var n=new Sn(0,0,0,0);function r(v){if(!v.ignore){var g=v.ensureState("emphasis");g.ignore==null&&(g.ignore=!1)}v.ignore=!0}for(var a=0;a-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),r},t.type="series.line",t.dependencies=["grid","polar"],t.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(ma);function F2(e,t){var n=e.mapDimensionsAll("defaultedLabel"),r=n.length;if(r===1){var a=pf(e,t,n[0]);return a!=null?a+"":null}else if(r){for(var i=[],o=0;o=0&&r.push(t[i])}return r.join(" ")}var V2=function(e){Yt(t,e);function t(n,r,a,i){var o=e.call(this)||this;return o.updateData(n,r,a,i),o}return t.prototype._createSymbol=function(n,r,a,i,o){this.removeAll();var s=fs(n,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),s.drift=J_e,this._symbolType=n,this.add(s)},t.prototype.stopSymbolAnimation=function(n){this.childAt(0).stopAnimation(null,n)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Um(this.childAt(0))},t.prototype.downplay=function(){Km(this.childAt(0))},t.prototype.setZ=function(n,r){var a=this.childAt(0);a.zlevel=n,a.z=r},t.prototype.setDraggable=function(n,r){var a=this.childAt(0);a.draggable=n,a.cursor=!r&&n?"move":a.cursor},t.prototype.updateData=function(n,r,a,i){this.silent=!1;var o=n.getItemVisual(r,"symbol")||"circle",s=n.hostModel,l=t.getSymbolSize(n,r),u=o!==this._symbolType,c=i&&i.disableAnimation;if(u){var f=n.getItemVisual(r,"symbolKeepAspect");this._createSymbol(o,n,r,l,f)}else{var d=this.childAt(0);d.silent=!1;var h={scaleX:l[0]/2,scaleY:l[1]/2};c?d.attr(h):Cr(d,h,s,r),t2(d)}if(this._updateCommon(n,r,l,a,i),u){var d=this.childAt(0);if(!c){var h={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:d.style.opacity}};d.scaleX=d.scaleY=0,d.style.opacity=0,Zr(d,h,s,r)}}c&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(n,r,a,i,o){var s=this.childAt(0),l=n.hostModel,u,c,f,d,h,p,v,g,m;if(i&&(u=i.emphasisItemStyle,c=i.blurItemStyle,f=i.selectItemStyle,d=i.focus,h=i.blurScope,v=i.labelStatesModels,g=i.hoverScale,m=i.cursorStyle,p=i.emphasisDisabled),!i||n.hasItemOption){var b=i&&i.itemModel?i.itemModel:n.getItemModel(r),w=b.getModel("emphasis");u=w.getModel("itemStyle").getItemStyle(),f=b.getModel(["select","itemStyle"]).getItemStyle(),c=b.getModel(["blur","itemStyle"]).getItemStyle(),d=w.get("focus"),h=w.get("blurScope"),p=w.get("disabled"),v=Tp(b),g=w.getShallow("scale"),m=b.getShallow("cursor")}var _=n.getItemVisual(r,"symbolRotate");s.attr("rotation",(_||0)*Math.PI/180||0);var C=YB(n.getItemVisual(r,"symbolOffset"),a);C&&(s.x=C[0],s.y=C[1]),m&&s.attr("cursor",m);var x=n.getItemVisual(r,"style"),T=x.fill;if(s instanceof Ro){var M=s.style;s.useStyle(ct({image:M.image,x:M.x,y:M.y,width:M.width,height:M.height},x))}else s.__isEmptyBrush?s.useStyle(ct({},x)):s.useStyle(x),s.style.decal=null,s.setColor(T,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var E=n.getItemVisual(r,"liftZ"),A=this._z2;E!=null?A==null&&(this._z2=s.z2,s.z2+=E):A!=null&&(s.z2=A,this._z2=null);var L=o&&o.useNameLabel;xp(s,v,{labelFetcher:l,labelDataIndex:r,defaultText:F,inheritColor:T,defaultOpacity:x.opacity});function F(P){return L?n.getName(P):F2(n,P)}this._sizeX=a[0]/2,this._sizeY=a[1]/2;var H=s.ensureState("emphasis");H.style=u,s.ensureState("select").style=f,s.ensureState("blur").style=c;var U=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;H.scaleX=this._sizeX*U,H.scaleY=this._sizeY*U,this.setSymbolScale(1),Vu(this,d,h,p)},t.prototype.setSymbolScale=function(n){this.scaleX=this.scaleY=n},t.prototype.fadeOut=function(n,r,a){var i=this.childAt(0),o=En(this).dataIndex,s=a&&a.animation;if(this.silent=i.silent=!0,a&&a.fadeLabel){var l=i.getTextContent();l&&Gm(l,{style:{opacity:0}},r,{dataIndex:o,removeOpt:s,cb:function(){i.removeTextContent()}})}else i.removeTextContent();Gm(i,{style:{opacity:0},scaleX:0,scaleY:0},r,{dataIndex:o,cb:n,removeOpt:s})},t.getSymbolSize=function(n,r){return _0e(n.getItemVisual(r,"symbolSize"))},t}(br);function J_e(e,t){this.parent.drift(e,t)}function d1(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r.isIgnore&&r.isIgnore(n))&&!(r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&e.getItemVisual(n,"symbol")!=="none"}function zD(e){return e!=null&&!Wt(e)&&(e={isIgnore:e}),e||{}}function HD(e){var t=e.hostModel,n=t.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:Tp(t),cursorStyle:t.get("cursor")}}var Q_e=function(){function e(t){this.group=new br,this._SymbolCtor=t||V2}return e.prototype.updateData=function(t,n){this._progressiveEls=null,n=zD(n);var r=this.group,a=t.hostModel,i=this._data,o=this._SymbolCtor,s=n.disableAnimation,l=HD(t),u={disableAnimation:s},c=n.getSymbolPoint||function(f){return t.getItemLayout(f)};i||r.removeAll(),t.diff(i).add(function(f){var d=c(f);if(d1(t,d,f,n)){var h=new o(t,f,l,u);h.setPosition(d),t.setItemGraphicEl(f,h),r.add(h)}}).update(function(f,d){var h=i.getItemGraphicEl(d),p=c(f);if(!d1(t,p,f,n)){r.remove(h);return}var v=t.getItemVisual(f,"symbol")||"circle",g=h&&h.getSymbolType&&h.getSymbolType();if(!h||g&&g!==v)r.remove(h),h=new o(t,f,l,u),h.setPosition(p);else{h.updateData(t,f,l,u);var m={x:p[0],y:p[1]};s?h.attr(m):Cr(h,m,a)}r.add(h),t.setItemGraphicEl(f,h)}).remove(function(f){var d=i.getItemGraphicEl(f);d&&d.fadeOut(function(){r.remove(d)},a)}).execute(),this._getSymbolPoint=c,this._data=t},e.prototype.updateLayout=function(){var t=this,n=this._data;n&&n.eachItemGraphicEl(function(r,a){var i=t._getSymbolPoint(a);r.setPosition(i),r.markRedraw()})},e.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=HD(t),this._data=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(t,n,r){this._progressiveEls=[],r=zD(r);function a(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var i=t.start;i0?n=r[0]:r[1]<0&&(n=r[1]),n}function Q8(e,t,n,r){var a=NaN;e.stacked&&(a=n.get(n.getCalculationInfo("stackedOverDimension"),r)),isNaN(a)&&(a=e.valueStart);var i=e.baseDataOffset,o=[];return o[i]=n.get(e.baseDim,r),o[1-i]=a,t.dataToPoint(o)}function t1e(e,t){var n=[];return t.diff(e).add(function(r){n.push({cmd:"+",idx:r})}).update(function(r,a){n.push({cmd:"=",idx:a,idx1:r})}).remove(function(r){n.push({cmd:"-",idx:r})}).execute(),n}function n1e(e,t,n,r,a,i,o,s){for(var l=t1e(e,t),u=[],c=[],f=[],d=[],h=[],p=[],v=[],g=J8(a,t,o),m=e.getLayout("points")||[],b=t.getLayout("points")||[],w=0;w=a||v<0)break;if(Pu(m,b)){if(l){v+=i;continue}break}if(v===n)e[i>0?"moveTo":"lineTo"](m,b),f=m,d=b;else{var w=m-u,_=b-c;if(w*w+_*_<.5){v+=i;continue}if(o>0){for(var C=v+i,x=t[C*2],T=t[C*2+1];x===m&&T===b&&g=r||Pu(x,T))h=m,p=b;else{A=x-u,L=T-c;var U=m-u,P=x-m,N=b-c,z=T-b,$=void 0,O=void 0;if(s==="x"){$=Math.abs(U),O=Math.abs(P);var W=A>0?1:-1;h=m-W*$*o,p=b,F=m+W*O*o,H=b}else if(s==="y"){$=Math.abs(N),O=Math.abs(z);var ee=L>0?1:-1;h=m,p=b-ee*$*o,F=m,H=b+ee*O*o}else $=Math.sqrt(U*U+N*N),O=Math.sqrt(P*P+z*z),E=O/(O+$),h=m-A*o*(1-E),p=b-L*o*(1-E),F=m+A*o*E,H=b+L*o*E,F=Ps(F,Os(x,m)),H=Ps(H,Os(T,b)),F=Os(F,Ps(x,m)),H=Os(H,Ps(T,b)),A=F-m,L=H-b,h=m-A*$/O,p=b-L*$/O,h=Ps(h,Os(u,m)),p=Ps(p,Os(c,b)),h=Os(h,Ps(u,m)),p=Os(p,Ps(c,b)),A=m-h,L=b-p,F=m+A*O/$,H=b+L*O/$}e.bezierCurveTo(f,d,h,p,m,b),f=F,d=H}else e.lineTo(m,b)}u=m,c=b,v+=i}return g}var eF=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),r1e=function(e){Yt(t,e);function t(n){var r=e.call(this,n)||this;return r.type="ec-polyline",r}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new eF},t.prototype.buildPath=function(n,r){var a=r.points,i=0,o=a.length/2;if(r.connectNulls){for(;o>0&&Pu(a[o*2-2],a[o*2-1]);o--);for(;i=0){var _=u?(p-l)*w+l:(h-s)*w+s;return u?[n,_]:[_,n]}s=h,l=p;break;case o.C:h=i[f++],p=i[f++],v=i[f++],g=i[f++],m=i[f++],b=i[f++];var C=u?$m(s,h,v,m,n,c):$m(l,p,g,b,n,c);if(C>0)for(var x=0;x=0){var _=u?Lr(l,p,g,b,T):Lr(s,h,v,m,T);return u?[n,_]:[_,n]}}s=m,l=b;break}}},t}(Rn),a1e=function(e){Yt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(eF),i1e=function(e){Yt(t,e);function t(n){var r=e.call(this,n)||this;return r.type="ec-polygon",r}return t.prototype.getDefaultShape=function(){return new a1e},t.prototype.buildPath=function(n,r){var a=r.points,i=r.stackedOnPoints,o=0,s=a.length/2,l=r.smoothMonotone;if(r.connectNulls){for(;s>0&&Pu(a[s*2-2],a[s*2-1]);s--);for(;ot){i?n.push(o(i,l,t)):a&&n.push(o(a,l,0),o(a,l,t));break}else a&&(n.push(o(a,l,0)),a=null),n.push(l),i=l}return n}function u1e(e,t,n){var r=e.getVisual("visualMeta");if(!(!r||!r.length||!e.count())&&t.type==="cartesian2d"){for(var a,i,o=r.length-1;o>=0;o--){var s=e.getDimensionInfo(r[o].dimension);if(a=s&&s.coordDim,a==="x"||a==="y"){i=r[o];break}}if(i){var l=t.getAxis(a),u=zt(i.stops,function(w){return{coord:l.toGlobalCoord(l.dataToCoord(w.value)),color:w.color}}),c=u.length,f=i.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),f.reverse());var d=l1e(u,a==="x"?n.getWidth():n.getHeight()),h=d.length;if(!h&&c)return u[0].coord<0?f[1]?f[1]:u[c-1].color:f[0]?f[0]:u[0].color;var p=10,v=d[0].coord-p,g=d[h-1].coord+p,m=g-v;if(m<.001)return"transparent";he(d,function(w){w.offset=(w.coord-v)/m}),d.push({offset:h?d[h-1].offset:.5,color:f[1]||"transparent"}),d.unshift({offset:h?d[0].offset:.5,color:f[0]||"transparent"});var b=new Qx(0,0,0,0,d,!0);return b[a]=v,b[a+"2"]=g,b}}}function c1e(e,t,n){var r=e.get("showAllSymbol"),a=r==="auto";if(!(r&&!a)){var i=n.getAxesByScale("ordinal")[0];if(i&&!(a&&f1e(i,t))){var o=t.mapDimension(i.dim),s={};return he(i.getViewLabels(),function(l){var u=i.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function f1e(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var a=t.count(),i=Math.max(1,Math.round(a/5)),o=0;or)return!1;return!0}function d1e(e,t){return isNaN(e)||isNaN(t)}function h1e(e){for(var t=e.length/2;t>0&&d1e(e[t*2-2],e[t*2-1]);t--);return t-1}function YD(e,t){return[e[t*2],e[t*2+1]]}function p1e(e,t,n){for(var r=e.length/2,a=n==="x"?0:1,i,o,s=0,l=-1,u=0;u=t||i>=t&&o<=t){l=u;break}s=u,i=o}return{range:[s,l],t:(t-i)/(o-i)}}function rF(e){if(e.get(["endLabel","show"]))return!0;for(var t=0;t0&&n.get(["emphasis","lineStyle","width"])==="bolder"){var O=p.getState("emphasis").style;O.lineWidth=+p.style.lineWidth+1}En(p).seriesIndex=n.seriesIndex,Vu(p,N,z,$);var W=jD(n.get("smooth")),ee=n.get("smoothMonotone");if(p.setShape({smooth:W,smoothMonotone:ee,connectNulls:T}),v){var te=s.getCalculationInfo("stackedOnSeries"),re=0;v.useStyle(Mn(u.getAreaStyle(),{fill:F,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),te&&(re=jD(te.get("smooth"))),v.setShape({smooth:W,stackedOnSmooth:re,smoothMonotone:ee,connectNulls:T}),ff(v,n,"areaStyle"),En(v).seriesIndex=n.seriesIndex,Vu(v,N,z,$)}var ce=this._changePolyState;s.eachItemGraphicEl(function(ie){ie&&(ie.onHoverStateChange=ce)}),this._polyline.onHoverStateChange=ce,this._data=s,this._coordSys=i,this._stackedOnPoints=C,this._points=c,this._step=A,this._valueOrigin=w,n.get("triggerLineEvent")&&(this.packEventData(n,p),v&&this.packEventData(n,v))},t.prototype.packEventData=function(n,r){En(r).eventData={componentType:"series",componentSubType:"line",componentIndex:n.componentIndex,seriesIndex:n.seriesIndex,seriesName:n.name,seriesType:"line"}},t.prototype.highlight=function(n,r,a,i){var o=n.getData(),s=Bu(o,i);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var c=l[s*2],f=l[s*2+1];if(isNaN(c)||isNaN(f)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,f))return;var d=n.get("zlevel")||0,h=n.get("z")||0;u=new V2(o,s),u.x=c,u.y=f,u.setZ(d,h);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=d,p.z=h,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Jr.prototype.highlight.call(this,n,r,a,i)},t.prototype.downplay=function(n,r,a,i){var o=n.getData(),s=Bu(o,i);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else Jr.prototype.downplay.call(this,n,r,a,i)},t.prototype._changePolyState=function(n){var r=this._polygon;tI(this._polyline,n),r&&tI(r,n)},t.prototype._newPolyline=function(n){var r=this._polyline;return r&&this._lineGroup.remove(r),r=new r1e({shape:{points:n},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(r),this._polyline=r,r},t.prototype._newPolygon=function(n,r){var a=this._polygon;return a&&this._lineGroup.remove(a),a=new i1e({shape:{points:n,stackedOnPoints:r},segmentIgnoreThreshold:2}),this._lineGroup.add(a),this._polygon=a,a},t.prototype._initSymbolLabelAnimation=function(n,r,a){var i,o,s=r.getBaseAxis(),l=s.inverse;r.type==="cartesian2d"?(i=s.isHorizontal(),o=!1):r.type==="polar"&&(i=s.dim==="angle",o=!0);var u=n.hostModel,c=u.get("animationDuration");Jt(c)&&(c=c(null));var f=u.get("animationDelay")||0,d=Jt(f)?f(null):f;n.eachItemGraphicEl(function(h,p){var v=h;if(v){var g=[h.x,h.y],m=void 0,b=void 0,w=void 0;if(a)if(o){var _=a,C=r.pointToCoord(g);i?(m=_.startAngle,b=_.endAngle,w=-C[1]/180*Math.PI):(m=_.r0,b=_.r,w=C[0])}else{var x=a;i?(m=x.x,b=x.x+x.width,w=h.x):(m=x.y+x.height,b=x.y,w=h.y)}var T=b===m?0:(w-m)/(b-m);l&&(T=1-T);var M=Jt(f)?f(p):c*T+d,E=v.getSymbolPath(),A=E.getTextContent();v.attr({scaleX:0,scaleY:0}),v.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:M}),A&&A.animateFrom({style:{opacity:0}},{duration:300,delay:M}),E.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(n,r,a){var i=n.getModel("endLabel");if(rF(n)){var o=n.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new dr({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=h1e(l);c>=0&&(xp(s,Tp(n,"endLabel"),{inheritColor:a,labelFetcher:n,labelDataIndex:c,defaultText:function(f,d,h){return h!=null?Z8(o,h):F2(o,f)},enableTextSetter:!0},v1e(i,r)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(n,r,a,i,o,s,l){var u=this._endLabel,c=this._polyline;if(u){n<1&&i.originalX==null&&(i.originalX=u.x,i.originalY=u.y);var f=a.getLayout("points"),d=a.hostModel,h=d.get("connectNulls"),p=s.get("precision"),v=s.get("distance")||0,g=l.getBaseAxis(),m=g.isHorizontal(),b=g.inverse,w=r.shape,_=b?m?w.x:w.y+w.height:m?w.x+w.width:w.y,C=(m?v:0)*(b?-1:1),x=(m?0:-v)*(b?-1:1),T=m?"x":"y",M=p1e(f,_,T),E=M.range,A=E[1]-E[0],L=void 0;if(A>=1){if(A>1&&!h){var F=YD(f,E[0]);u.attr({x:F[0]+C,y:F[1]+x}),o&&(L=d.getRawValue(E[0]))}else{var F=c.getPointOn(_,T);F&&u.attr({x:F[0]+C,y:F[1]+x});var H=d.getRawValue(E[0]),U=d.getRawValue(E[1]);o&&(L=f4(a,p,H,U,M.t))}i.lastFrameIndex=E[0]}else{var P=n===1||i.lastFrameIndex>0?E[0]:0,F=YD(f,P);o&&(L=d.getRawValue(P)),u.attr({x:F[0]+C,y:F[1]+x})}if(o){var N=kp(u);typeof N.setLabelText=="function"&&N.setLabelText(L)}}},t.prototype._doUpdateAnimation=function(n,r,a,i,o,s,l){var u=this._polyline,c=this._polygon,f=n.hostModel,d=n1e(this._data,n,this._stackedOnPoints,r,this._coordSys,a,this._valueOrigin),h=d.current,p=d.stackedOnCurrent,v=d.next,g=d.stackedOnNext;if(o&&(p=Ls(d.stackedOnCurrent,d.current,a,o,l),h=Ls(d.current,null,a,o,l),g=Ls(d.stackedOnNext,d.next,a,o,l),v=Ls(d.next,null,a,o,l)),KD(h,v)>3e3||c&&KD(p,g)>3e3){u.stopAnimation(),u.setShape({points:v}),c&&(c.stopAnimation(),c.setShape({points:v,stackedOnPoints:g}));return}u.shape.__points=d.current,u.shape.points=h;var m={shape:{points:v}};d.current!==h&&(m.shape.__points=d.next),u.stopAnimation(),Cr(u,m,f),c&&(c.setShape({points:h,stackedOnPoints:p}),c.stopAnimation(),Cr(c,{shape:{stackedOnPoints:g}},f),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var b=[],w=d.status,_=0;_t&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n10&&o.type==="cartesian2d"&&i){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),f=r.getDevicePixelRatio(),d=Math.abs(c[1]-c[0])*(f||1),h=Math.round(s/d);if(isFinite(h)&&h>1){i==="lttb"?t.setData(a.lttbDownSample(a.mapDimension(u.dim),1/h)):i==="minmax"&&t.setData(a.minmaxDownSample(a.mapDimension(u.dim),1/h));var p=void 0;Bt(i)?p=y1e[i]:Jt(i)&&(p=i),p&&t.setData(a.downSample(a.mapDimension(u.dim),1/h,p,b1e))}}}}}function _1e(e){e.registerChartView(g1e),e.registerSeriesModel(Z_e),e.registerLayout(m1e("line")),e.registerVisual({seriesType:"line",reset:function(t){var n=t.getData(),r=t.getModel("lineStyle").getLineStyle();r&&!r.stroke&&(r.stroke=n.getVisual("style").fill),n.setVisual("legendLineStyle",r)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,aF("line"))}var LS=function(e){Yt(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(n,r){return V0(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(n,r,a){var i=this.coordinateSystem;if(i&&i.clampData){var o=i.clampData(n),s=i.dataToPoint(o);if(a)he(i.getAxes(),function(d,h){if(d.type==="category"&&r!=null){var p=d.getTicksCoords(),v=d.getTickModel().get("alignWithLabel"),g=o[h],m=r[h]==="x1"||r[h]==="y1";if(m&&!v&&(g+=1),p.length<2)return;if(p.length===2){s[h]=d.toGlobalCoord(d.getExtent()[m?1:0]);return}for(var b=void 0,w=void 0,_=1,C=0;Cg){w=(x+b)/2;break}C===1&&(_=T-p[0].tickValue)}w==null&&(b?b&&(w=p[p.length-1].coord):w=p[0].coord),s[h]=d.toGlobalCoord(w)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),f=i.getBaseAxis().isHorizontal()?0:1;s[f]+=u+c/2}return s}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},t}(ma);ma.registerClass(LS);var w1e=function(e){Yt(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(){return V0(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var n=this.get("progressiveThreshold"),r=this.get("largeThreshold");return r>n&&(n=r),n},t.prototype.brushSelector=function(n,r,a){return a.rect(r.getItemLayout(n))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=nB(LS.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),t}(LS),S1e=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),ly=function(e){Yt(t,e);function t(n){var r=e.call(this,n)||this;return r.type="sausage",r}return t.prototype.getDefaultShape=function(){return new S1e},t.prototype.buildPath=function(n,r){var a=r.cx,i=r.cy,o=Math.max(r.r0||0,0),s=Math.max(r.r,0),l=(s-o)*.5,u=o+l,c=r.startAngle,f=r.endAngle,d=r.clockwise,h=Math.PI*2,p=d?f-cMath.PI/2&&cs)return!0;s=f}return!1},t.prototype._isOrderDifferentInView=function(n,r){for(var a=r.scale,i=a.getExtent(),o=Math.max(0,i[0]),s=Math.min(i[1],a.getOrdinalMeta().categories.length-1);o<=s;++o)if(n.ordinalNumbers[o]!==a.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(n,r,a,i){if(this._isOrderChangedWithinSameData(n,r,a)){var o=this._dataSort(n,a,r);this._isOrderDifferentInView(o,a)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",axisId:a.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(n,r,a){var i=r.baseAxis,o=this._dataSort(n,i,function(s){return n.get(n.mapDimension(r.otherAxis.dim),s)});a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},t.prototype.remove=function(n,r){this._clear(this._model),this._removeOnRenderedListener(r)},t.prototype.dispose=function(n,r){this._removeOnRenderedListener(r)},t.prototype._removeOnRenderedListener=function(n){this._onRendered&&(n.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(n){var r=this.group,a=this._data;n&&n.isAnimationEnabled()&&a&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],a.eachItemGraphicEl(function(i){qm(i,n,En(i).dataIndex)})):r.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(Jr),GD={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var a=e.x+e.width,i=e.y+e.height,o=p1(t.x,e.x),s=v1(t.x+t.width,a),l=p1(t.y,e.y),u=v1(t.y+t.height,i),c=sa?s:o,t.y=f&&l>i?u:l,t.width=c?0:s-o,t.height=f?0:u-l,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),c||f},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var a=v1(t.r,e.r),i=p1(t.r0,e.r0);t.r=a,t.r0=i;var o=a-i<0;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}return o}},qD={cartesian2d:function(e,t,n,r,a,i,o,s,l){var u=new yr({shape:ct({},r),z2:1});if(u.__dataIndex=n,u.name="item",i){var c=u.shape,f=a?"height":"width";c[f]=0}return u},polar:function(e,t,n,r,a,i,o,s,l){var u=!a&&l?ly:Xi,c=new u({shape:r,z2:1});c.name="item";var f=iF(a);if(c.calculateTextPosition=C1e(f,{isRoundCap:u===ly}),i){var d=c.shape,h=a?"r":"endAngle",p={};d[h]=a?r.r0:r.startAngle,p[h]=r[h],(s?Cr:Zr)(c,{shape:p},i)}return c}};function E1e(e,t){var n=e.get("realtimeSort",!0),r=t.getBaseAxis();if(n&&r.type==="category"&&t.type==="cartesian2d")return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}function XD(e,t,n,r,a,i,o,s){var l,u;i?(u={x:r.x,width:r.width},l={y:r.y,height:r.height}):(u={y:r.y,height:r.height},l={x:r.x,width:r.width}),s||(o?Cr:Zr)(n,{shape:l},t,a,null);var c=t?e.baseAxis.model:null;(o?Cr:Zr)(n,{shape:u},c,a)}function ZD(e,t){for(var n=0;n0?1:-1,o=r.height>0?1:-1;return{x:r.x+i*a/2,y:r.y+o*a/2,width:r.width-i*a,height:r.height-o*a}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function I1e(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function iF(e){return function(t){var n=t?"Arc":"Angle";return function(r){switch(r){case"start":case"insideStart":case"end":case"insideEnd":return r+n;default:return r}}}(e)}function QD(e,t,n,r,a,i,o,s){var l=t.getItemVisual(n,"style");if(s){if(!i.get("roundCap")){var c=e.shape,f=Dd(r.getModel("itemStyle"),c,!0);ct(c,f),e.setShape(c)}}else{var u=r.get(["itemStyle","borderRadius"])||0;e.setShape("r",u)}e.useStyle(l);var d=r.getShallow("cursor");d&&e.attr("cursor",d);var h=s?o?a.r>=a.r0?"endArc":"startArc":a.endAngle>=a.startAngle?"endAngle":"startAngle":o?a.height>=0?"bottom":"top":a.width>=0?"right":"left",p=Tp(r);xp(e,p,{labelFetcher:i,labelDataIndex:n,defaultText:F2(i.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h});var v=e.getTextContent();if(s&&v){var g=r.get(["label","position"]);e.textConfig.inside=g==="middle"?!0:null,x1e(e,g==="outside"?h:g,iF(o),r.get(["label","rotate"]))}Q4(v,p,i.getRawValue(n),function(b){return Z8(t,b)});var m=r.getModel(["emphasis"]);Vu(e,m.get("focus"),m.get("blurScope"),m.get("disabled")),ff(e,r),I1e(a)&&(e.style.fill="none",e.style.stroke="none",he(e.states,function(b){b.style&&(b.style.fill=b.style.stroke="none")}))}function D1e(e,t){var n=e.get(["itemStyle","borderColor"]);if(!n||n==="none")return 0;var r=e.get(["itemStyle","borderWidth"])||0,a=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),i=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,a,i)}var P1e=function(){function e(){}return e}(),eP=function(e){Yt(t,e);function t(n){var r=e.call(this,n)||this;return r.type="largeBar",r}return t.prototype.getDefaultShape=function(){return new P1e},t.prototype.buildPath=function(n,r){for(var a=r.points,i=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c=0?n:null},30,!1);function O1e(e,t,n){for(var r=e.baseDimIdx,a=1-r,i=e.shape.points,o=e.largeDataIndices,s=[],l=[],u=e.barWidth,c=0,f=i.length/3;c=s[0]&&t<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return o[c]}return-1}function oF(e,t,n){if(z2(n,"cartesian2d")){var r=t,a=n.getArea();return{x:e?r.x:a.x,y:e?a.y:r.y,width:e?r.width:a.width,height:e?a.height:r.height}}else{var a=n.getArea(),i=t;return{cx:a.cx,cy:a.cy,r0:e?a.r0:i.r0,r:e?a.r:i.r,startAngle:e?i.startAngle:0,endAngle:e?i.endAngle:Math.PI*2}}}function L1e(e,t,n){var r=e.type==="polar"?Xi:yr;return new r({shape:oF(t,n,e),silent:!0,z2:0})}function R1e(e){e.registerChartView(k1e),e.registerSeriesModel(w1e),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,er(Wbe,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Ube("bar")),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,aF("bar")),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,n){var r=t.componentType||"series";n.eachComponent({mainType:r,query:t},function(a){t.sortInfo&&a.axis.setCategorySortInfo(t.sortInfo)})})}var rP=Math.PI*2,Zv=Math.PI/180;function sF(e,t){return df(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function lF(e,t){var n=sF(e,t),r=e.get("center"),a=e.get("radius");It(a)||(a=[0,a]);var i=sn(n.width,t.getWidth()),o=sn(n.height,t.getHeight()),s=Math.min(i,o),l=sn(a[0],s/2),u=sn(a[1],s/2),c,f,d=e.coordinateSystem;if(d){var h=d.dataToPoint(r);c=h[0]||0,f=h[1]||0}else It(r)||(r=[r,r]),c=sn(r[0],i)+n.x,f=sn(r[1],o)+n.y;return{cx:c,cy:f,r0:l,r:u}}function N1e(e,t,n){t.eachSeriesByType(e,function(r){var a=r.getData(),i=a.mapDimension("value"),o=sF(r,n),s=lF(r,n),l=s.cx,u=s.cy,c=s.r,f=s.r0,d=-r.get("startAngle")*Zv,h=r.get("endAngle"),p=r.get("padAngle")*Zv;h=h==="auto"?d-rP:-h*Zv;var v=r.get("minAngle")*Zv,g=v+p,m=0;a.each(i,function(z){!isNaN(z)&&m++});var b=a.getSum(i),w=Math.PI/(b||m)*2,_=r.get("clockwise"),C=r.get("roseType"),x=r.get("stillShowZeroSum"),T=a.getDataExtent(i);T[0]=0;var M=_?1:-1,E=[d,h],A=M*p/2;Gx(E,!_),d=E[0],h=E[1];var L=uF(r);L.startAngle=d,L.endAngle=h,L.clockwise=_;var F=Math.abs(h-d),H=F,U=0,P=d;if(a.setLayout({viewRect:o,r:c}),a.each(i,function(z,$){var O;if(isNaN(z)){a.setItemLayout($,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:_,cx:l,cy:u,r0:f,r:C?NaN:c});return}C!=="area"?O=b===0&&x?w:z*w:O=F/m,OO?(ee=P+M*O/2,te=ee):(ee=P+A,te=W-A),a.setItemLayout($,{angle:O,startAngle:ee,endAngle:te,clockwise:_,cx:l,cy:u,r0:f,r:C?$i(z,T,[f,c]):c}),P=W}),Hn?m:g,C=Math.abs(w.label.y-n);if(C>=_.maxY){var x=w.label.x-t-w.len2*a,T=r+w.len,M=Math.abs(x)e.unconstrainedWidth?null:h:null;r.setStyle("width",p)}var v=r.getBoundingRect();i.width=v.width;var g=(r.style.margin||0)+2.1;i.height=v.height+g,i.y-=(i.height-f)/2}}}function g1(e){return e.position==="center"}function V1e(e){var t=e.getData(),n=[],r,a,i=!1,o=(e.get("minShowLabelAngle")||0)*B1e,s=t.getLayout("viewRect"),l=t.getLayout("r"),u=s.width,c=s.x,f=s.y,d=s.height;function h(x){x.ignore=!0}function p(x){if(!x.ignore)return!0;for(var T in x.states)if(x.states[T].ignore===!1)return!0;return!1}t.each(function(x){var T=t.getItemGraphicEl(x),M=T.shape,E=T.getTextContent(),A=T.getTextGuideLine(),L=t.getItemModel(x),F=L.getModel("label"),H=F.get("position")||L.get(["emphasis","label","position"]),U=F.get("distanceToLabelLine"),P=F.get("alignTo"),N=sn(F.get("edgeDistance"),u),z=F.get("bleedMargin"),$=L.getModel("labelLine"),O=$.get("length");O=sn(O,u);var W=$.get("length2");if(W=sn(W,u),Math.abs(M.endAngle-M.startAngle)0?"right":"left":te>0?"left":"right"}var ve=Math.PI,Oe=0,Le=F.get("rotate");if(Bn(Le))Oe=Le*(ve/180);else if(H==="center")Oe=0;else if(Le==="radial"||Le===!0){var et=te<0?-ee+ve:-ee;Oe=et}else if(Le==="tangential"&&H!=="outside"&&H!=="outer"){var Fe=Math.atan2(te,re);Fe<0&&(Fe=ve*2+Fe);var Ye=re>0;Ye&&(Fe=ve+Fe),Oe=Fe-ve}if(i=!!Oe,E.x=ce,E.y=ie,E.rotation=Oe,E.setStyle({verticalAlign:"middle"}),_e){E.setStyle({align:se});var Je=E.states.select;Je&&(Je.x+=E.x,Je.y+=E.y)}else{var Ue=E.getBoundingRect().clone();Ue.applyTransform(E.getComputedTransform());var yt=(E.style.margin||0)+2.1;Ue.y-=yt/2,Ue.height+=yt,n.push({label:E,labelLine:A,position:H,len:O,len2:W,minTurnAngle:$.get("minTurnAngle"),maxSurfaceAngle:$.get("maxSurfaceAngle"),surfaceNormal:new Qt(te,re),linePoints:de,textAlign:se,labelDistance:U,labelAlignTo:P,edgeDistance:N,bleedMargin:z,rect:Ue,unconstrainedWidth:Ue.width,labelStyleWidth:E.style.width})}T.setTextConfig({inside:_e})}}),!i&&e.get("avoidLabelOverlap")&&F1e(n,r,a,l,u,d,c,f);for(var v=0;v0){for(var c=o.getItemLayout(0),f=1;isNaN(c&&c.startAngle)&&f=i.r0}},t.type="pie",t}(Jr);function fF(e,t,n){t=It(t)&&{coordDimensions:t}||ct({encodeDefine:e.getEncode()},t);var r=e.getSource(),a=O2(r,t).dimensions,i=new P2(a,e);return i.initData(r,n),i}var W1e=function(){function e(t,n){this._getDataWithEncodedVisual=t,this._getRawData=n}return e.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},e.prototype.containName=function(t){var n=this._getRawData();return n.indexOfName(t)>=0},e.prototype.indexOfName=function(t){var n=this._getDataWithEncodedVisual();return n.indexOfName(t)},e.prototype.getItemVisual=function(t,n){var r=this._getDataWithEncodedVisual();return r.getItemVisual(t,n)},e}(),U1e=pr(),K1e=function(e){Yt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(n){e.prototype.init.apply(this,arguments),this.legendVisualProvider=new W1e(Vn(this.getData,this),Vn(this.getRawData,this)),this._defaultLabelLine(n)},t.prototype.mergeOption=function(){e.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return fF(this,{coordDimensions:["value"],encodeDefaulter:er(xme,this)})},t.prototype.getDataParams=function(n){var r=this.getData(),a=U1e(r),i=a.seats;if(!i){var o=[];r.each(r.mapDimension("value"),function(l){o.push(l)}),i=a.seats=r4(o,r.hostModel.get("percentPrecision"))}var s=e.prototype.getDataParams.call(this,n);return s.percent=i[n]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(n){rS(n,"labelLine",["show"]);var r=n.labelLine,a=n.emphasis.labelLine;r.show=r.show&&n.label.show,a.show=a.show&&n.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},t}(ma);function j1e(e){return{seriesType:e,reset:function(t,n){var r=t.getData();r.filterSelf(function(a){var i=r.mapDimension("value"),o=r.get(i,a);return!(Bn(o)&&!isNaN(o)&&o<0)})}}}function Y1e(e){e.registerChartView(H1e),e.registerSeriesModel(K1e),s0e("pie",e.registerAction),e.registerLayout(er(N1e,"pie")),e.registerProcessor($1e("pie")),e.registerProcessor(j1e("pie"))}var G1e=function(e){Yt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},t}(In),RS=function(e){Yt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",zi).models[0]},t.type="cartesian2dAxis",t}(In);ki(RS,F8);var dF={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},q1e=wn({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},dF),H2=wn({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},dF),X1e=wn({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},H2),Z1e=Mn({logBase:10},H2);const J1e={category:q1e,value:H2,time:X1e,log:Z1e};var Q1e={value:1,category:1,time:1,log:1};function iP(e,t,n,r){he(Q1e,function(a,i){var o=wn(wn({},J1e[i],!0),r,!0),s=function(l){Yt(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=t+"Axis."+i,c}return u.prototype.mergeDefaultAndTheme=function(c,f){var d=Hh(this),h=d?O0(c):{},p=f.getTheme();wn(c,p.get(i+"Axis")),wn(c,this.getDefaultOption()),c.type=oP(c),d&&hf(c,h,d)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=IS.createByAxisModel(this))},u.prototype.getCategories=function(c){var f=this.option;if(f.type==="category")return c?f.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=t+"Axis."+i,u.defaultOption=o,u}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+"Axis",oP)}function oP(e){return e.type||(e.data?"category":"value")}var ewe=function(){function e(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return e.prototype.getAxis=function(t){return this._axes[t]},e.prototype.getAxes=function(){return zt(this._dimList,function(t){return this._axes[t]},this)},e.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),mr(this.getAxes(),function(n){return n.scale.type===t})},e.prototype.addAxis=function(t){var n=t.dim;this._axes[n]=t,this._dimList.push(n)},e}(),NS=["x","y"];function sP(e){return e.type==="interval"||e.type==="time"}var twe=function(e){Yt(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type="cartesian2d",n.dimensions=NS,n}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var n=this.getAxis("x").scale,r=this.getAxis("y").scale;if(!(!sP(n)||!sP(r))){var a=n.getExtent(),i=r.getExtent(),o=this.dataToPoint([a[0],i[0]]),s=this.dataToPoint([a[1],i[1]]),l=a[1]-a[0],u=i[1]-i[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,f=(s[1]-o[1])/u,d=o[0]-a[0]*c,h=o[1]-i[0]*f,p=this._transform=[c,0,0,f,d,h];this._invTransform=mp([],p)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(n){var r=this.getAxis("x"),a=this.getAxis("y");return r.contain(r.toLocalCoord(n[0]))&&a.contain(a.toLocalCoord(n[1]))},t.prototype.containData=function(n){return this.getAxis("x").containData(n[0])&&this.getAxis("y").containData(n[1])},t.prototype.containZone=function(n,r){var a=this.dataToPoint(n),i=this.dataToPoint(r),o=this.getArea(),s=new Sn(a[0],a[1],i[0]-a[0],i[1]-a[1]);return o.intersect(s)},t.prototype.dataToPoint=function(n,r,a){a=a||[];var i=n[0],o=n[1];if(this._transform&&i!=null&&isFinite(i)&&o!=null&&isFinite(o))return ha(a,n,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return a[0]=s.toGlobalCoord(s.dataToCoord(i,r)),a[1]=l.toGlobalCoord(l.dataToCoord(o,r)),a},t.prototype.clampData=function(n,r){var a=this.getAxis("x").scale,i=this.getAxis("y").scale,o=a.getExtent(),s=i.getExtent(),l=a.parse(n[0]),u=i.parse(n[1]);return r=r||[],r[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),r[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),r},t.prototype.pointToData=function(n,r){var a=[];if(this._invTransform)return ha(a,n,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return a[0]=i.coordToData(i.toLocalCoord(n[0]),r),a[1]=o.coordToData(o.toLocalCoord(n[1]),r),a},t.prototype.getOtherAxis=function(n){return this.getAxis(n.dim==="x"?"y":"x")},t.prototype.getArea=function(n){n=n||0;var r=this.getAxis("x").getGlobalExtent(),a=this.getAxis("y").getGlobalExtent(),i=Math.min(r[0],r[1])-n,o=Math.min(a[0],a[1])-n,s=Math.max(r[0],r[1])-i+n,l=Math.max(a[0],a[1])-o+n;return new Sn(i,o,s,l)},t}(ewe),nwe=function(e){Yt(t,e);function t(n,r,a,i,o){var s=e.call(this,n,r,a)||this;return s.index=0,s.type=i||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var n=this.position;return n==="top"||n==="bottom"},t.prototype.getGlobalExtent=function(n){var r=this.getExtent();return r[0]=this.toGlobalCoord(r[0]),r[1]=this.toGlobalCoord(r[1]),n&&r[0]>r[1]&&r.reverse(),r},t.prototype.pointToData=function(n,r){return this.coordToData(this.toLocalCoord(n[this.dim==="x"?0:1]),r)},t.prototype.setCategorySortInfo=function(n){if(this.type!=="category")return!1;this.model.option.categorySortInfo=n,this.scale.setSortInfo(n)},t}(q8);function $S(e,t,n){n=n||{};var r=e.coordinateSystem,a=t.axis,i={},o=a.getAxesOnZeroOf()[0],s=a.position,l=o?"onZero":s,u=a.dim,c=r.getRect(),f=[c.x,c.x+c.width,c.y,c.y+c.height],d={left:0,right:1,top:0,bottom:1,onZero:2},h=t.get("offset")||0,p=u==="x"?[f[2]-h,f[3]+h]:[f[0]-h,f[1]+h];if(o){var v=o.toGlobalCoord(o.dataToCoord(0));p[d.onZero]=Math.max(Math.min(v,p[1]),p[0])}i.position=[u==="y"?p[d[l]]:f[0],u==="x"?p[d[l]]:f[3]],i.rotation=Math.PI/2*(u==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};i.labelDirection=i.tickDirection=i.nameDirection=g[s],i.labelOffset=o?p[d[s]]-p[d.onZero]:0,t.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),cf(n.labelInside,t.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var m=t.get(["axisLabel","rotate"]);return i.labelRotate=l==="top"?-m:m,i.z2=1,i}function lP(e){return e.get("coordinateSystem")==="cartesian2d"}function uP(e){var t={xAxisModel:null,yAxisModel:null};return he(t,function(n,r){var a=r.replace(/Model$/,""),i=e.getReferringComponents(a,zi).models[0];t[r]=i}),t}var m1=Math.log;function rwe(e,t,n){var r=Pf.prototype,a=r.getTicks.call(n),i=r.getTicks.call(n,!0),o=a.length-1,s=r.getInterval.call(n),l=N8(e,t),u=l.extent,c=l.fixMin,f=l.fixMax;if(e.type==="log"){var d=m1(e.base);u=[m1(u[0])/d,m1(u[1])/d]}e.setExtent(u[0],u[1]),e.calcNiceExtent({splitNumber:o,fixMin:c,fixMax:f});var h=r.getExtent.call(e);c&&(u[0]=h[0]),f&&(u[1]=h[1]);var p=r.getInterval.call(e),v=u[0],g=u[1];if(c&&f)p=(g-v)/o;else if(c)for(g=u[0]+p*o;gu[0]&&isFinite(v)&&isFinite(u[0]);)p=l1(p),v=u[1]-p*o;else{var m=e.getTicks().length-1;m>o&&(p=l1(p));var b=p*o;g=Math.ceil(u[1]/p)*p,v=ir(g-b),v<0&&u[0]>=0?(v=0,g=ir(b)):g>0&&u[1]<=0&&(g=0,v=-ir(b))}var w=(a[0].value-i[0].value)/s,_=(a[o].value-i[o].value)/s;r.setExtent.call(e,v+p*w,g+p*_),r.setInterval.call(e,p),(w||_)&&r.setNiceExtent.call(e,v+p,g-p)}var awe=function(){function e(t,n,r){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=NS,this._initCartesian(t,n,r),this.model=t}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(t,n){var r=this._axesMap;this._updateScale(t,this.model);function a(o){var s,l=Gn(o),u=l.length;if(u){for(var c=[],f=u-1;f>=0;f--){var d=+l[f],h=o[d],p=h.model,v=h.scale;DS(v)&&p.get("alignTicks")&&p.get("interval")==null?c.push(h):(PS(v,p),DS(v)&&(s=h))}c.length&&(s||(s=c.pop(),PS(s.scale,s.model)),he(c,function(g){rwe(g.scale,g.model,s.scale)}))}}a(r.x),a(r.y);var i={};he(r.x,function(o){cP(r,"y",o,i)}),he(r.y,function(o){cP(r,"x",o,i)}),this.resize(this.model,n)},e.prototype.resize=function(t,n,r){var a=t.getBoxLayoutParams(),i=!r&&t.get("containLabel"),o=df(a,{width:n.getWidth(),height:n.getHeight()});this._rect=o;var s=this._axesList;l(),i&&(he(s,function(u){if(!u.model.get(["axisLabel","inside"])){var c=u_e(u);if(c){var f=u.isHorizontal()?"height":"width",d=u.model.get(["axisLabel","margin"]);o[f]-=c[f]+d,u.position==="top"?o.y+=c.height+d:u.position==="left"&&(o.x+=c.width+d)}}}),l()),he(this._coordsList,function(u){u.calcAffineTransform()});function l(){he(s,function(u){var c=u.isHorizontal(),f=c?[0,o.width]:[0,o.height],d=u.inverse?1:0;u.setExtent(f[d],f[1-d]),iwe(u,c?o.x:o.y)})}},e.prototype.getAxis=function(t,n){var r=this._axesMap[t];if(r!=null)return r[n||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(t,n){if(t!=null&&n!=null){var r="x"+t+"y"+n;return this._coordsMap[r]}Wt(t)&&(n=t.yAxisIndex,t=t.xAxisIndex);for(var a=0,i=this._coordsList;a0?"top":"bottom",i="center"):Nh(a-el)?(o=r>0?"bottom":"top",i="center"):(o="middle",a>0&&a0?"right":"left":i=r>0?"left":"right"),{rotation:a,textAlign:i,textVerticalAlign:o}},e.makeAxisEventDataBase=function(t){var n={componentType:t.mainType,componentIndex:t.componentIndex};return n[t.mainType+"Index"]=t.componentIndex,n},e.isLabelSilent=function(t){var n=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||n&&n.show)},e}(),dP={axisLine:function(e,t,n,r){var a=t.get(["axisLine","show"]);if(a==="auto"&&e.handleAutoShown&&(a=e.handleAutoShown("axisLine")),!!a){var i=t.axis.getExtent(),o=r.transform,s=[i[0],0],l=[i[1],0],u=s[0]>l[0];o&&(ha(s,s,o),ha(l,l,o));var c=ct({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),f=new Zi({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1});Vh(f.shape,f.style.lineWidth),f.anid="line",n.add(f);var d=t.get(["axisLine","symbol"]);if(d!=null){var h=t.get(["axisLine","symbolSize"]);Bt(d)&&(d=[d,d]),(Bt(h)||Bn(h))&&(h=[h,h]);var p=YB(t.get(["axisLine","symbolOffset"])||0,h),v=h[0],g=h[1];he([{rotate:e.rotation+Math.PI/2,offset:p[0],r:0},{rotate:e.rotation-Math.PI/2,offset:p[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(m,b){if(d[b]!=="none"&&d[b]!=null){var w=fs(d[b],-v/2,-g/2,v,g,c.stroke,!0),_=m.r+m.offset,C=u?l:s;w.attr({rotation:m.rotate,x:C[0]+_*Math.cos(e.rotation),y:C[1]-_*Math.sin(e.rotation),silent:!0,z2:11}),n.add(w)}})}}},axisTickLabel:function(e,t,n,r){var a=lwe(n,r,t,e),i=cwe(n,r,t,e);if(swe(t,i,a),uwe(n,r,t,e.tickDirection),t.get(["axisLabel","hideOverlap"])){var o=Y_e(zt(i,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));X_e(o)}},axisName:function(e,t,n,r){var a=cf(e.axisName,t.get("name"));if(a){var i=t.get("nameLocation"),o=e.nameDirection,s=t.getModel("nameTextStyle"),l=t.get("nameGap")||0,u=t.axis.getExtent(),c=u[0]>u[1]?-1:1,f=[i==="start"?u[0]-c*l:i==="end"?u[1]+c*l:(u[0]+u[1])/2,pP(i)?e.labelOffset+o*l:0],d,h=t.get("nameRotate");h!=null&&(h=h*el/180);var p;pP(i)?d=sl.innerTextLayout(e.rotation,h??e.rotation,o):(d=owe(e.rotation,i,h||0,u),p=e.axisNameAvailableWidth,p!=null&&(p=Math.abs(p/Math.sin(d.rotation)),!isFinite(p)&&(p=null)));var v=s.getFont(),g=t.get("nameTruncate",!0)||{},m=g.ellipsis,b=cf(e.nameTruncateMaxWidth,g.maxWidth,p),w=new dr({x:f[0],y:f[1],rotation:d.rotation,silent:sl.isLabelSilent(t),style:Hi(s,{text:a,font:v,overflow:"truncate",width:b,ellipsis:m,fill:s.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:s.get("align")||d.textAlign,verticalAlign:s.get("verticalAlign")||d.textVerticalAlign}),z2:1});if(T0({el:w,componentModel:t,itemName:a}),w.__fullText=a,w.anid="name",t.get("triggerEvent")){var _=sl.makeAxisEventDataBase(t);_.targetType="axisName",_.name=a,En(w).eventData=_}r.add(w),w.updateTransform(),n.add(w),w.decomposeTransform()}}};function owe(e,t,n,r){var a=Wx(n-e),i,o,s=r[0]>r[1],l=t==="start"&&!s||t!=="start"&&s;return Nh(a-el/2)?(o=l?"bottom":"top",i="center"):Nh(a-el*1.5)?(o=l?"top":"bottom",i="center"):(o="middle",ael/2?i=l?"left":"right":i=l?"right":"left"),{rotation:a,textAlign:i,textVerticalAlign:o}}function swe(e,t,n){if(!B8(e.axis)){var r=e.get(["axisLabel","showMinLabel"]),a=e.get(["axisLabel","showMaxLabel"]);t=t||[],n=n||[];var i=t[0],o=t[1],s=t[t.length-1],l=t[t.length-2],u=n[0],c=n[1],f=n[n.length-1],d=n[n.length-2];r===!1?(ei(i),ei(u)):hP(i,o)&&(r?(ei(o),ei(c)):(ei(i),ei(u))),a===!1?(ei(s),ei(f)):hP(l,s)&&(a?(ei(l),ei(d)):(ei(s),ei(f)))}}function ei(e){e&&(e.ignore=!0)}function hP(e,t){var n=e&&e.getBoundingRect().clone(),r=t&&t.getBoundingRect().clone();if(!(!n||!r)){var a=gp([]);return c0(a,a,-e.rotation),n.applyTransform(al([],a,e.getLocalTransform())),r.applyTransform(al([],a,t.getLocalTransform())),n.intersect(r)}}function pP(e){return e==="middle"||e==="center"}function hF(e,t,n,r,a){for(var i=[],o=[],s=[],l=0;l=0||e===t}function gwe(e){var t=W2(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,a=n.option,i=n.get("status"),o=n.get("value");o!=null&&(o=r.parse(o));var s=BS(n);i==null&&(a.status=s?"show":"hide");var l=r.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o=o/3?1:2),c=r.y-i(l)*s*(s>=o/3?1:2);l=r.angle-Math.PI/2,n.moveTo(u,c),n.lineTo(r.x+a(l)*s,r.y+i(l)*s),n.lineTo(r.x+a(r.angle)*o,r.y+i(r.angle)*o),n.lineTo(r.x-a(l)*s,r.y-i(l)*s),n.lineTo(u,c)},t}(Rn);function Mwe(e,t){var n=e.get("center"),r=t.getWidth(),a=t.getHeight(),i=Math.min(r,a),o=sn(n[0],t.getWidth()),s=sn(n[1],t.getHeight()),l=sn(e.get("radius"),i/2);return{cx:o,cy:s,r:l}}function Jv(e,t){var n=e==null?"":e+"";return t&&(Bt(t)?n=t.replace("{value}",n):Jt(t)&&(n=t(e))),n}var Awe=function(e){Yt(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(n,r,a){this.group.removeAll();var i=n.get(["axisLine","lineStyle","color"]),o=Mwe(n,a);this._renderMain(n,r,a,i,o),this._data=n.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(n,r,a,i,o){var s=this.group,l=n.get("clockwise"),u=-n.get("startAngle")/180*Math.PI,c=-n.get("endAngle")/180*Math.PI,f=n.getModel("axisLine"),d=f.get("roundCap"),h=d?ly:Xi,p=f.get("show"),v=f.getModel("lineStyle"),g=v.get("width"),m=[u,c];Gx(m,!l),u=m[0],c=m[1];for(var b=c-u,w=u,_=[],C=0;p&&C=E&&(A===0?0:i[A-1][0])Math.PI/2&&(ce+=Math.PI)):re==="tangential"?ce=-M-Math.PI/2:Bn(re)&&(ce=re*Math.PI/180),ce===0?f.add(new dr({style:Hi(w,{text:O,x:ee,y:te,verticalAlign:P<-.8?"top":P>.8?"bottom":"middle",align:U<-.4?"left":U>.4?"right":"center"},{inheritColor:W}),silent:!0})):f.add(new dr({style:Hi(w,{text:O,x:ee,y:te,verticalAlign:"middle",align:"center"},{inheritColor:W}),silent:!0,originX:ee,originY:te,rotation:ce}))}if(b.get("show")&&N!==_){var z=b.get("distance");z=z?z+c:c;for(var ie=0;ie<=C;ie++){U=Math.cos(M),P=Math.sin(M);var de=new Zi({shape:{x1:U*(p-z)+d,y1:P*(p-z)+h,x2:U*(p-T-z)+d,y2:P*(p-T-z)+h},silent:!0,style:F});F.stroke==="auto"&&de.setStyle({stroke:i((N+ie/C)/_)}),f.add(de),M+=A}M-=A}else M+=E}},t.prototype._renderPointer=function(n,r,a,i,o,s,l,u,c){var f=this.group,d=this._data,h=this._progressEls,p=[],v=n.get(["pointer","show"]),g=n.getModel("progress"),m=g.get("show"),b=n.getData(),w=b.mapDimension("value"),_=+n.get("min"),C=+n.get("max"),x=[_,C],T=[s,l];function M(A,L){var F=b.getItemModel(A),H=F.getModel("pointer"),U=sn(H.get("width"),o.r),P=sn(H.get("length"),o.r),N=n.get(["pointer","icon"]),z=H.get("offsetCenter"),$=sn(z[0],o.r),O=sn(z[1],o.r),W=H.get("keepAspect"),ee;return N?ee=fs(N,$-U/2,O-P,U,P,null,W):ee=new Ewe({shape:{angle:-Math.PI/2,width:U,r:P,x:$,y:O}}),ee.rotation=-(L+Math.PI/2),ee.x=o.cx,ee.y=o.cy,ee}function E(A,L){var F=g.get("roundCap"),H=F?ly:Xi,U=g.get("overlap"),P=U?g.get("width"):c/b.count(),N=U?o.r-P:o.r-(A+1)*P,z=U?o.r:o.r-A*P,$=new H({shape:{startAngle:s,endAngle:L,cx:o.cx,cy:o.cy,clockwise:u,r0:N,r:z}});return U&&($.z2=$i(b.get(w,A),[_,C],[100,0],!0)),$}(m||v)&&(b.diff(d).add(function(A){var L=b.get(w,A);if(v){var F=M(A,s);Zr(F,{rotation:-((isNaN(+L)?T[0]:$i(L,x,T,!0))+Math.PI/2)},n),f.add(F),b.setItemGraphicEl(A,F)}if(m){var H=E(A,s),U=g.get("clip");Zr(H,{shape:{endAngle:$i(L,x,T,U)}},n),f.add(H),sS(n.seriesIndex,b.dataType,A,H),p[A]=H}}).update(function(A,L){var F=b.get(w,A);if(v){var H=d.getItemGraphicEl(L),U=H?H.rotation:s,P=M(A,U);P.rotation=U,Cr(P,{rotation:-((isNaN(+F)?T[0]:$i(F,x,T,!0))+Math.PI/2)},n),f.add(P),b.setItemGraphicEl(A,P)}if(m){var N=h[L],z=N?N.shape.endAngle:s,$=E(A,z),O=g.get("clip");Cr($,{shape:{endAngle:$i(F,x,T,O)}},n),f.add($),sS(n.seriesIndex,b.dataType,A,$),p[A]=$}}).execute(),b.each(function(A){var L=b.getItemModel(A),F=L.getModel("emphasis"),H=F.get("focus"),U=F.get("blurScope"),P=F.get("disabled");if(v){var N=b.getItemGraphicEl(A),z=b.getItemVisual(A,"style"),$=z.fill;if(N instanceof Ro){var O=N.style;N.useStyle(ct({image:O.image,x:O.x,y:O.y,width:O.width,height:O.height},z))}else N.useStyle(z),N.type!=="pointer"&&N.setColor($);N.setStyle(L.getModel(["pointer","itemStyle"]).getItemStyle()),N.style.fill==="auto"&&N.setStyle("fill",i($i(b.get(w,A),x,[0,1],!0))),N.z2EmphasisLift=0,ff(N,L),Vu(N,H,U,P)}if(m){var W=p[A];W.useStyle(b.getItemVisual(A,"style")),W.setStyle(L.getModel(["progress","itemStyle"]).getItemStyle()),W.z2EmphasisLift=0,ff(W,L),Vu(W,H,U,P)}}),this._progressEls=p)},t.prototype._renderAnchor=function(n,r){var a=n.getModel("anchor"),i=a.get("show");if(i){var o=a.get("size"),s=a.get("icon"),l=a.get("offsetCenter"),u=a.get("keepAspect"),c=fs(s,r.cx-o/2+sn(l[0],r.r),r.cy-o/2+sn(l[1],r.r),o,o,null,u);c.z2=a.get("showAbove")?1:0,c.setStyle(a.getModel("itemStyle").getItemStyle()),this.group.add(c)}},t.prototype._renderTitleAndDetail=function(n,r,a,i,o){var s=this,l=n.getData(),u=l.mapDimension("value"),c=+n.get("min"),f=+n.get("max"),d=new br,h=[],p=[],v=n.isAnimationEnabled(),g=n.get(["pointer","showAbove"]);l.diff(this._data).add(function(m){h[m]=new dr({silent:!0}),p[m]=new dr({silent:!0})}).update(function(m,b){h[m]=s._titleEls[b],p[m]=s._detailEls[b]}).execute(),l.each(function(m){var b=l.getItemModel(m),w=l.get(u,m),_=new br,C=i($i(w,[c,f],[0,1],!0)),x=b.getModel("title");if(x.get("show")){var T=x.get("offsetCenter"),M=o.cx+sn(T[0],o.r),E=o.cy+sn(T[1],o.r),A=h[m];A.attr({z2:g?0:2,style:Hi(x,{x:M,y:E,text:l.getName(m),align:"center",verticalAlign:"middle"},{inheritColor:C})}),_.add(A)}var L=b.getModel("detail");if(L.get("show")){var F=L.get("offsetCenter"),H=o.cx+sn(F[0],o.r),U=o.cy+sn(F[1],o.r),P=sn(L.get("width"),o.r),N=sn(L.get("height"),o.r),z=n.get(["progress","show"])?l.getItemVisual(m,"style").fill:C,A=p[m],$=L.get("formatter");A.attr({z2:g?0:2,style:Hi(L,{x:H,y:U,text:Jv(w,$),width:isNaN(P)?null:P,height:isNaN(N)?null:N,align:"center",verticalAlign:"middle"},{inheritColor:z})}),Q4(A,{normal:L},w,function(W){return Jv(W,$)}),v&&qge(A,m,l,n,{getFormattedLabel:function(W,ee,te,re,ce,ie){return Jv(ie?ie.interpolatedValue:w,$)}}),_.add(A)}d.add(_)}),this.group.add(d),this._titleEls=h,this._detailEls=p},t.type="gauge",t}(Jr),Iwe=function(e){Yt(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.visualStyleAccessPath="itemStyle",n}return t.prototype.getInitialData=function(n,r){return fF(this,["value"])},t.type="series.gauge",t.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t}(ma);function Dwe(e){e.registerChartView(Awe),e.registerSeriesModel(Iwe)}var du=pr(),mP=yn,_1=Vn,Pwe=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(t,n,r,a){var i=n.get("value"),o=n.get("status");if(this._axisModel=t,this._axisPointerModel=n,this._api=r,!(!a&&this._lastValue===i&&this._lastStatus===o)){this._lastValue=i,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,i,t,n,r);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(r),this._lastGraphicKey=c;var f=this._moveAnimation=this.determineAnimation(t,n);if(!s)s=this._group=new br,this.createPointerEl(s,u,t,n),this.createLabelEl(s,u,t,n),r.getZr().add(s);else{var d=er(yP,n,f);this.updatePointerEl(s,u,d),this.updateLabelEl(s,u,d,n)}_P(s,n,!0),this._renderHandle(i)}},e.prototype.remove=function(t){this.clear(t)},e.prototype.dispose=function(t){this.clear(t)},e.prototype.determineAnimation=function(t,n){var r=n.get("animation"),a=t.axis,i=a.type==="category",o=n.get("snap");if(!o&&!i)return!1;if(r==="auto"||r==null){var s=this.animationThreshold;if(i&&a.getBandWidth()>s)return!0;if(o){var l=W2(t).seriesDataCount,u=a.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return r===!0},e.prototype.makeElOption=function(t,n,r,a,i){},e.prototype.createPointerEl=function(t,n,r,a){var i=n.pointer;if(i){var o=du(t).pointerEl=new Kge[i.type](mP(n.pointer));t.add(o)}},e.prototype.createLabelEl=function(t,n,r,a){if(n.label){var i=du(t).labelEl=new dr(mP(n.label));t.add(i),bP(i,a)}},e.prototype.updatePointerEl=function(t,n,r){var a=du(t).pointerEl;a&&n.pointer&&(a.setStyle(n.pointer.style),r(a,{shape:n.pointer.shape}))},e.prototype.updateLabelEl=function(t,n,r,a){var i=du(t).labelEl;i&&(i.setStyle(n.label.style),r(i,{x:n.label.x,y:n.label.y}),bP(i,a))},e.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var n=this._axisPointerModel,r=this._api.getZr(),a=this._handle,i=n.getModel("handle"),o=n.get("status");if(!i.get("show")||!o||o==="hide"){a&&r.remove(a),this._handle=null;return}var s;this._handle||(s=!0,a=this._handle=x0(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){O$(u.event)},onmousedown:_1(this._onHandleDragMove,this,0,0),drift:_1(this._onHandleDragMove,this),ondragend:_1(this._onHandleDragEnd,this)}),r.add(a)),_P(a,n,!1),a.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=i.get("size");It(l)||(l=[l,l]),a.scaleX=l[0]/2,a.scaleY=l[1]/2,FB(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},e.prototype._moveHandleToValue=function(t,n){yP(this._axisPointerModel,!n&&this._moveAnimation,this._handle,w1(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(t,n){var r=this._handle;if(r){this._dragging=!0;var a=this.updateHandleTransform(w1(r),[t,n],this._axisModel,this._axisPointerModel);this._payloadInfo=a,r.stopAnimation(),r.attr(w1(a)),du(r).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var n=this._payloadInfo,r=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:n.cursorPoint[0],y:n.cursorPoint[1],tooltipOption:n.tooltipOption,axesInfo:[{axisDim:r.axis.dim,axisIndex:r.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var n=this._axisPointerModel.get("value");this._moveHandleToValue(n),this._api.dispatchAction({type:"hideTip"})}},e.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var n=t.getZr(),r=this._group,a=this._handle;n&&r&&(this._lastGraphicKey=null,r&&n.remove(r),a&&n.remove(a),this._group=null,this._handle=null,this._payloadInfo=null),wS(this,"_doDispatchAxisPointer")},e.prototype.doClear=function(){},e.prototype.buildLabel=function(t,n,r){return r=r||0,{x:t[r],y:t[1-r],width:n[r],height:n[1-r]}},e}();function yP(e,t,n,r){mF(du(n).lastProp,r)||(du(n).lastProp=r,t?Cr(n,r,e):(n.stopAnimation(),n.attr(r)))}function mF(e,t){if(Wt(e)&&Wt(t)){var n=!0;return he(t,function(r,a){n=n&&mF(e[a],r)}),!!n}else return e===t}function bP(e,t){e[t.get(["label","show"])?"show":"hide"]()}function w1(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function _P(e,t,n){var r=t.get("z"),a=t.get("zlevel");e&&e.traverse(function(i){i.type!=="group"&&(r!=null&&(i.z=r),a!=null&&(i.zlevel=a),i.silent=n)})}function Owe(e){var t=e.get("type"),n=e.getModel(t+"Style"),r;return t==="line"?(r=n.getLineStyle(),r.fill=null):t==="shadow"&&(r=n.getAreaStyle(),r.stroke=null),r}function Lwe(e,t,n,r,a){var i=n.get("value"),o=yF(i,t.axis,t.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),s=n.getModel("label"),l=Mp(s.get("padding")||0),u=s.getFont(),c=zx(o,u),f=a.position,d=c.width+l[1]+l[3],h=c.height+l[0]+l[2],p=a.align;p==="right"&&(f[0]-=d),p==="center"&&(f[0]-=d/2);var v=a.verticalAlign;v==="bottom"&&(f[1]-=h),v==="middle"&&(f[1]-=h/2),Rwe(f,d,h,r);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=t.get(["axisLine","lineStyle","color"])),e.label={x:f[0],y:f[1],style:Hi(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function Rwe(e,t,n,r){var a=r.getWidth(),i=r.getHeight();e[0]=Math.min(e[0]+t,a)-t,e[1]=Math.min(e[1]+n,i)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function yF(e,t,n,r,a){e=t.scale.parse(e);var i=t.scale.getLabel({value:e},{precision:a.precision}),o=a.formatter;if(o){var s={value:$2(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};he(r,function(l){var u=n.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,f=u&&u.getDataParams(c);f&&s.seriesData.push(f)}),Bt(o)?i=o.replace("{value}",i):Jt(o)&&(i=o(s))}return i}function bF(e,t,n){var r=rl();return c0(r,r,n.rotation),Rm(r,r,n.position),a2([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function Nwe(e,t,n,r,a,i){var o=sl.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=a.get(["label","margin"]),Lwe(t,r,a,i,{position:bF(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function $we(e,t,n){return n=n||0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function Bwe(e,t,n){return n=n||0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}var Fwe=function(e){Yt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(n,r,a,i,o){var s=a.axis,l=s.grid,u=i.get("type"),c=wP(l,s).getOtherAxis(s).getGlobalExtent(),f=s.toGlobalCoord(s.dataToCoord(r,!0));if(u&&u!=="none"){var d=Owe(i),h=Vwe[u](s,f,c);h.style=d,n.graphicKey=h.type,n.pointer=h}var p=$S(l.model,a);Nwe(r,n,p,a,i,o)},t.prototype.getHandleTransform=function(n,r,a){var i=$S(r.axis.grid.model,r,{labelInside:!1});i.labelMargin=a.get(["handle","margin"]);var o=bF(r.axis,n,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(n,r,a,i){var o=a.axis,s=o.grid,l=o.getGlobalExtent(!0),u=wP(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,f=[n.x,n.y];f[c]+=r[c],f[c]=Math.min(l[1],f[c]),f[c]=Math.max(l[0],f[c]);var d=(u[1]+u[0])/2,h=[d,d];h[c]=f[c];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:f[0],y:f[1],rotation:n.rotation,cursorPoint:h,tooltipOption:p[c]}},t}(Pwe);function wP(e,t){var n={};return n[t.dim+"AxisIndex"]=t.index,e.getCartesian(n)}var Vwe={line:function(e,t,n){var r=$we([t,n[0]],[t,n[1]],SP(e));return{type:"Line",subPixelOptimize:!0,shape:r}},shadow:function(e,t,n){var r=Math.max(1,e.getBandWidth()),a=n[1]-n[0];return{type:"Rect",shape:Bwe([t-r/2,n[0]],[r,a],SP(e))}}};function SP(e){return e.dim==="x"?0:1}var zwe=function(e){Yt(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},t}(In),ts=pr(),Hwe=he;function _F(e,t,n){if(!Xt.node){var r=t.getZr();ts(r).records||(ts(r).records={}),Wwe(r,t);var a=ts(r).records[e]||(ts(r).records[e]={});a.handler=n}}function Wwe(e,t){if(ts(e).initialized)return;ts(e).initialized=!0,n("click",er(CP,"click")),n("mousemove",er(CP,"mousemove")),n("globalout",Kwe);function n(r,a){e.on(r,function(i){var o=jwe(t);Hwe(ts(e).records,function(s){s&&a(s,i,o.dispatchAction)}),Uwe(o.pendings,t)})}}function Uwe(e,t){var n=e.showTip.length,r=e.hideTip.length,a;n?a=e.showTip[n-1]:r&&(a=e.hideTip[r-1]),a&&(a.dispatchAction=null,t.dispatchAction(a))}function Kwe(e,t,n){e.handler("leave",null,n)}function CP(e,t,n,r){t.handler(e,n,r)}function jwe(e){var t={showTip:[],hideTip:[]},n=function(r){var a=t[r.type];a?a.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}function VS(e,t){if(!Xt.node){var n=t.getZr(),r=(ts(n).records||{})[e];r&&(ts(n).records[e]=null)}}var Ywe=function(e){Yt(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(n,r,a){var i=r.getComponent("tooltip"),o=n.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";_F("axisPointer",a,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},t.prototype.remove=function(n,r){VS("axisPointer",r)},t.prototype.dispose=function(n,r){VS("axisPointer",r)},t.type="axisPointer",t}(Ga);function wF(e,t){var n=[],r=e.seriesIndex,a;if(r==null||!(a=t.getSeriesByIndex(r)))return{point:[]};var i=a.getData(),o=Bu(i,e);if(o==null||o<0||It(o))return{point:[]};var s=i.getItemGraphicEl(o),l=a.coordinateSystem;if(a.getTooltipPosition)n=a.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(e.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),f=c.dim,d=u.dim,h=f==="x"||f==="radius"?1:0,p=i.mapDimension(d),v=[];v[h]=i.get(p,o),v[1-h]=i.get(i.getCalculationInfo("stackResultDimension"),o),n=l.dataToPoint(v)||[]}else n=l.dataToPoint(i.getValues(zt(l.dimensions,function(m){return i.mapDimension(m)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),n=[g.x+g.width/2,g.y+g.height/2]}return{point:n,el:s}}var xP=pr();function Gwe(e,t,n){var r=e.currTrigger,a=[e.x,e.y],i=e,o=e.dispatchAction||Vn(n.dispatchAction,n),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){Kg(a)&&(a=wF({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},t).point);var l=Kg(a),u=i.axesInfo,c=s.axesInfo,f=r==="leave"||Kg(a),d={},h={},p={list:[],map:{}},v={showPointer:er(Xwe,h),showTooltip:er(Zwe,p)};he(s.coordSysMap,function(m,b){var w=l||m.containPoint(a);he(s.coordSysAxesInfo[b],function(_,C){var x=_.axis,T=tSe(u,_);if(!f&&w&&(!u||T)){var M=T&&T.value;M==null&&!l&&(M=x.pointToData(a)),M!=null&&TP(_,M,v,!1,d)}})});var g={};return he(c,function(m,b){var w=m.linkGroup;w&&!h[b]&&he(w.axesInfo,function(_,C){var x=h[C];if(_!==m&&x){var T=x.value;w.mapper&&(T=m.axis.scale.parse(w.mapper(T,kP(_),kP(m)))),g[m.key]=T}})}),he(g,function(m,b){TP(c[b],m,v,!0,d)}),Jwe(h,c,d),Qwe(p,a,e,o),eSe(c,o,n),d}}function TP(e,t,n,r,a){var i=e.axis;if(!(i.scale.isBlank()||!i.containData(t))){if(!e.involveSeries){n.showPointer(e,t);return}var o=qwe(t,e),s=o.payloadBatch,l=o.snapToValue;s[0]&&a.seriesIndex==null&&ct(a,s[0]),!r&&e.snap&&i.containData(l)&&l!=null&&(t=l),n.showPointer(e,t,s),n.showTooltip(e,o,l)}}function qwe(e,t){var n=t.axis,r=n.dim,a=e,i=[],o=Number.MAX_VALUE,s=-1;return he(t.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(r),f,d;if(l.getAxisTooltipData){var h=l.getAxisTooltipData(c,e,n);d=h.dataIndices,f=h.nestestValue}else{if(d=l.getData().indicesOfNearest(c[0],e,n.type==="category"?.5:null),!d.length)return;f=l.getData().get(c[0],d[0])}if(!(f==null||!isFinite(f))){var p=e-f,v=Math.abs(p);v<=o&&((v=0&&s<0)&&(o=v,s=p,a=f,i.length=0),he(d,function(g){i.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:i,snapToValue:a}}function Xwe(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function Zwe(e,t,n,r){var a=n.payloadBatch,i=t.axis,o=i.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!a.length)){var l=t.coordSys.model,u=Gh(l),c=e.map[u];c||(c=e.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},e.list.push(c)),c.dataByAxis.push({axisDim:i.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:r,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:a.slice()})}}function Jwe(e,t,n){var r=n.axesInfo=[];he(t,function(a,i){var o=a.axisPointerModel.option,s=e[i];s?(!a.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!a.useHandle&&(o.status="hide"),o.status==="show"&&r.push({axisDim:a.axis.dim,axisIndex:a.axis.model.componentIndex,value:o.value})})}function Qwe(e,t,n,r){if(Kg(t)||!e.list.length){r({type:"hideTip"});return}var a=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:a.dataIndexInside,dataIndex:a.dataIndex,seriesIndex:a.seriesIndex,dataByCoordSys:e.list})}function eSe(e,t,n){var r=n.getZr(),a="axisPointerLastHighlights",i=xP(r)[a]||{},o=xP(r)[a]={};he(e,function(u,c){var f=u.axisPointerModel.option;f.status==="show"&&u.triggerEmphasis&&he(f.seriesDataIndices,function(d){var h=d.seriesIndex+" | "+d.dataIndex;o[h]=d})});var s=[],l=[];he(i,function(u,c){!o[c]&&l.push(u)}),he(o,function(u,c){!i[c]&&s.push(u)}),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function tSe(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}function kP(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+"AxisIndex"]=t.componentIndex,n.axisName=n[r+"AxisName"]=t.name,n.axisId=n[r+"AxisId"]=t.id,n}function Kg(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function SF(e){pF.registerAxisPointerClass("CartesianAxisPointer",Fwe),e.registerComponentModel(zwe),e.registerComponentView(Ywe),e.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var n=t.axisPointer.link;n&&!It(n)&&(t.axisPointer.link=[n])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,function(t,n){t.getComponent("axisPointer").coordSysAxesInfo=fwe(t,n)}),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},Gwe)}function nSe(e){ds(Twe),ds(SF)}function rSe(e,t){var n=Mp(t.get("padding")),r=t.getItemStyle(["color","opacity"]);return r.fill=t.get("backgroundColor"),e=new yr({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get("borderRadius")},style:r,silent:!0,z2:-1}),e}var aSe=function(e){Yt(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},t}(In);function CF(e){var t=e.get("confine");return t!=null?!!t:e.get("renderMode")==="richText"}function xF(e){if(Xt.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=i==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=i==="top"?225:45)+"deg)");var c=u*Math.PI/180,f=o+a,d=f*Math.abs(Math.cos(c))+f*Math.abs(Math.sin(c)),h=Math.round(((d-Math.SQRT2*a)/2+Math.SQRT2*a-(d-f)/2)*100)/100;s+=";"+i+":-"+h+"px";var p=t+" solid "+a+"px;",v=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+p,"border-right:"+p,"background-color:"+r+";"];return'
'}function fSe(e,t){var n="cubic-bezier(0.23,1,0.32,1)",r=" "+e/2+"s "+n,a="opacity"+r+",visibility"+r;return t||(r=" "+e+"s "+n,a+=Xt.transformSupported?","+U2+r:",left"+r+",top"+r),sSe+":"+a}function EP(e,t,n){var r=e.toFixed(0)+"px",a=t.toFixed(0)+"px";if(!Xt.transformSupported)return n?"top:"+a+";left:"+r+";":[["top",a],["left",r]];var i=Xt.transform3dSupported,o="translate"+(i?"3d":"")+"("+r+","+a+(i?",0":"")+")";return n?"top:0;left:0;"+U2+":"+o+";":[["top",0],["left",0],[TF,o]]}function dSe(e){var t=[],n=e.get("fontSize"),r=e.getTextColor();r&&t.push("color:"+r),t.push("font:"+e.getFont());var a=ln(e.get("lineHeight"),Math.round(n*3/2));n&&t.push("line-height:"+a+"px");var i=e.get("textShadowColor"),o=e.get("textShadowBlur")||0,s=e.get("textShadowOffsetX")||0,l=e.get("textShadowOffsetY")||0;return i&&o&&t.push("text-shadow:"+s+"px "+l+"px "+o+"px "+i),he(["decoration","align"],function(u){var c=e.get(u);c&&t.push("text-"+u+":"+c)}),t.join(";")}function hSe(e,t,n){var r=[],a=e.get("transitionDuration"),i=e.get("backgroundColor"),o=e.get("shadowBlur"),s=e.get("shadowColor"),l=e.get("shadowOffsetX"),u=e.get("shadowOffsetY"),c=e.getModel("textStyle"),f=$B(e,"html"),d=l+"px "+u+"px "+o+"px "+s;return r.push("box-shadow:"+d),t&&a&&r.push(fSe(a,n)),i&&r.push("background-color:"+i),he(["width","color","radius"],function(h){var p="border-"+h,v=d2(p),g=e.get(v);g!=null&&r.push(p+":"+g+(h==="color"?"":"px"))}),r.push(dSe(c)),f!=null&&r.push("padding:"+Mp(f).join("px ")+"px"),r.join(";")+";"}function MP(e,t,n,r,a){var i=t&&t.painter;if(n){var o=i&&i.getViewportRoot();o&&ohe(e,o,n,r,a)}else{e[0]=r,e[1]=a;var s=i&&i.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var pSe=function(){function e(t,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Xt.wxa)return null;var r=document.createElement("div");r.domBelongToZr=!0,this.el=r;var a=this._zr=t.getZr(),i=n.appendTo,o=i&&(Bt(i)?document.querySelector(i):uf(i)?i:Jt(i)&&i(t.getDom()));MP(this._styleCoord,a,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(r),this._api=t,this._container=o;var s=this;r.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},r.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=a.handler,c=a.painter.getViewportRoot();ri(c,l,!0),u.dispatch("mousemove",l)}},r.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return e.prototype.update=function(t){if(!this._container){var n=this._api.getDom(),r=oSe(n,"position"),a=n.style;a.position!=="absolute"&&r!=="absolute"&&(a.position="relative")}var i=t.get("alwaysShowContent");i&&this._moveIfResized(),this._alwaysShowContent=i,this.el.className=t.get("className")||""},e.prototype.show=function(t,n){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var r=this.el,a=r.style,i=this._styleCoord;r.innerHTML?a.cssText=lSe+hSe(t,!this._firstShow,this._longHide)+EP(i[0],i[1],!0)+("border-color:"+zu(n)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):a.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(t,n,r,a,i){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(Bt(i)&&r.get("trigger")==="item"&&!CF(r)&&(s=cSe(r,a,i)),Bt(t))o.innerHTML=t+s;else if(t){o.innerHTML="",It(t)||(t=[t]);for(var l=0;l=0?this._tryShow(i,o):a==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var n=this._tooltipModel,r=this._ecModel,a=this._api,i=n.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&i!=="none"&&i!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!a.isDisposed()&&o.manuallyShowTip(n,r,a,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(n,r,a,i){if(!(i.from===this.uid||Xt.node||!a.getDom())){var o=DP(i,a);this._ticket="";var s=i.dataByCoordSys,l=wSe(i,r,a);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:i.position,positionDefault:"bottom"},o)}else if(i.tooltip&&i.x!=null&&i.y!=null){var c=gSe;c.x=i.x,c.y=i.y,c.update(),En(c).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:c},o)}else if(s)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:s,tooltipOption:i.tooltipOption},o);else if(i.seriesIndex!=null){if(this._manuallyAxisShowTip(n,r,a,i))return;var f=wF(i,r),d=f.point[0],h=f.point[1];d!=null&&h!=null&&this._tryShow({offsetX:d,offsetY:h,target:f.el,position:i.position,positionDefault:"bottom"},o)}else i.x!=null&&i.y!=null&&(a.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:a.getZr().findHover(i.x,i.y).target},o))}},t.prototype.manuallyHideTip=function(n,r,a,i){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(DP(i,a))},t.prototype._manuallyAxisShowTip=function(n,r,a,i){var o=i.seriesIndex,s=i.dataIndex,l=r.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=r.getSeriesByIndex(o);if(u){var c=u.getData(),f=yd([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(f.get("trigger")==="axis")return a.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:i.position}),!0}}},t.prototype._tryShow=function(n,r){var a=n.target,i=this._tooltipModel;if(i){this._lastX=n.offsetX,this._lastY=n.offsetY;var o=n.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,n);else if(a){var s=En(a);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;Id(a,function(c){if(En(c).dataIndex!=null)return l=c,!0;if(En(c).tooltipConfig!=null)return u=c,!0},!0),l?this._showSeriesItemTooltip(n,l,r):u?this._showComponentItemTooltip(n,u,r):this._hide(r)}else this._lastDataByCoordSys=null,this._hide(r)}},t.prototype._showOrMove=function(n,r){var a=n.get("showDelay");r=Vn(r,this),clearTimeout(this._showTimout),a>0?this._showTimout=setTimeout(r,a):r()},t.prototype._showAxisTooltip=function(n,r){var a=this._ecModel,i=this._tooltipModel,o=[r.offsetX,r.offsetY],s=yd([r.tooltipOption],i),l=this._renderMode,u=[],c=Uh("section",{blocks:[],noHeader:!0}),f=[],d=new X_;he(n,function(b){he(b.dataByAxis,function(w){var _=a.getComponent(w.axisDim+"Axis",w.axisIndex),C=w.value;if(!(!_||C==null)){var x=yF(C,_.axis,a,w.seriesDataIndices,w.valueLabelOpt),T=Uh("section",{header:x,noHeader:!Vi(x),sortBlocks:!0,blocks:[]});c.blocks.push(T),he(w.seriesDataIndices,function(M){var E=a.getSeriesByIndex(M.seriesIndex),A=M.dataIndexInside,L=E.getDataParams(A);if(!(L.dataIndex<0)){L.axisDim=w.axisDim,L.axisIndex=w.axisIndex,L.axisType=w.axisType,L.axisId=w.axisId,L.axisValue=$2(_.axis,{value:C}),L.axisValueLabel=x,L.marker=d.makeTooltipMarker("item",zu(L.color),l);var F=HI(E.formatTooltip(A,!0,null)),H=F.frag;if(H){var U=yd([E],i).get("valueFormatter");T.blocks.push(U?ct({valueFormatter:U},H):H)}F.text&&f.push(F.text),u.push(L)}})}})}),c.blocks.reverse(),f.reverse();var h=r.position,p=s.get("order"),v=YI(c,d,l,p,a.get("useUTC"),s.get("textStyle"));v&&f.unshift(v);var g=l==="richText"?` - -`:"
",m=f.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(n,u)?this._updatePosition(s,h,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,m,u,Math.random()+"",o[0],o[1],h,null,d)})},t.prototype._showSeriesItemTooltip=function(n,r,a){var i=this._ecModel,o=En(r),s=o.seriesIndex,l=i.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,f=o.dataType,d=u.getData(f),h=this._renderMode,p=n.positionDefault,v=yd([d.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),g=v.get("trigger");if(!(g!=null&&g!=="item")){var m=u.getDataParams(c,f),b=new X_;m.marker=b.makeTooltipMarker("item",zu(m.color),h);var w=HI(u.formatTooltip(c,!1,f)),_=v.get("order"),C=v.get("valueFormatter"),x=w.frag,T=x?YI(C?ct({valueFormatter:C},x):x,b,h,_,i.get("useUTC"),v.get("textStyle")):w.text,M="item_"+u.name+"_"+c;this._showOrMove(v,function(){this._showTooltipContent(v,T,m,M,n.offsetX,n.offsetY,n.position,n.target,b)}),a({type:"showTip",dataIndexInside:c,dataIndex:d.getRawIndex(c),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(n,r,a){var i=this._renderMode==="html",o=En(r),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(Bt(l)){var c=l;l={content:c,formatter:c},u=!0}u&&i&&l.content&&(l=yn(l),l.content=la(l.content));var f=[l],d=this._ecModel.getComponent(o.componentMainType,o.componentIndex);d&&f.push(d),f.push({formatter:l.content});var h=n.positionDefault,p=yd(f,this._tooltipModel,h?{position:h}:null),v=p.get("content"),g=Math.random()+"",m=new X_;this._showOrMove(p,function(){var b=yn(p.get("formatterParams")||{});this._showTooltipContent(p,v,b,g,n.offsetX,n.offsetY,n.position,r,m)}),a({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(n,r,a,i,o,s,l,u,c){if(this._ticket="",!(!n.get("showContent")||!n.get("show"))){var f=this._tooltipContent;f.setEnterable(n.get("enterable"));var d=n.get("formatter");l=l||n.get("position");var h=r,p=this._getNearestPoint([o,s],a,n.get("trigger"),n.get("borderColor")),v=p.color;if(d)if(Bt(d)){var g=n.ecModel.get("useUTC"),m=It(a)?a[0]:a,b=m&&m.axisType&&m.axisType.indexOf("time")>=0;h=d,b&&(h=Ep(m.axisValue,h,g)),h=h2(h,a,!0)}else if(Jt(d)){var w=Vn(function(_,C){_===this._ticket&&(f.setContent(C,c,n,v,l),this._updatePosition(n,l,o,s,f,a,u))},this);this._ticket=i,h=d(a,i,w)}else h=d;f.setContent(h,c,n,v,l),f.show(n,v),this._updatePosition(n,l,o,s,f,a,u)}},t.prototype._getNearestPoint=function(n,r,a,i){if(a==="axis"||It(r))return{color:i||(this._renderMode==="html"?"#fff":"none")};if(!It(r))return{color:i||r.color||r.borderColor}},t.prototype._updatePosition=function(n,r,a,i,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();r=r||n.get("position");var f=o.getSize(),d=n.get("align"),h=n.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),Jt(r)&&(r=r([a,i],s,o.el,p,{viewSize:[u,c],contentSize:f.slice()})),It(r))a=sn(r[0],u),i=sn(r[1],c);else if(Wt(r)){var v=r;v.width=f[0],v.height=f[1];var g=df(v,{width:u,height:c});a=g.x,i=g.y,d=null,h=null}else if(Bt(r)&&l){var m=_Se(r,p,f,n.get("borderWidth"));a=m[0],i=m[1]}else{var m=ySe(a,i,o,u,c,d?null:20,h?null:20);a=m[0],i=m[1]}if(d&&(a-=PP(d)?f[0]/2:d==="right"?f[0]:0),h&&(i-=PP(h)?f[1]/2:h==="bottom"?f[1]:0),CF(n)){var m=bSe(a,i,o,u,c);a=m[0],i=m[1]}o.moveTo(a,i)},t.prototype._updateContentNotChangedOnAxis=function(n,r){var a=this._lastDataByCoordSys,i=this._cbParamsList,o=!!a&&a.length===n.length;return o&&he(a,function(s,l){var u=s.dataByAxis||[],c=n[l]||{},f=c.dataByAxis||[];o=o&&u.length===f.length,o&&he(u,function(d,h){var p=f[h]||{},v=d.seriesDataIndices||[],g=p.seriesDataIndices||[];o=o&&d.value===p.value&&d.axisType===p.axisType&&d.axisId===p.axisId&&v.length===g.length,o&&he(v,function(m,b){var w=g[b];o=o&&m.seriesIndex===w.seriesIndex&&m.dataIndex===w.dataIndex}),i&&he(d.seriesDataIndices,function(m){var b=m.seriesIndex,w=r[b],_=i[b];w&&_&&_.data!==w.data&&(o=!1)})})}),this._lastDataByCoordSys=n,this._cbParamsList=r,!!o},t.prototype._hide=function(n){this._lastDataByCoordSys=null,n({type:"hideTip",from:this.uid})},t.prototype.dispose=function(n,r){Xt.node||!r.getDom()||(wS(this,"_updatePosition"),this._tooltipContent.dispose(),VS("itemTooltip",r))},t.type="tooltip",t}(Ga);function yd(e,t,n){var r=t.ecModel,a;n?(a=new Yn(n,r,r),a=new Yn(t.option,a,r)):a=t;for(var i=e.length-1;i>=0;i--){var o=e[i];o&&(o instanceof Yn&&(o=o.get("tooltip",!0)),Bt(o)&&(o={formatter:o}),o&&(a=new Yn(o,a,r)))}return a}function DP(e,t){return e.dispatchAction||Vn(t.dispatchAction,t)}function ySe(e,t,n,r,a,i,o){var s=n.getSize(),l=s[0],u=s[1];return i!=null&&(e+l+i+2>r?e-=l+i:e+=i),o!=null&&(t+u+o>a?t-=u+o:t+=o),[e,t]}function bSe(e,t,n,r,a){var i=n.getSize(),o=i[0],s=i[1];return e=Math.min(e+o,r)-o,t=Math.min(t+s,a)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function _Se(e,t,n,r){var a=n[0],i=n[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,l=0,u=t.width,c=t.height;switch(e){case"inside":s=t.x+u/2-a/2,l=t.y+c/2-i/2;break;case"top":s=t.x+u/2-a/2,l=t.y-i-o;break;case"bottom":s=t.x+u/2-a/2,l=t.y+c+o;break;case"left":s=t.x-a-o,l=t.y+c/2-i/2;break;case"right":s=t.x+u+o,l=t.y+c/2-i/2}return[s,l]}function PP(e){return e==="center"||e==="middle"}function wSe(e,t,n){var r=jx(e).queryOptionMap,a=r.keys()[0];if(!(!a||a==="series")){var i=_p(t,a,r.get(a),{useDefault:!1,enableAll:!1,enableNone:!1}),o=i.models[0];if(o){var s=n.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=En(u).tooltipConfig;if(c&&c.name===e.name)return l=u,!0}),l)return{componentMainType:a,componentIndex:o.componentIndex,el:l}}}}function SSe(e){ds(SF),e.registerComponentModel(aSe),e.registerComponentView(mSe),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},da),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},da)}var CSe=function(e,t){if(t==="all")return{type:"all",title:e.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:e.getLocaleModel().get(["legend","selector","inverse"])}},zS=function(e){Yt(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:"box",ignoreSize:!0},n}return t.prototype.init=function(n,r,a){this.mergeDefaultAndTheme(n,a),n.selected=n.selected||{},this._updateSelector(n)},t.prototype.mergeOption=function(n,r){e.prototype.mergeOption.call(this,n,r),this._updateSelector(n)},t.prototype._updateSelector=function(n){var r=n.selector,a=this.ecModel;r===!0&&(r=n.selector=["all","inverse"]),It(r)&&he(r,function(i,o){Bt(i)&&(i={type:i}),r[o]=wn(i,CSe(a,i.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var n=this._data;if(n[0]&&this.get("selectedMode")==="single"){for(var r=!1,a=0;a=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},t}(In),xc=er,HS=he,Qv=br,EF=function(e){Yt(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return t.prototype.init=function(){this.group.add(this._contentGroup=new Qv),this.group.add(this._selectorGroup=new Qv),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(n,r,a){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!n.get("show",!0)){var o=n.get("align"),s=n.get("orient");(!o||o==="auto")&&(o=n.get("left")==="right"&&s==="vertical"?"right":"left");var l=n.get("selector",!0),u=n.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,n,r,a,l,s,u);var c=n.getBoxLayoutParams(),f={width:a.getWidth(),height:a.getHeight()},d=n.get("padding"),h=df(c,f,d),p=this.layoutInner(n,o,h,i,l,u),v=df(Mn({width:p.width,height:p.height},c),f,d);this.group.x=v.x-p.x,this.group.y=v.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=rSe(p,n))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(n,r,a,i,o,s,l){var u=this.getContentGroup(),c=un(),f=r.get("selectedMode"),d=[];a.eachRawSeries(function(h){!h.get("legendHoverLink")&&d.push(h.id)}),HS(r.getData(),function(h,p){var v=h.get("name");if(!this.newlineDisabled&&(v===""||v===` -`)){var g=new Qv;g.newline=!0,u.add(g);return}var m=a.getSeriesByName(v)[0];if(!c.get(v))if(m){var b=m.getData(),w=b.getVisual("legendLineStyle")||{},_=b.getVisual("legendIcon"),C=b.getVisual("style"),x=this._createItem(m,v,p,h,r,n,w,C,_,f,i);x.on("click",xc(OP,v,null,i,d)).on("mouseover",xc(WS,m.name,null,i,d)).on("mouseout",xc(US,m.name,null,i,d)),a.ssr&&x.eachChild(function(T){var M=En(T);M.seriesIndex=m.seriesIndex,M.dataIndex=p,M.ssrType="legend"}),c.set(v,!0)}else a.eachRawSeries(function(T){if(!c.get(v)&&T.legendVisualProvider){var M=T.legendVisualProvider;if(!M.containName(v))return;var E=M.indexOfName(v),A=M.getItemVisual(E,"style"),L=M.getItemVisual(E,"legendIcon"),F=Ka(A.fill);F&&F[3]===0&&(F[3]=.2,A=ct(ct({},A),{fill:Al(F,"rgba")}));var H=this._createItem(T,v,p,h,r,n,{},A,L,f,i);H.on("click",xc(OP,null,v,i,d)).on("mouseover",xc(WS,null,v,i,d)).on("mouseout",xc(US,null,v,i,d)),a.ssr&&H.eachChild(function(U){var P=En(U);P.seriesIndex=T.seriesIndex,P.dataIndex=p,P.ssrType="legend"}),c.set(v,!0)}},this)},this),o&&this._createSelector(o,r,i,s,l)},t.prototype._createSelector=function(n,r,a,i,o){var s=this.getSelectorGroup();HS(n,function(u){var c=u.type,f=new dr({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){a.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect",legendId:r.id})}});s.add(f);var d=r.getModel("selectorLabel"),h=r.getModel(["emphasis","selectorLabel"]);xp(f,{normal:d,emphasis:h},{defaultText:u.title}),jm(f)})},t.prototype._createItem=function(n,r,a,i,o,s,l,u,c,f,d){var h=n.visualDrawType,p=o.get("itemWidth"),v=o.get("itemHeight"),g=o.isSelected(r),m=i.get("symbolRotate"),b=i.get("symbolKeepAspect"),w=i.get("icon");c=w||c||"roundRect";var _=xSe(c,i,l,u,h,g,d),C=new Qv,x=i.getModel("textStyle");if(Jt(n.getLegendIcon)&&(!w||w==="inherit"))C.add(n.getLegendIcon({itemWidth:p,itemHeight:v,icon:c,iconRotate:m,itemStyle:_.itemStyle,lineStyle:_.lineStyle,symbolKeepAspect:b}));else{var T=w==="inherit"&&n.getData().getVisual("symbol")?m==="inherit"?n.getData().getVisual("symbolRotate"):m:0;C.add(TSe({itemWidth:p,itemHeight:v,icon:c,iconRotate:T,itemStyle:_.itemStyle,symbolKeepAspect:b}))}var M=s==="left"?p+5:-5,E=s,A=o.get("formatter"),L=r;Bt(A)&&A?L=A.replace("{name}",r??""):Jt(A)&&(L=A(r));var F=g?x.getTextColor():i.get("inactiveColor");C.add(new dr({style:Hi(x,{text:L,x:M,y:v/2,fill:F,align:E,verticalAlign:"middle"},{inheritColor:F})}));var H=new yr({shape:C.getBoundingRect(),style:{fill:"transparent"}}),U=i.getModel("tooltip");return U.get("show")&&T0({el:H,componentModel:o,itemName:r,itemTooltipOption:U.option}),C.add(H),C.eachChild(function(P){P.silent=!0}),H.silent=!f,this.getContentGroup().add(C),jm(C),C.__legendDataIndex=a,C},t.prototype.layoutInner=function(n,r,a,i,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();ih(n.get("orient"),l,n.get("itemGap"),a.width,a.height);var c=l.getBoundingRect(),f=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){ih("horizontal",u,n.get("selectorItemGap",!0));var d=u.getBoundingRect(),h=[-d.x,-d.y],p=n.get("selectorButtonGap",!0),v=n.getOrient().index,g=v===0?"width":"height",m=v===0?"height":"width",b=v===0?"y":"x";s==="end"?h[v]+=c[g]+p:f[v]+=d[g]+p,h[1-v]+=c[m]/2-d[m]/2,u.x=h[0],u.y=h[1],l.x=f[0],l.y=f[1];var w={x:0,y:0};return w[g]=c[g]+p+d[g],w[m]=Math.max(c[m],d[m]),w[b]=Math.min(0,d[b]+h[1-v]),w}else return l.x=f[0],l.y=f[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(Ga);function xSe(e,t,n,r,a,i,o){function s(g,m){g.lineWidth==="auto"&&(g.lineWidth=m.lineWidth>0?2:0),HS(g,function(b,w){g[w]==="inherit"&&(g[w]=m[w])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),c=e.lastIndexOf("empty",0)===0?"fill":"stroke",f=l.getShallow("decal");u.decal=!f||f==="inherit"?r.decal:kS(f,o),u.fill==="inherit"&&(u.fill=r[a]),u.stroke==="inherit"&&(u.stroke=r[c]),u.opacity==="inherit"&&(u.opacity=(a==="fill"?r:n).opacity),s(u,r);var d=t.getModel("lineStyle"),h=d.getLineStyle();if(s(h,n),u.fill==="auto"&&(u.fill=r.fill),u.stroke==="auto"&&(u.stroke=r.fill),h.stroke==="auto"&&(h.stroke=r.fill),!i){var p=t.get("inactiveBorderWidth"),v=u[c];u.lineWidth=p==="auto"?r.lineWidth>0&&v?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),h.stroke=d.get("inactiveColor"),h.lineWidth=d.get("inactiveWidth")}return{itemStyle:u,lineStyle:h}}function TSe(e){var t=e.icon||"roundRect",n=fs(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n}function OP(e,t,n,r){US(e,t,n,r),n.dispatchAction({type:"legendToggleSelect",name:e??t}),WS(e,t,n,r)}function MF(e){for(var t=e.getZr().storage.getDisplayList(),n,r=0,a=t.length;ra[o],g=[-h.x,-h.y];r||(g[i]=c[u]);var m=[0,0],b=[-p.x,-p.y],w=ln(n.get("pageButtonGap",!0),n.get("itemGap",!0));if(v){var _=n.get("pageButtonPosition",!0);_==="end"?b[i]+=a[o]-p[o]:m[i]+=p[o]+w}b[1-i]+=h[s]/2-p[s]/2,c.setPosition(g),f.setPosition(m),d.setPosition(b);var C={x:0,y:0};if(C[o]=v?a[o]:h[o],C[s]=Math.max(h[s],p[s]),C[l]=Math.min(0,p[l]+b[1-i]),f.__rectSize=a[o],v){var x={x:0,y:0};x[o]=Math.max(a[o]-p[o]-w,0),x[s]=C[s],f.setClipPath(new yr({shape:x})),f.__rectSize=x[o]}else d.eachChild(function(M){M.attr({invisible:!0,silent:!0})});var T=this._getPageInfo(n);return T.pageIndex!=null&&Cr(c,{x:T.contentPosition[0],y:T.contentPosition[1]},v?n:null),this._updatePageInfoView(n,T),C},t.prototype._pageGo=function(n,r,a){var i=this._getPageInfo(r)[n];i!=null&&a.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:r.id})},t.prototype._updatePageInfoView=function(n,r){var a=this._controllerGroup;he(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",d=r[f]!=null,h=a.childOfName(c);h&&(h.setStyle("fill",d?n.get("pageIconColor",!0):n.get("pageIconInactiveColor",!0)),h.cursor=d?"pointer":"default")});var i=a.childOfName("pageText"),o=n.get("pageFormatter"),s=r.pageIndex,l=s!=null?s+1:0,u=r.pageCount;i&&o&&i.setStyle("text",Bt(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(n){var r=n.get("scrollDataIndex",!0),a=this.getContentGroup(),i=this._containerGroup.__rectSize,o=n.getOrient().index,s=S1[o],l=C1[o],u=this._findTargetItemIndex(r),c=a.children(),f=c[u],d=c.length,h=d?1:0,p={contentPosition:[a.x,a.y],pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return p;var v=_(f);p.contentPosition[o]=-v.s;for(var g=u+1,m=v,b=v,w=null;g<=d;++g)w=_(c[g]),(!w&&b.e>m.s+i||w&&!C(w,m.s))&&(b.i>m.i?m=b:m=w,m&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=m.i),++p.pageCount)),b=w;for(var g=u-1,m=v,b=v,w=null;g>=-1;--g)w=_(c[g]),(!w||!C(b,w.s))&&m.i=T&&x.s<=T+i}},t.prototype._findTargetItemIndex=function(n){if(!this._showController)return 0;var r,a=this.getContentGroup(),i;return a.eachChild(function(o,s){var l=o.__legendDataIndex;i==null&&l!=null&&(i=s),l===n&&(r=s)}),r??i},t.type="legend.scroll",t}(EF);function ISe(e){e.registerAction("legendScroll","legendscroll",function(t,n){var r=t.scrollDataIndex;r!=null&&n.eachComponent({mainType:"legend",subType:"scroll",query:t},function(a){a.setScrollDataIndex(r)})})}function DSe(e){ds(AF),e.registerComponentModel(MSe),e.registerComponentView(ASe),ISe(e)}function PSe(e){ds(AF),ds(DSe)}function $P(e,t,n){var r=cs.createCanvas(),a=t.getWidth(),i=t.getHeight(),o=r.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=a+"px",o.height=i+"px",r.setAttribute("data-zr-dom-id",e)),r.width=a*n,r.height=i*n,r}var x1=function(e){zn(t,e);function t(n,r,a){var i=e.call(this)||this;i.motionBlur=!1,i.lastFrameAlpha=.7,i.dpr=1,i.virtual=!1,i.config={},i.incremental=!1,i.zlevel=0,i.maxRepaintRectCount=5,i.__dirty=!0,i.__firstTimePaint=!0,i.__used=!1,i.__drawIndex=0,i.__startIndex=0,i.__endIndex=0,i.__prevStartIndex=null,i.__prevEndIndex=null;var o;a=a||Vm,typeof n=="string"?o=$P(n,r,a):Wt(n)&&(o=n,n=o.id),i.id=n,i.dom=o;var s=o.style;return s&&(Ox(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),i.painter=r,i.dpr=a,i}return t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var n=this.dpr;this.domBack=$P("back-"+this.id,this.painter,n),this.ctxBack=this.domBack.getContext("2d"),n!==1&&this.ctxBack.scale(n,n)},t.prototype.createRepaintRects=function(n,r,a,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new Sn(0,0,0,0);function c(b){if(!(!b.isFinite()||b.isZero()))if(o.length===0){var w=new Sn(0,0,0,0);w.copy(b),o.push(w)}else{for(var _=!1,C=1/0,x=0,T=0;T=s)}}for(var f=this.__startIndex;f15)break}}U.prevElClipPaths&&m.restore()};if(b)if(b.length===0)M=g.__endIndex;else for(var A=h.dpr,L=0;L0&&t>a[0]){for(l=0;lt);l++);s=r[a[l]]}if(a.splice(l+1,0,t),r[t]=n,!n.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(n.dom,u.nextSibling):o.appendChild(n.dom)}else o.firstChild?o.insertBefore(n.dom,o.firstChild):o.appendChild(n.dom);n.painter||(n.painter=this)}},e.prototype.eachLayer=function(t,n){for(var r=this._zlevelList,a=0;a0?eg:0),this._needsManuallyCompositing),c.__builtin__||l0("ZLevel "+u+" has been used by unkown layer "+c.id),c!==i&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,n(l),i=c),a.__dirty&To&&!a.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}n(l),this.eachBuiltinLayer(function(f,d){!f.__used&&f.getElementCount()>0&&(f.__dirty=!0,f.__startIndex=f.__endIndex=f.__drawIndex=0),f.__dirty&&f.__drawIndex<0&&(f.__drawIndex=f.__startIndex)})},e.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},e.prototype._clearLayer=function(t){t.clear()},e.prototype.setBackgroundColor=function(t){this._backgroundColor=t,he(this._layers,function(n){n.setUnpainted()})},e.prototype.configLayer=function(t,n){if(n){var r=this._layerConfig;r[t]?wn(r[t],n,!0):r[t]=n;for(var a=0;a{BSe().then(O=>{a.value=O.numberCount.receiveTotal,i.value=O.numberCount.sendTotal,o.value=O.numberCount.accountTotal,s.value=O.numberCount.userTotal,u.normalReceiveTotal=O.numberCount.normalReceiveTotal,u.normalSendTotal=O.numberCount.normalSendTotal,u.normalAccountTotal=O.numberCount.normalAccountTotal,u.normalUserTotal=O.numberCount.normalUserTotal,u.delReceiveTotal=O.numberCount.delReceiveTotal,u.delSendTotal=O.numberCount.delSendTotal,u.delAccountTotal=O.numberCount.delAccountTotal,u.delUserTotal=O.numberCount.delUserTotal,p.value=O.receiveRatio.nameRatio.map(W=>({name:W.name||" ",value:W.total})),v.xdata=O.userDayCount.map(W=>kt(W.date).format("M.D")),v.sdata=O.userDayCount.map(W=>W.total),g.daysData=O.emailDayCount.receiveDayCount.map(W=>kt(W.date).format("M.D")),g.receiveData=O.emailDayCount.receiveDayCount.map(W=>W.total),g.sendData=O.emailDayCount.sendDayCount.map(W=>W.total),m=O.daySendTotal,l.value=!1,A(),T=!1})});function A(){t.name==="analysis"&&(M.value++,setTimeout(()=>{P(),N(),z(),$()}))}const L=ss(A,500,{leading:!1,trailing:!0});je(()=>n.asideShow,()=>{window.innerWidth>1024&&L()}),Xh(()=>{T||(window.innerWidth!==b&&b!==0?L():w||L())}),by(()=>{b=window.innerWidth}),window.onresize=()=>{F(),L()};function F(){E=window.innerWidth<500?`${window.innerWidth-110}`:"72%",g.barWidth=window.innerWidth>767?"40%":"60%"}const H=document.createElement("canvas").getContext("2d");H.font="12px sans-serif";function U(O,W=140){if(H.measureText(O).width<=W)return O;let te="";for(let re=0;reW)return te.slice(0,-1)+"…";return O}function P(){w&&w.dispose(),w=md.init(document.querySelector(".sender-pie"));let O={tooltip:{trigger:"item",formatter:W=>`${W.marker} ${W.name}: ${W.value} (${W.percent}%)`},legend:{type:"scroll",orient:"vertical",left:"10",top:"20",formatter:function(W){return U(W)}},series:[{data:p.value,name:"",type:"pie",radius:["40%","65%"],center:[E,"45%"],avoidLabelOverlap:!1,itemStyle:{borderRadius:4,borderColor:"#fff",borderWidth:2},label:{show:!1,position:"outside",formatter:"{d}%",color:"#333",fontSize:14},emphasis:{label:{show:!1,fontSize:40,fontWeight:"bold"}},labelLine:{show:!0},color:["#3CB2FF","#13DEB9","#FBBF24","#FF7F50","#BAE6FD","#C084FC"]}]};w.setOption(O)}function N(){_&&_.dispose(),_=md.init(document.querySelector(".increase-line"));let O={tooltip:{trigger:"axis",axisPointer:{type:"cross",crossStyle:{color:"#999"},axis:"x"},formatter:function(W){let ee="";return W.forEach(te=>{ee=`${te.marker} 用户数: ${te.value}`}),ee},backgroundColor:"#fff",borderColor:"#ccc",borderWidth:1,padding:10,textStyle:{color:"#333"}},grid:{top:"8%",right:"20",left:"35",bottom:"35"},xAxis:{type:"category",data:v.xdata,axisTick:{show:!1,alignWithLabel:!1,lineStyle:{color:"red"}},axisPointer:{label:{show:!1}},axisLine:{lineStyle:{color:"#909399",width:1,type:"solid"}},axisLabel:{formatter:function(W,ee){return ee===0?" "+W:ee===v.xdata.length-1?W+" ":W}},boundaryGap:!1},yAxis:{type:"value",axisLabel:{margin:5},boundaryGap:[0,.1],max:W=>{if(W.max<8)return 10},axisLine:{show:!0,lineStyle:{color:"#909399",width:1}},axisPointer:{label:{show:!0,formatter:W=>Math.round(W.value)}},splitLine:{show:!0,lineStyle:{type:"dashed",color:"#ccc"}}},series:[{data:v.sdata,type:"line",smooth:.1,symbol:"none",lineStyle:{color:"#1D84FF",width:2.5},areaStyle:{color:new md.graphic.LinearGradient(0,0,0,1,[{offset:0,color:"rgba(29, 132, 255, 0.3)"},{offset:1,color:"rgba(29, 132, 255, 0.03)"}])},color:["#1D84FF"]}]};_.setOption(O)}function z(){C&&C.dispose(),C=md.init(document.querySelector(".email-column"));const O={tooltip:{formatter:function(W){return W.marker,`${W.marker} ${W.seriesName}: ${W.value}`}},legend:{data:["接收","发送"],top:"0"},grid:{left:"18",right:"18",bottom:"15",top:"50",containLabel:!0},xAxis:{type:"category",data:g.daysData,axisTick:{show:!1},axisLine:{show:!0,lineStyle:{color:"#909399",width:1}}},yAxis:{max:W=>{if(W.max<8)return 10},type:"value",boundaryGap:[0,.1]},series:[{name:"接收",type:"bar",stack:"total",barWidth:"60%",barMaxWidth:30,emphasis:{itemStyle:{shadowBlur:10,shadowColor:"rgba(0,0,0,0.3)"}},data:g.receiveData,itemStyle:{color:"#3CB2FF"}},{name:"发送",type:"bar",stack:"total",emphasis:{itemStyle:{shadowBlur:10,shadowColor:"rgba(0,0,0,0.3)"}},data:g.sendData,itemStyle:{color:"#13deb9"}}]};C.setOption(O)}function $(){x&&x.dispose(),x=md.init(document.querySelector(".send-count"));let O={tooltip:{},series:[{name:"今日发件",type:"gauge",max:100,progress:{show:!0,roundCap:!0,itemStyle:{color:"#3CB2FF"}},pointer:{itemStyle:{color:"#3CB2FF"}},axisLine:{roundCap:!0,lineStyle:{color:[[1,"#E6EBF8"]]}},axisTick:{lineStyle:{color:"#999"}},detail:{valueAnimation:!0,formatter:"{value}",color:"#333"},data:[{value:m,name:"次数",title:{color:"#333"}}]}],color:["#3CB2FF"]};x.setOption(O)}return(O,W)=>{const ee=wQ,te=XR,re=zy,ce=ya;return l.value?(R(),Q("div",FSe,[V(us)])):(R(),le(ce,{key:1,style:{height:"100%"}},{default:X(()=>[(R(),Q("div",{class:"analysis",key:y(M)},[I("div",VSe,[I("div",zSe,[I("div",HSe,[I("div",WSe,[W[1]||(W[1]=I("div",null,"收件数量",-1)),I("div",null,[V(ee,{formatter:ie=>Math.round(ie),value:y(c)},null,8,["formatter","value"])])]),I("div",USe,[I("div",KSe,[V(y(nt),{icon:"hugeicons:mailbox-01",width:"25",height:"25"})])])]),I("div",jSe,[I("div",null,[W[2]||(W[2]=Xe("正常 ")),I("span",YSe,Ae(u.normalReceiveTotal),1)]),I("div",null,[W[3]||(W[3]=Xe("删除 ")),I("span",GSe,Ae(u.delReceiveTotal),1)])])]),I("div",qSe,[I("div",XSe,[I("div",ZSe,[W[4]||(W[4]=I("div",null,"发件数量",-1)),I("div",null,[V(ee,{formatter:ie=>Math.round(ie),value:y(f)},null,8,["formatter","value"])])]),I("div",JSe,[I("div",QSe,[V(y(nt),{icon:"cil:send",width:"25",height:"25"})])])]),I("div",eCe,[I("div",null,[W[5]||(W[5]=Xe("正常 ")),I("span",tCe,Ae(u.normalSendTotal),1)]),I("div",null,[W[6]||(W[6]=Xe("删除 ")),I("span",nCe,Ae(u.delSendTotal),1)])])]),I("div",rCe,[I("div",aCe,[I("div",iCe,[W[7]||(W[7]=I("div",null,"邮箱数量",-1)),I("div",null,[V(ee,{formatter:ie=>Math.round(ie),value:y(d)},null,8,["formatter","value"])])]),I("div",oCe,[I("div",sCe,[V(y(nt),{icon:"lets-icons:e-mail",width:"23",height:"23"})])])]),I("div",lCe,[I("div",null,[W[8]||(W[8]=Xe("正常 ")),I("span",uCe,Ae(u.normalAccountTotal),1)]),I("div",null,[W[9]||(W[9]=Xe("删除 ")),I("span",cCe,Ae(u.delAccountTotal),1)])])]),I("div",fCe,[I("div",dCe,[I("div",hCe,[W[10]||(W[10]=I("div",null,"用户数量",-1)),I("div",null,[V(ee,{formatter:ie=>Math.round(ie),value:y(h)},null,8,["formatter","value"])])]),I("div",pCe,[I("div",vCe,[V(y(nt),{icon:"iconoir:user",width:"25",height:"25"})])])]),I("div",gCe,[I("div",null,[W[11]||(W[11]=Xe("正常 ")),I("span",mCe,Ae(u.normalUserTotal),1)]),I("div",null,[W[12]||(W[12]=Xe("删除 ")),I("span",yCe,Ae(u.delUserTotal),1)])])])]),I("div",bCe,[I("div",_Ce,[I("div",wCe,[W[13]||(W[13]=I("span",null,"邮件来源",-1)),ye("",!0)]),W[14]||(W[14]=I("div",{class:"sender-pie"},null,-1))]),W[15]||(W[15]=I("div",{class:"picture-item"},[I("div",{class:"title"},"用户增长"),I("div",{class:"increase-line"})],-1))]),W[16]||(W[16]=I("div",{class:"picture-cs"},[I("div",{class:"picture-cs-item"},[I("div",{class:"title"},"邮件增长"),I("div",{class:"email-column"})]),I("div",{class:"picture-cs-item"},[I("div",{class:"title"},"今日发件"),I("div",{class:"send-count"})])],-1))]))]),_:1}))}}}),CCe=Jn(SCe,[["__scopeId","data-v-396b22d0"]]),xCe=Object.freeze(Object.defineProperty({__proto__:null,default:CCe},Symbol.toStringTag,{value:"Module"})); diff --git a/mail-worker/dist/index.html b/mail-worker/dist/index.html index 3bd8dda..942b9e5 100644 --- a/mail-worker/dist/index.html +++ b/mail-worker/dist/index.html @@ -6,8 +6,8 @@ - - + +
diff --git a/mail-worker/package-lock.json b/mail-worker/package-lock.json index e6e8966..9ea1061 100644 --- a/mail-worker/package-lock.json +++ b/mail-worker/package-lock.json @@ -8,10 +8,11 @@ "name": "mail-worker", "version": "0.0.0", "dependencies": { - "@cloudflare/vite-plugin": "^1.0.5", + "@cloudflare/vite-plugin": "1.6.0", "dayjs": "^1.11.13", "drizzle-orm": "^0.42.0", "hono": "^4.7.5", + "i18next": "^25.3.2", "linkedom": "^0.18.10", "postal-mime": "^2.4.3", "resend": "^4.5.1", @@ -24,6 +25,15 @@ "wrangler": "^4.7.0" } }, + "node_modules/@babel/runtime": { + "version": "7.27.6", + "resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.27.6.tgz", + "integrity": "sha512-vbavdySgbTTrmFE+EsiqUTzlOr5bzlnJtUv9PynGCAKvfQqjIXbvFdumPM/GxMDfyuGMJaJAU6TO4zc1Jf1i8Q==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/@cloudflare/kv-asset-handler": { "version": "0.3.4", "resolved": "https://registry.npmmirror.com/@cloudflare/kv-asset-handler/-/kv-asset-handler-0.3.4.tgz", @@ -54,20 +64,20 @@ } }, "node_modules/@cloudflare/vite-plugin": { - "version": "1.0.5", - "resolved": "https://registry.npmmirror.com/@cloudflare/vite-plugin/-/vite-plugin-1.0.5.tgz", - "integrity": "sha512-IkXIIl92AEvlNpC2Or8DZBALAeLgbBrEZutGDWFi/bp6AyHeqPbYb4G8Bm1XaVGKtDw/k8CCX9gpGhxkyOr6RQ==", + "version": "1.6.0", + "resolved": "https://registry.npmmirror.com/@cloudflare/vite-plugin/-/vite-plugin-1.6.0.tgz", + "integrity": "sha512-pK5uqCXzXePnpUY4tDIFE1TJNMnybdInN28QU+il1ElbJUuVCM/9YnzJIvYzSrDbXzVUSAIZDleqf5kAOjQALg==", "license": "MIT", "dependencies": { - "@cloudflare/unenv-preset": "2.3.1", - "@hattip/adapter-node": "^0.0.49", + "@cloudflare/unenv-preset": "2.3.2", + "@mjackson/node-fetch-server": "^0.6.1", "@rollup/plugin-replace": "^6.0.1", "get-port": "^7.1.0", - "miniflare": "4.20250409.0", + "miniflare": "4.20250604.1", "picocolors": "^1.1.1", "tinyglobby": "^0.2.12", - "unenv": "2.0.0-rc.15", - "wrangler": "4.10.0", + "unenv": "2.0.0-rc.17", + "wrangler": "4.20.0", "ws": "8.18.0" }, "peerDependencies": { @@ -76,13 +86,13 @@ } }, "node_modules/@cloudflare/vite-plugin/node_modules/@cloudflare/unenv-preset": { - "version": "2.3.1", - "resolved": "https://registry.npmmirror.com/@cloudflare/unenv-preset/-/unenv-preset-2.3.1.tgz", - "integrity": "sha512-Xq57Qd+ADpt6hibcVBO0uLG9zzRgyRhfCUgBT9s+g3+3Ivg5zDyVgLFy40ES1VdNcu8rPNSivm9A+kGP5IVaPg==", + "version": "2.3.2", + "resolved": "https://registry.npmmirror.com/@cloudflare/unenv-preset/-/unenv-preset-2.3.2.tgz", + "integrity": "sha512-MtUgNl+QkQyhQvv5bbWP+BpBC1N0me4CHHuP2H4ktmOMKdB/6kkz/lo+zqiA4mEazb4y+1cwyNjVrQ2DWeE4mg==", "license": "MIT OR Apache-2.0", "peerDependencies": { - "unenv": "2.0.0-rc.15", - "workerd": "^1.20250320.0" + "unenv": "2.0.0-rc.17", + "workerd": "^1.20250508.0" }, "peerDependenciesMeta": { "workerd": { @@ -91,9 +101,9 @@ } }, "node_modules/@cloudflare/vite-plugin/node_modules/@cloudflare/workerd-darwin-64": { - "version": "1.20250413.0", - "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20250413.0.tgz", - "integrity": "sha512-ZCVOinRi8cIprpF7kMyl6beNt42lPD2E14Yp3QblxoY+4c8bIX3wkrxwubz7o6AYR/wUjVnkh6lhJsb12MbnzQ==", + "version": "1.20250722.0", + "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20250722.0.tgz", + "integrity": "sha512-FRCR39OBEXoNAExk0PjrNpnPXROzttVqDJhIt2OSkbMCDaLV9dKTKTse64600l6a6IoSISwUpZrQx8ANNr2ojA==", "cpu": [ "x64" ], @@ -108,9 +118,9 @@ } }, "node_modules/@cloudflare/vite-plugin/node_modules/@cloudflare/workerd-darwin-arm64": { - "version": "1.20250413.0", - "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20250413.0.tgz", - "integrity": "sha512-3xnBhLoB4JE9W8gn9Qgg2p7aRyY9TJNqRDDmcGfLLtjrjLZGa14hkaqpvgJsIXE3+7xmkQM7j/WnMeTercF8oQ==", + "version": "1.20250722.0", + "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20250722.0.tgz", + "integrity": "sha512-ejUEIYTIDsbXPUS+hwh5W/HAJZZZyfvDG8d/IHEtMr0/u80+77QlcdnZcpGGuw9g8O8BiFb2+hBYIYcPSDqxhw==", "cpu": [ "arm64" ], @@ -125,9 +135,9 @@ } }, "node_modules/@cloudflare/vite-plugin/node_modules/@cloudflare/workerd-linux-64": { - "version": "1.20250413.0", - "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20250413.0.tgz", - "integrity": "sha512-HHhJoiQjpSc3lOnwlA9V4zSIjZa9G3hUjR/ScrHfV1L7JXnffDzne3Knotk7jIf9MPHw4TUUmIYxdpRongqfMg==", + "version": "1.20250722.0", + "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20250722.0.tgz", + "integrity": "sha512-K+pPolaQGero4SpXq24HB5N+cC5/pVW1KlIVuNgl4Y3Yk7DRrSdGGrcPmrSbGecCD8atVPDfZZSrkg8J9+qJhQ==", "cpu": [ "x64" ], @@ -142,9 +152,9 @@ } }, "node_modules/@cloudflare/vite-plugin/node_modules/@cloudflare/workerd-linux-arm64": { - "version": "1.20250413.0", - "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20250413.0.tgz", - "integrity": "sha512-CaJf9k7CdG8+EVOpKtk1l4+q3v2DyGyOgP3EfMVWsjfcmAgZci+fzJon8gqLZlYY7bfRiU6utQcqKwksM0hQtA==", + "version": "1.20250722.0", + "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20250722.0.tgz", + "integrity": "sha512-3IT39Xp3SJVuZgMZx2A9fmlCWJt5dNqkYmvOCrTVgADPBhUlqQF9Xil4jnC2eCmxlTvjFaul4AWe9FFwWMuHEg==", "cpu": [ "arm64" ], @@ -159,9 +169,9 @@ } }, "node_modules/@cloudflare/vite-plugin/node_modules/@cloudflare/workerd-windows-64": { - "version": "1.20250413.0", - "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20250413.0.tgz", - "integrity": "sha512-34ryrDYCnHGTodixDBBq3gLkAdfzciyJ6G5OBZd8wqB1gYpsUNIYbCUvMuKcrzpVghiHNOiaXA5KL9fuVV/I9w==", + "version": "1.20250722.0", + "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20250722.0.tgz", + "integrity": "sha512-uLHafix+pRwfRkn2bznuSB8LrFZS5XAmyAazsr9sftji8kxJegAhdmeT8CvR/TZICh8xCYpyUea86n5ZWaN+7A==", "cpu": [ "x64" ], @@ -185,9 +195,9 @@ } }, "node_modules/@cloudflare/vite-plugin/node_modules/miniflare": { - "version": "4.20250409.0", - "resolved": "https://registry.npmmirror.com/miniflare/-/miniflare-4.20250409.0.tgz", - "integrity": "sha512-Hu02dYZvFR+MyrI57O6rSrOUTofcO9EIvcodgq2SAHzAeWSJw2E0oq9lylOrcckFwPMcwxUAb/cQN1LIoCyySw==", + "version": "4.20250604.1", + "resolved": "https://registry.npmmirror.com/miniflare/-/miniflare-4.20250604.1.tgz", + "integrity": "sha512-HJQ9YhH0F0fI73Vsdy3PNVau+PfHZYK7trI5WJEcbfl5HzqhMU0DRNtA/G5EXQgiumkjrmbW4Zh1DVTtsqICPg==", "license": "MIT", "dependencies": { "@cspotcode/source-map-support": "0.8.1", @@ -195,9 +205,10 @@ "acorn-walk": "8.3.2", "exit-hook": "2.2.1", "glob-to-regexp": "0.4.1", + "sharp": "^0.33.5", "stoppable": "1.1.0", "undici": "^5.28.5", - "workerd": "1.20250409.0", + "workerd": "1.20250604.0", "ws": "8.18.0", "youch": "3.3.4", "zod": "3.22.3" @@ -210,9 +221,9 @@ } }, "node_modules/@cloudflare/vite-plugin/node_modules/miniflare/node_modules/@cloudflare/workerd-darwin-64": { - "version": "1.20250409.0", - "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20250409.0.tgz", - "integrity": "sha512-smA9yq77xsdQ1NMLhFz3JZxMHGd01lg0bE+X3dTFmIUs+hHskJ+HJ/IkMFInkCCeEFlUkoL4yO7ilaU/fin/xA==", + "version": "1.20250604.0", + "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20250604.0.tgz", + "integrity": "sha512-PI6AWAzhHg75KVhYkSWFBf3HKCHstpaKg4nrx6LYZaEvz0TaTz+JQpYU2fNAgGFmVsK5xEzwFTGh3DAVAKONPw==", "cpu": [ "x64" ], @@ -226,9 +237,9 @@ } }, "node_modules/@cloudflare/vite-plugin/node_modules/miniflare/node_modules/@cloudflare/workerd-darwin-arm64": { - "version": "1.20250409.0", - "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20250409.0.tgz", - "integrity": "sha512-oLVcf+Y5Qun8JHcy1VcR/YnbA5U2ne0czh3XNhDqdHZFK8+vKeC7MnVPX+kEqQA3+uLcMM1/FsIDU1U4Na0h1g==", + "version": "1.20250604.0", + "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20250604.0.tgz", + "integrity": "sha512-hOiZZSop7QRQgGERtTIy9eU5GvPpIsgE2/BDsUdHMl7OBZ7QLniqvgDzLNDzj0aTkCldm9Yl/Z+C7aUgRdOccw==", "cpu": [ "arm64" ], @@ -242,9 +253,9 @@ } }, "node_modules/@cloudflare/vite-plugin/node_modules/miniflare/node_modules/@cloudflare/workerd-linux-64": { - "version": "1.20250409.0", - "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20250409.0.tgz", - "integrity": "sha512-D31B4kdC3a0RD5yfpdIa89//kGHbYsYihZmejm1k4S4NHOho3MUDHAEh4aHtafQNXbZdydGHlSyiVYjTdQ9ILQ==", + "version": "1.20250604.0", + "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20250604.0.tgz", + "integrity": "sha512-S0R9r7U4nv9qejYygQj01hArC4KUbQQ4u29rvegR0MGoXZY8AHIEuJxon0kE7r7aWFJxvl4W3tOH+5hwW51LYw==", "cpu": [ "x64" ], @@ -258,9 +269,9 @@ } }, "node_modules/@cloudflare/vite-plugin/node_modules/miniflare/node_modules/@cloudflare/workerd-linux-arm64": { - "version": "1.20250409.0", - "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20250409.0.tgz", - "integrity": "sha512-Sr59P0TREayil5OQ7kcbjuIn6L6OTSRLI91LKu0D8vi1hss2q9FUwBcwxg0+Yd/x+ty/x7IISiAK5QBkAMeITQ==", + "version": "1.20250604.0", + "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20250604.0.tgz", + "integrity": "sha512-BTFU/rXpNy03wpeueI2P7q1vVjbg2V6mCyyFGqDqMn2gSVYXH1G0zFNolV13PQXa0HgaqM6oYnqtAxluqbA+kQ==", "cpu": [ "arm64" ], @@ -274,9 +285,9 @@ } }, "node_modules/@cloudflare/vite-plugin/node_modules/miniflare/node_modules/@cloudflare/workerd-windows-64": { - "version": "1.20250409.0", - "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20250409.0.tgz", - "integrity": "sha512-dK9I8zBX5rR7MtaaP2AhICQTEw3PVzHcsltN8o46w7JsbYlMvFOj27FfYH5dhs3IahgmIfw2e572QXW2o/dbpg==", + "version": "1.20250604.0", + "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20250604.0.tgz", + "integrity": "sha512-tW/U9/qDmDZBeoEVcK5skb2uouVAMXMzt7o/uGvaIFLeZsQkOp4NBmvoQQd+nbOc7nVCJIwFoSMokd89AhzCkA==", "cpu": [ "x64" ], @@ -290,9 +301,9 @@ } }, "node_modules/@cloudflare/vite-plugin/node_modules/miniflare/node_modules/workerd": { - "version": "1.20250409.0", - "resolved": "https://registry.npmmirror.com/workerd/-/workerd-1.20250409.0.tgz", - "integrity": "sha512-hqjX9swiHvrkOI3jlH9lrZsZRRv9lddUwcMe8Ua76jnyQz+brybWznNjHu8U5oswwcrFwvky1A4CcLjcLY31gQ==", + "version": "1.20250604.0", + "resolved": "https://registry.npmmirror.com/workerd/-/workerd-1.20250604.0.tgz", + "integrity": "sha512-sHz9R1sxPpnyq3ptrI/5I96sYTMA2+Ljm75oJDbmEcZQwNyezpu9Emerzt3kzzjCJQqtdscGOidWv4RKGZXzAA==", "hasInstallScript": true, "license": "Apache-2.0", "bin": { @@ -302,30 +313,30 @@ "node": ">=16" }, "optionalDependencies": { - "@cloudflare/workerd-darwin-64": "1.20250409.0", - "@cloudflare/workerd-darwin-arm64": "1.20250409.0", - "@cloudflare/workerd-linux-64": "1.20250409.0", - "@cloudflare/workerd-linux-arm64": "1.20250409.0", - "@cloudflare/workerd-windows-64": "1.20250409.0" + "@cloudflare/workerd-darwin-64": "1.20250604.0", + "@cloudflare/workerd-darwin-arm64": "1.20250604.0", + "@cloudflare/workerd-linux-64": "1.20250604.0", + "@cloudflare/workerd-linux-arm64": "1.20250604.0", + "@cloudflare/workerd-windows-64": "1.20250604.0" } }, "node_modules/@cloudflare/vite-plugin/node_modules/unenv": { - "version": "2.0.0-rc.15", - "resolved": "https://registry.npmmirror.com/unenv/-/unenv-2.0.0-rc.15.tgz", - "integrity": "sha512-J/rEIZU8w6FOfLNz/hNKsnY+fFHWnu9MH4yRbSZF3xbbGHovcetXPs7sD+9p8L6CeNC//I9bhRYAOsBt2u7/OA==", + "version": "2.0.0-rc.17", + "resolved": "https://registry.npmmirror.com/unenv/-/unenv-2.0.0-rc.17.tgz", + "integrity": "sha512-B06u0wXkEd+o5gOCMl/ZHl5cfpYbDZKAT+HWTL+Hws6jWu7dCiqBBXXXzMFcFVJb8D4ytAnYmxJA83uwOQRSsg==", "license": "MIT", "dependencies": { "defu": "^6.1.4", "exsolve": "^1.0.4", "ohash": "^2.0.11", "pathe": "^2.0.3", - "ufo": "^1.5.4" + "ufo": "^1.6.1" } }, "node_modules/@cloudflare/vite-plugin/node_modules/workerd": { - "version": "1.20250413.0", - "resolved": "https://registry.npmmirror.com/workerd/-/workerd-1.20250413.0.tgz", - "integrity": "sha512-HZ594+Y9BfTz1i2BngnrJ4VNOKh2vOyEEBwhxEfgsCJq5OnmRttpze2JV6+tCs/kcx8VszqCB5lBU7o2KF9bKw==", + "version": "1.20250722.0", + "resolved": "https://registry.npmmirror.com/workerd/-/workerd-1.20250722.0.tgz", + "integrity": "sha512-qw5mh14GhmLqQ5mIJBwfv2ZI3TLXNTxfw3Mr0Q6z5KcopOLMiq9IijS/NPwTjl0RaRBMPoEAtRvlLsg3RyUgqQ==", "hasInstallScript": true, "license": "Apache-2.0", "optional": true, @@ -337,11 +348,11 @@ "node": ">=16" }, "optionalDependencies": { - "@cloudflare/workerd-darwin-64": "1.20250413.0", - "@cloudflare/workerd-darwin-arm64": "1.20250413.0", - "@cloudflare/workerd-linux-64": "1.20250413.0", - "@cloudflare/workerd-linux-arm64": "1.20250413.0", - "@cloudflare/workerd-windows-64": "1.20250413.0" + "@cloudflare/workerd-darwin-64": "1.20250722.0", + "@cloudflare/workerd-darwin-arm64": "1.20250722.0", + "@cloudflare/workerd-linux-64": "1.20250722.0", + "@cloudflare/workerd-linux-arm64": "1.20250722.0", + "@cloudflare/workerd-windows-64": "1.20250722.0" } }, "node_modules/@cloudflare/vite-plugin/node_modules/youch": { @@ -986,56 +997,6 @@ "node": ">=14" } }, - "node_modules/@hattip/adapter-node": { - "version": "0.0.49", - "resolved": "https://registry.npmmirror.com/@hattip/adapter-node/-/adapter-node-0.0.49.tgz", - "integrity": "sha512-BE+Y8Q4U0YcH34FZUYU4DssGKOaZLbNL0zK57Z41UZp0m9kS79ZIolBmjjpPhTVpIlRY3Rs+uhXbVXKk7mUcJA==", - "license": "MIT", - "dependencies": { - "@hattip/core": "0.0.49", - "@hattip/polyfills": "0.0.49", - "@hattip/walk": "0.0.49" - } - }, - "node_modules/@hattip/core": { - "version": "0.0.49", - "resolved": "https://registry.npmmirror.com/@hattip/core/-/core-0.0.49.tgz", - "integrity": "sha512-3/ZJtC17cv8m6Sph8+nw4exUp9yhEf2Shi7HK6AHSUSBtaaQXZ9rJBVxTfZj3PGNOR/P49UBXOym/52WYKFTJQ==" - }, - "node_modules/@hattip/headers": { - "version": "0.0.49", - "resolved": "https://registry.npmmirror.com/@hattip/headers/-/headers-0.0.49.tgz", - "integrity": "sha512-rrB2lEhTf0+MNVt5WdW184Ky706F1Ze9Aazn/R8c+/FMUYF9yjem2CgXp49csPt3dALsecrnAUOHFiV0LrrHXA==", - "license": "MIT", - "dependencies": { - "@hattip/core": "0.0.49" - } - }, - "node_modules/@hattip/polyfills": { - "version": "0.0.49", - "resolved": "https://registry.npmmirror.com/@hattip/polyfills/-/polyfills-0.0.49.tgz", - "integrity": "sha512-5g7W5s6Gq+HDxwULGFQ861yAnEx3yd9V8GDwS96HBZ1nM1u93vN+KTuwXvNsV7Z3FJmCrD/pgU8WakvchclYuA==", - "license": "MIT", - "dependencies": { - "@hattip/core": "0.0.49", - "@whatwg-node/fetch": "^0.9.22", - "node-fetch-native": "^1.6.4" - } - }, - "node_modules/@hattip/walk": { - "version": "0.0.49", - "resolved": "https://registry.npmmirror.com/@hattip/walk/-/walk-0.0.49.tgz", - "integrity": "sha512-AgJgKLooZyQnzMfoFg5Mo/aHM+HGBC9ExpXIjNqGimYTRgNbL/K7X5EM1kR2JY90BNKk9lo6Usq1T/nWFdT7TQ==", - "license": "MIT", - "dependencies": { - "@hattip/headers": "0.0.49", - "cac": "^6.7.14", - "mime-types": "^2.1.35" - }, - "bin": { - "hattip-walk": "cli.js" - } - }, "node_modules/@img/sharp-darwin-arm64": { "version": "0.33.5", "resolved": "https://registry.npmmirror.com/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.5.tgz", @@ -1422,10 +1383,10 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, - "node_modules/@kamilkisiela/fast-url-parser": { - "version": "1.1.4", - "resolved": "https://registry.npmmirror.com/@kamilkisiela/fast-url-parser/-/fast-url-parser-1.1.4.tgz", - "integrity": "sha512-gbkePEBupNydxCelHCESvFSFM8XPh1Zs/OAVRW/rKpEqPAl5PbOM90Si8mv9bvnR53uPD2s/FiRxdvSejpRJew==", + "node_modules/@mjackson/node-fetch-server": { + "version": "0.6.1", + "resolved": "https://registry.npmmirror.com/@mjackson/node-fetch-server/-/node-fetch-server-0.6.1.tgz", + "integrity": "sha512-9ZJnk/DJjt805uv5PPv11haJIW+HHf3YEEyVXv+8iLQxLD/iXA68FH220XoiTPBC4gCg5q+IMadDw8qPqlA5wg==", "license": "MIT" }, "node_modules/@react-email/render": { @@ -1932,34 +1893,6 @@ "url": "https://opencollective.com/vitest" } }, - "node_modules/@whatwg-node/fetch": { - "version": "0.9.23", - "resolved": "https://registry.npmmirror.com/@whatwg-node/fetch/-/fetch-0.9.23.tgz", - "integrity": "sha512-7xlqWel9JsmxahJnYVUj/LLxWcnA93DR4c9xlw3U814jWTiYalryiH1qToik1hOxweKKRLi4haXHM5ycRksPBA==", - "license": "MIT", - "dependencies": { - "@whatwg-node/node-fetch": "^0.6.0", - "urlpattern-polyfill": "^10.0.0" - }, - "engines": { - "node": ">=18.0.0" - } - }, - "node_modules/@whatwg-node/node-fetch": { - "version": "0.6.0", - "resolved": "https://registry.npmmirror.com/@whatwg-node/node-fetch/-/node-fetch-0.6.0.tgz", - "integrity": "sha512-tcZAhrpx6oVlkEsRngeTEEE7I5/QdLjeEz4IlekabGaESP7+Dkm/6a9KcF1KdCBB7mO9PXtBkwCuTCt8+UPg8Q==", - "license": "MIT", - "dependencies": { - "@kamilkisiela/fast-url-parser": "^1.1.4", - "busboy": "^1.6.0", - "fast-querystring": "^1.1.1", - "tslib": "^2.6.3" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/acorn": { "version": "8.14.0", "resolved": "https://registry.npmmirror.com/acorn/-/acorn-8.14.0.tgz", @@ -2028,21 +1961,11 @@ "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", "license": "ISC" }, - "node_modules/busboy": { - "version": "1.6.0", - "resolved": "https://registry.npmmirror.com/busboy/-/busboy-1.6.0.tgz", - "integrity": "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==", - "dependencies": { - "streamsearch": "^1.1.0" - }, - "engines": { - "node": ">=10.16.0" - } - }, "node_modules/cac": { "version": "6.7.14", "resolved": "https://registry.npmmirror.com/cac/-/cac-6.7.14.tgz", "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -2100,7 +2023,6 @@ "resolved": "https://registry.npmmirror.com/color/-/color-4.2.3.tgz", "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==", "license": "MIT", - "optional": true, "dependencies": { "color-convert": "^2.0.1", "color-string": "^1.9.0" @@ -2114,7 +2036,6 @@ "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "license": "MIT", - "optional": true, "dependencies": { "color-name": "~1.1.4" }, @@ -2126,15 +2047,13 @@ "version": "1.1.4", "resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "license": "MIT", - "optional": true + "license": "MIT" }, "node_modules/color-string": { "version": "1.9.1", "resolved": "https://registry.npmmirror.com/color-string/-/color-string-1.9.1.tgz", "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", "license": "MIT", - "optional": true, "dependencies": { "color-name": "^1.0.0", "simple-swizzle": "^0.2.2" @@ -2285,7 +2204,6 @@ "resolved": "https://registry.npmmirror.com/detect-libc/-/detect-libc-2.0.3.tgz", "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", "license": "Apache-2.0", - "optional": true, "engines": { "node": ">=8" } @@ -2640,27 +2558,12 @@ "integrity": "sha512-xsZH6PXaER4XoV+NiT7JHp1bJodJVT+cxeSH1G0f0tlT0lJqYuHUP3bUx2HtfTDvOagMINYp8rsqusxud3RXhw==", "license": "MIT" }, - "node_modules/fast-decode-uri-component": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/fast-decode-uri-component/-/fast-decode-uri-component-1.0.1.tgz", - "integrity": "sha512-WKgKWg5eUxvRZGwW8FvfbaH7AXSh2cL+3j5fMGzUMCxWBJ3dV3a7Wz8y2f/uQ0e3B6WmodD3oS54jTQ9HVTIIg==", - "license": "MIT" - }, "node_modules/fast-deep-equal": { "version": "2.0.1", "resolved": "https://registry.npmmirror.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", "integrity": "sha512-bCK/2Z4zLidyB4ReuIsvALH6w31YfAQDmXMqMx6FyfHqvBxtjC0eRumeSu4Bs3XtXwpyIywtSTrVT99BxY1f9w==", "license": "MIT" }, - "node_modules/fast-querystring": { - "version": "1.1.2", - "resolved": "https://registry.npmmirror.com/fast-querystring/-/fast-querystring-1.1.2.tgz", - "integrity": "sha512-g6KuKWmFXc0fID8WWH0jit4g0AGBoJhCkJMb1RmbsSEUNvQ+ZC8D6CUZ+GtF8nMzSPXnhiePyyqqipzNNEnHjg==", - "license": "MIT", - "dependencies": { - "fast-decode-uri-component": "^1.0.1" - } - }, "node_modules/fdir": { "version": "6.4.3", "resolved": "https://registry.npmmirror.com/fdir/-/fdir-6.4.3.tgz", @@ -2879,12 +2782,42 @@ "entities": "^4.4.0" } }, + "node_modules/i18next": { + "version": "25.3.2", + "resolved": "https://registry.npmmirror.com/i18next/-/i18next-25.3.2.tgz", + "integrity": "sha512-JSnbZDxRVbphc5jiptxr3o2zocy5dEqpVm9qCGdJwRNO+9saUJS0/u4LnM/13C23fUEWxAylPqKU/NpMV/IjqA==", + "funding": [ + { + "type": "individual", + "url": "https://locize.com" + }, + { + "type": "individual", + "url": "https://locize.com/i18next.html" + }, + { + "type": "individual", + "url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project" + } + ], + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.27.6" + }, + "peerDependencies": { + "typescript": "^5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/is-arrayish": { "version": "0.3.2", "resolved": "https://registry.npmmirror.com/is-arrayish/-/is-arrayish-0.3.2.tgz", "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", - "license": "MIT", - "optional": true + "license": "MIT" }, "node_modules/is-standalone-pwa": { "version": "0.1.1", @@ -3107,12 +3040,6 @@ } } }, - "node_modules/node-fetch-native": { - "version": "1.6.6", - "resolved": "https://registry.npmmirror.com/node-fetch-native/-/node-fetch-native-1.6.6.tgz", - "integrity": "sha512-8Mc2HhqPdlIfedsuZoc3yioPuzp6b+L5jRCRY1QzuWZh2EGJVQrGppC6V6cF0bLdbW0+O2YpqCA25aF/1lvipQ==", - "license": "MIT" - }, "node_modules/nth-check": { "version": "2.1.1", "resolved": "https://registry.npmmirror.com/nth-check/-/nth-check-2.1.1.tgz", @@ -3411,7 +3338,6 @@ "version": "7.7.1", "resolved": "https://registry.npmmirror.com/semver/-/semver-7.7.1.tgz", "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", - "devOptional": true, "license": "ISC", "bin": { "semver": "bin/semver.js" @@ -3426,7 +3352,6 @@ "integrity": "sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==", "hasInstallScript": true, "license": "Apache-2.0", - "optional": true, "dependencies": { "color": "^4.2.3", "detect-libc": "^2.0.3", @@ -3472,7 +3397,6 @@ "resolved": "https://registry.npmmirror.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz", "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", "license": "MIT", - "optional": true, "dependencies": { "is-arrayish": "^0.3.1" } @@ -3537,14 +3461,6 @@ "npm": ">=6" } }, - "node_modules/streamsearch": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/streamsearch/-/streamsearch-1.1.0.tgz", - "integrity": "sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==", - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/tinybench": { "version": "2.9.0", "resolved": "https://registry.npmmirror.com/tinybench/-/tinybench-2.9.0.tgz", @@ -3615,7 +3531,8 @@ "version": "2.8.1", "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.8.1.tgz", "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "license": "0BSD" + "license": "0BSD", + "optional": true }, "node_modules/ua-is-frozen": { "version": "0.1.2", @@ -3671,9 +3588,9 @@ } }, "node_modules/ufo": { - "version": "1.5.4", - "resolved": "https://registry.npmmirror.com/ufo/-/ufo-1.5.4.tgz", - "integrity": "sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==", + "version": "1.6.1", + "resolved": "https://registry.npmmirror.com/ufo/-/ufo-1.6.1.tgz", + "integrity": "sha512-9a4/uxlTWJ4+a5i0ooc1rU7C7YOw3wT+UGqdeNNHWnOF9qcMBgLRS+4IYUqbczewFx4mLEig6gawh7X6mFlEkA==", "license": "MIT" }, "node_modules/uhyphen": { @@ -3714,12 +3631,6 @@ "ufo": "^1.5.4" } }, - "node_modules/urlpattern-polyfill": { - "version": "10.0.0", - "resolved": "https://registry.npmmirror.com/urlpattern-polyfill/-/urlpattern-polyfill-10.0.0.tgz", - "integrity": "sha512-H/A06tKD7sS1O1X2SshBVeA5FLycRpjqiBeqGKmBwBDBy28EnRjORxTNe269KSSr5un5qyWi1iL61wLxpd+ZOg==", - "license": "MIT" - }, "node_modules/uuid": { "version": "11.1.0", "resolved": "https://registry.npmmirror.com/uuid/-/uuid-11.1.0.tgz", @@ -4344,19 +4255,19 @@ } }, "node_modules/wrangler": { - "version": "4.10.0", - "resolved": "https://registry.npmmirror.com/wrangler/-/wrangler-4.10.0.tgz", - "integrity": "sha512-fTE4hZ79msEUt8+HEjl/8Q72haCyzPLu4PgrU3L81ysmjrMEdiYfUPqnvCkBUVtJvrDNdctTEimkufT1Y0ipNg==", + "version": "4.20.0", + "resolved": "https://registry.npmmirror.com/wrangler/-/wrangler-4.20.0.tgz", + "integrity": "sha512-gxMLaSnYp3VLdGPZu4fc/9UlB7PnSVwni25v32NM9szG2yTt+gx5RunWzmoLplplIfEMkBuV3wA47vccNu7zcA==", "license": "MIT OR Apache-2.0", "dependencies": { "@cloudflare/kv-asset-handler": "0.4.0", - "@cloudflare/unenv-preset": "2.3.1", + "@cloudflare/unenv-preset": "2.3.2", "blake3-wasm": "2.1.5", - "esbuild": "0.24.2", - "miniflare": "4.20250409.0", + "esbuild": "0.25.4", + "miniflare": "4.20250604.1", "path-to-regexp": "6.3.0", - "unenv": "2.0.0-rc.15", - "workerd": "1.20250409.0" + "unenv": "2.0.0-rc.17", + "workerd": "1.20250604.0" }, "bin": { "wrangler": "bin/wrangler.js", @@ -4366,11 +4277,10 @@ "node": ">=18.0.0" }, "optionalDependencies": { - "fsevents": "~2.3.2", - "sharp": "^0.33.5" + "fsevents": "~2.3.2" }, "peerDependencies": { - "@cloudflare/workers-types": "^4.20250409.0" + "@cloudflare/workers-types": "^4.20250604.0" }, "peerDependenciesMeta": { "@cloudflare/workers-types": { @@ -4391,13 +4301,13 @@ } }, "node_modules/wrangler/node_modules/@cloudflare/unenv-preset": { - "version": "2.3.1", - "resolved": "https://registry.npmmirror.com/@cloudflare/unenv-preset/-/unenv-preset-2.3.1.tgz", - "integrity": "sha512-Xq57Qd+ADpt6hibcVBO0uLG9zzRgyRhfCUgBT9s+g3+3Ivg5zDyVgLFy40ES1VdNcu8rPNSivm9A+kGP5IVaPg==", + "version": "2.3.2", + "resolved": "https://registry.npmmirror.com/@cloudflare/unenv-preset/-/unenv-preset-2.3.2.tgz", + "integrity": "sha512-MtUgNl+QkQyhQvv5bbWP+BpBC1N0me4CHHuP2H4ktmOMKdB/6kkz/lo+zqiA4mEazb4y+1cwyNjVrQ2DWeE4mg==", "license": "MIT OR Apache-2.0", "peerDependencies": { - "unenv": "2.0.0-rc.15", - "workerd": "^1.20250320.0" + "unenv": "2.0.0-rc.17", + "workerd": "^1.20250508.0" }, "peerDependenciesMeta": { "workerd": { @@ -4406,9 +4316,9 @@ } }, "node_modules/wrangler/node_modules/@cloudflare/workerd-darwin-64": { - "version": "1.20250409.0", - "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20250409.0.tgz", - "integrity": "sha512-smA9yq77xsdQ1NMLhFz3JZxMHGd01lg0bE+X3dTFmIUs+hHskJ+HJ/IkMFInkCCeEFlUkoL4yO7ilaU/fin/xA==", + "version": "1.20250604.0", + "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20250604.0.tgz", + "integrity": "sha512-PI6AWAzhHg75KVhYkSWFBf3HKCHstpaKg4nrx6LYZaEvz0TaTz+JQpYU2fNAgGFmVsK5xEzwFTGh3DAVAKONPw==", "cpu": [ "x64" ], @@ -4422,9 +4332,9 @@ } }, "node_modules/wrangler/node_modules/@cloudflare/workerd-darwin-arm64": { - "version": "1.20250409.0", - "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20250409.0.tgz", - "integrity": "sha512-oLVcf+Y5Qun8JHcy1VcR/YnbA5U2ne0czh3XNhDqdHZFK8+vKeC7MnVPX+kEqQA3+uLcMM1/FsIDU1U4Na0h1g==", + "version": "1.20250604.0", + "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20250604.0.tgz", + "integrity": "sha512-hOiZZSop7QRQgGERtTIy9eU5GvPpIsgE2/BDsUdHMl7OBZ7QLniqvgDzLNDzj0aTkCldm9Yl/Z+C7aUgRdOccw==", "cpu": [ "arm64" ], @@ -4438,9 +4348,9 @@ } }, "node_modules/wrangler/node_modules/@cloudflare/workerd-linux-64": { - "version": "1.20250409.0", - "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20250409.0.tgz", - "integrity": "sha512-D31B4kdC3a0RD5yfpdIa89//kGHbYsYihZmejm1k4S4NHOho3MUDHAEh4aHtafQNXbZdydGHlSyiVYjTdQ9ILQ==", + "version": "1.20250604.0", + "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20250604.0.tgz", + "integrity": "sha512-S0R9r7U4nv9qejYygQj01hArC4KUbQQ4u29rvegR0MGoXZY8AHIEuJxon0kE7r7aWFJxvl4W3tOH+5hwW51LYw==", "cpu": [ "x64" ], @@ -4454,9 +4364,9 @@ } }, "node_modules/wrangler/node_modules/@cloudflare/workerd-linux-arm64": { - "version": "1.20250409.0", - "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20250409.0.tgz", - "integrity": "sha512-Sr59P0TREayil5OQ7kcbjuIn6L6OTSRLI91LKu0D8vi1hss2q9FUwBcwxg0+Yd/x+ty/x7IISiAK5QBkAMeITQ==", + "version": "1.20250604.0", + "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20250604.0.tgz", + "integrity": "sha512-BTFU/rXpNy03wpeueI2P7q1vVjbg2V6mCyyFGqDqMn2gSVYXH1G0zFNolV13PQXa0HgaqM6oYnqtAxluqbA+kQ==", "cpu": [ "arm64" ], @@ -4470,9 +4380,9 @@ } }, "node_modules/wrangler/node_modules/@cloudflare/workerd-windows-64": { - "version": "1.20250409.0", - "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20250409.0.tgz", - "integrity": "sha512-dK9I8zBX5rR7MtaaP2AhICQTEw3PVzHcsltN8o46w7JsbYlMvFOj27FfYH5dhs3IahgmIfw2e572QXW2o/dbpg==", + "version": "1.20250604.0", + "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20250604.0.tgz", + "integrity": "sha512-tW/U9/qDmDZBeoEVcK5skb2uouVAMXMzt7o/uGvaIFLeZsQkOp4NBmvoQQd+nbOc7nVCJIwFoSMokd89AhzCkA==", "cpu": [ "x64" ], @@ -4486,9 +4396,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/aix-ppc64": { - "version": "0.24.2", - "resolved": "https://registry.npmmirror.com/@esbuild/aix-ppc64/-/aix-ppc64-0.24.2.tgz", - "integrity": "sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA==", + "version": "0.25.4", + "resolved": "https://registry.npmmirror.com/@esbuild/aix-ppc64/-/aix-ppc64-0.25.4.tgz", + "integrity": "sha512-1VCICWypeQKhVbE9oW/sJaAmjLxhVqacdkvPLEjwlttjfwENRSClS8EjBz0KzRyFSCPDIkuXW34Je/vk7zdB7Q==", "cpu": [ "ppc64" ], @@ -4502,9 +4412,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/android-arm": { - "version": "0.24.2", - "resolved": "https://registry.npmmirror.com/@esbuild/android-arm/-/android-arm-0.24.2.tgz", - "integrity": "sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==", + "version": "0.25.4", + "resolved": "https://registry.npmmirror.com/@esbuild/android-arm/-/android-arm-0.25.4.tgz", + "integrity": "sha512-QNdQEps7DfFwE3hXiU4BZeOV68HHzYwGd0Nthhd3uCkkEKK7/R6MTgM0P7H7FAs5pU/DIWsviMmEGxEoxIZ+ZQ==", "cpu": [ "arm" ], @@ -4518,9 +4428,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/android-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmmirror.com/@esbuild/android-arm64/-/android-arm64-0.24.2.tgz", - "integrity": "sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==", + "version": "0.25.4", + "resolved": "https://registry.npmmirror.com/@esbuild/android-arm64/-/android-arm64-0.25.4.tgz", + "integrity": "sha512-bBy69pgfhMGtCnwpC/x5QhfxAz/cBgQ9enbtwjf6V9lnPI/hMyT9iWpR1arm0l3kttTr4L0KSLpKmLp/ilKS9A==", "cpu": [ "arm64" ], @@ -4534,9 +4444,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/android-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmmirror.com/@esbuild/android-x64/-/android-x64-0.24.2.tgz", - "integrity": "sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==", + "version": "0.25.4", + "resolved": "https://registry.npmmirror.com/@esbuild/android-x64/-/android-x64-0.25.4.tgz", + "integrity": "sha512-TVhdVtQIFuVpIIR282btcGC2oGQoSfZfmBdTip2anCaVYcqWlZXGcdcKIUklfX2wj0JklNYgz39OBqh2cqXvcQ==", "cpu": [ "x64" ], @@ -4550,9 +4460,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/darwin-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmmirror.com/@esbuild/darwin-arm64/-/darwin-arm64-0.24.2.tgz", - "integrity": "sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==", + "version": "0.25.4", + "resolved": "https://registry.npmmirror.com/@esbuild/darwin-arm64/-/darwin-arm64-0.25.4.tgz", + "integrity": "sha512-Y1giCfM4nlHDWEfSckMzeWNdQS31BQGs9/rouw6Ub91tkK79aIMTH3q9xHvzH8d0wDru5Ci0kWB8b3up/nl16g==", "cpu": [ "arm64" ], @@ -4566,9 +4476,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/darwin-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmmirror.com/@esbuild/darwin-x64/-/darwin-x64-0.24.2.tgz", - "integrity": "sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==", + "version": "0.25.4", + "resolved": "https://registry.npmmirror.com/@esbuild/darwin-x64/-/darwin-x64-0.25.4.tgz", + "integrity": "sha512-CJsry8ZGM5VFVeyUYB3cdKpd/H69PYez4eJh1W/t38vzutdjEjtP7hB6eLKBoOdxcAlCtEYHzQ/PJ/oU9I4u0A==", "cpu": [ "x64" ], @@ -4582,9 +4492,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/freebsd-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.2.tgz", - "integrity": "sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==", + "version": "0.25.4", + "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.4.tgz", + "integrity": "sha512-yYq+39NlTRzU2XmoPW4l5Ifpl9fqSk0nAJYM/V/WUGPEFfek1epLHJIkTQM6bBs1swApjO5nWgvr843g6TjxuQ==", "cpu": [ "arm64" ], @@ -4598,9 +4508,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/freebsd-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-x64/-/freebsd-x64-0.24.2.tgz", - "integrity": "sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==", + "version": "0.25.4", + "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-x64/-/freebsd-x64-0.25.4.tgz", + "integrity": "sha512-0FgvOJ6UUMflsHSPLzdfDnnBBVoCDtBTVyn/MrWloUNvq/5SFmh13l3dvgRPkDihRxb77Y17MbqbCAa2strMQQ==", "cpu": [ "x64" ], @@ -4614,9 +4524,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/linux-arm": { - "version": "0.24.2", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm/-/linux-arm-0.24.2.tgz", - "integrity": "sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==", + "version": "0.25.4", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm/-/linux-arm-0.25.4.tgz", + "integrity": "sha512-kro4c0P85GMfFYqW4TWOpvmF8rFShbWGnrLqlzp4X1TNWjRY3JMYUfDCtOxPKOIY8B0WC8HN51hGP4I4hz4AaQ==", "cpu": [ "arm" ], @@ -4630,9 +4540,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/linux-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm64/-/linux-arm64-0.24.2.tgz", - "integrity": "sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==", + "version": "0.25.4", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm64/-/linux-arm64-0.25.4.tgz", + "integrity": "sha512-+89UsQTfXdmjIvZS6nUnOOLoXnkUTB9hR5QAeLrQdzOSWZvNSAXAtcRDHWtqAUtAmv7ZM1WPOOeSxDzzzMogiQ==", "cpu": [ "arm64" ], @@ -4646,9 +4556,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/linux-ia32": { - "version": "0.24.2", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-ia32/-/linux-ia32-0.24.2.tgz", - "integrity": "sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==", + "version": "0.25.4", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-ia32/-/linux-ia32-0.25.4.tgz", + "integrity": "sha512-yTEjoapy8UP3rv8dB0ip3AfMpRbyhSN3+hY8mo/i4QXFeDxmiYbEKp3ZRjBKcOP862Ua4b1PDfwlvbuwY7hIGQ==", "cpu": [ "ia32" ], @@ -4662,9 +4572,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/linux-loong64": { - "version": "0.24.2", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-loong64/-/linux-loong64-0.24.2.tgz", - "integrity": "sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==", + "version": "0.25.4", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-loong64/-/linux-loong64-0.25.4.tgz", + "integrity": "sha512-NeqqYkrcGzFwi6CGRGNMOjWGGSYOpqwCjS9fvaUlX5s3zwOtn1qwg1s2iE2svBe4Q/YOG1q6875lcAoQK/F4VA==", "cpu": [ "loong64" ], @@ -4678,9 +4588,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/linux-mips64el": { - "version": "0.24.2", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-mips64el/-/linux-mips64el-0.24.2.tgz", - "integrity": "sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==", + "version": "0.25.4", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-mips64el/-/linux-mips64el-0.25.4.tgz", + "integrity": "sha512-IcvTlF9dtLrfL/M8WgNI/qJYBENP3ekgsHbYUIzEzq5XJzzVEV/fXY9WFPfEEXmu3ck2qJP8LG/p3Q8f7Zc2Xg==", "cpu": [ "mips64el" ], @@ -4694,9 +4604,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/linux-ppc64": { - "version": "0.24.2", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-ppc64/-/linux-ppc64-0.24.2.tgz", - "integrity": "sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==", + "version": "0.25.4", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-ppc64/-/linux-ppc64-0.25.4.tgz", + "integrity": "sha512-HOy0aLTJTVtoTeGZh4HSXaO6M95qu4k5lJcH4gxv56iaycfz1S8GO/5Jh6X4Y1YiI0h7cRyLi+HixMR+88swag==", "cpu": [ "ppc64" ], @@ -4710,9 +4620,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/linux-riscv64": { - "version": "0.24.2", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-riscv64/-/linux-riscv64-0.24.2.tgz", - "integrity": "sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==", + "version": "0.25.4", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-riscv64/-/linux-riscv64-0.25.4.tgz", + "integrity": "sha512-i8JUDAufpz9jOzo4yIShCTcXzS07vEgWzyX3NH2G7LEFVgrLEhjwL3ajFE4fZI3I4ZgiM7JH3GQ7ReObROvSUA==", "cpu": [ "riscv64" ], @@ -4726,9 +4636,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/linux-s390x": { - "version": "0.24.2", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-s390x/-/linux-s390x-0.24.2.tgz", - "integrity": "sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==", + "version": "0.25.4", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-s390x/-/linux-s390x-0.25.4.tgz", + "integrity": "sha512-jFnu+6UbLlzIjPQpWCNh5QtrcNfMLjgIavnwPQAfoGx4q17ocOU9MsQ2QVvFxwQoWpZT8DvTLooTvmOQXkO51g==", "cpu": [ "s390x" ], @@ -4742,9 +4652,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/linux-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-x64/-/linux-x64-0.24.2.tgz", - "integrity": "sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==", + "version": "0.25.4", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-x64/-/linux-x64-0.25.4.tgz", + "integrity": "sha512-6e0cvXwzOnVWJHq+mskP8DNSrKBr1bULBvnFLpc1KY+d+irZSgZ02TGse5FsafKS5jg2e4pbvK6TPXaF/A6+CA==", "cpu": [ "x64" ], @@ -4758,9 +4668,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/netbsd-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmmirror.com/@esbuild/netbsd-arm64/-/netbsd-arm64-0.24.2.tgz", - "integrity": "sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw==", + "version": "0.25.4", + "resolved": "https://registry.npmmirror.com/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.4.tgz", + "integrity": "sha512-vUnkBYxZW4hL/ie91hSqaSNjulOnYXE1VSLusnvHg2u3jewJBz3YzB9+oCw8DABeVqZGg94t9tyZFoHma8gWZQ==", "cpu": [ "arm64" ], @@ -4774,9 +4684,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/netbsd-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmmirror.com/@esbuild/netbsd-x64/-/netbsd-x64-0.24.2.tgz", - "integrity": "sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==", + "version": "0.25.4", + "resolved": "https://registry.npmmirror.com/@esbuild/netbsd-x64/-/netbsd-x64-0.25.4.tgz", + "integrity": "sha512-XAg8pIQn5CzhOB8odIcAm42QsOfa98SBeKUdo4xa8OvX8LbMZqEtgeWE9P/Wxt7MlG2QqvjGths+nq48TrUiKw==", "cpu": [ "x64" ], @@ -4790,9 +4700,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/openbsd-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmmirror.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.2.tgz", - "integrity": "sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A==", + "version": "0.25.4", + "resolved": "https://registry.npmmirror.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.4.tgz", + "integrity": "sha512-Ct2WcFEANlFDtp1nVAXSNBPDxyU+j7+tId//iHXU2f/lN5AmO4zLyhDcpR5Cz1r08mVxzt3Jpyt4PmXQ1O6+7A==", "cpu": [ "arm64" ], @@ -4806,9 +4716,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/openbsd-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmmirror.com/@esbuild/openbsd-x64/-/openbsd-x64-0.24.2.tgz", - "integrity": "sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==", + "version": "0.25.4", + "resolved": "https://registry.npmmirror.com/@esbuild/openbsd-x64/-/openbsd-x64-0.25.4.tgz", + "integrity": "sha512-xAGGhyOQ9Otm1Xu8NT1ifGLnA6M3sJxZ6ixylb+vIUVzvvd6GOALpwQrYrtlPouMqd/vSbgehz6HaVk4+7Afhw==", "cpu": [ "x64" ], @@ -4822,9 +4732,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/sunos-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmmirror.com/@esbuild/sunos-x64/-/sunos-x64-0.24.2.tgz", - "integrity": "sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==", + "version": "0.25.4", + "resolved": "https://registry.npmmirror.com/@esbuild/sunos-x64/-/sunos-x64-0.25.4.tgz", + "integrity": "sha512-Mw+tzy4pp6wZEK0+Lwr76pWLjrtjmJyUB23tHKqEDP74R3q95luY/bXqXZeYl4NYlvwOqoRKlInQialgCKy67Q==", "cpu": [ "x64" ], @@ -4838,9 +4748,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/win32-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmmirror.com/@esbuild/win32-arm64/-/win32-arm64-0.24.2.tgz", - "integrity": "sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==", + "version": "0.25.4", + "resolved": "https://registry.npmmirror.com/@esbuild/win32-arm64/-/win32-arm64-0.25.4.tgz", + "integrity": "sha512-AVUP428VQTSddguz9dO9ngb+E5aScyg7nOeJDrF1HPYu555gmza3bDGMPhmVXL8svDSoqPCsCPjb265yG/kLKQ==", "cpu": [ "arm64" ], @@ -4854,9 +4764,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/win32-ia32": { - "version": "0.24.2", - "resolved": "https://registry.npmmirror.com/@esbuild/win32-ia32/-/win32-ia32-0.24.2.tgz", - "integrity": "sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==", + "version": "0.25.4", + "resolved": "https://registry.npmmirror.com/@esbuild/win32-ia32/-/win32-ia32-0.25.4.tgz", + "integrity": "sha512-i1sW+1i+oWvQzSgfRcxxG2k4I9n3O9NRqy8U+uugaT2Dy7kLO9Y7wI72haOahxceMX8hZAzgGou1FhndRldxRg==", "cpu": [ "ia32" ], @@ -4870,9 +4780,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/win32-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.24.2.tgz", - "integrity": "sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==", + "version": "0.25.4", + "resolved": "https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.25.4.tgz", + "integrity": "sha512-nOT2vZNw6hJ+z43oP1SPea/G/6AbN6X+bGNhNuq8NtRHy4wsMhw765IKLNmnjek7GvjWBYQ8Q5VBoYTFg9y1UQ==", "cpu": [ "x64" ], @@ -4895,9 +4805,9 @@ } }, "node_modules/wrangler/node_modules/esbuild": { - "version": "0.24.2", - "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.24.2.tgz", - "integrity": "sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==", + "version": "0.25.4", + "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.25.4.tgz", + "integrity": "sha512-8pgjLUcUjcgDg+2Q4NYXnPbo/vncAY4UmyaCm0jZevERqCHZIaWwdJHkf8XQtu4AxSKCdvrUbT0XUr1IdZzI8Q==", "hasInstallScript": true, "license": "MIT", "bin": { @@ -4907,37 +4817,37 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.24.2", - "@esbuild/android-arm": "0.24.2", - "@esbuild/android-arm64": "0.24.2", - "@esbuild/android-x64": "0.24.2", - "@esbuild/darwin-arm64": "0.24.2", - "@esbuild/darwin-x64": "0.24.2", - "@esbuild/freebsd-arm64": "0.24.2", - "@esbuild/freebsd-x64": "0.24.2", - "@esbuild/linux-arm": "0.24.2", - "@esbuild/linux-arm64": "0.24.2", - "@esbuild/linux-ia32": "0.24.2", - "@esbuild/linux-loong64": "0.24.2", - "@esbuild/linux-mips64el": "0.24.2", - "@esbuild/linux-ppc64": "0.24.2", - "@esbuild/linux-riscv64": "0.24.2", - "@esbuild/linux-s390x": "0.24.2", - "@esbuild/linux-x64": "0.24.2", - "@esbuild/netbsd-arm64": "0.24.2", - "@esbuild/netbsd-x64": "0.24.2", - "@esbuild/openbsd-arm64": "0.24.2", - "@esbuild/openbsd-x64": "0.24.2", - "@esbuild/sunos-x64": "0.24.2", - "@esbuild/win32-arm64": "0.24.2", - "@esbuild/win32-ia32": "0.24.2", - "@esbuild/win32-x64": "0.24.2" + "@esbuild/aix-ppc64": "0.25.4", + "@esbuild/android-arm": "0.25.4", + "@esbuild/android-arm64": "0.25.4", + "@esbuild/android-x64": "0.25.4", + "@esbuild/darwin-arm64": "0.25.4", + "@esbuild/darwin-x64": "0.25.4", + "@esbuild/freebsd-arm64": "0.25.4", + "@esbuild/freebsd-x64": "0.25.4", + "@esbuild/linux-arm": "0.25.4", + "@esbuild/linux-arm64": "0.25.4", + "@esbuild/linux-ia32": "0.25.4", + "@esbuild/linux-loong64": "0.25.4", + "@esbuild/linux-mips64el": "0.25.4", + "@esbuild/linux-ppc64": "0.25.4", + "@esbuild/linux-riscv64": "0.25.4", + "@esbuild/linux-s390x": "0.25.4", + "@esbuild/linux-x64": "0.25.4", + "@esbuild/netbsd-arm64": "0.25.4", + "@esbuild/netbsd-x64": "0.25.4", + "@esbuild/openbsd-arm64": "0.25.4", + "@esbuild/openbsd-x64": "0.25.4", + "@esbuild/sunos-x64": "0.25.4", + "@esbuild/win32-arm64": "0.25.4", + "@esbuild/win32-ia32": "0.25.4", + "@esbuild/win32-x64": "0.25.4" } }, "node_modules/wrangler/node_modules/miniflare": { - "version": "4.20250409.0", - "resolved": "https://registry.npmmirror.com/miniflare/-/miniflare-4.20250409.0.tgz", - "integrity": "sha512-Hu02dYZvFR+MyrI57O6rSrOUTofcO9EIvcodgq2SAHzAeWSJw2E0oq9lylOrcckFwPMcwxUAb/cQN1LIoCyySw==", + "version": "4.20250604.1", + "resolved": "https://registry.npmmirror.com/miniflare/-/miniflare-4.20250604.1.tgz", + "integrity": "sha512-HJQ9YhH0F0fI73Vsdy3PNVau+PfHZYK7trI5WJEcbfl5HzqhMU0DRNtA/G5EXQgiumkjrmbW4Zh1DVTtsqICPg==", "license": "MIT", "dependencies": { "@cspotcode/source-map-support": "0.8.1", @@ -4945,9 +4855,10 @@ "acorn-walk": "8.3.2", "exit-hook": "2.2.1", "glob-to-regexp": "0.4.1", + "sharp": "^0.33.5", "stoppable": "1.1.0", "undici": "^5.28.5", - "workerd": "1.20250409.0", + "workerd": "1.20250604.0", "ws": "8.18.0", "youch": "3.3.4", "zod": "3.22.3" @@ -4960,22 +4871,22 @@ } }, "node_modules/wrangler/node_modules/unenv": { - "version": "2.0.0-rc.15", - "resolved": "https://registry.npmmirror.com/unenv/-/unenv-2.0.0-rc.15.tgz", - "integrity": "sha512-J/rEIZU8w6FOfLNz/hNKsnY+fFHWnu9MH4yRbSZF3xbbGHovcetXPs7sD+9p8L6CeNC//I9bhRYAOsBt2u7/OA==", + "version": "2.0.0-rc.17", + "resolved": "https://registry.npmmirror.com/unenv/-/unenv-2.0.0-rc.17.tgz", + "integrity": "sha512-B06u0wXkEd+o5gOCMl/ZHl5cfpYbDZKAT+HWTL+Hws6jWu7dCiqBBXXXzMFcFVJb8D4ytAnYmxJA83uwOQRSsg==", "license": "MIT", "dependencies": { "defu": "^6.1.4", "exsolve": "^1.0.4", "ohash": "^2.0.11", "pathe": "^2.0.3", - "ufo": "^1.5.4" + "ufo": "^1.6.1" } }, "node_modules/wrangler/node_modules/workerd": { - "version": "1.20250409.0", - "resolved": "https://registry.npmmirror.com/workerd/-/workerd-1.20250409.0.tgz", - "integrity": "sha512-hqjX9swiHvrkOI3jlH9lrZsZRRv9lddUwcMe8Ua76jnyQz+brybWznNjHu8U5oswwcrFwvky1A4CcLjcLY31gQ==", + "version": "1.20250604.0", + "resolved": "https://registry.npmmirror.com/workerd/-/workerd-1.20250604.0.tgz", + "integrity": "sha512-sHz9R1sxPpnyq3ptrI/5I96sYTMA2+Ljm75oJDbmEcZQwNyezpu9Emerzt3kzzjCJQqtdscGOidWv4RKGZXzAA==", "hasInstallScript": true, "license": "Apache-2.0", "bin": { @@ -4985,11 +4896,11 @@ "node": ">=16" }, "optionalDependencies": { - "@cloudflare/workerd-darwin-64": "1.20250409.0", - "@cloudflare/workerd-darwin-arm64": "1.20250409.0", - "@cloudflare/workerd-linux-64": "1.20250409.0", - "@cloudflare/workerd-linux-arm64": "1.20250409.0", - "@cloudflare/workerd-windows-64": "1.20250409.0" + "@cloudflare/workerd-darwin-64": "1.20250604.0", + "@cloudflare/workerd-darwin-arm64": "1.20250604.0", + "@cloudflare/workerd-linux-64": "1.20250604.0", + "@cloudflare/workerd-linux-arm64": "1.20250604.0", + "@cloudflare/workerd-windows-64": "1.20250604.0" } }, "node_modules/wrangler/node_modules/youch": { diff --git a/mail-worker/package.json b/mail-worker/package.json index d39b39b..cc09f8b 100644 --- a/mail-worker/package.json +++ b/mail-worker/package.json @@ -14,10 +14,11 @@ "wrangler": "^4.7.0" }, "dependencies": { - "@cloudflare/vite-plugin": "^1.0.5", + "@cloudflare/vite-plugin": "1.6.0", "dayjs": "^1.11.13", "drizzle-orm": "^0.42.0", "hono": "^4.7.5", + "i18next": "^25.3.2", "linkedom": "^0.18.10", "postal-mime": "^2.4.3", "resend": "^4.5.1", diff --git a/mail-worker/src/api/sys-email-api.js b/mail-worker/src/api/all-email-api.js similarity index 79% rename from mail-worker/src/api/sys-email-api.js rename to mail-worker/src/api/all-email-api.js index 8e91705..16862cb 100644 --- a/mail-worker/src/api/sys-email-api.js +++ b/mail-worker/src/api/all-email-api.js @@ -2,12 +2,12 @@ import app from '../hono/hono'; import emailService from '../service/email-service'; import result from '../model/result'; -app.get('/sysEmail/list',async (c) => { +app.get('/allEmail/list',async (c) => { const data = await emailService.allList(c, c.req.query()); return c.json(result.ok(data)); }) -app.delete('/sysEmail/delete',async (c) => { +app.delete('/allEmail/delete',async (c) => { const list = await emailService.physicsDelete(c, c.req.query()); return c.json(result.ok(list)); }) diff --git a/mail-worker/src/api/analysis-api.js b/mail-worker/src/api/analysis-api.js index c8abc7a..5dd734b 100644 --- a/mail-worker/src/api/analysis-api.js +++ b/mail-worker/src/api/analysis-api.js @@ -3,6 +3,6 @@ import analysisService from '../service/analysis-service'; import result from '../model/result'; app.get('/analysis/echarts', async (c) => { - const data = await analysisService.echarts(c); + const data = await analysisService.echarts(c, c.req.query()); return c.json(result.ok(data)); }) diff --git a/mail-worker/src/const/constant.js b/mail-worker/src/const/constant.js index eb97932..2e3f37b 100644 --- a/mail-worker/src/const/constant.js +++ b/mail-worker/src/const/constant.js @@ -6,7 +6,7 @@ const constant = { ATTACHMENT_PREFIX: 'attachments/', BACKGROUND_PREFIX: 'static/background/', ADMIN_ROLE: { - name: '超级管理员', + name: 'admin', sendCount: 0, sendType: 'count', accountCount: 0 diff --git a/mail-worker/src/dao/analysis-dao.js b/mail-worker/src/dao/analysis-dao.js index b46f9d1..6f7f100 100644 --- a/mail-worker/src/dao/analysis-dao.js +++ b/mail-worker/src/dao/analysis-dao.js @@ -46,53 +46,53 @@ const analysisDao = { return results[0]; }, - async userDayCount(c) { + async userDayCount(c, diffHours) { const { results } = await c.env.db.prepare(` SELECT - DATE(create_time,'+8 hours') AS date, + DATE(create_time,'+${diffHours} hours') AS date, COUNT(*) AS total FROM user WHERE - DATE(create_time,'+8 hours') BETWEEN DATE('now', '-15 days', '+8 hours') AND DATE('now','-1 day','+8 hours') + DATE(create_time,'+${diffHours} hours') BETWEEN DATE('now', '-15 days', '+${diffHours} hours') AND DATE('now','-1 day','+${diffHours} hours') GROUP BY - DATE(create_time,'+8 hours') + DATE(create_time,'+${diffHours} hours') ORDER BY date ASC `).all(); return results; }, - async receiveDayCount(c) { + async receiveDayCount(c, diffHours) { const { results } = await c.env.db.prepare(` SELECT - DATE(create_time,'+8 hours') AS date, + DATE(create_time,'+${diffHours} hours') AS date, COUNT(*) AS total FROM email WHERE - DATE(create_time,'+8 hours') BETWEEN DATE('now', '-15 days', '+8 hours') AND DATE('now','-1 day','+8 hours') + DATE(create_time,'+${diffHours} hours') BETWEEN DATE('now', '-15 days', '+${diffHours} hours') AND DATE('now','-1 day','+${diffHours} hours') AND type = 0 GROUP BY - DATE(create_time,'+8 hours') + DATE(create_time,'+${diffHours} hours') ORDER BY date ASC `).all(); return results; }, - async sendDayCount(c) { + async sendDayCount(c, diffHours) { const { results } = await c.env.db.prepare(` SELECT - DATE(create_time,'+8 hours') AS date, + DATE(create_time,'+${diffHours} hours') AS date, COUNT(*) AS total FROM email WHERE - DATE(create_time,'+8 hours') BETWEEN DATE('now', '-15 days', '+8 hours') AND DATE('now','-1 day','+8 hours') + DATE(create_time,'+${diffHours} hours') BETWEEN DATE('now', '-15 days', '+${diffHours} hours') AND DATE('now','-1 day','+${diffHours} hours') AND type = 1 GROUP BY - DATE(create_time,'+8 hours') + DATE(create_time,'+${diffHours} hours') ORDER BY date ASC `).all(); diff --git a/mail-worker/src/email/email.js b/mail-worker/src/email/email.js index ec878a7..8d8c49b 100644 --- a/mail-worker/src/email/email.js +++ b/mail-worker/src/email/email.js @@ -66,8 +66,8 @@ export async function email(message, env, ctx) { if (banEmailType === roleConst.banEmailType.ALL) return if (banEmailType === roleConst.banEmailType.CONTENT) { - email.html = '邮件内容已被移除' - email.text = '邮件内容已被移除' + email.html = 'removed' + email.text = 'removed' email.attachments = [] } @@ -80,8 +80,8 @@ export async function email(message, env, ctx) { if (banEmailType === roleConst.banEmailType.ALL) return if (banEmailType === roleConst.banEmailType.CONTENT) { - email.html = '邮件内容已被移除' - email.text = '邮件内容已被移除' + email.html = 'removed' + email.text = 'removed' email.attachments = [] } @@ -115,11 +115,6 @@ export async function email(message, env, ctx) { status: emailConst.status.SAVING }; - let headers = message.headers - - console.log(headers.get('X-Cf-Spamh-Score')) - console.log(email) - const attachments = []; const cidAttachments = []; diff --git a/mail-worker/src/hono/webs.js b/mail-worker/src/hono/webs.js index 1eae786..f0f8dba 100644 --- a/mail-worker/src/hono/webs.js +++ b/mail-worker/src/hono/webs.js @@ -13,7 +13,7 @@ import '../api/resend-api'; import '../api/user-api'; import '../api/my-api'; import '../api/role-api' -import '../api/sys-email-api' +import '../api/all-email-api' import '../api/init-api' import '../api/analysis-api' import '../api/reg-key-api' diff --git a/mail-worker/src/i18n/en.js b/mail-worker/src/i18n/en.js new file mode 100644 index 0000000..f6536f8 --- /dev/null +++ b/mail-worker/src/i18n/en.js @@ -0,0 +1,93 @@ +const en = { + IncorrectPwd: 'Incorrect password', + addAccountDisabled: 'Add email account function is disabled', + regDisabled: 'Sign up is disabled', + emptyEmail: 'Email cannot be empty', + notEmail: 'Invalid email', + notExistDomain: 'Email domain does not exist', + isDelAccount: 'This Email has been deleted', + isRegAccount: 'This Email is already signed up', + accountLimit: 'Email account limit reached', + delMyAccount: 'Cannot delete your own email account', + noUserAccount: 'This email does not belong to the current user', + usernameLengthLimit: 'Username length exceeds the limit', + noOsDomainSendPic: 'Cannot send body images: R2 domain not configured', + noOsSendPic: 'Cannot send body images: R2 object storage not configured', + noOsDomainSendAtt: 'Cannot send attachments: R2 domain not configured', + noOsSendAtt: 'Cannot send attachments: R2 object storage not configured', + disabledSend: 'Email sending is disabled', + noSeparateSend: 'Attachments are not supported in separate sending', + userNoSendTotal: 'User has no remaining sends', + daySendLimit: 'Daily send limit reached', + totalSendLimit: 'Total send limit reached', + daySendLack: 'Not enough remaining sends today', + totalSendLack: 'Not enough total remaining sends', + senderAccountNotExist: 'Sender email does not exist', + noResendToken: 'Resend API token not configured', + sendEmailNotCurUser: 'Sender email does not belong to current user', + notExistEmailReply: 'Mail does not exist and cannot be replied to', + pwdLengthLimit: 'Password length exceeds the limit', + emailLengthLimit: 'Email length exceeds the limit', + pwdMinLengthLimit: 'Password must be at least 6 characters', + notEmailDomain: 'Invalid email domain', + emptyRegKey: 'Invite code cannot be empty', + notExistRegKey: 'Invite code does not exist', + noRegKeyTotal: 'Invite code usage limit reached', + regKeyExpire: 'Invite code has expired', + emailAndPwdEmpty: 'Email and password cannot be empty', + notExistUser: 'Email does not exist', + isDelUser: 'This email has been deleted', + isBanUser: 'This email has been banned', + regKeyUseCount: 'Usage count cannot be empty', + emptyRegKeyExpire: 'Valid until time cannot be empty', + isExistRegKye: 'Invite code already exists', + roleNotExist: 'Role does not exist', + emptyRoleName: 'Role name cannot be empty', + roleNameExist: 'Role name already exists', + delDefRole: 'Default role cannot be deleted', + notJsonDomain: 'Environment variable "domain" must be in JSON format', + noOsUpBack: 'Cannot upload background: R2 object storage not configured', + noOsDomainUpBack: 'Cannot upload background: R2 domain not configured', + starNotExistEmail: 'Starred email does not exist', + emptyBotToken: 'Verification token cannot be empty', + botVerifyFail: 'Bot verification failed, please try again', + authExpired: 'Authentication expired, please log in again', + unauthorized: 'Unauthorized', + perms: { + "邮件": "Email", + "邮件发送": "Send email", + "邮件删除": "Delete email", + "邮箱侧栏": "Account", + "邮箱查看": "View account", + "邮箱添加": "Add account", + "邮箱删除": "Delete account", + "个人设置": "Settings", + "用户注销": "Delete user", + "分析页": "Analytics", + "数据查看": "View data", + "用户信息": "All users", + "用户查看": "View user", + "用户添加": "Add user", + "密码修改": "Change password", + "状态修改": "Change status", + "权限修改": "Change role", + "用户删除": "Delete user", + "邮件列表": "All mail", + "邮件查看": "View email", + "权限控制": "Role", + "身份查看": "View role", + "身份修改": "Change role", + "身份删除": "Delete role", + "注册密钥": "Invite code", + "密钥查看": "View code", + "密钥添加": "Add code", + "密钥删除": "Delete code", + "系统设置": "System settings", + "设置查看": "View settings", + "设置修改": "Change settings", + "物理清空": "Physical purge", + "发件重置": "Reset send count" + } +}; + +export default en; diff --git a/mail-worker/src/i18n/i18n.js b/mail-worker/src/i18n/i18n.js new file mode 100644 index 0000000..7d66262 --- /dev/null +++ b/mail-worker/src/i18n/i18n.js @@ -0,0 +1,30 @@ +import i18next from 'i18next'; +import zh from './zh.js' +import en from './en.js' +import app from '../hono/hono'; + +app.use('*', async (c, next) => { + const lang = c.req.header('accept-language').split('-')[0] + i18next.init({ + lng: lang, + }); + return await next() +}) + +const resources = { + en: { + translation: en + }, + zh: { + translation: zh, + }, +}; + +i18next.init({ + fallbackLng: 'en', + resources, +}); + +export const t = (key) => i18next.t(key) + +export default i18next; diff --git a/mail-worker/src/i18n/zh.js b/mail-worker/src/i18n/zh.js new file mode 100644 index 0000000..378c053 --- /dev/null +++ b/mail-worker/src/i18n/zh.js @@ -0,0 +1,93 @@ +const zh = { + IncorrectPwd: '密码输入错误', + addAccountDisabled: '添加邮箱功能已关闭', + regDisabled: '注册功能已关闭', + emptyEmail: '邮箱不能为空', + notEmail: '非法邮箱', + notExistDomain: '不存在的邮箱域名', + isDelAccount: '该邮箱已被注销', + isRegAccount: '该邮箱已被注册', + accountLimit: '添加邮箱数量到达限制', + delMyAccount: '不可以删除自己的邮箱', + noUserAccount: '该邮箱不属于当前用户', + usernameLengthLimit: '用户名长度超出限制', + noOsDomainSendPic: 'r2域名未配置不能发送正文图片', + noOsSendPic: 'r2对象存储未配置不能发送正文图片', + noOsDomainSendAtt: 'r2域名未配置不能发送附件', + noOsSendAtt: 'r2对象存储未配置不能发送附件', + disabledSend: '邮件发送功能已停用', + noSeparateSend: '分别发送暂时不支持附件', + userNoSendTotal: '用户无发送次数', + daySendLimit: '发送次数已到达每日限制', + totalSendLimit: '发送次数已到达限制', + daySendLack: '当日剩余发送次数不足', + totalSendLack: '剩余发送次数不足', + senderAccountNotExist: '发件人邮箱不存在', + noResendToken: 'resend密钥未配置', + sendEmailNotCurUser: '发件人邮箱非当前用户所有', + notExistEmailReply: '邮件不存在无法回复', + pwdLengthLimit: '密码长度超出限制', + emailLengthLimit: '邮箱长度超出限制', + pwdMinLengthLimit: '密码不能小于6位', + notEmailDomain: '非法邮箱域名', + emptyRegKey: '注册码不能为空', + notExistRegKey: '注册码不存在', + noRegKeyTotal: '注册码使用次数已耗尽', + regKeyExpire: '注册码已过期', + emailAndPwdEmpty: '邮箱和密码不能为空', + notExistUser: '该邮箱不存在', + isDelUser: '该邮箱已被注销', + isBanUser: '该邮箱已被禁用', + regKeyUseCount: '使用次数不能为空', + emptyRegKeyExpire: '有效时间不能为空', + isExistRegKye: '注册码已存在', + roleNotExist: '权限身份不存在', + emptyRoleName: '身份名不能为空', + roleNameExist: '身份名已存在', + delDefRole: '默认身份不能删除', + notJsonDomain: '环境变量domain必须是JSON类型', + noOsUpBack: 'r2对象存储未配置不能上传背景', + noOsDomainUpBack: 'r2域名未配置不上传背景', + starNotExistEmail: '星标的邮件不存在', + emptyBotToken: '验证token不能为空', + botVerifyFail: '人机验证失败,请重试', + authExpired: '身份认证失效,请重新登录', + unauthorized: '权限不足', + perms: { + "邮件": "邮件", + "邮件发送": "邮件发送", + "邮件删除": "邮件删除", + "邮箱侧栏": "邮箱侧栏", + "邮箱查看": "邮箱查看", + "邮箱添加": "邮箱添加", + "邮箱删除": "邮箱删除", + "个人设置": "个人设置", + "用户注销": "用户注销", + "分析页": "分析页", + "数据查看": "数据查看", + "用户信息": "用户信息", + "用户查看": "用户查看", + "用户添加": "用户添加", + "密码修改": "密码修改", + "状态修改": "状态修改", + "权限修改": "权限修改", + "用户删除": "用户删除", + "邮件列表": "全部邮件", + "邮件查看": "邮件查看", + "权限控制": "权限控制", + "身份查看": "身份查看", + "身份修改": "身份修改", + "身份删除": "身份删除", + "注册密钥": "注册密钥", + "密钥查看": "密钥查看", + "密钥添加": "密钥添加", + "密钥删除": "密钥删除", + "系统设置": "系统设置", + "设置查看": "设置查看", + "设置修改": "设置修改", + "物理清空": "物理清空", + '发件重置': '发件重置' + } +} + +export default zh diff --git a/mail-worker/src/init/init.js b/mail-worker/src/init/init.js index 0daaf1b..43872c5 100644 --- a/mail-worker/src/init/init.js +++ b/mail-worker/src/init/init.js @@ -16,10 +16,16 @@ const init = { await this.v1_3DB(c); await this.v1_3_1DB(c); await this.v1_4DB(c); + await this.v1_5DB(c); await settingService.refresh(c); return c.text('初始化成功'); }, + async v1_5DB(c) { + await c.env.db.prepare(`UPDATE perm SET perm_key = 'sys-email:list' WHERE perm_key = 'all-email:list'`).run(); + await c.env.db.prepare(`UPDATE perm SET perm_key = 'sys-email:delete' WHERE perm_key = 'all-email:delete'`).run(); + }, + async v1_4DB(c) { await c.env.db.prepare(` CREATE TABLE IF NOT EXISTS reg_key ( diff --git a/mail-worker/src/security/security.js b/mail-worker/src/security/security.js index c5ee74b..b0ec986 100644 --- a/mail-worker/src/security/security.js +++ b/mail-worker/src/security/security.js @@ -5,6 +5,7 @@ import KvConst from '../const/kv-const'; import dayjs from 'dayjs'; import userService from '../service/user-service'; import permService from '../service/perm-service'; +import { t } from '../i18n/i18n' import app from '../hono/hono'; const exclude = [ @@ -29,8 +30,8 @@ const requirePerms = [ '/role/tree', '/role/set', '/role/setDefault', - '/sysEmail/list', - '/sysEmail/delete', + '/allEmail/list', + '/allEmail/delete', '/setting/physicsDeleteAll', '/setting/setBackground', '/setting/set', @@ -67,8 +68,8 @@ const premKey = { 'user:set-status': ['/user/setStatus'], 'user:set-type': ['/user/setType'], 'user:delete': ['/user/delete'], - 'sys-email:query': ['/sysEmail/list'], - 'sys-email:delete': ['/sysEmail/delete'], + 'all-email:query': ['/allEmail/list'], + 'all-email:delete': ['/allEmail/delete'], 'setting:query': ['/setting/query'], 'setting:set': ['/setting/set', '/setting/setBackground'], 'setting:clean': ['/setting/physicsDeleteAll'], @@ -100,18 +101,18 @@ app.use('*', async (c, next) => { const result = await jwtUtils.verifyToken(c, jwt); if (!result) { - throw new BizError('身份认证失效,请重新登录', 401); + throw new BizError(t('authExpired'), 401); } const { userId, token } = result; const authInfo = await c.env.kv.get(KvConst.AUTH_INFO + userId, { type: 'json' }); if (!authInfo) { - throw new BizError('身份认证失效,请重新登录', 401); + throw new BizError(t('authExpired'), 401); } if (!authInfo.tokens.includes(token)) { - throw new BizError('身份认证失效,请重新登录', 401); + throw new BizError(t('authExpired'), 401); } const permIndex = requirePerms.findIndex(item => { @@ -129,7 +130,7 @@ app.use('*', async (c, next) => { }); if (userPermIndex === -1 && authInfo.user.email !== c.env.admin) { - throw new BizError('权限不足', 403); + throw new BizError(t('unauthorized'), 403); } } diff --git a/mail-worker/src/service/account-service.js b/mail-worker/src/service/account-service.js index ac63a92..580637e 100644 --- a/mail-worker/src/service/account-service.js +++ b/mail-worker/src/service/account-service.js @@ -10,37 +10,39 @@ import { isDel } from '../const/entity-const'; import settingService from './setting-service'; import turnstileService from './turnstile-service'; import roleService from './role-service'; +import { t } from '../i18n/i18n'; const accountService = { async add(c, params, userId) { if (!await settingService.isAddEmail(c)) { - throw new BizError('添加邮箱功能已关闭'); + throw new BizError(t('addAccountDisabled')); } let { email, token } = params; if (!email) { - throw new BizError('邮箱不能为空'); + throw new BizError(t('emptyEmail')); } if (!verifyUtils.isEmail(email)) { - throw new BizError('非法邮箱'); + throw new BizError(t('notEmail')); } if (!c.env.domain.includes(emailUtils.getDomain(email))) { - throw new BizError('不存在的邮箱域名'); + throw new BizError(t('notExistDomain')); } + const accountRow = await this.selectByEmailIncludeDelNoCase(c, email); if (accountRow && accountRow.isDel === isDel.DELETE) { - throw new BizError('该邮箱已被注销'); + throw new BizError(t('isDelAccount')); } if (accountRow) { - throw new BizError('该邮箱已被注册'); + throw new BizError(t('isRegAccount')); } const userRow = await userService.selectById(c, userId); @@ -48,7 +50,7 @@ const accountService = { if (roleRow.accountCount && userRow.email !== c.env.admin) { const userAccountCount = await accountService.countUserAccount(c, userId) - if(userAccountCount >= roleRow.accountCount) throw new BizError(`添加邮箱数量到达限制`, 403); + if(userAccountCount >= roleRow.accountCount) throw new BizError(t('accountLimit'), 403); } if (await settingService.isAddEmailVerify(c)) { @@ -109,11 +111,11 @@ const accountService = { const accountRow = await this.selectById(c, accountId); if (accountRow.email === user.email) { - throw new BizError('不可以删除自己的邮箱'); + throw new BizError(t('delMyAccount')); } if (accountRow.userId !== user.userId) { - throw new BizError('该邮箱不属于当前用户'); + throw new BizError(t('noUserAccount')); } await orm(c).update(account).set({ isDel: isDel.DELETE }).where( @@ -182,7 +184,7 @@ const accountService = { async setName(c, params, userId) { const { name, accountId } = params if (name.length > 30) { - throw new BizError('用户名长度超出限制'); + throw new BizError(t('usernameLengthLimit')); } await orm(c).update(account).set({name}).where(and(eq(account.userId, userId),eq(account.accountId, accountId))).run(); } diff --git a/mail-worker/src/service/analysis-service.js b/mail-worker/src/service/analysis-service.js index 66b0a7f..0a49c68 100644 --- a/mail-worker/src/service/analysis-service.js +++ b/mail-worker/src/service/analysis-service.js @@ -8,7 +8,21 @@ import dayjs from 'dayjs'; import { toUtc } from '../utils/date-uitil'; const analysisService = { - async echarts(c) { + async echarts(c, params) { + + + const { timeZone } = params; + + let utcDate = toUtc().startOf('day'); + + let localDate = utcDate.tz(timeZone); + + utcDate = dayjs(utcDate.format('YYYY-MM-DD HH:mm:ss')) + + localDate = dayjs(localDate.format('YYYY-MM-DD HH:mm:ss')) + + //获取时差 + const diffHours = localDate.diff(utcDate, 'hour',true); const [ @@ -30,17 +44,17 @@ const analysisService = { .limit(6), - analysisDao.userDayCount(c), - analysisDao.receiveDayCount(c), - analysisDao.sendDayCount(c), + analysisDao.userDayCount(c, diffHours), + analysisDao.receiveDayCount(c, diffHours), + analysisDao.sendDayCount(c, diffHours), c.env.kv.get(kvConst.SEND_DAY_COUNT + dayjs().format('YYYY-MM-DD')), ]); - const userDayCount = this.filterEmptyDay(userDayCountRaw); - const receiveDayCount = this.filterEmptyDay(receiveDayCountRaw); - const sendDayCount = this.filterEmptyDay(sendDayCountRaw); + const userDayCount = this.filterEmptyDay(userDayCountRaw, timeZone); + const receiveDayCount = this.filterEmptyDay(receiveDayCountRaw, timeZone); + const sendDayCount = this.filterEmptyDay(sendDayCountRaw, timeZone); const daySendTotal = daySendTotalRaw || 0; @@ -58,8 +72,8 @@ const analysisService = { }; }, - filterEmptyDay(data) { - const today = toUtc().tz('Asia/Shanghai').subtract(1, 'day'); + filterEmptyDay(data, timeZone) { + const today = toUtc().tz(timeZone).subtract(1, 'day'); const previousDays = Array.from({ length: 15 }, (_, i) => { return today.subtract(i, 'day').format('YYYY-MM-DD'); }).reverse(); diff --git a/mail-worker/src/service/email-service.js b/mail-worker/src/service/email-service.js index 1bb8f3c..a0caf43 100644 --- a/mail-worker/src/service/email-service.js +++ b/mail-worker/src/service/email-service.js @@ -16,6 +16,7 @@ import user from '../entity/user'; import starService from './star-service'; import dayjs from 'dayjs'; import kvConst from '../const/kv-const'; +import { t } from '../i18n/i18n' const emailService = { @@ -134,27 +135,27 @@ const emailService = { let { attDataList, html } = await attService.toImageUrlHtml(c, content, r2Domain); if (attDataList.length > 0 && !r2Domain) { - throw new BizError('r2域名未配置不能发送正文图片'); + throw new BizError(t('noOsDomainSendPic')); } if (attDataList.length > 0 && !c.env.r2) { - throw new BizError('r2对象存储未配置不能发送正文图片'); + throw new BizError(t('noOsSendPic')); } if (attachments.length > 0 && !r2Domain) { - throw new BizError('r2域名未配置不能发送附件'); + throw new BizError(t('noOsDomainSendAtt')); } if (attachments.length > 0 && !c.env.r2) { - throw new BizError('r2对象存储未配置不能发送附件'); + throw new BizError(t('noOsSendAtt')); } if (send === settingConst.send.CLOSE) { - throw new BizError('邮件发送功能已停用', 403); + throw new BizError(t('disabledSend'), 403); } if (attachments.length > 0 && manyType === 'divide') { - throw new BizError('分别发送暂时不支持附件'); + throw new BizError(t('noSeparateSend')); } @@ -164,17 +165,17 @@ const emailService = { if (c.env.admin !== userRow.email && roleRow.sendCount) { if (roleRow.sendCount < 0) { - throw new BizError('用户无发送次数', 403); + throw new BizError(t('userNoSendTotal'), 403); } if (userRow.sendCount >= roleRow.sendCount) { - if (roleRow.sendType === 'day') throw new BizError('发送次数已到达每日限制', 403); - if (roleRow.sendType === 'count') throw new BizError('发送次数已到达限制', 403); + if (roleRow.sendType === 'day') throw new BizError(t('daySendLimit'), 403); + if (roleRow.sendType === 'count') throw new BizError(t('totalSendLimit'), 403); } if (userRow.sendCount + receiveEmail.length > roleRow.sendCount) { - if (roleRow.sendType === 'day') throw new BizError('当日剩余发送次数不足', 403); - if (roleRow.sendType === 'count') throw new BizError('剩余发送次数不足', 403); + if (roleRow.sendType === 'day') throw new BizError(t('daySendLack'), 403); + if (roleRow.sendType === 'count') throw new BizError(t('totalSendLack'), 403); } } @@ -183,19 +184,19 @@ const emailService = { const accountRow = await accountService.selectById(c, accountId); if (!accountRow) { - throw new BizError('发件人邮箱不存在'); + throw new BizError(t('senderAccountNotExist')); } const domain = emailUtils.getDomain(accountRow.email); const resendToken = resendTokens[domain]; if (!resendToken) { - throw new BizError('resend密钥未配置'); + throw new BizError(t('noResendToken')); } if (accountRow.userId !== userId) { - throw new BizError('发件人邮箱非当前用户所有'); + throw new BizError(t('sendEmailNotCurUser')); } if (!name) { @@ -211,7 +212,7 @@ const emailService = { emailRow = await this.selectById(c, emailId); if (!emailRow) { - throw new BizError('邮件不存在无法回复'); + throw new BizError(t('notExistEmailReply')); } } diff --git a/mail-worker/src/service/login-service.js b/mail-worker/src/service/login-service.js index 3644deb..5a07f05 100644 --- a/mail-worker/src/service/login-service.js +++ b/mail-worker/src/service/login-service.js @@ -16,7 +16,8 @@ import turnstileService from './turnstile-service'; import roleService from './role-service'; import regKeyService from './reg-key-service'; import dayjs from 'dayjs'; -import { formatDetailDate, toUtc } from '../utils/date-uitil'; +import { toUtc } from '../utils/date-uitil'; +import { t } from '../i18n/i18n.js'; const loginService = { @@ -27,27 +28,27 @@ const loginService = { const {regKey, register} = await settingService.query(c) if (register === settingConst.register.CLOSE) { - throw new BizError('注册功能已关闭'); + throw new BizError(t('regDisabled')); } if (!verifyUtils.isEmail(email)) { - throw new BizError('非法邮箱'); + throw new BizError(t('notEmail')); } if (password.length > 30) { - throw new BizError('密码长度超出限制'); + throw new BizError(t('pwdLengthLimit')); } if (emailUtils.getName(email).length > 30) { - throw new BizError('邮箱长度超出限制'); + throw new BizError(t('emailLengthLimit')); } if (password.length < 6) { - throw new BizError('密码至少6位'); + throw new BizError(t('pwdMinLengthLimit')); } if (!c.env.domain.includes(emailUtils.getDomain(email))) { - throw new BizError('非法邮箱域名'); + throw new BizError(t('notEmailDomain')); } let type = null; @@ -68,11 +69,11 @@ const loginService = { const accountRow = await accountService.selectByEmailIncludeDelNoCase(c, email); if (accountRow && accountRow.isDel === isDel.DELETE) { - throw new BizError('该邮箱已被注销'); + throw new BizError(t('isDelUser')); } if (accountRow) { - throw new BizError('该邮箱已被注册'); + throw new BizError(t('isRegAccount')); } if (await settingService.isRegisterVerify(c)) { @@ -103,24 +104,24 @@ const loginService = { async handleOpenRegKey(c, regKey, code) { if (!code) { - throw new BizError('注册码不能为空'); + throw new BizError(t('emptyRegKey')); } const regKeyRow = await regKeyService.selectByCode(c, code); if (!regKeyRow) { - throw new BizError('注册码不存在'); + throw new BizError(t('notExistRegKey')); } if (regKeyRow.count <= 0) { - throw new BizError('注册码使用次数已耗尽'); + throw new BizError(t('noRegKeyCount')); } const today = toUtc().tz('Asia/Shanghai').startOf('day') const expireTime = toUtc(regKeyRow.expireTime).tz('Asia/Shanghai').startOf('day'); if (expireTime.isBefore(today)) { - throw new BizError('注册码已过期'); + throw new BizError(t('regKeyExpire')); } return { type: regKeyRow.roleId, regKeyId: regKeyRow.regKeyId }; @@ -153,25 +154,25 @@ const loginService = { const { email, password } = params; if (!email || !password) { - throw new BizError('邮箱和密码不能为空'); + throw new BizError(t('emailAndPwdEmpty')); } const userRow = await userService.selectByEmailIncludeDel(c, email); if (!userRow) { - throw new BizError('该用户不存在'); + throw new BizError(t('notExistUser')); } if(userRow.isDel === isDel.DELETE) { - throw new BizError('该用户已被注销'); + throw new BizError(t('isDelUser')); } if(userRow.status === userConst.status.BAN) { - throw new BizError('该用户已被禁用'); + throw new BizError(t('isBanUser')); } if (!await cryptoUtils.verifyPassword(password, userRow.salt, userRow.password)) { - throw new BizError('密码输入错误'); + throw new BizError(t('IncorrectPwd')); } const uuid = uuidv4(); diff --git a/mail-worker/src/service/perm-service.js b/mail-worker/src/service/perm-service.js index 53894fa..3f71fe8 100644 --- a/mail-worker/src/service/perm-service.js +++ b/mail-worker/src/service/perm-service.js @@ -5,13 +5,19 @@ import rolePerm from '../entity/role-perm'; import user from '../entity/user'; import role from '../entity/role'; import { permConst } from '../const/entity-const'; +import { t } from '../i18n/i18n' const permService = { async tree(c) { const pList = await orm(c).select().from(perm).where(eq(perm.pid, 0)).orderBy(asc(perm.sort)).all(); const cList = await orm(c).select().from(perm).where(ne(perm.pid, 0)).orderBy(asc(perm.sort)).all(); + cList.forEach(cItem => { + cItem.name = t('perms.' + cItem.name) + }) + pList.forEach(pItem => { + pItem.name = t('perms.' + pItem.name) pItem.children = cList.filter(cItem => cItem.pid === pItem.permId) }) return pList; diff --git a/mail-worker/src/service/reg-key-service.js b/mail-worker/src/service/reg-key-service.js index 84a1443..8e2878a 100644 --- a/mail-worker/src/service/reg-key-service.js +++ b/mail-worker/src/service/reg-key-service.js @@ -5,6 +5,8 @@ import roleService from './role-service'; import BizError from '../error/biz-error'; import { formatDetailDate, toUtc } from '../utils/date-uitil'; import userService from './user-service'; +import { t } from '../i18n/i18n.js'; + const regKeyService = { async add(c, params, userId) { @@ -12,26 +14,26 @@ const regKeyService = { let {code,roleId,count,expireTime} = params; if (!code) { - throw new BizError('注册码不能为空'); + throw new BizError(t('emptyRegKey')); } if (!count) { - throw new BizError('使用次数不能为空'); + throw new BizError(t('emptyRegKey')); } if (!expireTime) { - throw new BizError('有效时间不能为空'); + throw new BizError(t('emptyRegKeyExpire')); } const regKeyRow = await orm(c).select().from(regKey).where(eq(regKey.code, code)).get(); if (regKeyRow) { - throw new BizError('注册码已存在'); + throw new BizError(t('isExistRegKye')); } const roleRow = roleService.selectById(c, roleId); if (!roleRow) { - throw new BizError('权限身份不存在'); + throw new BizError(t('roleNotExist')); } expireTime = formatDetailDate(expireTime) diff --git a/mail-worker/src/service/role-service.js b/mail-worker/src/service/role-service.js index ba7bb6f..465021c 100644 --- a/mail-worker/src/service/role-service.js +++ b/mail-worker/src/service/role-service.js @@ -7,8 +7,8 @@ import perm from '../entity/perm'; import { permConst, roleConst } from '../const/entity-const'; import userService from './user-service'; import user from '../entity/user'; -import emailUtils from '../utils/email-utils'; import verifyUtils from '../utils/verify-utils'; +import { t } from '../i18n/i18n.js'; const roleService = { @@ -17,19 +17,19 @@ const roleService = { let { name, permIds, banEmail } = params; if (!name) { - throw new BizError('身份名不能为空'); + throw new BizError(t('emptyRoleName')); } let roleRow = await orm(c).select().from(role).where(eq(role.name, name)).get(); if (roleRow) { - throw new BizError('身份名已存在'); + throw new BizError(t('roleNameExist')); } const notEmailIndex = banEmail.findIndex(item => !verifyUtils.isEmail(item)) if (notEmailIndex > -1) { - throw new BizError('非法邮箱'); + throw new BizError(t('notEmail')); } banEmail = banEmail.join(',') @@ -67,7 +67,7 @@ const roleService = { let { name, permIds, roleId, banEmail } = params; if (!name) { - throw new BizError('名字不能为空'); + throw new BizError(t('emptyRoleName')); } delete params.isDefault @@ -75,7 +75,7 @@ const roleService = { const notEmailIndex = banEmail.findIndex(item => !verifyUtils.isEmail(item)) if (notEmailIndex > -1) { - throw new BizError('非法邮箱'); + throw new BizError(t('notEmail')); } banEmail = banEmail.join(',') @@ -97,11 +97,11 @@ const roleService = { const roleRow = await orm(c).select().from(role).where(eq(role.roleId, roleId)).get(); if (!roleRow) { - throw new BizError('身份不存在'); + throw new BizError(t('notExist')); } if (roleRow.isDefault) { - throw new BizError('默认身份不能删除'); + throw new BizError(t('delDefRole')); } const defRoleRow = await orm(c).select().from(role).where(eq(role.isDefault, roleConst.isDefault.OPEN)).get(); @@ -124,7 +124,7 @@ const roleService = { async setDefault(c, params) { const roleRow = await orm(c).select().from(role).where(eq(role.roleId, params.roleId)).get(); if (!roleRow) { - throw new BizError('身份不存在'); + throw new BizError(t('roleNotExist')); } await orm(c).update(role).set({ isDefault: 0 }).run(); await orm(c).update(role).set({ isDefault: 1 }).where(eq(role.roleId, params.roleId)).run(); diff --git a/mail-worker/src/service/setting-service.js b/mail-worker/src/service/setting-service.js index 1f128f7..79bb253 100644 --- a/mail-worker/src/service/setting-service.js +++ b/mail-worker/src/service/setting-service.js @@ -9,6 +9,7 @@ import accountService from './account-service'; import userService from './user-service'; import constant from '../const/constant'; import BizError from '../error/biz-error'; +import { t } from '../i18n/i18n' const settingService = { @@ -22,7 +23,7 @@ const settingService = { const setting = await c.env.kv.get(KvConst.SETTING, { type: 'json' }); let domainList = c.env.domain; if (typeof domainList === 'string') { - throw new BizError('环境变量domain必须是JSON类型'); + throw new BizError(t('notJsonDomain')); } domainList = domainList.map(item => '@' + item); setting.domainList = domainList; @@ -70,11 +71,11 @@ const settingService = { if (!c.env.r2) { - throw new BizError('r2对象存储未配置不能上传背景'); + throw new BizError(t('noOsUpBack')); } if (!settingRow.r2Domain) { - throw new BizError('r2域名未配置不上传背景'); + throw new BizError(t('noOsDomainUpBack')); } const { background } = params; diff --git a/mail-worker/src/service/star-service.js b/mail-worker/src/service/star-service.js index 4208c15..748de49 100644 --- a/mail-worker/src/service/star-service.js +++ b/mail-worker/src/service/star-service.js @@ -6,17 +6,17 @@ import { and, desc, eq, lt, sql, inArray } from 'drizzle-orm'; import email from '../entity/email'; import { isDel } from '../const/entity-const'; import attService from "./att-service"; - +import { t } from '../i18n/i18n' const starService = { async add(c, params, userId) { const { emailId } = params; const email = await emailService.selectById(c, emailId); if (!email) { - throw new BizError('星标的邮件不存在'); + throw new BizError(t('starNotExistEmail')); } if (!email.userId === userId) { - throw new BizError('星标的邮件非当前用户所有'); + throw new BizError(t('starNotExistEmail')); } const exist = await orm(c).select().from(star).where( and( diff --git a/mail-worker/src/service/turnstile-service.js b/mail-worker/src/service/turnstile-service.js index ffbd208..3e59e6d 100644 --- a/mail-worker/src/service/turnstile-service.js +++ b/mail-worker/src/service/turnstile-service.js @@ -1,12 +1,13 @@ import BizError from '../error/biz-error'; import settingService from './setting-service'; +import { t } from '../i18n/i18n' const turnstileService = { async verify(c, token) { if (!token) { - throw new BizError('验证token不能为空'); + throw new BizError(t('emptyBotToken')); } const settingRow = await settingService.query(c) @@ -26,7 +27,7 @@ const turnstileService = { const result = await res.json(); if (!result.success) { - throw new BizError('人机验证失败,请重试',400) + throw new BizError(t('botVerifyFail'),400) } } }; diff --git a/mail-worker/src/service/user-service.js b/mail-worker/src/service/user-service.js index 293c135..72108d9 100644 --- a/mail-worker/src/service/user-service.js +++ b/mail-worker/src/service/user-service.js @@ -2,7 +2,7 @@ import BizError from '../error/biz-error'; import accountService from './account-service'; import orm from '../entity/orm'; import user from '../entity/user'; -import { and, asc, count, desc, eq, inArray, like, sql } from 'drizzle-orm'; +import { and, asc, count, desc, eq, inArray, sql } from 'drizzle-orm'; import { emailConst, isDel, roleConst, userConst } from '../const/entity-const'; import kvConst from '../const/kv-const'; import KvConst from '../const/kv-const'; @@ -15,6 +15,7 @@ import roleService from './role-service'; import emailUtils from '../utils/email-utils'; import saltHashUtils from '../utils/crypto-utils'; import constant from '../const/constant'; +import { t } from '../i18n/i18n' const userService = { @@ -50,7 +51,7 @@ const userService = { const { password } = params; if (password < 6) { - throw new BizError('密码不能小于6位'); + throw new BizError(t('pwdMinLengthLimit')); } const { salt, hash } = await cryptoUtils.hashPassword(password); await orm(c).update(user).set({ password: hash, salt: salt }).where(eq(user.userId, userId)).run(); @@ -295,7 +296,7 @@ const userService = { const roleRow = await roleService.selectById(c, type); if (!roleRow) { - throw new BizError('身份不存在'); + throw new BizError(t('roleNotExist')); } await orm(c) @@ -327,27 +328,27 @@ const userService = { const { email, type, password } = params; if (!c.env.domain.includes(emailUtils.getDomain(email))) { - throw new BizError('非法邮箱域名'); + throw new BizError(t('notEmailDomain')); } if (password.length < 6) { - throw new BizError('密码必须大于6位'); + throw new BizError(t('pwdMinLengthLimit')); } const accountRow = await accountService.selectByEmailIncludeDel(c, email); if (accountRow && accountRow.isDel === isDel.DELETE) { - throw new BizError('该邮箱已被注销'); + throw new BizError(t('isDelUser')); } if (accountRow) { - throw new BizError('该邮箱已被注册'); + throw new BizError(t('isRegAccount')); } const role = roleService.selectById(c, type); if (!role) { - throw new BizError('权限身份不存在'); + throw new BizError(t('roleNotExist')); } const { salt, hash } = await saltHashUtils.hashPassword(password);