diff --git a/.gitignore b/.gitignore index fcf35f3..c488895 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ node_modules/ -gdurl.sqlite +gdurl.sqlite* config.js sa/*.json +backup/*.sqlite \ No newline at end of file diff --git a/backup-db.js b/backup-db.js new file mode 100644 index 0000000..1360c48 --- /dev/null +++ b/backup-db.js @@ -0,0 +1,14 @@ +#!/usr/bin/env node + +const path = require('path') +const {db} = require('./db') + +const filepath = path.join(__dirname, 'backup', `${Date.now()}.sqlite`) + +db.backup(filepath) + .then(() => { + console.log(filepath) + }) + .catch((err) => { + console.log('backup failed:', err) + }) \ No newline at end of file diff --git a/backup/.keep b/backup/.keep new file mode 100644 index 0000000..e69de29 diff --git a/bookmark.js b/bookmark.js new file mode 100644 index 0000000..b7d0f39 --- /dev/null +++ b/bookmark.js @@ -0,0 +1,28 @@ +const fs = require('fs') +const {db} = require('./db') + +const action = process.argv[2] || 'export' +const filepath = process.argv[3] || 'bookmarks.json' + +if (action === 'export') { + const bookmarks = db.prepare('select * from bookmark').all() + fs.writeFileSync(filepath, JSON.stringify(bookmarks)) + console.log('bookmarks exported', filepath) +} else if (action === 'import') { + let bookmarks = fs.readFileSync(filepath, 'utf8') + bookmarks = JSON.parse(bookmarks) + bookmarks.forEach(v => { + const {alias, target} = v + const exist = db.prepare('select alias from bookmark where alias=?').get(alias) + if (exist) { + db.prepare('update bookmark set target=? where alias=?').run(target, alias) + } else { + db.prepare('INSERT INTO bookmark (alias, target) VALUES (?, ?)').run(alias, target) + } + }) + console.log('bookmarks imported', bookmarks) +} else { + console.log('[help info]') + console.log('export: node bookmark.js export bm.json') + console.log('import: node bookmark.js import bm.json') +} diff --git a/clear-db.js b/clear-db.js new file mode 100644 index 0000000..7fd505c --- /dev/null +++ b/clear-db.js @@ -0,0 +1,8 @@ +const { db } = require('./db') + +const record = db.prepare('select count(*) as c from gd').get() +db.prepare('delete from gd').run() +console.log('已刪除', record.c, '項資料') + +db.exec('vacuum') +db.close() diff --git a/config.js b/config.js index a1341c9..61b02b8 100644 --- a/config.js +++ b/config.js @@ -1,27 +1,24 @@ -// 单次请求多少毫秒未响应以后超时(基准值,若连续超时则下次调整为上次的2倍) +// 單次請求多少毫秒無回應以後超時(基準值,若連續超時則下次調整為上次的2倍) const TIMEOUT_BASE = 7000 -// 最大超时设置,比如某次请求,第一次7s超时,第二次14s,第三次28s,第四次56s,第五次不是112s而是60s,后续同理 +// 最大超時設置,比如某次請求,第一次7s超時,第二次14s,第三次28s,第四次56s,第五次不是112s而是60s,後續同理 const TIMEOUT_MAX = 60000 -const LOG_DELAY = 5000 // 日志输出时间间隔,单位毫秒 -const PAGE_SIZE = 1000 // 每次网络请求读取目录下的文件数,数值越大,越有可能超时,不得超过1000 +const LOG_DELAY = 5000 // 日志輸出時間間隔,單位毫秒 +const PAGE_SIZE = 1000 // 每次網絡請求讀取目錄下的文件數,數值越大,越有可能超時,不得超過1000 -const RETRY_LIMIT = 7 // 如果某次请求失败,允许其重试的最大次数 -const PARALLEL_LIMIT = 20 // 网络请求的并行数量,可根据网络环境调整 +const RETRY_LIMIT = 7 // 如果某次請求失敗,允許其重試的最大次數 +const PARALLEL_LIMIT = 20 // 網絡請求的並行數量,可根據網絡環境調整(即多線程之線程數量) -const DEFAULT_TARGET = '' // 必填,拷贝默认目的地ID,如果不指定target,则会复制到此处,建议填写团队盘ID +const DEFAULT_TARGET = '' // 必填,copy時預設的dstID,建議填寫小組雲端硬碟ID -const AUTH = { // 如果您拥有service account的json授权文件,可将其拷贝至 sa 目录中以代替 client_id/secret/refrest_token +const AUTH = { // 如果您擁有SA的json授權文件,可將其拷貝至 sa 目錄中以代替 client_id/secret/refrest_token 這裡建議使用自己的client_id, 具體參考說明文件#個人帳號配置 client_id: 'your_client_id', client_secret: 'your_client_secret', refresh_token: 'your_refrest_token', expires: 0, // 可以留空 access_token: '', // 可以留空 - tg_token: 'bot_token', // 你的 telegram robot 的 token,获取方法参见 https://core.telegram.org/bots#6-botfather - tg_whitelist: ['your_tg_username'] // 你的tg username(t.me/username),bot只会执行这个列表里的用户所发送的指令 + tg_token: 'bot_token', // 你的 telegram robot 的 token,獲取方法參見 https://core.telegram.org/bots#6-botfather + tg_whitelist: ['your_tg_username'] // 你的tg username(t.me/username),bot只會執行這個列表中的用戶所發送的指令 } -//-------------------MOD------------------- -const SA_PATH = '../sa' //sa路徑配置, 給定絕對路徑或是以src為當前路徑給定相對路徑, 預設為'../sa' -const BUTTON_LEVEL = 1 //預設為1, 填入大於2皆視為2 -module.exports = { AUTH, PARALLEL_LIMIT, RETRY_LIMIT, TIMEOUT_BASE, TIMEOUT_MAX, LOG_DELAY, PAGE_SIZE, DEFAULT_TARGET, SA_PATH, BUTTON_LEVEL } +module.exports = { AUTH, PARALLEL_LIMIT, RETRY_LIMIT, TIMEOUT_BASE, TIMEOUT_MAX, LOG_DELAY, PAGE_SIZE, DEFAULT_TARGET } diff --git a/config_mod.js b/config_mod.js new file mode 100644 index 0000000..579e64f --- /dev/null +++ b/config_mod.js @@ -0,0 +1,5 @@ +//-------------------MOD------------------- +const SA_PATH = '../sa' //sa路徑配置, 給定絕對路徑或是以src為當前路徑給定相對路徑, 預設為'../sa' +const BUTTON_LEVEL = 1 //預設為1, 填入大於2皆視為2 + +module.exports = { SA_PATH, BUTTON_LEVEL } \ No newline at end of file diff --git a/copy b/copy index cc42fe1..909f641 100755 --- a/copy +++ b/copy @@ -5,19 +5,21 @@ const bytes = require('bytes') const { argv } = require('yargs') .usage('用法: ./$0 [options]\ntarget id可选,不填则使用config.js里的DEFAULT_TARGET') .alias('u', 'update') - .describe('u', '不使用本地缓存,强制从线上获取源文件夹信息') + .describe('u', '不使用本地快取,則無視快取記錄強制從線上獲取源資料夾資訊') + .alias('y', 'yes') + .describe('yes', '如果發現拷貝紀錄,直接繼續上次的進度') .alias('f', 'file') - .describe('f', '复制单个文件') + .describe('f', '複製單一文件') .alias('n', 'name') - .describe('n', '给目标文件夹重命名,不填则保留原始目录名') + .describe('n', '給目標資料夾重新命名,不填則保留原始目錄名') .alias('N', 'not_teamdrive') - .describe('N', '如果不是团队盘链接,可以加上此参数以提高接口查询效率,降低延迟') + .describe('N', '如果不是小組雲端硬碟連結,可以加上此参數以提高接口查詢效率,降低延遲') .alias('s', 'size') - .describe('s', '不填默认拷贝全部文件,如果设置了这个值,则过滤掉小于这个size的文件,必须以b结尾,比如10mb') + .describe('s', '不填則預設拷貝全部文件,如果設置了这個值,則過濾掉小於这個大小的檔案,必須以b為結尾,比如10mb') .alias('S', 'service_account') - .describe('S', '指定使用service account进行操作,前提是必须在 ./sa 目录下放置json授权文件,请确保sa帐号拥有操作权限。') + .describe('S', '指定使用service account進行操作,前提是必須在 ./sa 目錄下放置json授權文件,請確認sa帳號擁有相關操作權限。') .alias('D', 'dncnr') - .describe('D', 'do not create new root, 不在目的地创建同名文件夹,直接将源文件夹中的文件原样复制到目的文件夹中') + .describe('D', 'do not create new root, 不在目的地創建同名資料夾,直接將來源資料夾中的文件原樣複製到目的資料夾中') .help('h') .alias('h', 'help') @@ -33,19 +35,19 @@ if (validate_fid(source)) { if (!validate_fid(target)) throw new Error('target id 格式不正确') return copy_file(source, target, service_account).then(r => { const link = 'https://drive.google.com/drive/folders/' + target - console.log('任务完成,文件所在位置:\n', link) + console.log('任務完成,文件所在位置:\n', link) }).catch(console.error) } let min_size if (size) { - console.log(`不复制大小低于 ${size} 的文件`) + console.log(`不複製大小低於 ${size} 的文件`) min_size = bytes.parse(size) } copy({ source, target, name, min_size, update, not_teamdrive, service_account, dncnr }).then(folder => { if (!folder) return const link = 'https://drive.google.com/drive/folders/' + folder.id - console.log('\n任务完成,新文件夹链接:\n', link) + console.log('\n任務完成,新資料夾連結:\n', link) }) } else { - console.warn('目录ID缺失或格式错误') + console.warn('無目錄ID或格式錯誤') } diff --git a/count b/count index 332e758..e2d4131 100755 --- a/count +++ b/count @@ -1,23 +1,23 @@ #!/usr/bin/env node const { argv } = require('yargs') - .usage('用法: ./$0 <目录ID> [options]') - .example('./$0 1ULY8ISgWSOVc0UrzejykVgXfVL_I4r75', '获取 https://drive.google.com/drive/folders/1ULY8ISgWSOVc0UrzejykVgXfVL_I4r75 内包含的的所有文件的统计信息') - .example('./$0 root -s size -t html -o out.html', '获取个人盘根目录统计信息,结果以HTML表格输出,根据总大小逆序排列,保存到本目录下的out.html文件中(不存在则新建,存在则覆盖)') - .example('./$0 root -s name -t json -o out.json', '获取个人盘根目录统计信息,结果以JSON格式输出,根据文件扩展名排序,保存到本目录下的out.json文件中') - .example('./$0 root -t all -o all.json', '获取个人盘根目录统计信息,将所有文件信息(包括文件夹)以JSON格式输出,保存到本目录下的all.json文件中') + .usage('用法: ./$0 <目錄ID> [options]') + .example('./$0 1ULY8ISgWSOVc0UrzejykVgXfVL_I4r75', '獲取 https://drive.google.com/drive/folders/1ULY8ISgWSOVc0UrzejykVgXfVL_I4r75 内包含的所有文件的統計資訊') + .example('./$0 root -s size -t html -o out.html', '獲取個人空間根目錄統計資訊,結果以HTML表格輸出,根據總大小降冪排列,保存到本目錄下的out.html文件中(不存在則新建,存在的覆蓋)') + .example('./$0 root -s name -t json -o out.json', '獲取個人空間根目錄統計資訊,結果以JSON格式輸出,根據文件扩展名排序,保存到本目录下的out.json文件中') + .example('./$0 root -t all -o all.json', '獲取個人空間根目錄統計資訊,將所有文件資訊(包括資料夾)以JSON格式輸出,保存到本目錄下的all.json文件中') .alias('u', 'update') - .describe('u', '强制从线上获取信息(无视是否存在本地缓存)') + .describe('u', '強制從線上獲取資訊(不論是否存在本地快取)') .alias('N', 'not_teamdrive') - .describe('N', '如果不是团队盘链接,可以加上此参数以提高接口查询效率,降低延迟。如果要统计的是个人盘且./sa目录下的service account没有相关权限,请确保加上此参数以使用个人的auth信息进行查询') + .describe('N', '如果不是小組雲端硬碟連結,可以加上此参數以提高接口查詢效率,降低延遲。如果要統計的是帳號下之個人空間,且./sa目錄下的service account沒有相關權限,請加上此參數以使用個人的auth身份進行查詢') .alias('S', 'service_account') - .describe('S', '指定使用service account进行统计,前提是必须在sa目录下放置SA json文件') + .describe('S', '指定使用service account進行統計,前提是必須在sa路徑下放置SA json文件') .alias('s', 'sort') - .describe('s', '统计结果排序方法,可选值 name 或 size,不填则默认根据文件数量逆序排列') + .describe('s', '統計結果排序方法,可選值如下: name 或 size,不填則預設根據文件數量降冪排列') .alias('t', 'type') - .describe('t', '统计结果输出类型,可选值 html/json/all,all表示输出所有文件json数据,最好搭配 -o 使用。不填则默认输出命令行表格') + .describe('t', '統計結果輸出類型,可選值如下: html/tree/json/all,all表示輸出所有文件json數據,最好與 -o 一起使用。不填則預設輸出命令列表格') .alias('o', 'output') - .describe('o', '统计结果输出文件,适合搭配 -t 使用') + .describe('o', '統計結果輸出文件,適合與 -t 一起使用') .help('h') .alias('h', 'help') @@ -27,5 +27,5 @@ if (validate_fid(fid)) { const { update, sort, type, output, not_teamdrive, service_account } = argv count({ fid, update, sort, type, output, not_teamdrive, service_account }).catch(console.error) } else { - console.warn('目录ID缺失或格式错误') + console.warn('無目錄ID或格式錯誤') } diff --git a/dedupe b/dedupe index c096070..0a9bb1e 100755 --- a/dedupe +++ b/dedupe @@ -1,11 +1,13 @@ #!/usr/bin/env node const { argv } = require('yargs') - .usage('用法: ./$0 [options]') + .usage('用法: ./$0 [options]') + .alias('y', 'yes') + .describe('yes', '如果發現重複項目,直接刪除') .alias('u', 'update') - .describe('u', '不使用本地缓存,强制从线上获取源文件夹信息') + .describe('u', '不使用本地快取,則無視快取記錄強制從線上獲取源資料夾資訊') .alias('S', 'service_account') - .describe('S', '使用service account进行操作,前提是必须在 ./sa 目录下放置sa授权json文件') + .describe('S', '使用service account進行操作,前提是必須在 ./sa 目錄下存放sa授權json文件') .help('h') .alias('h', 'help') @@ -17,8 +19,8 @@ if (validate_fid(fid)) { dedupe({ fid, update, service_account }).then(info => { if (!info) return const { file_count, folder_count } = info - console.log('任务完成,共删除文件数:', file_count, '目录数:', folder_count) + console.log('任務完成,共刪除檔案數:', file_count, '目錄數:', folder_count) }) } else { - console.warn('目录ID缺失或格式错误') + console.warn('無目錄ID或格式錯誤') } diff --git a/gdutilsinstall_cf.sh b/gdutilsinstall_cf.sh new file mode 100644 index 0000000..617a813 --- /dev/null +++ b/gdutilsinstall_cf.sh @@ -0,0 +1,245 @@ +#!/bin/bash +echo +echo -e "\033[1;32m===== <> =====\033[0m" +echo -e "\033[1;32m---------------[ v2.1 by oneking ]---------------\033[0m" +echo -e "\033[32m 01.\033[0m 本脚本是针对TG大神@viegg的gdutils项目一键部署脚本;" +echo -e "\033[32m 02.\033[0m 脚本包括“TD盘VPS上查询转存部署”和“Telegram机器人部署”两部分" +echo -e "\033[32m 03.\033[0m 本脚本适应CentOS/Debian/Ubuntu三种操作系统,自动识别、自动选择对应分支一键安装部署" +echo -e "\033[32m 04.\033[0m 三步即可完成部署:上传脚本到VPS → 设置脚本执行权限 → 运行" +echo -e "\033[32m 05.\033[0m 准备工作一:在TG上注册好机器人取得并记录下该机器人TOKEN" +echo -e "\033[32m 06.\033[0m 准备工作二:拥有一个域名绑定到cloudflare解析到该机器人所在服务器IP" +echo -e "\033[32m 07.\033[0m 准备工作三:向机器人@userinfobot获取个人TG账号ID并记录" +echo -e "\033[32m 08.\033[0m 准备工作四:注册好一个Google team drive加入sa并记录下该盘ID" +echo -e "\033[32m 09.\033[0m 经测试可用完美安装系统:Centos 7/8 debian 9/10 ubuntu 16.04/18.04/19.10/20.04" +echo -e "\033[32m 10.\033[0m 部署过程中有任何问题请把“错误截图”“部署VPS系统名称版本”信息发给TG:onekings 或 vitaminor@gmail.com" +echo -e "\033[1;32m------------------------------------------------\033[0m" +read -s -n1 -p "★★★ 如已做好以上[5/6/7/8]准备或不需要安装Telegram机器人请按任意键开始部署,如未做好准备请按“Ctrl+c”终止脚本 ★★★" +echo +echo -e "\033[1;32m------------------------------------------------\033[0m" + +# 识别操作系统 +aNAME="$(uname -a)" +bNAME="$(cat /proc/version)" +cNAME="$(lsb_release -a)" +if [ -f "/etc/redhat-release" ]; then + if [[ $(cat /etc/redhat-release) =~ "CentOS" ]]; then + os="CentOS" + fi +elif [ "$aNAME"=~"Debian" -o "$bNAME"=~"Debian" -o "$cNAME"=~"Debian" ]; then + os="Debian" +elif [ "$aNAME"=~"Ubuntu" -o "$bNAME"=~"Ubuntu" -o "$cNAME"=~"Ubuntu" ]; then + os="Debian" +elif [ "$aNAME"=~"CentOS" -o "$bNAME"=~"CentOS" -o "$cNAME"=~"CentOS" ]; then + os="CentOS" +elif [ "$aNAME"=~"Darwin" -o "$bNAME"=~"Darwin" -o "$cNAME"=~"Darwin" ]; then + os="mac" +else + os="$bNAME" +fi + +# 需要安装的软件工具及依赖 +insofts=(epel-release update upgrade wget curl git unzip zip python3-distutils python3 python3-pip) + +#根据操作系统设置变量 +if [[ "$os" = "Debian" ]]; then + cmd_install="apt-get" #安装命令 + cmd_install_rely="build-essential" #c++编译环境 + nodejs_curl="https://deb.nodesource.com/setup_10.x" #nodejs下载链接 + cmd_install_rpm_build="" #安装rpm-build + nginx_conf="/etc/nginx/sites-enabled/" #nginx配置文件存放路径 + rm_nginx_default="rm -f /etc/nginx/sites-enabled/default" #删除default + echo + echo -e "\033[1;32m★★★★★ 您的操作系统为Debian,即将为你开始部署gdutils项目 ★★★★★\033[0m" +elif [[ "$os" = "Ubuntu" ]]; then + cmd_install="sudo apt-get" + cmd_install_rely="build-essential" + nodejs_curl="https://deb.nodesource.com/setup_10.x" + cmd_install_rpm_build="" + nginx_conf="/etc/nginx/sites-enabled/" + rm_nginx_default="rm -f /etc/nginx/sites-enabled/default" + echo + echo -e "\033[1;32m★★★★★ 您的操作系统为Ubuntu,即将为你开始部署gdutils项目 ★★★★★\033[0m" +elif [[ "$os" = "CentOS" ]]; then + cmd_install="yum" + cmd_install_rely="gcc-c++ make" + nodejs_curl="https://rpm.nodesource.com/setup_10.x" + cmd_install_rpm_build="yum install rpm-build -y" + nginx_conf="/etc/nginx/conf.d/" + rm_nginx_default="" + echo + echo -e "\033[1;32m★★★★★ 您的操作系统为Centos,即将为你开始部署gdutils项目 ★★★★★\033[0m" +elif [[ "$os" = "mac" ]]; then + echo + echo -e "\033[1;32m★★★★★ 您的操作系统为MacOS,请在图形界面手动安装 ★★★★★\033[0m" + exit + echo + echo +else + echo + echo -e "\033[1;32m unknow os $OS, exit! \033[0m" + exit + echo + echo +fi + +echo +echo -e "\033[1;32m===== <<升级系统/更新软件/安装工具/安装依赖>> =====\033[0m" +echo + +#安装which和sudo +if [[ "$(which which)" == "" ]]; then + echo -e "\033[1;32m“which”开始安装......\033[0m" + $cmd_install install which -y + echo -e "\033[1;32m------------------------------------------------\033[0m" +elif [[ "$(which sudo)" == "" ]]; then + echo -e "\033[1;32m“sudo”开始安装......\033[0m" + $cmd_install install sudo -y + echo -e "\033[1;32m------------------------------------------------\033[0m" +fi + +#安装工具和依赖 +for ((aloop = 0; aloop < ${#insofts[@]}; aloop++)); do + if [ ${insofts[$aloop]} = "update" -o ${insofts[$aloop]} = "upgrade" ]; then + echo -e "\033[1;32m“${insofts[$aloop]}”开始安装......\033[0m" + $cmd_install ${insofts[$aloop]} -y + echo -e "\033[1;32m------------------------------------------------\033[0m" + else + echo -e "\033[1;32m“${insofts[$aloop]}”开始安装......\033[0m" + $cmd_install install ${insofts[$aloop]} -y + echo -e "\033[1;32m------------------------------------------------\033[0m" + fi +done + +echo +echo -e "\033[1;32m===== <<安装gdutils依赖-nodejs和npm/安装配置gdutils>> =====\033[0m" +echo +$cmd_install install $cmd_install_rely -y +curl -sL $nodejs_curl | bash - +$cmd_install install nodejs -y +$cmd_install_rpm_build +git clone https://github.com/liaojack8/gd-utils-cht && cd gd-utils-cht +npm config set unsafe-perm=true +npm i + +echo +echo -e "\033[1;32m★★★ 恭喜您!gdutils统计转存系统已经正确安装完成,请上传sa到“./gd-utils-cht/sa/”目录下完成最后的配置 ★★★\033[0m" +echo + +################################################################################################# + +echo -e "\033[1;32m----------------------------------------------------------\033[0m" +read -s -n1 -p "★★★ 下面将部署Telegram机器人,请确保准备所需条件已准备好,按任意键开始部署机器人;如未做好准备请按“Ctrl+c”终止部署机器人 ★★★" +echo +echo -e "\033[1;32m----------------------------------------------------------\033[0m" + +echo +echo -e "\033[1;32m ===== <<开始部署gdutils查询转存TG机器人>> ===== \033[0m" +echo + +#输入“机器人token/TG账号ID/域名/转存目的盘ID” +read -p """请输入机器人token并回车 + Your Bot Token =>:""" YOUR_BOT_TOKEN +#判断token是否输入正确 +while [[ "${#YOUR_BOT_TOKEN}" != 46 ]]; do + echo -e "\033[1;32m★★★ 机器人TOKEN输入不正确,请重新输入或按“Ctrl+C”结束安装! ★★★\033[0m" + read -p """请输入机器人token并回车 + Your Bot Token =>:""" YOUR_BOT_TOKEN +done + +read -p """请输入你的域名(在cloudflare上解析到你机器人所在VPS的域名,格式:bot.abc.com)并回车 + Your Domain Name =>:""" YOUR_DOMAIN_NAME +#判断域名是否正确 +while [[ "$YOUR_DOMAIN_NAME" =~ "http" ]]; do + echo -e "\033[1;32m★★★ “Your Domain Name”输入错误,应该输入你在cloudflare上解析的域名且不包含“http”,请重新输入或按“Ctrl+C”结束安装! ★★★\033[0m" + read -p """请输入你的域名(在cloudflare上解析到你机器人所在VPS的域名,格式:bot.abc.com)并回车 + Your Domain Name =>:""" YOUR_DOMAIN_NAME +done + +read -p """请输入使用机器人的telegram账号ID(获取ID机器人@userinfobot)并回车 + Your Telegram ID =>:""" YOUR_TELEGRAM_ID +#判断telegram ID是否正确(通过判断是不是纯数字) +until [[ $YOUR_TELEGRAM_ID =~ ^-?[0-9]+$ ]]; do + echo -e "\033[1;32m★★★ 您的TG账号ID输入不正确,请重新输入或按“Ctrl+C”结束安装! ★★★\033[0m" + read -p """请输入使用机器人的telegram账号ID(获取ID机器人@userinfobot)并回车 + Your Telegram ID =>:""" YOUR_TELEGRAM_ID +done + +read -p """请输入转存默认目的地团队盘ID(不指定转存目的地默认改地址,脚本强制要求输入团队盘ID)并回车 + Your Google Team Drive ID =>:""" YOUR_GOOGLE_TEAM_DRIVE_ID +#判断google team drive ID是否正确(团队盘ID长度19位) +while [[ "${#YOUR_GOOGLE_TEAM_DRIVE_ID}" != 19 ]]; do + echo -e "\033[1;32m★★★ 您的Google team drive ID输入不正确,请重新输入或按“Ctrl+C”结束安装! ★★★\033[0m" + read -p """请输入转存默认目的地ID(不指定转存目的地默认该地址,脚本强制要求输入团队盘ID)并回车 + Your Google Team Drive ID =>:""" YOUR_GOOGLE_TEAM_DRIVE_ID +done + +cd ~ && + sed -i "s/bot_token/$YOUR_BOT_TOKEN/g" ./gd-utils-cht/config.js && + sed -i "s/your_tg_username/$YOUR_TELEGRAM_ID/g" ./gd-utils-cht/config.js && + sed -i "s/DEFAULT_TARGET = ''/DEFAULT_TARGET = '$YOUR_GOOGLE_TEAM_DRIVE_ID'/g" ./gd-utils-cht/config.js +echo -e "\033[1;32m----------------------------------------------------------\033[0m" + +echo -e "\033[1;32m“进程守护程序pm2”开始安装......\033[0m" +cd /root/gd-utils-cht && + npm i pm2 -g && pm2 l +echo -e "\033[1;32m启动守护进程......\033[0m" +pm2 start server.js --node-args="--max-old-space-size=4096" +echo -e "\033[1;32m----------------------------------------------------------\033[0m" + +echo -e "\033[1;32m“nginx”开始安装......\033[0m" +cd ~ && + $cmd_install install nginx -y +echo +echo -e "\033[1;32m===== <<配置nginx服务>> ===== \033[0m" +echo +echo -e "\033[1;32m“nginx”起一个web服务......\033[0m" + +cd $nginx_conf +echo "server { + listen 80; + server_name $YOUR_DOMAIN_NAME; + location / { + proxy_pass http://127.0.0.1:23333/; + } +}" >${nginx_conf}gdutilsbot.conf && + $rm_nginx_default + +ls && + nginx -t && + nginx -c /etc/nginx/nginx.conf && + nginx -s reload && + netstat -tulpen +echo -e "\033[1;32m----------------------------------------------------------\033[0m" + +echo -e "\033[1;32m“检查网站是否部署成功”......\033[0m" +curl $YOUR_DOMAIN_NAME/api/gdurl/count\?fid=124pjM5LggSuwI1n40bcD5tQ13wS0M6wg +echo +echo -e "\033[1;32m设置Webhook服务......\033[0m" +print_webhook=$(curl -F "url=https://$YOUR_DOMAIN_NAME/api/gdurl/tgbot" "https://api.telegram.org/bot$YOUR_BOT_TOKEN/setWebhook") +echo + +# 判断反向代理是否部署成功 +if [[ $print_webhook =~ "true" ]]; then + echo -e "\033[1;32m★★★ 恭喜你!GoogleDrive查询转存机器人部署成功,请回到TG界面给bot发送个“/help”获取使用帮助 ★★★\033[0m" +else + echo -e "\033[32m★★★ 很遗憾!机器人设置失败,请返回检查网站是否部署成功,并重复本安装过程 ★★★\033[0m", exit! +fi +nginx -t && nginx -s reload +echo +echo + +cd ~ +rm -f gdutilsinstall.sh + +###########################gdutils功能建议################################## +# 本部分是对gdutils项目的建议,因为我主要用的是查询功能所以以下建议只涉及查询功能 +# 1-把以下参数放入配置文件设置:sa存放路径 +# 2-改sa“随机”使用为“顺序”分组使用; +# 3-增加输出模式,可以用命令行后带参数选择,具体模式建议: +# ①按一级或者二级文件夹显示数量大小 +# ②可以一次性统计多个磁盘并且输出单个磁盘文件数和大小以及几个磁盘总和 +# ③获取id对应的文件夹名或者磁盘明保存数据库,给个命令能够查询历史记录汇总或者指定汇总 +# 4-查询过程中输出方式不要每次都输出一次,可以固定+数字变化 +# 5-命令参数可加在ID前或后,如果非要固定一种的话就加在ID之前 +# 6-命令行也改为默认sa模式 +############################################################################ diff --git a/readme.md b/readme.md index 536e64c..73900f0 100644 --- a/readme.md +++ b/readme.md @@ -3,11 +3,34 @@ > 不只是最快的 google drive 拷貝工具 [與其他工具的對比](./compare.md) > 我的readme可能不夠完全, 主要寫上我更新、修改的內容, 具體說明還是看[這邊](https://github.com/iwestlin/gd-utils)和[這邊](https://github.com/vitaminx/gd-utils)吧 +## 從其他專案轉移至本繁中專案 +```sh +pm2 delete 0 +mv ./gd-utils/sa ./gd-utils/config.js ./gd-utils/gdurl.sqlite ./ +rm -rf gd-utils +git clone https://github.com/liaojack8/gd-utils-cht && cd gd-utils-cht +npm install +rm -rf sa config.js gdurl.sqlite +cd .. +mv sa config.js gdurl.sqlite ./gd-utils-cht/ +pm2 start ./gd-utils-cht/server.js +sudo pm2 save +``` + - Demo Video: ~~[https://drive.google.com/file/d/1CltOaBDa4FVQ6doBP3S84MFPpbs2tv88](https://drive.google.com/file/d/1CltOaBDa4FVQ6doBP3S84MFPpbs2tv88)~~ (My account has been blocked) ## 更新紀錄 +具體功能參考[iwestlin-changelog](https://github.com/iwestlin/gd-utils/blob/master/changelog.md),前期工作基本做完,之後大概就是搬運了,可能考慮做一下i18n +### 2020.07.30 + - 同步原作者之更新 (清除按鈕、aria2.js等) + - 依舊保留了config_mod.js的修改項目, button-level的部分也套用清除按鈕的規則 +### 2020.07.16 + - 新增了從其他版本轉移到本專案的方式及教學 + - 改用config_mod.js, 可自訂按鈕顯示的個數(每列), 可設定為1或2, 或自訂sa文件路徑(此文件不修改也可以正常使用bot) +### 2020.07.15 + - 參照原作者更新, 加入單檔複製、tree列表的功能 ### 2020.07.07 - 參照原作者@iwestlin更新tg.js及gd.js - 整體繁體化, 介面部分 - - 新增用戶可以在config.js自訂按鈕顯示的個數(每列), 可設定為1或2 + - ~~新增用戶可以在config.js自訂按鈕顯示的個數(每列), 可設定為1或2~~ ### 2020.07.06 - 部分繁體中文化 - 執行/task命令時, 會回傳完成度百分比 @@ -30,15 +53,15 @@ - gdutils項目一鍵部署腳本(包括“查詢轉存”和“TG機器人”兩部分) ``` bash -c "$(curl -fsSL https://raw.githubusercontent.com/liaojack8/gd-utils-cht/master/gdutilsinstall.sh)" - ``` + ``` - gdutils項目一鍵部署腳本之“轉存查詢部分” ``` bash -c "$(curl -fsSL https://raw.githubusercontent.com/liaojack8/gd-utils-cht/master/gdutilscsinstall.sh)" - ``` + ``` - gdutils項目一鍵部署腳本之“TG機器人部分” ``` bash -c "$(curl -fsSL https://raw.githubusercontent.com/liaojack8/gd-utils-cht/master/gdutilsbotinstall.sh)" - ``` + ``` - 安裝過程中需要輸入一下四個參數: - 機器人TOKEN:這個在Telegram裡面找“@BotFather”註冊即可獲得 - Telegram用戶ID:在Telegram裡面向機器人@userinfobot发送消息即可獲得 diff --git a/src/gd.js b/src/gd.js index e1d3c21..316fe53 100644 --- a/src/gd.js +++ b/src/gd.js @@ -4,28 +4,57 @@ const dayjs = require('dayjs') const prompts = require('prompts') const pLimit = require('p-limit') const axios = require('@viegg/axios') -const HttpsProxyAgent = require('https-proxy-agent') const { GoogleToken } = require('gtoken') const handle_exit = require('signal-exit') +const { argv } = require('yargs') -const { AUTH, RETRY_LIMIT, PARALLEL_LIMIT, TIMEOUT_BASE, TIMEOUT_MAX, LOG_DELAY, PAGE_SIZE, DEFAULT_TARGET, SA_PATH } = require('../config') +let { PARALLEL_LIMIT } = require('../config') +PARALLEL_LIMIT = argv.l || argv.limit || PARALLEL_LIMIT + +const { AUTH, RETRY_LIMIT, TIMEOUT_BASE, TIMEOUT_MAX, LOG_DELAY, PAGE_SIZE, DEFAULT_TARGET } = require('../config') +const { SA_PATH } = require('../config_mod') const { db } = require('../db') const { make_table, make_tg_table, make_html, summary } = require('./summary') +const { gen_tree_html } = require('./tree') -const FILE_EXCEED_MSG = '您的小組雲端硬碟文件數量已超過限制(40萬),停止複製' +const FILE_EXCEED_MSG = '您的小組雲端硬碟文件數量已超過限制(40萬),停止複製,請將未完成的資料夾移到另一個小組雲端硬碟中,再執行一遍複製指令即可繼斷點續傳' const FOLDER_TYPE = 'application/vnd.google-apps.folder' -const { https_proxy } = process.env -const axins = axios.create(https_proxy ? { httpsAgent: new HttpsProxyAgent(https_proxy) } : {}) +const sleep = ms => new Promise((resolve, reject) => setTimeout(resolve, ms)) +const { https_proxy, http_proxy, all_proxy } = process.env +const proxy_url = https_proxy || http_proxy || all_proxy + +let axins +if (proxy_url) { + console.log('使用代理:', proxy_url) + let ProxyAgent + try { + ProxyAgent = require('proxy-agent') + } catch (e) { // 没执行 npm i proxy-agent + ProxyAgent = require('https-proxy-agent') + } + axins = axios.create({ httpsAgent: new ProxyAgent(proxy_url) }) +} else { + axins = axios.create({}) +} + +const SA_LOCATION = argv.sa || 'sa' const SA_BATCH_SIZE = 1000 const SA_FILES = fs.readdirSync(path.join(__dirname, SA_PATH)).filter(v => v.endsWith('.json')) SA_FILES.flag = 0 let SA_TOKENS = get_sa_batch() -setInterval(() => { - SA_FILES.flag = 0 - SA_TOKENS = get_sa_batch() -}, 1000 * 3600 * 12) +if (is_pm2()) { + setInterval(() => { + SA_FILES.flag = 0 + SA_TOKENS = get_sa_batch() + }, 1000 * 3600 * 12) +} + +// https://github.com/Leelow/is-pm2/blob/master/index.js +function is_pm2 () { + return 'PM2_HOME' in process.env || 'PM2_JSON_PROCESSING' in process.env || 'PM2_CLI' in process.env +} function get_sa_batch () { const new_flag = SA_FILES.flag + SA_BATCH_SIZE @@ -33,7 +62,7 @@ function get_sa_batch () { SA_FILES.flag = new_flag return files.map(filename => { const gtoken = new GoogleToken({ - keyFile: path.join(__dirname, '../sa', filename), + keyFile: path.join(__dirname, SA_PATH, filename), scope: ['https://www.googleapis.com/auth/drive'] }) return { gtoken, expires: 0 } @@ -47,6 +76,7 @@ handle_exit(() => { db.prepare('update task set status=? where id=?').run('interrupt', v.id) }) records.length && console.log(records.length, 'task interrupted') + db.close() }) async function gen_count_body ({ fid, type, update, service_account }) { @@ -71,6 +101,8 @@ async function gen_count_body ({ fid, type, update, service_account }) { return (typeof smy === 'string') ? smy : JSON.stringify(smy) } } + const file = await get_info_by_id(fid, service_account) + if (file && file.mimeType !== FOLDER_TYPE) return render_smy(summary([file]), type) let info, smy const record = db.prepare('SELECT * FROM gd WHERE fid = ?').get(fid) @@ -120,7 +152,9 @@ async function count ({ fid, update, sort, type, output, not_teamdrive, service_ function get_out_str ({ info, type, sort }) { const smy = summary(info, sort) let out_str - if (type === 'html') { + if (type === 'tree') { + out_str = gen_tree_html(info) + } else if (type === 'html') { out_str = make_html(smy) } else if (type === 'json') { out_str = JSON.stringify(smy) @@ -164,7 +198,7 @@ function get_all_by_fid (fid) { } async function walk_and_save ({ fid, not_teamdrive, update, service_account }) { - const result = [] + let result = [] const not_finished = [] const limit = pLimit(PARALLEL_LIMIT) @@ -193,7 +227,7 @@ async function walk_and_save ({ fid, not_teamdrive, update, service_account }) { should_save && save_files_to_db(parent, files) const folders = files.filter(v => v.mimeType === FOLDER_TYPE) files.forEach(v => v.parent = parent) - result.push(...files) + result = result.concat(files) return Promise.all(folders.map(v => recur(v.id))) } try { @@ -235,15 +269,21 @@ async function ls_folder ({ fid, not_teamdrive, service_account }) { params.pageSize = Math.min(PAGE_SIZE, 1000) // const use_sa = (fid !== 'root') && (service_account || !not_teamdrive) // 不带参数默认使用sa const use_sa = (fid !== 'root') && service_account - const headers = await gen_headers(use_sa) + // const headers = await gen_headers(use_sa) + // 对于直接子文件数超多的目录(1ctMwpIaBg8S1lrZDxdynLXJpMsm5guAl),可能还没列完,access_token就过期了 + // 由于需要nextPageToken才能获取下一页的数据,所以无法用并行请求,测试发现每次获取1000个文件的请求大多需要20秒以上才能完成 + const gtoken = use_sa && (await get_sa_token()).gtoken do { if (pageToken) params.pageToken = pageToken let url = 'https://www.googleapis.com/drive/v3/files' url += '?' + params_to_query(params) - const payload = { headers, timeout: TIMEOUT_BASE } let retry = 0 let data + const payload = { timeout: TIMEOUT_BASE } while (!data && (retry < RETRY_LIMIT)) { + const access_token = gtoken ? (await gtoken.getToken()).access_token : (await get_access_token()) + const headers = { authorization: 'Bearer ' + access_token } + payload.headers = headers try { data = (await axins.get(url, payload)).data } catch (err) { @@ -258,6 +298,7 @@ async function ls_folder ({ fid, not_teamdrive, service_account }) { return files } files = files.concat(data.files) + argv.sfl && console.log('files.length:', files.length) pageToken = data.nextPageToken } while (pageToken) @@ -301,7 +342,7 @@ async function get_sa_token () { try { return await real_get_sa_token(tk) } catch (e) { - console.log(e) + console.warn('SA獲取access_token失敗:', e.message) SA_TOKENS = SA_TOKENS.filter(v => v.gtoken !== tk.gtoken) if (!SA_TOKENS.length) SA_TOKENS = get_sa_batch() } @@ -364,9 +405,9 @@ async function create_folder (name, parent, use_sa, limit) { throw new Error(err_message + ' 目錄名:' + name) } -async function get_name_by_id (fid) { +async function get_name_by_id (fid, use_sa) { try { - const { name } = await get_info_by_id(fid, true) + const { name } = await get_info_by_id(fid, use_sa) return name } catch (e) { return fid @@ -379,7 +420,7 @@ async function get_info_by_id (fid, use_sa) { includeItemsFromAllDrives: true, supportsAllDrives: true, corpora: 'allDrives', - fields: 'id,name' + fields: 'id, name, size, parents, mimeType' } url += '?' + params_to_query(params) const headers = await gen_headers(use_sa) @@ -433,7 +474,7 @@ async function real_copy ({ source, target, name, min_size, update, dncnr, not_t const record = db.prepare('select * from task where source=? and target=?').get(source, target) if (record) { const copied = db.prepare('select fileid from copied where taskid=?').all(record.id).map(v => v.fileid) - const choice = is_server ? 'continue' : await user_choose() + const choice = (is_server || argv.yes) ? 'continue' : await user_choose() if (choice === 'exit') { return console.log('退出程序') } else if (choice === 'continue') { @@ -474,7 +515,7 @@ async function real_copy ({ source, target, name, min_size, update, dncnr, not_t if (min_size) files = files.filter(v => v.size >= min_size) const folders = arr.filter(v => v.mimeType === FOLDER_TYPE) console.log('待複製的目錄數:', folders.length) - console.log('待複製的檔案數:', files.length) + console.log('待複製的檔案數:', files.length) const mapping = await create_folders({ source, folders, @@ -513,23 +554,65 @@ async function real_copy ({ source, target, name, min_size, update, dncnr, not_t } async function copy_files ({ files, mapping, service_account, root, task_id }) { + if (!files.length) return console.log('\n開始複製文件,總數:', files.length) - const limit = pLimit(PARALLEL_LIMIT) - let count = 0 + const loop = setInterval(() => { const now = dayjs().format('HH:mm:ss') - const message = `${now} | 已複製的檔案數 ${count} | 網路請求 進行中${limit.activeCount}/排隊中${limit.pendingCount}` + const message = `${now} | 已複製的檔案數 ${count} | 排隊中檔案數 ${files.length}` print_progress(message) }, 1000) - return Promise.all(files.map(async file => { + + let count = 0 + let concurrency = 0 + let err + do { + if (err) { + clearInterval(loop) + files = null + throw err + } + if (concurrency > PARALLEL_LIMIT) { + await sleep(100) + continue + } + const file = files.shift() + if (!file) { + await sleep(1000) + continue + } + concurrency++ const { id, parent } = file const target = mapping[parent] || root - const new_file = await limit(() => copy_file(id, target, service_account, limit, task_id)) - if (new_file) { - count++ - db.prepare('INSERT INTO copied (taskid, fileid) VALUES (?, ?)').run(task_id, id) - } - })).finally(() => clearInterval(loop)) + copy_file(id, target, service_account, null, task_id).then(new_file => { + if (new_file) { + count++ + db.prepare('INSERT INTO copied (taskid, fileid) VALUES (?, ?)').run(task_id, id) + } + }).catch(e => { + err = e + }).finally(() => { + concurrency-- + }) + } while (concurrency || files.length) + return clearInterval(loop) + // const limit = pLimit(PARALLEL_LIMIT) + // let count = 0 + // const loop = setInterval(() => { + // const now = dayjs().format('HH:mm:ss') + // const {activeCount, pendingCount} = limit + // const message = `${now} | 已复制文件数 ${count} | 网络请求 进行中${activeCount}/排队中${pendingCount}` + // print_progress(message) + // }, 1000) + // return Promise.all(files.map(async file => { + // const { id, parent } = file + // const target = mapping[parent] || root + // const new_file = await limit(() => copy_file(id, target, service_account, limit, task_id)) + // if (new_file) { + // count++ + // db.prepare('INSERT INTO copied (taskid, fileid) VALUES (?, ?)').run(task_id, id) + // } + // })).finally(() => clearInterval(loop)) } async function copy_file (id, parent, use_sa, limit, task_id) { @@ -558,7 +641,7 @@ async function copy_file (id, parent, use_sa, limit, task_id) { if (message && message.toLowerCase().includes('file limit')) { if (limit) limit.clearQueue() if (task_id) db.prepare('update task set status=? where id=?').run('error', task_id) - throw new Error('您的小組雲端硬碟文件數已超限,停止複製') + throw new Error(FILE_EXCEED_MSG) } if (use_sa && message && message.toLowerCase().includes('rate limit')) { SA_TOKENS = SA_TOKENS.filter(v => v.gtoken !== gtoken) @@ -671,6 +754,22 @@ async function confirm_dedupe ({ file_number, folder_number }) { return answer.value } +// 需要sa是源文件夹所在盘的manager +async function mv_file ({ fid, new_parent, service_account }) { + const file = await get_info_by_id(fid, service_account) + if (!file) return + const removeParents = file.parents[0] + let url = `https://www.googleapis.com/drive/v3/files/${fid}` + const params = { + removeParents, + supportsAllDrives: true, + addParents: new_parent + } + url += '?' + params_to_query(params) + const headers = await gen_headers(service_account) + return axins.patch(url, {}, { headers }) +} + // 将文件或文件夹移入回收站,需要 sa 为 content manager 权限及以上 async function trash_file ({ fid, service_account }) { const url = `https://www.googleapis.com/drive/v3/files/${fid}?supportsAllDrives=true` @@ -694,7 +793,7 @@ async function rm_file ({ fid, service_account }) { } } -async function dedupe ({ fid, update, service_account }) { +async function dedupe ({ fid, update, service_account, yes }) { let arr if (!update) { const info = get_all_by_fid(fid) @@ -707,7 +806,7 @@ async function dedupe ({ fid, update, service_account }) { const dupes = find_dupe(arr) const folder_number = dupes.filter(v => v.mimeType === FOLDER_TYPE).length const file_number = dupes.length - folder_number - const choice = await confirm_dedupe({ file_number, folder_number }) + const choice = yes || await confirm_dedupe({ file_number, folder_number }) if (choice === 'no') { return console.log('退出程序') } else if (!choice) { @@ -727,7 +826,8 @@ async function dedupe ({ fid, update, service_account }) { file_count++ } } catch (e) { - console.log('刪除失敗', e.message) + console.log('刪除失敗', v) + handle_error(e) } })) return { file_count, folder_count } @@ -751,4 +851,4 @@ function print_progress (msg) { } } -module.exports = { ls_folder, count, validate_fid, copy, dedupe, copy_file, gen_count_body, real_copy, get_name_by_id } +module.exports = { ls_folder, count, validate_fid, copy, dedupe, copy_file, gen_count_body, real_copy, get_name_by_id, get_info_by_id, get_access_token, get_sa_token, walk_and_save } diff --git a/src/router.js b/src/router.js index 1cf3572..b0421df 100644 --- a/src/router.js +++ b/src/router.js @@ -2,7 +2,7 @@ const Router = require('@koa/router') const { db } = require('../db') const { validate_fid, gen_count_body } = require('./gd') -const { send_count, send_help, send_choice, send_task_info, sm, extract_fid, extract_from_text, reply_cb_query, tg_copy, send_all_tasks, send_bm_help, get_target_by_alias, send_all_bookmarks, set_bookmark, unset_bookmark } = require('./tg') +const { send_count, send_help, send_choice, send_task_info, sm, extract_fid, extract_from_text, reply_cb_query, tg_copy, send_all_tasks, send_bm_help, get_target_by_alias, send_all_bookmarks, set_bookmark, unset_bookmark, clear_tasks, send_task_help, rm_task } = require('./tg') const { AUTH, ROUTER_PASSKEY, TG_IPLIST } = require('../config') const { tg_whitelist } = AUTH @@ -42,16 +42,17 @@ router.get('/api/gdurl/count', async ctx => { router.post('/api/gdurl/tgbot', async ctx => { const { body } = ctx.request console.log('ctx.ip', ctx.ip) // 可以只允许tg服务器的ip - console.log('tg message:', body) + console.log('tg message:', JSON.stringify(body, null, ' ')) if (TG_IPLIST && !TG_IPLIST.includes(ctx.ip)) return ctx.body = 'invalid ip' ctx.body = '' // 早点释放连接 const message = body.message || body.edited_message + const message_str = JSON.stringify(message) const { callback_query } = body if (callback_query) { - const { id, data } = callback_query + const { id, message, data } = callback_query const chat_id = callback_query.from.id - const [action, fid, target] = data.split(' ') + const [action, fid, target] = data.split(' ').filter(v => v) if (action === 'count') { if (counting[fid]) return sm({ chat_id, text: fid + ' 正在統計,請稍候' }) counting[fid] = true @@ -67,33 +68,45 @@ router.post('/api/gdurl/tgbot', async ctx => { tg_copy({ fid, target: get_target_by_alias(target), chat_id }).then(task_id => { task_id && sm({ chat_id, text: `開始複製,任務ID: ${task_id} 可輸入 /task ${task_id} 查詢進度` }) }).finally(() => COPYING_FIDS[fid] = false) + } else if (action === 'update') { + if (counting[fid]) return sm({ chat_id, text: fid + ' 正在統計,請稍等片刻' }) + counting[fid] = true + send_count({ fid, chat_id, update: true }).finally(() => { + delete counting[fid] + }) + } else if (action === 'clear_button') { + const { message_id, text } = message || {} + if (message_id) sm({ chat_id, message_id, text, parse_mode: 'HTML' }, 'editMessageText') } return reply_cb_query({ id, data }).catch(console.error) } const chat_id = message && message.chat && message.chat.id - const text = message && message.text && message.text.trim() + const text = (message && message.text && message.text.trim()) || '' let username = message && message.from && message.from.username username = username && String(username).toLowerCase() let user_id = message && message.from && message.from.id user_id = user_id && String(user_id).toLowerCase() - if (!chat_id || !text || !tg_whitelist.some(v => { + if (!chat_id || !tg_whitelist.some(v => { v = String(v).toLowerCase() return v === username || v === user_id - })) return console.warn('異常請求') + })) { + chat_id && sm({ chat_id, text: '您的使用者名稱或ID不在機器人的白名單中,如果是您配置的機器人,請先到config.js中配置自己的username' }) + return console.warn('收到非白名單用戶的請求') + } - const fid = extract_fid(text) || extract_from_text(text) + const fid = extract_fid(text) || extract_from_text(text) || extract_from_text(message_str) const no_fid_commands = ['/task', '/help', '/bm'] if (!no_fid_commands.some(cmd => text.startsWith(cmd)) && !validate_fid(fid)) { return sm({ chat_id, text: '未辨識到分享ID' }) } if (text.startsWith('/help')) return send_help(chat_id) if (text.startsWith('/bm')) { - const [cmd, action, alias, target] = text.split(' ').map(v => v.trim()) + const [cmd, action, alias, target] = text.split(' ').map(v => v.trim()).filter(v => v) if (!action) return send_all_bookmarks(chat_id) if (action === 'set') { if (!alias || !target) return sm({ chat_id, text: '標籤名和dstID不能為空' }) - if (alias.length > 24) return sm({ chat_id, text: '標籤名請勿超過24个英文字符' }) + if (alias.length > 24) return sm({ chat_id, text: '標籤名不要超過24個英文字符長度' }) if (!validate_fid(target)) return sm({ chat_id, text: 'dstID格式錯誤' }) set_bookmark({ chat_id, alias, target }) } else if (action === 'unset') { @@ -115,7 +128,7 @@ router.post('/api/gdurl/tgbot', async ctx => { delete counting[fid] } } else if (text.startsWith('/copy')) { - let target = text.replace('/copy', '').replace(' -u', '').trim().split(' ').map(v => v.trim())[1] + let target = text.replace('/copy', '').replace(' -u', '').trim().split(' ').map(v => v.trim()).filter(v => v)[1] target = get_target_by_alias(target) || target if (target && !validate_fid(target)) return sm({ chat_id, text: `目標ID ${target} 格式不正確` }) const update = text.endsWith(' -u') @@ -126,6 +139,15 @@ router.post('/api/gdurl/tgbot', async ctx => { let task_id = text.replace('/task', '').trim() if (task_id === 'all') { return send_all_tasks(chat_id) + } else if (task_id === 'clear') { + return clear_tasks(chat_id) + } else if (task_id === '-h') { + return send_task_help(chat_id) + } else if (task_id.startsWith('rm')) { + task_id = task_id.replace('rm', '') + task_id = parseInt(task_id) + if (!task_id) return send_task_help(chat_id) + return rm_task({ task_id, chat_id }) } task_id = parseInt(task_id) if (!task_id) { @@ -134,10 +156,10 @@ router.post('/api/gdurl/tgbot', async ctx => { return running_tasks.forEach(v => send_task_info({ chat_id, task_id: v.id }).catch(console.error)) } send_task_info({ task_id, chat_id }).catch(console.error) - } else if (text.includes('drive.google.com/') || validate_fid(text)) { - return send_choice({ fid: fid || text, chat_id }).catch(console.error) + } else if (message_str.includes('drive.google.com/') || validate_fid(text)) { + return send_choice({ fid: fid || text, chat_id }) } else { - sm({ chat_id, text: '暫不支持此命令' }) + sm({ chat_id, text: '暫不支援此命令' }) } }) diff --git a/src/summary.js b/src/summary.js index 4fa5819..35db95d 100644 --- a/src/summary.js +++ b/src/summary.js @@ -123,4 +123,4 @@ function format_size (n) { flag++ } return n.toFixed(2) + ' ' + units[flag] -} +} \ No newline at end of file diff --git a/src/tg.js b/src/tg.js index ac0e06e..f882ba7 100644 --- a/src/tg.js +++ b/src/tg.js @@ -4,12 +4,13 @@ const axios = require('@viegg/axios') const HttpsProxyAgent = require('https-proxy-agent') const { db } = require('../db') -const { gen_count_body, validate_fid, real_copy, get_name_by_id } = require('./gd') +const { gen_count_body, validate_fid, real_copy, get_name_by_id, get_info_by_id, copy_file } = require('./gd') const { AUTH, DEFAULT_TARGET, USE_PERSONAL_AUTH } = require('../config') +const { BUTTON_LEVEL } = require('../config_mod') const { tg_token } = AUTH const gen_link = (fid, text) => `${text || fid}` -if (!tg_token) throw new Error('請先在config.js中設定tg_token') +if (!tg_token) throw new Error('請先在config.js裡設定tg_token') const { https_proxy } = process.env const axins = axios.create(https_proxy ? { httpsAgent: new HttpsProxyAgent(https_proxy) } : {}) @@ -18,13 +19,12 @@ const FID_TO_NAME = {} async function get_folder_name (fid) { let name = FID_TO_NAME[fid] if (name) return name - name = await get_name_by_id(fid) + name = await get_name_by_id(fid, !USE_PERSONAL_AUTH) return FID_TO_NAME[fid] = name } function send_help (chat_id) { const text = `
[使用說明]
-***不支持單檔分享***
 命令 | 說明
 =====================
 /help | 返回本使用說明
@@ -39,6 +39,11 @@ sourceID可以是共享網址本身,也可以是共享ID。如果命令最后
 =====================
 /task taskID(選填) | 返回對應任務的進度信息,若不填taskID則返回所有正在運行的任務進度
 若填 all 則返回所有任務列表(歷史紀錄)
+/task | 返回所有正在執行的正在執行的任務詳情
+/task 7 | 返回ID为 7 的任務詳情
+/task all | 返回所有任務紀錄列表
+/task clear | 清除所有狀態為finished的任務紀錄
+/task rm 7 | 刪除編號為 7 的任務紀錄
 =====================
 /bm [action] [alias] [target] | bookmark,添加常用目的資料夾ID
 會在輸入共享連結後返回的「文件統計」「開始複製」這兩個按鈕的下方出現,方便複製到常用位置。
@@ -61,9 +66,35 @@ function send_bm_help (chat_id) {
   return sm({ chat_id, text, parse_mode: 'HTML' })
 }
 
+function send_task_help (chat_id) {
+  const text = `
/task [action/id] [id] | 查詢或管理任務進度
+範例:
+/task | 返回所有正在執行的正在執行的任務詳情
+/task 7 | 返回ID为 7 的任務詳情
+/task all | 返回所有任務紀錄列表
+/task clear | 清除所有狀態為finished的任務紀錄
+/task rm 7 | 刪除編號為 7 的任務紀錄
+
` + return sm({ chat_id, text, parse_mode: 'HTML' }) +} + +function clear_tasks (chat_id) { + const finished_tasks = db.prepare('select id from task where status=?').all('finished') + finished_tasks.forEach(task => rm_task({ task_id: task.id })) + sm({ chat_id, text: '已清除所有狀態為finished的任務紀錄' }) +} + +function rm_task ({ task_id, chat_id }) { + const exist = db.prepare('select id from task where id=?').get(task_id) + if (!exist) return sm({ chat_id, text: `不存在任務ID為 ${task_id} 的任務記錄` }) + db.prepare('delete from task where id=?').run(task_id) + db.prepare('delete from copied where taskid=?').run(task_id) + if (chat_id) sm({ chat_id, text: `已刪除任務 ${task_id} 記錄` }) +} + function send_all_bookmarks (chat_id) { let records = db.prepare('select alias, target from bookmark').all() - if (!records.length) return sm({ chat_id, text: '資料庫中沒有收藏紀錄' }) + if (!records.length) return sm({ chat_id, text: '數據庫中沒有收藏記錄' }) const tb = new Table({ style: { head: [], border: [] } }) const headers = ['標籤名', 'dstID'] records = records.map(v => [v.alias, v.target]) @@ -76,7 +107,7 @@ function set_bookmark ({ chat_id, alias, target }) { const record = db.prepare('select alias from bookmark where alias=?').get(alias) if (record) return sm({ chat_id, text: '資料庫中已有同名的收藏' }) db.prepare('INSERT INTO bookmark (alias, target) VALUES (?, ?)').run(alias, target) - return sm({ chat_id, text: `成功設定收藏${alias} | ${target}` }) + return sm({ chat_id, text: `成功設定收藏:${alias} | ${target}` }) } function unset_bookmark ({ chat_id, alias }) { @@ -91,6 +122,11 @@ function get_target_by_alias (alias) { return record && record.target } +function get_alias_by_target (target) { + const record = db.prepare('select alias from bookmark where target=?').get(target) + return record && record.alias +} + function send_choice ({ fid, chat_id }) { if(BUTTON_LEVEL == 1){ return sm({ @@ -104,7 +140,10 @@ function send_choice ({ fid, chat_id }) { [ { text: '開始複製', callback_data: `copy ${fid}` } ] - ].concat(gen_bookmark_choices(fid)) + ].concat(gen_bookmark_choices(fid)).concat([[ + { text: '強制更新', callback_data: `update ${fid}` }, + { text: '清除按鈕', callback_data: `clear_button` } + ]]) } }) }else{ @@ -117,7 +156,10 @@ function send_choice ({ fid, chat_id }) { { text: '文件統計', callback_data: `count ${fid}` }, { text: '開始複製', callback_data: `copy ${fid}` } ] - ].concat(gen_bookmark_choices(fid)) + ].concat(gen_bookmark_choices(fid)).concat([[ + { text: '強制更新', callback_data: `update ${fid}` }, + { text: '清除按鈕', callback_data: `clear_button` } + ]]) } }) } @@ -131,16 +173,12 @@ function gen_bookmark_choices (fid) { }else{ level = BUTTON_LEVEL } - const gen_choice = v => ({text: `複製到 ${v.alias}`, callback_data: `copy ${fid} ${v.alias}`}) + const gen_choice = v => ({ text: `複製到 ${v.alias}`, callback_data: `copy ${fid} ${v.alias}` }) const records = db.prepare('select * from bookmark').all() - db.close() const result = [] - for (let i = 0; i < records.length; i++) { + for (let i = 0; i < records.length; i += 2) { const line = [gen_choice(records[i])] - for(let j = 0; j < level-1; j ++){ - if (records[i+1]) line.push(gen_choice(records[i+1])) - i++ - } + if (records[i + 1]) line.push(gen_choice(records[i + 1])) result.push(line) } return result @@ -166,8 +204,8 @@ async function send_all_tasks (chat_id) { // const description = err.response && err.response.data && err.response.data.description // if (description && description.includes('message is too long')) { if (true) { - const text = [headers].concat(records).map(v => v.join('\t')).join('\n') - return sm({ chat_id, parse_mode: 'HTML', text: `所有拷貝任務:\n
${text}
` }) + const text = [headers].concat(records.slice(-100)).map(v => v.join('\t')).join('\n') + return sm({ chat_id, parse_mode: 'HTML', text: `所有拷貝任務(僅顯示最近100項):\n
${text}
` }) } console.error(err) }) @@ -176,30 +214,26 @@ async function send_all_tasks (chat_id) { async function get_task_info (task_id) { const record = db.prepare('select * from task where id=?').get(task_id) if (!record) return {} - const { source, target, status, copied, mapping, ctime, ftime } = record + const { source, target, status, mapping, ctime, ftime } = record + const { copied_files } = db.prepare('select count(fileid) as copied_files from copied where taskid=?').get(task_id) const folder_mapping = mapping && mapping.trim().split('\n') const new_folder = folder_mapping && folder_mapping[0].split(' ')[1] const { summary } = db.prepare('select summary from gd where fid=?').get(source) || {} const { file_count, folder_count, total_size } = summary ? JSON.parse(summary) : {} - const copied_files = copied ? copied.trim().split('\n').length : 0 + const total_count = (file_count || 0) + (folder_count || 0) const copied_folders = folder_mapping ? (folder_mapping.length - 1) : 0 - let text = '任務ID:' + task_id + '\n' + let text = '任務ID:' + task_id + ' [' + status + ']\n' const folder_name = await get_folder_name(source) text += '源資料夾:' + gen_link(source, folder_name) + '\n' - text += '目的位置:' + gen_link(target) + '\n' + text += '目的位置:' + gen_link(target, get_alias_by_target(target)) + '\n' text += '新資料夾:' + (new_folder ? gen_link(new_folder) : '尚未創建') + '\n' text += '任務狀態:' + status + '\n' text += '創建時間:' + dayjs(ctime).format('YYYY-MM-DD HH:mm:ss') + '\n' text += '完成時間:' + (ftime ? dayjs(ftime).format('YYYY-MM-DD HH:mm:ss') : '未完成') + '\n' - var pct = copied_folders/(folder_count === undefined ? '未知數量' : folder_count)*100 - pct = pct.toFixed(2); - text += '目錄進度:' + copied_folders + '/' + (folder_count === undefined ? '未知數量' : folder_count) + ' - ' + pct + '%\n' - pct = copied_files/(file_count === undefined ? '未知數量' : file_count)*100 - pct = pct.toFixed(2); - text += '文件進度:' + copied_files + '/' + (file_count === undefined ? '未知數量' : file_count) + ' - ' + pct + '%\n' + text += '目錄進度:' + copied_folders + '/' + (folder_count === undefined ? '未知數量' : folder_count) + ' - ' + (copied_folders/folder_count*100).toFixed(3) + '%\n' + text += '文件進度:' + copied_files + '/' + (file_count === undefined ? '未知數量' : file_count) + ' - ' + (copied_files/file_count*100).toFixed(3) + '%\n' text += '合計大小:' + (total_size || '未知大小') - const total_count = (folder_count || 0) + (file_count || 0) - return { text, status, total_count } + return { text, status, folder_count } } async function send_task_info ({ task_id, chat_id }) { @@ -213,13 +247,12 @@ async function send_task_info ({ task_id, chat_id }) { } catch (e) { console.log('fail to send message to tg', e.message) } - // get_task_info 在task目录数超大时比较吃cpu,如果超1万就不每10秒更新了,以后如果把mapping 也另存一张表可以取消此限制 - if (!message_id || status !== 'copying' || folder_count > 10000) return + // get_task_info 在task目录数超大时比较吃cpu,以后如果最好把mapping也另存一张表 + if (!message_id || status !== 'copying') return const loop = setInterval(async () => { - const url = `https://api.telegram.org/bot${tg_token}/editMessageText` const { text, status } = await get_task_info(task_id) if (status !== 'copying') clearInterval(loop) - axins.post(url, { chat_id, message_id, text, parse_mode: 'HTML' }).catch(e => console.error(e.message)) + sm({ chat_id, message_id, text, parse_mode: 'HTML' }, 'editMessageText') }, 10 * 1000) } @@ -229,6 +262,14 @@ async function tg_copy ({ fid, target, chat_id, update }) { // return task_id sm({ chat_id, text: '請輸入目的地ID或先在config.js中設定預設複製的目的地ID(DEFAULT_TARGET)' }) return } + const file = await get_info_by_id(fid, !USE_PERSONAL_AUTH) + if (file && file.mimeType !== 'application/vnd.google-apps.folder') { + return copy_file(fid, target, !USE_PERSONAL_AUTH).then(data => { + sm({ chat_id, parse_mode: 'HTML', text: `單檔複製成功,位置:${gen_link(target)}` }) + }).catch(e => { + sm({ chat_id, text: `單檔複製成功失敗,失敗訊息:${e.message}` }) + }) + } let record = db.prepare('select id, status from task where source=? and target=?').get(fid, target) if (record) { @@ -242,7 +283,7 @@ async function tg_copy ({ fid, target, chat_id, update }) { // return task_id real_copy({ source: fid, update, target, service_account: !USE_PERSONAL_AUTH, is_server: true }) .then(async info => { - if (!record) record = {} // 防止无限循环 + if (!record) record = {} // 防止無限循環 if (!info) return const { task_id } = info const { text } = await get_task_info(task_id) @@ -250,14 +291,11 @@ async function tg_copy ({ fid, target, chat_id, update }) { // return task_id }) .catch(err => { const task_id = record && record.id - if (task_id){ - db.prepare('update task set status=? where id=?').run('error', task_id) - db.close() - } + if (task_id) db.prepare('update task set status=? where id=?').run('error', task_id) if (!record) record = {} console.error('複製失敗', fid, '-->', target) console.error(err) - sm({ chat_id, text: '複製失敗,失敗訊息:' + err.message }) + sm({ chat_id, text: (task_id || '') + '複製失敗,失敗訊息:' + err.message }) }) while (!record) { @@ -310,18 +348,21 @@ ${table}
` 文件總數:${file_count} 目錄總數:${folder_count} 合計大小:${total_size} -` +` }) } throw err }) } -function sm (data) { - const url = `https://api.telegram.org/bot${tg_token}/sendMessage` +function sm (data, endpoint) { + endpoint = endpoint || 'sendMessage' + const url = `https://api.telegram.org/bot${tg_token}/${endpoint}` return axins.post(url, data).catch(err => { // console.error('fail to post', url, data) console.error('fail to send message to tg:', err.message) + const err_data = err.response && err.response.data + err_data && console.error(err_data) }) } @@ -333,9 +374,11 @@ function extract_fid (text) { if (!text.startsWith('http')) text = 'https://' + text const u = new URL(text) if (u.pathname.includes('/folders/')) { - const reg = /[^/?]+$/ - const match = u.pathname.match(reg) - return match && match[0] + return u.pathname.split('/').map(v => v.trim()).filter(v => v).pop() + } else if (u.pathname.includes('/file/')) { + const file_reg = /file\/d\/([a-zA-Z0-9_-]+)/ + const file_match = u.pathname.match(file_reg) + return file_match && file_match[1] } return u.searchParams.get('id') } catch (e) { @@ -344,9 +387,10 @@ function extract_fid (text) { } function extract_from_text (text) { - const reg = /https?:\/\/drive.google.com\/[^\s]+/g + // const reg = /https?:\/\/drive.google.com\/[^\s]+/g + const reg = /https?:\/\/drive.google.com\/[a-zA-Z0-9_\\/?=&-]+/g const m = text.match(reg) return m && extract_fid(m[0]) } -module.exports = { send_count, send_help, sm, extract_fid, reply_cb_query, send_choice, send_task_info, send_all_tasks, tg_copy, extract_from_text, get_target_by_alias, send_bm_help, send_all_bookmarks, set_bookmark, unset_bookmark } +module.exports = { send_count, send_help, sm, extract_fid, reply_cb_query, send_choice, send_task_info, send_all_tasks, tg_copy, extract_from_text, get_target_by_alias, send_bm_help, send_all_bookmarks, set_bookmark, unset_bookmark, clear_tasks, send_task_help, rm_task } diff --git a/src/tree.js b/src/tree.js new file mode 100644 index 0000000..51440e1 --- /dev/null +++ b/src/tree.js @@ -0,0 +1,115 @@ +module.exports = { gen_tree_html } + +function gen_tree_html (arr) { + const data = gen_tree_data(arr, is_gd_folder) + return tree_tpl(JSON.stringify(data)) +} + +function tree_tpl (str) { + return ` + + + + + + + Folder Tree + + + + + +
+ + + + +` +} + +function is_gd_folder (data) { + return data.mimeType === 'application/vnd.google-apps.folder' +} + +function gen_tree_data (data, is_folder) { + if (!data || !data.length) return [] + const folders = data.filter(is_folder) + const files = data.filter(v => !is_folder(v)) + const total_size = sum(files.map(v => v.size)) + const root = { + title: `/根目录 [共${files.length} 个文件(不包括文件夹), ${format_size(total_size)}]`, + key: data[0].parent + } + if (!folders.length) return [root] + const sub_folders = folders.filter(v => v.parent === folders[0].parent) + sub_folders.forEach(v => { + sum_files(v, data, is_folder) + count_files(v, data, is_folder) + }) + sort_folders(folders, 'count') + sort_folders(sub_folders, 'count') + folders.forEach(v => { + let {name, size, count, id} = v + if (name.length > 50) name = name.slice(0, 48) + '...' + v.title = `${name} | [共${count}个文件 ${format_size(size)}]` + }) + root.children = sub_folders.map(v => gen_node(v, folders)) + return [root] +} + +function sort_folders (folders, type) { + if (!folders || !folders.length) return + if (type === 'size') return folders.sort((a, b) => b.size - a.size) + if (type === 'count') return folders.sort((a, b) => b.count - a.count) +} + +function gen_node (v, folders) { + const {id, title, node} = v + if (node) return node + return v.node = { + title, + key: id, + children: v.children || folders.filter(vv => vv.parent === id).map(vv => gen_node(vv, folders)) + } +} + +function count_files (folder, arr, is_folder) { + if (folder.count) return folder.count + const children = arr.filter(v => v.parent === folder.id) + return folder.count = sum(children.map(v => { + if (is_folder(v)) return count_files(v, arr, is_folder) + return 1 + })) +} + +function sum_files (folder, arr, is_folder) { + if (folder.size) return folder.size + const children = arr.filter(v => v.parent === folder.id) + return folder.size = sum(children.map(v => { + if (is_folder(v)) return sum_files(v, arr, is_folder) + return v.size + })) +} + +function sum (arr) { + let result = 0 + for (const v of arr) { + result += Number(v) || 0 + } + return result +} + +function format_size (n) { + n = Number(n) + if (Number.isNaN(n)) return '' + if (n < 0) return 'invalid size' + const units = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'] + let flag = 0 + while (n >= 1024) { + n = n / 1024 + flag++ + } + return n.toFixed(2) + ' ' + units[flag] +} diff --git a/static/colab.png b/static/colab.png new file mode 100644 index 0000000..5a32572 Binary files /dev/null and b/static/colab.png differ diff --git a/static/tree.min.css b/static/tree.min.css new file mode 100644 index 0000000..a214184 --- /dev/null +++ b/static/tree.min.css @@ -0,0 +1 @@ +body,html{width:100%;height:100%}input::-ms-clear,input::-ms-reveal{display:none}*,:after,:before{-webkit-box-sizing:border-box;box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:rgba(0,0,0,0)}@-ms-viewport{width:device-width}article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;color:rgba(0,0,0,.65);font-size:14px;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,PingFang SC,Hiragino Sans GB,Microsoft YaHei,Helvetica Neue,Helvetica,Arial,sans-serif;font-variant:tabular-nums;line-height:1.5;background-color:#fff;-webkit-font-feature-settings:"tnum";font-feature-settings:"tnum"}[tabindex="-1"]:focus{outline:none!important}hr{-webkit-box-sizing:content-box;box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5em;color:rgba(0,0,0,.85);font-weight:500}p{margin-top:0;margin-bottom:1em}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;border-bottom:0;cursor:help}address{margin-bottom:1em;font-style:normal;line-height:inherit}input[type=number],input[type=password],input[type=text],textarea{-webkit-appearance:none}dl,ol,ul{margin-top:0;margin-bottom:1em}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:500}dd{margin-bottom:.5em;margin-left:0}blockquote{margin:0 0 1em}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#1890ff;text-decoration:none;background-color:transparent;outline:none;cursor:pointer;-webkit-transition:color .3s;-o-transition:color .3s;transition:color .3s;-webkit-text-decoration-skip:objects}a:hover{color:#40a9ff}a:active{color:#096dd9}a:active,a:hover{text-decoration:none;outline:0}a[disabled]{color:rgba(0,0,0,.25);cursor:not-allowed;pointer-events:none}code,kbd,pre,samp{font-size:1em;font-family:SFMono-Regular,Consolas,Liberation Mono,Menlo,Courier,monospace}pre{margin-top:0;margin-bottom:1em;overflow:auto}figure{margin:0 0 1em}img{vertical-align:middle;border-style:none}svg:not(:root){overflow:hidden}[role=button],a,area,button,input:not([type=range]),label,select,summary,textarea{-ms-touch-action:manipulation;touch-action:manipulation}table{border-collapse:collapse}caption{padding-top:.75em;padding-bottom:.3em;color:rgba(0,0,0,.45);text-align:left;caption-side:bottom}th{text-align:inherit}button,input,optgroup,select,textarea{margin:0;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;margin:0;padding:0;border:0}legend{display:block;width:100%;max-width:100%;margin-bottom:.5em;padding:0;color:inherit;font-size:1.5em;line-height:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item}template{display:none}[hidden]{display:none!important}mark{padding:.2em;background-color:#feffe6}::-moz-selection{color:#fff;background:#1890ff}::selection{color:#fff;background:#1890ff}.clearfix{zoom:1}.clearfix:after,.clearfix:before{display:table;content:""}.clearfix:after{clear:both}.anticon{display:inline-block;color:inherit;font-style:normal;line-height:0;text-align:center;text-transform:none;vertical-align:-.125em;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.anticon>*{line-height:1}.anticon svg{display:inline-block}.anticon:before{display:none}.anticon .anticon-icon{display:block}.anticon[tabindex]{cursor:pointer}.anticon-spin,.anticon-spin:before{display:inline-block;-webkit-animation:loadingCircle 1s infinite linear;animation:loadingCircle 1s infinite linear}.fade-appear,.fade-enter,.fade-leave{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-play-state:paused;animation-play-state:paused}.fade-appear.fade-appear-active,.fade-enter.fade-enter-active{-webkit-animation-name:antFadeIn;animation-name:antFadeIn;-webkit-animation-play-state:running;animation-play-state:running}.fade-leave.fade-leave-active{-webkit-animation-name:antFadeOut;animation-name:antFadeOut;-webkit-animation-play-state:running;animation-play-state:running;pointer-events:none}.fade-appear,.fade-enter{opacity:0}.fade-appear,.fade-enter,.fade-leave{-webkit-animation-timing-function:linear;animation-timing-function:linear}@-webkit-keyframes antFadeIn{0%{opacity:0}to{opacity:1}}@keyframes antFadeIn{0%{opacity:0}to{opacity:1}}@-webkit-keyframes antFadeOut{0%{opacity:1}to{opacity:0}}@keyframes antFadeOut{0%{opacity:1}to{opacity:0}}.move-up-appear,.move-up-enter,.move-up-leave{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-play-state:paused;animation-play-state:paused}.move-up-appear.move-up-appear-active,.move-up-enter.move-up-enter-active{-webkit-animation-name:antMoveUpIn;animation-name:antMoveUpIn;-webkit-animation-play-state:running;animation-play-state:running}.move-up-leave.move-up-leave-active{-webkit-animation-name:antMoveUpOut;animation-name:antMoveUpOut;-webkit-animation-play-state:running;animation-play-state:running;pointer-events:none}.move-up-appear,.move-up-enter{opacity:0;-webkit-animation-timing-function:cubic-bezier(.08,.82,.17,1);animation-timing-function:cubic-bezier(.08,.82,.17,1)}.move-up-leave{-webkit-animation-timing-function:cubic-bezier(.6,.04,.98,.34);animation-timing-function:cubic-bezier(.6,.04,.98,.34)}.move-down-appear,.move-down-enter,.move-down-leave{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-play-state:paused;animation-play-state:paused}.move-down-appear.move-down-appear-active,.move-down-enter.move-down-enter-active{-webkit-animation-name:antMoveDownIn;animation-name:antMoveDownIn;-webkit-animation-play-state:running;animation-play-state:running}.move-down-leave.move-down-leave-active{-webkit-animation-name:antMoveDownOut;animation-name:antMoveDownOut;-webkit-animation-play-state:running;animation-play-state:running;pointer-events:none}.move-down-appear,.move-down-enter{opacity:0;-webkit-animation-timing-function:cubic-bezier(.08,.82,.17,1);animation-timing-function:cubic-bezier(.08,.82,.17,1)}.move-down-leave{-webkit-animation-timing-function:cubic-bezier(.6,.04,.98,.34);animation-timing-function:cubic-bezier(.6,.04,.98,.34)}.move-left-appear,.move-left-enter,.move-left-leave{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-play-state:paused;animation-play-state:paused}.move-left-appear.move-left-appear-active,.move-left-enter.move-left-enter-active{-webkit-animation-name:antMoveLeftIn;animation-name:antMoveLeftIn;-webkit-animation-play-state:running;animation-play-state:running}.move-left-leave.move-left-leave-active{-webkit-animation-name:antMoveLeftOut;animation-name:antMoveLeftOut;-webkit-animation-play-state:running;animation-play-state:running;pointer-events:none}.move-left-appear,.move-left-enter{opacity:0;-webkit-animation-timing-function:cubic-bezier(.08,.82,.17,1);animation-timing-function:cubic-bezier(.08,.82,.17,1)}.move-left-leave{-webkit-animation-timing-function:cubic-bezier(.6,.04,.98,.34);animation-timing-function:cubic-bezier(.6,.04,.98,.34)}.move-right-appear,.move-right-enter,.move-right-leave{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-play-state:paused;animation-play-state:paused}.move-right-appear.move-right-appear-active,.move-right-enter.move-right-enter-active{-webkit-animation-name:antMoveRightIn;animation-name:antMoveRightIn;-webkit-animation-play-state:running;animation-play-state:running}.move-right-leave.move-right-leave-active{-webkit-animation-name:antMoveRightOut;animation-name:antMoveRightOut;-webkit-animation-play-state:running;animation-play-state:running;pointer-events:none}.move-right-appear,.move-right-enter{opacity:0;-webkit-animation-timing-function:cubic-bezier(.08,.82,.17,1);animation-timing-function:cubic-bezier(.08,.82,.17,1)}.move-right-leave{-webkit-animation-timing-function:cubic-bezier(.6,.04,.98,.34);animation-timing-function:cubic-bezier(.6,.04,.98,.34)}@-webkit-keyframes antMoveDownIn{0%{-webkit-transform:translateY(100%);transform:translateY(100%);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}to{-webkit-transform:translateY(0);transform:translateY(0);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}}@keyframes antMoveDownIn{0%{-webkit-transform:translateY(100%);transform:translateY(100%);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}to{-webkit-transform:translateY(0);transform:translateY(0);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}}@-webkit-keyframes antMoveDownOut{0%{-webkit-transform:translateY(0);transform:translateY(0);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}to{-webkit-transform:translateY(100%);transform:translateY(100%);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}}@keyframes antMoveDownOut{0%{-webkit-transform:translateY(0);transform:translateY(0);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}to{-webkit-transform:translateY(100%);transform:translateY(100%);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}}@-webkit-keyframes antMoveLeftIn{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}to{-webkit-transform:translateX(0);transform:translateX(0);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}}@keyframes antMoveLeftIn{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}to{-webkit-transform:translateX(0);transform:translateX(0);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}}@-webkit-keyframes antMoveLeftOut{0%{-webkit-transform:translateX(0);transform:translateX(0);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}to{-webkit-transform:translateX(-100%);transform:translateX(-100%);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}}@keyframes antMoveLeftOut{0%{-webkit-transform:translateX(0);transform:translateX(0);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}to{-webkit-transform:translateX(-100%);transform:translateX(-100%);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}}@-webkit-keyframes antMoveRightIn{0%{-webkit-transform:translateX(100%);transform:translateX(100%);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}to{-webkit-transform:translateX(0);transform:translateX(0);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}}@keyframes antMoveRightIn{0%{-webkit-transform:translateX(100%);transform:translateX(100%);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}to{-webkit-transform:translateX(0);transform:translateX(0);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}}@-webkit-keyframes antMoveRightOut{0%{-webkit-transform:translateX(0);transform:translateX(0);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}to{-webkit-transform:translateX(100%);transform:translateX(100%);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}}@keyframes antMoveRightOut{0%{-webkit-transform:translateX(0);transform:translateX(0);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}to{-webkit-transform:translateX(100%);transform:translateX(100%);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}}@-webkit-keyframes antMoveUpIn{0%{-webkit-transform:translateY(-100%);transform:translateY(-100%);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}to{-webkit-transform:translateY(0);transform:translateY(0);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}}@keyframes antMoveUpIn{0%{-webkit-transform:translateY(-100%);transform:translateY(-100%);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}to{-webkit-transform:translateY(0);transform:translateY(0);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}}@-webkit-keyframes antMoveUpOut{0%{-webkit-transform:translateY(0);transform:translateY(0);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}to{-webkit-transform:translateY(-100%);transform:translateY(-100%);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}}@keyframes antMoveUpOut{0%{-webkit-transform:translateY(0);transform:translateY(0);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}to{-webkit-transform:translateY(-100%);transform:translateY(-100%);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}}@-webkit-keyframes loadingCircle{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes loadingCircle{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}[ant-click-animating-without-extra-node=true],[ant-click-animating=true]{position:relative}html{--antd-wave-shadow-color:#1890ff}.ant-click-animating-node,[ant-click-animating-without-extra-node=true]:after{position:absolute;top:0;right:0;bottom:0;left:0;display:block;border-radius:inherit;-webkit-box-shadow:0 0 0 0 #1890ff;box-shadow:0 0 0 0 #1890ff;-webkit-box-shadow:0 0 0 0 var(--antd-wave-shadow-color);box-shadow:0 0 0 0 var(--antd-wave-shadow-color);opacity:.2;-webkit-animation:fadeEffect 2s cubic-bezier(.08,.82,.17,1),waveEffect .4s cubic-bezier(.08,.82,.17,1);animation:fadeEffect 2s cubic-bezier(.08,.82,.17,1),waveEffect .4s cubic-bezier(.08,.82,.17,1);-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;content:"";pointer-events:none}@-webkit-keyframes waveEffect{to{-webkit-box-shadow:0 0 0 #1890ff;box-shadow:0 0 0 #1890ff;-webkit-box-shadow:0 0 0 6px var(--antd-wave-shadow-color);box-shadow:0 0 0 6px var(--antd-wave-shadow-color)}}@keyframes waveEffect{to{-webkit-box-shadow:0 0 0 #1890ff;box-shadow:0 0 0 #1890ff;-webkit-box-shadow:0 0 0 6px var(--antd-wave-shadow-color);box-shadow:0 0 0 6px var(--antd-wave-shadow-color)}}@-webkit-keyframes fadeEffect{to{opacity:0}}@keyframes fadeEffect{to{opacity:0}}.slide-up-appear,.slide-up-enter,.slide-up-leave{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-play-state:paused;animation-play-state:paused}.slide-up-appear.slide-up-appear-active,.slide-up-enter.slide-up-enter-active{-webkit-animation-name:antSlideUpIn;animation-name:antSlideUpIn;-webkit-animation-play-state:running;animation-play-state:running}.slide-up-leave.slide-up-leave-active{-webkit-animation-name:antSlideUpOut;animation-name:antSlideUpOut;-webkit-animation-play-state:running;animation-play-state:running;pointer-events:none}.slide-up-appear,.slide-up-enter{opacity:0;-webkit-animation-timing-function:cubic-bezier(.23,1,.32,1);animation-timing-function:cubic-bezier(.23,1,.32,1)}.slide-up-leave{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06)}.slide-down-appear,.slide-down-enter,.slide-down-leave{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-play-state:paused;animation-play-state:paused}.slide-down-appear.slide-down-appear-active,.slide-down-enter.slide-down-enter-active{-webkit-animation-name:antSlideDownIn;animation-name:antSlideDownIn;-webkit-animation-play-state:running;animation-play-state:running}.slide-down-leave.slide-down-leave-active{-webkit-animation-name:antSlideDownOut;animation-name:antSlideDownOut;-webkit-animation-play-state:running;animation-play-state:running;pointer-events:none}.slide-down-appear,.slide-down-enter{opacity:0;-webkit-animation-timing-function:cubic-bezier(.23,1,.32,1);animation-timing-function:cubic-bezier(.23,1,.32,1)}.slide-down-leave{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06)}.slide-left-appear,.slide-left-enter,.slide-left-leave{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-play-state:paused;animation-play-state:paused}.slide-left-appear.slide-left-appear-active,.slide-left-enter.slide-left-enter-active{-webkit-animation-name:antSlideLeftIn;animation-name:antSlideLeftIn;-webkit-animation-play-state:running;animation-play-state:running}.slide-left-leave.slide-left-leave-active{-webkit-animation-name:antSlideLeftOut;animation-name:antSlideLeftOut;-webkit-animation-play-state:running;animation-play-state:running;pointer-events:none}.slide-left-appear,.slide-left-enter{opacity:0;-webkit-animation-timing-function:cubic-bezier(.23,1,.32,1);animation-timing-function:cubic-bezier(.23,1,.32,1)}.slide-left-leave{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06)}.slide-right-appear,.slide-right-enter,.slide-right-leave{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-play-state:paused;animation-play-state:paused}.slide-right-appear.slide-right-appear-active,.slide-right-enter.slide-right-enter-active{-webkit-animation-name:antSlideRightIn;animation-name:antSlideRightIn;-webkit-animation-play-state:running;animation-play-state:running}.slide-right-leave.slide-right-leave-active{-webkit-animation-name:antSlideRightOut;animation-name:antSlideRightOut;-webkit-animation-play-state:running;animation-play-state:running;pointer-events:none}.slide-right-appear,.slide-right-enter{opacity:0;-webkit-animation-timing-function:cubic-bezier(.23,1,.32,1);animation-timing-function:cubic-bezier(.23,1,.32,1)}.slide-right-leave{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06)}@-webkit-keyframes antSlideUpIn{0%{-webkit-transform:scaleY(.8);transform:scaleY(.8);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}to{-webkit-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}}@keyframes antSlideUpIn{0%{-webkit-transform:scaleY(.8);transform:scaleY(.8);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}to{-webkit-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}}@-webkit-keyframes antSlideUpOut{0%{-webkit-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}to{-webkit-transform:scaleY(.8);transform:scaleY(.8);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}}@keyframes antSlideUpOut{0%{-webkit-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}to{-webkit-transform:scaleY(.8);transform:scaleY(.8);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}}@-webkit-keyframes antSlideDownIn{0%{-webkit-transform:scaleY(.8);transform:scaleY(.8);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;opacity:0}to{-webkit-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;opacity:1}}@keyframes antSlideDownIn{0%{-webkit-transform:scaleY(.8);transform:scaleY(.8);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;opacity:0}to{-webkit-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;opacity:1}}@-webkit-keyframes antSlideDownOut{0%{-webkit-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;opacity:1}to{-webkit-transform:scaleY(.8);transform:scaleY(.8);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;opacity:0}}@keyframes antSlideDownOut{0%{-webkit-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;opacity:1}to{-webkit-transform:scaleY(.8);transform:scaleY(.8);-webkit-transform-origin:100% 100%;transform-origin:100% 100%;opacity:0}}@-webkit-keyframes antSlideLeftIn{0%{-webkit-transform:scaleX(.8);transform:scaleX(.8);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}to{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}}@keyframes antSlideLeftIn{0%{-webkit-transform:scaleX(.8);transform:scaleX(.8);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}to{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}}@-webkit-keyframes antSlideLeftOut{0%{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}to{-webkit-transform:scaleX(.8);transform:scaleX(.8);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}}@keyframes antSlideLeftOut{0%{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:1}to{-webkit-transform:scaleX(.8);transform:scaleX(.8);-webkit-transform-origin:0 0;transform-origin:0 0;opacity:0}}@-webkit-keyframes antSlideRightIn{0%{-webkit-transform:scaleX(.8);transform:scaleX(.8);-webkit-transform-origin:100% 0;transform-origin:100% 0;opacity:0}to{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transform-origin:100% 0;transform-origin:100% 0;opacity:1}}@keyframes antSlideRightIn{0%{-webkit-transform:scaleX(.8);transform:scaleX(.8);-webkit-transform-origin:100% 0;transform-origin:100% 0;opacity:0}to{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transform-origin:100% 0;transform-origin:100% 0;opacity:1}}@-webkit-keyframes antSlideRightOut{0%{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transform-origin:100% 0;transform-origin:100% 0;opacity:1}to{-webkit-transform:scaleX(.8);transform:scaleX(.8);-webkit-transform-origin:100% 0;transform-origin:100% 0;opacity:0}}@keyframes antSlideRightOut{0%{-webkit-transform:scaleX(1);transform:scaleX(1);-webkit-transform-origin:100% 0;transform-origin:100% 0;opacity:1}to{-webkit-transform:scaleX(.8);transform:scaleX(.8);-webkit-transform-origin:100% 0;transform-origin:100% 0;opacity:0}}.swing-appear,.swing-enter{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-play-state:paused;animation-play-state:paused}.swing-appear.swing-appear-active,.swing-enter.swing-enter-active{-webkit-animation-name:antSwingIn;animation-name:antSwingIn;-webkit-animation-play-state:running;animation-play-state:running}@-webkit-keyframes antSwingIn{0%,to{-webkit-transform:translateX(0);transform:translateX(0)}20%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}40%{-webkit-transform:translateX(10px);transform:translateX(10px)}60%{-webkit-transform:translateX(-5px);transform:translateX(-5px)}80%{-webkit-transform:translateX(5px);transform:translateX(5px)}}@keyframes antSwingIn{0%,to{-webkit-transform:translateX(0);transform:translateX(0)}20%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}40%{-webkit-transform:translateX(10px);transform:translateX(10px)}60%{-webkit-transform:translateX(-5px);transform:translateX(-5px)}80%{-webkit-transform:translateX(5px);transform:translateX(5px)}}.zoom-appear,.zoom-enter,.zoom-leave{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-play-state:paused;animation-play-state:paused}.zoom-appear.zoom-appear-active,.zoom-enter.zoom-enter-active{-webkit-animation-name:antZoomIn;animation-name:antZoomIn;-webkit-animation-play-state:running;animation-play-state:running}.zoom-leave.zoom-leave-active{-webkit-animation-name:antZoomOut;animation-name:antZoomOut;-webkit-animation-play-state:running;animation-play-state:running;pointer-events:none}.zoom-appear,.zoom-enter{-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);opacity:0;-webkit-animation-timing-function:cubic-bezier(.08,.82,.17,1);animation-timing-function:cubic-bezier(.08,.82,.17,1)}.zoom-leave{-webkit-animation-timing-function:cubic-bezier(.78,.14,.15,.86);animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.zoom-big-appear,.zoom-big-enter,.zoom-big-leave{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-play-state:paused;animation-play-state:paused}.zoom-big-appear.zoom-big-appear-active,.zoom-big-enter.zoom-big-enter-active{-webkit-animation-name:antZoomBigIn;animation-name:antZoomBigIn;-webkit-animation-play-state:running;animation-play-state:running}.zoom-big-leave.zoom-big-leave-active{-webkit-animation-name:antZoomBigOut;animation-name:antZoomBigOut;-webkit-animation-play-state:running;animation-play-state:running;pointer-events:none}.zoom-big-appear,.zoom-big-enter{-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);opacity:0;-webkit-animation-timing-function:cubic-bezier(.08,.82,.17,1);animation-timing-function:cubic-bezier(.08,.82,.17,1)}.zoom-big-leave{-webkit-animation-timing-function:cubic-bezier(.78,.14,.15,.86);animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.zoom-big-fast-appear,.zoom-big-fast-enter,.zoom-big-fast-leave{-webkit-animation-duration:.1s;animation-duration:.1s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-play-state:paused;animation-play-state:paused}.zoom-big-fast-appear.zoom-big-fast-appear-active,.zoom-big-fast-enter.zoom-big-fast-enter-active{-webkit-animation-name:antZoomBigIn;animation-name:antZoomBigIn;-webkit-animation-play-state:running;animation-play-state:running}.zoom-big-fast-leave.zoom-big-fast-leave-active{-webkit-animation-name:antZoomBigOut;animation-name:antZoomBigOut;-webkit-animation-play-state:running;animation-play-state:running;pointer-events:none}.zoom-big-fast-appear,.zoom-big-fast-enter{-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);opacity:0;-webkit-animation-timing-function:cubic-bezier(.08,.82,.17,1);animation-timing-function:cubic-bezier(.08,.82,.17,1)}.zoom-big-fast-leave{-webkit-animation-timing-function:cubic-bezier(.78,.14,.15,.86);animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.zoom-up-appear,.zoom-up-enter,.zoom-up-leave{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-play-state:paused;animation-play-state:paused}.zoom-up-appear.zoom-up-appear-active,.zoom-up-enter.zoom-up-enter-active{-webkit-animation-name:antZoomUpIn;animation-name:antZoomUpIn;-webkit-animation-play-state:running;animation-play-state:running}.zoom-up-leave.zoom-up-leave-active{-webkit-animation-name:antZoomUpOut;animation-name:antZoomUpOut;-webkit-animation-play-state:running;animation-play-state:running;pointer-events:none}.zoom-up-appear,.zoom-up-enter{-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);opacity:0;-webkit-animation-timing-function:cubic-bezier(.08,.82,.17,1);animation-timing-function:cubic-bezier(.08,.82,.17,1)}.zoom-up-leave{-webkit-animation-timing-function:cubic-bezier(.78,.14,.15,.86);animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.zoom-down-appear,.zoom-down-enter,.zoom-down-leave{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-play-state:paused;animation-play-state:paused}.zoom-down-appear.zoom-down-appear-active,.zoom-down-enter.zoom-down-enter-active{-webkit-animation-name:antZoomDownIn;animation-name:antZoomDownIn;-webkit-animation-play-state:running;animation-play-state:running}.zoom-down-leave.zoom-down-leave-active{-webkit-animation-name:antZoomDownOut;animation-name:antZoomDownOut;-webkit-animation-play-state:running;animation-play-state:running;pointer-events:none}.zoom-down-appear,.zoom-down-enter{-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);opacity:0;-webkit-animation-timing-function:cubic-bezier(.08,.82,.17,1);animation-timing-function:cubic-bezier(.08,.82,.17,1)}.zoom-down-leave{-webkit-animation-timing-function:cubic-bezier(.78,.14,.15,.86);animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.zoom-left-appear,.zoom-left-enter,.zoom-left-leave{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-play-state:paused;animation-play-state:paused}.zoom-left-appear.zoom-left-appear-active,.zoom-left-enter.zoom-left-enter-active{-webkit-animation-name:antZoomLeftIn;animation-name:antZoomLeftIn;-webkit-animation-play-state:running;animation-play-state:running}.zoom-left-leave.zoom-left-leave-active{-webkit-animation-name:antZoomLeftOut;animation-name:antZoomLeftOut;-webkit-animation-play-state:running;animation-play-state:running;pointer-events:none}.zoom-left-appear,.zoom-left-enter{-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);opacity:0;-webkit-animation-timing-function:cubic-bezier(.08,.82,.17,1);animation-timing-function:cubic-bezier(.08,.82,.17,1)}.zoom-left-leave{-webkit-animation-timing-function:cubic-bezier(.78,.14,.15,.86);animation-timing-function:cubic-bezier(.78,.14,.15,.86)}.zoom-right-appear,.zoom-right-enter,.zoom-right-leave{-webkit-animation-duration:.2s;animation-duration:.2s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-play-state:paused;animation-play-state:paused}.zoom-right-appear.zoom-right-appear-active,.zoom-right-enter.zoom-right-enter-active{-webkit-animation-name:antZoomRightIn;animation-name:antZoomRightIn;-webkit-animation-play-state:running;animation-play-state:running}.zoom-right-leave.zoom-right-leave-active{-webkit-animation-name:antZoomRightOut;animation-name:antZoomRightOut;-webkit-animation-play-state:running;animation-play-state:running;pointer-events:none}.zoom-right-appear,.zoom-right-enter{-webkit-transform:scale(0);-ms-transform:scale(0);transform:scale(0);opacity:0;-webkit-animation-timing-function:cubic-bezier(.08,.82,.17,1);animation-timing-function:cubic-bezier(.08,.82,.17,1)}.zoom-right-leave{-webkit-animation-timing-function:cubic-bezier(.78,.14,.15,.86);animation-timing-function:cubic-bezier(.78,.14,.15,.86)}@-webkit-keyframes antZoomIn{0%{-webkit-transform:scale(.2);transform:scale(.2);opacity:0}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes antZoomIn{0%{-webkit-transform:scale(.2);transform:scale(.2);opacity:0}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@-webkit-keyframes antZoomOut{0%{-webkit-transform:scale(1);transform:scale(1)}to{-webkit-transform:scale(.2);transform:scale(.2);opacity:0}}@keyframes antZoomOut{0%{-webkit-transform:scale(1);transform:scale(1)}to{-webkit-transform:scale(.2);transform:scale(.2);opacity:0}}@-webkit-keyframes antZoomBigIn{0%{-webkit-transform:scale(.8);transform:scale(.8);opacity:0}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes antZoomBigIn{0%{-webkit-transform:scale(.8);transform:scale(.8);opacity:0}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@-webkit-keyframes antZoomBigOut{0%{-webkit-transform:scale(1);transform:scale(1)}to{-webkit-transform:scale(.8);transform:scale(.8);opacity:0}}@keyframes antZoomBigOut{0%{-webkit-transform:scale(1);transform:scale(1)}to{-webkit-transform:scale(.8);transform:scale(.8);opacity:0}}@-webkit-keyframes antZoomUpIn{0%{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:50% 0;transform-origin:50% 0;opacity:0}to{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:50% 0;transform-origin:50% 0}}@keyframes antZoomUpIn{0%{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:50% 0;transform-origin:50% 0;opacity:0}to{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:50% 0;transform-origin:50% 0}}@-webkit-keyframes antZoomUpOut{0%{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:50% 0;transform-origin:50% 0}to{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:50% 0;transform-origin:50% 0;opacity:0}}@keyframes antZoomUpOut{0%{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:50% 0;transform-origin:50% 0}to{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:50% 0;transform-origin:50% 0;opacity:0}}@-webkit-keyframes antZoomLeftIn{0%{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:0 50%;transform-origin:0 50%;opacity:0}to{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:0 50%;transform-origin:0 50%}}@keyframes antZoomLeftIn{0%{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:0 50%;transform-origin:0 50%;opacity:0}to{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:0 50%;transform-origin:0 50%}}@-webkit-keyframes antZoomLeftOut{0%{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:0 50%;transform-origin:0 50%}to{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:0 50%;transform-origin:0 50%;opacity:0}}@keyframes antZoomLeftOut{0%{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:0 50%;transform-origin:0 50%}to{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:0 50%;transform-origin:0 50%;opacity:0}}@-webkit-keyframes antZoomRightIn{0%{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:100% 50%;transform-origin:100% 50%;opacity:0}to{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:100% 50%;transform-origin:100% 50%}}@keyframes antZoomRightIn{0%{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:100% 50%;transform-origin:100% 50%;opacity:0}to{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:100% 50%;transform-origin:100% 50%}}@-webkit-keyframes antZoomRightOut{0%{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:100% 50%;transform-origin:100% 50%}to{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:100% 50%;transform-origin:100% 50%;opacity:0}}@keyframes antZoomRightOut{0%{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:100% 50%;transform-origin:100% 50%}to{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:100% 50%;transform-origin:100% 50%;opacity:0}}@-webkit-keyframes antZoomDownIn{0%{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:50% 100%;transform-origin:50% 100%;opacity:0}to{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:50% 100%;transform-origin:50% 100%}}@keyframes antZoomDownIn{0%{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:50% 100%;transform-origin:50% 100%;opacity:0}to{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:50% 100%;transform-origin:50% 100%}}@-webkit-keyframes antZoomDownOut{0%{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:50% 100%;transform-origin:50% 100%}to{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:50% 100%;transform-origin:50% 100%;opacity:0}}@keyframes antZoomDownOut{0%{-webkit-transform:scale(1);transform:scale(1);-webkit-transform-origin:50% 100%;transform-origin:50% 100%}to{-webkit-transform:scale(.8);transform:scale(.8);-webkit-transform-origin:50% 100%;transform-origin:50% 100%;opacity:0}}.ant-motion-collapse-legacy{overflow:hidden}.ant-motion-collapse,.ant-motion-collapse-legacy-active{-webkit-transition:height .15s cubic-bezier(.645,.045,.355,1),opacity .15s cubic-bezier(.645,.045,.355,1)!important;-o-transition:height .15s cubic-bezier(.645,.045,.355,1),opacity .15s cubic-bezier(.645,.045,.355,1)!important;transition:height .15s cubic-bezier(.645,.045,.355,1),opacity .15s cubic-bezier(.645,.045,.355,1)!important}.ant-motion-collapse{overflow:hidden}.ant-btn{line-height:1.499;position:relative;display:inline-block;font-weight:400;white-space:nowrap;text-align:center;background-image:none;border:1px solid transparent;-webkit-box-shadow:0 2px 0 rgba(0,0,0,.015);box-shadow:0 2px 0 rgba(0,0,0,.015);cursor:pointer;-webkit-transition:all .3s cubic-bezier(.645,.045,.355,1);-o-transition:all .3s cubic-bezier(.645,.045,.355,1);transition:all .3s cubic-bezier(.645,.045,.355,1);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-ms-touch-action:manipulation;touch-action:manipulation;height:32px;padding:0 15px;font-size:14px;border-radius:4px;color:rgba(0,0,0,.65);background-color:#fff;border-color:#d9d9d9}.ant-btn>.anticon{line-height:1}.ant-btn,.ant-btn:active,.ant-btn:focus{outline:0}.ant-btn:not([disabled]):hover{text-decoration:none}.ant-btn:not([disabled]):active{outline:0;-webkit-box-shadow:none;box-shadow:none}.ant-btn.disabled,.ant-btn[disabled]{cursor:not-allowed}.ant-btn.disabled>*,.ant-btn[disabled]>*{pointer-events:none}.ant-btn-lg{height:40px;padding:0 15px;font-size:16px;border-radius:4px}.ant-btn-sm{height:24px;padding:0 7px;font-size:14px;border-radius:4px}.ant-btn>a:only-child{color:currentColor}.ant-btn>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn:focus,.ant-btn:hover{color:#40a9ff;background-color:#fff;border-color:#40a9ff}.ant-btn:focus>a:only-child,.ant-btn:hover>a:only-child{color:currentColor}.ant-btn:focus>a:only-child:after,.ant-btn:hover>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn.active,.ant-btn:active{color:#096dd9;background-color:#fff;border-color:#096dd9}.ant-btn.active>a:only-child,.ant-btn:active>a:only-child{color:currentColor}.ant-btn.active>a:only-child:after,.ant-btn:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-disabled,.ant-btn-disabled.active,.ant-btn-disabled:active,.ant-btn-disabled:focus,.ant-btn-disabled:hover,.ant-btn.disabled,.ant-btn.disabled.active,.ant-btn.disabled:active,.ant-btn.disabled:focus,.ant-btn.disabled:hover,.ant-btn[disabled],.ant-btn[disabled].active,.ant-btn[disabled]:active,.ant-btn[disabled]:focus,.ant-btn[disabled]:hover{color:rgba(0,0,0,.25);background-color:#f5f5f5;border-color:#d9d9d9;text-shadow:none;-webkit-box-shadow:none;box-shadow:none}.ant-btn-disabled.active>a:only-child,.ant-btn-disabled:active>a:only-child,.ant-btn-disabled:focus>a:only-child,.ant-btn-disabled:hover>a:only-child,.ant-btn-disabled>a:only-child,.ant-btn.disabled.active>a:only-child,.ant-btn.disabled:active>a:only-child,.ant-btn.disabled:focus>a:only-child,.ant-btn.disabled:hover>a:only-child,.ant-btn.disabled>a:only-child,.ant-btn[disabled].active>a:only-child,.ant-btn[disabled]:active>a:only-child,.ant-btn[disabled]:focus>a:only-child,.ant-btn[disabled]:hover>a:only-child,.ant-btn[disabled]>a:only-child{color:currentColor}.ant-btn-disabled.active>a:only-child:after,.ant-btn-disabled:active>a:only-child:after,.ant-btn-disabled:focus>a:only-child:after,.ant-btn-disabled:hover>a:only-child:after,.ant-btn-disabled>a:only-child:after,.ant-btn.disabled.active>a:only-child:after,.ant-btn.disabled:active>a:only-child:after,.ant-btn.disabled:focus>a:only-child:after,.ant-btn.disabled:hover>a:only-child:after,.ant-btn.disabled>a:only-child:after,.ant-btn[disabled].active>a:only-child:after,.ant-btn[disabled]:active>a:only-child:after,.ant-btn[disabled]:focus>a:only-child:after,.ant-btn[disabled]:hover>a:only-child:after,.ant-btn[disabled]>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn.active,.ant-btn:active,.ant-btn:focus,.ant-btn:hover{text-decoration:none;background:#fff}.ant-btn>i,.ant-btn>span{display:inline-block;-webkit-transition:margin-left .3s cubic-bezier(.645,.045,.355,1);-o-transition:margin-left .3s cubic-bezier(.645,.045,.355,1);transition:margin-left .3s cubic-bezier(.645,.045,.355,1);pointer-events:none}.ant-btn-primary{color:#fff;background-color:#1890ff;border-color:#1890ff;text-shadow:0 -1px 0 rgba(0,0,0,.12);-webkit-box-shadow:0 2px 0 rgba(0,0,0,.045);box-shadow:0 2px 0 rgba(0,0,0,.045)}.ant-btn-primary>a:only-child{color:currentColor}.ant-btn-primary>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-primary:focus,.ant-btn-primary:hover{color:#fff;background-color:#40a9ff;border-color:#40a9ff}.ant-btn-primary:focus>a:only-child,.ant-btn-primary:hover>a:only-child{color:currentColor}.ant-btn-primary:focus>a:only-child:after,.ant-btn-primary:hover>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-primary.active,.ant-btn-primary:active{color:#fff;background-color:#096dd9;border-color:#096dd9}.ant-btn-primary.active>a:only-child,.ant-btn-primary:active>a:only-child{color:currentColor}.ant-btn-primary.active>a:only-child:after,.ant-btn-primary:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-primary-disabled,.ant-btn-primary-disabled.active,.ant-btn-primary-disabled:active,.ant-btn-primary-disabled:focus,.ant-btn-primary-disabled:hover,.ant-btn-primary.disabled,.ant-btn-primary.disabled.active,.ant-btn-primary.disabled:active,.ant-btn-primary.disabled:focus,.ant-btn-primary.disabled:hover,.ant-btn-primary[disabled],.ant-btn-primary[disabled].active,.ant-btn-primary[disabled]:active,.ant-btn-primary[disabled]:focus,.ant-btn-primary[disabled]:hover{color:rgba(0,0,0,.25);background-color:#f5f5f5;border-color:#d9d9d9;text-shadow:none;-webkit-box-shadow:none;box-shadow:none}.ant-btn-primary-disabled.active>a:only-child,.ant-btn-primary-disabled:active>a:only-child,.ant-btn-primary-disabled:focus>a:only-child,.ant-btn-primary-disabled:hover>a:only-child,.ant-btn-primary-disabled>a:only-child,.ant-btn-primary.disabled.active>a:only-child,.ant-btn-primary.disabled:active>a:only-child,.ant-btn-primary.disabled:focus>a:only-child,.ant-btn-primary.disabled:hover>a:only-child,.ant-btn-primary.disabled>a:only-child,.ant-btn-primary[disabled].active>a:only-child,.ant-btn-primary[disabled]:active>a:only-child,.ant-btn-primary[disabled]:focus>a:only-child,.ant-btn-primary[disabled]:hover>a:only-child,.ant-btn-primary[disabled]>a:only-child{color:currentColor}.ant-btn-primary-disabled.active>a:only-child:after,.ant-btn-primary-disabled:active>a:only-child:after,.ant-btn-primary-disabled:focus>a:only-child:after,.ant-btn-primary-disabled:hover>a:only-child:after,.ant-btn-primary-disabled>a:only-child:after,.ant-btn-primary.disabled.active>a:only-child:after,.ant-btn-primary.disabled:active>a:only-child:after,.ant-btn-primary.disabled:focus>a:only-child:after,.ant-btn-primary.disabled:hover>a:only-child:after,.ant-btn-primary.disabled>a:only-child:after,.ant-btn-primary[disabled].active>a:only-child:after,.ant-btn-primary[disabled]:active>a:only-child:after,.ant-btn-primary[disabled]:focus>a:only-child:after,.ant-btn-primary[disabled]:hover>a:only-child:after,.ant-btn-primary[disabled]>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-group .ant-btn-primary:not(:first-child):not(:last-child){border-right-color:#40a9ff;border-left-color:#40a9ff}.ant-btn-group .ant-btn-primary:not(:first-child):not(:last-child):disabled{border-color:#d9d9d9}.ant-btn-group .ant-btn-primary:first-child:not(:last-child){border-right-color:#40a9ff}.ant-btn-group .ant-btn-primary:first-child:not(:last-child)[disabled]{border-right-color:#d9d9d9}.ant-btn-group .ant-btn-primary+.ant-btn-primary,.ant-btn-group .ant-btn-primary:last-child:not(:first-child){border-left-color:#40a9ff}.ant-btn-group .ant-btn-primary+.ant-btn-primary[disabled],.ant-btn-group .ant-btn-primary:last-child:not(:first-child)[disabled]{border-left-color:#d9d9d9}.ant-btn-ghost{color:rgba(0,0,0,.65);background-color:transparent;border-color:#d9d9d9}.ant-btn-ghost>a:only-child{color:currentColor}.ant-btn-ghost>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-ghost:focus,.ant-btn-ghost:hover{color:#40a9ff;background-color:transparent;border-color:#40a9ff}.ant-btn-ghost:focus>a:only-child,.ant-btn-ghost:hover>a:only-child{color:currentColor}.ant-btn-ghost:focus>a:only-child:after,.ant-btn-ghost:hover>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-ghost.active,.ant-btn-ghost:active{color:#096dd9;background-color:transparent;border-color:#096dd9}.ant-btn-ghost.active>a:only-child,.ant-btn-ghost:active>a:only-child{color:currentColor}.ant-btn-ghost.active>a:only-child:after,.ant-btn-ghost:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-ghost-disabled,.ant-btn-ghost-disabled.active,.ant-btn-ghost-disabled:active,.ant-btn-ghost-disabled:focus,.ant-btn-ghost-disabled:hover,.ant-btn-ghost.disabled,.ant-btn-ghost.disabled.active,.ant-btn-ghost.disabled:active,.ant-btn-ghost.disabled:focus,.ant-btn-ghost.disabled:hover,.ant-btn-ghost[disabled],.ant-btn-ghost[disabled].active,.ant-btn-ghost[disabled]:active,.ant-btn-ghost[disabled]:focus,.ant-btn-ghost[disabled]:hover{color:rgba(0,0,0,.25);background-color:#f5f5f5;border-color:#d9d9d9;text-shadow:none;-webkit-box-shadow:none;box-shadow:none}.ant-btn-ghost-disabled.active>a:only-child,.ant-btn-ghost-disabled:active>a:only-child,.ant-btn-ghost-disabled:focus>a:only-child,.ant-btn-ghost-disabled:hover>a:only-child,.ant-btn-ghost-disabled>a:only-child,.ant-btn-ghost.disabled.active>a:only-child,.ant-btn-ghost.disabled:active>a:only-child,.ant-btn-ghost.disabled:focus>a:only-child,.ant-btn-ghost.disabled:hover>a:only-child,.ant-btn-ghost.disabled>a:only-child,.ant-btn-ghost[disabled].active>a:only-child,.ant-btn-ghost[disabled]:active>a:only-child,.ant-btn-ghost[disabled]:focus>a:only-child,.ant-btn-ghost[disabled]:hover>a:only-child,.ant-btn-ghost[disabled]>a:only-child{color:currentColor}.ant-btn-ghost-disabled.active>a:only-child:after,.ant-btn-ghost-disabled:active>a:only-child:after,.ant-btn-ghost-disabled:focus>a:only-child:after,.ant-btn-ghost-disabled:hover>a:only-child:after,.ant-btn-ghost-disabled>a:only-child:after,.ant-btn-ghost.disabled.active>a:only-child:after,.ant-btn-ghost.disabled:active>a:only-child:after,.ant-btn-ghost.disabled:focus>a:only-child:after,.ant-btn-ghost.disabled:hover>a:only-child:after,.ant-btn-ghost.disabled>a:only-child:after,.ant-btn-ghost[disabled].active>a:only-child:after,.ant-btn-ghost[disabled]:active>a:only-child:after,.ant-btn-ghost[disabled]:focus>a:only-child:after,.ant-btn-ghost[disabled]:hover>a:only-child:after,.ant-btn-ghost[disabled]>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dashed{color:rgba(0,0,0,.65);background-color:#fff;border-color:#d9d9d9;border-style:dashed}.ant-btn-dashed>a:only-child{color:currentColor}.ant-btn-dashed>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dashed:focus,.ant-btn-dashed:hover{color:#40a9ff;background-color:#fff;border-color:#40a9ff}.ant-btn-dashed:focus>a:only-child,.ant-btn-dashed:hover>a:only-child{color:currentColor}.ant-btn-dashed:focus>a:only-child:after,.ant-btn-dashed:hover>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dashed.active,.ant-btn-dashed:active{color:#096dd9;background-color:#fff;border-color:#096dd9}.ant-btn-dashed.active>a:only-child,.ant-btn-dashed:active>a:only-child{color:currentColor}.ant-btn-dashed.active>a:only-child:after,.ant-btn-dashed:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-dashed-disabled,.ant-btn-dashed-disabled.active,.ant-btn-dashed-disabled:active,.ant-btn-dashed-disabled:focus,.ant-btn-dashed-disabled:hover,.ant-btn-dashed.disabled,.ant-btn-dashed.disabled.active,.ant-btn-dashed.disabled:active,.ant-btn-dashed.disabled:focus,.ant-btn-dashed.disabled:hover,.ant-btn-dashed[disabled],.ant-btn-dashed[disabled].active,.ant-btn-dashed[disabled]:active,.ant-btn-dashed[disabled]:focus,.ant-btn-dashed[disabled]:hover{color:rgba(0,0,0,.25);background-color:#f5f5f5;border-color:#d9d9d9;text-shadow:none;-webkit-box-shadow:none;box-shadow:none}.ant-btn-dashed-disabled.active>a:only-child,.ant-btn-dashed-disabled:active>a:only-child,.ant-btn-dashed-disabled:focus>a:only-child,.ant-btn-dashed-disabled:hover>a:only-child,.ant-btn-dashed-disabled>a:only-child,.ant-btn-dashed.disabled.active>a:only-child,.ant-btn-dashed.disabled:active>a:only-child,.ant-btn-dashed.disabled:focus>a:only-child,.ant-btn-dashed.disabled:hover>a:only-child,.ant-btn-dashed.disabled>a:only-child,.ant-btn-dashed[disabled].active>a:only-child,.ant-btn-dashed[disabled]:active>a:only-child,.ant-btn-dashed[disabled]:focus>a:only-child,.ant-btn-dashed[disabled]:hover>a:only-child,.ant-btn-dashed[disabled]>a:only-child{color:currentColor}.ant-btn-dashed-disabled.active>a:only-child:after,.ant-btn-dashed-disabled:active>a:only-child:after,.ant-btn-dashed-disabled:focus>a:only-child:after,.ant-btn-dashed-disabled:hover>a:only-child:after,.ant-btn-dashed-disabled>a:only-child:after,.ant-btn-dashed.disabled.active>a:only-child:after,.ant-btn-dashed.disabled:active>a:only-child:after,.ant-btn-dashed.disabled:focus>a:only-child:after,.ant-btn-dashed.disabled:hover>a:only-child:after,.ant-btn-dashed.disabled>a:only-child:after,.ant-btn-dashed[disabled].active>a:only-child:after,.ant-btn-dashed[disabled]:active>a:only-child:after,.ant-btn-dashed[disabled]:focus>a:only-child:after,.ant-btn-dashed[disabled]:hover>a:only-child:after,.ant-btn-dashed[disabled]>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-danger{color:#fff;background-color:#ff4d4f;border-color:#ff4d4f;text-shadow:0 -1px 0 rgba(0,0,0,.12);-webkit-box-shadow:0 2px 0 rgba(0,0,0,.045);box-shadow:0 2px 0 rgba(0,0,0,.045)}.ant-btn-danger>a:only-child{color:currentColor}.ant-btn-danger>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-danger:focus,.ant-btn-danger:hover{color:#fff;background-color:#ff7875;border-color:#ff7875}.ant-btn-danger:focus>a:only-child,.ant-btn-danger:hover>a:only-child{color:currentColor}.ant-btn-danger:focus>a:only-child:after,.ant-btn-danger:hover>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-danger.active,.ant-btn-danger:active{color:#fff;background-color:#d9363e;border-color:#d9363e}.ant-btn-danger.active>a:only-child,.ant-btn-danger:active>a:only-child{color:currentColor}.ant-btn-danger.active>a:only-child:after,.ant-btn-danger:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-danger-disabled,.ant-btn-danger-disabled.active,.ant-btn-danger-disabled:active,.ant-btn-danger-disabled:focus,.ant-btn-danger-disabled:hover,.ant-btn-danger.disabled,.ant-btn-danger.disabled.active,.ant-btn-danger.disabled:active,.ant-btn-danger.disabled:focus,.ant-btn-danger.disabled:hover,.ant-btn-danger[disabled],.ant-btn-danger[disabled].active,.ant-btn-danger[disabled]:active,.ant-btn-danger[disabled]:focus,.ant-btn-danger[disabled]:hover{color:rgba(0,0,0,.25);background-color:#f5f5f5;border-color:#d9d9d9;text-shadow:none;-webkit-box-shadow:none;box-shadow:none}.ant-btn-danger-disabled.active>a:only-child,.ant-btn-danger-disabled:active>a:only-child,.ant-btn-danger-disabled:focus>a:only-child,.ant-btn-danger-disabled:hover>a:only-child,.ant-btn-danger-disabled>a:only-child,.ant-btn-danger.disabled.active>a:only-child,.ant-btn-danger.disabled:active>a:only-child,.ant-btn-danger.disabled:focus>a:only-child,.ant-btn-danger.disabled:hover>a:only-child,.ant-btn-danger.disabled>a:only-child,.ant-btn-danger[disabled].active>a:only-child,.ant-btn-danger[disabled]:active>a:only-child,.ant-btn-danger[disabled]:focus>a:only-child,.ant-btn-danger[disabled]:hover>a:only-child,.ant-btn-danger[disabled]>a:only-child{color:currentColor}.ant-btn-danger-disabled.active>a:only-child:after,.ant-btn-danger-disabled:active>a:only-child:after,.ant-btn-danger-disabled:focus>a:only-child:after,.ant-btn-danger-disabled:hover>a:only-child:after,.ant-btn-danger-disabled>a:only-child:after,.ant-btn-danger.disabled.active>a:only-child:after,.ant-btn-danger.disabled:active>a:only-child:after,.ant-btn-danger.disabled:focus>a:only-child:after,.ant-btn-danger.disabled:hover>a:only-child:after,.ant-btn-danger.disabled>a:only-child:after,.ant-btn-danger[disabled].active>a:only-child:after,.ant-btn-danger[disabled]:active>a:only-child:after,.ant-btn-danger[disabled]:focus>a:only-child:after,.ant-btn-danger[disabled]:hover>a:only-child:after,.ant-btn-danger[disabled]>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-link{color:#1890ff;background-color:transparent;border-color:transparent;-webkit-box-shadow:none;box-shadow:none}.ant-btn-link>a:only-child{color:currentColor}.ant-btn-link>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-link:focus,.ant-btn-link:hover{color:#40a9ff;background-color:transparent;border-color:#40a9ff}.ant-btn-link:focus>a:only-child,.ant-btn-link:hover>a:only-child{color:currentColor}.ant-btn-link:focus>a:only-child:after,.ant-btn-link:hover>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-link.active,.ant-btn-link:active{color:#096dd9;background-color:transparent;border-color:#096dd9}.ant-btn-link.active>a:only-child,.ant-btn-link:active>a:only-child{color:currentColor}.ant-btn-link.active>a:only-child:after,.ant-btn-link:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-link-disabled,.ant-btn-link-disabled.active,.ant-btn-link-disabled:active,.ant-btn-link-disabled:focus,.ant-btn-link-disabled:hover,.ant-btn-link.disabled,.ant-btn-link.disabled.active,.ant-btn-link.disabled:active,.ant-btn-link.disabled:focus,.ant-btn-link.disabled:hover,.ant-btn-link[disabled],.ant-btn-link[disabled].active,.ant-btn-link[disabled]:active,.ant-btn-link[disabled]:focus,.ant-btn-link[disabled]:hover{background-color:#f5f5f5;border-color:#d9d9d9}.ant-btn-link:active,.ant-btn-link:focus,.ant-btn-link:hover{border-color:transparent}.ant-btn-link-disabled,.ant-btn-link-disabled.active,.ant-btn-link-disabled:active,.ant-btn-link-disabled:focus,.ant-btn-link-disabled:hover,.ant-btn-link.disabled,.ant-btn-link.disabled.active,.ant-btn-link.disabled:active,.ant-btn-link.disabled:focus,.ant-btn-link.disabled:hover,.ant-btn-link[disabled],.ant-btn-link[disabled].active,.ant-btn-link[disabled]:active,.ant-btn-link[disabled]:focus,.ant-btn-link[disabled]:hover{color:rgba(0,0,0,.25);background-color:transparent;border-color:transparent;text-shadow:none;-webkit-box-shadow:none;box-shadow:none}.ant-btn-link-disabled.active>a:only-child,.ant-btn-link-disabled:active>a:only-child,.ant-btn-link-disabled:focus>a:only-child,.ant-btn-link-disabled:hover>a:only-child,.ant-btn-link-disabled>a:only-child,.ant-btn-link.disabled.active>a:only-child,.ant-btn-link.disabled:active>a:only-child,.ant-btn-link.disabled:focus>a:only-child,.ant-btn-link.disabled:hover>a:only-child,.ant-btn-link.disabled>a:only-child,.ant-btn-link[disabled].active>a:only-child,.ant-btn-link[disabled]:active>a:only-child,.ant-btn-link[disabled]:focus>a:only-child,.ant-btn-link[disabled]:hover>a:only-child,.ant-btn-link[disabled]>a:only-child{color:currentColor}.ant-btn-link-disabled.active>a:only-child:after,.ant-btn-link-disabled:active>a:only-child:after,.ant-btn-link-disabled:focus>a:only-child:after,.ant-btn-link-disabled:hover>a:only-child:after,.ant-btn-link-disabled>a:only-child:after,.ant-btn-link.disabled.active>a:only-child:after,.ant-btn-link.disabled:active>a:only-child:after,.ant-btn-link.disabled:focus>a:only-child:after,.ant-btn-link.disabled:hover>a:only-child:after,.ant-btn-link.disabled>a:only-child:after,.ant-btn-link[disabled].active>a:only-child:after,.ant-btn-link[disabled]:active>a:only-child:after,.ant-btn-link[disabled]:focus>a:only-child:after,.ant-btn-link[disabled]:hover>a:only-child:after,.ant-btn-link[disabled]>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-icon-only{width:32px;height:32px;padding:0;font-size:16px;border-radius:4px}.ant-btn-icon-only.ant-btn-lg{width:40px;height:40px;padding:0;font-size:18px;border-radius:4px}.ant-btn-icon-only.ant-btn-sm{width:24px;height:24px;padding:0;font-size:14px;border-radius:4px}.ant-btn-icon-only>i{vertical-align:middle}.ant-btn-round{height:32px;padding:0 16px;font-size:14px;border-radius:32px}.ant-btn-round.ant-btn-lg{height:40px;padding:0 20px;font-size:16px;border-radius:40px}.ant-btn-round.ant-btn-sm{height:24px;padding:0 12px;font-size:14px;border-radius:24px}.ant-btn-round.ant-btn-icon-only{width:auto}.ant-btn-circle,.ant-btn-circle-outline{min-width:32px;padding-right:0;padding-left:0;text-align:center;border-radius:50%}.ant-btn-circle-outline.ant-btn-lg,.ant-btn-circle.ant-btn-lg{min-width:40px;border-radius:50%}.ant-btn-circle-outline.ant-btn-sm,.ant-btn-circle.ant-btn-sm{min-width:24px;border-radius:50%}.ant-btn:before{position:absolute;top:-1px;right:-1px;bottom:-1px;left:-1px;z-index:1;display:none;background:#fff;border-radius:inherit;opacity:.35;-webkit-transition:opacity .2s;-o-transition:opacity .2s;transition:opacity .2s;content:"";pointer-events:none}.ant-btn .anticon{-webkit-transition:margin-left .3s cubic-bezier(.645,.045,.355,1);-o-transition:margin-left .3s cubic-bezier(.645,.045,.355,1);transition:margin-left .3s cubic-bezier(.645,.045,.355,1)}.ant-btn .anticon.anticon-minus>svg,.ant-btn .anticon.anticon-plus>svg{shape-rendering:optimizeSpeed}.ant-btn.ant-btn-loading{position:relative}.ant-btn.ant-btn-loading:not([disabled]){pointer-events:none}.ant-btn.ant-btn-loading:before{display:block}.ant-btn.ant-btn-loading:not(.ant-btn-circle):not(.ant-btn-circle-outline):not(.ant-btn-icon-only){padding-left:29px}.ant-btn.ant-btn-loading:not(.ant-btn-circle):not(.ant-btn-circle-outline):not(.ant-btn-icon-only) .anticon:not(:last-child){margin-left:-14px}.ant-btn-sm.ant-btn-loading:not(.ant-btn-circle):not(.ant-btn-circle-outline):not(.ant-btn-icon-only){padding-left:24px}.ant-btn-sm.ant-btn-loading:not(.ant-btn-circle):not(.ant-btn-circle-outline):not(.ant-btn-icon-only) .anticon{margin-left:-17px}.ant-btn-group{display:inline-block}.ant-btn-group,.ant-btn-group>.ant-btn,.ant-btn-group>span>.ant-btn{position:relative}.ant-btn-group>.ant-btn.active,.ant-btn-group>.ant-btn:active,.ant-btn-group>.ant-btn:focus,.ant-btn-group>.ant-btn:hover,.ant-btn-group>span>.ant-btn.active,.ant-btn-group>span>.ant-btn:active,.ant-btn-group>span>.ant-btn:focus,.ant-btn-group>span>.ant-btn:hover{z-index:2}.ant-btn-group>.ant-btn:disabled,.ant-btn-group>span>.ant-btn:disabled{z-index:0}.ant-btn-group>.ant-btn-icon-only{font-size:14px}.ant-btn-group-lg>.ant-btn,.ant-btn-group-lg>span>.ant-btn{height:40px;padding:0 15px;font-size:16px;border-radius:0;line-height:38px}.ant-btn-group-lg>.ant-btn.ant-btn-icon-only{width:40px;height:40px;padding-right:0;padding-left:0}.ant-btn-group-sm>.ant-btn,.ant-btn-group-sm>span>.ant-btn{height:24px;padding:0 7px;font-size:14px;border-radius:0;line-height:22px}.ant-btn-group-sm>.ant-btn>.anticon,.ant-btn-group-sm>span>.ant-btn>.anticon{font-size:14px}.ant-btn-group-sm>.ant-btn.ant-btn-icon-only{width:24px;height:24px;padding-right:0;padding-left:0}.ant-btn+.ant-btn-group,.ant-btn-group+.ant-btn,.ant-btn-group+.ant-btn-group,.ant-btn-group .ant-btn+.ant-btn,.ant-btn-group .ant-btn+span,.ant-btn-group>span+span,.ant-btn-group span+.ant-btn{margin-left:-1px}.ant-btn-group .ant-btn-primary+.ant-btn:not(.ant-btn-primary):not([disabled]){border-left-color:transparent}.ant-btn-group .ant-btn{border-radius:0}.ant-btn-group>.ant-btn:first-child,.ant-btn-group>span:first-child>.ant-btn{margin-left:0}.ant-btn-group>.ant-btn:only-child,.ant-btn-group>span:only-child>.ant-btn{border-radius:4px}.ant-btn-group>.ant-btn:first-child:not(:last-child),.ant-btn-group>span:first-child:not(:last-child)>.ant-btn{border-top-left-radius:4px;border-bottom-left-radius:4px}.ant-btn-group>.ant-btn:last-child:not(:first-child),.ant-btn-group>span:last-child:not(:first-child)>.ant-btn{border-top-right-radius:4px;border-bottom-right-radius:4px}.ant-btn-group-sm>.ant-btn:only-child,.ant-btn-group-sm>span:only-child>.ant-btn{border-radius:4px}.ant-btn-group-sm>.ant-btn:first-child:not(:last-child),.ant-btn-group-sm>span:first-child:not(:last-child)>.ant-btn{border-top-left-radius:4px;border-bottom-left-radius:4px}.ant-btn-group-sm>.ant-btn:last-child:not(:first-child),.ant-btn-group-sm>span:last-child:not(:first-child)>.ant-btn{border-top-right-radius:4px;border-bottom-right-radius:4px}.ant-btn-group>.ant-btn-group{float:left}.ant-btn-group>.ant-btn-group:not(:first-child):not(:last-child)>.ant-btn{border-radius:0}.ant-btn-group>.ant-btn-group:first-child:not(:last-child)>.ant-btn:last-child{padding-right:8px;border-top-right-radius:0;border-bottom-right-radius:0}.ant-btn-group>.ant-btn-group:last-child:not(:first-child)>.ant-btn:first-child{padding-left:8px;border-top-left-radius:0;border-bottom-left-radius:0}.ant-btn:active>span,.ant-btn:focus>span{position:relative}.ant-btn>.anticon+span,.ant-btn>span+.anticon{margin-left:8px}.ant-btn-background-ghost{color:#fff;background:transparent!important;border-color:#fff}.ant-btn-background-ghost.ant-btn-primary{color:#1890ff;background-color:transparent;border-color:#1890ff;text-shadow:none}.ant-btn-background-ghost.ant-btn-primary>a:only-child{color:currentColor}.ant-btn-background-ghost.ant-btn-primary>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-primary:focus,.ant-btn-background-ghost.ant-btn-primary:hover{color:#40a9ff;background-color:transparent;border-color:#40a9ff}.ant-btn-background-ghost.ant-btn-primary:focus>a:only-child,.ant-btn-background-ghost.ant-btn-primary:hover>a:only-child{color:currentColor}.ant-btn-background-ghost.ant-btn-primary:focus>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary:hover>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-primary.active,.ant-btn-background-ghost.ant-btn-primary:active{color:#096dd9;background-color:transparent;border-color:#096dd9}.ant-btn-background-ghost.ant-btn-primary.active>a:only-child,.ant-btn-background-ghost.ant-btn-primary:active>a:only-child{color:currentColor}.ant-btn-background-ghost.ant-btn-primary.active>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-primary-disabled,.ant-btn-background-ghost.ant-btn-primary-disabled.active,.ant-btn-background-ghost.ant-btn-primary-disabled:active,.ant-btn-background-ghost.ant-btn-primary-disabled:focus,.ant-btn-background-ghost.ant-btn-primary-disabled:hover,.ant-btn-background-ghost.ant-btn-primary.disabled,.ant-btn-background-ghost.ant-btn-primary.disabled.active,.ant-btn-background-ghost.ant-btn-primary.disabled:active,.ant-btn-background-ghost.ant-btn-primary.disabled:focus,.ant-btn-background-ghost.ant-btn-primary.disabled:hover,.ant-btn-background-ghost.ant-btn-primary[disabled],.ant-btn-background-ghost.ant-btn-primary[disabled].active,.ant-btn-background-ghost.ant-btn-primary[disabled]:active,.ant-btn-background-ghost.ant-btn-primary[disabled]:focus,.ant-btn-background-ghost.ant-btn-primary[disabled]:hover{color:rgba(0,0,0,.25);background-color:#f5f5f5;border-color:#d9d9d9;text-shadow:none;-webkit-box-shadow:none;box-shadow:none}.ant-btn-background-ghost.ant-btn-primary-disabled.active>a:only-child,.ant-btn-background-ghost.ant-btn-primary-disabled:active>a:only-child,.ant-btn-background-ghost.ant-btn-primary-disabled:focus>a:only-child,.ant-btn-background-ghost.ant-btn-primary-disabled:hover>a:only-child,.ant-btn-background-ghost.ant-btn-primary-disabled>a:only-child,.ant-btn-background-ghost.ant-btn-primary.disabled.active>a:only-child,.ant-btn-background-ghost.ant-btn-primary.disabled:active>a:only-child,.ant-btn-background-ghost.ant-btn-primary.disabled:focus>a:only-child,.ant-btn-background-ghost.ant-btn-primary.disabled:hover>a:only-child,.ant-btn-background-ghost.ant-btn-primary.disabled>a:only-child,.ant-btn-background-ghost.ant-btn-primary[disabled].active>a:only-child,.ant-btn-background-ghost.ant-btn-primary[disabled]:active>a:only-child,.ant-btn-background-ghost.ant-btn-primary[disabled]:focus>a:only-child,.ant-btn-background-ghost.ant-btn-primary[disabled]:hover>a:only-child,.ant-btn-background-ghost.ant-btn-primary[disabled]>a:only-child{color:currentColor}.ant-btn-background-ghost.ant-btn-primary-disabled.active>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary-disabled:active>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary-disabled:focus>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary-disabled:hover>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary-disabled>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary.disabled.active>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary.disabled:active>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary.disabled:focus>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary.disabled:hover>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary.disabled>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary[disabled].active>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary[disabled]:active>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary[disabled]:focus>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary[disabled]:hover>a:only-child:after,.ant-btn-background-ghost.ant-btn-primary[disabled]>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-danger{color:#ff4d4f;background-color:transparent;border-color:#ff4d4f;text-shadow:none}.ant-btn-background-ghost.ant-btn-danger>a:only-child{color:currentColor}.ant-btn-background-ghost.ant-btn-danger>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-danger:focus,.ant-btn-background-ghost.ant-btn-danger:hover{color:#ff7875;background-color:transparent;border-color:#ff7875}.ant-btn-background-ghost.ant-btn-danger:focus>a:only-child,.ant-btn-background-ghost.ant-btn-danger:hover>a:only-child{color:currentColor}.ant-btn-background-ghost.ant-btn-danger:focus>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger:hover>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-danger.active,.ant-btn-background-ghost.ant-btn-danger:active{color:#d9363e;background-color:transparent;border-color:#d9363e}.ant-btn-background-ghost.ant-btn-danger.active>a:only-child,.ant-btn-background-ghost.ant-btn-danger:active>a:only-child{color:currentColor}.ant-btn-background-ghost.ant-btn-danger.active>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-danger-disabled,.ant-btn-background-ghost.ant-btn-danger-disabled.active,.ant-btn-background-ghost.ant-btn-danger-disabled:active,.ant-btn-background-ghost.ant-btn-danger-disabled:focus,.ant-btn-background-ghost.ant-btn-danger-disabled:hover,.ant-btn-background-ghost.ant-btn-danger.disabled,.ant-btn-background-ghost.ant-btn-danger.disabled.active,.ant-btn-background-ghost.ant-btn-danger.disabled:active,.ant-btn-background-ghost.ant-btn-danger.disabled:focus,.ant-btn-background-ghost.ant-btn-danger.disabled:hover,.ant-btn-background-ghost.ant-btn-danger[disabled],.ant-btn-background-ghost.ant-btn-danger[disabled].active,.ant-btn-background-ghost.ant-btn-danger[disabled]:active,.ant-btn-background-ghost.ant-btn-danger[disabled]:focus,.ant-btn-background-ghost.ant-btn-danger[disabled]:hover{color:rgba(0,0,0,.25);background-color:#f5f5f5;border-color:#d9d9d9;text-shadow:none;-webkit-box-shadow:none;box-shadow:none}.ant-btn-background-ghost.ant-btn-danger-disabled.active>a:only-child,.ant-btn-background-ghost.ant-btn-danger-disabled:active>a:only-child,.ant-btn-background-ghost.ant-btn-danger-disabled:focus>a:only-child,.ant-btn-background-ghost.ant-btn-danger-disabled:hover>a:only-child,.ant-btn-background-ghost.ant-btn-danger-disabled>a:only-child,.ant-btn-background-ghost.ant-btn-danger.disabled.active>a:only-child,.ant-btn-background-ghost.ant-btn-danger.disabled:active>a:only-child,.ant-btn-background-ghost.ant-btn-danger.disabled:focus>a:only-child,.ant-btn-background-ghost.ant-btn-danger.disabled:hover>a:only-child,.ant-btn-background-ghost.ant-btn-danger.disabled>a:only-child,.ant-btn-background-ghost.ant-btn-danger[disabled].active>a:only-child,.ant-btn-background-ghost.ant-btn-danger[disabled]:active>a:only-child,.ant-btn-background-ghost.ant-btn-danger[disabled]:focus>a:only-child,.ant-btn-background-ghost.ant-btn-danger[disabled]:hover>a:only-child,.ant-btn-background-ghost.ant-btn-danger[disabled]>a:only-child{color:currentColor}.ant-btn-background-ghost.ant-btn-danger-disabled.active>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger-disabled:active>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger-disabled:focus>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger-disabled:hover>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger-disabled>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger.disabled.active>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger.disabled:active>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger.disabled:focus>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger.disabled:hover>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger.disabled>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger[disabled].active>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger[disabled]:active>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger[disabled]:focus>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger[disabled]:hover>a:only-child:after,.ant-btn-background-ghost.ant-btn-danger[disabled]>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-link{color:#1890ff;background-color:transparent;border-color:transparent;text-shadow:none;color:#fff}.ant-btn-background-ghost.ant-btn-link>a:only-child{color:currentColor}.ant-btn-background-ghost.ant-btn-link>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-link:focus,.ant-btn-background-ghost.ant-btn-link:hover{color:#40a9ff;background-color:transparent;border-color:transparent}.ant-btn-background-ghost.ant-btn-link:focus>a:only-child,.ant-btn-background-ghost.ant-btn-link:hover>a:only-child{color:currentColor}.ant-btn-background-ghost.ant-btn-link:focus>a:only-child:after,.ant-btn-background-ghost.ant-btn-link:hover>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-link.active,.ant-btn-background-ghost.ant-btn-link:active{color:#096dd9;background-color:transparent;border-color:transparent}.ant-btn-background-ghost.ant-btn-link.active>a:only-child,.ant-btn-background-ghost.ant-btn-link:active>a:only-child{color:currentColor}.ant-btn-background-ghost.ant-btn-link.active>a:only-child:after,.ant-btn-background-ghost.ant-btn-link:active>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-background-ghost.ant-btn-link-disabled,.ant-btn-background-ghost.ant-btn-link-disabled.active,.ant-btn-background-ghost.ant-btn-link-disabled:active,.ant-btn-background-ghost.ant-btn-link-disabled:focus,.ant-btn-background-ghost.ant-btn-link-disabled:hover,.ant-btn-background-ghost.ant-btn-link.disabled,.ant-btn-background-ghost.ant-btn-link.disabled.active,.ant-btn-background-ghost.ant-btn-link.disabled:active,.ant-btn-background-ghost.ant-btn-link.disabled:focus,.ant-btn-background-ghost.ant-btn-link.disabled:hover,.ant-btn-background-ghost.ant-btn-link[disabled],.ant-btn-background-ghost.ant-btn-link[disabled].active,.ant-btn-background-ghost.ant-btn-link[disabled]:active,.ant-btn-background-ghost.ant-btn-link[disabled]:focus,.ant-btn-background-ghost.ant-btn-link[disabled]:hover{color:rgba(0,0,0,.25);background-color:#f5f5f5;border-color:#d9d9d9;text-shadow:none;-webkit-box-shadow:none;box-shadow:none}.ant-btn-background-ghost.ant-btn-link-disabled.active>a:only-child,.ant-btn-background-ghost.ant-btn-link-disabled:active>a:only-child,.ant-btn-background-ghost.ant-btn-link-disabled:focus>a:only-child,.ant-btn-background-ghost.ant-btn-link-disabled:hover>a:only-child,.ant-btn-background-ghost.ant-btn-link-disabled>a:only-child,.ant-btn-background-ghost.ant-btn-link.disabled.active>a:only-child,.ant-btn-background-ghost.ant-btn-link.disabled:active>a:only-child,.ant-btn-background-ghost.ant-btn-link.disabled:focus>a:only-child,.ant-btn-background-ghost.ant-btn-link.disabled:hover>a:only-child,.ant-btn-background-ghost.ant-btn-link.disabled>a:only-child,.ant-btn-background-ghost.ant-btn-link[disabled].active>a:only-child,.ant-btn-background-ghost.ant-btn-link[disabled]:active>a:only-child,.ant-btn-background-ghost.ant-btn-link[disabled]:focus>a:only-child,.ant-btn-background-ghost.ant-btn-link[disabled]:hover>a:only-child,.ant-btn-background-ghost.ant-btn-link[disabled]>a:only-child{color:currentColor}.ant-btn-background-ghost.ant-btn-link-disabled.active>a:only-child:after,.ant-btn-background-ghost.ant-btn-link-disabled:active>a:only-child:after,.ant-btn-background-ghost.ant-btn-link-disabled:focus>a:only-child:after,.ant-btn-background-ghost.ant-btn-link-disabled:hover>a:only-child:after,.ant-btn-background-ghost.ant-btn-link-disabled>a:only-child:after,.ant-btn-background-ghost.ant-btn-link.disabled.active>a:only-child:after,.ant-btn-background-ghost.ant-btn-link.disabled:active>a:only-child:after,.ant-btn-background-ghost.ant-btn-link.disabled:focus>a:only-child:after,.ant-btn-background-ghost.ant-btn-link.disabled:hover>a:only-child:after,.ant-btn-background-ghost.ant-btn-link.disabled>a:only-child:after,.ant-btn-background-ghost.ant-btn-link[disabled].active>a:only-child:after,.ant-btn-background-ghost.ant-btn-link[disabled]:active>a:only-child:after,.ant-btn-background-ghost.ant-btn-link[disabled]:focus>a:only-child:after,.ant-btn-background-ghost.ant-btn-link[disabled]:hover>a:only-child:after,.ant-btn-background-ghost.ant-btn-link[disabled]>a:only-child:after{position:absolute;top:0;right:0;bottom:0;left:0;background:transparent;content:""}.ant-btn-two-chinese-chars:first-letter{letter-spacing:.34em}.ant-btn-two-chinese-chars>:not(.anticon){margin-right:-.34em;letter-spacing:.34em}.ant-btn-block{width:100%}.ant-btn:empty{vertical-align:top}a.ant-btn{padding-top:.1px;line-height:30px}a.ant-btn-lg{line-height:38px}a.ant-btn-sm{line-height:22px}@-webkit-keyframes antCheckboxEffect{0%{-webkit-transform:scale(1);transform:scale(1);opacity:.5}to{-webkit-transform:scale(1.6);transform:scale(1.6);opacity:0}}@keyframes antCheckboxEffect{0%{-webkit-transform:scale(1);transform:scale(1);opacity:.5}to{-webkit-transform:scale(1.6);transform:scale(1.6);opacity:0}}.ant-tree.ant-tree-directory{position:relative}.ant-tree.ant-tree-directory .ant-tree-child-tree>li span.ant-tree-switcher,.ant-tree.ant-tree-directory>li span.ant-tree-switcher{position:relative;z-index:1}.ant-tree.ant-tree-directory .ant-tree-child-tree>li span.ant-tree-switcher.ant-tree-switcher-noop,.ant-tree.ant-tree-directory>li span.ant-tree-switcher.ant-tree-switcher-noop{pointer-events:none}.ant-tree.ant-tree-directory .ant-tree-child-tree>li span.ant-tree-checkbox,.ant-tree.ant-tree-directory>li span.ant-tree-checkbox{position:relative;z-index:1}.ant-tree.ant-tree-directory .ant-tree-child-tree>li span.ant-tree-node-content-wrapper,.ant-tree.ant-tree-directory>li span.ant-tree-node-content-wrapper{border-radius:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ant-tree.ant-tree-directory .ant-tree-child-tree>li span.ant-tree-node-content-wrapper:hover,.ant-tree.ant-tree-directory>li span.ant-tree-node-content-wrapper:hover{background:transparent}.ant-tree.ant-tree-directory .ant-tree-child-tree>li span.ant-tree-node-content-wrapper:hover:before,.ant-tree.ant-tree-directory>li span.ant-tree-node-content-wrapper:hover:before{background:#e6f7ff}.ant-tree.ant-tree-directory .ant-tree-child-tree>li span.ant-tree-node-content-wrapper.ant-tree-node-selected,.ant-tree.ant-tree-directory>li span.ant-tree-node-content-wrapper.ant-tree-node-selected{color:#fff;background:transparent}.ant-tree.ant-tree-directory .ant-tree-child-tree>li span.ant-tree-node-content-wrapper:before,.ant-tree.ant-tree-directory>li span.ant-tree-node-content-wrapper:before{position:absolute;right:0;left:0;height:24px;-webkit-transition:all .3s;-o-transition:all .3s;transition:all .3s;content:""}.ant-tree.ant-tree-directory .ant-tree-child-tree>li span.ant-tree-node-content-wrapper>span,.ant-tree.ant-tree-directory>li span.ant-tree-node-content-wrapper>span{position:relative;z-index:1}.ant-tree.ant-tree-directory .ant-tree-child-tree>li.ant-tree-treenode-selected>span.ant-tree-switcher,.ant-tree.ant-tree-directory>li.ant-tree-treenode-selected>span.ant-tree-switcher{color:#fff}.ant-tree.ant-tree-directory .ant-tree-child-tree>li.ant-tree-treenode-selected>span.ant-tree-checkbox .ant-tree-checkbox-inner,.ant-tree.ant-tree-directory>li.ant-tree-treenode-selected>span.ant-tree-checkbox .ant-tree-checkbox-inner{border-color:#1890ff}.ant-tree.ant-tree-directory .ant-tree-child-tree>li.ant-tree-treenode-selected>span.ant-tree-checkbox.ant-tree-checkbox-checked:after,.ant-tree.ant-tree-directory>li.ant-tree-treenode-selected>span.ant-tree-checkbox.ant-tree-checkbox-checked:after{border-color:#fff}.ant-tree.ant-tree-directory .ant-tree-child-tree>li.ant-tree-treenode-selected>span.ant-tree-checkbox.ant-tree-checkbox-checked .ant-tree-checkbox-inner,.ant-tree.ant-tree-directory>li.ant-tree-treenode-selected>span.ant-tree-checkbox.ant-tree-checkbox-checked .ant-tree-checkbox-inner{background:#fff}.ant-tree.ant-tree-directory .ant-tree-child-tree>li.ant-tree-treenode-selected>span.ant-tree-checkbox.ant-tree-checkbox-checked .ant-tree-checkbox-inner:after,.ant-tree.ant-tree-directory>li.ant-tree-treenode-selected>span.ant-tree-checkbox.ant-tree-checkbox-checked .ant-tree-checkbox-inner:after{border-color:#1890ff}.ant-tree.ant-tree-directory .ant-tree-child-tree>li.ant-tree-treenode-selected>span.ant-tree-node-content-wrapper:before,.ant-tree.ant-tree-directory>li.ant-tree-treenode-selected>span.ant-tree-node-content-wrapper:before{background:#1890ff}.ant-tree-checkbox{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,.65);font-size:14px;font-variant:tabular-nums;line-height:1.5;list-style:none;-webkit-font-feature-settings:"tnum";font-feature-settings:"tnum";position:relative;top:-.09em;display:inline-block;line-height:1;white-space:nowrap;vertical-align:middle;outline:none;cursor:pointer}.ant-tree-checkbox-input:focus+.ant-tree-checkbox-inner,.ant-tree-checkbox-wrapper:hover .ant-tree-checkbox-inner,.ant-tree-checkbox:hover .ant-tree-checkbox-inner{border-color:#1890ff}.ant-tree-checkbox-checked:after{top:0;height:100%;border:1px solid #1890ff;border-radius:2px;visibility:hidden;-webkit-animation:antCheckboxEffect .36s ease-in-out;animation:antCheckboxEffect .36s ease-in-out;-webkit-animation-fill-mode:backwards;animation-fill-mode:backwards;content:""}.ant-tree-checkbox-wrapper:hover .ant-tree-checkbox:after,.ant-tree-checkbox:hover:after{visibility:visible}.ant-tree-checkbox-inner{position:relative;top:0;left:0;display:block;width:16px;height:16px;background-color:#fff;border:1px solid #d9d9d9;border-radius:2px;border-collapse:separate;-webkit-transition:all .3s;-o-transition:all .3s;transition:all .3s}.ant-tree-checkbox-inner:after{position:absolute;top:50%;left:22%;display:table;width:5.71428571px;height:9.14285714px;border:2px solid #fff;border-top:0;border-left:0;-webkit-transform:rotate(45deg) scale(0) translate(-50%,-50%);-ms-transform:rotate(45deg) scale(0) translate(-50%,-50%);transform:rotate(45deg) scale(0) translate(-50%,-50%);opacity:0;-webkit-transition:all .1s cubic-bezier(.71,-.46,.88,.6),opacity .1s;-o-transition:all .1s cubic-bezier(.71,-.46,.88,.6),opacity .1s;transition:all .1s cubic-bezier(.71,-.46,.88,.6),opacity .1s;content:" "}.ant-tree-checkbox-input{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;width:100%;height:100%;cursor:pointer;opacity:0}.ant-tree-checkbox-checked .ant-tree-checkbox-inner:after{position:absolute;display:table;border:2px solid #fff;border-top:0;border-left:0;-webkit-transform:rotate(45deg) scale(1) translate(-50%,-50%);-ms-transform:rotate(45deg) scale(1) translate(-50%,-50%);transform:rotate(45deg) scale(1) translate(-50%,-50%);opacity:1;-webkit-transition:all .2s cubic-bezier(.12,.4,.29,1.46) .1s;-o-transition:all .2s cubic-bezier(.12,.4,.29,1.46) .1s;transition:all .2s cubic-bezier(.12,.4,.29,1.46) .1s;content:" "}.ant-tree-checkbox-checked .ant-tree-checkbox-inner{background-color:#1890ff;border-color:#1890ff}.ant-tree-checkbox-disabled{cursor:not-allowed}.ant-tree-checkbox-disabled.ant-tree-checkbox-checked .ant-tree-checkbox-inner:after{border-color:rgba(0,0,0,.25);-webkit-animation-name:none;animation-name:none}.ant-tree-checkbox-disabled .ant-tree-checkbox-input{cursor:not-allowed}.ant-tree-checkbox-disabled .ant-tree-checkbox-inner{background-color:#f5f5f5;border-color:#d9d9d9!important}.ant-tree-checkbox-disabled .ant-tree-checkbox-inner:after{border-color:#f5f5f5;border-collapse:separate;-webkit-animation-name:none;animation-name:none}.ant-tree-checkbox-disabled+span{color:rgba(0,0,0,.25);cursor:not-allowed}.ant-tree-checkbox-disabled:hover:after,.ant-tree-checkbox-wrapper:hover .ant-tree-checkbox-disabled:after{visibility:hidden}.ant-tree-checkbox-wrapper{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,.65);font-size:14px;font-variant:tabular-nums;line-height:1.5;list-style:none;-webkit-font-feature-settings:"tnum";font-feature-settings:"tnum";display:inline-block;line-height:unset;cursor:pointer}.ant-tree-checkbox-wrapper.ant-tree-checkbox-wrapper-disabled{cursor:not-allowed}.ant-tree-checkbox-wrapper+.ant-tree-checkbox-wrapper{margin-left:8px}.ant-tree-checkbox+span{padding-right:8px;padding-left:8px}.ant-tree-checkbox-group{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;color:rgba(0,0,0,.65);font-size:14px;font-variant:tabular-nums;line-height:1.5;list-style:none;-webkit-font-feature-settings:"tnum";font-feature-settings:"tnum";display:inline-block}.ant-tree-checkbox-group-item{display:inline-block;margin-right:8px}.ant-tree-checkbox-group-item:last-child{margin-right:0}.ant-tree-checkbox-group-item+.ant-tree-checkbox-group-item{margin-left:0}.ant-tree-checkbox-indeterminate .ant-tree-checkbox-inner{background-color:#fff;border-color:#d9d9d9}.ant-tree-checkbox-indeterminate .ant-tree-checkbox-inner:after{top:50%;left:50%;width:8px;height:8px;background-color:#1890ff;border:0;-webkit-transform:translate(-50%,-50%) scale(1);-ms-transform:translate(-50%,-50%) scale(1);transform:translate(-50%,-50%) scale(1);opacity:1;content:" "}.ant-tree-checkbox-indeterminate.ant-tree-checkbox-disabled .ant-tree-checkbox-inner:after{background-color:rgba(0,0,0,.25);border-color:rgba(0,0,0,.25)}.ant-tree{-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0,0,0,.65);font-size:14px;font-variant:tabular-nums;line-height:1.5;list-style:none;-webkit-font-feature-settings:"tnum";font-feature-settings:"tnum";margin:0;padding:0}.ant-tree-checkbox-checked:after{position:absolute;top:16.67%;left:0;width:100%;height:66.67%}.ant-tree ol,.ant-tree ul{margin:0;padding:0;list-style:none}.ant-tree li{margin:0;padding:4px 0;white-space:nowrap;list-style:none;outline:0}.ant-tree li span[draggable=true],.ant-tree li span[draggable]{line-height:20px;border-top:2px solid transparent;border-bottom:2px solid transparent;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-khtml-user-drag:element;-webkit-user-drag:element}.ant-tree li.drag-over>span[draggable]{color:#fff;background-color:#1890ff;opacity:.8}.ant-tree li.drag-over-gap-top>span[draggable]{border-top-color:#1890ff}.ant-tree li.drag-over-gap-bottom>span[draggable]{border-bottom-color:#1890ff}.ant-tree li.filter-node>span{color:#f5222d!important;font-weight:500!important}.ant-tree li.ant-tree-treenode-loading span.ant-tree-switcher.ant-tree-switcher_close .ant-tree-switcher-loading-icon,.ant-tree li.ant-tree-treenode-loading span.ant-tree-switcher.ant-tree-switcher_open .ant-tree-switcher-loading-icon{position:absolute;left:0;display:inline-block;width:24px;height:24px;color:#1890ff;font-size:14px;-webkit-transform:none;-ms-transform:none;transform:none}.ant-tree li.ant-tree-treenode-loading span.ant-tree-switcher.ant-tree-switcher_close .ant-tree-switcher-loading-icon svg,.ant-tree li.ant-tree-treenode-loading span.ant-tree-switcher.ant-tree-switcher_open .ant-tree-switcher-loading-icon svg{position:absolute;top:0;right:0;bottom:0;left:0;margin:auto}:root .ant-tree li.ant-tree-treenode-loading span.ant-tree-switcher.ant-tree-switcher_close:after,:root .ant-tree li.ant-tree-treenode-loading span.ant-tree-switcher.ant-tree-switcher_open:after{opacity:0}.ant-tree li ul{margin:0;padding:0 0 0 18px}.ant-tree li .ant-tree-node-content-wrapper{display:inline-block;height:24px;margin:0;padding:0 5px;color:rgba(0,0,0,.65);line-height:24px;text-decoration:none;vertical-align:top;border-radius:2px;cursor:pointer;-webkit-transition:all .3s;-o-transition:all .3s;transition:all .3s}.ant-tree li .ant-tree-node-content-wrapper:hover{background-color:#e6f7ff}.ant-tree li .ant-tree-node-content-wrapper.ant-tree-node-selected{background-color:#bae7ff}.ant-tree li span.ant-tree-checkbox{top:auto;height:24px;margin:0 4px 0 2px;padding:4px 0}.ant-tree li span.ant-tree-iconEle,.ant-tree li span.ant-tree-switcher{display:inline-block;width:24px;height:24px;margin:0;line-height:24px;text-align:center;vertical-align:top;border:0 none;outline:none;cursor:pointer}.ant-tree li span.ant-tree-iconEle:empty{display:none}.ant-tree li span.ant-tree-switcher{position:relative}.ant-tree li span.ant-tree-switcher.ant-tree-switcher-noop{cursor:default}.ant-tree li span.ant-tree-switcher.ant-tree-switcher_open .ant-select-switcher-icon,.ant-tree li span.ant-tree-switcher.ant-tree-switcher_open .ant-tree-switcher-icon{font-size:12px;font-size:10px\9;-webkit-transform:scale(.83333333) rotate(0deg);-ms-transform:scale(.83333333) rotate(0deg);transform:scale(.83333333) rotate(0deg);display:inline-block;font-weight:700}:root .ant-tree li span.ant-tree-switcher.ant-tree-switcher_open .ant-select-switcher-icon,:root .ant-tree li span.ant-tree-switcher.ant-tree-switcher_open .ant-tree-switcher-icon{font-size:12px}.ant-tree li span.ant-tree-switcher.ant-tree-switcher_open .ant-select-switcher-icon svg,.ant-tree li span.ant-tree-switcher.ant-tree-switcher_open .ant-tree-switcher-icon svg{-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;-o-transition:transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s}.ant-tree li span.ant-tree-switcher.ant-tree-switcher_close .ant-select-switcher-icon,.ant-tree li span.ant-tree-switcher.ant-tree-switcher_close .ant-tree-switcher-icon{font-size:12px;font-size:10px\9;-webkit-transform:scale(.83333333) rotate(0deg);-ms-transform:scale(.83333333) rotate(0deg);transform:scale(.83333333) rotate(0deg);display:inline-block;font-weight:700}:root .ant-tree li span.ant-tree-switcher.ant-tree-switcher_close .ant-select-switcher-icon,:root .ant-tree li span.ant-tree-switcher.ant-tree-switcher_close .ant-tree-switcher-icon{font-size:12px}.ant-tree li span.ant-tree-switcher.ant-tree-switcher_close .ant-select-switcher-icon svg,.ant-tree li span.ant-tree-switcher.ant-tree-switcher_close .ant-tree-switcher-icon svg{-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;-o-transition:transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s}.ant-tree li span.ant-tree-switcher.ant-tree-switcher_close .ant-tree-switcher-icon svg{-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);transform:rotate(-90deg)}.ant-tree li:last-child>span.ant-tree-iconEle:before,.ant-tree li:last-child>span.ant-tree-switcher:before{display:none}.ant-tree>li:first-child{padding-top:7px}.ant-tree>li:last-child{padding-bottom:7px}.ant-tree-child-tree>li:first-child{padding-top:8px}.ant-tree-child-tree>li:last-child{padding-bottom:0}li.ant-tree-treenode-disabled>.ant-tree-node-content-wrapper,li.ant-tree-treenode-disabled>.ant-tree-node-content-wrapper span,li.ant-tree-treenode-disabled>span:not(.ant-tree-switcher){color:rgba(0,0,0,.25);cursor:not-allowed}li.ant-tree-treenode-disabled>.ant-tree-node-content-wrapper:hover{background:transparent}.ant-tree-icon__close,.ant-tree-icon__open{margin-right:2px;vertical-align:top}.ant-tree.ant-tree-show-line li{position:relative}.ant-tree.ant-tree-show-line li span.ant-tree-switcher{color:rgba(0,0,0,.45);background:#fff}.ant-tree.ant-tree-show-line li span.ant-tree-switcher.ant-tree-switcher-noop .ant-select-switcher-icon,.ant-tree.ant-tree-show-line li span.ant-tree-switcher.ant-tree-switcher-noop .ant-tree-switcher-icon{display:inline-block;font-weight:400;font-size:12px}.ant-tree.ant-tree-show-line li span.ant-tree-switcher.ant-tree-switcher-noop .ant-select-switcher-icon svg,.ant-tree.ant-tree-show-line li span.ant-tree-switcher.ant-tree-switcher-noop .ant-tree-switcher-icon svg{-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;-o-transition:transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s}.ant-tree.ant-tree-show-line li span.ant-tree-switcher.ant-tree-switcher_open .ant-select-switcher-icon,.ant-tree.ant-tree-show-line li span.ant-tree-switcher.ant-tree-switcher_open .ant-tree-switcher-icon{display:inline-block;font-weight:400;font-size:12px}.ant-tree.ant-tree-show-line li span.ant-tree-switcher.ant-tree-switcher_open .ant-select-switcher-icon svg,.ant-tree.ant-tree-show-line li span.ant-tree-switcher.ant-tree-switcher_open .ant-tree-switcher-icon svg{-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;-o-transition:transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s}.ant-tree.ant-tree-show-line li span.ant-tree-switcher.ant-tree-switcher_close .ant-select-switcher-icon,.ant-tree.ant-tree-show-line li span.ant-tree-switcher.ant-tree-switcher_close .ant-tree-switcher-icon{display:inline-block;font-weight:400;font-size:12px}.ant-tree.ant-tree-show-line li span.ant-tree-switcher.ant-tree-switcher_close .ant-select-switcher-icon svg,.ant-tree.ant-tree-show-line li span.ant-tree-switcher.ant-tree-switcher_close .ant-tree-switcher-icon svg{-webkit-transition:-webkit-transform .3s;transition:-webkit-transform .3s;-o-transition:transform .3s;transition:transform .3s;transition:transform .3s,-webkit-transform .3s}.ant-tree.ant-tree-show-line li:not(:last-child):before{position:absolute;left:12px;width:1px;height:100%;height:calc(100% - 22px);margin:22px 0 0;border-left:1px solid #d9d9d9;content:" "}.ant-tree.ant-tree-icon-hide .ant-tree-treenode-loading .ant-tree-iconEle{display:none}.ant-tree.ant-tree-block-node li .ant-tree-node-content-wrapper{width:calc(100% - 24px)}.ant-tree.ant-tree-block-node li span.ant-tree-checkbox+.ant-tree-node-content-wrapper{width:calc(100% - 46px)} \ No newline at end of file diff --git a/static/tree.min.js b/static/tree.min.js new file mode 100644 index 0000000..965ad11 --- /dev/null +++ b/static/tree.min.js @@ -0,0 +1 @@ +!function(e){function t(c){if(n[c])return n[c].exports;var r=n[c]={i:c,l:!1,exports:{}};return e[c].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,c){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:c})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=81)}([function(e,t,n){"use strict";e.exports=n(92)},function(e,t,n){var c,r;!function(){"use strict";function n(){for(var e=[],t=0;te.length)&&(t=e.length);for(var n=0,c=new Array(t);n0?c:n)(e)}},function(e,t,n){var c=n(34)("keys"),r=n(22);e.exports=function(e){return c[e]||(c[e]=r(e))}},function(e,t,n){var c=n(4),r=n(3),o=r["__core-js_shared__"]||(r["__core-js_shared__"]={});(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:c.version,mode:n(21)?"pure":"global",copyright:"\xa9 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var c=n(31);e.exports=function(e){return Object(c(e))}},function(e,t,n){"use strict";t.__esModule=!0;var c=n(62),r=function(e){return e&&e.__esModule?e:{default:e}}(c);t.default=function(e,t,n){return t in e?(0,r.default)(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){"use strict";t.__esModule=!0;var c=n(63),r=function(e){return e&&e.__esModule?e:{default:e}}(c);t.default=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==("undefined"===typeof t?"undefined":(0,r.default)(t))&&"function"!==typeof t?e:t}},function(e,t){e.exports={}},function(e,t,n){var c=n(16),r=n(113),o=n(35),a=n(33)("IE_PROTO"),l=function(){},i=function(){var e,t=n(57)("iframe"),c=o.length;for(t.style.display="none",n(114).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("