var e=[[/rsync:\s*connection unexpectedly closed/gi,`rsync：连接意外关闭`],[/rsync error:\s*some files\/attrs were not transferred/gi,`rsync 错误：部分文件或属性未能传输`],[/rsync error:\s*error in rsync protocol data stream/gi,`rsync 错误：协议数据流异常`],[/rsync error:\s*/gi,`rsync 错误：`],[/rsync:\s*/gi,`rsync：`],[/Host key verification failed/gi,`SSH 主机密钥验证失败`],[/Could not resolve hostname/gi,`无法解析主机名`],[/Permission denied,\s*please try again/gi,`权限被拒绝，请重试`],[/Permission denied\s*\(publickey/gi,`公钥认证失败，权限被拒绝`],[/Permission denied/gi,`权限被拒绝`],[/No such file or directory/gi,`文件或目录不存在`],[/Connection refused/gi,`连接被拒绝`],[/Connection timed out/gi,`连接超时`],[/Connection reset by peer/gi,`连接被对端重置`],[/Network is unreachable/gi,`网络不可达`],[/No route to host/gi,`无法路由到主机`],[/No space left on device/gi,`磁盘空间不足`],[/Read-only file system/gi,`文件系统为只读`],[/Operation timed out/gi,`操作超时`],[/Operation not permitted/gi,`操作不允许`],[/Authentication failed/gi,`认证失败`],[/Broken pipe/gi,`连接中断（管道破裂）`],[/Protocol error/gi,`协议错误`],[/Too many open files/gi,`打开的文件过多`],[/Name or service not known/gi,`无法解析主机名或服务名`],[/ssh:\s*connect to host/gi,`ssh：无法连接到主机`],[/ssh:\s*/gi,`ssh：`],[/Command failed\s*\(exit\s*(\d+)\)/gi,`命令失败（退出码 $1）`],[/rsync exited with code\s*(\d+)/gi,`rsync 退出码 $1`],[/\bexit code\s*(\d+)/gi,`退出码 $1`],[/Server not found/gi,`服务器不存在`],[/failed to set times on/gi,`无法设置文件时间戳：`],[/\bsender\b/gi,`发送端`],[/\breceiver\b/gi,`接收端`]],t=/[\u4e00-\u9fff\u3400-\u4dbf]/g;function n(e){let n=e.match(t);if(!n?.length)return!1;let r=e.replace(/\s+/g,``);return r.length?n.length/r.length>=.2:!1}function r(t){if(t==null)return``;let r=t.trim();if(!r)return``;if(n(r))return t;let i=r;for(let[t,n]of e)i=i.replace(t,n);return i}function i(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}function a(e){switch(e){case`success`:return`成功`;case`failed`:return`失败`;case`running`:return`进行中`;case`cancelled`:return`已取消`;default:return e}}function o(e){switch(e){case`success`:return`success`;case`failed`:return`error`;case`cancelled`:return`grey`;case`running`:return`info`;default:return`warning`}}function s(e){if(!e)return`—`;let t=[],n=e.match(/chown=([^\s]+)/)?.[1],r=e.match(/chmod=([^\s]+)/)?.[1];return n&&t.push(n),r&&t.push(r),t.length?t.join(` · `):e}function c(e){switch(e){case`incremental`:return`增量`;case`full`:return`全量`;case`checksum`:return`校验和`;case`overwrite`:return`覆盖`;default:return e||`—`}}function l(e){return e===`成功`?`success`:e===`失败`?`error`:e===`已取消`?`grey`:`warning`}function u(e){return e?`success`:`error`}export{l as a,r as c,a as i,i as n,u as o,o as r,c as s,s as t};