diff --git a/CHANGELOG.md b/CHANGELOG.md index 95c89345f..403d296c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,20 @@ All notable changes to this project will be documented in this file. +## [0.25.48] + +### Bug Fixes + +- 无法查看已归档任务 + +### Features + +- 实现非对称加密关键接口 + +### Performance + +- 自动清空文件回收站 + ## [0.25.42] ### Performance diff --git a/_ide_helper.php b/_ide_helper.php index 4d6bba4fd..1eb0ed0a7 100644 --- a/_ide_helper.php +++ b/_ide_helper.php @@ -9889,12 +9889,12 @@ * Clones a request and overrides some of its parameters. * * @return static - * @param array $query The GET parameters - * @param array $request The POST parameters - * @param array $attributes The request attributes (parameters parsed from the PATH_INFO, ...) - * @param array $cookies The COOKIE parameters - * @param array $files The FILES parameters - * @param array $server The SERVER parameters + * @param array|null $query The GET parameters + * @param array|null $request The POST parameters + * @param array|null $attributes The request attributes (parameters parsed from the PATH_INFO, ...) + * @param array|null $cookies The COOKIE parameters + * @param array|null $files The FILES parameters + * @param array|null $server The SERVER parameters * @return static * @static */ diff --git a/app/Http/Controllers/Api/DialogController.php b/app/Http/Controllers/Api/DialogController.php index 56342755c..13ed4d9ee 100755 --- a/app/Http/Controllers/Api/DialogController.php +++ b/app/Http/Controllers/Api/DialogController.php @@ -534,7 +534,7 @@ class DialogController extends AbstractController } /** - * @api {get} api/dialog/msg/one 10. 获取单条消息 + * @api {get} api/dialog/msg/one 11. 获取单条消息 * * @apiDescription 需要token身份 * @apiVersion 1.0.0 @@ -563,7 +563,7 @@ class DialogController extends AbstractController } /** - * @api {get} api/dialog/msg/read 11. 已读聊天消息 + * @api {get} api/dialog/msg/read 12. 已读聊天消息 * * @apiDescription 需要token身份 * @apiVersion 1.0.0 @@ -614,7 +614,7 @@ class DialogController extends AbstractController } /** - * @api {get} api/dialog/msg/unread 12. 获取未读消息数据 + * @api {get} api/dialog/msg/unread 13. 获取未读消息数据 * * @apiDescription 需要token身份 * @apiVersion 1.0.0 @@ -655,7 +655,7 @@ class DialogController extends AbstractController } /** - * @api {post} api/dialog/msg/sendtext 13. 发送消息 + * @api {post} api/dialog/msg/sendtext 14. 发送消息 * * @apiDescription 需要token身份 * @apiVersion 1.0.0 @@ -676,7 +676,6 @@ class DialogController extends AbstractController */ public function msg__sendtext() { - Base::checkClientVersion('0.19.0'); $user = User::auth(); // if (!$user->bot) { @@ -691,11 +690,11 @@ class DialogController extends AbstractController } } // - $dialog_id = Base::getPostInt('dialog_id'); - $update_id = Base::getPostInt('update_id'); - $reply_id = Base::getPostInt('reply_id'); - $text = trim(Base::getPostValue('text')); - $silence = trim(Base::getPostValue('silence')) === 'yes'; + $dialog_id = intval(Request::input('dialog_id')); + $update_id = intval(Request::input('update_id')); + $reply_id = intval(Request::input('reply_id')); + $text = trim(Request::input('text')); + $silence = trim(Request::input('silence')) === 'yes'; // WebSocketDialog::checkDialog($dialog_id); // @@ -745,7 +744,7 @@ class DialogController extends AbstractController } /** - * @api {post} api/dialog/msg/sendrecord 14. 发送语音 + * @api {post} api/dialog/msg/sendrecord 15. 发送语音 * * @apiDescription 需要token身份 * @apiVersion 1.0.0 @@ -765,15 +764,15 @@ class DialogController extends AbstractController { $user = User::auth(); // - $dialog_id = Base::getPostInt('dialog_id'); - $reply_id = Base::getPostInt('reply_id'); + $dialog_id = intval(Request::input('dialog_id')); + $reply_id = intval(Request::input('reply_id')); // WebSocketDialog::checkDialog($dialog_id); // $action = $reply_id > 0 ? "reply-$reply_id" : ""; $path = "uploads/chat/" . date("Ym") . "/" . $dialog_id . "/"; - $base64 = Base::getPostValue('base64'); - $duration = Base::getPostInt('duration'); + $base64 = Request::input('base64'); + $duration = intval(Request::input('duration')); if ($duration < 600) { return Base::retError('说话时间太短'); } @@ -792,7 +791,7 @@ class DialogController extends AbstractController } /** - * @api {post} api/dialog/msg/sendfile 15. 文件上传 + * @api {post} api/dialog/msg/sendfile 16. 文件上传 * * @apiDescription 需要token身份 * @apiVersion 1.0.0 @@ -814,16 +813,16 @@ class DialogController extends AbstractController { $user = User::auth(); // - $dialog_id = Base::getPostInt('dialog_id'); - $reply_id = Base::getPostInt('reply_id'); - $image_attachment = Base::getPostInt('image_attachment'); + $dialog_id = intval(Request::input('dialog_id')); + $reply_id = intval(Request::input('reply_id')); + $image_attachment = intval(Request::input('image_attachment')); // $dialog = WebSocketDialog::checkDialog($dialog_id); // $action = $reply_id > 0 ? "reply-$reply_id" : ""; $path = "uploads/chat/" . date("Ym") . "/" . $dialog_id . "/"; - $image64 = Base::getPostValue('image64'); - $fileName = Base::getPostValue('filename'); + $image64 = Request::input('image64'); + $fileName = Request::input('filename'); if ($image64) { $data = Base::image64save([ "image64" => $image64, @@ -876,7 +875,7 @@ class DialogController extends AbstractController } /** - * @api {get} api/dialog/msg/sendfileid 16. 通过文件ID发送文件 + * @api {get} api/dialog/msg/sendfileid 17. 通过文件ID发送文件 * * @apiDescription 需要token身份 * @apiVersion 1.0.0 @@ -946,7 +945,7 @@ class DialogController extends AbstractController } /** - * @api {post} api/dialog/msg/sendanon 16. 发送匿名消息 + * @api {post} api/dialog/msg/sendanon 18. 发送匿名消息 * * @apiDescription 需要token身份 * @apiVersion 1.0.0 @@ -964,8 +963,8 @@ class DialogController extends AbstractController { User::auth(); // - $userid = Base::getPostInt('userid'); - $text = trim(Base::getPostValue('text')); + $userid = intval(Request::input('userid')); + $text = trim(Request::input('text')); // $anonMessage = Base::settingFind('system', 'anon_message', 'open'); if ($anonMessage != 'open') { @@ -999,7 +998,7 @@ class DialogController extends AbstractController } /** - * @api {get} api/dialog/msg/readlist 17. 获取消息阅读情况 + * @api {get} api/dialog/msg/readlist 19. 获取消息阅读情况 * * @apiDescription 需要token身份 * @apiVersion 1.0.0 @@ -1028,7 +1027,7 @@ class DialogController extends AbstractController } /** - * @api {get} api/dialog/msg/detail 18. 消息详情 + * @api {get} api/dialog/msg/detail 20. 消息详情 * * @apiDescription 需要token身份 * @apiVersion 1.0.0 @@ -1076,7 +1075,7 @@ class DialogController extends AbstractController } /** - * @api {get} api/dialog/msg/download 19. 文件下载 + * @api {get} api/dialog/msg/download 21. 文件下载 * * @apiDescription 需要token身份 * @apiVersion 1.0.0 @@ -1119,7 +1118,7 @@ class DialogController extends AbstractController } /** - * @api {get} api/dialog/msg/withdraw 20. 聊天消息撤回 + * @api {get} api/dialog/msg/withdraw 22. 聊天消息撤回 * * @apiDescription 消息撤回限制24小时内,需要token身份 * @apiVersion 1.0.0 @@ -1145,7 +1144,7 @@ class DialogController extends AbstractController } /** - * @api {get} api/dialog/msg/mark 21. 消息标记操作 + * @api {get} api/dialog/msg/mark 23. 消息标记操作 * * @apiDescription 需要token身份 * @apiVersion 1.0.0 @@ -1212,7 +1211,7 @@ class DialogController extends AbstractController } /** - * @api {get} api/dialog/msg/silence 22. 消息免打扰 + * @api {get} api/dialog/msg/silence 24. 消息免打扰 * * @apiDescription 需要token身份 * @apiVersion 1.0.0 @@ -1275,7 +1274,7 @@ class DialogController extends AbstractController } /** - * @api {get} api/dialog/msg/forward 23. 转发消息给 + * @api {get} api/dialog/msg/forward 25. 转发消息给 * * @apiDescription 需要token身份 * @apiVersion 1.0.0 @@ -1312,7 +1311,7 @@ class DialogController extends AbstractController } /** - * @api {get} api/dialog/msg/emoji 24. emoji回复 + * @api {get} api/dialog/msg/emoji 26. emoji回复 * * @apiDescription 需要token身份 * @apiVersion 1.0.0 @@ -1347,7 +1346,7 @@ class DialogController extends AbstractController } /** - * @api {get} api/dialog/msg/tag 25. 标注/取消标注 + * @api {get} api/dialog/msg/tag 27. 标注/取消标注 * * @apiDescription 需要token身份 * @apiVersion 1.0.0 @@ -1376,7 +1375,7 @@ class DialogController extends AbstractController } /** - * @api {get} api/dialog/msg/todo 26. 设待办/取消待办 + * @api {get} api/dialog/msg/todo 28. 设待办/取消待办 * * @apiDescription 需要token身份 * @apiVersion 1.0.0 @@ -1419,7 +1418,7 @@ class DialogController extends AbstractController } /** - * @api {get} api/dialog/msg/todolist 27. 获取消息待办情况 + * @api {get} api/dialog/msg/todolist 29. 获取消息待办情况 * * @apiDescription 需要token身份 * @apiVersion 1.0.0 @@ -1449,7 +1448,7 @@ class DialogController extends AbstractController } /** - * @api {get} api/dialog/msg/done 28. 完成待办 + * @api {get} api/dialog/msg/done 30. 完成待办 * * @apiDescription 需要token身份 * @apiVersion 1.0.0 @@ -1496,7 +1495,7 @@ class DialogController extends AbstractController } /** - * @api {get} api/dialog/group/add 29. 新增群组 + * @api {get} api/dialog/group/add 31. 新增群组 * * @apiDescription 需要token身份 * @apiVersion 1.0.0 @@ -1558,7 +1557,7 @@ class DialogController extends AbstractController } /** - * @api {get} api/dialog/group/edit 30. 修改群组 + * @api {get} api/dialog/group/edit 32. 修改群组 * * @apiDescription 需要token身份 * @apiVersion 1.0.0 @@ -1619,7 +1618,7 @@ class DialogController extends AbstractController } /** - * @api {get} api/dialog/group/adduser 31. 添加群成员 + * @api {get} api/dialog/group/adduser 33. 添加群成员 * * @apiDescription 需要token身份 * - 有群主时:只有群主可以邀请 @@ -1655,7 +1654,7 @@ class DialogController extends AbstractController } /** - * @api {get} api/dialog/group/deluser 32. 移出(退出)群成员 + * @api {get} api/dialog/group/deluser 34. 移出(退出)群成员 * * @apiDescription 需要token身份 * - 只有群主、邀请人可以踢人 @@ -1699,7 +1698,7 @@ class DialogController extends AbstractController } /** - * @api {get} api/dialog/group/transfer 33. 转让群组 + * @api {get} api/dialog/group/transfer 35. 转让群组 * * @apiDescription 需要token身份 * - 只有群主且是个人类型群可以解散 @@ -1743,7 +1742,7 @@ class DialogController extends AbstractController } /** - * @api {get} api/dialog/group/disband 34. 解散群组 + * @api {get} api/dialog/group/disband 36. 解散群组 * * @apiDescription 需要token身份 * - 只有群主且是个人类型群可以解散 @@ -1771,7 +1770,7 @@ class DialogController extends AbstractController } /** - * @api {get} api/dialog/group/searchuser 35. 搜索个人群(仅限管理员) + * @api {get} api/dialog/group/searchuser 37. 搜索个人群(仅限管理员) * * @apiDescription 需要token身份,用于创建部门搜索个人群组 * @apiVersion 1.0.0 diff --git a/app/Http/Controllers/Api/FileController.php b/app/Http/Controllers/Api/FileController.php index 97565726b..df44cda3d 100755 --- a/app/Http/Controllers/Api/FileController.php +++ b/app/Http/Controllers/Api/FileController.php @@ -595,8 +595,8 @@ class FileController extends AbstractController { $user = User::auth(); // - $id = Base::getPostInt('id'); - $content = Base::getPostValue('content'); + $id = intval(Request::input('id')); + $content = Request::input('content'); // $file = File::permissionFind($id, $user, 1); // diff --git a/app/Http/Controllers/Api/ProjectController.php b/app/Http/Controllers/Api/ProjectController.php index cd2934b85..bb4242856 100755 --- a/app/Http/Controllers/Api/ProjectController.php +++ b/app/Http/Controllers/Api/ProjectController.php @@ -1543,7 +1543,8 @@ class ProjectController extends AbstractController public function task__add() { User::auth(); - parse_str(Request::getContent(), $data); + // + $data = Request::input(); $project_id = intval($data['project_id']); $column_id = $data['column_id']; // 项目 @@ -1663,7 +1664,7 @@ class ProjectController extends AbstractController { User::auth(); // - parse_str(Request::getContent(), $data); + $data = Request::input(); $task_id = intval($data['task_id']); // $task = ProjectTask::userTask($task_id, true, true, 2); @@ -1989,8 +1990,8 @@ class ProjectController extends AbstractController { User::auth(); // - $project_id = intval(Base::getContentValue('project_id')); - $flows = Base::getContentValue('flows'); + $project_id = intval(Request::input('project_id')); + $flows = Request::input('flows'); // if (!is_array($flows)) { return Base::retError('参数错误'); diff --git a/app/Http/Controllers/Api/ReportController.php b/app/Http/Controllers/Api/ReportController.php index 059e3a859..634ebda81 100755 --- a/app/Http/Controllers/Api/ReportController.php +++ b/app/Http/Controllers/Api/ReportController.php @@ -137,14 +137,14 @@ class ReportController extends AbstractController $user = User::auth(); // $input = [ - "id" => Base::getPostValue("id", 0), - "sign" => Base::getPostValue("sign"), - "title" => Base::getPostValue("title"), - "type" => Base::getPostValue("type"), - "content" => Base::getPostValue("content"), - "receive" => Base::getPostValue("receive"), + "id" => Request::input("id", 0), + "sign" => Request::input("sign"), + "title" => Request::input("title"), + "type" => Request::input("type"), + "content" => Request::input("content"), + "receive" => Request::input("receive"), // 以当前日期为基础的周期偏移量。例如选择了上一周那么就是 -1,上一天同理。 - "offset" => Base::getPostValue("offset", 0), + "offset" => Request::input("offset", 0), ]; $validator = Validator::make($input, [ 'id' => 'numeric', diff --git a/app/Http/Controllers/Api/SystemController.php b/app/Http/Controllers/Api/SystemController.php index 9438a5cf0..0081765ea 100755 --- a/app/Http/Controllers/Api/SystemController.php +++ b/app/Http/Controllers/Api/SystemController.php @@ -10,7 +10,6 @@ use App\Module\BillExport; use App\Module\BillMultipleExport; use App\Module\Doo; use App\Module\Extranet; -use Arr; use Carbon\Carbon; use Guanguans\Notify\Factory; use Guanguans\Notify\Messages\EmailMessage; @@ -439,7 +438,7 @@ class SystemController extends AbstractController $type = trim(Request::input('type')); if ($type == 'save') { User::auth('admin'); - $list = Base::getPostValue('list'); + $list = Request::input('list'); $array = []; if (empty($list) || !is_array($list)) { return Base::retError('参数错误'); @@ -488,7 +487,7 @@ class SystemController extends AbstractController $type = trim(Request::input('type')); if ($type == 'save') { User::auth('admin'); - $list = Base::getPostValue('list'); + $list = Request::input('list'); $array = []; if (empty($list) || !is_array($list)) { return Base::retError('参数错误'); @@ -514,7 +513,7 @@ class SystemController extends AbstractController } /** - * @api {post} api/system/license 08. License + * @api {post} api/system/license 10. License * * @apiDescription 获取License信息、保存License(限管理员) * @apiVersion 1.0.0 @@ -536,7 +535,7 @@ class SystemController extends AbstractController // $type = trim(Request::input('type')); if ($type == 'save') { - $license = Base::getPostValue('license'); + $license = Request::input('license'); Doo::licenseSave($license); } // @@ -550,7 +549,7 @@ class SystemController extends AbstractController } /** - * @api {get} api/system/get/info 10. 获取终端详细信息 + * @api {get} api/system/get/info 11. 获取终端详细信息 * * @apiVersion 1.0.0 * @apiGroup system @@ -579,7 +578,7 @@ class SystemController extends AbstractController } /** - * @api {get} api/system/get/ip 11. 获取IP地址 + * @api {get} api/system/get/ip 12. 获取IP地址 * * @apiVersion 1.0.0 * @apiGroup system @@ -594,7 +593,7 @@ class SystemController extends AbstractController } /** - * @api {get} api/system/get/cnip 12. 是否中国IP地址 + * @api {get} api/system/get/cnip 13. 是否中国IP地址 * * @apiVersion 1.0.0 * @apiGroup system @@ -611,7 +610,7 @@ class SystemController extends AbstractController } /** - * @api {get} api/system/get/ipgcj02 13. 获取IP地址经纬度 + * @api {get} api/system/get/ipgcj02 14. 获取IP地址经纬度 * * @apiVersion 1.0.0 * @apiGroup system @@ -628,7 +627,7 @@ class SystemController extends AbstractController } /** - * @api {get} api/system/get/ipinfo 14. 获取IP地址详细信息 + * @api {get} api/system/get/ipinfo 15. 获取IP地址详细信息 * * @apiVersion 1.0.0 * @apiGroup system @@ -645,7 +644,7 @@ class SystemController extends AbstractController } /** - * @api {post} api/system/imgupload 15. 上传图片 + * @api {post} api/system/imgupload 16. 上传图片 * * @apiDescription 需要token身份 * @apiVersion 1.0.0 @@ -679,8 +678,8 @@ class SystemController extends AbstractController $scale = [$width, $height, $whcut]; } $path = "uploads/user/picture/" . User::userid() . "/" . date("Ym") . "/"; - $image64 = trim(Base::getPostValue('image64')); - $fileName = trim(Base::getPostValue('filename')); + $image64 = trim(Request::input('image64')); + $fileName = trim(Request::input('filename')); if ($image64) { $data = Base::image64save([ "image64" => $image64, @@ -705,7 +704,7 @@ class SystemController extends AbstractController } /** - * @api {get} api/system/get/imgview 16. 浏览图片空间 + * @api {get} api/system/get/imgview 17. 浏览图片空间 * * @apiDescription 需要token身份 * @apiVersion 1.0.0 @@ -801,7 +800,7 @@ class SystemController extends AbstractController } /** - * @api {post} api/system/fileupload 17. 上传文件 + * @api {post} api/system/fileupload 18. 上传文件 * * @apiDescription 需要token身份 * @apiVersion 1.0.0 @@ -822,8 +821,8 @@ class SystemController extends AbstractController return Base::retError('身份失效,等重新登录'); } $path = "uploads/user/file/" . User::userid() . "/" . date("Ym") . "/"; - $image64 = trim(Base::getPostValue('image64')); - $fileName = trim(Base::getPostValue('filename')); + $image64 = trim(Request::input('image64')); + $fileName = trim(Request::input('filename')); if ($image64) { $data = Base::image64save([ "image64" => $image64, @@ -843,7 +842,7 @@ class SystemController extends AbstractController } /** - * @api {get} api/system/get/showitem 18. 首页显示ITEM + * @api {get} api/system/get/showitem 19. 首页显示ITEM * * @apiDescription 用于判断首页是否显示:pro、github、更新日志... * @apiVersion 1.0.0 @@ -875,7 +874,7 @@ class SystemController extends AbstractController } /** - * @api {get} api/system/get/starthome 19. 启动首页设置信息 + * @api {get} api/system/get/starthome 20. 启动首页设置信息 * * @apiDescription 用于判断注册是否需要启动首页 * @apiVersion 1.0.0 @@ -895,7 +894,7 @@ class SystemController extends AbstractController } /** - * @api {get} api/system/email/check 20. 邮件发送测试(限管理员) + * @api {get} api/system/email/check 21. 邮件发送测试(限管理员) * * @apiDescription 测试配置邮箱是否能发送邮件 * @apiVersion 1.0.0 @@ -941,7 +940,7 @@ class SystemController extends AbstractController } /** - * @api {get} api/system/checkin/export 21. 导出签到数据(限管理员) + * @api {get} api/system/checkin/export 22. 导出签到数据(限管理员) * * @apiVersion 1.0.0 * @apiGroup system @@ -1108,7 +1107,7 @@ class SystemController extends AbstractController } /** - * @api {get} api/system/checkin/down 22. 下载导出的签到数据 + * @api {get} api/system/checkin/down 23. 下载导出的签到数据 * * @apiVersion 1.0.0 * @apiGroup system @@ -1134,7 +1133,7 @@ class SystemController extends AbstractController } /** - * @api {get} api/system/version 23. 获取版本号 + * @api {get} api/system/version 24. 获取版本号 * * @apiVersion 1.0.0 * @apiGroup system diff --git a/app/Http/Controllers/Api/UsersController.php b/app/Http/Controllers/Api/UsersController.php index 630b187a3..6c3dc49c2 100755 --- a/app/Http/Controllers/Api/UsersController.php +++ b/app/Http/Controllers/Api/UsersController.php @@ -1527,7 +1527,7 @@ class UsersController extends AbstractController return Base::retError('未开放修改权限,请联系管理员'); } // - $list = Base::getPostValue('list'); + $list = Request::input('list'); $array = []; if (empty($list) || !is_array($list)) { return Base::retError('参数错误'); @@ -1618,4 +1618,46 @@ class UsersController extends AbstractController } return Base::retSuccess('success', $row); } + + /** + * @api {get} api/users/key/client 28. 客户端KEY + * + * @apiDescription 获取客户端KEY,用于加密数据发送给服务端 + * @apiVersion 1.0.0 + * @apiGroup users + * @apiName key__client + * + * @apiParam {String} [client_id] 客户端ID(希望不变的,除非清除浏览器缓存或者卸载应用) + * + * @apiSuccess {Number} ret 返回状态码(1正确、0错误) + * @apiSuccess {String} msg 返回信息(错误描述) + * @apiSuccess {Object} data 返回数据 + */ + public function key__client() + { + $clientId = (trim(Request::input('client_id')) ?: Base::generatePassword(6)) . Doo::userId(); + // + $cacheKey = "KeyPair::" . $clientId; + if (Cache::has($cacheKey)) { + $cacheData = Base::json2array(Cache::get($cacheKey)); + if ($cacheData['private_key']) { + return Base::retSuccess('success', [ + 'type' => 'pgp', + 'id' => $clientId, + 'key' => $cacheData['public_key'], + ]); + } + } + // + $name = Doo::userEmail() ?: Base::generatePassword(6); + $email = Doo::userEmail() ?: 'aa@bb.cc'; + $data = Doo::pgpGenerateKeyPair($name, $email, Base::generatePassword()); + Cache::put("KeyPair::" . $clientId, Base::array2json($data), Carbon::now()->addQuarter()); + // + return Base::retSuccess('success', [ + 'type' => 'pgp', + 'id' => $clientId, + 'key' => $data['public_key'], + ]); + } } diff --git a/app/Http/Middleware/VerifyCsrfToken.php b/app/Http/Middleware/VerifyCsrfToken.php index 7970dff29..3384b1c8e 100644 --- a/app/Http/Middleware/VerifyCsrfToken.php +++ b/app/Http/Middleware/VerifyCsrfToken.php @@ -12,59 +12,8 @@ class VerifyCsrfToken extends Middleware * @var array */ protected $except = [ - // 上传图片 - 'api/system/imgupload/', - - // 上传文件 - 'api/system/fileupload/', - - // 保存任务优先级 - 'api/system/priority/', - - // 保存创建项目列表模板 - 'api/system/column/template/', - - // License 设置 - 'api/system/license/', - - // 添加任务 - 'api/project/task/add/', - - // 保存工作流 - 'api/project/flow/save/', - - // 修改任务 - 'api/project/task/update/', - - // 聊天发文本 - 'api/dialog/msg/sendtext/', - - // 聊天发语音 - 'api/dialog/msg/sendrecord/', - - // 聊天发文件 - 'api/dialog/msg/sendfile/', - - // 聊天发匿名消息 - 'api/dialog/msg/sendanon/', - - // 保存文件内容 - 'api/file/content/save/', - - // 保存文件内容(office) - 'api/file/content/office/', - - // 保存文件内容(上传) - 'api/file/content/upload/', - - // 保存汇报 - 'api/report/store/', - - // 签到设置 - 'api/users/checkin/save/', - - // 签到上报 - 'api/public/checkin/report/', + // 接口部分 + 'api/*', // 发布桌面端 'desktop/publish/', diff --git a/app/Http/Middleware/WebApi.php b/app/Http/Middleware/WebApi.php index c66b3a1d6..2f61c6971 100644 --- a/app/Http/Middleware/WebApi.php +++ b/app/Http/Middleware/WebApi.php @@ -4,9 +4,9 @@ namespace App\Http\Middleware; @error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING); +use App\Module\Base; use App\Module\Doo; use Closure; -use Request; class WebApi { @@ -22,18 +22,41 @@ class WebApi global $_A; $_A = []; - if (Request::input('__Access-Control-Allow-Origin') || Request::header('__Access-Control-Allow-Origin')) { - header('Access-Control-Allow-Origin:*'); - header('Access-Control-Allow-Methods:GET,POST,PUT,DELETE,OPTIONS'); - header('Access-Control-Allow-Headers:Content-Type, platform, platform-channel, token, release, Access-Control-Allow-Origin'); + Doo::load(); + + $encrypt = Doo::pgpParseStr($request->header('encrypt')); + if ($request->isMethod('post')) { + $version = $request->header('version'); + if ($version && version_compare($version, '0.25.48', '<')) { + // 旧版本兼容 php://input + parse_str($request->getContent(), $content); + if ($content) { + $request->merge($content); + } + } elseif ($encrypt['encrypt_type'] === 'pgp' && $content = $request->input('encrypted')) { + // 新版本解密提交的内容 + $content = Doo::pgpDecryptApi($content, $encrypt['encrypt_id']); + if ($content) { + $request->merge($content); + } + } } + // 强制 https $APP_SCHEME = env('APP_SCHEME', 'auto'); if (in_array(strtolower($APP_SCHEME), ['https', 'on', 'ssl', '1', 'true', 'yes'], true)) { $request->setTrustedProxies([$request->getClientIp()], $request::HEADER_X_FORWARDED_PROTO); } - Doo::load(); - return $next($request); + $response = $next($request); + + // 加密返回内容 + if ($encrypt['client_type'] === 'pgp' && $content = $response->getContent()) { + $response->setContent(json_encode([ + 'encrypted' => Doo::pgpEncryptApi($content, $encrypt['client_key']) + ])); + } + + return $response; } } diff --git a/app/Models/File.php b/app/Models/File.php index c38daa603..911b1d1fd 100644 --- a/app/Models/File.php +++ b/app/Models/File.php @@ -29,7 +29,7 @@ use Request; * @property \Illuminate\Support\Carbon|null $deleted_at * @method static \Illuminate\Database\Eloquent\Builder|File newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|File newQuery() - * @method static \Illuminate\Database\Query\Builder|File onlyTrashed() + * @method static \Illuminate\Database\Eloquent\Builder|File onlyTrashed() * @method static \Illuminate\Database\Eloquent\Builder|File query() * @method static \Illuminate\Database\Eloquent\Builder|File whereCid($value) * @method static \Illuminate\Database\Eloquent\Builder|File whereCreatedAt($value) @@ -46,8 +46,8 @@ use Request; * @method static \Illuminate\Database\Eloquent\Builder|File whereType($value) * @method static \Illuminate\Database\Eloquent\Builder|File whereUpdatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|File whereUserid($value) - * @method static \Illuminate\Database\Query\Builder|File withTrashed() - * @method static \Illuminate\Database\Query\Builder|File withoutTrashed() + * @method static \Illuminate\Database\Eloquent\Builder|File withTrashed() + * @method static \Illuminate\Database\Eloquent\Builder|File withoutTrashed() * @mixin \Eloquent */ class File extends AbstractModel diff --git a/app/Models/FileContent.php b/app/Models/FileContent.php index d6f46b616..374715d94 100644 --- a/app/Models/FileContent.php +++ b/app/Models/FileContent.php @@ -20,7 +20,7 @@ use Illuminate\Database\Eloquent\SoftDeletes; * @property \Illuminate\Support\Carbon|null $deleted_at * @method static \Illuminate\Database\Eloquent\Builder|FileContent newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|FileContent newQuery() - * @method static \Illuminate\Database\Query\Builder|FileContent onlyTrashed() + * @method static \Illuminate\Database\Eloquent\Builder|FileContent onlyTrashed() * @method static \Illuminate\Database\Eloquent\Builder|FileContent query() * @method static \Illuminate\Database\Eloquent\Builder|FileContent whereContent($value) * @method static \Illuminate\Database\Eloquent\Builder|FileContent whereCreatedAt($value) @@ -31,8 +31,8 @@ use Illuminate\Database\Eloquent\SoftDeletes; * @method static \Illuminate\Database\Eloquent\Builder|FileContent whereText($value) * @method static \Illuminate\Database\Eloquent\Builder|FileContent whereUpdatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|FileContent whereUserid($value) - * @method static \Illuminate\Database\Query\Builder|FileContent withTrashed() - * @method static \Illuminate\Database\Query\Builder|FileContent withoutTrashed() + * @method static \Illuminate\Database\Eloquent\Builder|FileContent withTrashed() + * @method static \Illuminate\Database\Eloquent\Builder|FileContent withoutTrashed() * @mixin \Eloquent */ class FileContent extends AbstractModel diff --git a/app/Models/Project.php b/app/Models/Project.php index 96d7d1f28..3525f34cc 100644 --- a/app/Models/Project.php +++ b/app/Models/Project.php @@ -28,17 +28,17 @@ use Request; * @property \Illuminate\Support\Carbon|null $updated_at * @property \Illuminate\Support\Carbon|null $deleted_at * @property-read int $owner_userid - * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ProjectColumn[] $projectColumn + * @property-read \Illuminate\Database\Eloquent\Collection $projectColumn * @property-read int|null $project_column_count - * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ProjectLog[] $projectLog + * @property-read \Illuminate\Database\Eloquent\Collection $projectLog * @property-read int|null $project_log_count - * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ProjectUser[] $projectUser + * @property-read \Illuminate\Database\Eloquent\Collection $projectUser * @property-read int|null $project_user_count * @method static \Illuminate\Database\Eloquent\Builder|Project allData($userid = null) * @method static \Illuminate\Database\Eloquent\Builder|Project authData($userid = null, $owner = null) * @method static \Illuminate\Database\Eloquent\Builder|Project newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|Project newQuery() - * @method static \Illuminate\Database\Query\Builder|Project onlyTrashed() + * @method static \Illuminate\Database\Eloquent\Builder|Project onlyTrashed() * @method static \Illuminate\Database\Eloquent\Builder|Project query() * @method static \Illuminate\Database\Eloquent\Builder|Project whereArchivedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|Project whereArchivedUserid($value) @@ -52,8 +52,8 @@ use Request; * @method static \Illuminate\Database\Eloquent\Builder|Project whereUpdatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|Project whereUserSimple($value) * @method static \Illuminate\Database\Eloquent\Builder|Project whereUserid($value) - * @method static \Illuminate\Database\Query\Builder|Project withTrashed() - * @method static \Illuminate\Database\Query\Builder|Project withoutTrashed() + * @method static \Illuminate\Database\Eloquent\Builder|Project withTrashed() + * @method static \Illuminate\Database\Eloquent\Builder|Project withoutTrashed() * @mixin \Eloquent */ class Project extends AbstractModel diff --git a/app/Models/ProjectColumn.php b/app/Models/ProjectColumn.php index f446fdf9c..438106ad0 100644 --- a/app/Models/ProjectColumn.php +++ b/app/Models/ProjectColumn.php @@ -20,11 +20,11 @@ use Request; * @property \Illuminate\Support\Carbon|null $updated_at * @property \Illuminate\Support\Carbon|null $deleted_at * @property-read \App\Models\Project|null $project - * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ProjectTask[] $projectTask + * @property-read \Illuminate\Database\Eloquent\Collection $projectTask * @property-read int|null $project_task_count * @method static \Illuminate\Database\Eloquent\Builder|ProjectColumn newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|ProjectColumn newQuery() - * @method static \Illuminate\Database\Query\Builder|ProjectColumn onlyTrashed() + * @method static \Illuminate\Database\Eloquent\Builder|ProjectColumn onlyTrashed() * @method static \Illuminate\Database\Eloquent\Builder|ProjectColumn query() * @method static \Illuminate\Database\Eloquent\Builder|ProjectColumn whereColor($value) * @method static \Illuminate\Database\Eloquent\Builder|ProjectColumn whereCreatedAt($value) @@ -34,8 +34,8 @@ use Request; * @method static \Illuminate\Database\Eloquent\Builder|ProjectColumn whereProjectId($value) * @method static \Illuminate\Database\Eloquent\Builder|ProjectColumn whereSort($value) * @method static \Illuminate\Database\Eloquent\Builder|ProjectColumn whereUpdatedAt($value) - * @method static \Illuminate\Database\Query\Builder|ProjectColumn withTrashed() - * @method static \Illuminate\Database\Query\Builder|ProjectColumn withoutTrashed() + * @method static \Illuminate\Database\Eloquent\Builder|ProjectColumn withTrashed() + * @method static \Illuminate\Database\Eloquent\Builder|ProjectColumn withoutTrashed() * @mixin \Eloquent */ class ProjectColumn extends AbstractModel diff --git a/app/Models/ProjectFlow.php b/app/Models/ProjectFlow.php index ad04ecb74..39e074515 100644 --- a/app/Models/ProjectFlow.php +++ b/app/Models/ProjectFlow.php @@ -12,7 +12,7 @@ use App\Module\Base; * @property string|null $name 流程名称 * @property \Illuminate\Support\Carbon|null $created_at * @property \Illuminate\Support\Carbon|null $updated_at - * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ProjectFlowItem[] $projectFlowItem + * @property-read \Illuminate\Database\Eloquent\Collection $projectFlowItem * @property-read int|null $project_flow_item_count * @method static \Illuminate\Database\Eloquent\Builder|ProjectFlow newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|ProjectFlow newQuery() diff --git a/app/Models/ProjectTask.php b/app/Models/ProjectTask.php index 44fb6912c..6b319bfa5 100644 --- a/app/Models/ProjectTask.php +++ b/app/Models/ProjectTask.php @@ -52,18 +52,18 @@ use Request; * @property-read bool $today * @property-read \App\Models\Project|null $project * @property-read \App\Models\ProjectColumn|null $projectColumn - * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ProjectTaskFile[] $taskFile + * @property-read \Illuminate\Database\Eloquent\Collection $taskFile * @property-read int|null $task_file_count - * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ProjectTaskTag[] $taskTag + * @property-read \Illuminate\Database\Eloquent\Collection $taskTag * @property-read int|null $task_tag_count - * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ProjectTaskUser[] $taskUser + * @property-read \Illuminate\Database\Eloquent\Collection $taskUser * @property-read int|null $task_user_count * @method static \Illuminate\Database\Eloquent\Builder|ProjectTask allData($userid = null) * @method static \Illuminate\Database\Eloquent\Builder|ProjectTask authData($userid = null, $owner = null) * @method static \Illuminate\Database\Eloquent\Builder|ProjectTask betweenTime($start, $end, $type = 'taskTime') * @method static \Illuminate\Database\Eloquent\Builder|ProjectTask newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|ProjectTask newQuery() - * @method static \Illuminate\Database\Query\Builder|ProjectTask onlyTrashed() + * @method static \Illuminate\Database\Eloquent\Builder|ProjectTask onlyTrashed() * @method static \Illuminate\Database\Eloquent\Builder|ProjectTask query() * @method static \Illuminate\Database\Eloquent\Builder|ProjectTask whereArchivedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|ProjectTask whereArchivedFollow($value) @@ -92,8 +92,8 @@ use Request; * @method static \Illuminate\Database\Eloquent\Builder|ProjectTask whereStartAt($value) * @method static \Illuminate\Database\Eloquent\Builder|ProjectTask whereUpdatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|ProjectTask whereUserid($value) - * @method static \Illuminate\Database\Query\Builder|ProjectTask withTrashed() - * @method static \Illuminate\Database\Query\Builder|ProjectTask withoutTrashed() + * @method static \Illuminate\Database\Eloquent\Builder|ProjectTask withTrashed() + * @method static \Illuminate\Database\Eloquent\Builder|ProjectTask withoutTrashed() * @mixin \Eloquent */ class ProjectTask extends AbstractModel @@ -530,8 +530,6 @@ class ProjectTask extends AbstractModel public function updateTask($data, &$updateMarking = []) { AbstractModel::transaction(function () use ($data, &$updateMarking) { - // 判断版本 - Base::checkClientVersion('0.19.0'); // 主任务 $mainTask = $this->parent_id > 0 ? self::find($this->parent_id) : null; // 工作流 diff --git a/app/Models/ProjectTaskPushLog.php b/app/Models/ProjectTaskPushLog.php index 626ff4e54..7842770bc 100644 --- a/app/Models/ProjectTaskPushLog.php +++ b/app/Models/ProjectTaskPushLog.php @@ -19,7 +19,7 @@ use Illuminate\Database\Eloquent\SoftDeletes; * @property \Illuminate\Support\Carbon|null $deleted_at * @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskPushLog newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskPushLog newQuery() - * @method static \Illuminate\Database\Query\Builder|ProjectTaskPushLog onlyTrashed() + * @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskPushLog onlyTrashed() * @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskPushLog query() * @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskPushLog whereCreatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskPushLog whereDeletedAt($value) @@ -28,8 +28,8 @@ use Illuminate\Database\Eloquent\SoftDeletes; * @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskPushLog whereType($value) * @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskPushLog whereUpdatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskPushLog whereUserid($value) - * @method static \Illuminate\Database\Query\Builder|ProjectTaskPushLog withTrashed() - * @method static \Illuminate\Database\Query\Builder|ProjectTaskPushLog withoutTrashed() + * @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskPushLog withTrashed() + * @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskPushLog withoutTrashed() * @mixin \Eloquent */ class ProjectTaskPushLog extends AbstractModel diff --git a/app/Models/Report.php b/app/Models/Report.php index 24df1078a..e6aa17c8d 100644 --- a/app/Models/Report.php +++ b/app/Models/Report.php @@ -23,10 +23,10 @@ use JetBrains\PhpStorm\Pure; * @property int $userid * @property string $content * @property string $sign 汇报唯一标识 - * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\ReportReceive[] $Receives + * @property-read \Illuminate\Database\Eloquent\Collection $Receives * @property-read int|null $receives_count * @property-read mixed $receives - * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\User[] $receivesUser + * @property-read \Illuminate\Database\Eloquent\Collection $receivesUser * @property-read int|null $receives_user_count * @property-read \App\Models\User|null $sendUser * @method static Builder|Report newModelQuery() diff --git a/app/Models/TaskWorker.php b/app/Models/TaskWorker.php index bdb9bef16..237f45d1f 100644 --- a/app/Models/TaskWorker.php +++ b/app/Models/TaskWorker.php @@ -17,7 +17,7 @@ use Illuminate\Database\Eloquent\SoftDeletes; * @property \Illuminate\Support\Carbon|null $deleted_at * @method static \Illuminate\Database\Eloquent\Builder|TaskWorker newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|TaskWorker newQuery() - * @method static \Illuminate\Database\Query\Builder|TaskWorker onlyTrashed() + * @method static \Illuminate\Database\Eloquent\Builder|TaskWorker onlyTrashed() * @method static \Illuminate\Database\Eloquent\Builder|TaskWorker query() * @method static \Illuminate\Database\Eloquent\Builder|TaskWorker whereArgs($value) * @method static \Illuminate\Database\Eloquent\Builder|TaskWorker whereCreatedAt($value) @@ -27,8 +27,8 @@ use Illuminate\Database\Eloquent\SoftDeletes; * @method static \Illuminate\Database\Eloquent\Builder|TaskWorker whereId($value) * @method static \Illuminate\Database\Eloquent\Builder|TaskWorker whereStartAt($value) * @method static \Illuminate\Database\Eloquent\Builder|TaskWorker whereUpdatedAt($value) - * @method static \Illuminate\Database\Query\Builder|TaskWorker withTrashed() - * @method static \Illuminate\Database\Query\Builder|TaskWorker withoutTrashed() + * @method static \Illuminate\Database\Eloquent\Builder|TaskWorker withTrashed() + * @method static \Illuminate\Database\Eloquent\Builder|TaskWorker withoutTrashed() * @mixin \Eloquent */ class TaskWorker extends AbstractModel diff --git a/app/Models/WebSocketDialog.php b/app/Models/WebSocketDialog.php index f4ebd19bf..2c0d64f11 100644 --- a/app/Models/WebSocketDialog.php +++ b/app/Models/WebSocketDialog.php @@ -24,11 +24,11 @@ use Illuminate\Database\Eloquent\SoftDeletes; * @property \Illuminate\Support\Carbon|null $created_at * @property \Illuminate\Support\Carbon|null $updated_at * @property \Illuminate\Support\Carbon|null $deleted_at - * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\WebSocketDialogUser[] $dialogUser + * @property-read \Illuminate\Database\Eloquent\Collection $dialogUser * @property-read int|null $dialog_user_count * @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialog newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialog newQuery() - * @method static \Illuminate\Database\Query\Builder|WebSocketDialog onlyTrashed() + * @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialog onlyTrashed() * @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialog query() * @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialog whereAvatar($value) * @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialog whereCreatedAt($value) @@ -40,8 +40,8 @@ use Illuminate\Database\Eloquent\SoftDeletes; * @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialog whereOwnerId($value) * @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialog whereType($value) * @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialog whereUpdatedAt($value) - * @method static \Illuminate\Database\Query\Builder|WebSocketDialog withTrashed() - * @method static \Illuminate\Database\Query\Builder|WebSocketDialog withoutTrashed() + * @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialog withTrashed() + * @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialog withoutTrashed() * @mixin \Eloquent */ class WebSocketDialog extends AbstractModel diff --git a/app/Models/WebSocketDialogMsg.php b/app/Models/WebSocketDialogMsg.php index a28450fd5..2929d07e2 100644 --- a/app/Models/WebSocketDialogMsg.php +++ b/app/Models/WebSocketDialogMsg.php @@ -39,7 +39,7 @@ use Illuminate\Database\Eloquent\SoftDeletes; * @property-read \App\Models\WebSocketDialog|null $webSocketDialog * @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsg newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsg newQuery() - * @method static \Illuminate\Database\Query\Builder|WebSocketDialogMsg onlyTrashed() + * @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsg onlyTrashed() * @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsg query() * @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsg whereCreatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsg whereDeletedAt($value) @@ -61,8 +61,8 @@ use Illuminate\Database\Eloquent\SoftDeletes; * @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsg whereType($value) * @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsg whereUpdatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsg whereUserid($value) - * @method static \Illuminate\Database\Query\Builder|WebSocketDialogMsg withTrashed() - * @method static \Illuminate\Database\Query\Builder|WebSocketDialogMsg withoutTrashed() + * @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsg withTrashed() + * @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsg withoutTrashed() * @mixin \Eloquent */ class WebSocketDialogMsg extends AbstractModel diff --git a/app/Module/Base.php b/app/Module/Base.php index bc66f1fa1..e32a40975 100755 --- a/app/Module/Base.php +++ b/app/Module/Base.php @@ -1933,60 +1933,6 @@ class Base } } - /** - * php://input 字符串解析到变量并获取指定值 - * @param $key - * @return array - */ - public static function getContentsParse($key) - { - parse_str(Request::getContent(), $input); - if ($key) { - $input = $input[$key] ?? array(); - } - return is_array($input) ? $input : array($input); - } - - /** - * php://input 字符串解析到变量并获取指定值 - * @param $key - * @param null $default - * @return mixed|null - */ - public static function getContentValue($key, $default = null) - { - global $_A; - if (!isset($_A["__static_input_content"])) { - parse_str(Request::getContent(), $input); - $_A["__static_input_content"] = $input; - } - return $_A["__static_input_content"][$key] ?? $default; - } - - /** - * @param $key - * @param null $default - * @return array|mixed|string|null - */ - public static function getPostValue($key, $default = null) - { - $value = self::getContentValue($key, $default); - if (!isset($value)) { - $value = Request::post($key, $default); - } - return $value; - } - - /** - * @param $key - * @param null $default - * @return int - */ - public static function getPostInt($key, $default = null) - { - return intval(self::getPostValue($key, $default)); - } - /** * 多维 array_values * @param $array diff --git a/app/Module/Doo.php b/app/Module/Doo.php index 258921478..30000a508 100644 --- a/app/Module/Doo.php +++ b/app/Module/Doo.php @@ -4,12 +4,14 @@ namespace App\Module; use App\Exceptions\ApiException; use App\Models\User; +use Cache; use Carbon\Carbon; use FFI; class Doo { private static $doo; + private static $passphrase = "LYHevk5n"; /** * char转为字符串 @@ -45,6 +47,9 @@ class Doo char* md5s(char* text, char* password); char* macs(); char* dooSN(); + char* pgpGenerateKeyPair(char* name, char* email, char* passphrase); + char* pgpEncrypt(char* plainText, char* publicKey); + char* pgpDecrypt(char* cipherText, char* privateKey, char* passphrase); EOF, "/usr/lib/doo/doo.so"); $token = $token ?: Base::headerOrInput('token'); $language = $language ?: Base::headerOrInput('language'); @@ -299,4 +304,103 @@ class Doo { return self::string(self::doo()->dooSN()); } + + /** + * 生成PGP密钥对 + * @param $name + * @param $email + * @param string $passphrase + * @return array + */ + public static function pgpGenerateKeyPair($name, $email, string $passphrase = ""): array + { + return Base::json2array(self::string(self::doo()->pgpGenerateKeyPair($name, $email, $passphrase))); + } + + /** + * PGP加密 + * @param $plaintext + * @param $publicKey + * @return string + */ + public static function pgpEncrypt($plaintext, $publicKey): string + { + if (strlen($publicKey) < 50) { + $keyCache = Base::json2array(Cache::get("KeyPair::" . $publicKey)); + $publicKey = $keyCache['public_key']; + } + return self::string(self::doo()->pgpEncrypt($plaintext, $publicKey)); + } + + /** + * PGP解密 + * @param $encryptedText + * @param $privateKey + * @param null $passphrase + * @return string + */ + public static function pgpDecrypt($encryptedText, $privateKey, $passphrase = null): string + { + if (strlen($privateKey) < 50) { + $keyCache = Base::json2array(Cache::get("KeyPair::" . $privateKey)); + $privateKey = $keyCache['private_key']; + $passphrase = $keyCache['passphrase']; + } + return self::string(self::doo()->pgpDecrypt($encryptedText, $privateKey, $passphrase)); + } + + /** + * PGP加密API + * @param $plaintext + * @param $publicKey + * @return string + */ + public static function pgpEncryptApi($plaintext, $publicKey): string + { + $content = Base::array2json($plaintext); + $content = self::pgpEncrypt($content, $publicKey); + return preg_replace("/\s*-----(BEGIN|END) PGP MESSAGE-----\s*/i", "", $content); + } + + /** + * PGP解密API + * @param $encryptedText + * @param null $privateKey + * @param null $passphrase + * @return array + */ + public static function pgpDecryptApi($encryptedText, $privateKey, $passphrase = null): array + { + $content = "-----BEGIN PGP MESSAGE-----\n\n" . $encryptedText . "\n-----END PGP MESSAGE-----"; + $content = self::pgpDecrypt($content, $privateKey, $passphrase); + return Base::json2array($content); + } + + /** + * 解析PGP参数 + * @param $string + * @return string[] + */ + public static function pgpParseStr($string): array + { + $array = [ + 'encrypt_type' => '', + 'encrypt_id' => '', + 'client_type' => '', + 'client_key' => '', + ]; + $string = str_replace(";", "&", $string); + parse_str($string, $params); + foreach ($params as $key => $value) { + $key = strtolower(trim($key)); + if ($key) { + $array[$key] = trim($value); + } + } + if ($array['client_type'] === 'pgp' && $array['client_key']) { + $array['client_key'] = str_replace(["-", "_", "$"], ["+", "/", "\n"], $array['client_key']); + $array['client_key'] = "-----BEGIN PGP PUBLIC KEY BLOCK-----\n\n" . $array['client_key'] . "\n-----END PGP PUBLIC KEY BLOCK-----"; + } + return $array; + } } diff --git a/composer.json b/composer.json index ea846c57d..f2676d966 100644 --- a/composer.json +++ b/composer.json @@ -13,6 +13,8 @@ "ext-gd": "*", "ext-json": "*", "ext-libxml": "*", + "ext-gnupg": "*", + "ext-openssl": "*", "ext-simplexml": "*", "directorytree/ldaprecord-laravel": "^2.7", "fideloper/proxy": "^4.4.1", diff --git a/docker-compose.yml b/docker-compose.yml index 99874a798..81424ff28 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,8 +3,12 @@ version: '3' services: php: container_name: "dootask-php-${APP_ID}" - image: "kuaifan/php:swoole-8.0.rc8" - shm_size: "1024m" + image: "kuaifan/php:swoole-8.0.rc9" + shm_size: "2gb" + ulimits: + core: + soft: 0 + hard: 0 volumes: - ./docker/crontab/crontab.conf:/etc/supervisor/conf.d/crontab.conf - ./docker/php/php.conf:/etc/supervisor/conf.d/php.conf diff --git a/electron/index.html b/electron/index.html index 926e8005f..ac9433b87 100644 --- a/electron/index.html +++ b/electron/index.html @@ -12,6 +12,7 @@ + diff --git a/electron/package.json b/electron/package.json index d3d41ac09..be78cf1e9 100644 --- a/electron/package.json +++ b/electron/package.json @@ -26,13 +26,13 @@ "url": "https://github.com/kuaifan/dootask.git" }, "devDependencies": { - "@electron-forge/cli": "^6.0.5", - "@electron-forge/maker-deb": "^6.0.5", - "@electron-forge/maker-rpm": "^6.0.5", - "@electron-forge/maker-squirrel": "^6.0.5", - "@electron-forge/maker-zip": "^6.0.5", + "@electron-forge/cli": "^6.1.0", + "@electron-forge/maker-deb": "^6.1.0", + "@electron-forge/maker-rpm": "^6.1.0", + "@electron-forge/maker-squirrel": "^6.1.0", + "@electron-forge/maker-zip": "^6.1.0", "dotenv": "^16.0.3", - "electron": "^23.1.4", + "electron": "^23.2.1", "electron-builder": "^23.6.0", "electron-notarize": "^1.2.2", "form-data": "^4.0.0", diff --git a/package.json b/package.json index 005992d53..031241909 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "DooTask", - "version": "0.25.42", + "version": "0.25.48", "description": "DooTask is task management system.", "scripts": { "start": "./cmd dev", @@ -23,12 +23,13 @@ "axios": "^0.24.0", "cross-env": "^7.0.3", "css-loader": "^6.7.2", + "dexie": "^3.2.3", "echarts": "^5.2.2", "element-ui": "git+https://github.com/kuaifan/element.git#master", "file-loader": "^6.2.0", "inquirer": "^8.2.0", "internal-ip": "^6.2.0", - "jquery": "^3.6.1", + "jquery": "^3.6.4", "jspdf": "^2.5.1", "le5le-store": "^1.0.7", "less": "^4.1.2", @@ -38,6 +39,7 @@ "moment": "^2.29.1", "node-sass": "^6.0.1", "notification-koro1": "^1.1.1", + "openpgp": "git+https://github.com/kuaifan/openpgpjs.git#base64", "photoswipe": "^5.2.8", "postcss": "^8.4.5", "quill": "^1.3.7", diff --git a/public/docs/assets/main.bundle.js b/public/docs/assets/main.bundle.js index d4d1712c8..030856e34 100644 --- a/public/docs/assets/main.bundle.js +++ b/public/docs/assets/main.bundle.js @@ -1,8 +1,8 @@ -(()=>{var il={2988:()=>{+function(w){"use strict";var y=".dropdown-backdrop",o='[data-toggle="dropdown"]',h=function(p){w(p).on("click.bs.dropdown",this.toggle)};h.VERSION="3.4.1";function n(p){var s=p.attr("data-target");s||(s=p.attr("href"),s=s&&/#[A-Za-z]/.test(s)&&s.replace(/.*(?=#[^\s]*$)/,""));var u=s!=="#"?w(document).find(s):null;return u&&u.length?u:p.parent()}function r(p){p&&p.which===3||(w(y).remove(),w(o).each(function(){var s=w(this),u=n(s),g={relatedTarget:this};!u.hasClass("open")||p&&p.type=="click"&&/input|textarea/i.test(p.target.tagName)&&w.contains(u[0],p.target)||(u.trigger(p=w.Event("hide.bs.dropdown",g)),!p.isDefaultPrevented()&&(s.attr("aria-expanded","false"),u.removeClass("open").trigger(w.Event("hidden.bs.dropdown",g))))}))}h.prototype.toggle=function(p){var s=w(this);if(!s.is(".disabled, :disabled")){var u=n(s),g=u.hasClass("open");if(r(),!g){"ontouchstart"in document.documentElement&&!u.closest(".navbar-nav").length&&w(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(w(this)).on("click",r);var i={relatedTarget:this};if(u.trigger(p=w.Event("show.bs.dropdown",i)),p.isDefaultPrevented())return;s.trigger("focus").attr("aria-expanded","true"),u.toggleClass("open").trigger(w.Event("shown.bs.dropdown",i))}return!1}},h.prototype.keydown=function(p){if(!(!/(38|40|27|32)/.test(p.which)||/input|textarea/i.test(p.target.tagName))){var s=w(this);if(p.preventDefault(),p.stopPropagation(),!s.is(".disabled, :disabled")){var u=n(s),g=u.hasClass("open");if(!g&&p.which!=27||g&&p.which==27)return p.which==27&&u.find(o).trigger("focus"),s.trigger("click");var i=" li:not(.disabled):visible a",m=u.find(".dropdown-menu"+i);if(!!m.length){var f=m.index(p.target);p.which==38&&f>0&&f--,p.which==40&&f{+function(w){"use strict";var y=function(n,r){this.init("popover",n,r)};if(!w.fn.tooltip)throw new Error("Popover requires tooltip.js");y.VERSION="3.4.1",y.DEFAULTS=w.extend({},w.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),y.prototype=w.extend({},w.fn.tooltip.Constructor.prototype),y.prototype.constructor=y,y.prototype.getDefaults=function(){return y.DEFAULTS},y.prototype.setContent=function(){var n=this.tip(),r=this.getTitle(),l=this.getContent();if(this.options.html){var c=typeof l;this.options.sanitize&&(r=this.sanitizeHtml(r),c==="string"&&(l=this.sanitizeHtml(l))),n.find(".popover-title").html(r),n.find(".popover-content").children().detach().end()[c==="string"?"html":"append"](l)}else n.find(".popover-title").text(r),n.find(".popover-content").children().detach().end().text(l);n.removeClass("fade top bottom left right in"),n.find(".popover-title").html()||n.find(".popover-title").hide()},y.prototype.hasContent=function(){return this.getTitle()||this.getContent()},y.prototype.getContent=function(){var n=this.$element,r=this.options;return n.attr("data-content")||(typeof r.content=="function"?r.content.call(n[0]):r.content)},y.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};function o(n){return this.each(function(){var r=w(this),l=r.data("bs.popover"),c=typeof n=="object"&&n;!l&&/destroy|hide/.test(n)||(l||r.data("bs.popover",l=new y(this,c)),typeof n=="string"&&l[n]())})}var h=w.fn.popover;w.fn.popover=o,w.fn.popover.Constructor=y,w.fn.popover.noConflict=function(){return w.fn.popover=h,this}}(jQuery)},954:()=>{+function(w){"use strict";function y(n,r){this.$body=w(document.body),this.$scrollElement=w(n).is(document.body)?w(window):w(n),this.options=w.extend({},y.DEFAULTS,r),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",w.proxy(this.process,this)),this.refresh(),this.process()}y.VERSION="3.4.1",y.DEFAULTS={offset:10},y.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},y.prototype.refresh=function(){var n=this,r="offset",l=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),w.isWindow(this.$scrollElement[0])||(r="position",l=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var c=w(this),p=c.data("target")||c.attr("href"),s=/^#./.test(p)&&w(p);return s&&s.length&&s.is(":visible")&&[[s[r]().top+l,p]]||null}).sort(function(c,p){return c[0]-p[0]}).each(function(){n.offsets.push(this[0]),n.targets.push(this[1])})},y.prototype.process=function(){var n=this.$scrollElement.scrollTop()+this.options.offset,r=this.getScrollHeight(),l=this.options.offset+r-this.$scrollElement.height(),c=this.offsets,p=this.targets,s=this.activeTarget,u;if(this.scrollHeight!=r&&this.refresh(),n>=l)return s!=(u=p[p.length-1])&&this.activate(u);if(s&&n=c[u]&&(c[u+1]===void 0||n{+function(w){"use strict";var y=function(r){this.element=w(r)};y.VERSION="3.4.1",y.TRANSITION_DURATION=150,y.prototype.show=function(){var r=this.element,l=r.closest("ul:not(.dropdown-menu)"),c=r.data("target");if(c||(c=r.attr("href"),c=c&&c.replace(/.*(?=#[^\s]*$)/,"")),!r.parent("li").hasClass("active")){var p=l.find(".active:last a"),s=w.Event("hide.bs.tab",{relatedTarget:r[0]}),u=w.Event("show.bs.tab",{relatedTarget:p[0]});if(p.trigger(s),r.trigger(u),!(u.isDefaultPrevented()||s.isDefaultPrevented())){var g=w(document).find(c);this.activate(r.closest("li"),l),this.activate(g,g.parent(),function(){p.trigger({type:"hidden.bs.tab",relatedTarget:r[0]}),r.trigger({type:"shown.bs.tab",relatedTarget:p[0]})})}}},y.prototype.activate=function(r,l,c){var p=l.find("> .active"),s=c&&w.support.transition&&(p.length&&p.hasClass("fade")||!!l.find("> .fade").length);function u(){p.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),r.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),s?(r[0].offsetWidth,r.addClass("in")):r.removeClass("fade"),r.parent(".dropdown-menu").length&&r.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),c&&c()}p.length&&s?p.one("bsTransitionEnd",u).emulateTransitionEnd(y.TRANSITION_DURATION):u(),p.removeClass("in")};function o(r){return this.each(function(){var l=w(this),c=l.data("bs.tab");c||l.data("bs.tab",c=new y(this)),typeof r=="string"&&c[r]()})}var h=w.fn.tab;w.fn.tab=o,w.fn.tab.Constructor=y,w.fn.tab.noConflict=function(){return w.fn.tab=h,this};var n=function(r){r.preventDefault(),o.call(w(this),"show")};w(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',n).on("click.bs.tab.data-api",'[data-toggle="pill"]',n)}(jQuery)},8480:()=>{+function(w){"use strict";var y=["sanitize","whiteList","sanitizeFn"],o=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],h=/^aria-[\w-]*$/i,n={"*":["class","dir","id","lang","role",h],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},r=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,l=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function c(i,m){var f=i.nodeName.toLowerCase();if(w.inArray(f,m)!==-1)return w.inArray(f,o)!==-1?Boolean(i.nodeValue.match(r)||i.nodeValue.match(l)):!0;for(var d=w(m).filter(function(E,T){return T instanceof RegExp}),S=0,v=d.length;S
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:n},s.prototype.init=function(i,m,f){if(this.enabled=!0,this.type=i,this.$element=w(m),this.options=this.getOptions(f),this.$viewport=this.options.viewport&&w(document).find(w.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var d=this.options.trigger.split(" "),S=d.length;S--;){var v=d[S];if(v=="click")this.$element.on("click."+this.type,this.options.selector,w.proxy(this.toggle,this));else if(v!="manual"){var E=v=="hover"?"mouseenter":"focusin",T=v=="hover"?"mouseleave":"focusout";this.$element.on(E+"."+this.type,this.options.selector,w.proxy(this.enter,this)),this.$element.on(T+"."+this.type,this.options.selector,w.proxy(this.leave,this))}}this.options.selector?this._options=w.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},s.prototype.getDefaults=function(){return s.DEFAULTS},s.prototype.getOptions=function(i){var m=this.$element.data();for(var f in m)m.hasOwnProperty(f)&&w.inArray(f,y)!==-1&&delete m[f];return i=w.extend({},this.getDefaults(),m,i),i.delay&&typeof i.delay=="number"&&(i.delay={show:i.delay,hide:i.delay}),i.sanitize&&(i.template=p(i.template,i.whiteList,i.sanitizeFn)),i},s.prototype.getDelegateOptions=function(){var i={},m=this.getDefaults();return this._options&&w.each(this._options,function(f,d){m[f]!=d&&(i[f]=d)}),i},s.prototype.enter=function(i){var m=i instanceof this.constructor?i:w(i.currentTarget).data("bs."+this.type);if(m||(m=new this.constructor(i.currentTarget,this.getDelegateOptions()),w(i.currentTarget).data("bs."+this.type,m)),i instanceof w.Event&&(m.inState[i.type=="focusin"?"focus":"hover"]=!0),m.tip().hasClass("in")||m.hoverState=="in"){m.hoverState="in";return}if(clearTimeout(m.timeout),m.hoverState="in",!m.options.delay||!m.options.delay.show)return m.show();m.timeout=setTimeout(function(){m.hoverState=="in"&&m.show()},m.options.delay.show)},s.prototype.isInStateTrue=function(){for(var i in this.inState)if(this.inState[i])return!0;return!1},s.prototype.leave=function(i){var m=i instanceof this.constructor?i:w(i.currentTarget).data("bs."+this.type);if(m||(m=new this.constructor(i.currentTarget,this.getDelegateOptions()),w(i.currentTarget).data("bs."+this.type,m)),i instanceof w.Event&&(m.inState[i.type=="focusout"?"focus":"hover"]=!1),!m.isInStateTrue()){if(clearTimeout(m.timeout),m.hoverState="out",!m.options.delay||!m.options.delay.hide)return m.hide();m.timeout=setTimeout(function(){m.hoverState=="out"&&m.hide()},m.options.delay.hide)}},s.prototype.show=function(){var i=w.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(i);var m=w.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(i.isDefaultPrevented()||!m)return;var f=this,d=this.tip(),S=this.getUID(this.type);this.setContent(),d.attr("id",S),this.$element.attr("aria-describedby",S),this.options.animation&&d.addClass("fade");var v=typeof this.options.placement=="function"?this.options.placement.call(this,d[0],this.$element[0]):this.options.placement,E=/\s?auto?\s?/i,T=E.test(v);T&&(v=v.replace(E,"")||"top"),d.detach().css({top:0,left:0,display:"block"}).addClass(v).data("bs."+this.type,this),this.options.container?d.appendTo(w(document).find(this.options.container)):d.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var P=this.getPosition(),D=d[0].offsetWidth,_=d[0].offsetHeight;if(T){var b=v,x=this.getPosition(this.$viewport);v=v=="bottom"&&P.bottom+_>x.bottom?"top":v=="top"&&P.top-_x.width?"left":v=="left"&&P.left-DE.top+E.height&&(S.top=E.top+E.height-P)}else{var D=m.left-v,_=m.left+v+f;DE.right&&(S.left=E.left+E.width-_)}return S},s.prototype.getTitle=function(){var i,m=this.$element,f=this.options;return i=m.attr("data-original-title")||(typeof f.title=="function"?f.title.call(m[0]):f.title),i},s.prototype.getUID=function(i){do i+=~~(Math.random()*1e6);while(document.getElementById(i));return i},s.prototype.tip=function(){if(!this.$tip&&(this.$tip=w(this.options.template),this.$tip.length!=1))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},s.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},s.prototype.enable=function(){this.enabled=!0},s.prototype.disable=function(){this.enabled=!1},s.prototype.toggleEnabled=function(){this.enabled=!this.enabled},s.prototype.toggle=function(i){var m=this;i&&(m=w(i.currentTarget).data("bs."+this.type),m||(m=new this.constructor(i.currentTarget,this.getDelegateOptions()),w(i.currentTarget).data("bs."+this.type,m))),i?(m.inState.click=!m.inState.click,m.isInStateTrue()?m.enter(m):m.leave(m)):m.tip().hasClass("in")?m.leave(m):m.enter(m)},s.prototype.destroy=function(){var i=this;clearTimeout(this.timeout),this.hide(function(){i.$element.off("."+i.type).removeData("bs."+i.type),i.$tip&&i.$tip.detach(),i.$tip=null,i.$arrow=null,i.$viewport=null,i.$element=null})},s.prototype.sanitizeHtml=function(i){return p(i,this.options.whiteList,this.options.sanitizeFn)};function u(i){return this.each(function(){var m=w(this),f=m.data("bs.tooltip"),d=typeof i=="object"&&i;!f&&/destroy|hide/.test(i)||(f||m.data("bs.tooltip",f=new s(this,d)),typeof i=="string"&&f[i]())})}var g=w.fn.tooltip;w.fn.tooltip=u,w.fn.tooltip.Constructor=s,w.fn.tooltip.noConflict=function(){return w.fn.tooltip=g,this}}(jQuery)},7030:w=>{var y=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},o=-1,h=1,n=0;y.Diff=function(r,l){return[r,l]},y.prototype.diff_main=function(r,l,c,p){typeof p=="undefined"&&(this.Diff_Timeout<=0?p=Number.MAX_VALUE:p=new Date().getTime()+this.Diff_Timeout*1e3);var s=p;if(r==null||l==null)throw new Error("Null input. (diff_main)");if(r==l)return r?[new y.Diff(n,r)]:[];typeof c=="undefined"&&(c=!0);var u=c,g=this.diff_commonPrefix(r,l),i=r.substring(0,g);r=r.substring(g),l=l.substring(g),g=this.diff_commonSuffix(r,l);var m=r.substring(r.length-g);r=r.substring(0,r.length-g),l=l.substring(0,l.length-g);var f=this.diff_compute_(r,l,u,s);return i&&f.unshift(new y.Diff(n,i)),m&&f.push(new y.Diff(n,m)),this.diff_cleanupMerge(f),f},y.prototype.diff_compute_=function(r,l,c,p){var s;if(!r)return[new y.Diff(h,l)];if(!l)return[new y.Diff(o,r)];var u=r.length>l.length?r:l,g=r.length>l.length?l:r,i=u.indexOf(g);if(i!=-1)return s=[new y.Diff(h,u.substring(0,i)),new y.Diff(n,g),new y.Diff(h,u.substring(i+g.length))],r.length>l.length&&(s[0][0]=s[2][0]=o),s;if(g.length==1)return[new y.Diff(o,r),new y.Diff(h,l)];var m=this.diff_halfMatch_(r,l);if(m){var f=m[0],d=m[1],S=m[2],v=m[3],E=m[4],T=this.diff_main(f,S,c,p),P=this.diff_main(d,v,c,p);return T.concat([new y.Diff(n,E)],P)}return c&&r.length>100&&l.length>100?this.diff_lineMode_(r,l,p):this.diff_bisect_(r,l,p)},y.prototype.diff_lineMode_=function(r,l,c){var p=this.diff_linesToChars_(r,l);r=p.chars1,l=p.chars2;var s=p.lineArray,u=this.diff_main(r,l,!1,c);this.diff_charsToLines_(u,s),this.diff_cleanupSemantic(u),u.push(new y.Diff(n,""));for(var g=0,i=0,m=0,f="",d="";g=1&&m>=1){u.splice(g-i-m,i+m),g=g-i-m;for(var S=this.diff_main(f,d,!1,c),v=S.length-1;v>=0;v--)u.splice(g,0,S[v]);g=g+S.length}m=0,i=0,f="",d="";break}g++}return u.pop(),u},y.prototype.diff_bisect_=function(r,l,c){for(var p=r.length,s=l.length,u=Math.ceil((p+s)/2),g=u,i=2*u,m=new Array(i),f=new Array(i),d=0;dc);_++){for(var b=-_+E;b<=_-T;b+=2){var x=g+b,I;b==-_||b!=_&&m[x-1]p)T+=2;else if(R>s)E+=2;else if(v){var C=g+S-b;if(C>=0&&C=O)return this.diff_bisectSplit_(r,l,I,R,c)}}}for(var $=-_+P;$<=_-D;$+=2){var C=g+$,O;$==-_||$!=_&&f[C-1]p)D+=2;else if(k>s)P+=2;else if(!v){var x=g+S-$;if(x>=0&&x=O)return this.diff_bisectSplit_(r,l,I,R,c)}}}}return[new y.Diff(o,r),new y.Diff(h,l)]},y.prototype.diff_bisectSplit_=function(r,l,c,p,s){var u=r.substring(0,c),g=l.substring(0,p),i=r.substring(c),m=l.substring(p),f=this.diff_main(u,g,!1,s),d=this.diff_main(i,m,!1,s);return f.concat(d)},y.prototype.diff_linesToChars_=function(r,l){var c=[],p={};c[0]="";function s(m){for(var f="",d=0,S=-1,v=c.length;Sp?r=r.substring(c-p):cl.length?r:l,p=r.length>l.length?l:r;if(c.length<4||p.length*2=T.length?[I,R,C,O,x]:null}var g=u(c,p,Math.ceil(c.length/4)),i=u(c,p,Math.ceil(c.length/2)),m;if(!g&&!i)return null;i?g?m=g[4].length>i[4].length?g:i:m=i:m=g;var f,d,S,v;r.length>l.length?(f=m[0],d=m[1],S=m[2],v=m[3]):(S=m[0],v=m[1],f=m[2],d=m[3]);var E=m[4];return[f,d,S,v,E]},y.prototype.diff_cleanupSemantic=function(r){for(var l=!1,c=[],p=0,s=null,u=0,g=0,i=0,m=0,f=0;u0?c[p-1]:-1,g=0,i=0,m=0,f=0,s=null,l=!0)),u++;for(l&&this.diff_cleanupMerge(r),this.diff_cleanupSemanticLossless(r),u=1;u=E?(v>=d.length/2||v>=S.length/2)&&(r.splice(u,0,new y.Diff(n,S.substring(0,v))),r[u-1][1]=d.substring(0,d.length-v),r[u+1][1]=S.substring(v),u++):(E>=d.length/2||E>=S.length/2)&&(r.splice(u,0,new y.Diff(n,d.substring(0,E))),r[u-1][0]=h,r[u-1][1]=S.substring(0,S.length-E),r[u+1][0]=o,r[u+1][1]=d.substring(E),u++),u++}u++}},y.prototype.diff_cleanupSemanticLossless=function(r){function l(E,T){if(!E||!T)return 6;var P=E.charAt(E.length-1),D=T.charAt(0),_=P.match(y.nonAlphaNumericRegex_),b=D.match(y.nonAlphaNumericRegex_),x=_&&P.match(y.whitespaceRegex_),I=b&&D.match(y.whitespaceRegex_),R=x&&P.match(y.linebreakRegex_),C=I&&D.match(y.linebreakRegex_),O=R&&E.match(y.blanklineEndRegex_),$=C&&T.match(y.blanklineStartRegex_);return O||$?5:R||C?4:_&&!x&&I?3:x||I?2:_||b?1:0}for(var c=1;c=S&&(S=v,m=p,f=s,d=u)}r[c-1][1]!=m&&(m?r[c-1][1]=m:(r.splice(c-1,1),c--),r[c][1]=f,d?r[c+1][1]=d:(r.splice(c+1,1),c--))}c++}},y.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,y.whitespaceRegex_=/\s/,y.linebreakRegex_=/[\r\n]/,y.blanklineEndRegex_=/\n\r?\n$/,y.blanklineStartRegex_=/^\r?\n\r?\n/,y.prototype.diff_cleanupEfficiency=function(r){for(var l=!1,c=[],p=0,s=null,u=0,g=!1,i=!1,m=!1,f=!1;u0?c[p-1]:-1,m=f=!1),l=!0)),u++;l&&this.diff_cleanupMerge(r)},y.prototype.diff_cleanupMerge=function(r){r.push(new y.Diff(n,""));for(var l=0,c=0,p=0,s="",u="",g;l1?(c!==0&&p!==0&&(g=this.diff_commonPrefix(u,s),g!==0&&(l-c-p>0&&r[l-c-p-1][0]==n?r[l-c-p-1][1]+=u.substring(0,g):(r.splice(0,0,new y.Diff(n,u.substring(0,g))),l++),u=u.substring(g),s=s.substring(g)),g=this.diff_commonSuffix(u,s),g!==0&&(r[l][1]=u.substring(u.length-g)+r[l][1],u=u.substring(0,u.length-g),s=s.substring(0,s.length-g))),l-=c+p,r.splice(l,c+p),s.length&&(r.splice(l,0,new y.Diff(o,s)),l++),u.length&&(r.splice(l,0,new y.Diff(h,u)),l++),l++):l!==0&&r[l-1][0]==n?(r[l-1][1]+=r[l][1],r.splice(l,1)):l++,p=0,c=0,s="",u="";break}r[r.length-1][1]===""&&r.pop();var i=!1;for(l=1;ll));g++)s=c,u=p;return r.length!=g&&r[g][0]===o?u:u+(l-s)},y.prototype.diff_prettyHtml=function(r){for(var l=[],c=/&/g,p=//g,u=/\n/g,g=0;g");switch(i){case h:l[g]=''+f+"";break;case o:l[g]=''+f+"";break;case n:l[g]=""+f+"";break}}return l.join("")},y.prototype.diff_text1=function(r){for(var l=[],c=0;cthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var p=this.match_alphabet_(l),s=this;function u(I,R){var C=I/l.length,O=Math.abs(c-R);return s.Match_Distance?C+O/s.Match_Distance:O?1:C}var g=this.Match_Threshold,i=r.indexOf(l,c);i!=-1&&(g=Math.min(u(0,i),g),i=r.lastIndexOf(l,c+l.length),i!=-1&&(g=Math.min(u(0,i),g)));var m=1<=T;_--){var b=p[r.charAt(_-1)];if(E===0?D[_]=(D[_+1]<<1|1)&b:D[_]=(D[_+1]<<1|1)&b|((v[_+1]|v[_])<<1|1)|v[_+1],D[_]&m){var x=u(E,_-1);if(x<=g)if(g=x,i=_-1,i>c)T=Math.max(1,2*c-i);else break}}if(u(E+1,c)>g)break;v=D}return i},y.prototype.match_alphabet_=function(r){for(var l={},c=0;c2&&(this.diff_cleanupSemantic(s),this.diff_cleanupEfficiency(s));else if(r&&typeof r=="object"&&typeof l=="undefined"&&typeof c=="undefined")s=r,p=this.diff_text1(s);else if(typeof r=="string"&&l&&typeof l=="object"&&typeof c=="undefined")p=r,s=l;else if(typeof r=="string"&&typeof l=="string"&&c&&typeof c=="object")p=r,s=c;else throw new Error("Unknown call format to patch_make.");if(s.length===0)return[];for(var u=[],g=new y.patch_obj,i=0,m=0,f=0,d=p,S=p,v=0;v=2*this.Patch_Margin&&i&&(this.patch_addContext_(g,d),u.push(g),g=new y.patch_obj,i=0,d=S,m=f);break}E!==h&&(m+=T.length),E!==o&&(f+=T.length)}return i&&(this.patch_addContext_(g,d),u.push(g)),u},y.prototype.patch_deepCopy=function(r){for(var l=[],c=0;cthis.Match_MaxBits?(m=this.match_main(l,i.substring(0,this.Match_MaxBits),g),m!=-1&&(f=this.match_main(l,i.substring(i.length-this.Match_MaxBits),g+i.length-this.Match_MaxBits),(f==-1||m>=f)&&(m=-1))):m=this.match_main(l,i,g),m==-1)s[u]=!1,p-=r[u].length2-r[u].length1;else{s[u]=!0,p=m-g;var d;if(f==-1?d=l.substring(m,m+i.length):d=l.substring(m,f+this.Match_MaxBits),i==d)l=l.substring(0,m)+this.diff_text2(r[u].diffs)+l.substring(m+i.length);else{var S=this.diff_main(i,d,!1);if(i.length>this.Match_MaxBits&&this.diff_levenshtein(S)/i.length>this.Patch_DeleteThreshold)s[u]=!1;else{this.diff_cleanupSemanticLossless(S);for(var v=0,E,T=0;Tu[0][1].length){var g=l-u[0][1].length;u[0][1]=c.substring(u[0][1].length)+u[0][1],s.start1-=g,s.start2-=g,s.length1+=g,s.length2+=g}if(s=r[r.length-1],u=s.diffs,u.length==0||u[u.length-1][0]!=n)u.push(new y.Diff(n,c)),s.length1+=l,s.length2+=l;else if(l>u[u.length-1][1].length){var g=l-u[u.length-1][1].length;u[u.length-1][1]+=c.substring(0,g),s.length1+=g,s.length2+=g}return c},y.prototype.patch_splitMax=function(r){for(var l=this.Match_MaxBits,c=0;c2*l?(i.length1+=d.length,s+=d.length,m=!1,i.diffs.push(new y.Diff(f,d)),p.diffs.shift()):(d=d.substring(0,l-i.length1-this.Patch_Margin),i.length1+=d.length,s+=d.length,f===n?(i.length2+=d.length,u+=d.length):m=!1,i.diffs.push(new y.Diff(f,d)),d==p.diffs[0][1]?p.diffs.shift():p.diffs[0][1]=p.diffs[0][1].substring(d.length))}g=this.diff_text2(i.diffs),g=g.substring(g.length-this.Patch_Margin);var S=this.diff_text1(p.diffs).substring(0,this.Patch_Margin);S!==""&&(i.length1+=S.length,i.length2+=S.length,i.diffs.length!==0&&i.diffs[i.diffs.length-1][0]===n?i.diffs[i.diffs.length-1][1]+=S:i.diffs.push(new y.Diff(n,S))),m||r.splice(++c,0,i)}}},y.prototype.patch_toText=function(r){for(var l=[],c=0;c{var Za={2988:()=>{+function(P){"use strict";var y=".dropdown-backdrop",o='[data-toggle="dropdown"]',h=function(p){P(p).on("click.bs.dropdown",this.toggle)};h.VERSION="3.4.1";function n(p){var s=p.attr("data-target");s||(s=p.attr("href"),s=s&&/#[A-Za-z]/.test(s)&&s.replace(/.*(?=#[^\s]*$)/,""));var u=s!=="#"?P(document).find(s):null;return u&&u.length?u:p.parent()}function r(p){p&&p.which===3||(P(y).remove(),P(o).each(function(){var s=P(this),u=n(s),g={relatedTarget:this};u.hasClass("open")&&(p&&p.type=="click"&&/input|textarea/i.test(p.target.tagName)&&P.contains(u[0],p.target)||(u.trigger(p=P.Event("hide.bs.dropdown",g)),!p.isDefaultPrevented()&&(s.attr("aria-expanded","false"),u.removeClass("open").trigger(P.Event("hidden.bs.dropdown",g)))))}))}h.prototype.toggle=function(p){var s=P(this);if(!s.is(".disabled, :disabled")){var u=n(s),g=u.hasClass("open");if(r(),!g){"ontouchstart"in document.documentElement&&!u.closest(".navbar-nav").length&&P(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(P(this)).on("click",r);var i={relatedTarget:this};if(u.trigger(p=P.Event("show.bs.dropdown",i)),p.isDefaultPrevented())return;s.trigger("focus").attr("aria-expanded","true"),u.toggleClass("open").trigger(P.Event("shown.bs.dropdown",i))}return!1}},h.prototype.keydown=function(p){if(!(!/(38|40|27|32)/.test(p.which)||/input|textarea/i.test(p.target.tagName))){var s=P(this);if(p.preventDefault(),p.stopPropagation(),!s.is(".disabled, :disabled")){var u=n(s),g=u.hasClass("open");if(!g&&p.which!=27||g&&p.which==27)return p.which==27&&u.find(o).trigger("focus"),s.trigger("click");var i=" li:not(.disabled):visible a",m=u.find(".dropdown-menu"+i);if(m.length){var f=m.index(p.target);p.which==38&&f>0&&f--,p.which==40&&f{+function(P){"use strict";var y=function(n,r){this.init("popover",n,r)};if(!P.fn.tooltip)throw new Error("Popover requires tooltip.js");y.VERSION="3.4.1",y.DEFAULTS=P.extend({},P.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),y.prototype=P.extend({},P.fn.tooltip.Constructor.prototype),y.prototype.constructor=y,y.prototype.getDefaults=function(){return y.DEFAULTS},y.prototype.setContent=function(){var n=this.tip(),r=this.getTitle(),l=this.getContent();if(this.options.html){var c=typeof l;this.options.sanitize&&(r=this.sanitizeHtml(r),c==="string"&&(l=this.sanitizeHtml(l))),n.find(".popover-title").html(r),n.find(".popover-content").children().detach().end()[c==="string"?"html":"append"](l)}else n.find(".popover-title").text(r),n.find(".popover-content").children().detach().end().text(l);n.removeClass("fade top bottom left right in"),n.find(".popover-title").html()||n.find(".popover-title").hide()},y.prototype.hasContent=function(){return this.getTitle()||this.getContent()},y.prototype.getContent=function(){var n=this.$element,r=this.options;return n.attr("data-content")||(typeof r.content=="function"?r.content.call(n[0]):r.content)},y.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};function o(n){return this.each(function(){var r=P(this),l=r.data("bs.popover"),c=typeof n=="object"&&n;!l&&/destroy|hide/.test(n)||(l||r.data("bs.popover",l=new y(this,c)),typeof n=="string"&&l[n]())})}var h=P.fn.popover;P.fn.popover=o,P.fn.popover.Constructor=y,P.fn.popover.noConflict=function(){return P.fn.popover=h,this}}(jQuery)},954:()=>{+function(P){"use strict";function y(n,r){this.$body=P(document.body),this.$scrollElement=P(n).is(document.body)?P(window):P(n),this.options=P.extend({},y.DEFAULTS,r),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",P.proxy(this.process,this)),this.refresh(),this.process()}y.VERSION="3.4.1",y.DEFAULTS={offset:10},y.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},y.prototype.refresh=function(){var n=this,r="offset",l=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),P.isWindow(this.$scrollElement[0])||(r="position",l=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var c=P(this),p=c.data("target")||c.attr("href"),s=/^#./.test(p)&&P(p);return s&&s.length&&s.is(":visible")&&[[s[r]().top+l,p]]||null}).sort(function(c,p){return c[0]-p[0]}).each(function(){n.offsets.push(this[0]),n.targets.push(this[1])})},y.prototype.process=function(){var n=this.$scrollElement.scrollTop()+this.options.offset,r=this.getScrollHeight(),l=this.options.offset+r-this.$scrollElement.height(),c=this.offsets,p=this.targets,s=this.activeTarget,u;if(this.scrollHeight!=r&&this.refresh(),n>=l)return s!=(u=p[p.length-1])&&this.activate(u);if(s&&n=c[u]&&(c[u+1]===void 0||n{+function(P){"use strict";var y=function(r){this.element=P(r)};y.VERSION="3.4.1",y.TRANSITION_DURATION=150,y.prototype.show=function(){var r=this.element,l=r.closest("ul:not(.dropdown-menu)"),c=r.data("target");if(c||(c=r.attr("href"),c=c&&c.replace(/.*(?=#[^\s]*$)/,"")),!r.parent("li").hasClass("active")){var p=l.find(".active:last a"),s=P.Event("hide.bs.tab",{relatedTarget:r[0]}),u=P.Event("show.bs.tab",{relatedTarget:p[0]});if(p.trigger(s),r.trigger(u),!(u.isDefaultPrevented()||s.isDefaultPrevented())){var g=P(document).find(c);this.activate(r.closest("li"),l),this.activate(g,g.parent(),function(){p.trigger({type:"hidden.bs.tab",relatedTarget:r[0]}),r.trigger({type:"shown.bs.tab",relatedTarget:p[0]})})}}},y.prototype.activate=function(r,l,c){var p=l.find("> .active"),s=c&&P.support.transition&&(p.length&&p.hasClass("fade")||!!l.find("> .fade").length);function u(){p.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),r.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),s?(r[0].offsetWidth,r.addClass("in")):r.removeClass("fade"),r.parent(".dropdown-menu").length&&r.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),c&&c()}p.length&&s?p.one("bsTransitionEnd",u).emulateTransitionEnd(y.TRANSITION_DURATION):u(),p.removeClass("in")};function o(r){return this.each(function(){var l=P(this),c=l.data("bs.tab");c||l.data("bs.tab",c=new y(this)),typeof r=="string"&&c[r]()})}var h=P.fn.tab;P.fn.tab=o,P.fn.tab.Constructor=y,P.fn.tab.noConflict=function(){return P.fn.tab=h,this};var n=function(r){r.preventDefault(),o.call(P(this),"show")};P(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',n).on("click.bs.tab.data-api",'[data-toggle="pill"]',n)}(jQuery)},8480:()=>{+function(P){"use strict";var y=["sanitize","whiteList","sanitizeFn"],o=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],h=/^aria-[\w-]*$/i,n={"*":["class","dir","id","lang","role",h],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},r=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,l=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function c(i,m){var f=i.nodeName.toLowerCase();if(P.inArray(f,m)!==-1)return P.inArray(f,o)!==-1?Boolean(i.nodeValue.match(r)||i.nodeValue.match(l)):!0;for(var d=P(m).filter(function(E,D){return D instanceof RegExp}),S=0,v=d.length;S
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:n},s.prototype.init=function(i,m,f){if(this.enabled=!0,this.type=i,this.$element=P(m),this.options=this.getOptions(f),this.$viewport=this.options.viewport&&P(document).find(P.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var d=this.options.trigger.split(" "),S=d.length;S--;){var v=d[S];if(v=="click")this.$element.on("click."+this.type,this.options.selector,P.proxy(this.toggle,this));else if(v!="manual"){var E=v=="hover"?"mouseenter":"focusin",D=v=="hover"?"mouseleave":"focusout";this.$element.on(E+"."+this.type,this.options.selector,P.proxy(this.enter,this)),this.$element.on(D+"."+this.type,this.options.selector,P.proxy(this.leave,this))}}this.options.selector?this._options=P.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},s.prototype.getDefaults=function(){return s.DEFAULTS},s.prototype.getOptions=function(i){var m=this.$element.data();for(var f in m)m.hasOwnProperty(f)&&P.inArray(f,y)!==-1&&delete m[f];return i=P.extend({},this.getDefaults(),m,i),i.delay&&typeof i.delay=="number"&&(i.delay={show:i.delay,hide:i.delay}),i.sanitize&&(i.template=p(i.template,i.whiteList,i.sanitizeFn)),i},s.prototype.getDelegateOptions=function(){var i={},m=this.getDefaults();return this._options&&P.each(this._options,function(f,d){m[f]!=d&&(i[f]=d)}),i},s.prototype.enter=function(i){var m=i instanceof this.constructor?i:P(i.currentTarget).data("bs."+this.type);if(m||(m=new this.constructor(i.currentTarget,this.getDelegateOptions()),P(i.currentTarget).data("bs."+this.type,m)),i instanceof P.Event&&(m.inState[i.type=="focusin"?"focus":"hover"]=!0),m.tip().hasClass("in")||m.hoverState=="in"){m.hoverState="in";return}if(clearTimeout(m.timeout),m.hoverState="in",!m.options.delay||!m.options.delay.show)return m.show();m.timeout=setTimeout(function(){m.hoverState=="in"&&m.show()},m.options.delay.show)},s.prototype.isInStateTrue=function(){for(var i in this.inState)if(this.inState[i])return!0;return!1},s.prototype.leave=function(i){var m=i instanceof this.constructor?i:P(i.currentTarget).data("bs."+this.type);if(m||(m=new this.constructor(i.currentTarget,this.getDelegateOptions()),P(i.currentTarget).data("bs."+this.type,m)),i instanceof P.Event&&(m.inState[i.type=="focusout"?"focus":"hover"]=!1),!m.isInStateTrue()){if(clearTimeout(m.timeout),m.hoverState="out",!m.options.delay||!m.options.delay.hide)return m.hide();m.timeout=setTimeout(function(){m.hoverState=="out"&&m.hide()},m.options.delay.hide)}},s.prototype.show=function(){var i=P.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(i);var m=P.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(i.isDefaultPrevented()||!m)return;var f=this,d=this.tip(),S=this.getUID(this.type);this.setContent(),d.attr("id",S),this.$element.attr("aria-describedby",S),this.options.animation&&d.addClass("fade");var v=typeof this.options.placement=="function"?this.options.placement.call(this,d[0],this.$element[0]):this.options.placement,E=/\s?auto?\s?/i,D=E.test(v);D&&(v=v.replace(E,"")||"top"),d.detach().css({top:0,left:0,display:"block"}).addClass(v).data("bs."+this.type,this),this.options.container?d.appendTo(P(document).find(this.options.container)):d.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var _=this.getPosition(),N=d[0].offsetWidth,b=d[0].offsetHeight;if(D){var T=v,C=this.getPosition(this.$viewport);v=v=="bottom"&&_.bottom+b>C.bottom?"top":v=="top"&&_.top-bC.width?"left":v=="left"&&_.left-NE.top+E.height&&(S.top=E.top+E.height-_)}else{var N=m.left-v,b=m.left+v+f;NE.right&&(S.left=E.left+E.width-b)}return S},s.prototype.getTitle=function(){var i,m=this.$element,f=this.options;return i=m.attr("data-original-title")||(typeof f.title=="function"?f.title.call(m[0]):f.title),i},s.prototype.getUID=function(i){do i+=~~(Math.random()*1e6);while(document.getElementById(i));return i},s.prototype.tip=function(){if(!this.$tip&&(this.$tip=P(this.options.template),this.$tip.length!=1))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},s.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},s.prototype.enable=function(){this.enabled=!0},s.prototype.disable=function(){this.enabled=!1},s.prototype.toggleEnabled=function(){this.enabled=!this.enabled},s.prototype.toggle=function(i){var m=this;i&&(m=P(i.currentTarget).data("bs."+this.type),m||(m=new this.constructor(i.currentTarget,this.getDelegateOptions()),P(i.currentTarget).data("bs."+this.type,m))),i?(m.inState.click=!m.inState.click,m.isInStateTrue()?m.enter(m):m.leave(m)):m.tip().hasClass("in")?m.leave(m):m.enter(m)},s.prototype.destroy=function(){var i=this;clearTimeout(this.timeout),this.hide(function(){i.$element.off("."+i.type).removeData("bs."+i.type),i.$tip&&i.$tip.detach(),i.$tip=null,i.$arrow=null,i.$viewport=null,i.$element=null})},s.prototype.sanitizeHtml=function(i){return p(i,this.options.whiteList,this.options.sanitizeFn)};function u(i){return this.each(function(){var m=P(this),f=m.data("bs.tooltip"),d=typeof i=="object"&&i;!f&&/destroy|hide/.test(i)||(f||m.data("bs.tooltip",f=new s(this,d)),typeof i=="string"&&f[i]())})}var g=P.fn.tooltip;P.fn.tooltip=u,P.fn.tooltip.Constructor=s,P.fn.tooltip.noConflict=function(){return P.fn.tooltip=g,this}}(jQuery)},7030:P=>{var y=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},o=-1,h=1,n=0;y.Diff=function(r,l){return[r,l]},y.prototype.diff_main=function(r,l,c,p){typeof p=="undefined"&&(this.Diff_Timeout<=0?p=Number.MAX_VALUE:p=new Date().getTime()+this.Diff_Timeout*1e3);var s=p;if(r==null||l==null)throw new Error("Null input. (diff_main)");if(r==l)return r?[new y.Diff(n,r)]:[];typeof c=="undefined"&&(c=!0);var u=c,g=this.diff_commonPrefix(r,l),i=r.substring(0,g);r=r.substring(g),l=l.substring(g),g=this.diff_commonSuffix(r,l);var m=r.substring(r.length-g);r=r.substring(0,r.length-g),l=l.substring(0,l.length-g);var f=this.diff_compute_(r,l,u,s);return i&&f.unshift(new y.Diff(n,i)),m&&f.push(new y.Diff(n,m)),this.diff_cleanupMerge(f),f},y.prototype.diff_compute_=function(r,l,c,p){var s;if(!r)return[new y.Diff(h,l)];if(!l)return[new y.Diff(o,r)];var u=r.length>l.length?r:l,g=r.length>l.length?l:r,i=u.indexOf(g);if(i!=-1)return s=[new y.Diff(h,u.substring(0,i)),new y.Diff(n,g),new y.Diff(h,u.substring(i+g.length))],r.length>l.length&&(s[0][0]=s[2][0]=o),s;if(g.length==1)return[new y.Diff(o,r),new y.Diff(h,l)];var m=this.diff_halfMatch_(r,l);if(m){var f=m[0],d=m[1],S=m[2],v=m[3],E=m[4],D=this.diff_main(f,S,c,p),_=this.diff_main(d,v,c,p);return D.concat([new y.Diff(n,E)],_)}return c&&r.length>100&&l.length>100?this.diff_lineMode_(r,l,p):this.diff_bisect_(r,l,p)},y.prototype.diff_lineMode_=function(r,l,c){var p=this.diff_linesToChars_(r,l);r=p.chars1,l=p.chars2;var s=p.lineArray,u=this.diff_main(r,l,!1,c);this.diff_charsToLines_(u,s),this.diff_cleanupSemantic(u),u.push(new y.Diff(n,""));for(var g=0,i=0,m=0,f="",d="";g=1&&m>=1){u.splice(g-i-m,i+m),g=g-i-m;for(var S=this.diff_main(f,d,!1,c),v=S.length-1;v>=0;v--)u.splice(g,0,S[v]);g=g+S.length}m=0,i=0,f="",d="";break}g++}return u.pop(),u},y.prototype.diff_bisect_=function(r,l,c){for(var p=r.length,s=l.length,u=Math.ceil((p+s)/2),g=u,i=2*u,m=new Array(i),f=new Array(i),d=0;dc);b++){for(var T=-b+E;T<=b-D;T+=2){var C=g+T,I;T==-b||T!=b&&m[C-1]p)D+=2;else if(R>s)E+=2;else if(v){var x=g+S-T;if(x>=0&&x=O)return this.diff_bisectSplit_(r,l,I,R,c)}}}for(var $=-b+_;$<=b-N;$+=2){var x=g+$,O;$==-b||$!=b&&f[x-1]p)N+=2;else if(F>s)_+=2;else if(!v){var C=g+S-$;if(C>=0&&C=O)return this.diff_bisectSplit_(r,l,I,R,c)}}}}return[new y.Diff(o,r),new y.Diff(h,l)]},y.prototype.diff_bisectSplit_=function(r,l,c,p,s){var u=r.substring(0,c),g=l.substring(0,p),i=r.substring(c),m=l.substring(p),f=this.diff_main(u,g,!1,s),d=this.diff_main(i,m,!1,s);return f.concat(d)},y.prototype.diff_linesToChars_=function(r,l){var c=[],p={};c[0]="";function s(m){for(var f="",d=0,S=-1,v=c.length;Sp?r=r.substring(c-p):cl.length?r:l,p=r.length>l.length?l:r;if(c.length<4||p.length*2=D.length?[I,R,x,O,C]:null}var g=u(c,p,Math.ceil(c.length/4)),i=u(c,p,Math.ceil(c.length/2)),m;if(!g&&!i)return null;i?g?m=g[4].length>i[4].length?g:i:m=i:m=g;var f,d,S,v;r.length>l.length?(f=m[0],d=m[1],S=m[2],v=m[3]):(S=m[0],v=m[1],f=m[2],d=m[3]);var E=m[4];return[f,d,S,v,E]},y.prototype.diff_cleanupSemantic=function(r){for(var l=!1,c=[],p=0,s=null,u=0,g=0,i=0,m=0,f=0;u0?c[p-1]:-1,g=0,i=0,m=0,f=0,s=null,l=!0)),u++;for(l&&this.diff_cleanupMerge(r),this.diff_cleanupSemanticLossless(r),u=1;u=E?(v>=d.length/2||v>=S.length/2)&&(r.splice(u,0,new y.Diff(n,S.substring(0,v))),r[u-1][1]=d.substring(0,d.length-v),r[u+1][1]=S.substring(v),u++):(E>=d.length/2||E>=S.length/2)&&(r.splice(u,0,new y.Diff(n,d.substring(0,E))),r[u-1][0]=h,r[u-1][1]=S.substring(0,S.length-E),r[u+1][0]=o,r[u+1][1]=d.substring(E),u++),u++}u++}},y.prototype.diff_cleanupSemanticLossless=function(r){function l(E,D){if(!E||!D)return 6;var _=E.charAt(E.length-1),N=D.charAt(0),b=_.match(y.nonAlphaNumericRegex_),T=N.match(y.nonAlphaNumericRegex_),C=b&&_.match(y.whitespaceRegex_),I=T&&N.match(y.whitespaceRegex_),R=C&&_.match(y.linebreakRegex_),x=I&&N.match(y.linebreakRegex_),O=R&&E.match(y.blanklineEndRegex_),$=x&&D.match(y.blanklineStartRegex_);return O||$?5:R||x?4:b&&!C&&I?3:C||I?2:b||T?1:0}for(var c=1;c=S&&(S=v,m=p,f=s,d=u)}r[c-1][1]!=m&&(m?r[c-1][1]=m:(r.splice(c-1,1),c--),r[c][1]=f,d?r[c+1][1]=d:(r.splice(c+1,1),c--))}c++}},y.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,y.whitespaceRegex_=/\s/,y.linebreakRegex_=/[\r\n]/,y.blanklineEndRegex_=/\n\r?\n$/,y.blanklineStartRegex_=/^\r?\n\r?\n/,y.prototype.diff_cleanupEfficiency=function(r){for(var l=!1,c=[],p=0,s=null,u=0,g=!1,i=!1,m=!1,f=!1;u0?c[p-1]:-1,m=f=!1),l=!0)),u++;l&&this.diff_cleanupMerge(r)},y.prototype.diff_cleanupMerge=function(r){r.push(new y.Diff(n,""));for(var l=0,c=0,p=0,s="",u="",g;l1?(c!==0&&p!==0&&(g=this.diff_commonPrefix(u,s),g!==0&&(l-c-p>0&&r[l-c-p-1][0]==n?r[l-c-p-1][1]+=u.substring(0,g):(r.splice(0,0,new y.Diff(n,u.substring(0,g))),l++),u=u.substring(g),s=s.substring(g)),g=this.diff_commonSuffix(u,s),g!==0&&(r[l][1]=u.substring(u.length-g)+r[l][1],u=u.substring(0,u.length-g),s=s.substring(0,s.length-g))),l-=c+p,r.splice(l,c+p),s.length&&(r.splice(l,0,new y.Diff(o,s)),l++),u.length&&(r.splice(l,0,new y.Diff(h,u)),l++),l++):l!==0&&r[l-1][0]==n?(r[l-1][1]+=r[l][1],r.splice(l,1)):l++,p=0,c=0,s="",u="";break}r[r.length-1][1]===""&&r.pop();var i=!1;for(l=1;ll));g++)s=c,u=p;return r.length!=g&&r[g][0]===o?u:u+(l-s)},y.prototype.diff_prettyHtml=function(r){for(var l=[],c=/&/g,p=//g,u=/\n/g,g=0;g");switch(i){case h:l[g]=''+f+"";break;case o:l[g]=''+f+"";break;case n:l[g]=""+f+"";break}}return l.join("")},y.prototype.diff_text1=function(r){for(var l=[],c=0;cthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var p=this.match_alphabet_(l),s=this;function u(I,R){var x=I/l.length,O=Math.abs(c-R);return s.Match_Distance?x+O/s.Match_Distance:O?1:x}var g=this.Match_Threshold,i=r.indexOf(l,c);i!=-1&&(g=Math.min(u(0,i),g),i=r.lastIndexOf(l,c+l.length),i!=-1&&(g=Math.min(u(0,i),g)));var m=1<=D;b--){var T=p[r.charAt(b-1)];if(E===0?N[b]=(N[b+1]<<1|1)&T:N[b]=(N[b+1]<<1|1)&T|((v[b+1]|v[b])<<1|1)|v[b+1],N[b]&m){var C=u(E,b-1);if(C<=g)if(g=C,i=b-1,i>c)D=Math.max(1,2*c-i);else break}}if(u(E+1,c)>g)break;v=N}return i},y.prototype.match_alphabet_=function(r){for(var l={},c=0;c2&&(this.diff_cleanupSemantic(s),this.diff_cleanupEfficiency(s));else if(r&&typeof r=="object"&&typeof l=="undefined"&&typeof c=="undefined")s=r,p=this.diff_text1(s);else if(typeof r=="string"&&l&&typeof l=="object"&&typeof c=="undefined")p=r,s=l;else if(typeof r=="string"&&typeof l=="string"&&c&&typeof c=="object")p=r,s=c;else throw new Error("Unknown call format to patch_make.");if(s.length===0)return[];for(var u=[],g=new y.patch_obj,i=0,m=0,f=0,d=p,S=p,v=0;v=2*this.Patch_Margin&&i&&(this.patch_addContext_(g,d),u.push(g),g=new y.patch_obj,i=0,d=S,m=f);break}E!==h&&(m+=D.length),E!==o&&(f+=D.length)}return i&&(this.patch_addContext_(g,d),u.push(g)),u},y.prototype.patch_deepCopy=function(r){for(var l=[],c=0;cthis.Match_MaxBits?(m=this.match_main(l,i.substring(0,this.Match_MaxBits),g),m!=-1&&(f=this.match_main(l,i.substring(i.length-this.Match_MaxBits),g+i.length-this.Match_MaxBits),(f==-1||m>=f)&&(m=-1))):m=this.match_main(l,i,g),m==-1)s[u]=!1,p-=r[u].length2-r[u].length1;else{s[u]=!0,p=m-g;var d;if(f==-1?d=l.substring(m,m+i.length):d=l.substring(m,f+this.Match_MaxBits),i==d)l=l.substring(0,m)+this.diff_text2(r[u].diffs)+l.substring(m+i.length);else{var S=this.diff_main(i,d,!1);if(i.length>this.Match_MaxBits&&this.diff_levenshtein(S)/i.length>this.Patch_DeleteThreshold)s[u]=!1;else{this.diff_cleanupSemanticLossless(S);for(var v=0,E,D=0;Du[0][1].length){var g=l-u[0][1].length;u[0][1]=c.substring(u[0][1].length)+u[0][1],s.start1-=g,s.start2-=g,s.length1+=g,s.length2+=g}if(s=r[r.length-1],u=s.diffs,u.length==0||u[u.length-1][0]!=n)u.push(new y.Diff(n,c)),s.length1+=l,s.length2+=l;else if(l>u[u.length-1][1].length){var g=l-u[u.length-1][1].length;u[u.length-1][1]+=c.substring(0,g),s.length1+=g,s.length2+=g}return c},y.prototype.patch_splitMax=function(r){for(var l=this.Match_MaxBits,c=0;c2*l?(i.length1+=d.length,s+=d.length,m=!1,i.diffs.push(new y.Diff(f,d)),p.diffs.shift()):(d=d.substring(0,l-i.length1-this.Patch_Margin),i.length1+=d.length,s+=d.length,f===n?(i.length2+=d.length,u+=d.length):m=!1,i.diffs.push(new y.Diff(f,d)),d==p.diffs[0][1]?p.diffs.shift():p.diffs[0][1]=p.diffs[0][1].substring(d.length))}g=this.diff_text2(i.diffs),g=g.substring(g.length-this.Patch_Margin);var S=this.diff_text1(p.diffs).substring(0,this.Patch_Margin);S!==""&&(i.length1+=S.length,i.length2+=S.length,i.diffs.length!==0&&i.diffs[i.diffs.length-1][0]===n?i.diffs[i.diffs.length-1][1]+=S:i.diffs.push(new y.Diff(n,S))),m||r.splice(++c,0,i)}}},y.prototype.patch_toText=function(r){for(var l=[],c=0;c= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};o.REVISION_CHANGES=v;var E="[object Object]";n.prototype={constructor:n,logger:i.default,log:i.default.log,registerHelper:function(P,D){if(l.toString.call(P)===E){if(D)throw new p.default("Arg not supported with multiple helpers");l.extend(this.helpers,P)}else this.helpers[P]=D},unregisterHelper:function(P){delete this.helpers[P]},registerPartial:function(P,D){if(l.toString.call(P)===E)l.extend(this.partials,P);else{if(typeof D=="undefined")throw new p.default('Attempting to register a partial called "'+P+'" as undefined');this.partials[P]=D}},unregisterPartial:function(P){delete this.partials[P]},registerDecorator:function(P,D){if(l.toString.call(P)===E){if(D)throw new p.default("Arg not supported with multiple decorators");l.extend(this.decorators,P)}else this.decorators[P]=D},unregisterDecorator:function(P){delete this.decorators[P]},resetLoggedPropertyAccesses:function(){m.resetLoggedProperties()}};var T=i.default.log;o.log=T,o.createFrame=l.createFrame,o.logger=i.default},function(y,o){"use strict";function h(v){return g[v]}function n(v){for(var E=1;E":">",'"':""","'":"'","`":"`","=":"="},i=/[&<>"'`=]/g,m=/[&<>"'`=]/,f=Object.prototype.toString;o.toString=f;var d=function(v){return typeof v=="function"};d(/x/)&&(o.isFunction=d=function(v){return typeof v=="function"&&f.call(v)==="[object Function]"}),o.isFunction=d;var S=Array.isArray||function(v){return!(!v||typeof v!="object")&&f.call(v)==="[object Array]"};o.isArray=S},function(y,o,h){"use strict";function n(c,p){var s=p&&p.loc,u=void 0,g=void 0,i=void 0,m=void 0;s&&(u=s.start.line,g=s.end.line,i=s.start.column,m=s.end.column,c+=" - "+u+":"+i);for(var f=Error.prototype.constructor.call(this,c),d=0;d0?(c.ids&&(c.ids=[c.name]),r.helpers.each(l,c)):p(this);if(c.data&&c.ids){var u=n.createFrame(c.data);u.contextPath=n.appendContextPath(c.data.contextPath,c.name),c={data:u}}return s(l,c)})},y.exports=o.default},function(y,o,h){(function(n){"use strict";var r=h(13).default,l=h(1).default;o.__esModule=!0;var c=h(5),p=h(6),s=l(p);o.default=function(u){u.registerHelper("each",function(g,i){function m(x,I,R){E&&(E.key=x,E.index=I,E.first=I===0,E.last=!!R,T&&(E.contextPath=T+x)),v+=f(g[x],{data:E,blockParams:c.blockParams([g[x],x],[T+x,null])})}if(!i)throw new s.default("Must pass iterator to #each");var f=i.fn,d=i.inverse,S=0,v="",E=void 0,T=void 0;if(i.data&&i.ids&&(T=c.appendContextPath(i.data.contextPath,i.ids[0])+"."),c.isFunction(g)&&(g=g.call(this)),i.data&&(E=c.createFrame(i.data)),g&&typeof g=="object")if(c.isArray(g))for(var P=g.length;S=0?c:parseInt(l,10)}return l},log:function(l){if(l=r.lookupLevel(l),typeof console!="undefined"&&r.lookupLevel(r.level)<=l){var c=r.methodMap[l];console[c]||(c="log");for(var p=arguments.length,s=Array(p>1?p-1:0),u=1;u= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};o.REVISION_CHANGES=v;var E="[object Object]";n.prototype={constructor:n,logger:i.default,log:i.default.log,registerHelper:function(_,N){if(l.toString.call(_)===E){if(N)throw new p.default("Arg not supported with multiple helpers");l.extend(this.helpers,_)}else this.helpers[_]=N},unregisterHelper:function(_){delete this.helpers[_]},registerPartial:function(_,N){if(l.toString.call(_)===E)l.extend(this.partials,_);else{if(typeof N=="undefined")throw new p.default('Attempting to register a partial called "'+_+'" as undefined');this.partials[_]=N}},unregisterPartial:function(_){delete this.partials[_]},registerDecorator:function(_,N){if(l.toString.call(_)===E){if(N)throw new p.default("Arg not supported with multiple decorators");l.extend(this.decorators,_)}else this.decorators[_]=N},unregisterDecorator:function(_){delete this.decorators[_]},resetLoggedPropertyAccesses:function(){m.resetLoggedProperties()}};var D=i.default.log;o.log=D,o.createFrame=l.createFrame,o.logger=i.default},function(y,o){"use strict";function h(v){return g[v]}function n(v){for(var E=1;E":">",'"':""","'":"'","`":"`","=":"="},i=/[&<>"'`=]/g,m=/[&<>"'`=]/,f=Object.prototype.toString;o.toString=f;var d=function(v){return typeof v=="function"};d(/x/)&&(o.isFunction=d=function(v){return typeof v=="function"&&f.call(v)==="[object Function]"}),o.isFunction=d;var S=Array.isArray||function(v){return!(!v||typeof v!="object")&&f.call(v)==="[object Array]"};o.isArray=S},function(y,o,h){"use strict";function n(c,p){var s=p&&p.loc,u=void 0,g=void 0,i=void 0,m=void 0;s&&(u=s.start.line,g=s.end.line,i=s.start.column,m=s.end.column,c+=" - "+u+":"+i);for(var f=Error.prototype.constructor.call(this,c),d=0;d0?(c.ids&&(c.ids=[c.name]),r.helpers.each(l,c)):p(this);if(c.data&&c.ids){var u=n.createFrame(c.data);u.contextPath=n.appendContextPath(c.data.contextPath,c.name),c={data:u}}return s(l,c)})},y.exports=o.default},function(y,o,h){(function(n){"use strict";var r=h(13).default,l=h(1).default;o.__esModule=!0;var c=h(5),p=h(6),s=l(p);o.default=function(u){u.registerHelper("each",function(g,i){function m(C,I,R){E&&(E.key=C,E.index=I,E.first=I===0,E.last=!!R,D&&(E.contextPath=D+C)),v+=f(g[C],{data:E,blockParams:c.blockParams([g[C],C],[D+C,null])})}if(!i)throw new s.default("Must pass iterator to #each");var f=i.fn,d=i.inverse,S=0,v="",E=void 0,D=void 0;if(i.data&&i.ids&&(D=c.appendContextPath(i.data.contextPath,i.ids[0])+"."),c.isFunction(g)&&(g=g.call(this)),i.data&&(E=c.createFrame(i.data)),g&&typeof g=="object")if(c.isArray(g))for(var _=g.length;S<_;S++)S in g&&m(S,S,S===g.length-1);else if(n.Symbol&&g[n.Symbol.iterator]){for(var N=[],b=g[n.Symbol.iterator](),T=b.next();!T.done;T=b.next())N.push(T.value);g=N;for(var _=g.length;S<_;S++)m(S,S,S===g.length-1)}else(function(){var C=void 0;r(g).forEach(function(I){C!==void 0&&m(C,S-1),C=I,S++}),C!==void 0&&m(C,S-1,!0)})();return S===0&&(v=d(this)),v})},y.exports=o.default}).call(o,function(){return this}())},function(y,o,h){y.exports={default:h(14),__esModule:!0}},function(y,o,h){h(15),y.exports=h(21).Object.keys},function(y,o,h){var n=h(16);h(18)("keys",function(r){return function(l){return r(n(l))}})},function(y,o,h){var n=h(17);y.exports=function(r){return Object(n(r))}},function(y,o){y.exports=function(h){if(h==null)throw TypeError("Can't call method on "+h);return h}},function(y,o,h){var n=h(19),r=h(21),l=h(24);y.exports=function(c,p){var s=(r.Object||{})[c]||Object[c],u={};u[c]=p(s),n(n.S+n.F*l(function(){s(1)}),"Object",u)}},function(y,o,h){var n=h(20),r=h(21),l=h(22),c="prototype",p=function(s,u,g){var i,m,f,d=s&p.F,S=s&p.G,v=s&p.S,E=s&p.P,D=s&p.B,_=s&p.W,N=S?r:r[u]||(r[u]={}),b=S?n:v?n[u]:(n[u]||{})[c];S&&(g=u);for(i in g)m=!d&&b&&i in b,m&&i in N||(f=m?b[i]:g[i],N[i]=S&&typeof b[i]!="function"?g[i]:D&&m?l(f,n):_&&b[i]==f?function(T){var C=function(I){return this instanceof T?new T(I):T(I)};return C[c]=T[c],C}(f):E&&typeof f=="function"?l(Function.call,f):f,E&&((N[c]||(N[c]={}))[i]=f))};p.F=1,p.G=2,p.S=4,p.P=8,p.B=16,p.W=32,y.exports=p},function(y,o){var h=y.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=h)},function(y,o){var h=y.exports={version:"1.2.6"};typeof __e=="number"&&(__e=h)},function(y,o,h){var n=h(23);y.exports=function(r,l,c){if(n(r),l===void 0)return r;switch(c){case 1:return function(p){return r.call(l,p)};case 2:return function(p,s){return r.call(l,p,s)};case 3:return function(p,s,u){return r.call(l,p,s,u)}}return function(){return r.apply(l,arguments)}}},function(y,o){y.exports=function(h){if(typeof h!="function")throw TypeError(h+" is not a function!");return h}},function(y,o){y.exports=function(h){try{return!!h()}catch(n){return!0}}},function(y,o,h){"use strict";var n=h(1).default;o.__esModule=!0;var r=h(6),l=n(r);o.default=function(c){c.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new l.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})},y.exports=o.default},function(y,o,h){"use strict";var n=h(1).default;o.__esModule=!0;var r=h(5),l=h(6),c=n(l);o.default=function(p){p.registerHelper("if",function(s,u){if(arguments.length!=2)throw new c.default("#if requires exactly one argument");return r.isFunction(s)&&(s=s.call(this)),!u.hash.includeZero&&!s||r.isEmpty(s)?u.inverse(this):u.fn(this)}),p.registerHelper("unless",function(s,u){if(arguments.length!=2)throw new c.default("#unless requires exactly one argument");return p.helpers.if.call(this,s,{fn:u.inverse,inverse:u.fn,hash:u.hash})})},y.exports=o.default},function(y,o){"use strict";o.__esModule=!0,o.default=function(h){h.registerHelper("log",function(){for(var n=[void 0],r=arguments[arguments.length-1],l=0;l=0?c:parseInt(l,10)}return l},log:function(l){if(l=r.lookupLevel(l),typeof console!="undefined"&&r.lookupLevel(r.level)<=l){var c=r.methodMap[l];console[c]||(c="log");for(var p=arguments.length,s=Array(p>1?p-1:0),u=1;u=_.LAST_COMPATIBLE_COMPILER_REVISION&&C<=_.COMPILER_REVISION)){if(C<_.LAST_COMPATIBLE_COMPILER_REVISION){var $=_.REVISION_CHANGES[O],k=_.REVISION_CHANGES[C];throw new D.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+$+") or downgrade your runtime to an older version ("+k+").")}throw new D.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+R[1]+").")}}function r(R,C){function O(W,G,U){U.hash&&(G=T.extend({},G,U.hash),U.ids&&(U.ids[0]=!0)),W=C.VM.resolvePartial.call(this,W,G,U);var Y=T.extend({},U,{hooks:this.hooks,protoAccessControl:this.protoAccessControl}),z=C.VM.invokePartial.call(this,W,G,Y);if(z==null&&C.compile&&(U.partials[U.name]=C.compile(W,R.compilerOptions,C),z=U.partials[U.name](G,Y)),z!=null){if(U.indent){for(var te=z.split(` -`),ae=0,he=te.length;ae2&&O.push("'"+this.terminals_[I]+"'");k=this.lexer.showPosition?"Parse error on line "+(d+1)+`: +See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function p(){u(d).forEach(function(S){delete d[S]})}var s=h(34).default,u=h(13).default,g=h(3).default;o.__esModule=!0,o.createProtoAccessControl=n,o.resultIsAllowed=r,o.resetLoggedProperties=p;var i=h(36),m=h(32),f=g(m),d=s(null)},function(y,o,h){y.exports={default:h(35),__esModule:!0}},function(y,o,h){var n=h(9);y.exports=function(r,l){return n.create(r,l)}},function(y,o,h){"use strict";function n(){for(var c=arguments.length,p=Array(c),s=0;s=b.LAST_COMPATIBLE_COMPILER_REVISION&&x<=b.COMPILER_REVISION)){if(x2&&O.push("'"+this.terminals_[I]+"'");F=this.lexer.showPosition?"Parse error on line "+(d+1)+`: `+this.lexer.showPosition()+` -Expecting `+O.join(", ")+", got '"+(this.terminals_[P]||P)+"'":"Parse error on line "+(d+1)+": Unexpected "+(P==1?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(k,{text:this.lexer.match,token:this.terminals_[P]||P,line:this.lexer.yylineno,loc:E,expected:O})}}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+P);switch(b[0]){case 1:u.push(P),g.push(this.lexer.yytext),i.push(this.lexer.yylloc),u.push(b[1]),P=null,D?(P=D,D=null):(S=this.lexer.yyleng,f=this.lexer.yytext,d=this.lexer.yylineno,E=this.lexer.yylloc,v>0&&v--);break;case 2:if(R=this.productions_[b[1]][1],$.$=g[g.length-R],$._$={first_line:i[i.length-(R||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(R||1)].first_column,last_column:i[i.length-1].last_column},T&&($._$.range=[i[i.length-(R||1)].range[0],i[i.length-1].range[1]]),x=this.performAction.call($,f,S,d,this.yy,b[1],g,i),typeof x!="undefined")return x;R&&(u=u.slice(0,-1*R*2),g=g.slice(0,-1*R),i=i.slice(0,-1*R)),u.push(this.productions_[b[1]][0]),g.push($.$),i.push($._$),C=m[u[u.length-2]][u[u.length-1]],u.push(C);break;case 3:return!0}}return!0}},l=function(){var c={EOF:1,parseError:function(p,s){if(!this.yy.parser)throw new Error(p);this.yy.parser.parseError(p,s)},setInput:function(p){return this._input=p,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var p=this._input[0];this.yytext+=p,this.yyleng++,this.offset++,this.match+=p,this.matched+=p;var s=p.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),p},unput:function(p){var s=p.length,u=p.split(/(?:\r\n?|\n)/g);this._input=p+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s-1),this.offset-=s;var g=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),u.length-1&&(this.yylineno-=u.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:u?(u.length===g.length?this.yylloc.first_column:0)+g[g.length-u.length].length-u[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-s]),this},more:function(){return this._more=!0,this},less:function(p){this.unput(this.match.slice(p))},pastInput:function(){var p=this.matched.substr(0,this.matched.length-this.match.length);return(p.length>20?"...":"")+p.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var p=this.match;return p.length<20&&(p+=this._input.substr(0,20-p.length)),(p.substr(0,20)+(p.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var p=this.pastInput(),s=new Array(p.length+1).join("-");return p+this.upcomingInput()+` +Expecting `+O.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(d+1)+": Unexpected "+(_==1?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(F,{text:this.lexer.match,token:this.terminals_[_]||_,line:this.lexer.yylineno,loc:E,expected:O})}}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+_);switch(T[0]){case 1:u.push(_),g.push(this.lexer.yytext),i.push(this.lexer.yylloc),u.push(T[1]),_=null,N?(_=N,N=null):(S=this.lexer.yyleng,f=this.lexer.yytext,d=this.lexer.yylineno,E=this.lexer.yylloc,v>0&&v--);break;case 2:if(R=this.productions_[T[1]][1],$.$=g[g.length-R],$._$={first_line:i[i.length-(R||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(R||1)].first_column,last_column:i[i.length-1].last_column},D&&($._$.range=[i[i.length-(R||1)].range[0],i[i.length-1].range[1]]),C=this.performAction.call($,f,S,d,this.yy,T[1],g,i),typeof C!="undefined")return C;R&&(u=u.slice(0,-1*R*2),g=g.slice(0,-1*R),i=i.slice(0,-1*R)),u.push(this.productions_[T[1]][0]),g.push($.$),i.push($._$),x=m[u[u.length-2]][u[u.length-1]],u.push(x);break;case 3:return!0}}return!0}},l=function(){var c={EOF:1,parseError:function(p,s){if(!this.yy.parser)throw new Error(p);this.yy.parser.parseError(p,s)},setInput:function(p){return this._input=p,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var p=this._input[0];this.yytext+=p,this.yyleng++,this.offset++,this.match+=p,this.matched+=p;var s=p.match(/(?:\r\n?|\n).*/g);return s?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),p},unput:function(p){var s=p.length,u=p.split(/(?:\r\n?|\n)/g);this._input=p+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s-1),this.offset-=s;var g=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),u.length-1&&(this.yylineno-=u.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:u?(u.length===g.length?this.yylloc.first_column:0)+g[g.length-u.length].length-u[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-s]),this},more:function(){return this._more=!0,this},less:function(p){this.unput(this.match.slice(p))},pastInput:function(){var p=this.matched.substr(0,this.matched.length-this.match.length);return(p.length>20?"...":"")+p.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var p=this.match;return p.length<20&&(p+=this._input.substr(0,20-p.length)),(p.substr(0,20)+(p.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var p=this.pastInput(),s=new Array(p.length+1).join("-");return p+this.upcomingInput()+` `+s+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var p,s,u,g,i;this._more||(this.yytext="",this.match="");for(var m=this._currentRules(),f=0;fs[0].length)||(s=u,g=f,this.options.flex));f++);return s?(i=s[0].match(/(?:\r\n?|\n).*/g),i&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],p=this.performAction.call(this,this.yy,this,m[g],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),p||void 0):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var p=this.next();return typeof p!="undefined"?p:this.lex()},begin:function(p){this.conditionStack.push(p)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(p){this.begin(p)}};return c.options={},c.performAction=function(p,s,u,g){function i(m,f){return s.yytext=s.yytext.substring(m,s.yyleng-f+m)}switch(u){case 0:if(s.yytext.slice(-2)==="\\\\"?(i(0,1),this.begin("mu")):s.yytext.slice(-1)==="\\"?(i(0,1),this.begin("emu")):this.begin("mu"),s.yytext)return 15;break;case 1:return 15;case 2:return this.popState(),15;case 3:return this.begin("raw"),15;case 4:return this.popState(),this.conditionStack[this.conditionStack.length-1]==="raw"?15:(i(5,9),"END_RAW_BLOCK");case 5:return 15;case 6:return this.popState(),14;case 7:return 65;case 8:return 68;case 9:return 19;case 10:return this.popState(),this.begin("raw"),23;case 11:return 55;case 12:return 60;case 13:return 29;case 14:return 47;case 15:return this.popState(),44;case 16:return this.popState(),44;case 17:return 34;case 18:return 39;case 19:return 51;case 20:return 48;case 21:this.unput(s.yytext),this.popState(),this.begin("com");break;case 22:return this.popState(),14;case 23:return 48;case 24:return 73;case 25:return 72;case 26:return 72;case 27:return 87;case 28:break;case 29:return this.popState(),54;case 30:return this.popState(),33;case 31:return s.yytext=i(1,2).replace(/\\"/g,'"'),80;case 32:return s.yytext=i(1,2).replace(/\\'/g,"'"),80;case 33:return 85;case 34:return 82;case 35:return 82;case 36:return 83;case 37:return 84;case 38:return 81;case 39:return 75;case 40:return 77;case 41:return 72;case 42:return s.yytext=s.yytext.replace(/\\([\\\]])/g,"$1"),72;case 43:return"INVALID";case 44:return 5}},c.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{(?=[^\/]))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],c.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},c}();return r.lexer=l,n.prototype=r,r.Parser=n,new n}();o.default=h,y.exports=o.default},function(y,o,h){"use strict";function n(){var i=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=i}function r(i,m,f){m===void 0&&(m=i.length);var d=i[m-1],S=i[m-2];return d?d.type==="ContentStatement"?(S||!f?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(d.original):void 0:f}function l(i,m,f){m===void 0&&(m=-1);var d=i[m+1],S=i[m+2];return d?d.type==="ContentStatement"?(S||!f?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(d.original):void 0:f}function c(i,m,f){var d=i[m==null?0:m+1];if(d&&d.type==="ContentStatement"&&(f||!d.rightStripped)){var S=d.value;d.value=d.value.replace(f?/^\s+/:/^[ \t]*\r?\n?/,""),d.rightStripped=d.value!==S}}function p(i,m,f){var d=i[m==null?i.length-1:m-1];if(d&&d.type==="ContentStatement"&&(f||!d.leftStripped)){var S=d.value;return d.value=d.value.replace(f?/\s+$/:/[ \t]+$/,""),d.leftStripped=d.value!==S,d.leftStripped}}var s=h(1).default;o.__esModule=!0;var u=h(49),g=s(u);n.prototype=new g.default,n.prototype.Program=function(i){var m=!this.options.ignoreStandalone,f=!this.isRootSeen;this.isRootSeen=!0;for(var d=i.body,S=0,v=d.length;S0)throw new v.default("Invalid path: "+D,{loc:P});R===".."&&b++}}return{type:"PathExpression",data:E,depth:b,parts:_,original:D,loc:P}}function u(E,T,P,D,_,b){var x=D.charAt(3)||D.charAt(2),I=x!=="{"&&x!=="&",R=/\*/.test(D);return{type:R?"Decorator":"MustacheStatement",path:E,params:T,hash:P,escaped:I,strip:_,loc:this.locInfo(b)}}function g(E,T,P,D){n(E,P),D=this.locInfo(D);var _={type:"Program",body:T,strip:{},loc:D};return{type:"BlockStatement",path:E.path,params:E.params,hash:E.hash,program:_,openStrip:{},inverseStrip:{},closeStrip:{},loc:D}}function i(E,T,P,D,_,b){D&&D.path&&n(E,D);var x=/\*/.test(E.open);T.blockParams=E.blockParams;var I=void 0,R=void 0;if(P){if(x)throw new v.default("Unexpected inverse block on decorator",P);P.chain&&(P.program.body[0].closeStrip=D.strip),R=P.strip,I=P.program}return _&&(_=I,I=T,T=_),{type:x?"DecoratorBlock":"BlockStatement",path:E.path,params:E.params,hash:E.hash,program:T,inverse:I,openStrip:E.strip,inverseStrip:R,closeStrip:D&&D.strip,loc:this.locInfo(b)}}function m(E,T){if(!T&&E.length){var P=E[0].loc,D=E[E.length-1].loc;P&&D&&(T={source:P.source,start:{line:P.start.line,column:P.start.column},end:{line:D.end.line,column:D.end.column}})}return{type:"Program",body:E,strip:{},loc:T}}function f(E,T,P,D){return n(E,P),{type:"PartialBlockStatement",name:E.path,params:E.params,hash:E.hash,program:T,openStrip:E.strip,closeStrip:P&&P.strip,loc:this.locInfo(D)}}var d=h(1).default;o.__esModule=!0,o.SourceLocation=r,o.id=l,o.stripFlags=c,o.stripComment=p,o.preparePath=s,o.prepareMustache=u,o.prepareRawBlock=g,o.prepareBlock=i,o.prepareProgram=m,o.preparePartialBlock=f;var S=h(6),v=d(S)},function(y,o,h){"use strict";function n(){}function r(v,E,T){if(v==null||typeof v!="string"&&v.type!=="Program")throw new i.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+v);E=E||{},"data"in E||(E.data=!0),E.compat&&(E.useDepths=!0);var P=T.parse(v,E),D=new T.Compiler().compile(P,E);return new T.JavaScriptCompiler().compile(D,E)}function l(v,E,T){function P(){var b=T.parse(v,E),x=new T.Compiler().compile(b,E),I=new T.JavaScriptCompiler().compile(x,E,void 0,!0);return T.template(I)}function D(b,x){return _||(_=P()),_.call(this,b,x)}if(E===void 0&&(E={}),v==null||typeof v!="string"&&v.type!=="Program")throw new i.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+v);E=m.extend({},E),"data"in E||(E.data=!0),E.compat&&(E.useDepths=!0);var _=void 0;return D._setup=function(b){return _||(_=P()),_._setup(b)},D._child=function(b,x,I,R){return _||(_=P()),_._child(b,x,I,R)},D}function c(v,E){if(v===E)return!0;if(m.isArray(v)&&m.isArray(E)&&v.length===E.length){for(var T=0;T1)throw new i.default("Unsupported number of partial arguments: "+T.length,v);T.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):T.push({type:"PathExpression",parts:[],depth:0}));var P=v.name.original,D=v.name.type==="SubExpression";D&&this.accept(v.name),this.setupFullMustacheParams(v,E,void 0,!0);var _=v.indent||"";this.options.preventIndent&&_&&(this.opcode("appendContent",_),_=""),this.opcode("invokePartial",D,P,_),this.opcode("append")},PartialBlockStatement:function(v){this.PartialStatement(v)},MustacheStatement:function(v){this.SubExpression(v),v.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(v){this.DecoratorBlock(v)},ContentStatement:function(v){v.value&&this.opcode("appendContent",v.value)},CommentStatement:function(){},SubExpression:function(v){p(v);var E=this.classifySexpr(v);E==="simple"?this.simpleSexpr(v):E==="helper"?this.helperSexpr(v):this.ambiguousSexpr(v)},ambiguousSexpr:function(v,E,T){var P=v.path,D=P.parts[0],_=E!=null||T!=null;this.opcode("getContext",P.depth),this.opcode("pushProgram",E),this.opcode("pushProgram",T),P.strict=!0,this.accept(P),this.opcode("invokeAmbiguous",D,_)},simpleSexpr:function(v){var E=v.path;E.strict=!0,this.accept(E),this.opcode("resolvePossibleLambda")},helperSexpr:function(v,E,T){var P=this.setupFullMustacheParams(v,E,T),D=v.path,_=D.parts[0];if(this.options.knownHelpers[_])this.opcode("invokeKnownHelper",P.length,_);else{if(this.options.knownHelpersOnly)throw new i.default("You specified knownHelpersOnly, but used the unknown helper "+_,v);D.strict=!0,D.falsy=!0,this.accept(D),this.opcode("invokeHelper",P.length,D.original,d.default.helpers.simpleId(D))}},PathExpression:function(v){this.addDepth(v.depth),this.opcode("getContext",v.depth);var E=v.parts[0],T=d.default.helpers.scopedId(v),P=!v.depth&&!T&&this.blockParamIndex(E);P?this.opcode("lookupBlockParam",P,v.parts):E?v.data?(this.options.data=!0,this.opcode("lookupData",v.depth,v.parts,v.strict)):this.opcode("lookupOnContext",v.parts,v.falsy,v.strict,T):this.opcode("pushContext")},StringLiteral:function(v){this.opcode("pushString",v.value)},NumberLiteral:function(v){this.opcode("pushLiteral",v.value)},BooleanLiteral:function(v){this.opcode("pushLiteral",v.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(v){var E=v.pairs,T=0,P=E.length;for(this.opcode("pushHash");T=0)return[E,D]}}}},function(y,o,h){"use strict";function n(d){this.value=d}function r(){}function l(d,S,v,E){var T=S.popStack(),P=0,D=v.length;for(d&&D--;P@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]+?(?=(\{\{\{\{)))/,/^(?:[\s\S]*?--(~)?\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#>)/,/^(?:\{\{(~)?#\*?)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{(~)?!--)/,/^(?:\{\{(~)?![\s\S]*?\}\})/,/^(?:\{\{(~)?\*?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)|])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:undefined(?=([~}\s)])))/,/^(?:null(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:as\s+\|)/,/^(?:\|)/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/,/^(?:\[(\\\]|[^\]])*\])/,/^(?:.)/,/^(?:$)/],c.conditions={mu:{rules:[7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[6],inclusive:!1},raw:{rules:[3,4,5],inclusive:!1},INITIAL:{rules:[0,1,44],inclusive:!0}},c}();return r.lexer=l,n.prototype=r,r.Parser=n,new n}();o.default=h,y.exports=o.default},function(y,o,h){"use strict";function n(){var i=arguments.length<=0||arguments[0]===void 0?{}:arguments[0];this.options=i}function r(i,m,f){m===void 0&&(m=i.length);var d=i[m-1],S=i[m-2];return d?d.type==="ContentStatement"?(S||!f?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(d.original):void 0:f}function l(i,m,f){m===void 0&&(m=-1);var d=i[m+1],S=i[m+2];return d?d.type==="ContentStatement"?(S||!f?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(d.original):void 0:f}function c(i,m,f){var d=i[m==null?0:m+1];if(d&&d.type==="ContentStatement"&&(f||!d.rightStripped)){var S=d.value;d.value=d.value.replace(f?/^\s+/:/^[ \t]*\r?\n?/,""),d.rightStripped=d.value!==S}}function p(i,m,f){var d=i[m==null?i.length-1:m-1];if(d&&d.type==="ContentStatement"&&(f||!d.leftStripped)){var S=d.value;return d.value=d.value.replace(f?/\s+$/:/[ \t]+$/,""),d.leftStripped=d.value!==S,d.leftStripped}}var s=h(1).default;o.__esModule=!0;var u=h(49),g=s(u);n.prototype=new g.default,n.prototype.Program=function(i){var m=!this.options.ignoreStandalone,f=!this.isRootSeen;this.isRootSeen=!0;for(var d=i.body,S=0,v=d.length;S0)throw new v.default("Invalid path: "+N,{loc:_});R===".."&&T++}}return{type:"PathExpression",data:E,depth:T,parts:b,original:N,loc:_}}function u(E,D,_,N,b,T){var C=N.charAt(3)||N.charAt(2),I=C!=="{"&&C!=="&",R=/\*/.test(N);return{type:R?"Decorator":"MustacheStatement",path:E,params:D,hash:_,escaped:I,strip:b,loc:this.locInfo(T)}}function g(E,D,_,N){n(E,_),N=this.locInfo(N);var b={type:"Program",body:D,strip:{},loc:N};return{type:"BlockStatement",path:E.path,params:E.params,hash:E.hash,program:b,openStrip:{},inverseStrip:{},closeStrip:{},loc:N}}function i(E,D,_,N,b,T){N&&N.path&&n(E,N);var C=/\*/.test(E.open);D.blockParams=E.blockParams;var I=void 0,R=void 0;if(_){if(C)throw new v.default("Unexpected inverse block on decorator",_);_.chain&&(_.program.body[0].closeStrip=N.strip),R=_.strip,I=_.program}return b&&(b=I,I=D,D=b),{type:C?"DecoratorBlock":"BlockStatement",path:E.path,params:E.params,hash:E.hash,program:D,inverse:I,openStrip:E.strip,inverseStrip:R,closeStrip:N&&N.strip,loc:this.locInfo(T)}}function m(E,D){if(!D&&E.length){var _=E[0].loc,N=E[E.length-1].loc;_&&N&&(D={source:_.source,start:{line:_.start.line,column:_.start.column},end:{line:N.end.line,column:N.end.column}})}return{type:"Program",body:E,strip:{},loc:D}}function f(E,D,_,N){return n(E,_),{type:"PartialBlockStatement",name:E.path,params:E.params,hash:E.hash,program:D,openStrip:E.strip,closeStrip:_&&_.strip,loc:this.locInfo(N)}}var d=h(1).default;o.__esModule=!0,o.SourceLocation=r,o.id=l,o.stripFlags=c,o.stripComment=p,o.preparePath=s,o.prepareMustache=u,o.prepareRawBlock=g,o.prepareBlock=i,o.prepareProgram=m,o.preparePartialBlock=f;var S=h(6),v=d(S)},function(y,o,h){"use strict";function n(){}function r(v,E,D){if(v==null||typeof v!="string"&&v.type!=="Program")throw new i.default("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+v);E=E||{},"data"in E||(E.data=!0),E.compat&&(E.useDepths=!0);var _=D.parse(v,E),N=new D.Compiler().compile(_,E);return new D.JavaScriptCompiler().compile(N,E)}function l(v,E,D){function _(){var T=D.parse(v,E),C=new D.Compiler().compile(T,E),I=new D.JavaScriptCompiler().compile(C,E,void 0,!0);return D.template(I)}function N(T,C){return b||(b=_()),b.call(this,T,C)}if(E===void 0&&(E={}),v==null||typeof v!="string"&&v.type!=="Program")throw new i.default("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+v);E=m.extend({},E),"data"in E||(E.data=!0),E.compat&&(E.useDepths=!0);var b=void 0;return N._setup=function(T){return b||(b=_()),b._setup(T)},N._child=function(T,C,I,R){return b||(b=_()),b._child(T,C,I,R)},N}function c(v,E){if(v===E)return!0;if(m.isArray(v)&&m.isArray(E)&&v.length===E.length){for(var D=0;D1)throw new i.default("Unsupported number of partial arguments: "+D.length,v);D.length||(this.options.explicitPartialContext?this.opcode("pushLiteral","undefined"):D.push({type:"PathExpression",parts:[],depth:0}));var _=v.name.original,N=v.name.type==="SubExpression";N&&this.accept(v.name),this.setupFullMustacheParams(v,E,void 0,!0);var b=v.indent||"";this.options.preventIndent&&b&&(this.opcode("appendContent",b),b=""),this.opcode("invokePartial",N,_,b),this.opcode("append")},PartialBlockStatement:function(v){this.PartialStatement(v)},MustacheStatement:function(v){this.SubExpression(v),v.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},Decorator:function(v){this.DecoratorBlock(v)},ContentStatement:function(v){v.value&&this.opcode("appendContent",v.value)},CommentStatement:function(){},SubExpression:function(v){p(v);var E=this.classifySexpr(v);E==="simple"?this.simpleSexpr(v):E==="helper"?this.helperSexpr(v):this.ambiguousSexpr(v)},ambiguousSexpr:function(v,E,D){var _=v.path,N=_.parts[0],b=E!=null||D!=null;this.opcode("getContext",_.depth),this.opcode("pushProgram",E),this.opcode("pushProgram",D),_.strict=!0,this.accept(_),this.opcode("invokeAmbiguous",N,b)},simpleSexpr:function(v){var E=v.path;E.strict=!0,this.accept(E),this.opcode("resolvePossibleLambda")},helperSexpr:function(v,E,D){var _=this.setupFullMustacheParams(v,E,D),N=v.path,b=N.parts[0];if(this.options.knownHelpers[b])this.opcode("invokeKnownHelper",_.length,b);else{if(this.options.knownHelpersOnly)throw new i.default("You specified knownHelpersOnly, but used the unknown helper "+b,v);N.strict=!0,N.falsy=!0,this.accept(N),this.opcode("invokeHelper",_.length,N.original,d.default.helpers.simpleId(N))}},PathExpression:function(v){this.addDepth(v.depth),this.opcode("getContext",v.depth);var E=v.parts[0],D=d.default.helpers.scopedId(v),_=!v.depth&&!D&&this.blockParamIndex(E);_?this.opcode("lookupBlockParam",_,v.parts):E?v.data?(this.options.data=!0,this.opcode("lookupData",v.depth,v.parts,v.strict)):this.opcode("lookupOnContext",v.parts,v.falsy,v.strict,D):this.opcode("pushContext")},StringLiteral:function(v){this.opcode("pushString",v.value)},NumberLiteral:function(v){this.opcode("pushLiteral",v.value)},BooleanLiteral:function(v){this.opcode("pushLiteral",v.value)},UndefinedLiteral:function(){this.opcode("pushLiteral","undefined")},NullLiteral:function(){this.opcode("pushLiteral","null")},Hash:function(v){var E=v.pairs,D=0,_=E.length;for(this.opcode("pushHash");D<_;D++)this.pushParam(E[D].value);for(;D--;)this.opcode("assignToHash",E[D].key);this.opcode("popHash")},opcode:function(v){this.opcodes.push({opcode:v,args:S.call(arguments,1),loc:this.sourceNode[0].loc})},addDepth:function(v){v&&(this.useDepths=!0)},classifySexpr:function(v){var E=d.default.helpers.simpleId(v.path),D=E&&!!this.blockParamIndex(v.path.parts[0]),_=!D&&d.default.helpers.helperExpression(v),N=!D&&(_||E);if(N&&!_){var b=v.path.parts[0],T=this.options;T.knownHelpers[b]?_=!0:T.knownHelpersOnly&&(N=!1)}return _?"helper":N?"ambiguous":"simple"},pushParams:function(v){for(var E=0,D=v.length;E=0)return[E,N]}}}},function(y,o,h){"use strict";function n(d){this.value=d}function r(){}function l(d,S,v,E){var D=S.popStack(),_=0,N=v.length;for(d&&N--;_0&&(v+=", "+E.join(", "));var T=0;c(this.aliases).forEach(function(_){var b=S.aliases[_];b.children&&b.referenceCount>1&&(v+=", alias"+ ++T+"="+_,b.children[0]="alias"+T)}),this.lookupPropertyFunctionIsUsed&&(v+=", "+this.lookupPropertyFunctionVarDeclaration());var P=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&P.push("blockParams"),this.useDepths&&P.push("depths");var D=this.mergeSource(v);return d?(P.push(D),Function.apply(this,P)):this.source.wrap(["function(",P.join(","),`) { - `,D,"}"])},mergeSource:function(d){var S=this.environment.isSimple,v=!this.forceBuffer,E=void 0,T=void 0,P=void 0,D=void 0;return this.source.each(function(_){_.appendToBuffer?(P?_.prepend(" + "):P=_,D=_):(P&&(T?P.prepend("buffer += "):E=!0,D.add(";"),P=D=void 0),T=!0,S||(v=!1))}),v?P?(P.prepend("return "),D.add(";")):T||this.source.push('return "";'):(d+=", buffer = "+(E?"":this.initializeBuffer()),P?(P.prepend("return buffer + "),D.add(";")):this.source.push("return buffer;")),d&&this.source.prepend("var "+d.substring(2)+(E?"":`; +`),this.decorators=this.decorators.merge()));var C=this.createFunctionContext(E);if(this.isChild)return C;var I={compiler:this.compilerInfo(),main:C};this.decorators&&(I.main_d=this.decorators,I.useDecorators=!0);var R=this.context,x=R.programs,O=R.decorators;for(b=0,T=x.length;b0&&(v+=", "+E.join(", "));var D=0;c(this.aliases).forEach(function(b){var T=S.aliases[b];T.children&&T.referenceCount>1&&(v+=", alias"+ ++D+"="+b,T.children[0]="alias"+D)}),this.lookupPropertyFunctionIsUsed&&(v+=", "+this.lookupPropertyFunctionVarDeclaration());var _=["container","depth0","helpers","partials","data"];(this.useBlockParams||this.useDepths)&&_.push("blockParams"),this.useDepths&&_.push("depths");var N=this.mergeSource(v);return d?(_.push(N),Function.apply(this,_)):this.source.wrap(["function(",_.join(","),`) { + `,N,"}"])},mergeSource:function(d){var S=this.environment.isSimple,v=!this.forceBuffer,E=void 0,D=void 0,_=void 0,N=void 0;return this.source.each(function(b){b.appendToBuffer?(_?b.prepend(" + "):_=b,N=b):(_&&(D?_.prepend("buffer += "):E=!0,N.add(";"),_=N=void 0),D=!0,S||(v=!1))}),v?_?(_.prepend("return "),N.add(";")):D||this.source.push('return "";'):(d+=", buffer = "+(E?"":this.initializeBuffer()),_?(_.prepend("return buffer + "),N.add(";")):this.source.push("return buffer;")),d&&this.source.prepend("var "+d.substring(2)+(E?"":`; `)),this.source.merge()},lookupPropertyFunctionVarDeclaration:function(){return` lookupProperty = container.lookupProperty || function(parent, propertyName) { if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { @@ -47,58 +47,61 @@ Expecting `+O.join(", ")+", got '"+(this.terminals_[P]||P)+"'":"Parse error on l } return undefined } - `.trim()},blockValue:function(d){var S=this.aliasable("container.hooks.blockHelperMissing"),v=[this.contextName(0)];this.setupHelperArgs(d,0,v);var E=this.popStack();v.splice(1,0,E),this.push(this.source.functionCall(S,"call",v))},ambiguousBlockValue:function(){var d=this.aliasable("container.hooks.blockHelperMissing"),S=[this.contextName(0)];this.setupHelperArgs("",0,S,!0),this.flushInline();var v=this.topStack();S.splice(1,0,v),this.pushSource(["if (!",this.lastHelper,") { ",v," = ",this.source.functionCall(d,"call",S),"}"])},appendContent:function(d){this.pendingContent?d=this.pendingContent+d:this.pendingLocation=this.source.currentLocation,this.pendingContent=d},append:function(){if(this.isInline())this.replaceStack(function(S){return[" != null ? ",S,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var d=this.popStack();this.pushSource(["if (",d," != null) { ",this.appendToBuffer(d,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(d){this.lastContext=d},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(d,S,v,E){var T=0;E||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(d[T++])),this.resolvePath("context",d,T,S,v)},lookupBlockParam:function(d,S){this.useBlockParams=!0,this.push(["blockParams[",d[0],"][",d[1],"]"]),this.resolvePath("context",S,1)},lookupData:function(d,S,v){d?this.pushStackLiteral("container.data(data, "+d+")"):this.pushStackLiteral("data"),this.resolvePath("data",S,0,!0,v)},resolvePath:function(d,S,v,E,T){var P=this;if(this.options.strict||this.options.assumeObjects)return void this.push(l(this.options.strict&&T,this,S,d));for(var D=S.length;vthis.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var d=this.inlineStack;this.inlineStack=[];for(var S=0,v=d.length;S{var h;/*! -* Sizzle CSS Selector Engine v2.3.6 + `.trim()},blockValue:function(d){var S=this.aliasable("container.hooks.blockHelperMissing"),v=[this.contextName(0)];this.setupHelperArgs(d,0,v);var E=this.popStack();v.splice(1,0,E),this.push(this.source.functionCall(S,"call",v))},ambiguousBlockValue:function(){var d=this.aliasable("container.hooks.blockHelperMissing"),S=[this.contextName(0)];this.setupHelperArgs("",0,S,!0),this.flushInline();var v=this.topStack();S.splice(1,0,v),this.pushSource(["if (!",this.lastHelper,") { ",v," = ",this.source.functionCall(d,"call",S),"}"])},appendContent:function(d){this.pendingContent?d=this.pendingContent+d:this.pendingLocation=this.source.currentLocation,this.pendingContent=d},append:function(){if(this.isInline())this.replaceStack(function(S){return[" != null ? ",S,' : ""']}),this.pushSource(this.appendToBuffer(this.popStack()));else{var d=this.popStack();this.pushSource(["if (",d," != null) { ",this.appendToBuffer(d,void 0,!0)," }"]),this.environment.isSimple&&this.pushSource(["else { ",this.appendToBuffer("''",void 0,!0)," }"])}},appendEscaped:function(){this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"),"(",this.popStack(),")"]))},getContext:function(d){this.lastContext=d},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(d,S,v,E){var D=0;E||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(d[D++])),this.resolvePath("context",d,D,S,v)},lookupBlockParam:function(d,S){this.useBlockParams=!0,this.push(["blockParams[",d[0],"][",d[1],"]"]),this.resolvePath("context",S,1)},lookupData:function(d,S,v){d?this.pushStackLiteral("container.data(data, "+d+")"):this.pushStackLiteral("data"),this.resolvePath("data",S,0,!0,v)},resolvePath:function(d,S,v,E,D){var _=this;if(this.options.strict||this.options.assumeObjects)return void this.push(l(this.options.strict&&D,this,S,d));for(var N=S.length;vthis.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var d=this.inlineStack;this.inlineStack=[];for(var S=0,v=d.length;S{var h;/*! +* Sizzle CSS Selector Engine v2.3.10 * https://sizzlejs.com/ * * Copyright JS Foundation and other contributors * Released under the MIT license * https://js.foundation/ * -* Date: 2021-02-16 -*/(function(n){var r,l,c,p,s,u,g,i,m,f,d,S,v,E,T,P,D,_,b,x="sizzle"+1*new Date,I=n.document,R=0,C=0,O=tr(),$=tr(),k=tr(),M=tr(),W=function(F,H){return F===H&&(d=!0),0},G={}.hasOwnProperty,U=[],Y=U.pop,z=U.push,te=U.push,ae=U.slice,he=function(F,H){for(var V=0,ne=F.length;V+~]|"+ye+")"+ye+"*"),Ke=new RegExp(ye+"|>"),Bt=new RegExp(mt),Ze=new RegExp("^"+Pe+"$"),et={ID:new RegExp("^#("+Pe+")"),CLASS:new RegExp("^\\.("+Pe+")"),TAG:new RegExp("^("+Pe+"|[*])"),ATTR:new RegExp("^"+ze),PSEUDO:new RegExp("^"+mt),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ye+"*(even|odd|(([+-]|)(\\d*)n|)"+ye+"*(?:([+-]|)"+ye+"*(\\d+)|))"+ye+"*\\)|)","i"),bool:new RegExp("^(?:"+Q+")$","i"),needsContext:new RegExp("^"+ye+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ye+"*((?:-\\d)?\\d*)"+ye+"*\\)|)(?=[^-]|$)","i")},zt=/HTML$/i,Mr=/^(?:input|select|textarea|button)$/i,Pt=/^h\d$/i,Yt=/^[^{]+\{\s*\[native \w/,mr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Ft=/[+~]/,pt=new RegExp("\\\\[\\da-fA-F]{1,6}"+ye+"?|\\\\([^\\r\\n\\f])","g"),dt=function(F,H){var V="0x"+F.slice(1)-65536;return H||(V<0?String.fromCharCode(V+65536):String.fromCharCode(V>>10|55296,V&1023|56320))},Tr=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,tn=function(F,H){return H?F==="\0"?"\uFFFD":F.slice(0,-1)+"\\"+F.charCodeAt(F.length-1).toString(16)+" ":"\\"+F},er=function(){S()},vn=Ce(function(F){return F.disabled===!0&&F.nodeName.toLowerCase()==="fieldset"},{dir:"parentNode",next:"legend"});try{te.apply(U=ae.call(I.childNodes),I.childNodes),U[I.childNodes.length].nodeType}catch(F){te={apply:U.length?function(H,V){z.apply(H,ae.call(V))}:function(H,V){for(var ne=H.length,j=0;H[ne++]=V[j++];);H.length=ne-1}}}function tt(F,H,V,ne){var j,ie,oe,Se,_e,Oe,Le,ke=H&&H.ownerDocument,je=H?H.nodeType:9;if(V=V||[],typeof F!="string"||!F||je!==1&&je!==9&&je!==11)return V;if(!ne&&(S(H),H=H||v,T)){if(je!==11&&(_e=mr.exec(F)))if(j=_e[1]){if(je===9)if(oe=H.getElementById(j)){if(oe.id===j)return V.push(oe),V}else return V;else if(ke&&(oe=ke.getElementById(j))&&b(H,oe)&&oe.id===j)return V.push(oe),V}else{if(_e[2])return te.apply(V,H.getElementsByTagName(F)),V;if((j=_e[3])&&l.getElementsByClassName&&H.getElementsByClassName)return te.apply(V,H.getElementsByClassName(j)),V}if(l.qsa&&!M[F+" "]&&(!P||!P.test(F))&&(je!==1||H.nodeName.toLowerCase()!=="object")){if(Le=F,ke=H,je===1&&(Ke.test(F)||Gt.test(F))){for(ke=Ft.test(F)&&Ee(H.parentNode)||H,(ke!==H||!l.scope)&&((Se=H.getAttribute("id"))?Se=Se.replace(Tr,tn):H.setAttribute("id",Se=x)),Oe=u(F),ie=Oe.length;ie--;)Oe[ie]=(Se?"#"+Se:":scope")+" "+Me(Oe[ie]);Le=Oe.join(",")}try{return te.apply(V,ke.querySelectorAll(Le)),V}catch(at){M(F,!0)}finally{Se===x&&H.removeAttribute("id")}}}return i(F.replace(Nt,"$1"),H,V,ne)}function tr(){var F=[];function H(V,ne){return F.push(V+" ")>c.cacheLength&&delete H[F.shift()],H[V+" "]=ne}return H}function kt(F){return F[x]=!0,F}function de(F){var H=v.createElement("fieldset");try{return!!F(H)}catch(V){return!1}finally{H.parentNode&&H.parentNode.removeChild(H),H=null}}function q(F,H){for(var V=F.split("|"),ne=V.length;ne--;)c.attrHandle[V[ne]]=H}function fe(F,H){var V=H&&F,ne=V&&F.nodeType===1&&H.nodeType===1&&F.sourceIndex-H.sourceIndex;if(ne)return ne;if(V){for(;V=V.nextSibling;)if(V===H)return-1}return F?1:-1}function Te(F){return function(H){var V=H.nodeName.toLowerCase();return V==="input"&&H.type===F}}function re(F){return function(H){var V=H.nodeName.toLowerCase();return(V==="input"||V==="button")&&H.type===F}}function me(F){return function(H){return"form"in H?H.parentNode&&H.disabled===!1?"label"in H?"label"in H.parentNode?H.parentNode.disabled===F:H.disabled===F:H.isDisabled===F||H.isDisabled!==!F&&vn(H)===F:H.disabled===F:"label"in H?H.disabled===F:!1}}function ce(F){return kt(function(H){return H=+H,kt(function(V,ne){for(var j,ie=F([],V.length,H),oe=ie.length;oe--;)V[j=ie[oe]]&&(V[j]=!(ne[j]=V[j]))})})}function Ee(F){return F&&typeof F.getElementsByTagName!="undefined"&&F}l=tt.support={},s=tt.isXML=function(F){var H=F&&F.namespaceURI,V=F&&(F.ownerDocument||F).documentElement;return!zt.test(H||V&&V.nodeName||"HTML")},S=tt.setDocument=function(F){var H,V,ne=F?F.ownerDocument||F:I;return ne==v||ne.nodeType!==9||!ne.documentElement||(v=ne,E=v.documentElement,T=!s(v),I!=v&&(V=v.defaultView)&&V.top!==V&&(V.addEventListener?V.addEventListener("unload",er,!1):V.attachEvent&&V.attachEvent("onunload",er)),l.scope=de(function(j){return E.appendChild(j).appendChild(v.createElement("div")),typeof j.querySelectorAll!="undefined"&&!j.querySelectorAll(":scope fieldset div").length}),l.attributes=de(function(j){return j.className="i",!j.getAttribute("className")}),l.getElementsByTagName=de(function(j){return j.appendChild(v.createComment("")),!j.getElementsByTagName("*").length}),l.getElementsByClassName=Yt.test(v.getElementsByClassName),l.getById=de(function(j){return E.appendChild(j).id=x,!v.getElementsByName||!v.getElementsByName(x).length}),l.getById?(c.filter.ID=function(j){var ie=j.replace(pt,dt);return function(oe){return oe.getAttribute("id")===ie}},c.find.ID=function(j,ie){if(typeof ie.getElementById!="undefined"&&T){var oe=ie.getElementById(j);return oe?[oe]:[]}}):(c.filter.ID=function(j){var ie=j.replace(pt,dt);return function(oe){var Se=typeof oe.getAttributeNode!="undefined"&&oe.getAttributeNode("id");return Se&&Se.value===ie}},c.find.ID=function(j,ie){if(typeof ie.getElementById!="undefined"&&T){var oe,Se,_e,Oe=ie.getElementById(j);if(Oe){if(oe=Oe.getAttributeNode("id"),oe&&oe.value===j)return[Oe];for(_e=ie.getElementsByName(j),Se=0;Oe=_e[Se++];)if(oe=Oe.getAttributeNode("id"),oe&&oe.value===j)return[Oe]}return[]}}),c.find.TAG=l.getElementsByTagName?function(j,ie){if(typeof ie.getElementsByTagName!="undefined")return ie.getElementsByTagName(j);if(l.qsa)return ie.querySelectorAll(j)}:function(j,ie){var oe,Se=[],_e=0,Oe=ie.getElementsByTagName(j);if(j==="*"){for(;oe=Oe[_e++];)oe.nodeType===1&&Se.push(oe);return Se}return Oe},c.find.CLASS=l.getElementsByClassName&&function(j,ie){if(typeof ie.getElementsByClassName!="undefined"&&T)return ie.getElementsByClassName(j)},D=[],P=[],(l.qsa=Yt.test(v.querySelectorAll))&&(de(function(j){var ie;E.appendChild(j).innerHTML="",j.querySelectorAll("[msallowcapture^='']").length&&P.push("[*^$]="+ye+`*(?:''|"")`),j.querySelectorAll("[selected]").length||P.push("\\["+ye+"*(?:value|"+Q+")"),j.querySelectorAll("[id~="+x+"-]").length||P.push("~="),ie=v.createElement("input"),ie.setAttribute("name",""),j.appendChild(ie),j.querySelectorAll("[name='']").length||P.push("\\["+ye+"*name"+ye+"*="+ye+`*(?:''|"")`),j.querySelectorAll(":checked").length||P.push(":checked"),j.querySelectorAll("a#"+x+"+*").length||P.push(".#.+[+~]"),j.querySelectorAll("\\\f"),P.push("[\\r\\n\\f]")}),de(function(j){j.innerHTML="";var ie=v.createElement("input");ie.setAttribute("type","hidden"),j.appendChild(ie).setAttribute("name","D"),j.querySelectorAll("[name=d]").length&&P.push("name"+ye+"*[*^$|!~]?="),j.querySelectorAll(":enabled").length!==2&&P.push(":enabled",":disabled"),E.appendChild(j).disabled=!0,j.querySelectorAll(":disabled").length!==2&&P.push(":enabled",":disabled"),j.querySelectorAll("*,:x"),P.push(",.*:")})),(l.matchesSelector=Yt.test(_=E.matches||E.webkitMatchesSelector||E.mozMatchesSelector||E.oMatchesSelector||E.msMatchesSelector))&&de(function(j){l.disconnectedMatch=_.call(j,"*"),_.call(j,"[s!='']:x"),D.push("!=",mt)}),P=P.length&&new RegExp(P.join("|")),D=D.length&&new RegExp(D.join("|")),H=Yt.test(E.compareDocumentPosition),b=H||Yt.test(E.contains)?function(j,ie){var oe=j.nodeType===9?j.documentElement:j,Se=ie&&ie.parentNode;return j===Se||!!(Se&&Se.nodeType===1&&(oe.contains?oe.contains(Se):j.compareDocumentPosition&&j.compareDocumentPosition(Se)&16))}:function(j,ie){if(ie){for(;ie=ie.parentNode;)if(ie===j)return!0}return!1},W=H?function(j,ie){if(j===ie)return d=!0,0;var oe=!j.compareDocumentPosition-!ie.compareDocumentPosition;return oe||(oe=(j.ownerDocument||j)==(ie.ownerDocument||ie)?j.compareDocumentPosition(ie):1,oe&1||!l.sortDetached&&ie.compareDocumentPosition(j)===oe?j==v||j.ownerDocument==I&&b(I,j)?-1:ie==v||ie.ownerDocument==I&&b(I,ie)?1:f?he(f,j)-he(f,ie):0:oe&4?-1:1)}:function(j,ie){if(j===ie)return d=!0,0;var oe,Se=0,_e=j.parentNode,Oe=ie.parentNode,Le=[j],ke=[ie];if(!_e||!Oe)return j==v?-1:ie==v?1:_e?-1:Oe?1:f?he(f,j)-he(f,ie):0;if(_e===Oe)return fe(j,ie);for(oe=j;oe=oe.parentNode;)Le.unshift(oe);for(oe=ie;oe=oe.parentNode;)ke.unshift(oe);for(;Le[Se]===ke[Se];)Se++;return Se?fe(Le[Se],ke[Se]):Le[Se]==I?-1:ke[Se]==I?1:0}),v},tt.matches=function(F,H){return tt(F,null,null,H)},tt.matchesSelector=function(F,H){if(S(F),l.matchesSelector&&T&&!M[H+" "]&&(!D||!D.test(H))&&(!P||!P.test(H)))try{var V=_.call(F,H);if(V||l.disconnectedMatch||F.document&&F.document.nodeType!==11)return V}catch(ne){M(H,!0)}return tt(H,v,null,[F]).length>0},tt.contains=function(F,H){return(F.ownerDocument||F)!=v&&S(F),b(F,H)},tt.attr=function(F,H){(F.ownerDocument||F)!=v&&S(F);var V=c.attrHandle[H.toLowerCase()],ne=V&&G.call(c.attrHandle,H.toLowerCase())?V(F,H,!T):void 0;return ne!==void 0?ne:l.attributes||!T?F.getAttribute(H):(ne=F.getAttributeNode(H))&&ne.specified?ne.value:null},tt.escape=function(F){return(F+"").replace(Tr,tn)},tt.error=function(F){throw new Error("Syntax error, unrecognized expression: "+F)},tt.uniqueSort=function(F){var H,V=[],ne=0,j=0;if(d=!l.detectDuplicates,f=!l.sortStable&&F.slice(0),F.sort(W),d){for(;H=F[j++];)H===F[j]&&(ne=V.push(j));for(;ne--;)F.splice(V[ne],1)}return f=null,F},p=tt.getText=function(F){var H,V="",ne=0,j=F.nodeType;if(j){if(j===1||j===9||j===11){if(typeof F.textContent=="string")return F.textContent;for(F=F.firstChild;F;F=F.nextSibling)V+=p(F)}else if(j===3||j===4)return F.nodeValue}else for(;H=F[ne++];)V+=p(H);return V},c=tt.selectors={cacheLength:50,createPseudo:kt,match:et,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(F){return F[1]=F[1].replace(pt,dt),F[3]=(F[3]||F[4]||F[5]||"").replace(pt,dt),F[2]==="~="&&(F[3]=" "+F[3]+" "),F.slice(0,4)},CHILD:function(F){return F[1]=F[1].toLowerCase(),F[1].slice(0,3)==="nth"?(F[3]||tt.error(F[0]),F[4]=+(F[4]?F[5]+(F[6]||1):2*(F[3]==="even"||F[3]==="odd")),F[5]=+(F[7]+F[8]||F[3]==="odd")):F[3]&&tt.error(F[0]),F},PSEUDO:function(F){var H,V=!F[6]&&F[2];return et.CHILD.test(F[0])?null:(F[3]?F[2]=F[4]||F[5]||"":V&&Bt.test(V)&&(H=u(V,!0))&&(H=V.indexOf(")",V.length-H)-V.length)&&(F[0]=F[0].slice(0,H),F[2]=V.slice(0,H)),F.slice(0,3))}},filter:{TAG:function(F){var H=F.replace(pt,dt).toLowerCase();return F==="*"?function(){return!0}:function(V){return V.nodeName&&V.nodeName.toLowerCase()===H}},CLASS:function(F){var H=O[F+" "];return H||(H=new RegExp("(^|"+ye+")"+F+"("+ye+"|$)"))&&O(F,function(V){return H.test(typeof V.className=="string"&&V.className||typeof V.getAttribute!="undefined"&&V.getAttribute("class")||"")})},ATTR:function(F,H,V){return function(ne){var j=tt.attr(ne,F);return j==null?H==="!=":H?(j+="",H==="="?j===V:H==="!="?j!==V:H==="^="?V&&j.indexOf(V)===0:H==="*="?V&&j.indexOf(V)>-1:H==="$="?V&&j.slice(-V.length)===V:H==="~="?(" "+j.replace(It," ")+" ").indexOf(V)>-1:H==="|="?j===V||j.slice(0,V.length+1)===V+"-":!1):!0}},CHILD:function(F,H,V,ne,j){var ie=F.slice(0,3)!=="nth",oe=F.slice(-4)!=="last",Se=H==="of-type";return ne===1&&j===0?function(_e){return!!_e.parentNode}:function(_e,Oe,Le){var ke,je,at,Fe,_t,Dt,ve=ie!==oe?"nextSibling":"previousSibling",le=_e.parentNode,Ae=Se&&_e.nodeName.toLowerCase(),be=!Le&&!Se,Ie=!1;if(le){if(ie){for(;ve;){for(Fe=_e;Fe=Fe[ve];)if(Se?Fe.nodeName.toLowerCase()===Ae:Fe.nodeType===1)return!1;Dt=ve=F==="only"&&!Dt&&"nextSibling"}return!0}if(Dt=[oe?le.firstChild:le.lastChild],oe&&be){for(Fe=le,at=Fe[x]||(Fe[x]={}),je=at[Fe.uniqueID]||(at[Fe.uniqueID]={}),ke=je[F]||[],_t=ke[0]===R&&ke[1],Ie=_t&&ke[2],Fe=_t&&le.childNodes[_t];Fe=++_t&&Fe&&Fe[ve]||(Ie=_t=0)||Dt.pop();)if(Fe.nodeType===1&&++Ie&&Fe===_e){je[F]=[R,_t,Ie];break}}else if(be&&(Fe=_e,at=Fe[x]||(Fe[x]={}),je=at[Fe.uniqueID]||(at[Fe.uniqueID]={}),ke=je[F]||[],_t=ke[0]===R&&ke[1],Ie=_t),Ie===!1)for(;(Fe=++_t&&Fe&&Fe[ve]||(Ie=_t=0)||Dt.pop())&&!((Se?Fe.nodeName.toLowerCase()===Ae:Fe.nodeType===1)&&++Ie&&(be&&(at=Fe[x]||(Fe[x]={}),je=at[Fe.uniqueID]||(at[Fe.uniqueID]={}),je[F]=[R,Ie]),Fe===_e)););return Ie-=j,Ie===ne||Ie%ne===0&&Ie/ne>=0}}},PSEUDO:function(F,H){var V,ne=c.pseudos[F]||c.setFilters[F.toLowerCase()]||tt.error("unsupported pseudo: "+F);return ne[x]?ne(H):ne.length>1?(V=[F,F,"",H],c.setFilters.hasOwnProperty(F.toLowerCase())?kt(function(j,ie){for(var oe,Se=ne(j,H),_e=Se.length;_e--;)oe=he(j,Se[_e]),j[oe]=!(ie[oe]=Se[_e])}):function(j){return ne(j,0,V)}):ne}},pseudos:{not:kt(function(F){var H=[],V=[],ne=g(F.replace(Nt,"$1"));return ne[x]?kt(function(j,ie,oe,Se){for(var _e,Oe=ne(j,null,Se,[]),Le=j.length;Le--;)(_e=Oe[Le])&&(j[Le]=!(ie[Le]=_e))}):function(j,ie,oe){return H[0]=j,ne(H,null,oe,V),H[0]=null,!V.pop()}}),has:kt(function(F){return function(H){return tt(F,H).length>0}}),contains:kt(function(F){return F=F.replace(pt,dt),function(H){return(H.textContent||p(H)).indexOf(F)>-1}}),lang:kt(function(F){return Ze.test(F||"")||tt.error("unsupported lang: "+F),F=F.replace(pt,dt).toLowerCase(),function(H){var V;do if(V=T?H.lang:H.getAttribute("xml:lang")||H.getAttribute("lang"))return V=V.toLowerCase(),V===F||V.indexOf(F+"-")===0;while((H=H.parentNode)&&H.nodeType===1);return!1}}),target:function(F){var H=n.location&&n.location.hash;return H&&H.slice(1)===F.id},root:function(F){return F===E},focus:function(F){return F===v.activeElement&&(!v.hasFocus||v.hasFocus())&&!!(F.type||F.href||~F.tabIndex)},enabled:me(!1),disabled:me(!0),checked:function(F){var H=F.nodeName.toLowerCase();return H==="input"&&!!F.checked||H==="option"&&!!F.selected},selected:function(F){return F.parentNode&&F.parentNode.selectedIndex,F.selected===!0},empty:function(F){for(F=F.firstChild;F;F=F.nextSibling)if(F.nodeType<6)return!1;return!0},parent:function(F){return!c.pseudos.empty(F)},header:function(F){return Pt.test(F.nodeName)},input:function(F){return Mr.test(F.nodeName)},button:function(F){var H=F.nodeName.toLowerCase();return H==="input"&&F.type==="button"||H==="button"},text:function(F){var H;return F.nodeName.toLowerCase()==="input"&&F.type==="text"&&((H=F.getAttribute("type"))==null||H.toLowerCase()==="text")},first:ce(function(){return[0]}),last:ce(function(F,H){return[H-1]}),eq:ce(function(F,H,V){return[V<0?V+H:V]}),even:ce(function(F,H){for(var V=0;VH?H:V;--ne>=0;)F.push(ne);return F}),gt:ce(function(F,H,V){for(var ne=V<0?V+H:V;++ne1?function(H,V,ne){for(var j=F.length;j--;)if(!F[j](H,V,ne))return!1;return!0}:F[0]}function Be(F,H,V){for(var ne=0,j=H.length;ne-1&&(oe[Le]=!(Se[Le]=je))}}else le=Ge(le===Se?le.splice(_t,le.length):le),j?j(null,Se,le,Oe):te.apply(Se,le)})}function Tt(F){for(var H,V,ne,j=F.length,ie=c.relative[F[0].type],oe=ie||c.relative[" "],Se=ie?1:0,_e=Ce(function(ke){return ke===H},oe,!0),Oe=Ce(function(ke){return he(H,ke)>-1},oe,!0),Le=[function(ke,je,at){var Fe=!ie&&(at||je!==m)||((H=je).nodeType?_e(ke,je,at):Oe(ke,je,at));return H=null,Fe}];Se1&&xe(Le),Se>1&&Me(F.slice(0,Se-1).concat({value:F[Se-2].type===" "?"*":""})).replace(Nt,"$1"),V,Se0,ne=F.length>0,j=function(ie,oe,Se,_e,Oe){var Le,ke,je,at=0,Fe="0",_t=ie&&[],Dt=[],ve=m,le=ie||ne&&c.find.TAG("*",Oe),Ae=R+=ve==null?1:Math.random()||.1,be=le.length;for(Oe&&(m=oe==v||oe||Oe);Fe!==be&&(Le=le[Fe])!=null;Fe++){if(ne&&Le){for(ke=0,!oe&&Le.ownerDocument!=v&&(S(Le),Se=!T);je=F[ke++];)if(je(Le,oe||v,Se)){_e.push(Le);break}Oe&&(R=Ae)}V&&((Le=!je&&Le)&&at--,ie&&_t.push(Le))}if(at+=Fe,V&&Fe!==at){for(ke=0;je=H[ke++];)je(_t,Dt,oe,Se);if(ie){if(at>0)for(;Fe--;)_t[Fe]||Dt[Fe]||(Dt[Fe]=Y.call(_e));Dt=Ge(Dt)}te.apply(_e,Dt),Oe&&!ie&&Dt.length>0&&at+H.length>1&&tt.uniqueSort(_e)}return Oe&&(R=Ae,m=ve),_t};return V?kt(j):j}g=tt.compile=function(F,H){var V,ne=[],j=[],ie=k[F+" "];if(!ie){for(H||(H=u(F)),V=H.length;V--;)ie=Tt(H[V]),ie[x]?ne.push(ie):j.push(ie);ie=k(F,Ve(j,ne)),ie.selector=F}return ie},i=tt.select=function(F,H,V,ne){var j,ie,oe,Se,_e,Oe=typeof F=="function"&&F,Le=!ne&&u(F=Oe.selector||F);if(V=V||[],Le.length===1){if(ie=Le[0]=Le[0].slice(0),ie.length>2&&(oe=ie[0]).type==="ID"&&H.nodeType===9&&T&&c.relative[ie[1].type]){if(H=(c.find.ID(oe.matches[0].replace(pt,dt),H)||[])[0],H)Oe&&(H=H.parentNode);else return V;F=F.slice(ie.shift().value.length)}for(j=et.needsContext.test(F)?0:ie.length;j--&&(oe=ie[j],!c.relative[Se=oe.type]);)if((_e=c.find[Se])&&(ne=_e(oe.matches[0].replace(pt,dt),Ft.test(ie[0].type)&&Ee(H.parentNode)||H))){if(ie.splice(j,1),F=ne.length&&Me(ie),!F)return te.apply(V,ne),V;break}}return(Oe||g(F,Le))(ne,H,!T,V,!H||Ft.test(F)&&Ee(H.parentNode)||H),V},l.sortStable=x.split("").sort(W).join("")===x,l.detectDuplicates=!!d,S(),l.sortDetached=de(function(F){return F.compareDocumentPosition(v.createElement("fieldset"))&1}),de(function(F){return F.innerHTML="",F.firstChild.getAttribute("href")==="#"})||q("type|href|height|width",function(F,H,V){if(!V)return F.getAttribute(H,H.toLowerCase()==="type"?1:2)}),(!l.attributes||!de(function(F){return F.innerHTML="",F.firstChild.setAttribute("value",""),F.firstChild.getAttribute("value")===""}))&&q("value",function(F,H,V){if(!V&&F.nodeName.toLowerCase()==="input")return F.defaultValue}),de(function(F){return F.getAttribute("disabled")==null})||q(Q,function(F,H,V){var ne;if(!V)return F[H]===!0?H.toLowerCase():(ne=F.getAttributeNode(H))&&ne.specified?ne.value:null});var yt=n.Sizzle;tt.noConflict=function(){return n.Sizzle===tt&&(n.Sizzle=yt),tt},h=function(){return tt}.call(y,o,y,w),h!==void 0&&(w.exports=h)})(window)},5547:(w,y,o)=>{var h,n;h=[o(264),o(5422),o(4995),o(3153),o(2954),o(6880),o(4330),o(7116),o(5535),o(1188),o(1210),o(8433)],n=function(r,l,c,p,s,u,g){"use strict";var i=/%20/g,m=/#.*$/,f=/([?&])_=[^&]*/,d=/^(.*?):[ \t]*([^\r\n]*)$/mg,S=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,v=/^(?:GET|HEAD)$/,E=/^\/\//,T={},P={},D="*/".concat("*"),_=l.createElement("a");_.href=s.href;function b(O){return function($,k){typeof $!="string"&&(k=$,$="*");var M,W=0,G=$.toLowerCase().match(p)||[];if(c(k))for(;M=G[W++];)M[0]==="+"?(M=M.slice(1)||"*",(O[M]=O[M]||[]).unshift(k)):(O[M]=O[M]||[]).push(k)}}function x(O,$,k,M){var W={},G=O===P;function U(Y){var z;return W[Y]=!0,r.each(O[Y]||[],function(te,ae){var he=ae($,k,M);if(typeof he=="string"&&!G&&!W[he])return $.dataTypes.unshift(he),U(he),!1;if(G)return!(z=he)}),z}return U($.dataTypes[0])||!W["*"]&&U("*")}function I(O,$){var k,M,W=r.ajaxSettings.flatOptions||{};for(k in $)$[k]!==void 0&&((W[k]?O:M||(M={}))[k]=$[k]);return M&&r.extend(!0,O,M),O}function R(O,$,k){for(var M,W,G,U,Y=O.contents,z=O.dataTypes;z[0]==="*";)z.shift(),M===void 0&&(M=O.mimeType||$.getResponseHeader("Content-Type"));if(M){for(W in Y)if(Y[W]&&Y[W].test(M)){z.unshift(W);break}}if(z[0]in k)G=z[0];else{for(W in k){if(!z[0]||O.converters[W+" "+z[0]]){G=W;break}U||(U=W)}G=G||U}if(G)return G!==z[0]&&z.unshift(G),k[G]}function C(O,$,k,M){var W,G,U,Y,z,te={},ae=O.dataTypes.slice();if(ae[1])for(U in O.converters)te[U.toLowerCase()]=O.converters[U];for(G=ae.shift();G;)if(O.responseFields[G]&&(k[O.responseFields[G]]=$),!z&&M&&O.dataFilter&&($=O.dataFilter($,O.dataType)),z=G,G=ae.shift(),G){if(G==="*")G=z;else if(z!=="*"&&z!==G){if(U=te[z+" "+G]||te["* "+G],!U){for(W in te)if(Y=W.split(" "),Y[1]===G&&(U=te[z+" "+Y[0]]||te["* "+Y[0]],U)){U===!0?U=te[W]:te[W]!==!0&&(G=Y[0],ae.unshift(Y[1]));break}}if(U!==!0)if(U&&O.throws)$=U($);else try{$=U($)}catch(he){return{state:"parsererror",error:U?he:"No conversion from "+z+" to "+G}}}}return{state:"success",data:$}}return r.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:s.href,type:"GET",isLocal:S.test(s.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":D,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":r.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(O,$){return $?I(I(O,r.ajaxSettings),$):I(r.ajaxSettings,O)},ajaxPrefilter:b(T),ajaxTransport:b(P),ajax:function(O,$){typeof O=="object"&&($=O,O=void 0),$=$||{};var k,M,W,G,U,Y,z,te,ae,he,Q=r.ajaxSetup({},$),ye=Q.context||Q,Pe=Q.context&&(ye.nodeType||ye.jquery)?r(ye):r.event,ze=r.Deferred(),mt=r.Callbacks("once memory"),It=Q.statusCode||{},Nt={},Rt={},Gt="canceled",Ke={readyState:0,getResponseHeader:function(Ze){var et;if(z){if(!G)for(G={};et=d.exec(W);)G[et[1].toLowerCase()+" "]=(G[et[1].toLowerCase()+" "]||[]).concat(et[2]);et=G[Ze.toLowerCase()+" "]}return et==null?null:et.join(", ")},getAllResponseHeaders:function(){return z?W:null},setRequestHeader:function(Ze,et){return z==null&&(Ze=Rt[Ze.toLowerCase()]=Rt[Ze.toLowerCase()]||Ze,Nt[Ze]=et),this},overrideMimeType:function(Ze){return z==null&&(Q.mimeType=Ze),this},statusCode:function(Ze){var et;if(Ze)if(z)Ke.always(Ze[Ke.status]);else for(et in Ze)It[et]=[It[et],Ze[et]];return this},abort:function(Ze){var et=Ze||Gt;return k&&k.abort(et),Bt(0,et),this}};if(ze.promise(Ke),Q.url=((O||Q.url||s.href)+"").replace(E,s.protocol+"//"),Q.type=$.method||$.type||Q.method||Q.type,Q.dataTypes=(Q.dataType||"*").toLowerCase().match(p)||[""],Q.crossDomain==null){Y=l.createElement("a");try{Y.href=Q.url,Y.href=Y.href,Q.crossDomain=_.protocol+"//"+_.host!=Y.protocol+"//"+Y.host}catch(Ze){Q.crossDomain=!0}}if(Q.data&&Q.processData&&typeof Q.data!="string"&&(Q.data=r.param(Q.data,Q.traditional)),x(T,Q,$,Ke),z)return Ke;te=r.event&&Q.global,te&&r.active++===0&&r.event.trigger("ajaxStart"),Q.type=Q.type.toUpperCase(),Q.hasContent=!v.test(Q.type),M=Q.url.replace(m,""),Q.hasContent?Q.data&&Q.processData&&(Q.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&(Q.data=Q.data.replace(i,"+")):(he=Q.url.slice(M.length),Q.data&&(Q.processData||typeof Q.data=="string")&&(M+=(g.test(M)?"&":"?")+Q.data,delete Q.data),Q.cache===!1&&(M=M.replace(f,"$1"),he=(g.test(M)?"&":"?")+"_="+u.guid+++he),Q.url=M+he),Q.ifModified&&(r.lastModified[M]&&Ke.setRequestHeader("If-Modified-Since",r.lastModified[M]),r.etag[M]&&Ke.setRequestHeader("If-None-Match",r.etag[M])),(Q.data&&Q.hasContent&&Q.contentType!==!1||$.contentType)&&Ke.setRequestHeader("Content-Type",Q.contentType),Ke.setRequestHeader("Accept",Q.dataTypes[0]&&Q.accepts[Q.dataTypes[0]]?Q.accepts[Q.dataTypes[0]]+(Q.dataTypes[0]!=="*"?", "+D+"; q=0.01":""):Q.accepts["*"]);for(ae in Q.headers)Ke.setRequestHeader(ae,Q.headers[ae]);if(Q.beforeSend&&(Q.beforeSend.call(ye,Ke,Q)===!1||z))return Ke.abort();if(Gt="abort",mt.add(Q.complete),Ke.done(Q.success),Ke.fail(Q.error),k=x(P,Q,$,Ke),!k)Bt(-1,"No Transport");else{if(Ke.readyState=1,te&&Pe.trigger("ajaxSend",[Ke,Q]),z)return Ke;Q.async&&Q.timeout>0&&(U=window.setTimeout(function(){Ke.abort("timeout")},Q.timeout));try{z=!1,k.send(Nt,Bt)}catch(Ze){if(z)throw Ze;Bt(-1,Ze)}}function Bt(Ze,et,zt,Mr){var Pt,Yt,mr,Ft,pt,dt=et;z||(z=!0,U&&window.clearTimeout(U),k=void 0,W=Mr||"",Ke.readyState=Ze>0?4:0,Pt=Ze>=200&&Ze<300||Ze===304,zt&&(Ft=R(Q,Ke,zt)),!Pt&&r.inArray("script",Q.dataTypes)>-1&&r.inArray("json",Q.dataTypes)<0&&(Q.converters["text script"]=function(){}),Ft=C(Q,Ft,Ke,Pt),Pt?(Q.ifModified&&(pt=Ke.getResponseHeader("Last-Modified"),pt&&(r.lastModified[M]=pt),pt=Ke.getResponseHeader("etag"),pt&&(r.etag[M]=pt)),Ze===204||Q.type==="HEAD"?dt="nocontent":Ze===304?dt="notmodified":(dt=Ft.state,Yt=Ft.data,mr=Ft.error,Pt=!mr)):(mr=dt,(Ze||!dt)&&(dt="error",Ze<0&&(Ze=0))),Ke.status=Ze,Ke.statusText=(et||dt)+"",Pt?ze.resolveWith(ye,[Yt,dt,Ke]):ze.rejectWith(ye,[Ke,dt,mr]),Ke.statusCode(It),It=void 0,te&&Pe.trigger(Pt?"ajaxSuccess":"ajaxError",[Ke,Q,Pt?Yt:mr]),mt.fireWith(ye,[Ke,dt]),te&&(Pe.trigger("ajaxComplete",[Ke,Q]),--r.active||r.event.trigger("ajaxStop")))}return Ke},getJSON:function(O,$,k){return r.get(O,$,k,"json")},getScript:function(O,$){return r.get(O,void 0,$,"script")}}),r.each(["get","post"],function(O,$){r[$]=function(k,M,W,G){return c(M)&&(G=G||W,W=M,M=void 0),r.ajax(r.extend({url:k,type:$,dataType:G,data:M,success:W},r.isPlainObject(k)&&k))}}),r.ajaxPrefilter(function(O){var $;for($ in O.headers)$.toLowerCase()==="content-type"&&(O.contentType=O.headers[$]||"")}),r}.apply(y,h),n!==void 0&&(w.exports=n)},3004:(w,y,o)=>{var h,n;h=[o(264),o(4995),o(6880),o(4330),o(5547)],n=function(r,l,c,p){"use strict";var s=[],u=/(=)\?(?=&|$)|\?\?/;r.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var g=s.pop()||r.expando+"_"+c.guid++;return this[g]=!0,g}}),r.ajaxPrefilter("json jsonp",function(g,i,m){var f,d,S,v=g.jsonp!==!1&&(u.test(g.url)?"url":typeof g.data=="string"&&(g.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&u.test(g.data)&&"data");if(v||g.dataTypes[0]==="jsonp")return f=g.jsonpCallback=l(g.jsonpCallback)?g.jsonpCallback():g.jsonpCallback,v?g[v]=g[v].replace(u,"$1"+f):g.jsonp!==!1&&(g.url+=(p.test(g.url)?"&":"?")+g.jsonp+"="+f),g.converters["script json"]=function(){return S||r.error(f+" was not called"),S[0]},g.dataTypes[0]="json",d=window[f],window[f]=function(){S=arguments},m.always(function(){d===void 0?r(window).removeProp(f):window[f]=d,g[f]&&(g.jsonpCallback=i.jsonpCallback,s.push(f)),S&&l(d)&&d(S[0]),S=d=void 0}),"script"})}.apply(y,h),n!==void 0&&(w.exports=n)},2926:(w,y,o)=>{var h,n;h=[o(264),o(5242),o(4995),o(2023),o(5547),o(3599),o(9921),o(5704)],n=function(r,l,c){"use strict";r.fn.load=function(p,s,u){var g,i,m,f=this,d=p.indexOf(" ");return d>-1&&(g=l(p.slice(d)),p=p.slice(0,d)),c(s)?(u=s,s=void 0):s&&typeof s=="object"&&(i="POST"),f.length>0&&r.ajax({url:p,type:i||"GET",dataType:"html",data:s}).done(function(S){m=arguments,f.html(g?r("
").append(r.parseHTML(S)).find(g):S)}).always(u&&function(S,v){f.each(function(){u.apply(this,m||[S.responseText,v,S])})}),this}}.apply(y,h),n!==void 0&&(w.exports=n)},2377:(w,y,o)=>{var h,n;h=[o(264),o(5422),o(5547)],n=function(r,l){"use strict";r.ajaxPrefilter(function(c){c.crossDomain&&(c.contents.script=!1)}),r.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(c){return r.globalEval(c),c}}}),r.ajaxPrefilter("script",function(c){c.cache===void 0&&(c.cache=!1),c.crossDomain&&(c.type="GET")}),r.ajaxTransport("script",function(c){if(c.crossDomain||c.scriptAttrs){var p,s;return{send:function(u,g){p=r(" + diff --git a/public/js/build/404.d258c88e.js b/public/js/build/404.8c26c0a6.js similarity index 87% rename from public/js/build/404.d258c88e.js rename to public/js/build/404.8c26c0a6.js index 7c0720df6..a68aa3774 100644 --- a/public/js/build/404.d258c88e.js +++ b/public/js/build/404.8c26c0a6.js @@ -1 +1 @@ -import{n}from"./app.256678e2.js";var r=function(){var e=this,t=e.$createElement;return e._self._c,e._m(0)},a=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"page-404"},[s("div",{staticClass:"flex-center position-ref full-height"},[s("div",{staticClass:"code"},[e._v("404")]),s("div",{staticClass:"message"},[e._v("Not Found")])])])}];const i={},_={};var o=n(i,r,a,!1,c,"7d7154a8",null,null);function c(e){for(let t in _)this[t]=_[t]}var v=function(){return o.exports}();export{v as default}; +import{n}from"./app.73f924cf.js";var r=function(){var e=this,t=e.$createElement;return e._self._c,e._m(0)},a=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"page-404"},[s("div",{staticClass:"flex-center position-ref full-height"},[s("div",{staticClass:"code"},[e._v("404")]),s("div",{staticClass:"message"},[e._v("Not Found")])])])}];const i={},_={};var o=n(i,r,a,!1,c,"7d7154a8",null,null);function c(e){for(let t in _)this[t]=_[t]}var v=function(){return o.exports}();export{v as default}; diff --git a/public/js/build/AceEditor.74000a06.js b/public/js/build/AceEditor.5ee06b58.js similarity index 98% rename from public/js/build/AceEditor.74000a06.js rename to public/js/build/AceEditor.5ee06b58.js index ec0b7c8fc..9e4ed5f27 100644 --- a/public/js/build/AceEditor.74000a06.js +++ b/public/js/build/AceEditor.5ee06b58.js @@ -1 +1 @@ -import{m as h,n as l}from"./app.256678e2.js";const d={name:"AceEditor",props:{value:{default:""},options:{type:Object,default:()=>({})},theme:{type:String,default:"auto"},ext:{type:String,default:"txt"},height:{type:Number||null,default:null},width:{type:Number||null,default:null},wrap:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1}},render(e){return e("div",{class:"no-dark-content"})},data:()=>({code:"",editor:null,cursorPosition:{row:0,column:0},supportedModes:{Apache_Conf:["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"],BatchFile:["bat|cmd"],C_Cpp:["cpp|c|cc|cxx|h|hh|hpp|ino"],CSharp:["cs"],CSS:["css"],Dockerfile:["^Dockerfile"],golang:["go|golang"],HTML:["html|htm|xhtml|vue|we|wpy"],Java:["java"],JavaScript:["js|jsm|jsx"],JSON:["json"],JSP:["jsp"],LESS:["less"],Lua:["lua"],Makefile:["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"],Markdown:["md|markdown"],MySQL:["mysql"],Nginx:["nginx|conf"],INI:["ini|conf|cfg|prefs"],ObjectiveC:["m|mm"],Perl:["pl|pm"],Perl6:["p6|pl6|pm6"],pgSQL:["pgsql"],PHP_Laravel_blade:["blade.php"],PHP:["php|inc|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"],Powershell:["ps1"],Python:["py"],R:["r"],Ruby:["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],Rust:["rs"],SASS:["sass"],SCSS:["scss"],SH:["sh|bash|^.bashrc"],SQL:["sql"],SQLServer:["sqlserver"],Swift:["swift"],Text:["txt"],Typescript:["ts|typescript|str"],VBScript:["vbs|vb"],Verilog:["v|vh|sv|svh"],XML:["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml|plist"],YAML:["yaml|yml"],Compress:["tar|zip|7z|rar|gz|arj|z"],images:["icon|jpg|jpeg|png|bmp|gif|tif|emf"]}}),mounted(){$A.loadScriptS(["js/ace/ace.js","js/ace/mode-json.js"],()=>{this.setSize(this.$el,{height:this.height,width:this.width}),this.editor=window.ace.edit(this.$el,{wrap:this.wrap,showPrintMargin:!1,readOnly:this.readOnly,keyboardHandler:"vscode"}),this.editor.session.setMode(`ace/mode/${this.getFileMode()}`),this.$emit("mounted",this.editor),this.editor.session.$worker&&this.editor.session.$worker.addEventListener("annotate",this.workerMessage,!1),this.setValue(this.value),this.editor.setOptions(this.options),this.editTheme&&this.editor.setTheme(`ace/theme/${this.editTheme}`),this.editor.commands.addCommand({name:"\u4FDD\u5B58\u6587\u4EF6",bindKey:{win:"Ctrl-S",mac:"Command-S"},exec:()=>{this.$emit("saveData")},readOnly:!1}),this.editor.getSession().on("change",()=>{this.code=this.editor.getValue(),this.$emit("input",this.code)})})},methods:{workerMessage({data:e}){this.cursorPosition=this.editor.selection.getCursor();const[t]=e;t&&t.type==="error"?this.$emit("validationFailed",t):this.$emit("change",this.editor.getValue())},setSize(e,{width:t=this.width,height:s=this.height}){e.style.width=t&&typeof t=="number"?`${t}px`:"100%",e.style.height=s&&typeof s=="number"?`${s}px`:"100%",this.$nextTick(()=>this.editor&&this.editor.resize())},setValue(e){typeof e=="string"&&this.editor&&(this.editor.setValue(e),this.editor.clearSelection())},getFileMode(){var e=this.ext||"text";for(var t in this.supportedModes)for(var s=this.supportedModes[t],r=s[0].split("|"),a=t.toLowerCase(),i=0;i({})},theme:{type:String,default:"auto"},ext:{type:String,default:"txt"},height:{type:Number||null,default:null},width:{type:Number||null,default:null},wrap:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1}},render(e){return e("div",{class:"no-dark-content"})},data:()=>({code:"",editor:null,cursorPosition:{row:0,column:0},supportedModes:{Apache_Conf:["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"],BatchFile:["bat|cmd"],C_Cpp:["cpp|c|cc|cxx|h|hh|hpp|ino"],CSharp:["cs"],CSS:["css"],Dockerfile:["^Dockerfile"],golang:["go|golang"],HTML:["html|htm|xhtml|vue|we|wpy"],Java:["java"],JavaScript:["js|jsm|jsx"],JSON:["json"],JSP:["jsp"],LESS:["less"],Lua:["lua"],Makefile:["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"],Markdown:["md|markdown"],MySQL:["mysql"],Nginx:["nginx|conf"],INI:["ini|conf|cfg|prefs"],ObjectiveC:["m|mm"],Perl:["pl|pm"],Perl6:["p6|pl6|pm6"],pgSQL:["pgsql"],PHP_Laravel_blade:["blade.php"],PHP:["php|inc|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"],Powershell:["ps1"],Python:["py"],R:["r"],Ruby:["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],Rust:["rs"],SASS:["sass"],SCSS:["scss"],SH:["sh|bash|^.bashrc"],SQL:["sql"],SQLServer:["sqlserver"],Swift:["swift"],Text:["txt"],Typescript:["ts|typescript|str"],VBScript:["vbs|vb"],Verilog:["v|vh|sv|svh"],XML:["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml|plist"],YAML:["yaml|yml"],Compress:["tar|zip|7z|rar|gz|arj|z"],images:["icon|jpg|jpeg|png|bmp|gif|tif|emf"]}}),mounted(){$A.loadScriptS(["js/ace/ace.js","js/ace/mode-json.js"],()=>{this.setSize(this.$el,{height:this.height,width:this.width}),this.editor=window.ace.edit(this.$el,{wrap:this.wrap,showPrintMargin:!1,readOnly:this.readOnly,keyboardHandler:"vscode"}),this.editor.session.setMode(`ace/mode/${this.getFileMode()}`),this.$emit("mounted",this.editor),this.editor.session.$worker&&this.editor.session.$worker.addEventListener("annotate",this.workerMessage,!1),this.setValue(this.value),this.editor.setOptions(this.options),this.editTheme&&this.editor.setTheme(`ace/theme/${this.editTheme}`),this.editor.commands.addCommand({name:"\u4FDD\u5B58\u6587\u4EF6",bindKey:{win:"Ctrl-S",mac:"Command-S"},exec:()=>{this.$emit("saveData")},readOnly:!1}),this.editor.getSession().on("change",()=>{this.code=this.editor.getValue(),this.$emit("input",this.code)})})},methods:{workerMessage({data:e}){this.cursorPosition=this.editor.selection.getCursor();const[t]=e;t&&t.type==="error"?this.$emit("validationFailed",t):this.$emit("change",this.editor.getValue())},setSize(e,{width:t=this.width,height:s=this.height}){e.style.width=t&&typeof t=="number"?`${t}px`:"100%",e.style.height=s&&typeof s=="number"?`${s}px`:"100%",this.$nextTick(()=>this.editor&&this.editor.resize())},setValue(e){typeof e=="string"&&this.editor&&(this.editor.setValue(e),this.editor.clearSelection())},getFileMode(){var e=this.ext||"text";for(var t in this.supportedModes)for(var s=this.supportedModes[t],r=s[0].split("|"),a=t.toLowerCase(),i=0;i0?e("Loading"):t._e()],1)]),e("div",{staticClass:"management-box"},[e("div",{staticClass:"management-department"},[e("ul",[e("li",{class:["level-1",t.departmentSelect===0?"active":""],on:{click:function(a){return t.onSelectDepartment(0)}}},[e("i",{staticClass:"taskfont department-icon"},[t._v("\uE766")]),e("div",{staticClass:"department-title"},[t._v(t._s(t.$L("\u9ED8\u8BA4\u90E8\u95E8")))]),e("EDropdown",{attrs:{size:"medium",trigger:"click"},on:{command:t.onOpDepartment}},[e("i",{staticClass:"taskfont department-menu",on:{click:function(a){a.stopPropagation()}}},[t._v("\uE6E9")]),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e("EDropdownItem",{attrs:{command:"add_0"}},[e("div",[t._v(t._s(t.$L("\u6DFB\u52A0\u5B50\u90E8\u95E8")))])])],1)],1)],1),t._l(t.departmentList,function(a){return e("li",{key:a.id,class:[`level-${a.level}`,t.departmentSelect===a.id?"active":""],on:{click:function(i){return t.onSelectDepartment(a.id)}}},[e("UserAvatar",{staticClass:"department-icon",attrs:{userid:a.owner_userid,size:20}},[e("p",[e("strong",[t._v(t._s(t.$L("\u90E8\u95E8\u8D1F\u8D23\u4EBA")))])])]),e("div",{staticClass:"department-title"},[t._v(t._s(a.name))]),e("EDropdown",{attrs:{size:"medium",trigger:"click"},on:{command:t.onOpDepartment}},[e("i",{staticClass:"taskfont department-menu",on:{click:function(i){i.stopPropagation()}}},[t._v("\uE6E9")]),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[a.level<=2?e("EDropdownItem",{attrs:{command:`add_${a.id}`}},[e("div",[t._v(t._s(t.$L("\u6DFB\u52A0\u5B50\u90E8\u95E8")))])]):t._e(),e("EDropdownItem",{attrs:{command:`edit_${a.id}`}},[e("div",[t._v(t._s(t.$L("\u7F16\u8F91")))])]),e("EDropdownItem",{attrs:{command:`del_${a.id}`}},[e("div",{staticStyle:{color:"#f00"}},[t._v(t._s(t.$L("\u5220\u9664")))])])],1)],1)],1)})],2),e("div",{staticClass:"department-buttons"},[e("Button",{attrs:{type:"primary",icon:"md-add"},on:{click:function(a){return t.onShowDepartment(null)}}},[t._v(t._s(t.$L("\u65B0\u5EFA\u90E8\u95E8")))])],1)]),e("div",{staticClass:"management-user"},[e("div",{staticClass:"search-container lr"},[e("ul",[e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u5173\u952E\u8BCD"))+" ")]),e("div",{staticClass:"search-content"},[e("Input",{attrs:{placeholder:t.$L("\u90AE\u7BB1\u3001\u6635\u79F0\u3001\u804C\u4F4D"),clearable:""},model:{value:t.keys.key,callback:function(a){t.$set(t.keys,"key",a)},expression:"keys.key"}})],1)]),e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u8EAB\u4EFD"))+" ")]),e("div",{staticClass:"search-content"},[e("Select",{attrs:{placeholder:t.$L("\u5168\u90E8")},model:{value:t.keys.identity,callback:function(a){t.$set(t.keys,"identity",a)},expression:"keys.identity"}},[e("Option",{attrs:{value:""}},[t._v(t._s(t.$L("\u5168\u90E8")))]),e("Option",{attrs:{value:"admin"}},[t._v(t._s(t.$L("\u7BA1\u7406\u5458")))]),e("Option",{attrs:{value:"noadmin"}},[t._v(t._s(t.$L("\u975E\u7BA1\u7406\u5458")))]),e("Option",{attrs:{value:"temp"}},[t._v(t._s(t.$L("\u4E34\u65F6\u5E10\u53F7")))]),e("Option",{attrs:{value:"notemp"}},[t._v(t._s(t.$L("\u975E\u4E34\u65F6\u5E10\u53F7")))])],1)],1)]),e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u5728\u804C\u72B6\u6001"))+" ")]),e("div",{staticClass:"search-content"},[e("Select",{attrs:{placeholder:t.$L("\u5728\u804C")},model:{value:t.keys.disable,callback:function(a){t.$set(t.keys,"disable",a)},expression:"keys.disable"}},[e("Option",{attrs:{value:""}},[t._v(t._s(t.$L("\u5728\u804C")))]),e("Option",{attrs:{value:"yes"}},[t._v(t._s(t.$L("\u79BB\u804C")))]),e("Option",{attrs:{value:"all"}},[t._v(t._s(t.$L("\u5168\u90E8")))])],1)],1)]),t.checkinMac?e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("MAC\u5730\u5740"))+" ")]),e("div",{staticClass:"search-content"},[e("Input",{attrs:{placeholder:t.$L("MAC\u5730\u5740"),clearable:""},model:{value:t.keys.checkin_mac,callback:function(a){t.$set(t.keys,"checkin_mac",a)},expression:"keys.checkin_mac"}})],1)]):e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u90AE\u7BB1\u8BA4\u8BC1"))+" ")]),e("div",{staticClass:"search-content"},[e("Select",{attrs:{placeholder:t.$L("\u5168\u90E8")},model:{value:t.keys.email_verity,callback:function(a){t.$set(t.keys,"email_verity",a)},expression:"keys.email_verity"}},[e("Option",{attrs:{value:""}},[t._v(t._s(t.$L("\u5168\u90E8")))]),e("Option",{attrs:{value:"yes"}},[t._v(t._s(t.$L("\u5DF2\u90AE\u7BB1\u8BA4\u8BC1")))]),e("Option",{attrs:{value:"no"}},[t._v(t._s(t.$L("\u672A\u90AE\u7BB1\u8BA4\u8BC1")))])],1)],1)]),e("li",{staticClass:"search-button"},[e("Tooltip",{attrs:{theme:"light",placement:"bottom","transfer-class-name":"search-button-clear",transfer:""}},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.onSearch}},[t._v(t._s(t.$L("\u641C\u7D22")))]),e("div",{attrs:{slot:"content"},slot:"content"},[t.keyIs?e("Button",{attrs:{type:"text"},on:{click:function(a){t.keyIs=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88\u7B5B\u9009")))]):e("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.getLists}},[t._v(t._s(t.$L("\u5237\u65B0")))])],1)],1)],1)])]),e("div",{staticClass:"table-page-box"},[e("Table",{attrs:{columns:t.columns,data:t.list,loading:t.loadIng>0,"no-data-text":t.$L(t.noText),stripe:""}}),e("Page",{attrs:{total:t.total,current:t.page,"page-size":t.pageSize,disabled:t.loadIng>0,simple:t.windowSmall,"page-size-opts":[10,20,30,50,100],"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)])]),e("Modal",{attrs:{title:t.$L(t.departmentData.id>0?"\u4FEE\u6539\u90E8\u95E8":"\u65B0\u5EFA\u90E8\u95E8"),"mask-closable":!1},model:{value:t.departmentShow,callback:function(a){t.departmentShow=a},expression:"departmentShow"}},[e("Form",{ref:"addProject",attrs:{model:t.departmentData,"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("FormItem",{attrs:{prop:"name",label:t.$L("\u90E8\u95E8\u540D\u79F0")}},[e("Input",{attrs:{type:"text",placeholder:t.$L("\u8BF7\u8F93\u5165\u90E8\u95E8\u540D\u79F0")},model:{value:t.departmentData.name,callback:function(a){t.$set(t.departmentData,"name",a)},expression:"departmentData.name"}})],1),e("FormItem",{attrs:{prop:"parent_id",label:t.$L("\u4E0A\u7EA7\u90E8\u95E8")}},[e("Select",{attrs:{disabled:t.departmentParentDisabled,placeholder:t.$L("\u8BF7\u9009\u62E9\u4E0A\u7EA7\u90E8\u95E8")},model:{value:t.departmentData.parent_id,callback:function(a){t.$set(t.departmentData,"parent_id",a)},expression:"departmentData.parent_id"}},[e("Option",{attrs:{value:0}},[t._v(t._s(t.$L("\u9ED8\u8BA4\u90E8\u95E8")))]),t._l(t.departmentList,function(a,i){return a.parent_id==0&&a.id!=t.departmentData.id?e("Option",{key:i,attrs:{value:a.id,label:a.name}},[t._v("\xA0\xA0\xA0\xA0"+t._s(a.name))]):t._e()})],2),t.departmentParentDisabled?e("div",{staticClass:"form-tip",staticStyle:{"margin-bottom":"-16px"}},[t._v(t._s(t.$L("\u542B\u6709\u5B50\u90E8\u95E8\u65E0\u6CD5\u4FEE\u6539\u4E0A\u7EA7\u90E8\u95E8")))]):t._e()],1),e("FormItem",{attrs:{prop:"owner_userid",label:t.$L("\u90E8\u95E8\u8D1F\u8D23\u4EBA")}},[e("UserInput",{attrs:{"multiple-max":1,"max-hidden-select":"",placeholder:t.$L("\u8BF7\u9009\u62E9\u90E8\u95E8\u8D1F\u8D23\u4EBA")},model:{value:t.departmentData.owner_userid,callback:function(a){t.$set(t.departmentData,"owner_userid",a)},expression:"departmentData.owner_userid"}})],1),t.departmentData.id==0?[e("Divider",{attrs:{orientation:"left"}},[t._v(t._s(t.$L("\u7FA4\u7EC4\u8BBE\u7F6E")))]),e("FormItem",{attrs:{prop:"dialog_group",label:t.$L("\u90E8\u95E8\u7FA4\u804A")}},[e("RadioGroup",{model:{value:t.departmentData.dialog_group,callback:function(a){t.$set(t.departmentData,"dialog_group",a)},expression:"departmentData.dialog_group"}},[e("Radio",{attrs:{label:"new"}},[t._v(t._s(t.$L("\u521B\u5EFA\u90E8\u95E8\u7FA4")))]),e("Radio",{attrs:{label:"use"}},[t._v(t._s(t.$L("\u4F7F\u7528\u73B0\u6709\u7FA4")))])],1)],1),t.departmentData.dialog_group==="use"?e("FormItem",{attrs:{prop:"dialog_useid",label:t.$L("\u9009\u62E9\u7FA4\u7EC4")}},[e("Select",{attrs:{filterable:"","remote-method":t.dialogRemote,placeholder:t.$L("\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22\u7FA4"),loading:t.dialogLoad},model:{value:t.departmentData.dialog_useid,callback:function(a){t.$set(t.departmentData,"dialog_useid",a)},expression:"departmentData.dialog_useid"}},t._l(t.dialogList,function(a,i){return e("Option",{key:i,attrs:{value:a.id,label:a.name}},[e("div",{staticClass:"team-department-add-dialog-group"},[e("div",{staticClass:"dialog-name"},[t._v(t._s(a.name))]),e("UserAvatar",{attrs:{userid:a.owner_id,size:20}})],1)])}),1),e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u4EC5\u652F\u6301\u9009\u62E9\u4E2A\u4EBA\u7FA4\u8F6C\u4E3A\u90E8\u95E8\u7FA4")))])],1):t._e()]:t._e()],2),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(a){t.departmentShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.departmentLoading>0},on:{click:t.onSaveDepartment}},[t._v(t._s(t.$L(t.departmentData.id>0?"\u4FDD\u5B58":"\u65B0\u5EFA")))])],1)],1),e("Modal",{attrs:{title:t.$L("\u4FEE\u6539\u7B7E\u5230MAC\u5730\u5740")},model:{value:t.checkinMacEditShow,callback:function(a){t.checkinMacEditShow=a},expression:"checkinMacEditShow"}},[e("Form",{attrs:{model:t.checkinMacEditData,"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("Alert",{staticStyle:{"margin-bottom":"18px"},attrs:{type:"error"}},[t._v(t._s(t.$L(`\u6B63\u5728\u8FDB\u884C\u5E10\u53F7\u3010ID:${t.checkinMacEditData.userid}\uFF0C${t.checkinMacEditData.nickname}\u3011MAC\u5730\u5740\u4FEE\u6539\u3002`)))]),e("Row",{staticClass:"team-department-checkin-item"},[e("Col",{attrs:{span:"12"}},[t._v(t._s(t.$L("\u8BBE\u5907MAC\u5730\u5740")))]),e("Col",{attrs:{span:"12"}},[t._v(t._s(t.$L("\u5907\u6CE8")))])],1),t._l(t.checkinMacEditData.checkin_macs,function(a,i){return e("Row",{key:i,staticClass:"team-department-checkin-item"},[e("Col",{attrs:{span:"12"}},[e("Input",{attrs:{maxlength:20,placeholder:t.$L("\u8BF7\u8F93\u5165\u8BBE\u5907MAC\u5730\u5740"),clearable:""},on:{"on-clear":function(n){return t.delCheckinDatum(i)}},model:{value:a.mac,callback:function(n){t.$set(a,"mac",n)},expression:"item.mac"}})],1),e("Col",{attrs:{span:"12"}},[e("Input",{attrs:{maxlength:100,placeholder:t.$L("\u5907\u6CE8")},model:{value:a.remark,callback:function(n){t.$set(a,"remark",n)},expression:"item.remark"}})],1)],1)}),e("Button",{attrs:{type:"default",icon:"md-add"},on:{click:t.addCheckinDatum}},[t._v(t._s(t.$L("\u6DFB\u52A0\u8BBE\u5907")))])],2),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(a){t.checkinMacEditShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.checkinMacEditLoading>0},on:{click:function(a){return t.operationUser(t.checkinMacEditData,!0)}}},[t._v(t._s(t.$L("\u786E\u5B9A\u4FEE\u6539")))])],1)],1),e("Modal",{attrs:{title:t.$L("\u4FEE\u6539\u90E8\u95E8")},model:{value:t.departmentEditShow,callback:function(a){t.departmentEditShow=a},expression:"departmentEditShow"}},[e("Form",{attrs:{model:t.departmentEditData,"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("Alert",{staticStyle:{"margin-bottom":"18px"},attrs:{type:"error"}},[t._v(t._s(t.$L(`\u6B63\u5728\u8FDB\u884C\u5E10\u53F7\u3010ID:${t.departmentEditData.userid}\uFF0C${t.departmentEditData.nickname}\u3011\u90E8\u95E8\u4FEE\u6539\u3002`)))]),e("FormItem",{attrs:{label:t.$L("\u4FEE\u6539\u90E8\u95E8")}},[e("Select",{attrs:{multiple:"","multiple-max":10,placeholder:t.$L("\u7559\u7A7A\u4E3A\u9ED8\u8BA4\u90E8\u95E8")},model:{value:t.departmentEditData.department,callback:function(a){t.$set(t.departmentEditData,"department",a)},expression:"departmentEditData.department"}},t._l(t.departmentList,function(a,i){return e("Option",{key:i,attrs:{value:a.id}},[t._v(t._s(a.name))])}),1)],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(a){t.departmentEditShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.departmentEditLoading>0},on:{click:function(a){return t.operationUser(t.departmentEditData,!0)}}},[t._v(t._s(t.$L("\u786E\u5B9A\u4FEE\u6539")))])],1)],1),e("Modal",{attrs:{title:t.$L("\u64CD\u4F5C\u79BB\u804C")},model:{value:t.disableShow,callback:function(a){t.disableShow=a},expression:"disableShow"}},[e("Form",{attrs:{model:t.disableData,"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("Alert",{staticStyle:{"margin-bottom":"18px"},attrs:{type:"error"}},[t._v(t._s(t.$L(`\u6B63\u5728\u8FDB\u884C\u5E10\u53F7\u3010ID:${t.disableData.userid}\uFF0C${t.disableData.nickname}\u3011\u79BB\u804C\u64CD\u4F5C\u3002`)))]),e("FormItem",{attrs:{label:t.$L("\u79BB\u804C\u65F6\u95F4")}},[e("DatePicker",{ref:"disableTime",staticStyle:{width:"100%"},attrs:{editable:!1,placeholder:t.$L("\u9009\u62E9\u79BB\u804C\u65F6\u95F4"),options:t.disableOptions,format:"yyyy/MM/dd HH:mm",type:"datetime"},model:{value:t.disableData.disable_time,callback:function(a){t.$set(t.disableData,"disable_time",a)},expression:"disableData.disable_time"}})],1),e("FormItem",{attrs:{label:t.$L("\u4EA4\u63A5\u4EBA")}},[e("UserInput",{attrs:{"disabled-choice":[t.disableData.userid],"multiple-max":1,"max-hidden-select":"",placeholder:t.$L("\u9009\u62E9\u4EA4\u63A5\u4EBA")},model:{value:t.disableData.transfer_userid,callback:function(a){t.$set(t.disableData,"transfer_userid",a)},expression:"disableData.transfer_userid"}}),e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L(`${t.disableData.nickname} \u8D1F\u8D23\u7684\u90E8\u95E8\u3001\u9879\u76EE\u3001\u4EFB\u52A1\u548C\u6587\u4EF6\u5C06\u79FB\u4EA4\u7ED9\u4EA4\u63A5\u4EBA\uFF1B\u540C\u65F6\u9000\u51FA\u6240\u6709\u7FA4\uFF08\u5982\u679C\u662F\u7FA4\u4E3B\u5219\u8F6C\u8BA9\u7ED9\u4EA4\u63A5\u4EBA\uFF09`)))])],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(a){t.disableShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Poptip",{staticStyle:{"margin-left":"8px"},attrs:{confirm:"",placement:"bottom","ok-text":t.$L("\u786E\u5B9A"),"cancel-text":t.$L("\u53D6\u6D88"),transfer:""},on:{"on-ok":function(a){return t.operationUser(t.disableData,!0)}}},[e("div",{attrs:{slot:"title"},slot:"title"},[e("p",[t._v(t._s(t.$L("\u6CE8\u610F\uFF1A\u79BB\u804C\u64CD\u4F5C\u4E0D\u53EF\u9006\uFF01")))])]),e("Button",{attrs:{type:"primary",loading:t.disableLoading>0}},[t._v(t._s(t.$L("\u786E\u5B9A\u79BB\u804C")))])],1)],1)],1)],1)},p=[];const m={name:"TeamManagement",components:{UserInput:l},props:{checkinMac:{type:Boolean,default:!1}},data(){return{loadIng:0,keys:{},keyIs:!1,columns:[{title:"ID",key:"userid",width:80,render:(t,{row:s,column:e})=>t("TableAction",{props:{column:e,align:"left"}},[t("div",s.userid)])},{title:this.$L("\u90AE\u7BB1"),key:"email",minWidth:160,render:(t,{row:s})=>{const e=[t("AutoTip",s.email)],{email_verity:a,identity:i,disable_at:n}=s;return a&&e.push(t("Icon",{props:{type:"md-mail"}})),i.includes("ldap")&&e.push(t("Tag",{props:{color:"orange"}},this.$L("LDAP"))),i.includes("admin")&&e.push(t("Tag",{props:{color:"warning"}},this.$L("\u7BA1\u7406\u5458"))),i.includes("temp")&&e.push(t("Tag",{props:{color:"success"}},this.$L("\u4E34\u65F6"))),i.includes("disable")&&e.push(t("Tooltip",{props:{content:this.$L("\u79BB\u804C\u65F6\u95F4")+": "+n}},[t("Tag",{props:{color:"error"}},this.$L("\u79BB\u804C"))])),t("div",{class:"team-email"},e)}},{title:this.$L("\u7535\u8BDD"),key:"tel",minWidth:80,render:(t,{row:s})=>t("QuickEdit",{props:{value:s.tel},on:{"on-update":(e,a)=>{this.operationUser({userid:s.userid,tel:e},!0).finally(a)}}},[t("AutoTip",s.tel||"-")])},{title:this.$L("\u6635\u79F0"),key:"nickname",minWidth:80,render:(t,{row:s})=>t("QuickEdit",{props:{value:s.nickname_original},on:{"on-update":(e,a)=>{this.operationUser({userid:s.userid,nickname:e},!0).finally(a)}}},[t("AutoTip",s.nickname_original||"-")])},{title:this.$L("\u804C\u4F4D/\u804C\u79F0"),key:"profession",minWidth:80,render:(t,{row:s})=>t("QuickEdit",{props:{value:s.profession},on:{"on-update":(e,a)=>{this.operationUser({userid:s.userid,profession:e},!0).finally(a)}}},[t("AutoTip",s.profession||"-")])},{title:this.$L("\u90E8\u95E8"),key:"department",minWidth:80,render:(t,{row:s})=>{let e=[];if(s.department.some(a=>{const i=this.departmentList.find(n=>n.id==a);i&&e.push(i.name)}),e.length===0)return t("div",this.$L("\u9ED8\u8BA4\u90E8\u95E8"));{const a=[];return a.push(t("span",{domProps:{title:e[0]}},e[0])),e.length>1&&(e=e.splice(1),a.push(t("ETooltip",[t("div",{slot:"content",domProps:{innerHTML:e.join("
")}}),t("div",{class:"department-tag-num"},` +${e.length}`)]))),t("div",{class:"team-table-department-warp"},a)}}},{title:this.$L("\u6700\u540E\u5728\u7EBF"),key:"line_at",width:168},{title:this.$L("\u64CD\u4F5C"),align:"center",width:100,render:(t,s)=>{const e=s.row.identity,a=[];e.includes("admin")?a.push(t("EDropdownItem",{props:{command:"clearadmin"}},[t("div",this.$L("\u53D6\u6D88\u7BA1\u7406\u5458"))])):a.push(t("EDropdownItem",{props:{command:"setadmin"}},[t("div",this.$L("\u8BBE\u4E3A\u7BA1\u7406\u5458"))])),e.includes("temp")?a.push(t("EDropdownItem",{props:{command:"cleartemp"}},[t("div",this.$L("\u53D6\u6D88\u4E34\u65F6\u8EAB\u4EFD"))])):a.push(t("EDropdownItem",{props:{command:"settemp"}},[t("div",this.$L("\u8BBE\u4E3A\u4E34\u65F6\u5E10\u53F7"))])),a.push(t("EDropdownItem",{props:{command:"email"}},[t("div",this.$L("\u4FEE\u6539\u90AE\u7BB1"))])),a.push(t("EDropdownItem",{props:{command:"password"}},[t("div",this.$L("\u4FEE\u6539\u5BC6\u7801"))])),this.checkinMac&&a.push(t("EDropdownItem",{props:{command:"checkin_mac"}},[t("div",this.$L("\u4FEE\u6539MAC"))])),a.push(t("EDropdownItem",{props:{command:"department"}},[t("div",this.$L("\u4FEE\u6539\u90E8\u95E8"))])),e.includes("disable")?a.push(t("EDropdownItem",{props:{command:"cleardisable"},style:{color:"#f90"}},[t("div",this.$L("\u6062\u590D\u5E10\u53F7\uFF08\u5DF2\u79BB\u804C\uFF09"))])):a.push(t("EDropdownItem",{props:{command:"setdisable"},style:{color:"#f90"}},[t("div",this.$L("\u64CD\u4F5C\u79BB\u804C"))])),a.push(t("EDropdownItem",{props:{command:"delete"},style:{color:"red"}},[t("div",this.$L("\u5220\u9664"))]));const i=t("EDropdown",{props:{size:"small",trigger:"click"},on:{command:n=>{this.dropUser(n,s.row)}}},[t("Button",{props:{type:"primary",size:"small"},style:{fontSize:"12px"}},this.$L("\u64CD\u4F5C")),t("EDropdownMenu",{slot:"dropdown"},[a])]);return t("TableAction",{props:{column:s.column}},[i])}}],list:[],page:1,pageSize:20,total:0,noText:"",checkinMacEditShow:!1,checkinMacEditLoading:0,checkinMacEditData:{},departmentEditShow:!1,departmentEditLoading:0,departmentEditData:{},disableShow:!1,disableLoading:0,disableData:{},disableOptions:{shortcuts:[{text:this.$L("12:00"),value(){return $A.Date($A.formatDate("Y-m-d 12:00:00"))},onClick:t=>{t.handlePickSuccess()}},{text:this.$L("17:00"),value(){return $A.Date($A.formatDate("Y-m-d 17:00:00"))},onClick:t=>{t.handlePickSuccess()}},{text:this.$L("18:00"),value(){return $A.Date($A.formatDate("Y-m-d 18:00:00"))},onClick:t=>{t.handlePickSuccess()}},{text:this.$L("19:00"),value(){return $A.Date($A.formatDate("Y-m-d 19:00:00"))},onClick:t=>{t.handlePickSuccess()}},{text:this.$L("\u73B0\u5728"),value(){return new Date},onClick:t=>{t.handlePickSuccess()}}]},departmentShow:!1,departmentLoading:0,departmentSelect:-1,departmentData:{id:0,name:"",parent_id:0,owner_userid:[],dialog_group:"new",dialog_useid:0},departmentList:[],dialogLoad:!1,dialogList:[],nullCheckinDatum:{mac:"",remark:""}}},created(){this.checkinMac&&this.columns.splice(5,0,{title:this.$L("MAC\u5730\u5740"),key:"checkin_mac",minWidth:80,render:(t,{row:s})=>{let e=$A.cloneJSON(s.checkin_macs||[]);if(e.length===0)return t("div","-");{const a=n=>n.remark?`${n.mac} (${n.remark})`:n.mac,i=[];return i.push(t("AutoTip",a(e[0]))),e.length>1&&(e=e.splice(1),i.push(t("ETooltip",[t("div",{slot:"content",domProps:{innerHTML:e.map(n=>a(n)).join("
")}}),t("div",{class:"department-tag-num"},` +${e.length}`)]))),t("div",{class:"team-table-department-warp"},i)}}})},mounted(){this.getLists(),this.getDepartmentLists()},watch:{keyIs(t){t||(this.keys={},this.setPage(1))},departmentSelect(){this.setPage(1)}},computed:{departmentParentDisabled(){return!!(this.departmentData.id>0&&this.departmentList.find(({parent_id:t})=>t==this.departmentData.id))}},methods:{onSearch(){this.page=1,this.getLists()},getLists(){this.loadIng++,this.keyIs=$A.objImplode(this.keys)!="";let t=$A.cloneJSON(this.keys);this.departmentSelect>-1&&(t=Object.assign(t,{department:this.departmentSelect})),this.$store.dispatch("call",{url:"users/lists",data:{keys:t,get_checkin_mac:this.checkinMac?1:0,page:Math.max(this.page,1),pagesize:Math.max($A.runNum(this.pageSize),10)}}).then(({data:s})=>{this.page=s.current_page,this.total=s.total,this.list=s.data,this.noText="\u6CA1\u6709\u76F8\u5173\u7684\u6210\u5458"}).catch(()=>{this.noText="\u6570\u636E\u52A0\u8F7D\u5931\u8D25"}).finally(s=>{this.loadIng--})},setPage(t){this.page=t,this.getLists()},setPageSize(t){this.page=1,this.pageSize=t,this.getLists()},dropUser(t,s){switch(t){case"settemp":$A.modalConfirm({content:`\u4F60\u786E\u5B9A\u5C06\u3010ID:${s.userid}\uFF0C${s.nickname}\u3011\u8BBE\u4E3A\u4E34\u65F6\u5E10\u53F7\u5417\uFF1F\uFF08\u6CE8\uFF1A\u4E34\u65F6\u5E10\u53F7\u9650\u5236\u8BF7\u67E5\u770B\u7CFB\u7EDF\u8BBE\u7F6E\uFF09`,loading:!0,onOk:()=>this.operationUser({userid:s.userid,type:t})});break;case"cleartemp":$A.modalConfirm({content:`\u4F60\u786E\u5B9A\u53D6\u6D88\u3010ID:${s.userid}\uFF0C${s.nickname}\u3011\u4E34\u65F6\u8EAB\u4EFD\u5417\uFF1F`,loading:!0,onOk:()=>this.operationUser({userid:s.userid,type:t})});break;case"email":$A.modalInput({title:"\u4FEE\u6539\u90AE\u7BB1",placeholder:`\u8BF7\u8F93\u5165\u65B0\u7684\u90AE\u7BB1\uFF08${s.email}\uFF09`,onOk:a=>a?this.operationUser({userid:s.userid,email:a}):"\u8BF7\u8F93\u5165\u65B0\u7684\u90AE\u7BB1\u5730\u5740"});break;case"password":$A.modalInput({title:"\u4FEE\u6539\u5BC6\u7801",placeholder:"\u8BF7\u8F93\u5165\u65B0\u7684\u5BC6\u7801",onOk:a=>a?this.operationUser({userid:s.userid,password:a}):"\u8BF7\u8F93\u5165\u65B0\u7684\u5BC6\u7801"});break;case"checkin_mac":this.checkinMacEditData={type:"checkin_macs",userid:s.userid,nickname:s.nickname,checkin_macs:s.checkin_macs},this.checkinMacEditData.checkin_macs.length===0&&this.addCheckinDatum(),this.checkinMacEditShow=!0;break;case"department":let e=[];s.department.some(a=>{const i=this.departmentList.find(n=>n.id==a);i&&e.push(i.owner_userid===s.userid?`${i.name} (${this.$L("\u8D1F\u8D23\u4EBA")})`:i.name)}),this.departmentEditData={type:"department",userid:s.userid,nickname:s.nickname,department:s.department.map(a=>parseInt(a))},this.departmentEditShow=!0;break;case"setdisable":this.disableData={type:"setdisable",userid:s.userid,nickname:s.nickname},this.disableShow=!0;break;case"cleardisable":$A.modalConfirm({content:`\u4F60\u786E\u5B9A\u6062\u590D\u5DF2\u79BB\u804C\u5E10\u53F7\u3010ID:${s.userid}\uFF0C${s.nickname}\u3011\u5417\uFF1F\uFF08\u6CE8\uFF1A\u6B64\u64CD\u4F5C\u4EC5\u6062\u590D\u5E10\u53F7\u72B6\u6001\uFF0C\u65E0\u6CD5\u6062\u590D\u64CD\u4F5C\u79BB\u804C\u65F6\u79FB\u4EA4\u7684\u6570\u636E\uFF09`,loading:!0,onOk:()=>this.operationUser({userid:s.userid,type:t})});break;case"delete":$A.modalInput({title:`\u5220\u9664\u5E10\u53F7\u3010ID:${s.userid}\uFF0C${s.nickname}\u3011`,placeholder:"\u8BF7\u8F93\u5165\u5220\u9664\u539F\u56E0",okText:"\u786E\u5B9A\u5220\u9664",onOk:a=>a?this.operationUser({userid:s.userid,type:t,delete_reason:a}):"\u5220\u9664\u539F\u56E0\u4E0D\u80FD\u4E3A\u7A7A"});break;default:this.operationUser({userid:s.userid,type:t},!0);break}},operationUser(t,s){return new Promise((e,a)=>{t.type=="checkin_macs"?this.checkinMacEditLoading++:t.type=="department"?this.departmentEditLoading++:t.type=="setdisable"?this.disableLoading++:this.loadIng++,this.$store.dispatch("call",{url:"users/operation",data:t}).then(({msg:i})=>{$A.messageSuccess(i),this.getLists(),e(),t.type=="checkin_macs"?this.checkinMacEditShow=!1:t.type=="department"?this.departmentEditShow=!1:t.type=="setdisable"&&(this.disableShow=!1)}).catch(({msg:i})=>{s===!0&&$A.modalError(i),this.getLists(),a(i)}).finally(i=>{t.type=="checkin_macs"?this.checkinMacEditLoading--:t.type=="department"?this.departmentEditLoading--:t.type=="setdisable"?this.disableLoading--:this.loadIng--})})},getDepartmentLists(){this.departmentLoading++,this.$store.dispatch("call",{url:"users/department/list"}).then(({data:t})=>{this.departmentList=[],this.generateDepartmentList(t,0,1)}).finally(t=>{this.departmentLoading--})},generateDepartmentList(t,s,e){t.some(a=>{a.parent_id==s&&(this.departmentList.push(Object.assign(a,{level:e+1})),this.generateDepartmentList(t,a.id,e+1))})},onShowDepartment(t){this.departmentData=Object.assign({id:0,name:"",parent_id:0,owner_userid:[],dialog_group:"new"},t||{}),this.departmentShow=!0},onSaveDepartment(){this.departmentLoading++,this.$store.dispatch("call",{url:"users/department/add",data:Object.assign(this.departmentData,{owner_userid:this.departmentData.owner_userid[0]})}).then(({msg:t})=>{$A.messageSuccess(t),this.getDepartmentLists(),this.getLists(),this.departmentShow=!1}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.departmentLoading--})},onSelectDepartment(t){if(this.departmentSelect===t){this.departmentSelect=-1;return}this.departmentSelect=t},onOpDepartment(t){if($A.leftExists(t,"add_"))this.onShowDepartment({parent_id:parseInt(t.substr(4))});else if($A.leftExists(t,"edit_")){const s=this.departmentList.find(({id:e})=>e===parseInt(t.substr(5)));s&&this.onShowDepartment(s)}else if($A.leftExists(t,"del_")){const s=this.departmentList.find(({id:e})=>e===parseInt(t.substr(4)));s&&$A.modalConfirm({title:this.$L("\u5220\u9664\u90E8\u95E8"),content:`
${this.$L(`\u4F60\u786E\u5B9A\u8981\u5220\u9664\u3010${s.name}\u3011\u90E8\u95E8\u5417\uFF1F`)}
${this.$L("\u6CE8\u610F\uFF1A\u6B64\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D\uFF0C\u90E8\u95E8\u4E0B\u7684\u6210\u5458\u5C06\u79FB\u81F3\u9ED8\u8BA4\u90E8\u95E8\u3002")}
`,language:!1,loading:!0,onOk:()=>new Promise((e,a)=>{this.$store.dispatch("call",{url:"users/department/del",data:{id:s.id}}).then(({msg:i})=>{s.id===this.departmentSelect&&(this.departmentSelect=-1),e(i),this.getDepartmentLists()}).catch(({msg:i})=>{a(i)})})})}},dialogRemote(t){t!==""?(this.dialogLoad=!0,this.$store.dispatch("call",{url:"dialog/group/searchuser",data:{key:t}}).then(({data:s})=>{this.dialogList=s.list}).finally(s=>{this.dialogLoad=!1})):this.dialogList=[]},addCheckinDatum(){this.checkinMacEditData.checkin_macs.push($A.cloneJSON(this.nullCheckinDatum))},delCheckinDatum(t){this.checkinMacEditData.checkin_macs.splice(t,1),this.checkinMacEditData.checkin_macs.length===0&&this.addCheckinDatum()}}},r={};var u=d(m,c,p,!1,h,null,null,null);function h(t){for(let s in r)this[s]=r[s]}var D=function(){return u.exports}(),_=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("Modal",{attrs:{title:t.$L("\u5BFC\u51FA\u7B7E\u5230\u6570\u636E"),"mask-closable":!1},model:{value:t.show,callback:function(a){t.show=a},expression:"show"}},[e("Form",{ref:"export",attrs:{model:t.formData,"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("FormItem",{attrs:{label:t.$L("\u5BFC\u51FA\u6210\u5458")}},[e("UserInput",{attrs:{"multiple-max":100,placeholder:t.$L("\u8BF7\u9009\u62E9\u6210\u5458")},model:{value:t.formData.userid,callback:function(a){t.$set(t.formData,"userid",a)},expression:"formData.userid"}}),e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u6BCF\u6B21\u6700\u591A\u9009\u62E9\u5BFC\u51FA100\u4E2A\u6210\u5458")))])],1),e("FormItem",{attrs:{label:t.$L("\u7B7E\u5230\u65E5\u671F")}},[e("DatePicker",{staticStyle:{width:"100%"},attrs:{type:"daterange",format:"yyyy/MM/dd",placeholder:t.$L("\u8BF7\u9009\u62E9\u7B7E\u5230\u65E5\u671F")},model:{value:t.formData.date,callback:function(a){t.$set(t.formData,"date",a)},expression:"formData.date"}}),e("div",{staticClass:"form-tip checkin-export-quick-select"},[e("span",[t._v(t._s(t.$L("\u5FEB\u6377\u9009\u62E9"))+":")]),e("em",{on:{click:function(a){t.formData.date=t.dateShortcuts("prev")}}},[t._v(t._s(t.$L("\u4E0A\u4E2A\u6708")))]),e("em",{on:{click:function(a){t.formData.date=t.dateShortcuts("this")}}},[t._v(t._s(t.$L("\u8FD9\u4E2A\u6708")))])])],1),e("FormItem",{attrs:{label:t.$L("\u73ED\u6B21\u65F6\u95F4")}},[e("TimePicker",{staticStyle:{width:"100%"},attrs:{type:"timerange",format:"HH:mm",placeholder:t.$L("\u8BF7\u9009\u62E9\u73ED\u6B21\u65F6\u95F4")},model:{value:t.formData.time,callback:function(a){t.$set(t.formData,"time",a)},expression:"formData.time"}}),e("div",{staticClass:"form-tip checkin-export-quick-select"},[e("span",[t._v(t._s(t.$L("\u5FEB\u6377\u9009\u62E9"))+":")]),e("em",{on:{click:function(a){t.formData.time=["8:30","18:00"]}}},[t._v("8:30-18:00")]),e("em",{on:{click:function(a){t.formData.time=["9:00","18:00"]}}},[t._v("9:00-18:00")]),e("em",{on:{click:function(a){t.formData.time=["9:30","18:00"]}}},[t._v("9:30-18:30")])])],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(a){t.show=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.loadIng>0},on:{click:t.onExport}},[t._v(t._s(t.$L("\u5BFC\u51FA")))])],1)],1)},f=[];const v={name:"CheckinExport",components:{UserInput:l},props:{value:{type:Boolean,default:!1}},data(){return{show:this.value,loadIng:0,formData:{userid:[],date:[],time:[]}}},watch:{value(t){this.show=t},show(t){this.value!==t&&this.$emit("input",t)}},methods:{dateShortcuts(t){if(t==="prev")return[$A.getSpecifyDate("\u4E0A\u4E2A\u6708"),$A.getSpecifyDate("\u4E0A\u4E2A\u6708\u7ED3\u675F")];if(t==="this")return[$A.getSpecifyDate("\u672C\u6708"),$A.getSpecifyDate("\u672C\u6708\u7ED3\u675F")]},onExport(){this.loadIng>0||(this.loadIng++,this.$store.dispatch("call",{url:"system/checkin/export",data:this.formData}).then(({data:t})=>{this.show=!1,this.$store.dispatch("downUrl",{url:t.url})}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.loadIng--}))}}},o={};var $=d(v,_,f,!1,k,null,null,null);function k(t){for(let s in o)this[s]=o[s]}var b=function(){return $.exports}();export{b as C,D as T}; +import{U as l}from"./UserInput.38753002.js";import{n as d}from"./app.73f924cf.js";var c=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"team-management"},[e("div",{staticClass:"management-title"},[t._v(" "+t._s(t.$L("\u56E2\u961F\u7BA1\u7406"))+" "),e("div",{staticClass:"title-icon"},[t.loadIng>0?e("Loading"):t._e()],1)]),e("div",{staticClass:"management-box"},[e("div",{staticClass:"management-department"},[e("ul",[e("li",{class:["level-1",t.departmentSelect===0?"active":""],on:{click:function(a){return t.onSelectDepartment(0)}}},[e("i",{staticClass:"taskfont department-icon"},[t._v("\uE766")]),e("div",{staticClass:"department-title"},[t._v(t._s(t.$L("\u9ED8\u8BA4\u90E8\u95E8")))]),e("EDropdown",{attrs:{size:"medium",trigger:"click"},on:{command:t.onOpDepartment}},[e("i",{staticClass:"taskfont department-menu",on:{click:function(a){a.stopPropagation()}}},[t._v("\uE6E9")]),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e("EDropdownItem",{attrs:{command:"add_0"}},[e("div",[t._v(t._s(t.$L("\u6DFB\u52A0\u5B50\u90E8\u95E8")))])])],1)],1)],1),t._l(t.departmentList,function(a){return e("li",{key:a.id,class:[`level-${a.level}`,t.departmentSelect===a.id?"active":""],on:{click:function(i){return t.onSelectDepartment(a.id)}}},[e("UserAvatar",{staticClass:"department-icon",attrs:{userid:a.owner_userid,size:20}},[e("p",[e("strong",[t._v(t._s(t.$L("\u90E8\u95E8\u8D1F\u8D23\u4EBA")))])])]),e("div",{staticClass:"department-title"},[t._v(t._s(a.name))]),e("EDropdown",{attrs:{size:"medium",trigger:"click"},on:{command:t.onOpDepartment}},[e("i",{staticClass:"taskfont department-menu",on:{click:function(i){i.stopPropagation()}}},[t._v("\uE6E9")]),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[a.level<=2?e("EDropdownItem",{attrs:{command:`add_${a.id}`}},[e("div",[t._v(t._s(t.$L("\u6DFB\u52A0\u5B50\u90E8\u95E8")))])]):t._e(),e("EDropdownItem",{attrs:{command:`edit_${a.id}`}},[e("div",[t._v(t._s(t.$L("\u7F16\u8F91")))])]),e("EDropdownItem",{attrs:{command:`del_${a.id}`}},[e("div",{staticStyle:{color:"#f00"}},[t._v(t._s(t.$L("\u5220\u9664")))])])],1)],1)],1)})],2),e("div",{staticClass:"department-buttons"},[e("Button",{attrs:{type:"primary",icon:"md-add"},on:{click:function(a){return t.onShowDepartment(null)}}},[t._v(t._s(t.$L("\u65B0\u5EFA\u90E8\u95E8")))])],1)]),e("div",{staticClass:"management-user"},[e("div",{staticClass:"search-container lr"},[e("ul",[e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u5173\u952E\u8BCD"))+" ")]),e("div",{staticClass:"search-content"},[e("Input",{attrs:{placeholder:t.$L("\u90AE\u7BB1\u3001\u6635\u79F0\u3001\u804C\u4F4D"),clearable:""},model:{value:t.keys.key,callback:function(a){t.$set(t.keys,"key",a)},expression:"keys.key"}})],1)]),e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u8EAB\u4EFD"))+" ")]),e("div",{staticClass:"search-content"},[e("Select",{attrs:{placeholder:t.$L("\u5168\u90E8")},model:{value:t.keys.identity,callback:function(a){t.$set(t.keys,"identity",a)},expression:"keys.identity"}},[e("Option",{attrs:{value:""}},[t._v(t._s(t.$L("\u5168\u90E8")))]),e("Option",{attrs:{value:"admin"}},[t._v(t._s(t.$L("\u7BA1\u7406\u5458")))]),e("Option",{attrs:{value:"noadmin"}},[t._v(t._s(t.$L("\u975E\u7BA1\u7406\u5458")))]),e("Option",{attrs:{value:"temp"}},[t._v(t._s(t.$L("\u4E34\u65F6\u5E10\u53F7")))]),e("Option",{attrs:{value:"notemp"}},[t._v(t._s(t.$L("\u975E\u4E34\u65F6\u5E10\u53F7")))])],1)],1)]),e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u5728\u804C\u72B6\u6001"))+" ")]),e("div",{staticClass:"search-content"},[e("Select",{attrs:{placeholder:t.$L("\u5728\u804C")},model:{value:t.keys.disable,callback:function(a){t.$set(t.keys,"disable",a)},expression:"keys.disable"}},[e("Option",{attrs:{value:""}},[t._v(t._s(t.$L("\u5728\u804C")))]),e("Option",{attrs:{value:"yes"}},[t._v(t._s(t.$L("\u79BB\u804C")))]),e("Option",{attrs:{value:"all"}},[t._v(t._s(t.$L("\u5168\u90E8")))])],1)],1)]),t.checkinMac?e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("MAC\u5730\u5740"))+" ")]),e("div",{staticClass:"search-content"},[e("Input",{attrs:{placeholder:t.$L("MAC\u5730\u5740"),clearable:""},model:{value:t.keys.checkin_mac,callback:function(a){t.$set(t.keys,"checkin_mac",a)},expression:"keys.checkin_mac"}})],1)]):e("li",[e("div",{staticClass:"search-label"},[t._v(" "+t._s(t.$L("\u90AE\u7BB1\u8BA4\u8BC1"))+" ")]),e("div",{staticClass:"search-content"},[e("Select",{attrs:{placeholder:t.$L("\u5168\u90E8")},model:{value:t.keys.email_verity,callback:function(a){t.$set(t.keys,"email_verity",a)},expression:"keys.email_verity"}},[e("Option",{attrs:{value:""}},[t._v(t._s(t.$L("\u5168\u90E8")))]),e("Option",{attrs:{value:"yes"}},[t._v(t._s(t.$L("\u5DF2\u90AE\u7BB1\u8BA4\u8BC1")))]),e("Option",{attrs:{value:"no"}},[t._v(t._s(t.$L("\u672A\u90AE\u7BB1\u8BA4\u8BC1")))])],1)],1)]),e("li",{staticClass:"search-button"},[e("Tooltip",{attrs:{theme:"light",placement:"bottom","transfer-class-name":"search-button-clear",transfer:""}},[e("Button",{attrs:{loading:t.loadIng>0,type:"primary",icon:"ios-search"},on:{click:t.onSearch}},[t._v(t._s(t.$L("\u641C\u7D22")))]),e("div",{attrs:{slot:"content"},slot:"content"},[t.keyIs?e("Button",{attrs:{type:"text"},on:{click:function(a){t.keyIs=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88\u7B5B\u9009")))]):e("Button",{attrs:{loading:t.loadIng>0,type:"text"},on:{click:t.getLists}},[t._v(t._s(t.$L("\u5237\u65B0")))])],1)],1)],1)])]),e("div",{staticClass:"table-page-box"},[e("Table",{attrs:{columns:t.columns,data:t.list,loading:t.loadIng>0,"no-data-text":t.$L(t.noText),stripe:""}}),e("Page",{attrs:{total:t.total,current:t.page,"page-size":t.pageSize,disabled:t.loadIng>0,simple:t.windowSmall,"page-size-opts":[10,20,30,50,100],"show-elevator":"","show-sizer":"","show-total":""},on:{"on-change":t.setPage,"on-page-size-change":t.setPageSize}})],1)])]),e("Modal",{attrs:{title:t.$L(t.departmentData.id>0?"\u4FEE\u6539\u90E8\u95E8":"\u65B0\u5EFA\u90E8\u95E8"),"mask-closable":!1},model:{value:t.departmentShow,callback:function(a){t.departmentShow=a},expression:"departmentShow"}},[e("Form",{ref:"addProject",attrs:{model:t.departmentData,"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("FormItem",{attrs:{prop:"name",label:t.$L("\u90E8\u95E8\u540D\u79F0")}},[e("Input",{attrs:{type:"text",placeholder:t.$L("\u8BF7\u8F93\u5165\u90E8\u95E8\u540D\u79F0")},model:{value:t.departmentData.name,callback:function(a){t.$set(t.departmentData,"name",a)},expression:"departmentData.name"}})],1),e("FormItem",{attrs:{prop:"parent_id",label:t.$L("\u4E0A\u7EA7\u90E8\u95E8")}},[e("Select",{attrs:{disabled:t.departmentParentDisabled,placeholder:t.$L("\u8BF7\u9009\u62E9\u4E0A\u7EA7\u90E8\u95E8")},model:{value:t.departmentData.parent_id,callback:function(a){t.$set(t.departmentData,"parent_id",a)},expression:"departmentData.parent_id"}},[e("Option",{attrs:{value:0}},[t._v(t._s(t.$L("\u9ED8\u8BA4\u90E8\u95E8")))]),t._l(t.departmentList,function(a,i){return a.parent_id==0&&a.id!=t.departmentData.id?e("Option",{key:i,attrs:{value:a.id,label:a.name}},[t._v("\xA0\xA0\xA0\xA0"+t._s(a.name))]):t._e()})],2),t.departmentParentDisabled?e("div",{staticClass:"form-tip",staticStyle:{"margin-bottom":"-16px"}},[t._v(t._s(t.$L("\u542B\u6709\u5B50\u90E8\u95E8\u65E0\u6CD5\u4FEE\u6539\u4E0A\u7EA7\u90E8\u95E8")))]):t._e()],1),e("FormItem",{attrs:{prop:"owner_userid",label:t.$L("\u90E8\u95E8\u8D1F\u8D23\u4EBA")}},[e("UserInput",{attrs:{"multiple-max":1,"max-hidden-select":"",placeholder:t.$L("\u8BF7\u9009\u62E9\u90E8\u95E8\u8D1F\u8D23\u4EBA")},model:{value:t.departmentData.owner_userid,callback:function(a){t.$set(t.departmentData,"owner_userid",a)},expression:"departmentData.owner_userid"}})],1),t.departmentData.id==0?[e("Divider",{attrs:{orientation:"left"}},[t._v(t._s(t.$L("\u7FA4\u7EC4\u8BBE\u7F6E")))]),e("FormItem",{attrs:{prop:"dialog_group",label:t.$L("\u90E8\u95E8\u7FA4\u804A")}},[e("RadioGroup",{model:{value:t.departmentData.dialog_group,callback:function(a){t.$set(t.departmentData,"dialog_group",a)},expression:"departmentData.dialog_group"}},[e("Radio",{attrs:{label:"new"}},[t._v(t._s(t.$L("\u521B\u5EFA\u90E8\u95E8\u7FA4")))]),e("Radio",{attrs:{label:"use"}},[t._v(t._s(t.$L("\u4F7F\u7528\u73B0\u6709\u7FA4")))])],1)],1),t.departmentData.dialog_group==="use"?e("FormItem",{attrs:{prop:"dialog_useid",label:t.$L("\u9009\u62E9\u7FA4\u7EC4")}},[e("Select",{attrs:{filterable:"","remote-method":t.dialogRemote,placeholder:t.$L("\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22\u7FA4"),loading:t.dialogLoad},model:{value:t.departmentData.dialog_useid,callback:function(a){t.$set(t.departmentData,"dialog_useid",a)},expression:"departmentData.dialog_useid"}},t._l(t.dialogList,function(a,i){return e("Option",{key:i,attrs:{value:a.id,label:a.name}},[e("div",{staticClass:"team-department-add-dialog-group"},[e("div",{staticClass:"dialog-name"},[t._v(t._s(a.name))]),e("UserAvatar",{attrs:{userid:a.owner_id,size:20}})],1)])}),1),e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u4EC5\u652F\u6301\u9009\u62E9\u4E2A\u4EBA\u7FA4\u8F6C\u4E3A\u90E8\u95E8\u7FA4")))])],1):t._e()]:t._e()],2),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(a){t.departmentShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.departmentLoading>0},on:{click:t.onSaveDepartment}},[t._v(t._s(t.$L(t.departmentData.id>0?"\u4FDD\u5B58":"\u65B0\u5EFA")))])],1)],1),e("Modal",{attrs:{title:t.$L("\u4FEE\u6539\u7B7E\u5230MAC\u5730\u5740")},model:{value:t.checkinMacEditShow,callback:function(a){t.checkinMacEditShow=a},expression:"checkinMacEditShow"}},[e("Form",{attrs:{model:t.checkinMacEditData,"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("Alert",{staticStyle:{"margin-bottom":"18px"},attrs:{type:"error"}},[t._v(t._s(t.$L(`\u6B63\u5728\u8FDB\u884C\u5E10\u53F7\u3010ID:${t.checkinMacEditData.userid}\uFF0C${t.checkinMacEditData.nickname}\u3011MAC\u5730\u5740\u4FEE\u6539\u3002`)))]),e("Row",{staticClass:"team-department-checkin-item"},[e("Col",{attrs:{span:"12"}},[t._v(t._s(t.$L("\u8BBE\u5907MAC\u5730\u5740")))]),e("Col",{attrs:{span:"12"}},[t._v(t._s(t.$L("\u5907\u6CE8")))])],1),t._l(t.checkinMacEditData.checkin_macs,function(a,i){return e("Row",{key:i,staticClass:"team-department-checkin-item"},[e("Col",{attrs:{span:"12"}},[e("Input",{attrs:{maxlength:20,placeholder:t.$L("\u8BF7\u8F93\u5165\u8BBE\u5907MAC\u5730\u5740"),clearable:""},on:{"on-clear":function(n){return t.delCheckinDatum(i)}},model:{value:a.mac,callback:function(n){t.$set(a,"mac",n)},expression:"item.mac"}})],1),e("Col",{attrs:{span:"12"}},[e("Input",{attrs:{maxlength:100,placeholder:t.$L("\u5907\u6CE8")},model:{value:a.remark,callback:function(n){t.$set(a,"remark",n)},expression:"item.remark"}})],1)],1)}),e("Button",{attrs:{type:"default",icon:"md-add"},on:{click:t.addCheckinDatum}},[t._v(t._s(t.$L("\u6DFB\u52A0\u8BBE\u5907")))])],2),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(a){t.checkinMacEditShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.checkinMacEditLoading>0},on:{click:function(a){return t.operationUser(t.checkinMacEditData,!0)}}},[t._v(t._s(t.$L("\u786E\u5B9A\u4FEE\u6539")))])],1)],1),e("Modal",{attrs:{title:t.$L("\u4FEE\u6539\u90E8\u95E8")},model:{value:t.departmentEditShow,callback:function(a){t.departmentEditShow=a},expression:"departmentEditShow"}},[e("Form",{attrs:{model:t.departmentEditData,"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("Alert",{staticStyle:{"margin-bottom":"18px"},attrs:{type:"error"}},[t._v(t._s(t.$L(`\u6B63\u5728\u8FDB\u884C\u5E10\u53F7\u3010ID:${t.departmentEditData.userid}\uFF0C${t.departmentEditData.nickname}\u3011\u90E8\u95E8\u4FEE\u6539\u3002`)))]),e("FormItem",{attrs:{label:t.$L("\u4FEE\u6539\u90E8\u95E8")}},[e("Select",{attrs:{multiple:"","multiple-max":10,placeholder:t.$L("\u7559\u7A7A\u4E3A\u9ED8\u8BA4\u90E8\u95E8")},model:{value:t.departmentEditData.department,callback:function(a){t.$set(t.departmentEditData,"department",a)},expression:"departmentEditData.department"}},t._l(t.departmentList,function(a,i){return e("Option",{key:i,attrs:{value:a.id}},[t._v(t._s(a.name))])}),1)],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(a){t.departmentEditShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.departmentEditLoading>0},on:{click:function(a){return t.operationUser(t.departmentEditData,!0)}}},[t._v(t._s(t.$L("\u786E\u5B9A\u4FEE\u6539")))])],1)],1),e("Modal",{attrs:{title:t.$L("\u64CD\u4F5C\u79BB\u804C")},model:{value:t.disableShow,callback:function(a){t.disableShow=a},expression:"disableShow"}},[e("Form",{attrs:{model:t.disableData,"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("Alert",{staticStyle:{"margin-bottom":"18px"},attrs:{type:"error"}},[t._v(t._s(t.$L(`\u6B63\u5728\u8FDB\u884C\u5E10\u53F7\u3010ID:${t.disableData.userid}\uFF0C${t.disableData.nickname}\u3011\u79BB\u804C\u64CD\u4F5C\u3002`)))]),e("FormItem",{attrs:{label:t.$L("\u79BB\u804C\u65F6\u95F4")}},[e("DatePicker",{ref:"disableTime",staticStyle:{width:"100%"},attrs:{editable:!1,placeholder:t.$L("\u9009\u62E9\u79BB\u804C\u65F6\u95F4"),options:t.disableOptions,format:"yyyy/MM/dd HH:mm",type:"datetime"},model:{value:t.disableData.disable_time,callback:function(a){t.$set(t.disableData,"disable_time",a)},expression:"disableData.disable_time"}})],1),e("FormItem",{attrs:{label:t.$L("\u4EA4\u63A5\u4EBA")}},[e("UserInput",{attrs:{"disabled-choice":[t.disableData.userid],"multiple-max":1,"max-hidden-select":"",placeholder:t.$L("\u9009\u62E9\u4EA4\u63A5\u4EBA")},model:{value:t.disableData.transfer_userid,callback:function(a){t.$set(t.disableData,"transfer_userid",a)},expression:"disableData.transfer_userid"}}),e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L(`${t.disableData.nickname} \u8D1F\u8D23\u7684\u90E8\u95E8\u3001\u9879\u76EE\u3001\u4EFB\u52A1\u548C\u6587\u4EF6\u5C06\u79FB\u4EA4\u7ED9\u4EA4\u63A5\u4EBA\uFF1B\u540C\u65F6\u9000\u51FA\u6240\u6709\u7FA4\uFF08\u5982\u679C\u662F\u7FA4\u4E3B\u5219\u8F6C\u8BA9\u7ED9\u4EA4\u63A5\u4EBA\uFF09`)))])],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(a){t.disableShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Poptip",{staticStyle:{"margin-left":"8px"},attrs:{confirm:"",placement:"bottom","ok-text":t.$L("\u786E\u5B9A"),"cancel-text":t.$L("\u53D6\u6D88"),transfer:""},on:{"on-ok":function(a){return t.operationUser(t.disableData,!0)}}},[e("div",{attrs:{slot:"title"},slot:"title"},[e("p",[t._v(t._s(t.$L("\u6CE8\u610F\uFF1A\u79BB\u804C\u64CD\u4F5C\u4E0D\u53EF\u9006\uFF01")))])]),e("Button",{attrs:{type:"primary",loading:t.disableLoading>0}},[t._v(t._s(t.$L("\u786E\u5B9A\u79BB\u804C")))])],1)],1)],1)],1)},p=[];const m={name:"TeamManagement",components:{UserInput:l},props:{checkinMac:{type:Boolean,default:!1}},data(){return{loadIng:0,keys:{},keyIs:!1,columns:[{title:"ID",key:"userid",width:80,render:(t,{row:s,column:e})=>t("TableAction",{props:{column:e,align:"left"}},[t("div",s.userid)])},{title:this.$L("\u90AE\u7BB1"),key:"email",minWidth:160,render:(t,{row:s})=>{const e=[t("AutoTip",s.email)],{email_verity:a,identity:i,disable_at:n}=s;return a&&e.push(t("Icon",{props:{type:"md-mail"}})),i.includes("ldap")&&e.push(t("Tag",{props:{color:"orange"}},this.$L("LDAP"))),i.includes("admin")&&e.push(t("Tag",{props:{color:"warning"}},this.$L("\u7BA1\u7406\u5458"))),i.includes("temp")&&e.push(t("Tag",{props:{color:"success"}},this.$L("\u4E34\u65F6"))),i.includes("disable")&&e.push(t("Tooltip",{props:{content:this.$L("\u79BB\u804C\u65F6\u95F4")+": "+n}},[t("Tag",{props:{color:"error"}},this.$L("\u79BB\u804C"))])),t("div",{class:"team-email"},e)}},{title:this.$L("\u7535\u8BDD"),key:"tel",minWidth:80,render:(t,{row:s})=>t("QuickEdit",{props:{value:s.tel},on:{"on-update":(e,a)=>{this.operationUser({userid:s.userid,tel:e},!0).finally(a)}}},[t("AutoTip",s.tel||"-")])},{title:this.$L("\u6635\u79F0"),key:"nickname",minWidth:80,render:(t,{row:s})=>t("QuickEdit",{props:{value:s.nickname_original},on:{"on-update":(e,a)=>{this.operationUser({userid:s.userid,nickname:e},!0).finally(a)}}},[t("AutoTip",s.nickname_original||"-")])},{title:this.$L("\u804C\u4F4D/\u804C\u79F0"),key:"profession",minWidth:80,render:(t,{row:s})=>t("QuickEdit",{props:{value:s.profession},on:{"on-update":(e,a)=>{this.operationUser({userid:s.userid,profession:e},!0).finally(a)}}},[t("AutoTip",s.profession||"-")])},{title:this.$L("\u90E8\u95E8"),key:"department",minWidth:80,render:(t,{row:s})=>{let e=[];if(s.department.some(a=>{const i=this.departmentList.find(n=>n.id==a);i&&e.push(i.name)}),e.length===0)return t("div",this.$L("\u9ED8\u8BA4\u90E8\u95E8"));{const a=[];return a.push(t("span",{domProps:{title:e[0]}},e[0])),e.length>1&&(e=e.splice(1),a.push(t("ETooltip",[t("div",{slot:"content",domProps:{innerHTML:e.join("
")}}),t("div",{class:"department-tag-num"},` +${e.length}`)]))),t("div",{class:"team-table-department-warp"},a)}}},{title:this.$L("\u6700\u540E\u5728\u7EBF"),key:"line_at",width:168},{title:this.$L("\u64CD\u4F5C"),align:"center",width:100,render:(t,s)=>{const e=s.row.identity,a=[];e.includes("admin")?a.push(t("EDropdownItem",{props:{command:"clearadmin"}},[t("div",this.$L("\u53D6\u6D88\u7BA1\u7406\u5458"))])):a.push(t("EDropdownItem",{props:{command:"setadmin"}},[t("div",this.$L("\u8BBE\u4E3A\u7BA1\u7406\u5458"))])),e.includes("temp")?a.push(t("EDropdownItem",{props:{command:"cleartemp"}},[t("div",this.$L("\u53D6\u6D88\u4E34\u65F6\u8EAB\u4EFD"))])):a.push(t("EDropdownItem",{props:{command:"settemp"}},[t("div",this.$L("\u8BBE\u4E3A\u4E34\u65F6\u5E10\u53F7"))])),a.push(t("EDropdownItem",{props:{command:"email"}},[t("div",this.$L("\u4FEE\u6539\u90AE\u7BB1"))])),a.push(t("EDropdownItem",{props:{command:"password"}},[t("div",this.$L("\u4FEE\u6539\u5BC6\u7801"))])),this.checkinMac&&a.push(t("EDropdownItem",{props:{command:"checkin_mac"}},[t("div",this.$L("\u4FEE\u6539MAC"))])),a.push(t("EDropdownItem",{props:{command:"department"}},[t("div",this.$L("\u4FEE\u6539\u90E8\u95E8"))])),e.includes("disable")?a.push(t("EDropdownItem",{props:{command:"cleardisable"},style:{color:"#f90"}},[t("div",this.$L("\u6062\u590D\u5E10\u53F7\uFF08\u5DF2\u79BB\u804C\uFF09"))])):a.push(t("EDropdownItem",{props:{command:"setdisable"},style:{color:"#f90"}},[t("div",this.$L("\u64CD\u4F5C\u79BB\u804C"))])),a.push(t("EDropdownItem",{props:{command:"delete"},style:{color:"red"}},[t("div",this.$L("\u5220\u9664"))]));const i=t("EDropdown",{props:{size:"small",trigger:"click"},on:{command:n=>{this.dropUser(n,s.row)}}},[t("Button",{props:{type:"primary",size:"small"},style:{fontSize:"12px"}},this.$L("\u64CD\u4F5C")),t("EDropdownMenu",{slot:"dropdown"},[a])]);return t("TableAction",{props:{column:s.column}},[i])}}],list:[],page:1,pageSize:20,total:0,noText:"",checkinMacEditShow:!1,checkinMacEditLoading:0,checkinMacEditData:{},departmentEditShow:!1,departmentEditLoading:0,departmentEditData:{},disableShow:!1,disableLoading:0,disableData:{},disableOptions:{shortcuts:[{text:this.$L("12:00"),value(){return $A.Date($A.formatDate("Y-m-d 12:00:00"))},onClick:t=>{t.handlePickSuccess()}},{text:this.$L("17:00"),value(){return $A.Date($A.formatDate("Y-m-d 17:00:00"))},onClick:t=>{t.handlePickSuccess()}},{text:this.$L("18:00"),value(){return $A.Date($A.formatDate("Y-m-d 18:00:00"))},onClick:t=>{t.handlePickSuccess()}},{text:this.$L("19:00"),value(){return $A.Date($A.formatDate("Y-m-d 19:00:00"))},onClick:t=>{t.handlePickSuccess()}},{text:this.$L("\u73B0\u5728"),value(){return new Date},onClick:t=>{t.handlePickSuccess()}}]},departmentShow:!1,departmentLoading:0,departmentSelect:-1,departmentData:{id:0,name:"",parent_id:0,owner_userid:[],dialog_group:"new",dialog_useid:0},departmentList:[],dialogLoad:!1,dialogList:[],nullCheckinDatum:{mac:"",remark:""}}},created(){this.checkinMac&&this.columns.splice(5,0,{title:this.$L("MAC\u5730\u5740"),key:"checkin_mac",minWidth:80,render:(t,{row:s})=>{let e=$A.cloneJSON(s.checkin_macs||[]);if(e.length===0)return t("div","-");{const a=n=>n.remark?`${n.mac} (${n.remark})`:n.mac,i=[];return i.push(t("AutoTip",a(e[0]))),e.length>1&&(e=e.splice(1),i.push(t("ETooltip",[t("div",{slot:"content",domProps:{innerHTML:e.map(n=>a(n)).join("
")}}),t("div",{class:"department-tag-num"},` +${e.length}`)]))),t("div",{class:"team-table-department-warp"},i)}}})},mounted(){this.getLists(),this.getDepartmentLists()},watch:{keyIs(t){t||(this.keys={},this.setPage(1))},departmentSelect(){this.setPage(1)}},computed:{departmentParentDisabled(){return!!(this.departmentData.id>0&&this.departmentList.find(({parent_id:t})=>t==this.departmentData.id))}},methods:{onSearch(){this.page=1,this.getLists()},getLists(){this.loadIng++,this.keyIs=$A.objImplode(this.keys)!="";let t=$A.cloneJSON(this.keys);this.departmentSelect>-1&&(t=Object.assign(t,{department:this.departmentSelect})),this.$store.dispatch("call",{url:"users/lists",data:{keys:t,get_checkin_mac:this.checkinMac?1:0,page:Math.max(this.page,1),pagesize:Math.max($A.runNum(this.pageSize),10)}}).then(({data:s})=>{this.page=s.current_page,this.total=s.total,this.list=s.data,this.noText="\u6CA1\u6709\u76F8\u5173\u7684\u6210\u5458"}).catch(()=>{this.noText="\u6570\u636E\u52A0\u8F7D\u5931\u8D25"}).finally(s=>{this.loadIng--})},setPage(t){this.page=t,this.getLists()},setPageSize(t){this.page=1,this.pageSize=t,this.getLists()},dropUser(t,s){switch(t){case"settemp":$A.modalConfirm({content:`\u4F60\u786E\u5B9A\u5C06\u3010ID:${s.userid}\uFF0C${s.nickname}\u3011\u8BBE\u4E3A\u4E34\u65F6\u5E10\u53F7\u5417\uFF1F\uFF08\u6CE8\uFF1A\u4E34\u65F6\u5E10\u53F7\u9650\u5236\u8BF7\u67E5\u770B\u7CFB\u7EDF\u8BBE\u7F6E\uFF09`,loading:!0,onOk:()=>this.operationUser({userid:s.userid,type:t})});break;case"cleartemp":$A.modalConfirm({content:`\u4F60\u786E\u5B9A\u53D6\u6D88\u3010ID:${s.userid}\uFF0C${s.nickname}\u3011\u4E34\u65F6\u8EAB\u4EFD\u5417\uFF1F`,loading:!0,onOk:()=>this.operationUser({userid:s.userid,type:t})});break;case"email":$A.modalInput({title:"\u4FEE\u6539\u90AE\u7BB1",placeholder:`\u8BF7\u8F93\u5165\u65B0\u7684\u90AE\u7BB1\uFF08${s.email}\uFF09`,onOk:a=>a?this.operationUser({userid:s.userid,email:a}):"\u8BF7\u8F93\u5165\u65B0\u7684\u90AE\u7BB1\u5730\u5740"});break;case"password":$A.modalInput({title:"\u4FEE\u6539\u5BC6\u7801",placeholder:"\u8BF7\u8F93\u5165\u65B0\u7684\u5BC6\u7801",onOk:a=>a?this.operationUser({userid:s.userid,password:a}):"\u8BF7\u8F93\u5165\u65B0\u7684\u5BC6\u7801"});break;case"checkin_mac":this.checkinMacEditData={type:"checkin_macs",userid:s.userid,nickname:s.nickname,checkin_macs:s.checkin_macs},this.checkinMacEditData.checkin_macs.length===0&&this.addCheckinDatum(),this.checkinMacEditShow=!0;break;case"department":let e=[];s.department.some(a=>{const i=this.departmentList.find(n=>n.id==a);i&&e.push(i.owner_userid===s.userid?`${i.name} (${this.$L("\u8D1F\u8D23\u4EBA")})`:i.name)}),this.departmentEditData={type:"department",userid:s.userid,nickname:s.nickname,department:s.department.map(a=>parseInt(a))},this.departmentEditShow=!0;break;case"setdisable":this.disableData={type:"setdisable",userid:s.userid,nickname:s.nickname},this.disableShow=!0;break;case"cleardisable":$A.modalConfirm({content:`\u4F60\u786E\u5B9A\u6062\u590D\u5DF2\u79BB\u804C\u5E10\u53F7\u3010ID:${s.userid}\uFF0C${s.nickname}\u3011\u5417\uFF1F\uFF08\u6CE8\uFF1A\u6B64\u64CD\u4F5C\u4EC5\u6062\u590D\u5E10\u53F7\u72B6\u6001\uFF0C\u65E0\u6CD5\u6062\u590D\u64CD\u4F5C\u79BB\u804C\u65F6\u79FB\u4EA4\u7684\u6570\u636E\uFF09`,loading:!0,onOk:()=>this.operationUser({userid:s.userid,type:t})});break;case"delete":$A.modalInput({title:`\u5220\u9664\u5E10\u53F7\u3010ID:${s.userid}\uFF0C${s.nickname}\u3011`,placeholder:"\u8BF7\u8F93\u5165\u5220\u9664\u539F\u56E0",okText:"\u786E\u5B9A\u5220\u9664",onOk:a=>a?this.operationUser({userid:s.userid,type:t,delete_reason:a}):"\u5220\u9664\u539F\u56E0\u4E0D\u80FD\u4E3A\u7A7A"});break;default:this.operationUser({userid:s.userid,type:t},!0);break}},operationUser(t,s){return new Promise((e,a)=>{t.type=="checkin_macs"?this.checkinMacEditLoading++:t.type=="department"?this.departmentEditLoading++:t.type=="setdisable"?this.disableLoading++:this.loadIng++,this.$store.dispatch("call",{url:"users/operation",data:t}).then(({msg:i})=>{$A.messageSuccess(i),this.getLists(),e(),t.type=="checkin_macs"?this.checkinMacEditShow=!1:t.type=="department"?this.departmentEditShow=!1:t.type=="setdisable"&&(this.disableShow=!1)}).catch(({msg:i})=>{s===!0&&$A.modalError(i),this.getLists(),a(i)}).finally(i=>{t.type=="checkin_macs"?this.checkinMacEditLoading--:t.type=="department"?this.departmentEditLoading--:t.type=="setdisable"?this.disableLoading--:this.loadIng--})})},getDepartmentLists(){this.departmentLoading++,this.$store.dispatch("call",{url:"users/department/list"}).then(({data:t})=>{this.departmentList=[],this.generateDepartmentList(t,0,1)}).finally(t=>{this.departmentLoading--})},generateDepartmentList(t,s,e){t.some(a=>{a.parent_id==s&&(this.departmentList.push(Object.assign(a,{level:e+1})),this.generateDepartmentList(t,a.id,e+1))})},onShowDepartment(t){this.departmentData=Object.assign({id:0,name:"",parent_id:0,owner_userid:[],dialog_group:"new"},t||{}),this.departmentShow=!0},onSaveDepartment(){this.departmentLoading++,this.$store.dispatch("call",{url:"users/department/add",data:Object.assign(this.departmentData,{owner_userid:this.departmentData.owner_userid[0]})}).then(({msg:t})=>{$A.messageSuccess(t),this.getDepartmentLists(),this.getLists(),this.departmentShow=!1}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.departmentLoading--})},onSelectDepartment(t){if(this.departmentSelect===t){this.departmentSelect=-1;return}this.departmentSelect=t},onOpDepartment(t){if($A.leftExists(t,"add_"))this.onShowDepartment({parent_id:parseInt(t.substr(4))});else if($A.leftExists(t,"edit_")){const s=this.departmentList.find(({id:e})=>e===parseInt(t.substr(5)));s&&this.onShowDepartment(s)}else if($A.leftExists(t,"del_")){const s=this.departmentList.find(({id:e})=>e===parseInt(t.substr(4)));s&&$A.modalConfirm({title:this.$L("\u5220\u9664\u90E8\u95E8"),content:`
${this.$L(`\u4F60\u786E\u5B9A\u8981\u5220\u9664\u3010${s.name}\u3011\u90E8\u95E8\u5417\uFF1F`)}
${this.$L("\u6CE8\u610F\uFF1A\u6B64\u64CD\u4F5C\u4E0D\u53EF\u6062\u590D\uFF0C\u90E8\u95E8\u4E0B\u7684\u6210\u5458\u5C06\u79FB\u81F3\u9ED8\u8BA4\u90E8\u95E8\u3002")}
`,language:!1,loading:!0,onOk:()=>new Promise((e,a)=>{this.$store.dispatch("call",{url:"users/department/del",data:{id:s.id}}).then(({msg:i})=>{s.id===this.departmentSelect&&(this.departmentSelect=-1),e(i),this.getDepartmentLists()}).catch(({msg:i})=>{a(i)})})})}},dialogRemote(t){t!==""?(this.dialogLoad=!0,this.$store.dispatch("call",{url:"dialog/group/searchuser",data:{key:t}}).then(({data:s})=>{this.dialogList=s.list}).finally(s=>{this.dialogLoad=!1})):this.dialogList=[]},addCheckinDatum(){this.checkinMacEditData.checkin_macs.push($A.cloneJSON(this.nullCheckinDatum))},delCheckinDatum(t){this.checkinMacEditData.checkin_macs.splice(t,1),this.checkinMacEditData.checkin_macs.length===0&&this.addCheckinDatum()}}},r={};var u=d(m,c,p,!1,h,null,null,null);function h(t){for(let s in r)this[s]=r[s]}var D=function(){return u.exports}(),_=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("Modal",{attrs:{title:t.$L("\u5BFC\u51FA\u7B7E\u5230\u6570\u636E"),"mask-closable":!1},model:{value:t.show,callback:function(a){t.show=a},expression:"show"}},[e("Form",{ref:"export",attrs:{model:t.formData,"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("FormItem",{attrs:{label:t.$L("\u5BFC\u51FA\u6210\u5458")}},[e("UserInput",{attrs:{"multiple-max":100,placeholder:t.$L("\u8BF7\u9009\u62E9\u6210\u5458")},model:{value:t.formData.userid,callback:function(a){t.$set(t.formData,"userid",a)},expression:"formData.userid"}}),e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u6BCF\u6B21\u6700\u591A\u9009\u62E9\u5BFC\u51FA100\u4E2A\u6210\u5458")))])],1),e("FormItem",{attrs:{label:t.$L("\u7B7E\u5230\u65E5\u671F")}},[e("DatePicker",{staticStyle:{width:"100%"},attrs:{type:"daterange",format:"yyyy/MM/dd",placeholder:t.$L("\u8BF7\u9009\u62E9\u7B7E\u5230\u65E5\u671F")},model:{value:t.formData.date,callback:function(a){t.$set(t.formData,"date",a)},expression:"formData.date"}}),e("div",{staticClass:"form-tip checkin-export-quick-select"},[e("span",[t._v(t._s(t.$L("\u5FEB\u6377\u9009\u62E9"))+":")]),e("em",{on:{click:function(a){t.formData.date=t.dateShortcuts("prev")}}},[t._v(t._s(t.$L("\u4E0A\u4E2A\u6708")))]),e("em",{on:{click:function(a){t.formData.date=t.dateShortcuts("this")}}},[t._v(t._s(t.$L("\u8FD9\u4E2A\u6708")))])])],1),e("FormItem",{attrs:{label:t.$L("\u73ED\u6B21\u65F6\u95F4")}},[e("TimePicker",{staticStyle:{width:"100%"},attrs:{type:"timerange",format:"HH:mm",placeholder:t.$L("\u8BF7\u9009\u62E9\u73ED\u6B21\u65F6\u95F4")},model:{value:t.formData.time,callback:function(a){t.$set(t.formData,"time",a)},expression:"formData.time"}}),e("div",{staticClass:"form-tip checkin-export-quick-select"},[e("span",[t._v(t._s(t.$L("\u5FEB\u6377\u9009\u62E9"))+":")]),e("em",{on:{click:function(a){t.formData.time=["8:30","18:00"]}}},[t._v("8:30-18:00")]),e("em",{on:{click:function(a){t.formData.time=["9:00","18:00"]}}},[t._v("9:00-18:00")]),e("em",{on:{click:function(a){t.formData.time=["9:30","18:00"]}}},[t._v("9:30-18:30")])])],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(a){t.show=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.loadIng>0},on:{click:t.onExport}},[t._v(t._s(t.$L("\u5BFC\u51FA")))])],1)],1)},f=[];const v={name:"CheckinExport",components:{UserInput:l},props:{value:{type:Boolean,default:!1}},data(){return{show:this.value,loadIng:0,formData:{userid:[],date:[],time:[]}}},watch:{value(t){this.show=t},show(t){this.value!==t&&this.$emit("input",t)}},methods:{dateShortcuts(t){if(t==="prev")return[$A.getSpecifyDate("\u4E0A\u4E2A\u6708"),$A.getSpecifyDate("\u4E0A\u4E2A\u6708\u7ED3\u675F")];if(t==="this")return[$A.getSpecifyDate("\u672C\u6708"),$A.getSpecifyDate("\u672C\u6708\u7ED3\u675F")]},onExport(){this.loadIng>0||(this.loadIng++,this.$store.dispatch("call",{url:"system/checkin/export",data:this.formData}).then(({data:t})=>{this.show=!1,this.$store.dispatch("downUrl",{url:t.url})}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.loadIng--}))}}},o={};var $=d(v,_,f,!1,k,null,null,null);function k(t){for(let s in o)this[s]=o[s]}var b=function(){return $.exports}();export{b as C,D as T}; diff --git a/public/js/build/DialogSelect.e694d9c4.js b/public/js/build/DialogSelect.d3075666.js similarity index 96% rename from public/js/build/DialogSelect.e694d9c4.js rename to public/js/build/DialogSelect.d3075666.js index f0c0e2fe2..3239d02d1 100644 --- a/public/js/build/DialogSelect.e694d9c4.js +++ b/public/js/build/DialogSelect.d3075666.js @@ -1 +1 @@ -import{U as i}from"./UserInput.6e7e4596.js";import{m as c,n as u}from"./app.256678e2.js";const l="ontouchend"in document,h={bind:function(t,s){let a=500,e=s.value;if($A.isJson(s.value)&&(a=s.value.delay||500,e=s.value.callback),typeof e!="function")throw"callback must be a function";if(!l){t.__longpressContextmenu__=r=>{r.preventDefault(),r.stopPropagation(),e(r,t)},t.addEventListener("contextmenu",t.__longpressContextmenu__);return}let n=null,o=!1;t.__longpressStart__=r=>{r.type==="click"&&r.button!==0||(o=!1,n===null&&(n=setTimeout(()=>{o=!0,e(r.touches[0],t)},a)))},t.__longpressCancel__=r=>{n!==null&&(clearTimeout(n),n=null)},t.__longpressClick__=r=>{o&&(r.preventDefault(),r.stopPropagation()),t.__longpressCancel__(r)},t.addEventListener("touchstart",t.__longpressStart__),t.addEventListener("click",t.__longpressClick__),t.addEventListener("touchmove",t.__longpressCancel__),t.addEventListener("touchend",t.__longpressCancel__),t.addEventListener("touchcancel",t.__longpressCancel__)},unbind(t){if(!l){t.removeEventListener("contextmenu",t.__longpressContextmenu__),delete t.__longpressContextmenu__;return}t.removeEventListener("touchstart",t.__longpressStart__),t.removeEventListener("click",t.__longpressClick__),t.removeEventListener("touchmove",t.__longpressCancel__),t.removeEventListener("touchend",t.__longpressCancel__),t.removeEventListener("touchcancel",t.__longpressCancel__),delete t.__longpressStart__,delete t.__longpressClick__,delete t.__longpressCancel__}};var p=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("Form",{ref:"forwardForm",attrs:{model:t.value,"label-width":"auto"},nativeOn:{submit:function(e){e.preventDefault()}}},[a("FormItem",{attrs:{prop:"dialogids",label:t.$L("\u6700\u8FD1\u804A\u5929")}},[a("Select",{staticClass:"dialog-wrapper-dialogids",attrs:{placeholder:t.$L("\u9009\u62E9\u8F6C\u53D1\u6700\u8FD1\u804A\u5929"),"multiple-max":20,multiple:"",filterable:"","transfer-class-name":"dialog-wrapper-forward"},model:{value:t.value.dialogids,callback:function(e){t.$set(t.value,"dialogids",e)},expression:"value.dialogids"}},[a("div",{staticClass:"forward-drop-prepend",attrs:{slot:"drop-prepend"},slot:"drop-prepend"},[t._v(t._s(t.$L("\u6700\u591A\u53EA\u80FD\u9009\u62E920\u4E2A")))]),t._l(t.dialogList,function(e,n){return a("Option",{key:n,attrs:{value:e.id,"key-value":e.name,label:e.name}},[a("div",{staticClass:"forward-option"},[a("div",{staticClass:"forward-avatar"},[e.type=="group"?[e.group_type=="department"?a("i",{staticClass:"taskfont icon-avatar department"},[t._v("\uE75C")]):e.group_type=="project"?a("i",{staticClass:"taskfont icon-avatar project"},[t._v("\uE6F9")]):e.group_type=="task"?a("i",{staticClass:"taskfont icon-avatar task"},[t._v("\uE6F4")]):a("Icon",{staticClass:"icon-avatar",attrs:{type:"ios-people"}})]:e.dialog_user?a("div",{staticClass:"user-avatar"},[a("UserAvatar",{attrs:{userid:e.dialog_user.userid,size:26}})],1):a("Icon",{staticClass:"icon-avatar",attrs:{type:"md-person"}})],2),a("div",{staticClass:"forward-name"},[t._v(t._s(e.name))])])])})],2)],1),a("FormItem",{attrs:{prop:"userids",label:t.$L("\u6307\u5B9A\u6210\u5458")}},[a("UserInput",{attrs:{"multiple-max":20,placeholder:`(${t.$L("\u6216")}) ${t.$L("\u9009\u62E9\u8F6C\u53D1\u6307\u5B9A\u6210\u5458")}`},model:{value:t.value.userids,callback:function(e){t.$set(t.value,"userids",e)},expression:"value.userids"}})],1)],1)},d=[];const v={name:"DialogSelect",components:{UserInput:i},props:{value:{type:Object,default:()=>({})}},computed:{...c(["cacheDialogs"]),dialogList(){return this.cacheDialogs.filter(t=>!(t.name===void 0||t.dialog_delete===1)).sort((t,s)=>t.top_at||s.top_at?$A.Date(s.top_at)-$A.Date(t.top_at):t.todo_num>0||s.todo_num>0?s.todo_num-t.todo_num:$A.Date(s.last_at)-$A.Date(t.last_at))}}},_={};var m=u(v,p,d,!1,f,null,null,null);function f(t){for(let s in _)this[s]=_[s]}var L=function(){return m.exports}();export{L as D,h as l}; +import{U as i}from"./UserInput.38753002.js";import{m as c,n as u}from"./app.73f924cf.js";const l="ontouchend"in document,h={bind:function(t,s){let a=500,e=s.value;if($A.isJson(s.value)&&(a=s.value.delay||500,e=s.value.callback),typeof e!="function")throw"callback must be a function";if(!l){t.__longpressContextmenu__=r=>{r.preventDefault(),r.stopPropagation(),e(r,t)},t.addEventListener("contextmenu",t.__longpressContextmenu__);return}let n=null,o=!1;t.__longpressStart__=r=>{r.type==="click"&&r.button!==0||(o=!1,n===null&&(n=setTimeout(()=>{o=!0,e(r.touches[0],t)},a)))},t.__longpressCancel__=r=>{n!==null&&(clearTimeout(n),n=null)},t.__longpressClick__=r=>{o&&(r.preventDefault(),r.stopPropagation()),t.__longpressCancel__(r)},t.addEventListener("touchstart",t.__longpressStart__),t.addEventListener("click",t.__longpressClick__),t.addEventListener("touchmove",t.__longpressCancel__),t.addEventListener("touchend",t.__longpressCancel__),t.addEventListener("touchcancel",t.__longpressCancel__)},unbind(t){if(!l){t.removeEventListener("contextmenu",t.__longpressContextmenu__),delete t.__longpressContextmenu__;return}t.removeEventListener("touchstart",t.__longpressStart__),t.removeEventListener("click",t.__longpressClick__),t.removeEventListener("touchmove",t.__longpressCancel__),t.removeEventListener("touchend",t.__longpressCancel__),t.removeEventListener("touchcancel",t.__longpressCancel__),delete t.__longpressStart__,delete t.__longpressClick__,delete t.__longpressCancel__}};var p=function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("Form",{ref:"forwardForm",attrs:{model:t.value,"label-width":"auto"},nativeOn:{submit:function(e){e.preventDefault()}}},[a("FormItem",{attrs:{prop:"dialogids",label:t.$L("\u6700\u8FD1\u804A\u5929")}},[a("Select",{staticClass:"dialog-wrapper-dialogids",attrs:{placeholder:t.$L("\u9009\u62E9\u8F6C\u53D1\u6700\u8FD1\u804A\u5929"),"multiple-max":20,multiple:"",filterable:"","transfer-class-name":"dialog-wrapper-forward"},model:{value:t.value.dialogids,callback:function(e){t.$set(t.value,"dialogids",e)},expression:"value.dialogids"}},[a("div",{staticClass:"forward-drop-prepend",attrs:{slot:"drop-prepend"},slot:"drop-prepend"},[t._v(t._s(t.$L("\u6700\u591A\u53EA\u80FD\u9009\u62E920\u4E2A")))]),t._l(t.dialogList,function(e,n){return a("Option",{key:n,attrs:{value:e.id,"key-value":e.name,label:e.name}},[a("div",{staticClass:"forward-option"},[a("div",{staticClass:"forward-avatar"},[e.type=="group"?[e.group_type=="department"?a("i",{staticClass:"taskfont icon-avatar department"},[t._v("\uE75C")]):e.group_type=="project"?a("i",{staticClass:"taskfont icon-avatar project"},[t._v("\uE6F9")]):e.group_type=="task"?a("i",{staticClass:"taskfont icon-avatar task"},[t._v("\uE6F4")]):a("Icon",{staticClass:"icon-avatar",attrs:{type:"ios-people"}})]:e.dialog_user?a("div",{staticClass:"user-avatar"},[a("UserAvatar",{attrs:{userid:e.dialog_user.userid,size:26}})],1):a("Icon",{staticClass:"icon-avatar",attrs:{type:"md-person"}})],2),a("div",{staticClass:"forward-name"},[t._v(t._s(e.name))])])])})],2)],1),a("FormItem",{attrs:{prop:"userids",label:t.$L("\u6307\u5B9A\u6210\u5458")}},[a("UserInput",{attrs:{"multiple-max":20,placeholder:`(${t.$L("\u6216")}) ${t.$L("\u9009\u62E9\u8F6C\u53D1\u6307\u5B9A\u6210\u5458")}`},model:{value:t.value.userids,callback:function(e){t.$set(t.value,"userids",e)},expression:"value.userids"}})],1)],1)},d=[];const v={name:"DialogSelect",components:{UserInput:i},props:{value:{type:Object,default:()=>({})}},computed:{...c(["cacheDialogs"]),dialogList(){return this.cacheDialogs.filter(t=>!(t.name===void 0||t.dialog_delete===1)).sort((t,s)=>t.top_at||s.top_at?$A.Date(s.top_at)-$A.Date(t.top_at):t.todo_num>0||s.todo_num>0?s.todo_num-t.todo_num:$A.Date(s.last_at)-$A.Date(t.last_at))}}},_={};var m=u(v,p,d,!1,f,null,null,null);function f(t){for(let s in _)this[s]=_[s]}var L=function(){return m.exports}();export{L as D,h as l}; diff --git a/public/js/build/DialogWrapper.e49b1794.js b/public/js/build/DialogWrapper.fc9d4c05.js similarity index 92% rename from public/js/build/DialogWrapper.e49b1794.js rename to public/js/build/DialogWrapper.fc9d4c05.js index 1cb3df586..0edf770c1 100644 --- a/public/js/build/DialogWrapper.e49b1794.js +++ b/public/js/build/DialogWrapper.fc9d4c05.js @@ -1,4 +1,4 @@ -import{n as pt,m as bt,c as Ft,d as Tt,e as zt,g as Xt,f as Jt,r as te,V as ee,i as ie}from"./app.256678e2.js";import{l as Ut,D as ne}from"./DialogSelect.e694d9c4.js";import{U as Ht}from"./UserInput.6e7e4596.js";import{D as re}from"./index.1265df44.js";import{I as oe}from"./ImgUpload.6fde0d68.js";var ae=function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("div",{staticClass:"common-circle",style:t.style,attrs:{"data-id":t.percent}},[e("svg",{attrs:{viewBox:"0 0 28 28"}},[e("g",{attrs:{fill:"none","fill-rule":"evenodd"}},[e("path",{staticClass:"common-circle-path",attrs:{d:"M-500-100h997V48h-997z"}}),e("g",{attrs:{"fill-rule":"nonzero"}},[e("path",{staticClass:"common-circle-g-path-ring",attrs:{"stroke-width":"3",d:"M14 25.5c6.351 0 11.5-5.149 11.5-11.5S20.351 2.5 14 2.5 2.5 7.649 2.5 14 7.649 25.5 14 25.5z"}}),e("path",{staticClass:"common-circle-g-path-core",attrs:{d:t.arc(t.args)}})])])])])},se=[];const le={name:"WCircle",props:{percent:{type:Number,default:0},size:{type:Number,default:120}},computed:{style(){let{size:t}=this;return this.isNumeric(t)&&(t+="px"),{width:t,height:t}},args(){const{percent:t}=this;let o=Math.min(360,360/100*t);return o==360?o=0:o==0&&(o=360),{x:14,y:14,r:14,start:360,end:o}}},methods:{isNumeric(t){return t!==""&&!isNaN(parseFloat(t))&&isFinite(t)},point(t,o,e,i){return[(t+Math.sin(i)*e).toFixed(2),(o-Math.cos(i)*e).toFixed(2)]},full(t,o,e,i){return i<=0?`M ${t-e} ${o} A ${e} ${e} 0 1 1 ${t+e} ${o} A ${e} ${e} 1 1 1 ${t-e} ${o} Z`:`M ${t-e} ${o} A ${e} ${e} 0 1 1 ${t+e} ${o} A ${e} ${e} 1 1 1 ${t-e} ${o} M ${t-i} ${o} A ${i} ${i} 0 1 1 ${t+i} ${o} A ${i} ${i} 1 1 1 ${t-i} ${o} Z`},part(t,o,e,i,a,O){const[S,w]=[a/360*2*Math.PI,O/360*2*Math.PI],b=[this.point(t,o,i,S),this.point(t,o,e,S),this.point(t,o,e,w),this.point(t,o,i,w)],_=w-S>Math.PI?"1":"0";return`M ${b[0][0]} ${b[0][1]} L ${b[1][0]} ${b[1][1]} A ${e} ${e} 0 ${_} 1 ${b[2][0]} ${b[2][1]} L ${b[3][0]} ${b[3][1]} A ${i} ${i} 0 ${_} 0 ${b[0][0]} ${b[0][1]} Z`},arc(t){const{x:o=0,y:e=0}=t;let{R:i=0,r:a=0,start:O,end:S}=t;return[i,a]=[Math.max(i,a),Math.min(i,a)],i<=0?"":O!==+O||S!==+S?this.full(o,e,i,a):Math.abs(O-S)<1e-6?"":Math.abs(O-S)%360<1e-6?this.full(o,e,i,a):([O,S]=[O%360,S%360],O>S&&(S+=360),this.part(o,e,i,a,O,S))}}},xt={};var ue=pt(le,ae,se,!1,ce,null,null,null);function ce(t){for(let o in xt)this[o]=xt[o]}var fe=function(){return ue.exports}(),he=function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("div",{staticClass:"dialog-view",class:t.viewClass,attrs:{"data-id":t.msgData.id}},[t.dialogType==="group"?e("div",{staticClass:"dialog-username"},[e("UserAvatar",{attrs:{userid:t.msgData.userid,"show-icon":!1,"show-name":!0,"click-open-dialog":""}})],1):t._e(),e("div",{directives:[{name:"longpress",rawName:"v-longpress",value:{callback:t.handleLongpress,delay:300},expression:"{callback: handleLongpress, delay: 300}"}],staticClass:"dialog-head",class:t.headClass},[!t.hideReply&&t.msgData.reply_data?e("div",{staticClass:"dialog-reply no-dark-content",on:{click:t.viewReply}},[e("UserAvatar",{attrs:{userid:t.msgData.reply_data.userid,"show-icon":!1,"show-name":!0,"tooltip-disabled":!0}}),e("div",{staticClass:"reply-desc"},[t._v(t._s(t.$A.getMsgSimpleDesc(t.msgData.reply_data)))])],1):t._e(),e("div",{staticClass:"dialog-content",class:t.contentClass},[t.msgData.type==="text"?e("div",{staticClass:"content-text no-dark-content"},[e("pre",{domProps:{innerHTML:t._s(t.$A.formatTextMsg(t.msgData.msg.text,t.userId))},on:{click:t.viewText}})]):t.msgData.type==="file"?e("div",{class:`content-file ${t.msgData.msg.type}`},[e("div",{staticClass:"dialog-file"},[t.msgData.msg.type==="img"?e("img",{staticClass:"file-img",style:t.imageStyle(t.msgData.msg),attrs:{src:t.msgData.msg.thumb},on:{click:t.viewFile}}):e("div",{staticClass:"file-box",on:{click:t.downFile}},[e("img",{staticClass:"file-thumb",attrs:{src:t.msgData.msg.thumb}}),e("div",{staticClass:"file-info"},[e("div",{staticClass:"file-name"},[t._v(t._s(t.msgData.msg.name))]),e("div",{staticClass:"file-size"},[t._v(t._s(t.$A.bytesToSize(t.msgData.msg.size)))])])])])]):t.msgData.type==="record"?e("div",{staticClass:"content-record no-dark-content"},[e("div",{staticClass:"dialog-record",class:{playing:t.audioPlaying===t.msgData.msg.path},style:t.recordStyle(t.msgData.msg),on:{click:t.playRecord}},[e("div",{staticClass:"record-time"},[t._v(t._s(t.recordDuration(t.msgData.msg.duration)))]),e("div",{staticClass:"record-icon taskfont"})])]):t.msgData.type==="meeting"?e("div",{staticClass:"content-meeting no-dark-content"},[e("ul",{staticClass:"dialog-meeting"},[e("li",[e("em",[t._v(t._s(t.$L("\u4F1A\u8BAE\u4E3B\u9898")))]),t._v(" "+t._s(t.msgData.msg.name)+" ")]),e("li",[e("em",[t._v(t._s(t.$L("\u4F1A\u8BAE\u521B\u5EFA\u4EBA")))]),e("UserAvatar",{attrs:{userid:t.msgData.msg.userid,"show-icon":!1,"show-name":!0,"tooltip-disabled":""}})],1),e("li",[e("em",[t._v(t._s(t.$L("\u9891\u9053ID")))]),t._v(" "+t._s(t.msgData.msg.meetingid.replace(/^(.{3})(.{3})(.*)$/,"$1 $2 $3"))+" ")]),e("li",{staticClass:"meeting-operation",on:{click:t.openMeeting}},[t._v(" "+t._s(t.$L("\u70B9\u51FB\u52A0\u5165\u4F1A\u8BAE"))+" "),e("i",{staticClass:"taskfont"},[t._v("\uE68B")])])])]):t.msgData.type==="loading"?e("div",{staticClass:"content-loading"},[t.msgData.error===!0?e("Icon",{attrs:{type:"ios-alert-outline"}}):e("Loading")],1):e("div",{staticClass:"content-unknown"},[t._v(t._s(t.$L("\u672A\u77E5\u7684\u6D88\u606F\u7C7B\u578B")))])]),t.$A.arrayLength(t.msgData.emoji)>0?e("ul",{staticClass:"dialog-emoji"},t._l(t.msgData.emoji,function(i,a){return e("li",{key:a,class:{hasme:i.userids.includes(t.userId)}},[e("div",{staticClass:"emoji-symbol no-dark-content",on:{click:function(O){return t.onEmoji(i.symbol)}}},[t._v(t._s(i.symbol))]),e("div",{staticClass:"emoji-users",on:{click:function(O){return t.onShowEmojiUser(i)}}},[e("ul",[t._l(i.userids,function(O,S){return[S0?e("div",{staticClass:"reply",on:{click:t.replyList}},[e("i",{staticClass:"taskfont"},[t._v("\uE6EB")]),t._v(" "+t._s(t.msgData.reply_num)+"\u6761\u56DE\u590D ")]):t._e(),t.msgData.tag?e("div",{staticClass:"tag"},[e("i",{staticClass:"taskfont"},[t._v("\uE61E")])]):t._e(),t.msgData.todo?e("div",{staticClass:"todo",on:{click:t.openTodo}},[e("EPopover",{ref:"todo",attrs:{"popper-class":"dialog-wrapper-read-poptip",placement:t.isRightMsg?"bottom-end":"bottom-start"},model:{value:t.todoShow,callback:function(i){t.todoShow=i},expression:"todoShow"}},[e("div",{staticClass:"read-poptip-content"},[e("ul",{staticClass:"read scrollbar-overlay"},[e("li",{staticClass:"read-title"},[e("em",[t._v(t._s(t.todoDoneList.length))]),t._v(t._s(t.$L("\u5B8C\u6210")))]),t._l(t.todoDoneList,function(i){return e("li",[e("UserAvatar",{attrs:{userid:i.userid,size:26,showName:"",tooltipDisabled:""}})],1)})],2),e("ul",{staticClass:"unread scrollbar-overlay"},[e("li",{staticClass:"read-title"},[e("em",[t._v(t._s(t.todoUndoneList.length))]),t._v(t._s(t.$L("\u5F85\u529E")))]),t._l(t.todoUndoneList,function(i){return e("li",[e("UserAvatar",{attrs:{userid:i.userid,size:26,showName:"",tooltipDisabled:""}})],1)})],2)]),e("div",{staticClass:"popover-reference",attrs:{slot:"reference"},slot:"reference"})]),t.todoLoad>0?e("Loading"):e("i",{staticClass:"taskfont"},[t._v("\uE7B7")])],1):t._e(),t.msgData.modify?e("div",{staticClass:"modify"},[e("i",{staticClass:"taskfont"},[t._v("\uE779")])]):t._e(),t.msgData.error===!0?e("div",{staticClass:"error",on:{click:t.onError}},[e("Icon",{attrs:{type:"ios-alert"}})],1):t.isLoading?e("Loading"):[t.timeShow?e("div",{staticClass:"time",on:{click:function(i){t.timeShow=!1}}},[t._v(t._s(t.msgData.created_at))]):e("div",{staticClass:"time",attrs:{title:t.msgData.created_at},on:{click:function(i){t.timeShow=!0}}},[t._v(t._s(t.$A.formatTime(t.msgData.created_at)))]),t.hidePercentage?t._e():[t.msgData.send>1||t.dialogType==="group"?e("div",{staticClass:"percent",on:{click:t.openReadPercentage}},[e("EPopover",{ref:"percent",attrs:{"popper-class":"dialog-wrapper-read-poptip",placement:t.isRightMsg?"bottom-end":"bottom-start"},model:{value:t.percentageShow,callback:function(i){t.percentageShow=i},expression:"percentageShow"}},[e("div",{staticClass:"read-poptip-content"},[e("ul",{staticClass:"read scrollbar-overlay"},[e("li",{staticClass:"read-title"},[e("em",[t._v(t._s(t.readList.length))]),t._v(t._s(t.$L("\u5DF2\u8BFB")))]),t._l(t.readList,function(i){return e("li",[e("UserAvatar",{attrs:{userid:i.userid,size:26,showName:"",tooltipDisabled:""}})],1)})],2),e("ul",{staticClass:"unread scrollbar-overlay"},[e("li",{staticClass:"read-title"},[e("em",[t._v(t._s(t.unreadList.length))]),t._v(t._s(t.$L("\u672A\u8BFB")))]),t._l(t.unreadList,function(i){return e("li",[e("UserAvatar",{attrs:{userid:i.userid,size:26,showName:"",tooltipDisabled:""}})],1)})],2)]),e("div",{staticClass:"popover-reference",attrs:{slot:"reference"},slot:"reference"})]),t.percentageLoad>0?e("Loading"):e("WCircle",{attrs:{percent:t.msgData.percentage,size:14}})],1):t.msgData.percentage===100?e("Icon",{staticClass:"done",attrs:{type:"md-done-all"}}):e("Icon",{staticClass:"done",attrs:{type:"md-checkmark"}})]]],2)])},de=[];const pe={name:"DialogView",components:{WCircle:fe},directives:{longpress:Ut},props:{msgData:{type:Object,default:()=>({})},dialogType:{type:String,default:""},hidePercentage:{type:Boolean,default:!1},hideReply:{type:Boolean,default:!1},operateVisible:{type:Boolean,default:!1},operateAction:{type:Boolean,default:!1},isRightMsg:{type:Boolean,default:!1}},data(){return{timeShow:!1,operateEnter:!1,percentageLoad:0,percentageShow:!1,percentageList:[],todoLoad:0,todoShow:!1,todoList:[],emojiUsersNum:5}},mounted(){this.emojiUsersNum=Math.min(6,Math.max(2,Math.floor((this.windowWidth-180)/52)))},beforeDestroy(){this.$store.dispatch("audioStop",this.msgData.msg.path)},computed:{...bt(["loads","audioPlaying"]),...Ft(["isLoad"]),isLoading(){return this.msgData.created_at?this.isLoad(`msg-${this.msgData.id}`):!0},viewClass(){const{msgData:t,operateAction:o,operateEnter:e}=this,i=[];return t.type&&i.push(t.type),t.reply_data&&i.push("reply-view"),o&&(i.push("operate-action"),e&&i.push("operate-enter")),i},readList(){return this.percentageList.filter(({read_at:t})=>t)},unreadList(){return this.percentageList.filter(({read_at:t})=>!t)},todoDoneList(){return this.todoList.filter(({done_at:t})=>t)},todoUndoneList(){return this.todoList.filter(({done_at:t})=>!t)},headClass(){const{reply_id:t,type:o,msg:e,emoji:i}=this.msgData,a=[];return t===0&&$A.arrayLength(i)===0&&o==="text"&&(/^]*?>$/.test(e.text)||/^\s*

\s*([\uD800-\uDBFF][\uDC00-\uDFFF]){1,3}\s*<\/p>\s*$/.test(e.text))&&a.push("transparent"),a},contentClass(){const{type:t,msg:o}=this.msgData,e=[];return t==="text"&&(/^]*?>$/.test(o.text)?e.push("an-emoticon"):/^\s*

\s*([\uD800-\uDBFF][\uDC00-\uDFFF]){3}\s*<\/p>\s*$/.test(o.text)?e.push("three-emoji"):/^\s*

\s*([\uD800-\uDBFF][\uDC00-\uDFFF]){2}\s*<\/p>\s*$/.test(o.text)?e.push("two-emoji"):/^\s*

\s*[\uD800-\uDBFF][\uDC00-\uDFFF]\s*<\/p>\s*$/.test(o.text)&&e.push("an-emoji")),e}},watch:{operateAction(t){this.operateEnter=!1,t&&setTimeout(o=>this.operateEnter=!0,500)}},methods:{handleLongpress(t,o){this.$emit("on-longpress",{event:t,el:o,msgData:this.msgData})},openTodo(){if(!(this.todoLoad>0)){if(this.todoShow){this.todoShow=!1;return}this.todoLoad++,this.$store.dispatch("call",{url:"dialog/msg/todolist",data:{msg_id:this.msgData.id}}).then(({data:t})=>{this.todoList=t}).catch(()=>{this.todoList=[]}).finally(t=>{setTimeout(()=>{this.todoLoad--,this.todoShow=!0},100)})}},openReadPercentage(){if(!(this.percentageLoad>0)){if(this.percentageShow){this.percentageShow=!1;return}this.percentageLoad++,this.$store.dispatch("call",{url:"dialog/msg/readlist",data:{msg_id:this.msgData.id}}).then(({data:t})=>{this.percentageList=t}).catch(()=>{this.percentageList=[]}).finally(t=>{setTimeout(()=>{this.percentageLoad--,this.percentageShow=!0},100)})}},recordStyle(t){const{duration:o}=t;return{width:50+Math.min(180,Math.floor(o/150))+"px"}},recordDuration(t){const o=Math.floor(t/6e4),e=Math.floor(t/1e3)%60;return o>0?`${o}:${e}\u2033`:`${Math.max(1,e)}\u2033`},imageStyle(t){const{width:o,height:e}=t;if(o&&e){let i=220,a=220,O=o,S=e;return(o>i||e>a)&&(o>e?(O=i,S=e*(i/o)):(O=o*(a/e),S=a)),{width:O+"px",height:S+"px"}}return{}},playRecord(){this.operateVisible||this.$store.dispatch("audioPlay",this.msgData.msg.path)},openMeeting(){this.operateVisible||Tt.Store.set("addMeeting",{type:"join",name:this.msgData.msg.name,meetingid:this.msgData.msg.meetingid,meetingdisabled:!0})},viewReply(){this.$emit("on-view-reply",{msg_id:this.msgData.id,reply_id:this.msgData.reply_id})},viewText(t){this.$emit("on-view-text",t)},viewFile(){this.$emit("on-view-file",this.msgData)},downFile(){this.$emit("on-down-file",this.msgData)},replyList(){this.$emit("on-reply-list",{msg_id:this.msgData.id})},onError(){this.$emit("on-error",this.msgData)},onEmoji(t){this.$emit("on-emoji",{msg_id:this.msgData.id,symbol:t})},onShowEmojiUser(t){this.$emit("on-show-emoji-user",t)}}},At={};var me=pt(pe,he,de,!1,ve,null,null,null);function ve(t){for(let o in At)this[o]=At[o]}var ge=function(){return me.exports}(),ye=function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("div",{class:t.classArray},[t.source.type==="tag"?e("div",{staticClass:"dialog-tag",on:{click:t.onViewTag}},[e("div",{staticClass:"tag-user"},[e("UserAvatar",{attrs:{userid:t.source.userid,tooltipDisabled:t.source.userid==t.userId,"show-name":!0,"show-icon":!1}})],1),t._v(" "+t._s(t.$L(t.source.msg.action==="remove"?"\u53D6\u6D88\u6807\u6CE8":"\u6807\u6CE8\u4E86"))+' "'+t._s(t.$A.getMsgSimpleDesc(t.source.msg.data))+'" ')]):t.source.type==="todo"?e("div",{staticClass:"dialog-todo",on:{click:t.onViewTodo}},[e("div",{staticClass:"todo-user"},[e("UserAvatar",{attrs:{userid:t.source.userid,tooltipDisabled:t.source.userid==t.userId,"show-name":!0,"show-icon":!1}})],1),t._v(" "+t._s(t.$L(t.source.msg.action==="remove"?"\u53D6\u6D88\u5F85\u529E":t.source.msg.action==="done"?"\u5B8C\u6210":"\u8BBE\u5F85\u529E"))+' "'+t._s(t.$A.getMsgSimpleDesc(t.source.msg.data))+'" '),t.formatTodoUser(t.source.msg.data).length>0?e("div",{staticClass:"todo-users"},[e("span",[t._v(t._s(t.$L("\u7ED9")))]),t._l(t.formatTodoUser(t.source.msg.data),function(i,a){return[a<3?e("div",{staticClass:"todo-user"},[e("UserAvatar",{attrs:{userid:i,tooltipDisabled:i==t.userId,"show-name":!0,"show-icon":!1}})],1):a==3?e("div",{staticClass:"todo-user"},[t._v("+"+t._s(t.formatTodoUser(t.source.msg.data).length-3))]):t._e()]})],2):t._e()]):t.source.type==="notice"?e("div",{staticClass:"dialog-notice"},[t._v(" "+t._s(t.source.msg.notice)+" ")]):[e("div",{staticClass:"dialog-avatar"},[e("UserAvatar",{directives:[{name:"longpress",rawName:"v-longpress",value:{callback:t.onMention,delay:300},expression:"{callback: onMention, delay: 300}"}],attrs:{userid:t.source.userid,size:30,"tooltip-disabled":""},on:{"open-dialog":t.onOpenDialog}})],1),e("DialogView",{attrs:{"msg-data":t.source,"dialog-type":t.dialogData.type,"hide-percentage":t.hidePercentage,"hide-reply":t.hideReply,"operate-visible":t.operateVisible,"operate-action":t.operateVisible&&t.source.id===t.operateItem.id,"is-right-msg":t.isRightMsg},on:{"on-longpress":t.onLongpress,"on-view-reply":t.onViewReply,"on-view-text":t.onViewText,"on-view-file":t.onViewFile,"on-down-file":t.onDownFile,"on-reply-list":t.onReplyList,"on-error":t.onError,"on-emoji":t.onEmoji,"on-show-emoji-user":t.onShowEmojiUser}})]],2)},be=[];const _e={name:"DialogItem",components:{DialogView:ge},directives:{longpress:Ut},props:{source:{type:Object,default(){return{}}},dialogData:{type:Object,default(){return{}}},operateVisible:{type:Boolean,default:!1},operateItem:{type:Object,default(){return{}}},simpleView:{type:Boolean,default:!1},isMyDialog:{type:Boolean,default:!1},msgId:{type:Number,default:0}},data(){return{subscribe:null}},computed:{...bt(["userId"]),isRightMsg(){return this.source.userid==this.userId},isReply(){return this.simpleView||this.msgId===this.source.id},hidePercentage(){return this.simpleView||this.isMyDialog||this.isReply},hideReply(){return this.simpleView||this.msgId>0},classArray(){return{"dialog-item":!0,"reply-item":this.isReply,self:this.isRightMsg}}},watch:{source:{handler(){this.msgRead()},immediate:!0},windowActive(t){t&&this.msgRead()}},methods:{msgRead(){!this.windowActive||this.$store.dispatch("dialogMsgRead",this.source)},formatTodoUser(t){if($A.isJson(t)){const{userids:o}=t;if(o)return o.split(",")}return[]},onViewTag(){this.onViewReply({msg_id:this.source.id,reply_id:this.source.msg.data.id})},onViewTodo(){this.onViewReply({msg_id:this.source.id,reply_id:this.source.msg.data.id})},onOpenDialog(t){this.dialogData.type=="group"&&this.$store.dispatch("openDialogUserid",t).then(o=>{this.goForward({name:"manage-messenger"})}).catch(({msg:o})=>{$A.modalError(o)})},onMention(){this.dispatch("on-mention",this.source)},onLongpress(t){this.dispatch("on-longpress",t)},onViewReply(t){this.dispatch("on-view-reply",t)},onViewText(t){this.dispatch("on-view-text",t)},onViewFile(t){this.dispatch("on-view-file",t)},onDownFile(t){this.dispatch("on-down-file",t)},onReplyList(t){this.dispatch("on-reply-list",t)},onError(t){this.dispatch("on-error",t)},onEmoji(t){this.dispatch("on-emoji",t)},onShowEmojiUser(t){this.dispatch("on-show-emoji-user",t)},dispatch(t,o){if(this.isReply){this.$emit(t,o);return}let e=this.$parent,i=e.$options.name;for(;e&&(!i||i!=="virtual-list");)e=e.$parent,e&&(i=e.$options.name);e&&e.$emit(t,o)}}},Lt={};var we=pt(_e,ye,be,!1,ke,null,null,null);function ke(t){for(let o in Lt)this[o]=Lt[o]}var Ct=function(){return we.exports}(),Oe=function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("Upload",{ref:"upload",attrs:{name:"files",action:t.actionUrl,headers:t.headers,data:t.params,multiple:"",format:t.uploadFormat,"show-upload-list":!1,"max-size":t.maxSize,"on-progress":t.handleProgress,"on-success":t.handleSuccess,"on-format-error":t.handleFormatError,"on-exceeded-size":t.handleMaxSize}})},Ee=[];const Se={name:"DialogUpload",props:{dialogId:{type:Number,default:0},maxSize:{type:Number,default:1024e3}},data(){return{uploadFormat:[],actionUrl:$A.apiUrl("dialog/msg/sendfile")}},computed:{...bt(["cacheDialogs"]),headers(){return{fd:$A.getSessionStorageString("userWsFd"),token:this.userToken}},params(){return{dialog_id:this.dialogId,reply_id:this.dialogData.extra_quote_id||0}},dialogData(){return this.cacheDialogs.find(({id:t})=>t==this.dialogId)||{}}},methods:{handleProgress(t,o){o.tempId===void 0&&(this.$parent.$options.name==="DialogWrapper"?o.tempId=this.$parent.getTempId():o.tempId=$A.randNum(1e9,9999999999),this.$emit("on-progress",o))},handleSuccess(t,o){t.ret===1?(o.data=t.data,this.$emit("on-success",o),t.data.task_id&&this.$store.dispatch("getTaskFiles",t.data.task_id)):($A.modalWarning({title:"\u53D1\u9001\u5931\u8D25",content:"\u6587\u4EF6 "+o.name+" \u53D1\u9001\u5931\u8D25\uFF0C"+t.msg}),this.$emit("on-error",o),this.$refs.upload.fileList.pop())},handleFormatError(t){$A.modalWarning({title:"\u6587\u4EF6\u683C\u5F0F\u4E0D\u6B63\u786E",content:"\u6587\u4EF6 "+t.name+" \u683C\u5F0F\u4E0D\u6B63\u786E\uFF0C\u4EC5\u652F\u6301\u53D1\u9001\uFF1A"+this.uploadFormat.join(",")})},handleMaxSize(t){$A.modalWarning({title:"\u8D85\u51FA\u6587\u4EF6\u5927\u5C0F\u9650\u5236",content:"\u6587\u4EF6 "+t.name+" \u592A\u5927\uFF0C\u4E0D\u80FD\u53D1\u9001\u8D85\u8FC7"+$A.bytesToSize(this.maxSize*1024)+"\u3002"})},handleClick(){this.$refs.upload.handleClick()},upload(t){this.$refs.upload.upload(t)}}},It={};var Te=pt(Se,Oe,Ee,!1,xe,null,null,null);function xe(t){for(let o in It)this[o]=It[o]}var Ae=function(){return Te.exports}(),Le=function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("div",{staticClass:"dialog-group-info"},[e("div",{staticClass:"group-info-title"},[t._v(t._s(t.$L("\u7FA4\u540D")))]),e("div",{staticClass:"group-info-value"},[e("QuickEdit",{attrs:{value:t.dialogData.name,disabled:t.dialogData.owner_id!=t.userId},on:{"on-update":t.updateName}},[t._v(t._s(t.dialogData.name))])],1),e("div",{staticClass:"group-info-title"},[t._v(t._s(t.$L("\u7FA4\u7C7B\u578B")))]),e("div",{staticClass:"group-info-value"},[t._v(t._s(t.$L(t.groupType)))]),e("div",{staticClass:"group-info-search"},[e("Input",{attrs:{prefix:"ios-search",placeholder:t.$L("\u641C\u7D22\u6210\u5458"),clearable:""},model:{value:t.searchKey,callback:function(i){t.searchKey=i},expression:"searchKey"}})],1),e("div",{staticClass:"group-info-user"},[e("ul",[t._l(t.userList,function(i,a){return e("li",{key:a,on:{click:function(O){return t.openUser(i.userid)}}},[e("UserAvatar",{attrs:{userid:i.userid,size:32,showName:"",tooltipDisabled:""}}),i.userid===t.dialogData.owner_id?e("div",{staticClass:"user-tag"},[t._v(t._s(t.$L("\u7FA4\u4E3B")))]):t.operableExit(i)?e("div",{staticClass:"user-exit",on:{click:function(O){return O.stopPropagation(),t.onExit(i)}}},[e("Icon",{attrs:{type:"md-exit"}})],1):t._e()],1)}),t.userList.length===0?e("li",{staticClass:"no"},[t.loadIng>0?e("Loading"):e("span",[t._v(t._s(t.$L("\u6CA1\u6709\u7B26\u5408\u6761\u4EF6\u7684\u6570\u636E")))])],1):t._e()],2)]),t.operableAdd?e("div",{staticClass:"group-info-button"},[t.dialogData.owner_id==t.userId||t.dialogData.owner_id==0?e("Button",{attrs:{type:"primary",icon:"md-add"},on:{click:t.openAdd}},[t._v(t._s(t.$L("\u6DFB\u52A0\u6210\u5458")))]):t._e()],1):t._e(),e("Modal",{attrs:{title:t.$L("\u6DFB\u52A0\u7FA4\u6210\u5458"),"mask-closable":!1},model:{value:t.addShow,callback:function(i){t.addShow=i},expression:"addShow"}},[e("Form",{attrs:{model:t.addData,"label-width":"auto"},nativeOn:{submit:function(i){i.preventDefault()}}},[e("FormItem",{attrs:{prop:"userids",label:t.$L("\u65B0\u589E\u6210\u5458")}},[e("UserInput",{attrs:{disabledChoice:t.addData.disabledChoice,"multiple-max":100,"show-bot":"",placeholder:t.$L("\u9009\u62E9\u6210\u5458")},model:{value:t.addData.userids,callback:function(i){t.$set(t.addData,"userids",i)},expression:"addData.userids"}}),t.dialogData.group_type==="department"?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u6B64\u64CD\u4F5C\u4EC5\u52A0\u5165\u7FA4\u6210\u5458\u5E76\u4E0D\u4F1A\u52A0\u5165\u90E8\u95E8")))]):t.dialogData.group_type==="project"?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u6B64\u64CD\u4F5C\u4EC5\u52A0\u5165\u7FA4\u6210\u5458\u5E76\u4E0D\u4F1A\u52A0\u5165\u9879\u76EE")))]):t.dialogData.group_type==="task"?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u6B64\u64CD\u4F5C\u4EC5\u52A0\u5165\u7FA4\u6210\u5458\u5E76\u4E0D\u4F1A\u52A0\u5165\u4EFB\u52A1\u8D1F\u8D23\u4EBA")))]):t._e()],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(i){t.addShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.addLoad>0},on:{click:t.onAdd}},[t._v(t._s(t.$L("\u786E\u5B9A\u6DFB\u52A0")))])],1)],1)],1)},Ce=[];const Ie={name:"DialogGroupInfo",components:{UserInput:Ht},props:{dialogId:{type:Number,default:0}},data(){return{searchKey:"",loadIng:0,dialogUser:[],addShow:!1,addData:{},addLoad:0,openIng:!1}},computed:{...bt(["cacheDialogs","cacheUserBasic","userIsAdmin"]),dialogData(){return this.cacheDialogs.find(({id:t})=>t==this.dialogId)||{}},groupType(){const{group_type:t}=this.dialogData;return t==="department"?"\u90E8\u95E8\u7FA4\u7EC4":t==="project"?"\u9879\u76EE\u7FA4\u7EC4":t==="task"?"\u4EFB\u52A1\u7FA4\u7EC4":t==="user"?"\u4E2A\u4EBA\u7FA4\u7EC4":t==="all"?"\u5168\u5458\u7FA4\u7EC4":"\u672A\u77E5"},userList(){const{dialogUser:t,searchKey:o,cacheUserBasic:e,dialogData:i}=this;return t.map(O=>{const S=e.find(w=>w.userid==O.userid);return S&&(O.nickname=S.nickname,O.email=S.email),O}).filter(O=>!(o&&O.nickname&&!$A.strExists(O.nickname,o)&&!$A.strExists(O.email,o))).sort((O,S)=>O.userid===i.owner_id||S.userid===i.owner_id?(O.userid===i.owner_id?0:1)-(S.userid===i.owner_id?0:1):$A.Date(O.created_at)-$A.Date(S.created_at))}},watch:{dialogId:{handler(){this.getDialogUser()},immediate:!0}},methods:{updateName(t,o){if(!t){o();return}this.$store.dispatch("call",{url:"dialog/group/edit",data:{dialog_id:this.dialogId,chat_name:t}}).then(({data:e})=>{this.$store.dispatch("saveDialog",e),o()}).catch(({msg:e})=>{$A.modalError(e),o()})},getDialogUser(){this.dialogId<=0||(this.loadIng++,this.$store.dispatch("call",{url:"dialog/user",data:{dialog_id:this.dialogId}}).then(({data:t})=>{this.dialogUser=t,this.$store.dispatch("saveDialog",{id:this.dialogId,people:t.length})}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.loadIng--}))},operableAdd(){const{owner_id:t,group_type:o}=this.dialogData;return o=="all"?this.userIsAdmin:[0,this.userId].includes(t)},openAdd(){this.addData={dialog_id:this.dialogId,userids:[],disabledChoice:this.dialogUser.map(t=>t.userid)},this.addShow=!0},onAdd(){this.addLoad++,this.$store.dispatch("call",{url:"dialog/group/adduser",data:this.addData}).then(({msg:t})=>{$A.messageSuccess(t),this.addShow=!1,this.addData={},this.getDialogUser()}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.addLoad--})},operableExit(t){const{owner_id:o,group_type:e}=this.dialogData;return e=="all"?this.userIsAdmin:o==this.userId||t.inviter==this.userId},onExit(t){let o="\u4F60\u786E\u5B9A\u8981\u9000\u51FA\u7FA4\u7EC4\u5417\uFF1F",e=[];$A.isJson(t)&&t.userid!=this.userId&&(o=`\u4F60\u786E\u5B9A\u8981\u5C06\u3010${t.nickname}\u3011\u79FB\u51FA\u7FA4\u7EC4\u5417\uFF1F`,e=[t.userid]),$A.modalConfirm({content:o,loading:!0,onOk:()=>new Promise((i,a)=>{this.$store.dispatch("call",{url:"dialog/group/deluser",data:{dialog_id:this.dialogId,userids:e}}).then(({msg:O})=>{i(O),e.length>0?this.getDialogUser():(this.$store.dispatch("forgetDialog",this.dialogId),this.goForward({name:"manage-messenger"}))}).catch(({msg:O})=>{a(O)})})})},openUser(t){this.openIng||(this.openIng=!0,this.$store.dispatch("openDialogUserid",t).then(o=>{this.$emit("on-close")}).catch(({msg:o})=>{$A.modalError(o)}).finally(o=>{this.openIng=!1}))}}},Dt={};var De=pt(Ie,Le,Ce,!1,$e,null,null,null);function $e(t){for(let o in Dt)this[o]=Dt[o]}var Me=function(){return De.exports}(),Ne=function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("div",{staticClass:"dialog-respond"},[e("div",{staticClass:"respond-title"},[e("em",[t._v(t._s(t.respondData.symbol))]),t._v(t._s(t.$L("\u56DE\u5E94\u8BE6\u60C5"))+" ("+t._s(t.respondData.userids.length)+")")]),e("div",{staticClass:"respond-user"},[e("ul",t._l(t.respondData.userids,function(i,a){return e("li",{key:a,on:{click:function(O){return t.openUser(i)}}},[e("UserAvatar",{attrs:{userid:i,size:32,showName:"",tooltipDisabled:""}})],1)}),0)])])},Pe=[];const je={name:"DialogRespond",props:{respondData:{type:Object,default:()=>({})}},data(){return{openIng:!1}},methods:{openUser(t){this.openIng||(this.openIng=!0,this.$store.dispatch("openDialogUserid",t).then(o=>{this.$emit("on-close")}).catch(({msg:o})=>{$A.modalError(o)}).finally(o=>{this.openIng=!1}))}}},$t={};var Re=pt(je,Ne,Pe,!1,qe,null,null,null);function qe(t){for(let o in $t)this[o]=$t[o]}var Be=function(){return Re.exports}(),Vt={exports:{}};/*! +import{n as pt,m as bt,c as Ft,d as Tt,e as zt,g as Xt,f as Jt,r as te,V as ee,i as ie}from"./app.73f924cf.js";import{l as Ut,D as ne}from"./DialogSelect.d3075666.js";import{U as Ht}from"./UserInput.38753002.js";import{D as re}from"./index.ca9799b6.js";import{I as oe}from"./ImgUpload.09338bda.js";var ae=function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("div",{staticClass:"common-circle",style:t.style,attrs:{"data-id":t.percent}},[e("svg",{attrs:{viewBox:"0 0 28 28"}},[e("g",{attrs:{fill:"none","fill-rule":"evenodd"}},[e("path",{staticClass:"common-circle-path",attrs:{d:"M-500-100h997V48h-997z"}}),e("g",{attrs:{"fill-rule":"nonzero"}},[e("path",{staticClass:"common-circle-g-path-ring",attrs:{"stroke-width":"3",d:"M14 25.5c6.351 0 11.5-5.149 11.5-11.5S20.351 2.5 14 2.5 2.5 7.649 2.5 14 7.649 25.5 14 25.5z"}}),e("path",{staticClass:"common-circle-g-path-core",attrs:{d:t.arc(t.args)}})])])])])},se=[];const le={name:"WCircle",props:{percent:{type:Number,default:0},size:{type:Number,default:120}},computed:{style(){let{size:t}=this;return this.isNumeric(t)&&(t+="px"),{width:t,height:t}},args(){const{percent:t}=this;let o=Math.min(360,360/100*t);return o==360?o=0:o==0&&(o=360),{x:14,y:14,r:14,start:360,end:o}}},methods:{isNumeric(t){return t!==""&&!isNaN(parseFloat(t))&&isFinite(t)},point(t,o,e,i){return[(t+Math.sin(i)*e).toFixed(2),(o-Math.cos(i)*e).toFixed(2)]},full(t,o,e,i){return i<=0?`M ${t-e} ${o} A ${e} ${e} 0 1 1 ${t+e} ${o} A ${e} ${e} 1 1 1 ${t-e} ${o} Z`:`M ${t-e} ${o} A ${e} ${e} 0 1 1 ${t+e} ${o} A ${e} ${e} 1 1 1 ${t-e} ${o} M ${t-i} ${o} A ${i} ${i} 0 1 1 ${t+i} ${o} A ${i} ${i} 1 1 1 ${t-i} ${o} Z`},part(t,o,e,i,a,O){const[S,w]=[a/360*2*Math.PI,O/360*2*Math.PI],b=[this.point(t,o,i,S),this.point(t,o,e,S),this.point(t,o,e,w),this.point(t,o,i,w)],_=w-S>Math.PI?"1":"0";return`M ${b[0][0]} ${b[0][1]} L ${b[1][0]} ${b[1][1]} A ${e} ${e} 0 ${_} 1 ${b[2][0]} ${b[2][1]} L ${b[3][0]} ${b[3][1]} A ${i} ${i} 0 ${_} 0 ${b[0][0]} ${b[0][1]} Z`},arc(t){const{x:o=0,y:e=0}=t;let{R:i=0,r:a=0,start:O,end:S}=t;return[i,a]=[Math.max(i,a),Math.min(i,a)],i<=0?"":O!==+O||S!==+S?this.full(o,e,i,a):Math.abs(O-S)<1e-6?"":Math.abs(O-S)%360<1e-6?this.full(o,e,i,a):([O,S]=[O%360,S%360],O>S&&(S+=360),this.part(o,e,i,a,O,S))}}},xt={};var ue=pt(le,ae,se,!1,ce,null,null,null);function ce(t){for(let o in xt)this[o]=xt[o]}var fe=function(){return ue.exports}(),he=function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("div",{staticClass:"dialog-view",class:t.viewClass,attrs:{"data-id":t.msgData.id}},[t.dialogType==="group"?e("div",{staticClass:"dialog-username"},[e("UserAvatar",{attrs:{userid:t.msgData.userid,"show-icon":!1,"show-name":!0,"click-open-dialog":""}})],1):t._e(),e("div",{directives:[{name:"longpress",rawName:"v-longpress",value:{callback:t.handleLongpress,delay:300},expression:"{callback: handleLongpress, delay: 300}"}],staticClass:"dialog-head",class:t.headClass},[!t.hideReply&&t.msgData.reply_data?e("div",{staticClass:"dialog-reply no-dark-content",on:{click:t.viewReply}},[e("UserAvatar",{attrs:{userid:t.msgData.reply_data.userid,"show-icon":!1,"show-name":!0,"tooltip-disabled":!0}}),e("div",{staticClass:"reply-desc"},[t._v(t._s(t.$A.getMsgSimpleDesc(t.msgData.reply_data)))])],1):t._e(),e("div",{staticClass:"dialog-content",class:t.contentClass},[t.msgData.type==="text"?e("div",{staticClass:"content-text no-dark-content"},[e("pre",{domProps:{innerHTML:t._s(t.$A.formatTextMsg(t.msgData.msg.text,t.userId))},on:{click:t.viewText}})]):t.msgData.type==="file"?e("div",{class:`content-file ${t.msgData.msg.type}`},[e("div",{staticClass:"dialog-file"},[t.msgData.msg.type==="img"?e("img",{staticClass:"file-img",style:t.imageStyle(t.msgData.msg),attrs:{src:t.msgData.msg.thumb},on:{click:t.viewFile}}):e("div",{staticClass:"file-box",on:{click:t.downFile}},[e("img",{staticClass:"file-thumb",attrs:{src:t.msgData.msg.thumb}}),e("div",{staticClass:"file-info"},[e("div",{staticClass:"file-name"},[t._v(t._s(t.msgData.msg.name))]),e("div",{staticClass:"file-size"},[t._v(t._s(t.$A.bytesToSize(t.msgData.msg.size)))])])])])]):t.msgData.type==="record"?e("div",{staticClass:"content-record no-dark-content"},[e("div",{staticClass:"dialog-record",class:{playing:t.audioPlaying===t.msgData.msg.path},style:t.recordStyle(t.msgData.msg),on:{click:t.playRecord}},[e("div",{staticClass:"record-time"},[t._v(t._s(t.recordDuration(t.msgData.msg.duration)))]),e("div",{staticClass:"record-icon taskfont"})])]):t.msgData.type==="meeting"?e("div",{staticClass:"content-meeting no-dark-content"},[e("ul",{staticClass:"dialog-meeting"},[e("li",[e("em",[t._v(t._s(t.$L("\u4F1A\u8BAE\u4E3B\u9898")))]),t._v(" "+t._s(t.msgData.msg.name)+" ")]),e("li",[e("em",[t._v(t._s(t.$L("\u4F1A\u8BAE\u521B\u5EFA\u4EBA")))]),e("UserAvatar",{attrs:{userid:t.msgData.msg.userid,"show-icon":!1,"show-name":!0,"tooltip-disabled":""}})],1),e("li",[e("em",[t._v(t._s(t.$L("\u9891\u9053ID")))]),t._v(" "+t._s(t.msgData.msg.meetingid.replace(/^(.{3})(.{3})(.*)$/,"$1 $2 $3"))+" ")]),e("li",{staticClass:"meeting-operation",on:{click:t.openMeeting}},[t._v(" "+t._s(t.$L("\u70B9\u51FB\u52A0\u5165\u4F1A\u8BAE"))+" "),e("i",{staticClass:"taskfont"},[t._v("\uE68B")])])])]):t.msgData.type==="loading"?e("div",{staticClass:"content-loading"},[t.msgData.error===!0?e("Icon",{attrs:{type:"ios-alert-outline"}}):e("Loading")],1):e("div",{staticClass:"content-unknown"},[t._v(t._s(t.$L("\u672A\u77E5\u7684\u6D88\u606F\u7C7B\u578B")))])]),t.$A.arrayLength(t.msgData.emoji)>0?e("ul",{staticClass:"dialog-emoji"},t._l(t.msgData.emoji,function(i,a){return e("li",{key:a,class:{hasme:i.userids.includes(t.userId)}},[e("div",{staticClass:"emoji-symbol no-dark-content",on:{click:function(O){return t.onEmoji(i.symbol)}}},[t._v(t._s(i.symbol))]),e("div",{staticClass:"emoji-users",on:{click:function(O){return t.onShowEmojiUser(i)}}},[e("ul",[t._l(i.userids,function(O,S){return[S0?e("div",{staticClass:"reply",on:{click:t.replyList}},[e("i",{staticClass:"taskfont"},[t._v("\uE6EB")]),t._v(" "+t._s(t.msgData.reply_num)+"\u6761\u56DE\u590D ")]):t._e(),t.msgData.tag?e("div",{staticClass:"tag"},[e("i",{staticClass:"taskfont"},[t._v("\uE61E")])]):t._e(),t.msgData.todo?e("div",{staticClass:"todo",on:{click:t.openTodo}},[e("EPopover",{ref:"todo",attrs:{"popper-class":"dialog-wrapper-read-poptip",placement:t.isRightMsg?"bottom-end":"bottom-start"},model:{value:t.todoShow,callback:function(i){t.todoShow=i},expression:"todoShow"}},[e("div",{staticClass:"read-poptip-content"},[e("ul",{staticClass:"read scrollbar-overlay"},[e("li",{staticClass:"read-title"},[e("em",[t._v(t._s(t.todoDoneList.length))]),t._v(t._s(t.$L("\u5B8C\u6210")))]),t._l(t.todoDoneList,function(i){return e("li",[e("UserAvatar",{attrs:{userid:i.userid,size:26,showName:"",tooltipDisabled:""}})],1)})],2),e("ul",{staticClass:"unread scrollbar-overlay"},[e("li",{staticClass:"read-title"},[e("em",[t._v(t._s(t.todoUndoneList.length))]),t._v(t._s(t.$L("\u5F85\u529E")))]),t._l(t.todoUndoneList,function(i){return e("li",[e("UserAvatar",{attrs:{userid:i.userid,size:26,showName:"",tooltipDisabled:""}})],1)})],2)]),e("div",{staticClass:"popover-reference",attrs:{slot:"reference"},slot:"reference"})]),t.todoLoad>0?e("Loading"):e("i",{staticClass:"taskfont"},[t._v("\uE7B7")])],1):t._e(),t.msgData.modify?e("div",{staticClass:"modify"},[e("i",{staticClass:"taskfont"},[t._v("\uE779")])]):t._e(),t.msgData.error===!0?e("div",{staticClass:"error",on:{click:t.onError}},[e("Icon",{attrs:{type:"ios-alert"}})],1):t.isLoading?e("Loading"):[t.timeShow?e("div",{staticClass:"time",on:{click:function(i){t.timeShow=!1}}},[t._v(t._s(t.msgData.created_at))]):e("div",{staticClass:"time",attrs:{title:t.msgData.created_at},on:{click:function(i){t.timeShow=!0}}},[t._v(t._s(t.$A.formatTime(t.msgData.created_at)))]),t.hidePercentage?t._e():[t.msgData.send>1||t.dialogType==="group"?e("div",{staticClass:"percent",on:{click:t.openReadPercentage}},[e("EPopover",{ref:"percent",attrs:{"popper-class":"dialog-wrapper-read-poptip",placement:t.isRightMsg?"bottom-end":"bottom-start"},model:{value:t.percentageShow,callback:function(i){t.percentageShow=i},expression:"percentageShow"}},[e("div",{staticClass:"read-poptip-content"},[e("ul",{staticClass:"read scrollbar-overlay"},[e("li",{staticClass:"read-title"},[e("em",[t._v(t._s(t.readList.length))]),t._v(t._s(t.$L("\u5DF2\u8BFB")))]),t._l(t.readList,function(i){return e("li",[e("UserAvatar",{attrs:{userid:i.userid,size:26,showName:"",tooltipDisabled:""}})],1)})],2),e("ul",{staticClass:"unread scrollbar-overlay"},[e("li",{staticClass:"read-title"},[e("em",[t._v(t._s(t.unreadList.length))]),t._v(t._s(t.$L("\u672A\u8BFB")))]),t._l(t.unreadList,function(i){return e("li",[e("UserAvatar",{attrs:{userid:i.userid,size:26,showName:"",tooltipDisabled:""}})],1)})],2)]),e("div",{staticClass:"popover-reference",attrs:{slot:"reference"},slot:"reference"})]),t.percentageLoad>0?e("Loading"):e("WCircle",{attrs:{percent:t.msgData.percentage,size:14}})],1):t.msgData.percentage===100?e("Icon",{staticClass:"done",attrs:{type:"md-done-all"}}):e("Icon",{staticClass:"done",attrs:{type:"md-checkmark"}})]]],2)])},de=[];const pe={name:"DialogView",components:{WCircle:fe},directives:{longpress:Ut},props:{msgData:{type:Object,default:()=>({})},dialogType:{type:String,default:""},hidePercentage:{type:Boolean,default:!1},hideReply:{type:Boolean,default:!1},operateVisible:{type:Boolean,default:!1},operateAction:{type:Boolean,default:!1},isRightMsg:{type:Boolean,default:!1}},data(){return{timeShow:!1,operateEnter:!1,percentageLoad:0,percentageShow:!1,percentageList:[],todoLoad:0,todoShow:!1,todoList:[],emojiUsersNum:5}},mounted(){this.emojiUsersNum=Math.min(6,Math.max(2,Math.floor((this.windowWidth-180)/52)))},beforeDestroy(){this.$store.dispatch("audioStop",this.msgData.msg.path)},computed:{...bt(["loads","audioPlaying"]),...Ft(["isLoad"]),isLoading(){return this.msgData.created_at?this.isLoad(`msg-${this.msgData.id}`):!0},viewClass(){const{msgData:t,operateAction:o,operateEnter:e}=this,i=[];return t.type&&i.push(t.type),t.reply_data&&i.push("reply-view"),o&&(i.push("operate-action"),e&&i.push("operate-enter")),i},readList(){return this.percentageList.filter(({read_at:t})=>t)},unreadList(){return this.percentageList.filter(({read_at:t})=>!t)},todoDoneList(){return this.todoList.filter(({done_at:t})=>t)},todoUndoneList(){return this.todoList.filter(({done_at:t})=>!t)},headClass(){const{reply_id:t,type:o,msg:e,emoji:i}=this.msgData,a=[];return t===0&&$A.arrayLength(i)===0&&o==="text"&&(/^]*?>$/.test(e.text)||/^\s*

\s*([\uD800-\uDBFF][\uDC00-\uDFFF]){1,3}\s*<\/p>\s*$/.test(e.text))&&a.push("transparent"),a},contentClass(){const{type:t,msg:o}=this.msgData,e=[];return t==="text"&&(/^]*?>$/.test(o.text)?e.push("an-emoticon"):/^\s*

\s*([\uD800-\uDBFF][\uDC00-\uDFFF]){3}\s*<\/p>\s*$/.test(o.text)?e.push("three-emoji"):/^\s*

\s*([\uD800-\uDBFF][\uDC00-\uDFFF]){2}\s*<\/p>\s*$/.test(o.text)?e.push("two-emoji"):/^\s*

\s*[\uD800-\uDBFF][\uDC00-\uDFFF]\s*<\/p>\s*$/.test(o.text)&&e.push("an-emoji")),e}},watch:{operateAction(t){this.operateEnter=!1,t&&setTimeout(o=>this.operateEnter=!0,500)}},methods:{handleLongpress(t,o){this.$emit("on-longpress",{event:t,el:o,msgData:this.msgData})},openTodo(){if(!(this.todoLoad>0)){if(this.todoShow){this.todoShow=!1;return}this.todoLoad++,this.$store.dispatch("call",{url:"dialog/msg/todolist",data:{msg_id:this.msgData.id}}).then(({data:t})=>{this.todoList=t}).catch(()=>{this.todoList=[]}).finally(t=>{setTimeout(()=>{this.todoLoad--,this.todoShow=!0},100)})}},openReadPercentage(){if(!(this.percentageLoad>0)){if(this.percentageShow){this.percentageShow=!1;return}this.percentageLoad++,this.$store.dispatch("call",{url:"dialog/msg/readlist",data:{msg_id:this.msgData.id}}).then(({data:t})=>{this.percentageList=t}).catch(()=>{this.percentageList=[]}).finally(t=>{setTimeout(()=>{this.percentageLoad--,this.percentageShow=!0},100)})}},recordStyle(t){const{duration:o}=t;return{width:50+Math.min(180,Math.floor(o/150))+"px"}},recordDuration(t){const o=Math.floor(t/6e4),e=Math.floor(t/1e3)%60;return o>0?`${o}:${e}\u2033`:`${Math.max(1,e)}\u2033`},imageStyle(t){const{width:o,height:e}=t;if(o&&e){let i=220,a=220,O=o,S=e;return(o>i||e>a)&&(o>e?(O=i,S=e*(i/o)):(O=o*(a/e),S=a)),{width:O+"px",height:S+"px"}}return{}},playRecord(){this.operateVisible||this.$store.dispatch("audioPlay",this.msgData.msg.path)},openMeeting(){this.operateVisible||Tt.Store.set("addMeeting",{type:"join",name:this.msgData.msg.name,meetingid:this.msgData.msg.meetingid,meetingdisabled:!0})},viewReply(){this.$emit("on-view-reply",{msg_id:this.msgData.id,reply_id:this.msgData.reply_id})},viewText(t){this.$emit("on-view-text",t)},viewFile(){this.$emit("on-view-file",this.msgData)},downFile(){this.$emit("on-down-file",this.msgData)},replyList(){this.$emit("on-reply-list",{msg_id:this.msgData.id})},onError(){this.$emit("on-error",this.msgData)},onEmoji(t){this.$emit("on-emoji",{msg_id:this.msgData.id,symbol:t})},onShowEmojiUser(t){this.$emit("on-show-emoji-user",t)}}},At={};var me=pt(pe,he,de,!1,ve,null,null,null);function ve(t){for(let o in At)this[o]=At[o]}var ge=function(){return me.exports}(),ye=function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("div",{class:t.classArray},[t.source.type==="tag"?e("div",{staticClass:"dialog-tag",on:{click:t.onViewTag}},[e("div",{staticClass:"tag-user"},[e("UserAvatar",{attrs:{userid:t.source.userid,tooltipDisabled:t.source.userid==t.userId,"show-name":!0,"show-icon":!1}})],1),t._v(" "+t._s(t.$L(t.source.msg.action==="remove"?"\u53D6\u6D88\u6807\u6CE8":"\u6807\u6CE8\u4E86"))+' "'+t._s(t.$A.getMsgSimpleDesc(t.source.msg.data))+'" ')]):t.source.type==="todo"?e("div",{staticClass:"dialog-todo",on:{click:t.onViewTodo}},[e("div",{staticClass:"todo-user"},[e("UserAvatar",{attrs:{userid:t.source.userid,tooltipDisabled:t.source.userid==t.userId,"show-name":!0,"show-icon":!1}})],1),t._v(" "+t._s(t.$L(t.source.msg.action==="remove"?"\u53D6\u6D88\u5F85\u529E":t.source.msg.action==="done"?"\u5B8C\u6210":"\u8BBE\u5F85\u529E"))+' "'+t._s(t.$A.getMsgSimpleDesc(t.source.msg.data))+'" '),t.formatTodoUser(t.source.msg.data).length>0?e("div",{staticClass:"todo-users"},[e("span",[t._v(t._s(t.$L("\u7ED9")))]),t._l(t.formatTodoUser(t.source.msg.data),function(i,a){return[a<3?e("div",{staticClass:"todo-user"},[e("UserAvatar",{attrs:{userid:i,tooltipDisabled:i==t.userId,"show-name":!0,"show-icon":!1}})],1):a==3?e("div",{staticClass:"todo-user"},[t._v("+"+t._s(t.formatTodoUser(t.source.msg.data).length-3))]):t._e()]})],2):t._e()]):t.source.type==="notice"?e("div",{staticClass:"dialog-notice"},[t._v(" "+t._s(t.source.msg.notice)+" ")]):[e("div",{staticClass:"dialog-avatar"},[e("UserAvatar",{directives:[{name:"longpress",rawName:"v-longpress",value:{callback:t.onMention,delay:300},expression:"{callback: onMention, delay: 300}"}],attrs:{userid:t.source.userid,size:30,"tooltip-disabled":""},on:{"open-dialog":t.onOpenDialog}})],1),e("DialogView",{attrs:{"msg-data":t.source,"dialog-type":t.dialogData.type,"hide-percentage":t.hidePercentage,"hide-reply":t.hideReply,"operate-visible":t.operateVisible,"operate-action":t.operateVisible&&t.source.id===t.operateItem.id,"is-right-msg":t.isRightMsg},on:{"on-longpress":t.onLongpress,"on-view-reply":t.onViewReply,"on-view-text":t.onViewText,"on-view-file":t.onViewFile,"on-down-file":t.onDownFile,"on-reply-list":t.onReplyList,"on-error":t.onError,"on-emoji":t.onEmoji,"on-show-emoji-user":t.onShowEmojiUser}})]],2)},be=[];const _e={name:"DialogItem",components:{DialogView:ge},directives:{longpress:Ut},props:{source:{type:Object,default(){return{}}},dialogData:{type:Object,default(){return{}}},operateVisible:{type:Boolean,default:!1},operateItem:{type:Object,default(){return{}}},simpleView:{type:Boolean,default:!1},isMyDialog:{type:Boolean,default:!1},msgId:{type:Number,default:0}},data(){return{subscribe:null}},computed:{...bt(["userId"]),isRightMsg(){return this.source.userid==this.userId},isReply(){return this.simpleView||this.msgId===this.source.id},hidePercentage(){return this.simpleView||this.isMyDialog||this.isReply},hideReply(){return this.simpleView||this.msgId>0},classArray(){return{"dialog-item":!0,"reply-item":this.isReply,self:this.isRightMsg}}},watch:{source:{handler(){this.msgRead()},immediate:!0},windowActive(t){t&&this.msgRead()}},methods:{msgRead(){!this.windowActive||this.$store.dispatch("dialogMsgRead",this.source)},formatTodoUser(t){if($A.isJson(t)){const{userids:o}=t;if(o)return o.split(",")}return[]},onViewTag(){this.onViewReply({msg_id:this.source.id,reply_id:this.source.msg.data.id})},onViewTodo(){this.onViewReply({msg_id:this.source.id,reply_id:this.source.msg.data.id})},onOpenDialog(t){this.dialogData.type=="group"&&this.$store.dispatch("openDialogUserid",t).then(o=>{this.goForward({name:"manage-messenger"})}).catch(({msg:o})=>{$A.modalError(o)})},onMention(){this.dispatch("on-mention",this.source)},onLongpress(t){this.dispatch("on-longpress",t)},onViewReply(t){this.dispatch("on-view-reply",t)},onViewText(t){this.dispatch("on-view-text",t)},onViewFile(t){this.dispatch("on-view-file",t)},onDownFile(t){this.dispatch("on-down-file",t)},onReplyList(t){this.dispatch("on-reply-list",t)},onError(t){this.dispatch("on-error",t)},onEmoji(t){this.dispatch("on-emoji",t)},onShowEmojiUser(t){this.dispatch("on-show-emoji-user",t)},dispatch(t,o){if(this.isReply){this.$emit(t,o);return}let e=this.$parent,i=e.$options.name;for(;e&&(!i||i!=="virtual-list");)e=e.$parent,e&&(i=e.$options.name);e&&e.$emit(t,o)}}},Lt={};var we=pt(_e,ye,be,!1,ke,null,null,null);function ke(t){for(let o in Lt)this[o]=Lt[o]}var Ct=function(){return we.exports}(),Oe=function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("Upload",{ref:"upload",attrs:{name:"files",action:t.actionUrl,headers:t.headers,data:t.params,multiple:"",format:t.uploadFormat,"show-upload-list":!1,"max-size":t.maxSize,"on-progress":t.handleProgress,"on-success":t.handleSuccess,"on-format-error":t.handleFormatError,"on-exceeded-size":t.handleMaxSize}})},Ee=[];const Se={name:"DialogUpload",props:{dialogId:{type:Number,default:0},maxSize:{type:Number,default:1024e3}},data(){return{uploadFormat:[],actionUrl:$A.apiUrl("dialog/msg/sendfile")}},computed:{...bt(["cacheDialogs"]),headers(){return{fd:$A.getSessionStorageString("userWsFd"),token:this.userToken}},params(){return{dialog_id:this.dialogId,reply_id:this.dialogData.extra_quote_id||0}},dialogData(){return this.cacheDialogs.find(({id:t})=>t==this.dialogId)||{}}},methods:{handleProgress(t,o){o.tempId===void 0&&(this.$parent.$options.name==="DialogWrapper"?o.tempId=this.$parent.getTempId():o.tempId=$A.randNum(1e9,9999999999),this.$emit("on-progress",o))},handleSuccess(t,o){t.ret===1?(o.data=t.data,this.$emit("on-success",o),t.data.task_id&&this.$store.dispatch("getTaskFiles",t.data.task_id)):($A.modalWarning({title:"\u53D1\u9001\u5931\u8D25",content:"\u6587\u4EF6 "+o.name+" \u53D1\u9001\u5931\u8D25\uFF0C"+t.msg}),this.$emit("on-error",o),this.$refs.upload.fileList.pop())},handleFormatError(t){$A.modalWarning({title:"\u6587\u4EF6\u683C\u5F0F\u4E0D\u6B63\u786E",content:"\u6587\u4EF6 "+t.name+" \u683C\u5F0F\u4E0D\u6B63\u786E\uFF0C\u4EC5\u652F\u6301\u53D1\u9001\uFF1A"+this.uploadFormat.join(",")})},handleMaxSize(t){$A.modalWarning({title:"\u8D85\u51FA\u6587\u4EF6\u5927\u5C0F\u9650\u5236",content:"\u6587\u4EF6 "+t.name+" \u592A\u5927\uFF0C\u4E0D\u80FD\u53D1\u9001\u8D85\u8FC7"+$A.bytesToSize(this.maxSize*1024)+"\u3002"})},handleClick(){this.$refs.upload.handleClick()},upload(t){this.$refs.upload.upload(t)}}},It={};var Te=pt(Se,Oe,Ee,!1,xe,null,null,null);function xe(t){for(let o in It)this[o]=It[o]}var Ae=function(){return Te.exports}(),Le=function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("div",{staticClass:"dialog-group-info"},[e("div",{staticClass:"group-info-title"},[t._v(t._s(t.$L("\u7FA4\u540D")))]),e("div",{staticClass:"group-info-value"},[e("QuickEdit",{attrs:{value:t.dialogData.name,disabled:t.dialogData.owner_id!=t.userId},on:{"on-update":t.updateName}},[t._v(t._s(t.dialogData.name))])],1),e("div",{staticClass:"group-info-title"},[t._v(t._s(t.$L("\u7FA4\u7C7B\u578B")))]),e("div",{staticClass:"group-info-value"},[t._v(t._s(t.$L(t.groupType)))]),e("div",{staticClass:"group-info-search"},[e("Input",{attrs:{prefix:"ios-search",placeholder:t.$L("\u641C\u7D22\u6210\u5458"),clearable:""},model:{value:t.searchKey,callback:function(i){t.searchKey=i},expression:"searchKey"}})],1),e("div",{staticClass:"group-info-user"},[e("ul",[t._l(t.userList,function(i,a){return e("li",{key:a,on:{click:function(O){return t.openUser(i.userid)}}},[e("UserAvatar",{attrs:{userid:i.userid,size:32,showName:"",tooltipDisabled:""}}),i.userid===t.dialogData.owner_id?e("div",{staticClass:"user-tag"},[t._v(t._s(t.$L("\u7FA4\u4E3B")))]):t.operableExit(i)?e("div",{staticClass:"user-exit",on:{click:function(O){return O.stopPropagation(),t.onExit(i)}}},[e("Icon",{attrs:{type:"md-exit"}})],1):t._e()],1)}),t.userList.length===0?e("li",{staticClass:"no"},[t.loadIng>0?e("Loading"):e("span",[t._v(t._s(t.$L("\u6CA1\u6709\u7B26\u5408\u6761\u4EF6\u7684\u6570\u636E")))])],1):t._e()],2)]),t.operableAdd?e("div",{staticClass:"group-info-button"},[t.dialogData.owner_id==t.userId||t.dialogData.owner_id==0?e("Button",{attrs:{type:"primary",icon:"md-add"},on:{click:t.openAdd}},[t._v(t._s(t.$L("\u6DFB\u52A0\u6210\u5458")))]):t._e()],1):t._e(),e("Modal",{attrs:{title:t.$L("\u6DFB\u52A0\u7FA4\u6210\u5458"),"mask-closable":!1},model:{value:t.addShow,callback:function(i){t.addShow=i},expression:"addShow"}},[e("Form",{attrs:{model:t.addData,"label-width":"auto"},nativeOn:{submit:function(i){i.preventDefault()}}},[e("FormItem",{attrs:{prop:"userids",label:t.$L("\u65B0\u589E\u6210\u5458")}},[e("UserInput",{attrs:{disabledChoice:t.addData.disabledChoice,"multiple-max":100,"show-bot":"",placeholder:t.$L("\u9009\u62E9\u6210\u5458")},model:{value:t.addData.userids,callback:function(i){t.$set(t.addData,"userids",i)},expression:"addData.userids"}}),t.dialogData.group_type==="department"?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u6B64\u64CD\u4F5C\u4EC5\u52A0\u5165\u7FA4\u6210\u5458\u5E76\u4E0D\u4F1A\u52A0\u5165\u90E8\u95E8")))]):t.dialogData.group_type==="project"?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u6B64\u64CD\u4F5C\u4EC5\u52A0\u5165\u7FA4\u6210\u5458\u5E76\u4E0D\u4F1A\u52A0\u5165\u9879\u76EE")))]):t.dialogData.group_type==="task"?e("div",{staticClass:"form-tip"},[t._v(t._s(t.$L("\u6B64\u64CD\u4F5C\u4EC5\u52A0\u5165\u7FA4\u6210\u5458\u5E76\u4E0D\u4F1A\u52A0\u5165\u4EFB\u52A1\u8D1F\u8D23\u4EBA")))]):t._e()],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(i){t.addShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.addLoad>0},on:{click:t.onAdd}},[t._v(t._s(t.$L("\u786E\u5B9A\u6DFB\u52A0")))])],1)],1)],1)},Ce=[];const Ie={name:"DialogGroupInfo",components:{UserInput:Ht},props:{dialogId:{type:Number,default:0}},data(){return{searchKey:"",loadIng:0,dialogUser:[],addShow:!1,addData:{},addLoad:0,openIng:!1}},computed:{...bt(["cacheDialogs","cacheUserBasic","userIsAdmin"]),dialogData(){return this.cacheDialogs.find(({id:t})=>t==this.dialogId)||{}},groupType(){const{group_type:t}=this.dialogData;return t==="department"?"\u90E8\u95E8\u7FA4\u7EC4":t==="project"?"\u9879\u76EE\u7FA4\u7EC4":t==="task"?"\u4EFB\u52A1\u7FA4\u7EC4":t==="user"?"\u4E2A\u4EBA\u7FA4\u7EC4":t==="all"?"\u5168\u5458\u7FA4\u7EC4":"\u672A\u77E5"},userList(){const{dialogUser:t,searchKey:o,cacheUserBasic:e,dialogData:i}=this;return t.map(O=>{const S=e.find(w=>w.userid==O.userid);return S&&(O.nickname=S.nickname,O.email=S.email),O}).filter(O=>!(o&&O.nickname&&!$A.strExists(O.nickname,o)&&!$A.strExists(O.email,o))).sort((O,S)=>O.userid===i.owner_id||S.userid===i.owner_id?(O.userid===i.owner_id?0:1)-(S.userid===i.owner_id?0:1):$A.Date(O.created_at)-$A.Date(S.created_at))}},watch:{dialogId:{handler(){this.getDialogUser()},immediate:!0}},methods:{updateName(t,o){if(!t){o();return}this.$store.dispatch("call",{url:"dialog/group/edit",data:{dialog_id:this.dialogId,chat_name:t}}).then(({data:e})=>{this.$store.dispatch("saveDialog",e),o()}).catch(({msg:e})=>{$A.modalError(e),o()})},getDialogUser(){this.dialogId<=0||(this.loadIng++,this.$store.dispatch("call",{url:"dialog/user",data:{dialog_id:this.dialogId}}).then(({data:t})=>{this.dialogUser=t,this.$store.dispatch("saveDialog",{id:this.dialogId,people:t.length})}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.loadIng--}))},operableAdd(){const{owner_id:t,group_type:o}=this.dialogData;return o=="all"?this.userIsAdmin:[0,this.userId].includes(t)},openAdd(){this.addData={dialog_id:this.dialogId,userids:[],disabledChoice:this.dialogUser.map(t=>t.userid)},this.addShow=!0},onAdd(){this.addLoad++,this.$store.dispatch("call",{url:"dialog/group/adduser",data:this.addData}).then(({msg:t})=>{$A.messageSuccess(t),this.addShow=!1,this.addData={},this.getDialogUser()}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.addLoad--})},operableExit(t){const{owner_id:o,group_type:e}=this.dialogData;return e=="all"?this.userIsAdmin:o==this.userId||t.inviter==this.userId},onExit(t){let o="\u4F60\u786E\u5B9A\u8981\u9000\u51FA\u7FA4\u7EC4\u5417\uFF1F",e=[];$A.isJson(t)&&t.userid!=this.userId&&(o=`\u4F60\u786E\u5B9A\u8981\u5C06\u3010${t.nickname}\u3011\u79FB\u51FA\u7FA4\u7EC4\u5417\uFF1F`,e=[t.userid]),$A.modalConfirm({content:o,loading:!0,onOk:()=>new Promise((i,a)=>{this.$store.dispatch("call",{url:"dialog/group/deluser",data:{dialog_id:this.dialogId,userids:e}}).then(({msg:O})=>{i(O),e.length>0?this.getDialogUser():(this.$store.dispatch("forgetDialog",this.dialogId),this.goForward({name:"manage-messenger"}))}).catch(({msg:O})=>{a(O)})})})},openUser(t){this.openIng||(this.openIng=!0,this.$store.dispatch("openDialogUserid",t).then(o=>{this.$emit("on-close")}).catch(({msg:o})=>{$A.modalError(o)}).finally(o=>{this.openIng=!1}))}}},Dt={};var De=pt(Ie,Le,Ce,!1,$e,null,null,null);function $e(t){for(let o in Dt)this[o]=Dt[o]}var Me=function(){return De.exports}(),Ne=function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("div",{staticClass:"dialog-respond"},[e("div",{staticClass:"respond-title"},[e("em",[t._v(t._s(t.respondData.symbol))]),t._v(t._s(t.$L("\u56DE\u5E94\u8BE6\u60C5"))+" ("+t._s(t.respondData.userids.length)+")")]),e("div",{staticClass:"respond-user"},[e("ul",t._l(t.respondData.userids,function(i,a){return e("li",{key:a,on:{click:function(O){return t.openUser(i)}}},[e("UserAvatar",{attrs:{userid:i,size:32,showName:"",tooltipDisabled:""}})],1)}),0)])])},Pe=[];const je={name:"DialogRespond",props:{respondData:{type:Object,default:()=>({})}},data(){return{openIng:!1}},methods:{openUser(t){this.openIng||(this.openIng=!0,this.$store.dispatch("openDialogUserid",t).then(o=>{this.$emit("on-close")}).catch(({msg:o})=>{$A.modalError(o)}).finally(o=>{this.openIng=!1}))}}},$t={};var Re=pt(je,Ne,Pe,!1,qe,null,null,null);function qe(t){for(let o in $t)this[o]=$t[o]}var Be=function(){return Re.exports}(),Vt={exports:{}};/*! * Quill Editor v1.3.7 * https://quilljs.com/ * Copyright (c) 2014, Jason Chen @@ -45,5 +45,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho * open source under the MIT license * https://github.com/tangbc/vue-virtual-scroll-list#readme */(function(t,o){(function(e,i){t.exports=i(te)})(zt,function(e){e=e&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e;function i(v,y){if(!(v instanceof y))throw new TypeError("Cannot call a class as a function")}function a(v,y){for(var k=0;kv.length)&&(y=v.length);for(var k=0,I=new Array(y);kthis.range.start)){var I=Math.max(k-this.param.buffer,0);this.checkRange(I,this.getEndByStart(I))}}},{key:"handleBehind",value:function(){var k=this.getScrollOvers();kk&&(W=j-1)}return I>0?--I:0}},{key:"getIndexOffset",value:function(k){if(!k)return 0;for(var I=0,j=0,B=0;B1&&arguments[1]!==void 0?arguments[1]:0;if(y>=this.dataSources.length-1)this.scrollToBottom();else{var I=this.virtual.getOffset(y);k!==0&&(I=Math.max(0,I+k)),this.scrollToOffset(I)}},scrollToBottom:function(){var y=this,k=this.$refs.shepherd;if(k){var I=k[this.isHorizontal?"offsetLeft":"offsetTop"];this.scrollToOffset(I),this.toBottomTime&&(clearTimeout(this.toBottomTime),this.toBottomTime=null),this.toBottomTime=setTimeout(function(){y.getOffset()+y.getClientSize()+1j+1||!j||(this.virtual.handleScroll(k),this.emitEvent(k,I,j,y))}},emitEvent:function(y,k,I,j){this.$emit("scroll",j,this.virtual.getRange()),this.virtual.isFront()&&!!this.dataSources.length&&y-this.topThreshold<=0?this.$emit("totop"):this.virtual.isBehind()&&y+k+this.bottomThreshold>=I&&this.$emit("tobottom")},getRenderSlots:function(y){for(var k=[],I=this.range,j=I.start,B=I.end,W=this.dataSources,q=this.dataKey,N=this.itemClass,L=this.itemTag,M=this.itemStyle,P=this.isHorizontal,z=this.extraProps,F=this.dataComponent,$=this.itemScopedSlots,R=this.$scopedSlots&&this.$scopedSlots.item,U=j;U<=B;U++){var H=W[U];if(H){var G=typeof q=="function"?q(H):H[q];typeof G=="string"||typeof G=="number"?k.push(y(x,{props:{index:U,tag:L,event:D.ITEM,horizontal:P,uniqueKey:G,source:H,extraProps:z,component:F,slotComponent:R,scopedSlots:$},style:M,class:"".concat(N).concat(this.itemClassAdd?" "+this.itemClassAdd(U):"")})):console.warn("Cannot get the data-key '".concat(q,"' from data-sources."))}else console.warn("Cannot get the index '".concat(U,"' from data-sources."))}return k}},render:function(y){var k=this.$slots,I=k.header,j=k.footer,B=this.range,W=B.padFront,q=B.padBehind,N=this.isHorizontal,L=this.pageMode,M=this.rootTag,P=this.wrapTag,z=this.wrapClass,F=this.wrapStyle,$=this.headerTag,R=this.headerClass,U=this.headerStyle,H=this.footerTag,G=this.footerClass,X=this.footerStyle,J=this.disabled,tt={padding:N?"0px ".concat(q,"px 0px ").concat(W,"px"):"".concat(W,"px 0px ").concat(q,"px")},nt=F?Object.assign({},F,tt):tt;return y(M,{ref:"root",style:J?{overflow:"hidden"}:null,on:{"&scroll":!L&&this.onScroll}},[I?y(A,{class:R,style:U,props:{tag:$,event:D.SLOT,uniqueKey:T.HEADER}},I):null,y(P,{class:z,attrs:{role:"group"},style:nt},this.getRenderSlots(y)),j?y(A,{class:G,style:X,props:{tag:H,event:D.SLOT,uniqueKey:T.FOOTER}},j):null,y("div",{ref:"shepherd",style:{width:N?"0px":"100%",height:N?"100%":"0px"}})])}});return E})})(Yt);var mi=Yt.exports;function vi(){return new Promise(t=>{const o=new ee({render(a){return a(ie.exports.Modal,{class:"chat-emoji-one-modal",props:{fullscreen:!0,footerHide:!0},on:{"on-visible-change":O=>{O||setTimeout(S=>{document.body.removeChild(this.$el)},500)}}},[a(Qt,{attrs:{onlyEmoji:!0},on:{"on-select":O=>{this.$children[0].visible=!1,O.type==="emoji"&&t(O.text)}}})])}}),e=o.$mount();document.body.appendChild(e.$el);const i=o.$children[0];i.visible=!0,i.$el.lastChild.addEventListener("click",({target:a})=>{a.classList.contains("ivu-modal-body")&&(i.visible=!1)})})}var gi=function(){var t=this,o=t.$createElement,e=t._self._c||o;return t.isReady?e("div",{staticClass:"dialog-wrapper",class:t.wrapperClass,on:{drop:function(i){return i.preventDefault(),t.chatPasteDrag(i,"drag")},dragover:function(i){return i.preventDefault(),t.chatDragOver(!0,i)},dragleave:function(i){return i.preventDefault(),t.chatDragOver(!1,i)},touchstart:t.onTouchStart,touchmove:t.onTouchMove}},[e("div",{staticClass:"dialog-nav",style:t.navStyle},[t._t("head",function(){return[e("div",{staticClass:"nav-wrapper",class:{completed:t.$A.dialogCompleted(t.dialogData)}},[e("div",{staticClass:"dialog-back",on:{click:t.onBack}},[e("i",{staticClass:"taskfont"},[t._v("\uE676")]),t.msgUnreadOnly?e("div",{staticClass:"back-num"},[t._v(t._s(t.msgUnreadOnly))]):t._e()]),e("div",{staticClass:"dialog-block"},[e("div",{staticClass:"dialog-avatar",on:{click:t.onViewAvatar}},[t.dialogData.type=="group"?[t.dialogData.avatar?e("EAvatar",{staticClass:"img-avatar",attrs:{src:t.dialogData.avatar,size:42}}):t.dialogData.group_type=="department"?e("i",{staticClass:"taskfont icon-avatar department"},[t._v("\uE75C")]):t.dialogData.group_type=="project"?e("i",{staticClass:"taskfont icon-avatar project"},[t._v("\uE6F9")]):t.dialogData.group_type=="task"?e("i",{staticClass:"taskfont icon-avatar task"},[t._v("\uE6F4")]):e("Icon",{staticClass:"icon-avatar",attrs:{type:"ios-people"}})]:t.dialogData.dialog_user?e("div",{staticClass:"user-avatar"},[e("UserAvatar",{attrs:{online:t.dialogData.online_state,userid:t.dialogData.dialog_user.userid,size:42},on:{"update:online":function(i){return t.$set(t.dialogData,"online_state",i)}}},[t.dialogData.type==="user"&&t.dialogData.online_state!==!0?e("p",{attrs:{slot:"end"},slot:"end"},[t._v(" "+t._s(t.$L(t.dialogData.online_state))+" ")]):t._e()])],1):e("Icon",{staticClass:"icon-avatar",attrs:{type:"md-person"}})],2),e("div",{staticClass:"dialog-title"},[e("div",{staticClass:"main-title"},[t._l(t.$A.dialogTags(t.dialogData),function(i){return i.color!="success"?[e("Tag",{attrs:{color:i.color,fade:!1}},[t._v(t._s(t.$L(i.text)))])]:t._e()}),e("h2",[t._v(t._s(t.dialogData.name))]),t.peopleNum>0?e("em",{on:{click:function(i){return t.onDialogMenu("groupInfo")}}},[t._v("("+t._s(t.peopleNum)+")")]):t._e(),t.dialogData.bot?e("Tag",{staticClass:"after",attrs:{fade:!1}},[t._v(t._s(t.$L("\u673A\u5668\u4EBA")))]):t._e(),t.dialogData.group_type=="all"?e("Tag",{staticClass:"after pointer",attrs:{fade:!1},on:{"on-click":function(i){return t.onDialogMenu("groupInfo")}}},[t._v(t._s(t.$L("\u5168\u5458")))]):t.dialogData.group_type=="department"?e("Tag",{staticClass:"after pointer",attrs:{fade:!1},on:{"on-click":function(i){return t.onDialogMenu("groupInfo")}}},[t._v(t._s(t.$L("\u90E8\u95E8")))]):t._e(),t.msgLoadIng>0?e("div",{staticClass:"load"},[e("Loading")],1):t._e()],2),e("ul",{staticClass:"title-desc"},[t.dialogData.type==="user"?e("li",{class:[t.dialogData.online_state===!0?"online":"offline"]},[t._v(" "+t._s(t.$L(t.dialogData.online_state===!0?"\u5728\u7EBF":t.dialogData.online_state))+" ")]):t._e()]),t.tagShow?e("ul",{staticClass:"title-tags scrollbar-hidden"},t._l(t.msgTags,function(i){var a;return e("li",{key:i.type,class:(a={},a[i.type||"msg"]=!0,a.active=t.msgType===i.type,a),on:{click:function(O){return t.onMsgType(i.type)}}},[e("i",{staticClass:"no-dark-content"}),e("span",[t._v(t._s(t.$L(i.label)))])])}),0):t._e()])]),e("EDropdown",{staticClass:"dialog-menu",attrs:{trigger:"click"},on:{command:t.onDialogMenu}},[e("i",{staticClass:"taskfont dialog-menu-icon"},[t._v("\uE6E9")]),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e("EDropdownItem",{attrs:{command:"searchMsg"}},[e("div",[t._v(t._s(t.$L("\u641C\u7D22\u6D88\u606F")))])]),t.dialogData.type==="user"?e("EDropdownItem",{attrs:{command:"openCreate"}},[e("div",[t._v(t._s(t.$L("\u521B\u5EFA\u7FA4\u7EC4")))])]):[e("EDropdownItem",{attrs:{command:"groupInfo"}},[e("div",[t._v(t._s(t.$L("\u7FA4\u7EC4\u8BBE\u7F6E")))])]),t.dialogData.owner_id!=t.userId?[t.dialogData.group_type==="all"&&t.userIsAdmin?e("EDropdownItem",{attrs:{command:"avatarAdmin"}},[e("div",[t._v(t._s(t.$L("\u4FEE\u6539\u5934\u50CF")))])]):t._e(),e("EDropdownItem",{attrs:{command:"exit"}},[e("div",{staticStyle:{color:"#f00"}},[t._v(t._s(t.$L("\u9000\u51FA\u7FA4\u7EC4")))])])]:t.dialogData.group_type==="user"?[e("EDropdownItem",{attrs:{command:"avatar"}},[e("div",[t._v(t._s(t.$L("\u4FEE\u6539\u5934\u50CF")))])]),e("EDropdownItem",{attrs:{command:"transfer"}},[e("div",[t._v(t._s(t.$L("\u8F6C\u8BA9\u7FA4\u4E3B")))])]),e("EDropdownItem",{attrs:{command:"disband"}},[e("div",{staticStyle:{color:"#f00"}},[t._v(t._s(t.$L("\u89E3\u6563\u7FA4\u7EC4")))])])]:t._e()]],2)],1),t.searchShow?e("div",{staticClass:"dialog-search"},[e("div",{staticClass:"search-location"},[e("i",{staticClass:"taskfont",on:{click:function(i){return t.onSearchSwitch("prev")}}},[t._v("\uE702")]),e("i",{staticClass:"taskfont",on:{click:function(i){return t.onSearchSwitch("next")}}},[t._v("\uE705")])]),e("div",{staticClass:"search-input"},[e("Input",{ref:"searchInput",attrs:{placeholder:t.$L("\u641C\u7D22\u6D88\u606F"),clearable:""},on:{"on-keyup":t.onSearchKeyup},model:{value:t.searchKey,callback:function(i){t.searchKey=i},expression:"searchKey"}},[e("div",{staticClass:"search-pre",attrs:{slot:"prefix"},slot:"prefix"},[t.searchLoad>0?e("Loading"):e("Icon",{attrs:{type:"ios-search"}})],1)]),t.searchLoad===0&&t.searchResult.length>0?e("div",{staticClass:"search-total",attrs:{slot:"append"},slot:"append"},[t._v(t._s(t.searchLocation)+"/"+t._s(t.searchResult.length))]):t._e()],1),e("div",{staticClass:"search-cancel",on:{click:function(i){return t.onSearchKeyup(null)}}},[t._v(t._s(t.$L("\u53D6\u6D88")))])]):t._e()],1)]})],2),t.positionMsg?e("div",{staticClass:"dialog-position",class:{down:t.tagShow}},[e("div",{staticClass:"position-label",on:{click:t.onPositionMark}},[t.positionLoad>0?e("Icon",{staticClass:"icon-loading",attrs:{type:"ios-loading"}}):e("i",{staticClass:"taskfont"},[t._v("\uE624")]),t._v(" "+t._s(t.positionMsg.label)+" ")],1)]):t._e(),e("VirtualList",{ref:"scroller",staticClass:"dialog-scroller scrollbar-overlay",class:t.scrollerClass,attrs:{"data-key":"id","data-sources":t.allMsgs,"data-component":t.msgItem,"item-class-add":t.itemClassAdd,"extra-props":{dialogData:t.dialogData,operateVisible:t.operateVisible,operateItem:t.operateItem,isMyDialog:t.isMyDialog,msgId:t.msgId},"estimate-size":t.dialogData.type=="group"?105:77,keeps:50,disabled:t.scrollDisabled},on:{scroll:t.onScroll,range:t.onRange,totop:t.onPrevPage,"on-mention":t.onMention,"on-longpress":t.onLongpress,"on-view-reply":t.onViewReply,"on-view-text":t.onViewText,"on-view-file":t.onViewFile,"on-down-file":t.onDownFile,"on-reply-list":t.onReplyList,"on-error":t.onError,"on-emoji":t.onEmoji,"on-show-emoji-user":t.onShowEmojiUser},scopedSlots:t._u([{key:"header",fn:function(){return[t.allMsgs.length===0&&t.loadMsg||t.prevId>0?e("div",{staticClass:"dialog-item loading"},[t.scrollOffset<100?e("div",{staticClass:"dialog-wrapper-loading"}):t._e()]):t.allMsgs.length===0?e("div",{staticClass:"dialog-item nothing"},[t._v(t._s(t.$L("\u6682\u65E0\u6D88\u606F")))]):t._e()]},proxy:!0}],null,!1,2675320288)}),e("div",{ref:"footer",staticClass:"dialog-footer",class:t.footerClass,on:{click:t.onActive}},[e("div",{staticClass:"dialog-newmsg",on:{click:t.onToBottom}},[t._v(t._s(t.$L(`\u6709${t.msgNew}\u6761\u65B0\u6D88\u606F`)))]),e("div",{staticClass:"dialog-goto",on:{click:t.onToBottom}},[e("i",{staticClass:"taskfont"},[t._v("\uE72B")])]),e("DialogUpload",{ref:"chatUpload",staticClass:"chat-upload",attrs:{"dialog-id":t.dialogId},on:{"on-progress":function(i){return t.chatFile("progress",i)},"on-success":function(i){return t.chatFile("success",i)},"on-error":function(i){return t.chatFile("error",i)}}}),t.todoShow?e("div",{staticClass:"chat-bottom-menu"},[e("div",{staticClass:"bottom-menu-label"},[t._v(t._s(t.$L("\u5F85\u529E"))+":")]),e("ul",{staticClass:"scrollbar-hidden"},t._l(t.todoList,function(i){return e("li",{on:{click:function(a){return a.stopPropagation(),t.onViewTodo(i)}}},[e("div",{staticClass:"bottom-menu-desc no-dark-content"},[t._v(t._s(t.$A.getMsgSimpleDesc(i.msg_data)))])])}),0)]):t.quickShow?e("div",{staticClass:"chat-bottom-menu"},[e("ul",{staticClass:"scrollbar-hidden"},t._l(t.quickMsgs,function(i){return e("li",{on:{click:function(a){return a.stopPropagation(),t.sendQuick(i)}}},[e("div",{staticClass:"bottom-menu-desc no-dark-content",style:i.style||null},[t._v(t._s(i.label))])])}),0)]):t._e(),t.isMute?e("div",{staticClass:"chat-mute"},[t._v(" "+t._s(t.$L("\u7981\u8A00\u53D1\u8A00"))+" ")]):e("ChatInput",{ref:"input",attrs:{"dialog-id":t.dialogId,"emoji-bottom":t.windowSmall,maxlength:2e5,placeholder:t.$L("\u8F93\u5165\u6D88\u606F...")},on:{"on-focus":t.onEventFocus,"on-blur":t.onEventBlur,"on-more":t.onEventMore,"on-file":t.sendFileMsg,"on-send":t.sendMsg,"on-record":t.sendRecord,"on-record-state":t.onRecordState,"on-emoji-visible-change":t.onEventEmojiVisibleChange,"on-height-change":t.onHeightChange},model:{value:t.msgText,callback:function(i){t.msgText=i},expression:"msgText"}})],1),e("div",{directives:[{name:"show",rawName:"v-show",value:t.operateVisible,expression:"operateVisible"}],staticClass:"operate-position",style:t.operateStyles},[e("Dropdown",{attrs:{trigger:"custom",placement:"top",visible:t.operateVisible,transferClassName:"dialog-wrapper-operate",transfer:""},on:{"on-clickoutside":function(i){t.operateVisible=!1}}},[e("div",{style:{userSelect:t.operateVisible?"none":"auto",height:t.operateStyles.height}}),e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[e("DropdownItem",{attrs:{name:"action"}},[e("ul",{staticClass:"operate-action"},[t.msgId===0?e("li",{on:{click:function(i){return t.onOperate("reply")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE6EB")]),e("span",[t._v(t._s(t.$L("\u56DE\u590D")))])]):t._e(),t.operateItem.userid==t.userId&&t.operateItem.type==="text"?e("li",{on:{click:function(i){return t.onOperate("update")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE779")]),e("span",[t._v(t._s(t.$L("\u7F16\u8F91")))])]):t._e(),t._l(t.operateCopys,function(i){return e("li",{on:{click:function(a){return t.onOperate("copy",i)}}},[e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(i.icon)}}),e("span",[t._v(t._s(t.$L(i.label)))])])}),e("li",{on:{click:function(i){return t.onOperate("forward")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE638")]),e("span",[t._v(t._s(t.$L("\u8F6C\u53D1")))])]),t.operateItem.userid==t.userId?e("li",{on:{click:function(i){return t.onOperate("withdraw")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE637")]),e("span",[t._v(t._s(t.$L("\u64A4\u56DE")))])]):t._e(),t.operateItem.type==="file"?[e("li",{on:{click:function(i){return t.onOperate("view")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE77B")]),e("span",[t._v(t._s(t.$L("\u67E5\u770B")))])]),e("li",{on:{click:function(i){return t.onOperate("down")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE7A8")]),e("span",[t._v(t._s(t.$L("\u4E0B\u8F7D")))])])]:t._e(),e("li",{on:{click:function(i){return t.onOperate("tag")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE61E")]),e("span",[t._v(t._s(t.$L(t.operateItem.tag?"\u53D6\u6D88\u6807\u6CE8":"\u6807\u6CE8")))])]),t.operateItem.type==="text"?e("li",{on:{click:function(i){return t.onOperate("newTask")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE7B8")]),e("span",[t._v(t._s(t.$L("\u65B0\u4EFB\u52A1")))])]):t._e(),e("li",{on:{click:function(i){return t.onOperate("todo")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE7B7")]),e("span",[t._v(t._s(t.$L(t.operateItem.todo?"\u53D6\u6D88\u5F85\u529E":"\u8BBE\u5F85\u529E")))])]),t.msgType!==""?e("li",{on:{click:function(i){return t.onOperate("pos")}}},[e("i",{staticClass:"taskfont"},[t._v("\uEE15")]),e("span",[t._v(t._s(t.$L("\u5B8C\u6574\u5BF9\u8BDD")))])]):t._e()],2)]),e("DropdownItem",{staticClass:"dropdown-emoji",attrs:{name:"emoji"}},[e("ul",{staticClass:"operate-emoji scrollbar-hidden"},[t._l(t.operateEmojis,function(i,a){return e("li",{key:a,staticClass:"no-dark-content",domProps:{innerHTML:t._s(i)},on:{click:function(O){return t.onOperate("emoji",i)}}})}),e("li"),e("li",{staticClass:"more-emoji",on:{click:function(i){return t.onOperate("emoji","more")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE790")])])],2)])],1)],1)],1),t.dialogDrag?e("div",{staticClass:"drag-over",on:{click:function(i){t.dialogDrag=!1}}},[e("div",{staticClass:"drag-text"},[t._v(t._s(t.$L("\u62D6\u52A8\u5230\u8FD9\u91CC\u53D1\u9001")))])]):t._e(),e("Modal",{attrs:{title:t.$L(t.pasteTitle),"cancel-text":t.$L("\u53D6\u6D88"),"ok-text":t.$L("\u53D1\u9001"),"enter-ok":!0},on:{"on-ok":t.pasteSend},model:{value:t.pasteShow,callback:function(i){t.pasteShow=i},expression:"pasteShow"}},[e("ul",{staticClass:"dialog-wrapper-paste",class:t.pasteWrapperClass},t._l(t.pasteItem,function(i){return e("li",[i.type=="image"?e("img",{attrs:{src:i.result}}):e("div",[t._v(t._s(t.$L("\u6587\u4EF6"))+": "+t._s(i.name)+" ("+t._s(t.$A.bytesToSize(i.size))+")")])])}),0)]),e("Modal",{attrs:{title:t.$L("\u521B\u5EFA\u7FA4\u7EC4"),"mask-closable":!1},model:{value:t.createGroupShow,callback:function(i){t.createGroupShow=i},expression:"createGroupShow"}},[e("Form",{attrs:{model:t.createGroupData,"label-width":"auto"},nativeOn:{submit:function(i){i.preventDefault()}}},[e("FormItem",{attrs:{prop:"avatar",label:t.$L("\u7FA4\u5934\u50CF")}},[e("ImgUpload",{attrs:{num:1,width:512,height:512,whcut:1},model:{value:t.createGroupData.avatar,callback:function(i){t.$set(t.createGroupData,"avatar",i)},expression:"createGroupData.avatar"}})],1),e("FormItem",{attrs:{prop:"chat_name",label:t.$L("\u7FA4\u540D\u79F0")}},[e("Input",{attrs:{placeholder:t.$L("\u8F93\u5165\u7FA4\u540D\u79F0\uFF08\u9009\u586B\uFF09")},model:{value:t.createGroupData.chat_name,callback:function(i){t.$set(t.createGroupData,"chat_name",i)},expression:"createGroupData.chat_name"}})],1),e("FormItem",{attrs:{prop:"userids",label:t.$L("\u7FA4\u6210\u5458")}},[e("UserInput",{attrs:{uncancelable:t.createGroupData.uncancelable,"multiple-max":100,"show-bot":"",placeholder:t.$L("\u9009\u62E9\u9879\u76EE\u6210\u5458")},model:{value:t.createGroupData.userids,callback:function(i){t.$set(t.createGroupData,"userids",i)},expression:"createGroupData.userids"}})],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(i){t.createGroupShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.createGroupLoad>0},on:{click:t.onCreateGroup}},[t._v(t._s(t.$L("\u521B\u5EFA")))])],1)],1),e("Modal",{attrs:{title:t.$L("\u4FEE\u6539\u5934\u50CF"),"mask-closable":!1},model:{value:t.avatarModifyShow,callback:function(i){t.avatarModifyShow=i},expression:"avatarModifyShow"}},[e("Form",{attrs:{model:t.avatarModifyData,"label-width":"auto"},nativeOn:{submit:function(i){i.preventDefault()}}},[e("FormItem",{attrs:{prop:"avatar",label:t.$L("\u7FA4\u5934\u50CF")}},[e("ImgUpload",{attrs:{num:1,width:512,height:512,whcut:1},model:{value:t.avatarModifyData.avatar,callback:function(i){t.$set(t.avatarModifyData,"avatar",i)},expression:"avatarModifyData.avatar"}})],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(i){t.avatarModifyShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.avatarModifyLoad>0},on:{click:t.onAvatarModify}},[t._v(t._s(t.$L("\u4FDD\u5B58")))])],1)],1),e("Modal",{attrs:{title:t.$L("\u8F6C\u53D1"),"mask-closable":!1},model:{value:t.forwardShow,callback:function(i){t.forwardShow=i},expression:"forwardShow"}},[e("DialogSelect",{model:{value:t.forwardData,callback:function(i){t.forwardData=i},expression:"forwardData"}}),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(i){t.forwardShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.forwardLoad},on:{click:function(i){return t.onForward("submit")}}},[t._v(t._s(t.$L("\u8F6C\u53D1")))])],1)],1),e("Modal",{attrs:{title:t.$L("\u8BBE\u7F6E\u5F85\u529E"),"mask-closable":!1},model:{value:t.todoSettingShow,callback:function(i){t.todoSettingShow=i},expression:"todoSettingShow"}},[e("Form",{ref:"todoSettingForm",attrs:{model:t.todoSettingData,"label-width":"auto"},nativeOn:{submit:function(i){i.preventDefault()}}},[e("FormItem",{attrs:{prop:"type",label:t.$L("\u5F53\u524D\u4F1A\u8BDD")}},[e("RadioGroup",{model:{value:t.todoSettingData.type,callback:function(i){t.$set(t.todoSettingData,"type",i)},expression:"todoSettingData.type"}},[e("Radio",{attrs:{label:"all"}},[t._v(t._s(t.$L("\u6240\u6709\u6210\u5458")))]),e("Radio",{attrs:{label:"user"}},[t._v(t._s(t.$L("\u6307\u5B9A\u6210\u5458")))]),t.todoSettingData.my_id?e("Radio",{attrs:{label:"my"}},[e("div",{staticClass:"dialog-wrapper-todo"},[e("div",[e("UserAvatar",{attrs:{userid:t.todoSettingData.my_id,"show-icon":!1,"show-name":!0}}),e("Tag",[t._v(t._s(t.$L("\u81EA\u5DF1")))])],1)])]):t._e(),t.todoSettingData.you_id?e("Radio",{attrs:{label:"you"}},[e("div",{staticClass:"dialog-wrapper-todo"},[e("div",[e("UserAvatar",{attrs:{userid:t.todoSettingData.you_id,"show-icon":!1,"show-name":!0}})],1)])]):t._e()],1)],1),t.todoSettingData.type==="user"?e("FormItem",{attrs:{prop:"userids"}},[e("UserInput",{attrs:{"dialog-id":t.dialogId,placeholder:t.$L("\u9009\u62E9\u6307\u5B9A\u6210\u5458")},model:{value:t.todoSettingData.userids,callback:function(i){t.$set(t.todoSettingData,"userids",i)},expression:"todoSettingData.userids"}})],1):t._e()],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(i){t.todoSettingShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.todoSettingLoad>0},on:{click:function(i){return t.onTodo("submit")}}},[t._v(t._s(t.$L("\u786E\u5B9A")))])],1)],1),e("DrawerOverlay",{attrs:{placement:"right",size:400},model:{value:t.groupInfoShow,callback:function(i){t.groupInfoShow=i},expression:"groupInfoShow"}},[t.groupInfoShow?e("DialogGroupInfo",{attrs:{dialogId:t.dialogId},on:{"on-close":function(i){t.groupInfoShow=!1}}}):t._e()],1),e("Modal",{attrs:{title:t.$L("\u8F6C\u8BA9\u7FA4\u4E3B\u8EAB\u4EFD"),"mask-closable":!1},model:{value:t.groupTransferShow,callback:function(i){t.groupTransferShow=i},expression:"groupTransferShow"}},[e("Form",{attrs:{model:t.groupTransferData,"label-width":"auto"},nativeOn:{submit:function(i){i.preventDefault()}}},[e("FormItem",{attrs:{prop:"userid",label:t.$L("\u65B0\u7684\u7FA4\u4E3B")}},[e("UserInput",{attrs:{disabledChoice:t.groupTransferData.disabledChoice,"multiple-max":1,"max-hidden-select":"",placeholder:t.$L("\u9009\u62E9\u65B0\u7684\u7FA4\u4E3B")},model:{value:t.groupTransferData.userid,callback:function(i){t.$set(t.groupTransferData,"userid",i)},expression:"groupTransferData.userid"}})],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(i){t.groupTransferShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.groupTransferLoad>0},on:{click:function(i){return t.onDialogMenu("transferConfirm")}}},[t._v(t._s(t.$L("\u786E\u5B9A\u8F6C\u8BA9")))])],1)],1),e("DrawerOverlay",{attrs:{placement:"right","class-name":"dialog-wrapper-drawer-list",size:500},model:{value:t.replyListShow,callback:function(i){t.replyListShow=i},expression:"replyListShow"}},[t.replyListShow?e("DialogWrapper",{staticClass:"drawer-list",attrs:{dialogId:t.dialogId,msgId:t.replyListId}},[e("div",{staticClass:"drawer-title",attrs:{slot:"head"},slot:"head"},[t._v(t._s(t.$L("\u56DE\u590D\u6D88\u606F")))])]):t._e()],1),e("DrawerOverlay",{attrs:{placement:"right",size:400},model:{value:t.respondShow,callback:function(i){t.respondShow=i},expression:"respondShow"}},[t.respondShow?e("DialogRespond",{attrs:{"respond-data":t.respondData},on:{"on-close":function(i){t.respondShow=!1}}}):t._e()],1),e("DrawerOverlay",{attrs:{placement:"right","class-name":"dialog-wrapper-drawer-list",size:500},model:{value:t.todoViewShow,callback:function(i){t.todoViewShow=i},expression:"todoViewShow"}},[e("div",{staticClass:"dialog-wrapper drawer-list"},[e("div",{staticClass:"dialog-nav"},[e("div",{staticClass:"drawer-title"},[t._v(t._s(t.$L("\u5F85\u529E\u6D88\u606F")))])]),e("div",{staticClass:"dialog-scroller scrollbar-overlay"},[t.todoViewMsg?e("DialogItem",{attrs:{source:t.todoViewMsg,simpleView:""},on:{"on-view-text":t.onViewText,"on-view-file":t.onViewFile,"on-down-file":t.onDownFile,"on-emoji":t.onEmoji}}):t._e(),e("Button",{staticClass:"original-button",attrs:{icon:"md-exit",type:"text",loading:t.todoViewPosLoad},on:{click:t.onPosTodo}},[t._v(t._s(t.$L("\u56DE\u5230\u539F\u6587")))])],1),e("div",{staticClass:"todo-button"},[e("Button",{attrs:{type:"primary",size:"large",icon:"md-checkbox-outline",loading:t.todoViewLoad,long:""},on:{click:t.onDoneTodo}},[t._v(t._s(t.$L("\u5B8C\u6210")))])],1)])])],1):t._e()},yi=[];const bi={name:"DialogWrapper",components:{ImgUpload:oe,DialogSelect:ne,DialogRespond:Be,DialogItem:Ct,VirtualList:mi,ChatInput:pi,DialogGroupInfo:Me,DrawerOverlay:re,UserInput:Ht,DialogUpload:Ae},props:{dialogId:{type:Number,default:0},msgId:{type:Number,default:0},autoFocus:{type:Boolean,default:!1},beforeBack:Function},data(){return{msgItem:Ct,msgText:"",msgNew:0,msgType:"",allMsgs:[],tempMsgs:[],tempId:$A.randNum(1e9,9999999999),msgLoadIng:0,msgActiveIndex:-1,pasteShow:!1,pasteFile:[],pasteItem:[],searchShow:!1,searchKey:"",searchLoad:0,searchLocation:1,searchResult:[],createGroupShow:!1,createGroupData:{},createGroupLoad:0,avatarModifyShow:!1,avatarModifyData:{},avatarModifyLoad:0,forwardShow:!1,forwardLoad:!1,forwardData:{dialogids:[],userids:[]},openId:0,dialogDrag:!1,groupInfoShow:!1,groupTransferShow:!1,groupTransferLoad:0,groupTransferData:{userid:[],disabledChoice:[]},navStyle:{},operateVisible:!1,operateCopys:[],operateStyles:{},operateItem:{},recordState:"",wrapperStart:{},scrollOffset:0,scrollTail:0,preventMoreLoad:!1,preventToBottom:!1,replyListShow:!1,replyListId:0,respondShow:!1,respondData:{},todoSettingShow:!1,todoSettingLoad:0,todoSettingData:{type:"all",userids:[]},todoViewLoad:!1,todoViewPosLoad:!1,todoViewShow:!1,todoViewData:{},todoViewMid:0,todoViewId:0,scrollDisabled:!1,scrollDirection:null,scrollAction:0,scrollTmp:0,positionLoad:0}},beforeDestroy(){this.$store.dispatch("forgetInDialog",this._uid),this.$store.dispatch("closeDialog",this.dialogId)},computed:{...bt(["userIsAdmin","taskId","dialogSearchMsgId","dialogMsgs","dialogTodos","dialogMsgTransfer","cacheDialogs","wsOpenNum","touchBackInProgress","dialogIns","cacheUserBasic","fileLinks","cacheEmojis"]),...Ft(["isLoad"]),isReady(){return this.dialogId>0&&this.dialogData.id>0},dialogData(){return this.cacheDialogs.find(({id:t})=>t==this.dialogId)||{}},dialogList(){return this.cacheDialogs.filter(t=>!(t.name===void 0||t.dialog_delete===1)).sort((t,o)=>t.top_at||o.top_at?$A.Date(o.top_at)-$A.Date(t.top_at):t.todo_num>0||o.todo_num>0?o.todo_num-t.todo_num:$A.Date(o.last_at)-$A.Date(t.last_at))},dialogMsgList(){return this.isReady?this.dialogMsgs.filter(t=>t.dialog_id==this.dialogId):[]},tempMsgList(){return this.isReady?this.tempMsgs.filter(t=>t.dialog_id==this.dialogId):[]},allMsgList(){const t=[];if(t.push(...this.dialogMsgList.filter(o=>this.msgFilter(o))),this.msgId>0){const o=this.dialogMsgs.find(e=>e.id==this.msgId);o&&t.unshift(o)}if(this.tempMsgList.length>0){const o=t.map(({id:i})=>i),e=this.tempMsgList.filter(i=>!o.includes(i.id)&&this.msgFilter(i));e.length>0&&t.push(...e)}return t.sort((o,e)=>o.id-e.id)},loadMsg(){return this.isLoad(`msg::${this.dialogId}-${this.msgId}-${this.msgType}`)},prevId(){return this.allMsgs.length>0?$A.runNum(this.allMsgs[0].prev_id):0},peopleNum(){return this.dialogData.type==="group"?$A.runNum(this.dialogData.people):0},pasteTitle(){const{pasteItem:t}=this;let o=t.find(({type:i})=>i=="image"),e=t.find(({type:i})=>i!="image");return o&&e?"\u53D1\u9001\u6587\u4EF6/\u56FE\u7247":o?"\u53D1\u9001\u56FE\u7247":"\u53D1\u9001\u6587\u4EF6"},msgTags(){const t=[{type:"",label:"\u6D88\u606F"}];return this.dialogData.has_tag&&t.push({type:"tag",label:"\u6807\u6CE8"}),this.dialogData.has_image&&t.push({type:"image",label:"\u56FE\u7247"}),this.dialogData.has_file&&t.push({type:"file",label:"\u6587\u4EF6"}),this.dialogData.has_link&&t.push({type:"link",label:"\u94FE\u63A5"}),this.dialogData.group_type==="project"&&t.push({type:"project",label:"\u6253\u5F00\u9879\u76EE"}),this.dialogData.group_type==="task"&&t.push({type:"task",label:"\u6253\u5F00\u4EFB\u52A1"}),t},quickMsgs(){return this.dialogData.quick_msgs||[]},quickShow(){return this.quickMsgs.length>0&&this.windowScrollY===0&&this.quoteId===0},todoList(){return this.dialogData.todo_num?this.dialogTodos.filter(t=>!t.done_at&&t.dialog_id==this.dialogId).sort((t,o)=>o.id-t.id):[]},todoShow(){return this.todoList.length>0&&this.windowScrollY===0&&this.quoteId===0},wrapperClass(){return["ready","ing"].includes(this.recordState)?["record-ready"]:null},tagShow(){return this.msgTags.length>1&&this.windowScrollY===0&&!this.searchShow},scrollerClass(){return!this.$slots.head&&this.tagShow?"default-header":null},pasteWrapperClass(){return this.pasteItem.find(({type:t})=>t!=="image")?["multiple"]:[]},footerClass(){return this.msgNew>0&&this.allMsgs.length>0?"newmsg":this.scrollTail>500?"goto":null},msgUnreadOnly(){let t=0;return this.cacheDialogs.some(o=>{t+=$A.getDialogNum(o)}),t<=0?"":(t>999&&(t="999+"),String(t))},isMyDialog(){const{dialogData:t,userId:o}=this;return t.dialog_user&&t.dialog_user.userid==o},isMute(){if(this.dialogData.group_type==="all"){if(this.dialogData.all_group_mute==="all")return!0;if(this.dialogData.all_group_mute==="user"&&!this.userIsAdmin)return!0}return!1},quoteId(){return this.msgId>0?this.msgId:this.dialogData.extra_quote_id||0},quoteUpdate(){return this.dialogData.extra_quote_type==="update"},quoteData(){return this.quoteId?this.allMsgs.find(({id:t})=>t===this.quoteId):null},todoViewMsg(){if(this.todoViewMid){const t=this.allMsgs.find(o=>o.id==this.todoViewMid);if(t)return t;if(this.todoViewData.id===this.todoViewMid)return this.todoViewData}return null},positionMsg(){const{unread:t,position_msgs:o}=this.dialogData;if(!o||o.length===0||t===0||this.allMsgs.length===0)return null;const e=o.sort((i,a)=>a.msg_id-i.msg_id)[0];return this.allMsgs.findIndex(({id:i})=>i==e.msg_id)===-1?e.label==="{UNREAD}"?Object.assign(e,{label:this.$L(`\u672A\u8BFB\u6D88\u606F${t}\u6761`)}):e:null},operateEmojis(){const t=this.cacheEmojis.slice(0,3);return Object.values(["\u{1F44C}","\u{1F44D}","\u{1F602}","\u{1F389}","\u2764\uFE0F","\u{1F973}\uFE0F","\u{1F970}","\u{1F625}","\u{1F62D}"]).some(o=>{t.includes(o)||t.push(o)}),t}},watch:{dialogId:{handler(t,o){t&&(this.msgNew=0,this.msgType="",this.searchShow=!1,this.allMsgList.length>0&&(this.allMsgs=this.allMsgList,requestAnimationFrame(this.onToBottom)),this.getMsgs({dialog_id:t,msg_id:this.msgId,msg_type:this.msgType}).then(e=>{this.openId=t,setTimeout(this.onSearchMsgId,100)}).catch(e=>{}),this.$store.dispatch("saveInDialog",{uid:this._uid,dialog_id:t}),this.autoFocus&&this.inputFocus()),this.$store.dispatch("closeDialog",o)},immediate:!0},msgType(){this.getMsgs({dialog_id:this.dialogId,msg_id:this.msgId,msg_type:this.msgType,clear_before:!0}).catch(t=>{})},searchKey(t){!t||(this.searchLoad++,setTimeout(o=>{this.searchKey===t&&(this.searchLoad++,this.searchResult=[],this.searchLocation=0,this.$store.dispatch("call",{url:"dialog/msg/search",data:{dialog_id:this.dialogId,key:t}}).then(({data:e})=>{this.searchKey===t&&(this.searchResult=e.data,this.searchLocation=this.searchResult.length)}).finally(e=>{this.searchLoad--})),this.searchLoad--},600))},searchLocation(t){if(t===0)return;const o=this.searchResult[t-1];o&&this.onPositionId(o)},dialogSearchMsgId(){this.onSearchMsgId()},dialogMsgTransfer:{handler({time:t,msgFile:o,msgRecord:e,msgText:i,dialogId:a}){t>$A.Time()&&a==this.dialogId&&(this.$store.state.dialogMsgTransfer.time=0,this.$nextTick(()=>{$A.isArray(o)&&o.length>0?this.sendFileMsg(o):$A.isJson(e)&&e.duration>0?this.sendRecord(e):i&&this.sendMsg(i)}))},immediate:!0},wsOpenNum(t){t<=1||this.getMsgs({dialog_id:this.dialogId,msg_id:this.msgId,msg_type:this.msgType}).catch(o=>{})},allMsgList(t,o){const{tail:e}=this.scrollInfo();if(this.allMsgs=t,!this.windowActive||e>10&&o.length>0){const i=o[o.length-1]?o[o.length-1].id:0,a=t.filter(O=>O.id&&O.id>i);this.msgNew+=a.length}else this.preventToBottom||this.$nextTick(this.onToBottom)},windowScrollY(t){if($A.isIos()){const{tail:o}=this.scrollInfo();this.navStyle={marginTop:t+"px"},o<=10&&requestAnimationFrame(this.onToBottom),this.$refs.input.isFocus&&$A.scrollToView(this.$refs.footer)}},windowActive(t){if(t&&this.autoFocus){const o=$A.last(this.dialogIns);o&&o.uid===this._uid&&this.inputFocus()}},dialogDrag(t){t&&(this.operateVisible=!1)},msgActiveIndex(t){t>-1&&setTimeout(o=>this.msgActiveIndex=-1,800)}},methods:{sendMsg(t){let o,e=!1;if(typeof t=="string"&&t?o=t:(o=this.msgText,e=!0),o==""){this.inputFocus();return}if(o=o.replace(/<\/span> <\/p>$/,"

"),this.quoteUpdate){o=o.replace(new RegExp(`src=(["'])${$A.apiUrl("../")}`,"g"),"src=$1{{RemoteURL}}");const i=this.quoteId;this.$store.dispatch("setLoad",{key:`msg-${i}`,delay:600}),this.cancelQuote(),this.onActive(),this.$store.dispatch("call",{url:"dialog/msg/sendtext",data:{dialog_id:this.dialogId,update_id:i,text:o},method:"post",complete:a=>this.$store.dispatch("cancelLoad",`msg-${i}`)}).then(({data:a})=>{this.sendSuccess(a),this.onPositionId(i)}).catch(({msg:a})=>{$A.modalError(a)})}else{const i=$A.stringLength(o.replace(/]*?>/g,""))>5e3,a={id:this.getTempId(),dialog_id:this.dialogData.id,reply_id:this.quoteId,reply_data:this.quoteData,type:i?"loading":"text",userid:this.userId,msg:{text:i?"":o}};this.tempMsgs.push(a),this.msgType="",this.cancelQuote(),this.onActive(),this.$nextTick(this.onToBottom),this.$store.dispatch("call",{url:"dialog/msg/sendtext",data:{dialog_id:a.dialog_id,reply_id:a.reply_id,text:o},method:"post"}).then(({data:O})=>{this.tempMsgs=this.tempMsgs.filter(({id:S})=>S!=a.id),this.sendSuccess(O)}).catch(O=>{this.$set(a,"error",!0),this.$set(a,"errorData",{type:"text",content:O.msg,msg:o})})}e&&requestAnimationFrame(i=>this.msgText="")},sendRecord(t){const o={id:this.getTempId(),dialog_id:this.dialogData.id,reply_id:this.quoteId,reply_data:this.quoteData,type:"loading",userid:this.userId,msg:t};this.tempMsgs.push(o),this.msgType="",this.cancelQuote(),this.onActive(),this.$nextTick(this.onToBottom),this.$store.dispatch("call",{url:"dialog/msg/sendrecord",data:Object.assign(t,{dialog_id:this.dialogId,reply_id:this.quoteId}),method:"post"}).then(({data:e})=>{this.tempMsgs=this.tempMsgs.filter(({id:i})=>i!=o.id),this.sendSuccess(e)}).catch(e=>{this.$set(o,"error",!0),this.$set(o,"errorData",{type:"record",content:e.msg,msg:t})})},sendFileMsg(t){const o=$A.isArray(t)?t:[t];o.length>0&&(this.pasteFile=[],this.pasteItem=[],o.some(e=>{const i={type:$A.getMiddle(e.type,null,"/"),name:e.name,size:e.size,result:null};if(i.type==="image"){const a=new FileReader;a.readAsDataURL(e),a.onload=({target:O})=>{i.result=O.result,this.pasteFile.push(e),this.pasteItem.push(i),this.pasteShow=!0}}else this.pasteFile.push(e),this.pasteItem.push(i),this.pasteShow=!0}))},sendQuick(t){this.sendMsg(`

${t.label}

`)},getTempId(){return this.tempId++},getMsgs(t){return new Promise((o,e)=>{setTimeout(i=>this.msgLoadIng++,2e3),this.$store.dispatch("getDialogMsgs",t).then(o).catch(e).finally(i=>{this.msgLoadIng--})})},msgFilter(t){if(this.msgType){if(this.msgType==="tag"){if(!t.tag)return!1}else if(this.msgType==="link"){if(!t.link)return!1}else if(this.msgType!==t.mtype)return!1}return!(this.msgId&&t.reply_id!=this.msgId)},onSearchMsgId(){this.dialogSearchMsgId>0&&this.openId===this.dialogId&&(this.onPositionId(this.dialogSearchMsgId),this.$store.state.dialogSearchMsgId=0)},onPositionId(t,o=0,e=0){return new Promise((i,a)=>{if(t===0){$A.modalError("\u67E5\u770B\u5931\u8D25\uFF1A\u53C2\u6570\u9519\u8BEF"),a();return}if(this.loadMsg||this.msgType!==""){if(this.msgType="",e===0)this.$store.dispatch("showSpinner",600);else if(e>20){this.$store.dispatch("hiddenSpinner"),$A.modalError("\u67E5\u770B\u5931\u8D25\uFF1A\u8BF7\u6C42\u8D85\u65F6"),a();return}e++,setTimeout(w=>{this.onPositionId(t,o,e).then(i).catch(a)},Math.min(800,200*e));return}e>0&&this.$store.dispatch("hiddenSpinner");const O=this.allMsgs.findIndex(w=>w.id===t),S=this.prevId>0?0:-1;O>S?setTimeout(w=>{this.onToIndex(O),i()},200):(o>0&&this.$store.dispatch("setLoad",{key:`msg-${o}`,delay:600}),this.preventToBottom=!0,this.getMsgs({dialog_id:this.dialogId,msg_id:this.msgId,msg_type:this.msgType,position_id:t,spinner:2e3}).finally(w=>{const b=this.allMsgs.findIndex(_=>_.id===t);b>-1&&(this.onToIndex(b),i()),o>0&&this.$store.dispatch("cancelLoad",`msg-${o}`),this.preventToBottom=!1}))})},onViewTodo(t){if(this.operateVisible)return;this.todoViewId=t.id,this.todoViewMid=t.msg_id,this.todoViewShow=!0,this.allMsgs.findIndex(e=>e.id===this.todoViewMid)===-1&&this.$store.dispatch("call",{url:"dialog/msg/one",data:{msg_id:this.todoViewMid}}).then(({data:e})=>{this.todoViewData=e})},onCloseTodo(){this.todoViewLoad=!1,this.todoViewShow=!1,this.todoViewData={},this.todoViewMid=0,this.todoViewId=0},onPosTodo(){!this.todoViewMid||(this.todoViewPosLoad=!0,this.onPositionId(this.todoViewMid).then(this.onCloseTodo).finally(t=>{this.todoViewPosLoad=!1}))},onDoneTodo(){!this.todoViewId||this.todoViewLoad||(this.todoViewLoad=!0,this.$store.dispatch("call",{url:"dialog/msg/done",data:{id:this.todoViewId}}).then(({data:t})=>{this.$store.dispatch("saveDialogTodo",{id:this.todoViewId,done_at:$A.formatDate("Y-m-d H:i:s")}),this.$store.dispatch("saveDialog",{id:this.dialogId,todo_num:this.todoList.length}),t.add&&this.sendSuccess(t.add),this.todoList.length===0&&this.$store.dispatch("getDialogTodo",this.dialogId),this.onCloseTodo()}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.todoViewLoad=!1}))},itemClassAdd(t){return t===this.msgActiveIndex?"common-shake":""},inputFocus(){this.$nextTick(t=>{this.$refs.input&&this.$refs.input.focus()})},onRecordState(t){this.recordState=t},chatPasteDrag(t,o){this.dialogDrag=!1;const e=o==="drag"?t.dataTransfer.files:t.clipboardData.files,i=Array.prototype.slice.call(e);i.length>0&&(t.preventDefault(),this.sendFileMsg(i))},chatDragOver(t,o){let e=this.__dialogDrag=$A.randomString(8);if(!t)setTimeout(()=>{e===this.__dialogDrag&&(this.dialogDrag=t)},150);else{if(o.dataTransfer.effectAllowed==="move"||Array.prototype.slice.call(o.dataTransfer.files).length===0)return;this.dialogDrag=!0}},onTouchStart(t){this.wrapperStart=Object.assign(this.scrollInfo(),{clientY:t.touches[0].clientY,exclud:!this.$refs.scroller.$el.contains(t.target)})},onTouchMove(t){if(this.windowSmall&&this.windowScrollY>0){if(this.wrapperStart.exclud){t.preventDefault();return}this.wrapperStart.clientY>t.touches[0].clientY?this.wrapperStart.tail===0&&t.preventDefault():this.wrapperStart.offset===0&&t.preventDefault()}},pasteSend(){this.pasteFile.some(t=>{this.$refs.chatUpload.upload(t)})},chatFile(t,o){switch(t){case"progress":const e={id:o.tempId,dialog_id:this.dialogData.id,reply_id:this.quoteId,type:"loading",userid:this.userId,msg:{}};this.tempMsgs.push(e),this.msgType="",this.cancelQuote(),this.onActive(),this.$nextTick(this.onToBottom);break;case"error":this.tempMsgs=this.tempMsgs.filter(({id:i})=>i!=o.tempId);break;case"success":this.tempMsgs=this.tempMsgs.filter(({id:i})=>i!=o.tempId),this.sendSuccess(o.data);break}},sendSuccess(t){if($A.isArray(t)){t.some(this.sendSuccess);return}this.$store.dispatch("saveDialogMsg",t),this.quoteUpdate||(this.$store.dispatch("increaseTaskMsgNum",t),this.$store.dispatch("increaseMsgReplyNum",t),this.$store.dispatch("updateDialogLastMsg",t)),this.cancelQuote(),this.onActive()},setQuote(t,o){var e;(e=this.$refs.input)==null||e.setQuote(t,o)},cancelQuote(){var t;(t=this.$refs.input)==null||t.cancelQuote()},onEventFocus(){this.$emit("on-focus")},onEventBlur(){this.$emit("on-blur")},onEventMore(t){switch(t){case"image":case"file":this.$refs.chatUpload.handleClick();break;case"call":this.onCallTel();break;case"anon":this.onAnon();break}},onCallTel(){this.$store.dispatch("call",{url:"dialog/tel",data:{dialog_id:this.dialogId},spinner:600}).then(({data:t})=>{t.tel&&$A.eeuiAppSendMessage({action:"callTel",tel:t.tel}),t.add&&(this.$store.dispatch("saveDialogMsg",t.add),this.$store.dispatch("updateDialogLastMsg",t.add),this.onActive())}).catch(({msg:t})=>{$A.modalError(t)})},onAnon(){if(this.dialogData.type!=="user"||this.dialogData.bot){$A.modalWarning("\u533F\u540D\u6D88\u606F\u4EC5\u5141\u8BB8\u53D1\u9001\u7ED9\u4E2A\u4EBA");return}$A.modalInput({title:"\u53D1\u9001\u533F\u540D\u6D88\u606F",placeholder:"\u533F\u540D\u6D88\u606F\u5C06\u901A\u8FC7\u533F\u540D\u6D88\u606F\uFF08\u673A\u5668\u4EBA\uFF09\u53D1\u9001\u7ED9\u5BF9\u65B9\uFF0C\u4E0D\u4F1A\u8BB0\u5F55\u4F60\u7684\u4EFB\u4F55\u8EAB\u4EFD\u4FE1\u606F",inputProps:{type:"textarea",rows:3,autosize:{minRows:3,maxRows:6},maxlength:2e3},okText:"\u533F\u540D\u53D1\u9001",onOk:t=>t?new Promise((o,e)=>{this.$store.dispatch("call",{url:"dialog/msg/sendanon",data:{userid:this.dialogData.dialog_user.userid,text:t},method:"post"}).then(({msg:i})=>{o(i)}).catch(({msg:i})=>{e(i)})}):"\u8BF7\u8F93\u5165\u6D88\u606F\u5185\u5BB9"})},onEventEmojiVisibleChange(t){t&&this.windowSmall&&this.onToBottom()},onHeightChange({newVal:t,oldVal:o}){const e=t-o;if(e!==0){const{offset:i,tail:a}=this.scrollInfo();a>0&&this.onToOffset(i+e)}},onActive(){this.$emit("on-active")},onToBottom(){this.msgNew=0;const t=this.$refs.scroller;t&&(t.scrollToBottom(),requestAnimationFrame(o=>t.scrollToBottom()))},onToIndex(t){const o=this.$refs.scroller;o&&(o.stopToBottom(),o.scrollToIndex(t,-100),requestAnimationFrame(e=>o.scrollToIndex(t,-100))),requestAnimationFrame(e=>this.msgActiveIndex=t)},onToOffset(t){const o=this.$refs.scroller;o&&(o.stopToBottom(),o.scrollToOffset(t),setTimeout(e=>o.scrollToOffset(t),10))},scrollInfo(){const t=this.$refs.scroller;return t?t.scrollInfo():{offset:0,scale:0,tail:0}},openProject(){!this.dialogData.group_info||(this.windowSmall&&this.$store.dispatch("openDialog",0),this.goForward({name:"manage-project",params:{projectId:this.dialogData.group_info.id}}))},openTask(){!this.dialogData.group_info||(this.taskId>0&&this.$store.dispatch("openDialog",0),this.$store.dispatch("openTask",this.dialogData.group_info.id))},onPrevPage(){this.prevId!==0&&this.getMsgs({dialog_id:this.dialogId,msg_id:this.msgId,msg_type:this.msgType,prev_id:this.prevId,save_before:t=>this.scrollDisabled=!0,save_after:t=>this.scrollDisabled=!1}).then(({data:t})=>{const o=t.list.map(e=>e.id);this.$nextTick(()=>{const e=this.$refs.scroller,i=o.reduce((O,S)=>({size:(typeof O=="object"?O.size:e.getSize(O))+e.getSize(S)}));let a=e.getOffset()+i.size;this.prevId===0&&(a-=36),this.onToOffset(a),setTimeout(O=>e.virtual.handleFront(),10)})}).catch(()=>{})},onDialogMenu(t){switch(t){case"searchMsg":this.searchShow=!0,this.$nextTick(e=>{this.$refs.searchInput.focus()});break;case"openCreate":const o=[this.userId];this.dialogData.dialog_user&&this.userId!=this.dialogData.dialog_user.userid&&o.push(this.dialogData.dialog_user.userid),this.createGroupData={userids:o,uncancelable:[this.userId]},this.createGroupShow=!0;break;case"avatar":this.avatarModifyData={dialog_id:this.dialogData.id,avatar:this.dialogData.avatar},this.avatarModifyShow=!0;break;case"avatarAdmin":this.avatarModifyData={dialog_id:this.dialogData.id,avatar:this.dialogData.avatar,admin:1},this.avatarModifyShow=!0;break;case"groupInfo":this.groupInfoShow=!0;break;case"transfer":this.groupTransferData={dialog_id:this.dialogId,userid:[],disabledChoice:[this.userId]},this.groupTransferShow=!0;break;case"transferConfirm":this.onTransferGroup();break;case"disband":this.onDisbandGroup();break;case"exit":this.onExitGroup();break}},onTransferGroup(){if(this.groupTransferData.userid.length===0){$A.messageError("\u8BF7\u9009\u62E9\u65B0\u7684\u7FA4\u4E3B");return}this.groupTransferLoad++,this.$store.dispatch("call",{url:"dialog/group/transfer",data:{dialog_id:this.dialogId,userid:this.groupTransferData.userid[0]}}).then(({data:t,msg:o})=>{$A.messageSuccess(o),this.$store.dispatch("saveDialog",t)}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.groupTransferLoad--,this.groupTransferShow=!1})},onDisbandGroup(){$A.modalConfirm({content:`\u4F60\u786E\u5B9A\u8981\u89E3\u6563\u3010${this.dialogData.name}\u3011\u7FA4\u7EC4\u5417\uFF1F`,loading:!0,okText:"\u89E3\u6563",onOk:()=>new Promise((t,o)=>{this.$store.dispatch("call",{url:"dialog/group/disband",data:{dialog_id:this.dialogId}}).then(({msg:e})=>{t(e),this.$store.dispatch("forgetDialog",this.dialogId),this.goForward({name:"manage-messenger"})}).catch(({msg:e})=>{o(e)})})})},onExitGroup(){$A.modalConfirm({content:"\u4F60\u786E\u5B9A\u8981\u9000\u51FA\u7FA4\u7EC4\u5417\uFF1F",loading:!0,onOk:()=>new Promise((t,o)=>{this.$store.dispatch("call",{url:"dialog/group/deluser",data:{dialog_id:this.dialogId}}).then(({msg:e})=>{t(e),this.$store.dispatch("forgetDialog",this.dialogId),this.goForward({name:"manage-messenger"})}).catch(({msg:e})=>{o(e)})})})},onCreateGroup(){this.createGroupLoad++,this.$store.dispatch("call",{url:"dialog/group/add",data:this.createGroupData}).then(({data:t,msg:o})=>{$A.messageSuccess(o),this.createGroupShow=!1,this.createGroupData={},this.$store.dispatch("saveDialog",t),this.$store.dispatch("openDialog",t.id)}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.createGroupLoad--})},onAvatarModify(){this.avatarModifyLoad++,this.$store.dispatch("call",{url:"dialog/group/edit",data:this.avatarModifyData}).then(({data:t,msg:o})=>{$A.messageSuccess(o),this.avatarModifyShow=!1,this.avatarModifyData={},this.$store.dispatch("saveDialog",t)}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.avatarModifyLoad--})},onForward(t){if(t==="open")this.forwardData={dialogids:[],userids:[],msg_id:this.operateItem.id},this.forwardShow=!0;else if(t==="submit"){if($A.arrayLength(this.forwardData.dialogids)===0&&$A.arrayLength(this.forwardData.userids)===0){$A.messageWarning("\u8BF7\u9009\u62E9\u8F6C\u53D1\u5BF9\u8BDD\u6216\u6210\u5458");return}this.forwardLoad=!0,this.$store.dispatch("call",{url:"dialog/msg/forward",data:this.forwardData}).then(({data:o,msg:e})=>{this.forwardShow=!1,this.$store.dispatch("saveDialogMsg",o.msgs),this.$store.dispatch("updateDialogLastMsg",o.msgs),$A.messageSuccess(e)}).catch(({msg:o})=>{$A.modalError(o)}).finally(o=>{this.forwardLoad=!1})}},onScroll(t){this.operateVisible=!1;const{offset:o,tail:e}=this.scrollInfo();this.scrollOffset=o,this.scrollTail=e,this.scrollTail<=10&&(this.msgNew=0),this.scrollAction=t.target.scrollTop,this.scrollDirection=this.scrollTmp<=this.scrollAction?"down":"up",setTimeout(i=>this.scrollTmp=this.scrollAction,0)},onRange(t){if(this.preventMoreLoad)return;const o=this.scrollDirection==="down"?"next_id":"prev_id";for(let e=t.start;e<=t.end;e++){const i=this.allMsgs[e][o];if(i){const a=this.allMsgs[e+(o==="next_id"?1:-1)];a&&a.id!=i&&(this.preventMoreLoad=!0,this.getMsgs({dialog_id:this.dialogId,msg_id:this.msgId,msg_type:this.msgType,[o]:i}).finally(O=>{this.preventMoreLoad=!1}))}}},onBack(){if(!this.beforeBack)return this.handleBack();const t=this.beforeBack();t&&t.then?t.then(()=>{this.handleBack()}):this.handleBack()},handleBack(){const{name:t,params:o}=this.$store.state.routeHistoryLast;t===this.$route.name&&/^\d+$/.test(o.dialogId)?this.goForward({name:this.$route.name}):this.goBack()},onMsgType(t){switch(t){case"project":this.openProject();break;case"task":this.openTask();break;default:this.loadMsg?$A.messageWarning("\u6B63\u5728\u52A0\u8F7D\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5..."):this.msgType=t;break}},onMention(t){const o=this.cacheUserBasic.find(({userid:e})=>e==t.userid);o&&this.$refs.input.addMention({denotationChar:"@",id:o.userid,value:o.nickname})},onLongpress({event:t,el:o,msgData:e}){this.operateVisible=this.operateItem.id===e.id,this.operateItem=$A.isJson(e)?e:{},this.operateCopys=[],t.target.nodeName==="IMG"&&this.$Electron?this.operateCopys.push({type:"image",icon:"",label:"\u590D\u5236\u56FE\u7247",value:$A.rightDelete(t.target.currentSrc,"_thumb.jpg")}):t.target.nodeName==="A"&&(t.target.classList.contains("mention")&&t.target.classList.contains("file")&&this.findOperateFile(this.operateItem.id,t.target.href),this.operateCopys.push({type:"link",icon:"",label:"\u590D\u5236\u94FE\u63A5",value:t.target.href})),e.type==="text"&&(t.target.nodeName==="IMG"&&this.operateCopys.push({type:"imagedown",icon:"",label:"\u4E0B\u8F7D\u56FE\u7247",value:$A.rightDelete(t.target.currentSrc,"_thumb.jpg")}),e.msg.text.replace(/<[^>]+>/g,"").length>0&&this.operateCopys.push({type:"text",icon:"",label:this.operateCopys.length>0?"\u590D\u5236\u6587\u672C":"\u590D\u5236",value:""})),this.$nextTick(()=>{const i=o.getBoundingClientRect(),a=this.$el.getBoundingClientRect();this.operateStyles={left:`${t.clientX-a.left}px`,top:`${i.top+this.windowScrollY}px`,height:i.height+"px"},this.operateVisible=!0})},onOperate(t,o=null){this.operateVisible=!1,this.$nextTick(e=>{switch(t){case"reply":this.onReply();break;case"update":this.onUpdate();break;case"copy":this.onCopy(o);break;case"forward":this.onForward("open");break;case"withdraw":this.onWithdraw();break;case"view":this.onViewFile();break;case"down":this.onDownFile();break;case"tag":this.onTag();break;case"newTask":let i=$A.formatMsgBasic(this.operateItem.msg.text);i=i.replace(/]*?src=(["'])(.*?)(_thumb\.jpg)*\1[^>]*?>/g,''),Tt.Store.set("addTask",{owner:[this.userId],content:i});break;case"todo":this.onTodo();break;case"pos":this.onPositionId(this.operateItem.id);break;case"emoji":o==="more"?vi().then(this.onEmoji):this.onEmoji(o);break}})},onReply(t){const{tail:o}=this.scrollInfo();this.setQuote(this.operateItem.id,t),this.inputFocus(),o<=10&&requestAnimationFrame(this.onToBottom)},onUpdate(){const{type:t}=this.operateItem;if(this.onReply(t==="text"?"update":"reply"),t==="text"){let{text:o}=this.operateItem.msg;o.indexOf("mention")>-1&&(o=o.replace(/]*)>~([^>]*)<\/a>/g,'~$3'),o=o.replace(/([@#])([^>]*)<\/span>/g,'$3$4')),o=o.replace(/]*>/gi,e=>e.replace(/(width|height)="\d+"\s*/ig,"")),this.$refs.input.setPasteMode(!1),this.msgText=$A.formatMsgBasic(o),this.$nextTick(e=>this.$refs.input.setPasteMode(!0))}},onCopy(t){if(!$A.isJson(t))return;const{type:o,value:e}=t;switch(o){case"image":this.$Electron&&this.getBase64Image(e).then(a=>{this.$Electron.sendMessage("copyBase64Image",{base64:a})});break;case"imagedown":this.$store.dispatch("downUrl",{url:e,token:!1});break;case"filepos":this.windowSmall&&this.$store.dispatch("openDialog",0),this.goForward({name:"manage-file",params:e});break;case"link":this.$copyText(e).then(a=>$A.messageSuccess("\u590D\u5236\u6210\u529F")).catch(a=>$A.messageError("\u590D\u5236\u5931\u8D25"));break;case"text":const i=$A(this.$refs.scroller.$el).find(`[data-id="${this.operateItem.id}"]`).find(".dialog-content");if(i.length>0){const a=i[0].innerText.replace(/\n\n/g,` +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var f={FRONT:"FRONT",BEHIND:"BEHIND"},h={INIT:"INIT",FIXED:"FIXED",DYNAMIC:"DYNAMIC"},l=0,u=function(){function v(y,k){i(this,v),this.init(y,k)}return O(v,[{key:"init",value:function(k,I){this.param=k,this.callUpdate=I,this.sizes=new Map,this.firstRangeTotalSize=0,this.firstRangeAverageSize=0,this.lastCalcIndex=0,this.fixedSizeValue=0,this.calcType=h.INIT,this.offset=0,this.direction="",this.range=Object.create(null),k&&this.checkRange(0,k.keeps-1)}},{key:"destroy",value:function(){this.init(null,null)}},{key:"getRange",value:function(){var k=Object.create(null);return k.start=this.range.start,k.end=this.range.end,k.padFront=this.range.padFront,k.padBehind=this.range.padBehind,k}},{key:"isBehind",value:function(){return this.direction===f.BEHIND}},{key:"isFront",value:function(){return this.direction===f.FRONT}},{key:"getOffset",value:function(k){return(k<1?0:this.getIndexOffset(k))+this.param.slotHeaderSize}},{key:"updateParam",value:function(k,I){var j=this;this.param&&k in this.param&&(k==="uniqueIds"&&this.sizes.forEach(function(B,W){I.includes(W)||j.sizes.delete(W)}),this.param[k]=I)}},{key:"saveSize",value:function(k,I){this.sizes.set(k,I),this.calcType===h.INIT?(this.fixedSizeValue=I,this.calcType=h.FIXED):this.calcType===h.FIXED&&this.fixedSizeValue!==I&&(this.calcType=h.DYNAMIC,delete this.fixedSizeValue),this.calcType!==h.FIXED&&typeof this.firstRangeTotalSize!="undefined"&&(this.sizes.sizethis.range.start)){var I=Math.max(k-this.param.buffer,0);this.checkRange(I,this.getEndByStart(I))}}},{key:"handleBehind",value:function(){var k=this.getScrollOvers();kk&&(W=j-1)}return I>0?--I:0}},{key:"getIndexOffset",value:function(k){if(!k)return 0;for(var I=0,j=0,B=0;B1&&arguments[1]!==void 0?arguments[1]:0;if(y>=this.dataSources.length-1)this.scrollToBottom();else{var I=this.virtual.getOffset(y);k!==0&&(I=Math.max(0,I+k)),this.scrollToOffset(I)}},scrollToBottom:function(){var y=this,k=this.$refs.shepherd;if(k){var I=k[this.isHorizontal?"offsetLeft":"offsetTop"];this.scrollToOffset(I),this.toBottomTime&&(clearTimeout(this.toBottomTime),this.toBottomTime=null),this.toBottomTime=setTimeout(function(){y.getOffset()+y.getClientSize()+1j+1||!j||(this.virtual.handleScroll(k),this.emitEvent(k,I,j,y))}},emitEvent:function(y,k,I,j){this.$emit("scroll",j,this.virtual.getRange()),this.virtual.isFront()&&!!this.dataSources.length&&y-this.topThreshold<=0?this.$emit("totop"):this.virtual.isBehind()&&y+k+this.bottomThreshold>=I&&this.$emit("tobottom")},getRenderSlots:function(y){for(var k=[],I=this.range,j=I.start,B=I.end,W=this.dataSources,q=this.dataKey,N=this.itemClass,L=this.itemTag,M=this.itemStyle,P=this.isHorizontal,z=this.extraProps,F=this.dataComponent,$=this.itemScopedSlots,R=this.$scopedSlots&&this.$scopedSlots.item,U=j;U<=B;U++){var H=W[U];if(H){var G=typeof q=="function"?q(H):H[q];typeof G=="string"||typeof G=="number"?k.push(y(x,{props:{index:U,tag:L,event:D.ITEM,horizontal:P,uniqueKey:G,source:H,extraProps:z,component:F,slotComponent:R,scopedSlots:$},style:M,class:"".concat(N).concat(this.itemClassAdd?" "+this.itemClassAdd(U):"")})):console.warn("Cannot get the data-key '".concat(q,"' from data-sources."))}else console.warn("Cannot get the index '".concat(U,"' from data-sources."))}return k}},render:function(y){var k=this.$slots,I=k.header,j=k.footer,B=this.range,W=B.padFront,q=B.padBehind,N=this.isHorizontal,L=this.pageMode,M=this.rootTag,P=this.wrapTag,z=this.wrapClass,F=this.wrapStyle,$=this.headerTag,R=this.headerClass,U=this.headerStyle,H=this.footerTag,G=this.footerClass,X=this.footerStyle,J=this.disabled,tt={padding:N?"0px ".concat(q,"px 0px ").concat(W,"px"):"".concat(W,"px 0px ").concat(q,"px")},nt=F?Object.assign({},F,tt):tt;return y(M,{ref:"root",style:J?{overflow:"hidden"}:null,on:{"&scroll":!L&&this.onScroll}},[I?y(A,{class:R,style:U,props:{tag:$,event:D.SLOT,uniqueKey:T.HEADER}},I):null,y(P,{class:z,attrs:{role:"group"},style:nt},this.getRenderSlots(y)),j?y(A,{class:G,style:X,props:{tag:H,event:D.SLOT,uniqueKey:T.FOOTER}},j):null,y("div",{ref:"shepherd",style:{width:N?"0px":"100%",height:N?"100%":"0px"}})])}});return E})})(Yt);var mi=Yt.exports;function vi(){return new Promise(t=>{const o=new ee({render(a){return a(ie.exports.Modal,{class:"chat-emoji-one-modal",props:{fullscreen:!0,footerHide:!0},on:{"on-visible-change":O=>{O||setTimeout(S=>{document.body.removeChild(this.$el)},500)}}},[a(Qt,{attrs:{onlyEmoji:!0},on:{"on-select":O=>{this.$children[0].visible=!1,O.type==="emoji"&&t(O.text)}}})])}}),e=o.$mount();document.body.appendChild(e.$el);const i=o.$children[0];i.visible=!0,i.$el.lastChild.addEventListener("click",({target:a})=>{a.classList.contains("ivu-modal-body")&&(i.visible=!1)})})}var gi=function(){var t=this,o=t.$createElement,e=t._self._c||o;return t.isReady?e("div",{staticClass:"dialog-wrapper",class:t.wrapperClass,on:{drop:function(i){return i.preventDefault(),t.chatPasteDrag(i,"drag")},dragover:function(i){return i.preventDefault(),t.chatDragOver(!0,i)},dragleave:function(i){return i.preventDefault(),t.chatDragOver(!1,i)},touchstart:t.onTouchStart,touchmove:t.onTouchMove}},[e("div",{staticClass:"dialog-nav",style:t.navStyle},[t._t("head",function(){return[e("div",{staticClass:"nav-wrapper",class:{completed:t.$A.dialogCompleted(t.dialogData)}},[e("div",{staticClass:"dialog-back",on:{click:t.onBack}},[e("i",{staticClass:"taskfont"},[t._v("\uE676")]),t.msgUnreadOnly?e("div",{staticClass:"back-num"},[t._v(t._s(t.msgUnreadOnly))]):t._e()]),e("div",{staticClass:"dialog-block"},[e("div",{staticClass:"dialog-avatar",on:{click:t.onViewAvatar}},[t.dialogData.type=="group"?[t.dialogData.avatar?e("EAvatar",{staticClass:"img-avatar",attrs:{src:t.dialogData.avatar,size:42}}):t.dialogData.group_type=="department"?e("i",{staticClass:"taskfont icon-avatar department"},[t._v("\uE75C")]):t.dialogData.group_type=="project"?e("i",{staticClass:"taskfont icon-avatar project"},[t._v("\uE6F9")]):t.dialogData.group_type=="task"?e("i",{staticClass:"taskfont icon-avatar task"},[t._v("\uE6F4")]):e("Icon",{staticClass:"icon-avatar",attrs:{type:"ios-people"}})]:t.dialogData.dialog_user?e("div",{staticClass:"user-avatar"},[e("UserAvatar",{attrs:{online:t.dialogData.online_state,userid:t.dialogData.dialog_user.userid,size:42},on:{"update:online":function(i){return t.$set(t.dialogData,"online_state",i)}}},[t.dialogData.type==="user"&&t.dialogData.online_state!==!0?e("p",{attrs:{slot:"end"},slot:"end"},[t._v(" "+t._s(t.$L(t.dialogData.online_state))+" ")]):t._e()])],1):e("Icon",{staticClass:"icon-avatar",attrs:{type:"md-person"}})],2),e("div",{staticClass:"dialog-title"},[e("div",{staticClass:"main-title"},[t._l(t.$A.dialogTags(t.dialogData),function(i){return i.color!="success"?[e("Tag",{attrs:{color:i.color,fade:!1}},[t._v(t._s(t.$L(i.text)))])]:t._e()}),e("h2",[t._v(t._s(t.dialogData.name))]),t.peopleNum>0?e("em",{on:{click:function(i){return t.onDialogMenu("groupInfo")}}},[t._v("("+t._s(t.peopleNum)+")")]):t._e(),t.dialogData.bot?e("Tag",{staticClass:"after",attrs:{fade:!1}},[t._v(t._s(t.$L("\u673A\u5668\u4EBA")))]):t._e(),t.dialogData.group_type=="all"?e("Tag",{staticClass:"after pointer",attrs:{fade:!1},on:{"on-click":function(i){return t.onDialogMenu("groupInfo")}}},[t._v(t._s(t.$L("\u5168\u5458")))]):t.dialogData.group_type=="department"?e("Tag",{staticClass:"after pointer",attrs:{fade:!1},on:{"on-click":function(i){return t.onDialogMenu("groupInfo")}}},[t._v(t._s(t.$L("\u90E8\u95E8")))]):t._e(),t.msgLoadIng>0?e("div",{staticClass:"load"},[e("Loading")],1):t._e()],2),e("ul",{staticClass:"title-desc"},[t.dialogData.type==="user"?e("li",{class:[t.dialogData.online_state===!0?"online":"offline"]},[t._v(" "+t._s(t.$L(t.dialogData.online_state===!0?"\u5728\u7EBF":t.dialogData.online_state))+" ")]):t._e()]),t.tagShow?e("ul",{staticClass:"title-tags scrollbar-hidden"},t._l(t.msgTags,function(i){var a;return e("li",{key:i.type,class:(a={},a[i.type||"msg"]=!0,a.active=t.msgType===i.type,a),on:{click:function(O){return t.onMsgType(i.type)}}},[e("i",{staticClass:"no-dark-content"}),e("span",[t._v(t._s(t.$L(i.label)))])])}),0):t._e()])]),e("EDropdown",{staticClass:"dialog-menu",attrs:{trigger:"click"},on:{command:t.onDialogMenu}},[e("i",{staticClass:"taskfont dialog-menu-icon"},[t._v("\uE6E9")]),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},[e("EDropdownItem",{attrs:{command:"searchMsg"}},[e("div",[t._v(t._s(t.$L("\u641C\u7D22\u6D88\u606F")))])]),t.dialogData.type==="user"?e("EDropdownItem",{attrs:{command:"openCreate"}},[e("div",[t._v(t._s(t.$L("\u521B\u5EFA\u7FA4\u7EC4")))])]):[e("EDropdownItem",{attrs:{command:"groupInfo"}},[e("div",[t._v(t._s(t.$L("\u7FA4\u7EC4\u8BBE\u7F6E")))])]),t.dialogData.owner_id!=t.userId?[t.dialogData.group_type==="all"&&t.userIsAdmin?e("EDropdownItem",{attrs:{command:"avatarAdmin"}},[e("div",[t._v(t._s(t.$L("\u4FEE\u6539\u5934\u50CF")))])]):t._e(),e("EDropdownItem",{attrs:{command:"exit"}},[e("div",{staticStyle:{color:"#f00"}},[t._v(t._s(t.$L("\u9000\u51FA\u7FA4\u7EC4")))])])]:t.dialogData.group_type==="user"?[e("EDropdownItem",{attrs:{command:"avatar"}},[e("div",[t._v(t._s(t.$L("\u4FEE\u6539\u5934\u50CF")))])]),e("EDropdownItem",{attrs:{command:"transfer"}},[e("div",[t._v(t._s(t.$L("\u8F6C\u8BA9\u7FA4\u4E3B")))])]),e("EDropdownItem",{attrs:{command:"disband"}},[e("div",{staticStyle:{color:"#f00"}},[t._v(t._s(t.$L("\u89E3\u6563\u7FA4\u7EC4")))])])]:t._e()]],2)],1),t.searchShow?e("div",{staticClass:"dialog-search"},[e("div",{staticClass:"search-location"},[e("i",{staticClass:"taskfont",on:{click:function(i){return t.onSearchSwitch("prev")}}},[t._v("\uE702")]),e("i",{staticClass:"taskfont",on:{click:function(i){return t.onSearchSwitch("next")}}},[t._v("\uE705")])]),e("div",{staticClass:"search-input"},[e("Input",{ref:"searchInput",attrs:{placeholder:t.$L("\u641C\u7D22\u6D88\u606F"),clearable:""},on:{"on-keyup":t.onSearchKeyup},model:{value:t.searchKey,callback:function(i){t.searchKey=i},expression:"searchKey"}},[e("div",{staticClass:"search-pre",attrs:{slot:"prefix"},slot:"prefix"},[t.searchLoad>0?e("Loading"):e("Icon",{attrs:{type:"ios-search"}})],1)]),t.searchLoad===0&&t.searchResult.length>0?e("div",{staticClass:"search-total",attrs:{slot:"append"},slot:"append"},[t._v(t._s(t.searchLocation)+"/"+t._s(t.searchResult.length))]):t._e()],1),e("div",{staticClass:"search-cancel",on:{click:function(i){return t.onSearchKeyup(null)}}},[t._v(t._s(t.$L("\u53D6\u6D88")))])]):t._e()],1)]})],2),t.positionMsg?e("div",{staticClass:"dialog-position",class:{down:t.tagShow}},[e("div",{staticClass:"position-label",on:{click:t.onPositionMark}},[t.positionLoad>0?e("Icon",{staticClass:"icon-loading",attrs:{type:"ios-loading"}}):e("i",{staticClass:"taskfont"},[t._v("\uE624")]),t._v(" "+t._s(t.positionMsg.label)+" ")],1)]):t._e(),e("VirtualList",{ref:"scroller",staticClass:"dialog-scroller scrollbar-overlay",class:t.scrollerClass,attrs:{"data-key":"id","data-sources":t.allMsgs,"data-component":t.msgItem,"item-class-add":t.itemClassAdd,"extra-props":{dialogData:t.dialogData,operateVisible:t.operateVisible,operateItem:t.operateItem,isMyDialog:t.isMyDialog,msgId:t.msgId},"estimate-size":t.dialogData.type=="group"?105:77,keeps:50,disabled:t.scrollDisabled},on:{scroll:t.onScroll,range:t.onRange,totop:t.onPrevPage,"on-mention":t.onMention,"on-longpress":t.onLongpress,"on-view-reply":t.onViewReply,"on-view-text":t.onViewText,"on-view-file":t.onViewFile,"on-down-file":t.onDownFile,"on-reply-list":t.onReplyList,"on-error":t.onError,"on-emoji":t.onEmoji,"on-show-emoji-user":t.onShowEmojiUser},scopedSlots:t._u([{key:"header",fn:function(){return[t.allMsgs.length===0&&t.loadIng||t.prevId>0?e("div",{staticClass:"dialog-item loading"},[t.scrollOffset<100?e("div",{staticClass:"dialog-wrapper-loading"}):t._e()]):t.allMsgs.length===0?e("div",{staticClass:"dialog-item nothing"},[t._v(t._s(t.$L("\u6682\u65E0\u6D88\u606F")))]):t._e()]},proxy:!0}],null,!1,3828201241)}),e("div",{ref:"footer",staticClass:"dialog-footer",class:t.footerClass,on:{click:t.onActive}},[e("div",{staticClass:"dialog-newmsg",on:{click:t.onToBottom}},[t._v(t._s(t.$L(`\u6709${t.msgNew}\u6761\u65B0\u6D88\u606F`)))]),e("div",{staticClass:"dialog-goto",on:{click:t.onToBottom}},[e("i",{staticClass:"taskfont"},[t._v("\uE72B")])]),e("DialogUpload",{ref:"chatUpload",staticClass:"chat-upload",attrs:{"dialog-id":t.dialogId},on:{"on-progress":function(i){return t.chatFile("progress",i)},"on-success":function(i){return t.chatFile("success",i)},"on-error":function(i){return t.chatFile("error",i)}}}),t.todoShow?e("div",{staticClass:"chat-bottom-menu"},[e("div",{staticClass:"bottom-menu-label"},[t._v(t._s(t.$L("\u5F85\u529E"))+":")]),e("ul",{staticClass:"scrollbar-hidden"},t._l(t.todoList,function(i){return e("li",{on:{click:function(a){return a.stopPropagation(),t.onViewTodo(i)}}},[e("div",{staticClass:"bottom-menu-desc no-dark-content"},[t._v(t._s(t.$A.getMsgSimpleDesc(i.msg_data)))])])}),0)]):t.quickShow?e("div",{staticClass:"chat-bottom-menu"},[e("ul",{staticClass:"scrollbar-hidden"},t._l(t.quickMsgs,function(i){return e("li",{on:{click:function(a){return a.stopPropagation(),t.sendQuick(i)}}},[e("div",{staticClass:"bottom-menu-desc no-dark-content",style:i.style||null},[t._v(t._s(i.label))])])}),0)]):t._e(),t.isMute?e("div",{staticClass:"chat-mute"},[t._v(" "+t._s(t.$L("\u7981\u8A00\u53D1\u8A00"))+" ")]):e("ChatInput",{ref:"input",attrs:{"dialog-id":t.dialogId,"emoji-bottom":t.windowSmall,maxlength:2e5,placeholder:t.$L("\u8F93\u5165\u6D88\u606F...")},on:{"on-focus":t.onEventFocus,"on-blur":t.onEventBlur,"on-more":t.onEventMore,"on-file":t.sendFileMsg,"on-send":t.sendMsg,"on-record":t.sendRecord,"on-record-state":t.onRecordState,"on-emoji-visible-change":t.onEventEmojiVisibleChange,"on-height-change":t.onHeightChange},model:{value:t.msgText,callback:function(i){t.msgText=i},expression:"msgText"}})],1),e("div",{directives:[{name:"show",rawName:"v-show",value:t.operateVisible,expression:"operateVisible"}],staticClass:"operate-position",style:t.operateStyles},[e("Dropdown",{attrs:{trigger:"custom",placement:"top",visible:t.operateVisible,transferClassName:"dialog-wrapper-operate",transfer:""},on:{"on-clickoutside":function(i){t.operateVisible=!1}}},[e("div",{style:{userSelect:t.operateVisible?"none":"auto",height:t.operateStyles.height}}),e("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[e("DropdownItem",{attrs:{name:"action"}},[e("ul",{staticClass:"operate-action"},[t.msgId===0?e("li",{on:{click:function(i){return t.onOperate("reply")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE6EB")]),e("span",[t._v(t._s(t.$L("\u56DE\u590D")))])]):t._e(),t.operateItem.userid==t.userId&&t.operateItem.type==="text"?e("li",{on:{click:function(i){return t.onOperate("update")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE779")]),e("span",[t._v(t._s(t.$L("\u7F16\u8F91")))])]):t._e(),t._l(t.operateCopys,function(i){return e("li",{on:{click:function(a){return t.onOperate("copy",i)}}},[e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(i.icon)}}),e("span",[t._v(t._s(t.$L(i.label)))])])}),e("li",{on:{click:function(i){return t.onOperate("forward")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE638")]),e("span",[t._v(t._s(t.$L("\u8F6C\u53D1")))])]),t.operateItem.userid==t.userId?e("li",{on:{click:function(i){return t.onOperate("withdraw")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE637")]),e("span",[t._v(t._s(t.$L("\u64A4\u56DE")))])]):t._e(),t.operateItem.type==="file"?[e("li",{on:{click:function(i){return t.onOperate("view")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE77B")]),e("span",[t._v(t._s(t.$L("\u67E5\u770B")))])]),e("li",{on:{click:function(i){return t.onOperate("down")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE7A8")]),e("span",[t._v(t._s(t.$L("\u4E0B\u8F7D")))])])]:t._e(),e("li",{on:{click:function(i){return t.onOperate("tag")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE61E")]),e("span",[t._v(t._s(t.$L(t.operateItem.tag?"\u53D6\u6D88\u6807\u6CE8":"\u6807\u6CE8")))])]),t.operateItem.type==="text"?e("li",{on:{click:function(i){return t.onOperate("newTask")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE7B8")]),e("span",[t._v(t._s(t.$L("\u65B0\u4EFB\u52A1")))])]):t._e(),e("li",{on:{click:function(i){return t.onOperate("todo")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE7B7")]),e("span",[t._v(t._s(t.$L(t.operateItem.todo?"\u53D6\u6D88\u5F85\u529E":"\u8BBE\u5F85\u529E")))])]),t.msgType!==""?e("li",{on:{click:function(i){return t.onOperate("pos")}}},[e("i",{staticClass:"taskfont"},[t._v("\uEE15")]),e("span",[t._v(t._s(t.$L("\u5B8C\u6574\u5BF9\u8BDD")))])]):t._e()],2)]),e("DropdownItem",{staticClass:"dropdown-emoji",attrs:{name:"emoji"}},[e("ul",{staticClass:"operate-emoji scrollbar-hidden"},[t._l(t.operateEmojis,function(i,a){return e("li",{key:a,staticClass:"no-dark-content",domProps:{innerHTML:t._s(i)},on:{click:function(O){return t.onOperate("emoji",i)}}})}),e("li"),e("li",{staticClass:"more-emoji",on:{click:function(i){return t.onOperate("emoji","more")}}},[e("i",{staticClass:"taskfont"},[t._v("\uE790")])])],2)])],1)],1)],1),t.dialogDrag?e("div",{staticClass:"drag-over",on:{click:function(i){t.dialogDrag=!1}}},[e("div",{staticClass:"drag-text"},[t._v(t._s(t.$L("\u62D6\u52A8\u5230\u8FD9\u91CC\u53D1\u9001")))])]):t._e(),e("Modal",{attrs:{title:t.$L(t.pasteTitle),"cancel-text":t.$L("\u53D6\u6D88"),"ok-text":t.$L("\u53D1\u9001"),"enter-ok":!0},on:{"on-ok":t.pasteSend},model:{value:t.pasteShow,callback:function(i){t.pasteShow=i},expression:"pasteShow"}},[e("ul",{staticClass:"dialog-wrapper-paste",class:t.pasteWrapperClass},t._l(t.pasteItem,function(i){return e("li",[i.type=="image"?e("img",{attrs:{src:i.result}}):e("div",[t._v(t._s(t.$L("\u6587\u4EF6"))+": "+t._s(i.name)+" ("+t._s(t.$A.bytesToSize(i.size))+")")])])}),0)]),e("Modal",{attrs:{title:t.$L("\u521B\u5EFA\u7FA4\u7EC4"),"mask-closable":!1},model:{value:t.createGroupShow,callback:function(i){t.createGroupShow=i},expression:"createGroupShow"}},[e("Form",{attrs:{model:t.createGroupData,"label-width":"auto"},nativeOn:{submit:function(i){i.preventDefault()}}},[e("FormItem",{attrs:{prop:"avatar",label:t.$L("\u7FA4\u5934\u50CF")}},[e("ImgUpload",{attrs:{num:1,width:512,height:512,whcut:1},model:{value:t.createGroupData.avatar,callback:function(i){t.$set(t.createGroupData,"avatar",i)},expression:"createGroupData.avatar"}})],1),e("FormItem",{attrs:{prop:"chat_name",label:t.$L("\u7FA4\u540D\u79F0")}},[e("Input",{attrs:{placeholder:t.$L("\u8F93\u5165\u7FA4\u540D\u79F0\uFF08\u9009\u586B\uFF09")},model:{value:t.createGroupData.chat_name,callback:function(i){t.$set(t.createGroupData,"chat_name",i)},expression:"createGroupData.chat_name"}})],1),e("FormItem",{attrs:{prop:"userids",label:t.$L("\u7FA4\u6210\u5458")}},[e("UserInput",{attrs:{uncancelable:t.createGroupData.uncancelable,"multiple-max":100,"show-bot":"",placeholder:t.$L("\u9009\u62E9\u9879\u76EE\u6210\u5458")},model:{value:t.createGroupData.userids,callback:function(i){t.$set(t.createGroupData,"userids",i)},expression:"createGroupData.userids"}})],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(i){t.createGroupShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.createGroupLoad>0},on:{click:t.onCreateGroup}},[t._v(t._s(t.$L("\u521B\u5EFA")))])],1)],1),e("Modal",{attrs:{title:t.$L("\u4FEE\u6539\u5934\u50CF"),"mask-closable":!1},model:{value:t.avatarModifyShow,callback:function(i){t.avatarModifyShow=i},expression:"avatarModifyShow"}},[e("Form",{attrs:{model:t.avatarModifyData,"label-width":"auto"},nativeOn:{submit:function(i){i.preventDefault()}}},[e("FormItem",{attrs:{prop:"avatar",label:t.$L("\u7FA4\u5934\u50CF")}},[e("ImgUpload",{attrs:{num:1,width:512,height:512,whcut:1},model:{value:t.avatarModifyData.avatar,callback:function(i){t.$set(t.avatarModifyData,"avatar",i)},expression:"avatarModifyData.avatar"}})],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(i){t.avatarModifyShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.avatarModifyLoad>0},on:{click:t.onAvatarModify}},[t._v(t._s(t.$L("\u4FDD\u5B58")))])],1)],1),e("Modal",{attrs:{title:t.$L("\u8F6C\u53D1"),"mask-closable":!1},model:{value:t.forwardShow,callback:function(i){t.forwardShow=i},expression:"forwardShow"}},[e("DialogSelect",{model:{value:t.forwardData,callback:function(i){t.forwardData=i},expression:"forwardData"}}),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(i){t.forwardShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.forwardLoad},on:{click:function(i){return t.onForward("submit")}}},[t._v(t._s(t.$L("\u8F6C\u53D1")))])],1)],1),e("Modal",{attrs:{title:t.$L("\u8BBE\u7F6E\u5F85\u529E"),"mask-closable":!1},model:{value:t.todoSettingShow,callback:function(i){t.todoSettingShow=i},expression:"todoSettingShow"}},[e("Form",{ref:"todoSettingForm",attrs:{model:t.todoSettingData,"label-width":"auto"},nativeOn:{submit:function(i){i.preventDefault()}}},[e("FormItem",{attrs:{prop:"type",label:t.$L("\u5F53\u524D\u4F1A\u8BDD")}},[e("RadioGroup",{model:{value:t.todoSettingData.type,callback:function(i){t.$set(t.todoSettingData,"type",i)},expression:"todoSettingData.type"}},[e("Radio",{attrs:{label:"all"}},[t._v(t._s(t.$L("\u6240\u6709\u6210\u5458")))]),e("Radio",{attrs:{label:"user"}},[t._v(t._s(t.$L("\u6307\u5B9A\u6210\u5458")))]),t.todoSettingData.my_id?e("Radio",{attrs:{label:"my"}},[e("div",{staticClass:"dialog-wrapper-todo"},[e("div",[e("UserAvatar",{attrs:{userid:t.todoSettingData.my_id,"show-icon":!1,"show-name":!0}}),e("Tag",[t._v(t._s(t.$L("\u81EA\u5DF1")))])],1)])]):t._e(),t.todoSettingData.you_id?e("Radio",{attrs:{label:"you"}},[e("div",{staticClass:"dialog-wrapper-todo"},[e("div",[e("UserAvatar",{attrs:{userid:t.todoSettingData.you_id,"show-icon":!1,"show-name":!0}})],1)])]):t._e()],1)],1),t.todoSettingData.type==="user"?e("FormItem",{attrs:{prop:"userids"}},[e("UserInput",{attrs:{"dialog-id":t.dialogId,placeholder:t.$L("\u9009\u62E9\u6307\u5B9A\u6210\u5458")},model:{value:t.todoSettingData.userids,callback:function(i){t.$set(t.todoSettingData,"userids",i)},expression:"todoSettingData.userids"}})],1):t._e()],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(i){t.todoSettingShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.todoSettingLoad>0},on:{click:function(i){return t.onTodo("submit")}}},[t._v(t._s(t.$L("\u786E\u5B9A")))])],1)],1),e("DrawerOverlay",{attrs:{placement:"right",size:400},model:{value:t.groupInfoShow,callback:function(i){t.groupInfoShow=i},expression:"groupInfoShow"}},[t.groupInfoShow?e("DialogGroupInfo",{attrs:{dialogId:t.dialogId},on:{"on-close":function(i){t.groupInfoShow=!1}}}):t._e()],1),e("Modal",{attrs:{title:t.$L("\u8F6C\u8BA9\u7FA4\u4E3B\u8EAB\u4EFD"),"mask-closable":!1},model:{value:t.groupTransferShow,callback:function(i){t.groupTransferShow=i},expression:"groupTransferShow"}},[e("Form",{attrs:{model:t.groupTransferData,"label-width":"auto"},nativeOn:{submit:function(i){i.preventDefault()}}},[e("FormItem",{attrs:{prop:"userid",label:t.$L("\u65B0\u7684\u7FA4\u4E3B")}},[e("UserInput",{attrs:{disabledChoice:t.groupTransferData.disabledChoice,"multiple-max":1,"max-hidden-select":"",placeholder:t.$L("\u9009\u62E9\u65B0\u7684\u7FA4\u4E3B")},model:{value:t.groupTransferData.userid,callback:function(i){t.$set(t.groupTransferData,"userid",i)},expression:"groupTransferData.userid"}})],1)],1),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(i){t.groupTransferShow=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{type:"primary",loading:t.groupTransferLoad>0},on:{click:function(i){return t.onDialogMenu("transferConfirm")}}},[t._v(t._s(t.$L("\u786E\u5B9A\u8F6C\u8BA9")))])],1)],1),e("DrawerOverlay",{attrs:{placement:"right","class-name":"dialog-wrapper-drawer-list",size:500},model:{value:t.replyListShow,callback:function(i){t.replyListShow=i},expression:"replyListShow"}},[t.replyListShow?e("DialogWrapper",{staticClass:"drawer-list",attrs:{dialogId:t.dialogId,msgId:t.replyListId}},[e("div",{staticClass:"drawer-title",attrs:{slot:"head"},slot:"head"},[t._v(t._s(t.$L("\u56DE\u590D\u6D88\u606F")))])]):t._e()],1),e("DrawerOverlay",{attrs:{placement:"right",size:400},model:{value:t.respondShow,callback:function(i){t.respondShow=i},expression:"respondShow"}},[t.respondShow?e("DialogRespond",{attrs:{"respond-data":t.respondData},on:{"on-close":function(i){t.respondShow=!1}}}):t._e()],1),e("DrawerOverlay",{attrs:{placement:"right","class-name":"dialog-wrapper-drawer-list",size:500},model:{value:t.todoViewShow,callback:function(i){t.todoViewShow=i},expression:"todoViewShow"}},[e("div",{staticClass:"dialog-wrapper drawer-list"},[e("div",{staticClass:"dialog-nav"},[e("div",{staticClass:"drawer-title"},[t._v(t._s(t.$L("\u5F85\u529E\u6D88\u606F")))])]),e("div",{staticClass:"dialog-scroller scrollbar-overlay"},[t.todoViewMsg?e("DialogItem",{attrs:{source:t.todoViewMsg,simpleView:""},on:{"on-view-text":t.onViewText,"on-view-file":t.onViewFile,"on-down-file":t.onDownFile,"on-emoji":t.onEmoji}}):t._e(),e("Button",{staticClass:"original-button",attrs:{icon:"md-exit",type:"text",loading:t.todoViewPosLoad},on:{click:t.onPosTodo}},[t._v(t._s(t.$L("\u56DE\u5230\u539F\u6587")))])],1),e("div",{staticClass:"todo-button"},[e("Button",{attrs:{type:"primary",size:"large",icon:"md-checkbox-outline",loading:t.todoViewLoad,long:""},on:{click:t.onDoneTodo}},[t._v(t._s(t.$L("\u5B8C\u6210")))])],1)])])],1):t._e()},yi=[];const bi={name:"DialogWrapper",components:{ImgUpload:oe,DialogSelect:ne,DialogRespond:Be,DialogItem:Ct,VirtualList:mi,ChatInput:pi,DialogGroupInfo:Me,DrawerOverlay:re,UserInput:Ht,DialogUpload:Ae},props:{dialogId:{type:Number,default:0},msgId:{type:Number,default:0},autoFocus:{type:Boolean,default:!1},beforeBack:Function},data(){return{msgItem:Ct,msgText:"",msgNew:0,msgType:"",loadIng:0,allMsgs:[],tempMsgs:[],tempId:$A.randNum(1e9,9999999999),msgLoadIng:0,msgActiveIndex:-1,pasteShow:!1,pasteFile:[],pasteItem:[],searchShow:!1,searchKey:"",searchLoad:0,searchLocation:1,searchResult:[],createGroupShow:!1,createGroupData:{},createGroupLoad:0,avatarModifyShow:!1,avatarModifyData:{},avatarModifyLoad:0,forwardShow:!1,forwardLoad:!1,forwardData:{dialogids:[],userids:[]},openId:0,dialogDrag:!1,groupInfoShow:!1,groupTransferShow:!1,groupTransferLoad:0,groupTransferData:{userid:[],disabledChoice:[]},navStyle:{},operateVisible:!1,operateCopys:[],operateStyles:{},operateItem:{},recordState:"",wrapperStart:{},scrollOffset:0,scrollTail:0,preventMoreLoad:!1,preventToBottom:!1,replyListShow:!1,replyListId:0,respondShow:!1,respondData:{},todoSettingShow:!1,todoSettingLoad:0,todoSettingData:{type:"all",userids:[]},todoViewLoad:!1,todoViewPosLoad:!1,todoViewShow:!1,todoViewData:{},todoViewMid:0,todoViewId:0,scrollDisabled:!1,scrollDirection:null,scrollAction:0,scrollTmp:0,positionLoad:0}},beforeDestroy(){this.$store.dispatch("forgetInDialog",this._uid),this.$store.dispatch("closeDialog",this.dialogId)},computed:{...bt(["userIsAdmin","taskId","dialogSearchMsgId","dialogMsgs","dialogTodos","dialogMsgTransfer","cacheDialogs","wsOpenNum","touchBackInProgress","dialogIns","cacheUserBasic","fileLinks","cacheEmojis"]),...Ft(["isLoad"]),isReady(){return this.dialogId>0&&this.dialogData.id>0},dialogData(){return this.cacheDialogs.find(({id:t})=>t==this.dialogId)||{}},dialogList(){return this.cacheDialogs.filter(t=>!(t.name===void 0||t.dialog_delete===1)).sort((t,o)=>t.top_at||o.top_at?$A.Date(o.top_at)-$A.Date(t.top_at):t.todo_num>0||o.todo_num>0?o.todo_num-t.todo_num:$A.Date(o.last_at)-$A.Date(t.last_at))},dialogMsgList(){return this.isReady?this.dialogMsgs.filter(t=>t.dialog_id==this.dialogId):[]},tempMsgList(){return this.isReady?this.tempMsgs.filter(t=>t.dialog_id==this.dialogId):[]},allMsgList(){const t=[];if(t.push(...this.dialogMsgList.filter(o=>this.msgFilter(o))),this.msgId>0){const o=this.dialogMsgs.find(e=>e.id==this.msgId);o&&t.unshift(o)}if(this.tempMsgList.length>0){const o=t.map(({id:i})=>i),e=this.tempMsgList.filter(i=>!o.includes(i.id)&&this.msgFilter(i));e.length>0&&t.push(...e)}return t.sort((o,e)=>o.id-e.id)},loadMsg(){return this.isLoad(`msg::${this.dialogId}-${this.msgId}-${this.msgType}`)},prevId(){return this.allMsgs.length>0?$A.runNum(this.allMsgs[0].prev_id):0},peopleNum(){return this.dialogData.type==="group"?$A.runNum(this.dialogData.people):0},pasteTitle(){const{pasteItem:t}=this;let o=t.find(({type:i})=>i=="image"),e=t.find(({type:i})=>i!="image");return o&&e?"\u53D1\u9001\u6587\u4EF6/\u56FE\u7247":o?"\u53D1\u9001\u56FE\u7247":"\u53D1\u9001\u6587\u4EF6"},msgTags(){const t=[{type:"",label:"\u6D88\u606F"}];return this.dialogData.has_tag&&t.push({type:"tag",label:"\u6807\u6CE8"}),this.dialogData.has_image&&t.push({type:"image",label:"\u56FE\u7247"}),this.dialogData.has_file&&t.push({type:"file",label:"\u6587\u4EF6"}),this.dialogData.has_link&&t.push({type:"link",label:"\u94FE\u63A5"}),this.dialogData.group_type==="project"&&t.push({type:"project",label:"\u6253\u5F00\u9879\u76EE"}),this.dialogData.group_type==="task"&&t.push({type:"task",label:"\u6253\u5F00\u4EFB\u52A1"}),t},quickMsgs(){return this.dialogData.quick_msgs||[]},quickShow(){return this.quickMsgs.length>0&&this.windowScrollY===0&&this.quoteId===0},todoList(){return this.dialogData.todo_num?this.dialogTodos.filter(t=>!t.done_at&&t.dialog_id==this.dialogId).sort((t,o)=>o.id-t.id):[]},todoShow(){return this.todoList.length>0&&this.windowScrollY===0&&this.quoteId===0},wrapperClass(){return["ready","ing"].includes(this.recordState)?["record-ready"]:null},tagShow(){return this.msgTags.length>1&&this.windowScrollY===0&&!this.searchShow},scrollerClass(){return!this.$slots.head&&this.tagShow?"default-header":null},pasteWrapperClass(){return this.pasteItem.find(({type:t})=>t!=="image")?["multiple"]:[]},footerClass(){return this.msgNew>0&&this.allMsgs.length>0?"newmsg":this.scrollTail>500?"goto":null},msgUnreadOnly(){let t=0;return this.cacheDialogs.some(o=>{t+=$A.getDialogNum(o)}),t<=0?"":(t>999&&(t="999+"),String(t))},isMyDialog(){const{dialogData:t,userId:o}=this;return t.dialog_user&&t.dialog_user.userid==o},isMute(){if(this.dialogData.group_type==="all"){if(this.dialogData.all_group_mute==="all")return!0;if(this.dialogData.all_group_mute==="user"&&!this.userIsAdmin)return!0}return!1},quoteId(){return this.msgId>0?this.msgId:this.dialogData.extra_quote_id||0},quoteUpdate(){return this.dialogData.extra_quote_type==="update"},quoteData(){return this.quoteId?this.allMsgs.find(({id:t})=>t===this.quoteId):null},todoViewMsg(){if(this.todoViewMid){const t=this.allMsgs.find(o=>o.id==this.todoViewMid);if(t)return t;if(this.todoViewData.id===this.todoViewMid)return this.todoViewData}return null},positionMsg(){const{unread:t,position_msgs:o}=this.dialogData;if(!o||o.length===0||t===0||this.allMsgs.length===0)return null;const e=o.sort((i,a)=>a.msg_id-i.msg_id)[0];return this.allMsgs.findIndex(({id:i})=>i==e.msg_id)===-1?e.label==="{UNREAD}"?Object.assign(e,{label:this.$L(`\u672A\u8BFB\u6D88\u606F${t}\u6761`)}):e:null},operateEmojis(){const t=this.cacheEmojis.slice(0,3);return Object.values(["\u{1F44C}","\u{1F44D}","\u{1F602}","\u{1F389}","\u2764\uFE0F","\u{1F973}\uFE0F","\u{1F970}","\u{1F625}","\u{1F62D}"]).some(o=>{t.includes(o)||t.push(o)}),t}},watch:{dialogId:{handler(t,o){t&&(this.msgNew=0,this.msgType="",this.searchShow=!1,this.allMsgList.length>0&&(this.allMsgs=this.allMsgList,requestAnimationFrame(this.onToBottom)),this.getMsgs({dialog_id:t,msg_id:this.msgId,msg_type:this.msgType}).then(e=>{this.openId=t,setTimeout(this.onSearchMsgId,100)}).catch(e=>{}),this.$store.dispatch("saveInDialog",{uid:this._uid,dialog_id:t}),this.autoFocus&&this.inputFocus()),this.$store.dispatch("closeDialog",o)},immediate:!0},loadMsg:{handler(t){t?this.loadIng++:setTimeout(o=>{this.loadIng--},300)},immediate:!0},msgType(){this.getMsgs({dialog_id:this.dialogId,msg_id:this.msgId,msg_type:this.msgType,clear_before:!0}).catch(t=>{})},searchKey(t){!t||(this.searchLoad++,setTimeout(o=>{this.searchKey===t&&(this.searchLoad++,this.searchResult=[],this.searchLocation=0,this.$store.dispatch("call",{url:"dialog/msg/search",data:{dialog_id:this.dialogId,key:t}}).then(({data:e})=>{this.searchKey===t&&(this.searchResult=e.data,this.searchLocation=this.searchResult.length)}).finally(e=>{this.searchLoad--})),this.searchLoad--},600))},searchLocation(t){if(t===0)return;const o=this.searchResult[t-1];o&&this.onPositionId(o)},dialogSearchMsgId(){this.onSearchMsgId()},dialogMsgTransfer:{handler({time:t,msgFile:o,msgRecord:e,msgText:i,dialogId:a}){t>$A.Time()&&a==this.dialogId&&(this.$store.state.dialogMsgTransfer.time=0,this.$nextTick(()=>{$A.isArray(o)&&o.length>0?this.sendFileMsg(o):$A.isJson(e)&&e.duration>0?this.sendRecord(e):i&&this.sendMsg(i)}))},immediate:!0},wsOpenNum(t){t<=1||this.getMsgs({dialog_id:this.dialogId,msg_id:this.msgId,msg_type:this.msgType}).catch(o=>{})},allMsgList(t,o){const{tail:e}=this.scrollInfo();if(this.allMsgs=t,!this.windowActive||e>10&&o.length>0){const i=o[o.length-1]?o[o.length-1].id:0,a=t.filter(O=>O.id&&O.id>i);this.msgNew+=a.length}else this.preventToBottom||this.$nextTick(this.onToBottom)},windowScrollY(t){if($A.isIos()){const{tail:o}=this.scrollInfo();this.navStyle={marginTop:t+"px"},o<=10&&requestAnimationFrame(this.onToBottom),this.$refs.input.isFocus&&$A.scrollToView(this.$refs.footer)}},windowActive(t){if(t&&this.autoFocus){const o=$A.last(this.dialogIns);o&&o.uid===this._uid&&this.inputFocus()}},dialogDrag(t){t&&(this.operateVisible=!1)},msgActiveIndex(t){t>-1&&setTimeout(o=>this.msgActiveIndex=-1,800)}},methods:{sendMsg(t){let o,e=!1;if(typeof t=="string"&&t?o=t:(o=this.msgText,e=!0),o==""){this.inputFocus();return}if(o=o.replace(/<\/span> <\/p>$/,"

"),this.quoteUpdate){o=o.replace(new RegExp(`src=(["'])${$A.apiUrl("../")}`,"g"),"src=$1{{RemoteURL}}");const i=this.quoteId;this.$store.dispatch("setLoad",{key:`msg-${i}`,delay:600}),this.cancelQuote(),this.onActive(),this.$store.dispatch("call",{url:"dialog/msg/sendtext",data:{dialog_id:this.dialogId,update_id:i,text:o},method:"post",complete:a=>this.$store.dispatch("cancelLoad",`msg-${i}`)}).then(({data:a})=>{this.sendSuccess(a),this.onPositionId(i)}).catch(({msg:a})=>{$A.modalError(a)})}else{const i=$A.stringLength(o.replace(/]*?>/g,""))>5e3,a={id:this.getTempId(),dialog_id:this.dialogData.id,reply_id:this.quoteId,reply_data:this.quoteData,type:i?"loading":"text",userid:this.userId,msg:{text:i?"":o}};this.tempMsgs.push(a),this.msgType="",this.cancelQuote(),this.onActive(),this.$nextTick(this.onToBottom),this.$store.dispatch("call",{url:"dialog/msg/sendtext",data:{dialog_id:a.dialog_id,reply_id:a.reply_id,text:o},method:"post"}).then(({data:O})=>{this.tempMsgs=this.tempMsgs.filter(({id:S})=>S!=a.id),this.sendSuccess(O)}).catch(O=>{this.$set(a,"error",!0),this.$set(a,"errorData",{type:"text",content:O.msg,msg:o})})}e&&requestAnimationFrame(i=>this.msgText="")},sendRecord(t){const o={id:this.getTempId(),dialog_id:this.dialogData.id,reply_id:this.quoteId,reply_data:this.quoteData,type:"loading",userid:this.userId,msg:t};this.tempMsgs.push(o),this.msgType="",this.cancelQuote(),this.onActive(),this.$nextTick(this.onToBottom),this.$store.dispatch("call",{url:"dialog/msg/sendrecord",data:Object.assign(t,{dialog_id:this.dialogId,reply_id:this.quoteId}),method:"post"}).then(({data:e})=>{this.tempMsgs=this.tempMsgs.filter(({id:i})=>i!=o.id),this.sendSuccess(e)}).catch(e=>{this.$set(o,"error",!0),this.$set(o,"errorData",{type:"record",content:e.msg,msg:t})})},sendFileMsg(t){const o=$A.isArray(t)?t:[t];o.length>0&&(this.pasteFile=[],this.pasteItem=[],o.some(e=>{const i={type:$A.getMiddle(e.type,null,"/"),name:e.name,size:e.size,result:null};if(i.type==="image"){const a=new FileReader;a.readAsDataURL(e),a.onload=({target:O})=>{i.result=O.result,this.pasteFile.push(e),this.pasteItem.push(i),this.pasteShow=!0}}else this.pasteFile.push(e),this.pasteItem.push(i),this.pasteShow=!0}))},sendQuick(t){this.sendMsg(`

${t.label}

`)},getTempId(){return this.tempId++},getMsgs(t){return new Promise((o,e)=>{setTimeout(i=>this.msgLoadIng++,2e3),this.$store.dispatch("getDialogMsgs",t).then(o).catch(e).finally(i=>{this.msgLoadIng--})})},msgFilter(t){if(this.msgType){if(this.msgType==="tag"){if(!t.tag)return!1}else if(this.msgType==="link"){if(!t.link)return!1}else if(this.msgType!==t.mtype)return!1}return!(this.msgId&&t.reply_id!=this.msgId)},onSearchMsgId(){this.dialogSearchMsgId>0&&this.openId===this.dialogId&&(this.onPositionId(this.dialogSearchMsgId),this.$store.state.dialogSearchMsgId=0)},onPositionId(t,o=0,e=0){return new Promise((i,a)=>{if(t===0){$A.modalError("\u67E5\u770B\u5931\u8D25\uFF1A\u53C2\u6570\u9519\u8BEF"),a();return}if(this.loadMsg||this.msgType!==""){if(this.msgType="",e===0)this.$store.dispatch("showSpinner",600);else if(e>20){this.$store.dispatch("hiddenSpinner"),$A.modalError("\u67E5\u770B\u5931\u8D25\uFF1A\u8BF7\u6C42\u8D85\u65F6"),a();return}e++,setTimeout(w=>{this.onPositionId(t,o,e).then(i).catch(a)},Math.min(800,200*e));return}e>0&&this.$store.dispatch("hiddenSpinner");const O=this.allMsgs.findIndex(w=>w.id===t),S=this.prevId>0?0:-1;O>S?setTimeout(w=>{this.onToIndex(O),i()},200):(o>0&&this.$store.dispatch("setLoad",{key:`msg-${o}`,delay:600}),this.preventToBottom=!0,this.getMsgs({dialog_id:this.dialogId,msg_id:this.msgId,msg_type:this.msgType,position_id:t,spinner:2e3}).finally(w=>{const b=this.allMsgs.findIndex(_=>_.id===t);b>-1&&(this.onToIndex(b),i()),o>0&&this.$store.dispatch("cancelLoad",`msg-${o}`),this.preventToBottom=!1}))})},onViewTodo(t){if(this.operateVisible)return;this.todoViewId=t.id,this.todoViewMid=t.msg_id,this.todoViewShow=!0,this.allMsgs.findIndex(e=>e.id===this.todoViewMid)===-1&&this.$store.dispatch("call",{url:"dialog/msg/one",data:{msg_id:this.todoViewMid}}).then(({data:e})=>{this.todoViewData=e})},onCloseTodo(){this.todoViewLoad=!1,this.todoViewShow=!1,this.todoViewData={},this.todoViewMid=0,this.todoViewId=0},onPosTodo(){!this.todoViewMid||(this.todoViewPosLoad=!0,this.onPositionId(this.todoViewMid).then(this.onCloseTodo).finally(t=>{this.todoViewPosLoad=!1}))},onDoneTodo(){!this.todoViewId||this.todoViewLoad||(this.todoViewLoad=!0,this.$store.dispatch("call",{url:"dialog/msg/done",data:{id:this.todoViewId}}).then(({data:t})=>{this.$store.dispatch("saveDialogTodo",{id:this.todoViewId,done_at:$A.formatDate("Y-m-d H:i:s")}),this.$store.dispatch("saveDialog",{id:this.dialogId,todo_num:this.todoList.length}),t.add&&this.sendSuccess(t.add),this.todoList.length===0&&this.$store.dispatch("getDialogTodo",this.dialogId),this.onCloseTodo()}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.todoViewLoad=!1}))},itemClassAdd(t){return t===this.msgActiveIndex?"common-shake":""},inputFocus(){this.$nextTick(t=>{this.$refs.input&&this.$refs.input.focus()})},onRecordState(t){this.recordState=t},chatPasteDrag(t,o){this.dialogDrag=!1;const e=o==="drag"?t.dataTransfer.files:t.clipboardData.files,i=Array.prototype.slice.call(e);i.length>0&&(t.preventDefault(),this.sendFileMsg(i))},chatDragOver(t,o){let e=this.__dialogDrag=$A.randomString(8);if(!t)setTimeout(()=>{e===this.__dialogDrag&&(this.dialogDrag=t)},150);else{if(o.dataTransfer.effectAllowed==="move"||Array.prototype.slice.call(o.dataTransfer.files).length===0)return;this.dialogDrag=!0}},onTouchStart(t){this.wrapperStart=Object.assign(this.scrollInfo(),{clientY:t.touches[0].clientY,exclud:!this.$refs.scroller.$el.contains(t.target)})},onTouchMove(t){if(this.windowSmall&&this.windowScrollY>0){if(this.wrapperStart.exclud){t.preventDefault();return}this.wrapperStart.clientY>t.touches[0].clientY?this.wrapperStart.tail===0&&t.preventDefault():this.wrapperStart.offset===0&&t.preventDefault()}},pasteSend(){this.pasteFile.some(t=>{this.$refs.chatUpload.upload(t)})},chatFile(t,o){switch(t){case"progress":const e={id:o.tempId,dialog_id:this.dialogData.id,reply_id:this.quoteId,type:"loading",userid:this.userId,msg:{}};this.tempMsgs.push(e),this.msgType="",this.cancelQuote(),this.onActive(),this.$nextTick(this.onToBottom);break;case"error":this.tempMsgs=this.tempMsgs.filter(({id:i})=>i!=o.tempId);break;case"success":this.tempMsgs=this.tempMsgs.filter(({id:i})=>i!=o.tempId),this.sendSuccess(o.data);break}},sendSuccess(t){if($A.isArray(t)){t.some(this.sendSuccess);return}this.$store.dispatch("saveDialogMsg",t),this.quoteUpdate||(this.$store.dispatch("increaseTaskMsgNum",t),this.$store.dispatch("increaseMsgReplyNum",t),this.$store.dispatch("updateDialogLastMsg",t)),this.cancelQuote(),this.onActive()},setQuote(t,o){var e;(e=this.$refs.input)==null||e.setQuote(t,o)},cancelQuote(){var t;(t=this.$refs.input)==null||t.cancelQuote()},onEventFocus(){this.$emit("on-focus")},onEventBlur(){this.$emit("on-blur")},onEventMore(t){switch(t){case"image":case"file":this.$refs.chatUpload.handleClick();break;case"call":this.onCallTel();break;case"anon":this.onAnon();break}},onCallTel(){this.$store.dispatch("call",{url:"dialog/tel",data:{dialog_id:this.dialogId},spinner:600}).then(({data:t})=>{t.tel&&$A.eeuiAppSendMessage({action:"callTel",tel:t.tel}),t.add&&(this.$store.dispatch("saveDialogMsg",t.add),this.$store.dispatch("updateDialogLastMsg",t.add),this.onActive())}).catch(({msg:t})=>{$A.modalError(t)})},onAnon(){if(this.dialogData.type!=="user"||this.dialogData.bot){$A.modalWarning("\u533F\u540D\u6D88\u606F\u4EC5\u5141\u8BB8\u53D1\u9001\u7ED9\u4E2A\u4EBA");return}$A.modalInput({title:"\u53D1\u9001\u533F\u540D\u6D88\u606F",placeholder:"\u533F\u540D\u6D88\u606F\u5C06\u901A\u8FC7\u533F\u540D\u6D88\u606F\uFF08\u673A\u5668\u4EBA\uFF09\u53D1\u9001\u7ED9\u5BF9\u65B9\uFF0C\u4E0D\u4F1A\u8BB0\u5F55\u4F60\u7684\u4EFB\u4F55\u8EAB\u4EFD\u4FE1\u606F",inputProps:{type:"textarea",rows:3,autosize:{minRows:3,maxRows:6},maxlength:2e3},okText:"\u533F\u540D\u53D1\u9001",onOk:t=>t?new Promise((o,e)=>{this.$store.dispatch("call",{url:"dialog/msg/sendanon",data:{userid:this.dialogData.dialog_user.userid,text:t},method:"post"}).then(({msg:i})=>{o(i)}).catch(({msg:i})=>{e(i)})}):"\u8BF7\u8F93\u5165\u6D88\u606F\u5185\u5BB9"})},onEventEmojiVisibleChange(t){t&&this.windowSmall&&this.onToBottom()},onHeightChange({newVal:t,oldVal:o}){const e=t-o;if(e!==0){const{offset:i,tail:a}=this.scrollInfo();a>0&&this.onToOffset(i+e)}},onActive(){this.$emit("on-active")},onToBottom(){this.msgNew=0;const t=this.$refs.scroller;t&&(t.scrollToBottom(),requestAnimationFrame(o=>t.scrollToBottom()))},onToIndex(t){const o=this.$refs.scroller;o&&(o.stopToBottom(),o.scrollToIndex(t,-100),requestAnimationFrame(e=>o.scrollToIndex(t,-100))),requestAnimationFrame(e=>this.msgActiveIndex=t)},onToOffset(t){const o=this.$refs.scroller;o&&(o.stopToBottom(),o.scrollToOffset(t),setTimeout(e=>o.scrollToOffset(t),10))},scrollInfo(){const t=this.$refs.scroller;return t?t.scrollInfo():{offset:0,scale:0,tail:0}},openProject(){!this.dialogData.group_info||(this.windowSmall&&this.$store.dispatch("openDialog",0),this.goForward({name:"manage-project",params:{projectId:this.dialogData.group_info.id}}))},openTask(){!this.dialogData.group_info||(this.taskId>0&&this.$store.dispatch("openDialog",0),this.$store.dispatch("openTask",this.dialogData.group_info.id))},onPrevPage(){this.prevId!==0&&this.getMsgs({dialog_id:this.dialogId,msg_id:this.msgId,msg_type:this.msgType,prev_id:this.prevId,save_before:t=>this.scrollDisabled=!0,save_after:t=>this.scrollDisabled=!1}).then(({data:t})=>{const o=t.list.map(e=>e.id);this.$nextTick(()=>{const e=this.$refs.scroller,i=o.reduce((O,S)=>({size:(typeof O=="object"?O.size:e.getSize(O))+e.getSize(S)}));let a=e.getOffset()+i.size;this.prevId===0&&(a-=36),this.onToOffset(a),setTimeout(O=>e.virtual.handleFront(),10)})}).catch(()=>{})},onDialogMenu(t){switch(t){case"searchMsg":this.searchShow=!0,this.$nextTick(e=>{this.$refs.searchInput.focus()});break;case"openCreate":const o=[this.userId];this.dialogData.dialog_user&&this.userId!=this.dialogData.dialog_user.userid&&o.push(this.dialogData.dialog_user.userid),this.createGroupData={userids:o,uncancelable:[this.userId]},this.createGroupShow=!0;break;case"avatar":this.avatarModifyData={dialog_id:this.dialogData.id,avatar:this.dialogData.avatar},this.avatarModifyShow=!0;break;case"avatarAdmin":this.avatarModifyData={dialog_id:this.dialogData.id,avatar:this.dialogData.avatar,admin:1},this.avatarModifyShow=!0;break;case"groupInfo":this.groupInfoShow=!0;break;case"transfer":this.groupTransferData={dialog_id:this.dialogId,userid:[],disabledChoice:[this.userId]},this.groupTransferShow=!0;break;case"transferConfirm":this.onTransferGroup();break;case"disband":this.onDisbandGroup();break;case"exit":this.onExitGroup();break}},onTransferGroup(){if(this.groupTransferData.userid.length===0){$A.messageError("\u8BF7\u9009\u62E9\u65B0\u7684\u7FA4\u4E3B");return}this.groupTransferLoad++,this.$store.dispatch("call",{url:"dialog/group/transfer",data:{dialog_id:this.dialogId,userid:this.groupTransferData.userid[0]}}).then(({data:t,msg:o})=>{$A.messageSuccess(o),this.$store.dispatch("saveDialog",t)}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.groupTransferLoad--,this.groupTransferShow=!1})},onDisbandGroup(){$A.modalConfirm({content:`\u4F60\u786E\u5B9A\u8981\u89E3\u6563\u3010${this.dialogData.name}\u3011\u7FA4\u7EC4\u5417\uFF1F`,loading:!0,okText:"\u89E3\u6563",onOk:()=>new Promise((t,o)=>{this.$store.dispatch("call",{url:"dialog/group/disband",data:{dialog_id:this.dialogId}}).then(({msg:e})=>{t(e),this.$store.dispatch("forgetDialog",this.dialogId),this.goForward({name:"manage-messenger"})}).catch(({msg:e})=>{o(e)})})})},onExitGroup(){$A.modalConfirm({content:"\u4F60\u786E\u5B9A\u8981\u9000\u51FA\u7FA4\u7EC4\u5417\uFF1F",loading:!0,onOk:()=>new Promise((t,o)=>{this.$store.dispatch("call",{url:"dialog/group/deluser",data:{dialog_id:this.dialogId}}).then(({msg:e})=>{t(e),this.$store.dispatch("forgetDialog",this.dialogId),this.goForward({name:"manage-messenger"})}).catch(({msg:e})=>{o(e)})})})},onCreateGroup(){this.createGroupLoad++,this.$store.dispatch("call",{url:"dialog/group/add",data:this.createGroupData}).then(({data:t,msg:o})=>{$A.messageSuccess(o),this.createGroupShow=!1,this.createGroupData={},this.$store.dispatch("saveDialog",t),this.$store.dispatch("openDialog",t.id)}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.createGroupLoad--})},onAvatarModify(){this.avatarModifyLoad++,this.$store.dispatch("call",{url:"dialog/group/edit",data:this.avatarModifyData}).then(({data:t,msg:o})=>{$A.messageSuccess(o),this.avatarModifyShow=!1,this.avatarModifyData={},this.$store.dispatch("saveDialog",t)}).catch(({msg:t})=>{$A.modalError(t)}).finally(t=>{this.avatarModifyLoad--})},onForward(t){if(t==="open")this.forwardData={dialogids:[],userids:[],msg_id:this.operateItem.id},this.forwardShow=!0;else if(t==="submit"){if($A.arrayLength(this.forwardData.dialogids)===0&&$A.arrayLength(this.forwardData.userids)===0){$A.messageWarning("\u8BF7\u9009\u62E9\u8F6C\u53D1\u5BF9\u8BDD\u6216\u6210\u5458");return}this.forwardLoad=!0,this.$store.dispatch("call",{url:"dialog/msg/forward",data:this.forwardData}).then(({data:o,msg:e})=>{this.forwardShow=!1,this.$store.dispatch("saveDialogMsg",o.msgs),this.$store.dispatch("updateDialogLastMsg",o.msgs),$A.messageSuccess(e)}).catch(({msg:o})=>{$A.modalError(o)}).finally(o=>{this.forwardLoad=!1})}},onScroll(t){this.operateVisible=!1;const{offset:o,tail:e}=this.scrollInfo();this.scrollOffset=o,this.scrollTail=e,this.scrollTail<=10&&(this.msgNew=0),this.scrollAction=t.target.scrollTop,this.scrollDirection=this.scrollTmp<=this.scrollAction?"down":"up",setTimeout(i=>this.scrollTmp=this.scrollAction,0)},onRange(t){if(this.preventMoreLoad)return;const o=this.scrollDirection==="down"?"next_id":"prev_id";for(let e=t.start;e<=t.end;e++){const i=this.allMsgs[e][o];if(i){const a=this.allMsgs[e+(o==="next_id"?1:-1)];a&&a.id!=i&&(this.preventMoreLoad=!0,this.getMsgs({dialog_id:this.dialogId,msg_id:this.msgId,msg_type:this.msgType,[o]:i}).finally(O=>{this.preventMoreLoad=!1}))}}},onBack(){if(!this.beforeBack)return this.handleBack();const t=this.beforeBack();t&&t.then?t.then(()=>{this.handleBack()}):this.handleBack()},handleBack(){const{name:t,params:o}=this.$store.state.routeHistoryLast;t===this.$route.name&&/^\d+$/.test(o.dialogId)?this.goForward({name:this.$route.name}):this.goBack()},onMsgType(t){switch(t){case"project":this.openProject();break;case"task":this.openTask();break;default:this.loadMsg?$A.messageWarning("\u6B63\u5728\u52A0\u8F7D\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5..."):this.msgType=t;break}},onMention(t){const o=this.cacheUserBasic.find(({userid:e})=>e==t.userid);o&&this.$refs.input.addMention({denotationChar:"@",id:o.userid,value:o.nickname})},onLongpress({event:t,el:o,msgData:e}){this.operateVisible=this.operateItem.id===e.id,this.operateItem=$A.isJson(e)?e:{},this.operateCopys=[],t.target.nodeName==="IMG"&&this.$Electron?this.operateCopys.push({type:"image",icon:"",label:"\u590D\u5236\u56FE\u7247",value:$A.rightDelete(t.target.currentSrc,"_thumb.jpg")}):t.target.nodeName==="A"&&(t.target.classList.contains("mention")&&t.target.classList.contains("file")&&this.findOperateFile(this.operateItem.id,t.target.href),this.operateCopys.push({type:"link",icon:"",label:"\u590D\u5236\u94FE\u63A5",value:t.target.href})),e.type==="text"&&(t.target.nodeName==="IMG"&&this.operateCopys.push({type:"imagedown",icon:"",label:"\u4E0B\u8F7D\u56FE\u7247",value:$A.rightDelete(t.target.currentSrc,"_thumb.jpg")}),e.msg.text.replace(/<[^>]+>/g,"").length>0&&this.operateCopys.push({type:"text",icon:"",label:this.operateCopys.length>0?"\u590D\u5236\u6587\u672C":"\u590D\u5236",value:""})),this.$nextTick(()=>{const i=o.getBoundingClientRect(),a=this.$el.getBoundingClientRect();this.operateStyles={left:`${t.clientX-a.left}px`,top:`${i.top+this.windowScrollY}px`,height:i.height+"px"},this.operateVisible=!0})},onOperate(t,o=null){this.operateVisible=!1,this.$nextTick(e=>{switch(t){case"reply":this.onReply();break;case"update":this.onUpdate();break;case"copy":this.onCopy(o);break;case"forward":this.onForward("open");break;case"withdraw":this.onWithdraw();break;case"view":this.onViewFile();break;case"down":this.onDownFile();break;case"tag":this.onTag();break;case"newTask":let i=$A.formatMsgBasic(this.operateItem.msg.text);i=i.replace(/]*?src=(["'])(.*?)(_thumb\.jpg)*\1[^>]*?>/g,''),Tt.Store.set("addTask",{owner:[this.userId],content:i});break;case"todo":this.onTodo();break;case"pos":this.onPositionId(this.operateItem.id);break;case"emoji":o==="more"?vi().then(this.onEmoji):this.onEmoji(o);break}})},onReply(t){const{tail:o}=this.scrollInfo();this.setQuote(this.operateItem.id,t),this.inputFocus(),o<=10&&requestAnimationFrame(this.onToBottom)},onUpdate(){const{type:t}=this.operateItem;if(this.onReply(t==="text"?"update":"reply"),t==="text"){let{text:o}=this.operateItem.msg;o.indexOf("mention")>-1&&(o=o.replace(/
]*)>~([^>]*)<\/a>/g,'~$3'),o=o.replace(/([@#])([^>]*)<\/span>/g,'$3$4')),o=o.replace(/]*>/gi,e=>e.replace(/(width|height)="\d+"\s*/ig,"")),this.$refs.input.setPasteMode(!1),this.msgText=$A.formatMsgBasic(o),this.$nextTick(e=>this.$refs.input.setPasteMode(!0))}},onCopy(t){if(!$A.isJson(t))return;const{type:o,value:e}=t;switch(o){case"image":this.$Electron&&this.getBase64Image(e).then(a=>{this.$Electron.sendMessage("copyBase64Image",{base64:a})});break;case"imagedown":this.$store.dispatch("downUrl",{url:e,token:!1});break;case"filepos":this.windowSmall&&this.$store.dispatch("openDialog",0),this.goForward({name:"manage-file",params:e});break;case"link":this.$copyText(e).then(a=>$A.messageSuccess("\u590D\u5236\u6210\u529F")).catch(a=>$A.messageError("\u590D\u5236\u5931\u8D25"));break;case"text":const i=$A(this.$refs.scroller.$el).find(`[data-id="${this.operateItem.id}"]`).find(".dialog-content");if(i.length>0){const a=i[0].innerText.replace(/\n\n/g,` `).replace(/(^\s*)|(\s*$)/g,"");this.$copyText(a).then(O=>$A.messageSuccess("\u590D\u5236\u6210\u529F")).catch(O=>$A.messageError("\u590D\u5236\u5931\u8D25"))}else $A.messageWarning("\u4E0D\u53EF\u590D\u5236\u7684\u5185\u5BB9");break}},onWithdraw(){$A.modalConfirm({content:"\u786E\u5B9A\u64A4\u56DE\u6B64\u4FE1\u606F\u5417\uFF1F",okText:"\u64A4\u56DE",loading:!0,onOk:()=>new Promise((t,o)=>{this.$store.dispatch("call",{url:"dialog/msg/withdraw",data:{msg_id:this.operateItem.id}}).then(()=>{t("\u6D88\u606F\u5DF2\u64A4\u56DE"),this.$store.dispatch("forgetDialogMsg",this.operateItem.id)}).catch(({msg:e})=>{o(e)})})})},onViewReply(t){this.operateVisible||this.onPositionId(t.reply_id,t.msg_id)},onViewText({target:t}){if(!this.operateVisible)switch(t.nodeName){case"IMG":t.classList.contains("browse")?this.onViewPicture(t.currentSrc):this.$store.dispatch("previewImage",{index:0,list:$A.getTextImagesInfo(t.outerHTML)});break;case"SPAN":t.classList.contains("mention")&&t.classList.contains("task")&&this.$store.dispatch("openTask",$A.runNum(t.getAttribute("data-id")));break}},onViewFile(t){if(this.operateVisible)return;$A.isJson(t)||(t=this.operateItem);const{msg:o}=t;if(["jpg","jpeg","gif","png"].includes(o.ext)){this.onViewPicture(o.path);return}const e=`/single/file/msg/${t.id}`;this.$Electron?this.$Electron.sendMessage("windowRouter",{name:`file-msg-${t.id}`,path:e,userAgent:"/hideenOfficeTitle/",force:!1,config:{title:`${o.name} (${$A.bytesToSize(o.size)})`,titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)},webPreferences:{nodeIntegrationInSubFrames:o.ext==="drawio"}}):this.$isEEUiApp?$A.eeuiAppOpenPage({pageType:"app",pageTitle:`${o.name} (${$A.bytesToSize(o.size)})`,url:"web.js",params:{titleFixed:!0,allowAccess:!0,url:$A.rightDelete(window.location.href,window.location.hash)+`#${e}`}}):window.open($A.apiUrl(`..${e}`))},onViewPicture(t){const o=this.allMsgs.filter(a=>a.type==="file"?["jpg","jpeg","gif","png"].includes(a.msg.ext):a.type==="text"?a.msg.text.match(/]*?>/):!1),e=[];o.some(({type:a,msg:O})=>{a==="file"?e.push({src:O.path,width:O.width,height:O.height}):a==="text"&&e.push(...$A.getTextImagesInfo(O.text))});const i=e.findIndex(({src:a})=>a===t);i>-1?this.$store.dispatch("previewImage",{index:i,list:e}):this.$store.dispatch("previewImage",t)},onDownFile(t){this.operateVisible||($A.isJson(t)||(t=this.operateItem),$A.modalConfirm({title:"\u4E0B\u8F7D\u6587\u4EF6",content:`${t.msg.name} (${$A.bytesToSize(t.msg.size)})`,okText:"\u7ACB\u5373\u4E0B\u8F7D",onOk:()=>{this.$store.dispatch("downUrl",$A.apiUrl(`dialog/msg/download?msg_id=${t.id}`))}}))},onReplyList(t){this.operateVisible||(this.replyListId=t.msg_id,this.replyListShow=!0)},onError(t){if(t.error!==!0)return;const{type:o,content:e,msg:i}=t.errorData,a={icon:"error",title:"\u53D1\u9001\u5931\u8D25",content:e,cancelText:"\u53D6\u6D88\u53D1\u9001",onCancel:O=>{this.tempMsgs=this.tempMsgs.filter(({id:S})=>S!=t.id)}};if(o==="text")a.okText="\u518D\u6B21\u7F16\u8F91",a.onOk=()=>{this.tempMsgs=this.tempMsgs.filter(({id:O})=>O!=t.id),this.msgText=i,this.inputFocus()};else if(o==="record")a.okText="\u91CD\u65B0\u53D1\u9001",a.onOk=()=>{this.tempMsgs=this.tempMsgs.filter(({id:O})=>O!=t.id),this.sendRecord(i)};else return;$A.modalConfirm(a)},onEmoji(t){$A.isJson(t)||(t={msg_id:this.operateItem.id,symbol:t});const o=this.cacheEmojis.filter(e=>e!==t.symbol);o.unshift(t.symbol),$A.IDBSave("cacheEmojis",this.$store.state.cacheEmojis=o.slice(0,3)),this.$store.dispatch("setLoad",{key:`msg-${t.msg_id}`,delay:600}),this.$store.dispatch("call",{url:"dialog/msg/emoji",data:t}).then(({data:e})=>{this.dialogMsgs.findIndex(a=>a.id==e.id)>-1?this.$store.dispatch("saveDialogMsg",e):this.todoViewData.id===e.id&&(this.todoViewData=Object.assign(this.todoViewData,e))}).catch(({msg:e})=>{$A.messageError(e)}).finally(e=>{this.$store.dispatch("cancelLoad",`msg-${t.msg_id}`)})},onShowEmojiUser(t){this.operateVisible||(this.respondData=t,this.respondShow=!0)},onTag(){if(this.operateVisible)return;const t={msg_id:this.operateItem.id};this.$store.dispatch("setLoad",{key:`msg-${t.msg_id}`,delay:600}),this.$store.dispatch("call",{url:"dialog/msg/tag",data:t}).then(({data:o})=>{this.tagOrTodoSuccess(o)}).catch(({msg:o})=>{$A.messageError(o)}).finally(o=>{this.$store.dispatch("cancelLoad",`msg-${t.msg_id}`)})},onTodo(t){var o;if(!this.operateVisible)if(t==="submit"){const e=$A.cloneJSON(this.todoSettingData);if(e.type==="my")e.type="user",e.userids=[e.my_id];else if(e.type==="you")e.type="user",e.userids=[e.you_id];else if(e.type==="user"&&$A.arrayLength(e.userids)===0){$A.messageWarning("\u9009\u62E9\u6307\u5B9A\u6210\u5458");return}this.todoSettingLoad++,this.onTodoSubmit(e).then(i=>{$A.messageSuccess(i),this.todoSettingShow=!1}).catch($A.messageError).finally(i=>{this.todoSettingLoad--})}else{const e=(o=this.dialogData.dialog_user)==null?void 0:o.userid;this.todoSettingData={type:"all",userids:[],msg_id:this.operateItem.id,my_id:this.userId,you_id:e!=this.userId&&!this.dialogData.bot?e:0},this.operateItem.todo?$A.modalConfirm({content:"\u4F60\u786E\u5B9A\u53D6\u6D88\u5F85\u529E\u5417\uFF1F",cancelText:"\u53D6\u6D88",okText:"\u786E\u5B9A",loading:!0,onOk:()=>this.onTodoSubmit(this.todoSettingData)}):this.todoSettingShow=!0}},onTodoSubmit(t){return new Promise((o,e)=>{this.$store.dispatch("setLoad",{key:`msg-${t.msg_id}`,delay:600}),this.$store.dispatch("call",{url:"dialog/msg/todo",data:t}).then(({data:i,msg:a})=>{o(a),this.tagOrTodoSuccess(i),this.onActive()}).catch(({msg:i})=>{e(i)}).finally(i=>{this.$store.dispatch("cancelLoad",`msg-${t.msg_id}`)})})},tagOrTodoSuccess(t){this.$store.dispatch("saveDialogMsg",t.update),t.add&&(this.$store.dispatch("saveDialogMsg",t.add),this.$store.dispatch("updateDialogLastMsg",t.add))},onSearchSwitch(t){if(this.searchResult.length!==0){if(this.searchLocation===1&&this.searchResult.length===1){this.onPositionId(this.searchResult[0]);return}t==="prev"?this.searchLocation<=1?this.searchLocation=this.searchResult.length:this.searchLocation--:this.searchLocation>=this.searchResult.length?this.searchLocation=1:this.searchLocation++}},onSearchKeyup(t){(t===null||t.keyCode===27)&&(this.searchShow=!1,this.searchKey="",this.searchResult=[])},onPositionMark(){if(this.positionLoad>0)return;this.positionLoad++;const{msg_id:t}=this.positionMsg;this.$store.dispatch("dialogMsgMark",{dialog_id:this.dialogId,type:"read",after_msg_id:t}).then(o=>{this.positionLoad++,this.onPositionId(t).finally(e=>{this.positionLoad--})}).catch(({msg:o})=>{$A.modalError(o)}).finally(o=>{this.positionLoad--})},findOperateFile(t,o){const e=this.fileLinks.find(i=>i.link===o);if(e){this.addFileMenu(t,e);return}this.$store.dispatch("searchFiles",{link:o}).then(({data:i})=>{if(i.length===1){const a={link:o,id:i[0].id,pid:i[0].pid};this.fileLinks.push(a),this.addFileMenu(t,a)}}).catch(i=>{})},addFileMenu(t,o){if(this.operateItem.id!=t||this.operateCopys.findIndex(i=>i.type==="filepos")!==-1)return;const e=Math.max(0,this.operateCopys.findIndex(i=>i.type==="link")-1);this.operateCopys.splice(e,0,{type:"filepos",icon:"",label:"\u663E\u793A\u6587\u4EF6",value:{folderId:o.pid,fileId:null,shakeId:o.id}})},getBase64Image(t){return new Promise(o=>{let e=document.createElement("CANVAS"),i=e.getContext("2d"),a=new Image;a.crossOrigin="Anonymous",a.onload=()=>{e.height=a.height,e.width=a.width,i.drawImage(a,0,0);let O="png";$A.rightExists(t,"jpg")||$A.rightExists(t,"jpeg")?O="jpeg":$A.rightExists(t,"git")&&(O="git"),o(e.toDataURL(`image/${O}`)),e=null},a.src=t})},onViewAvatar(t){let o=null;t.target.tagName==="IMG"?o=t.target.src:o=$A(t.target).find("img").attr("src"),o&&this.$store.dispatch("previewImage",o)}}},Bt={};var _i=pt(bi,gi,yi,!1,wi,null,null,null);function wi(t){for(let o in Bt)this[o]=Bt[o]}var xi=function(){return _i.exports}();export{pi as C,xi as D}; diff --git a/public/js/build/Drawio.2a737647.js b/public/js/build/Drawio.21a1cca4.js similarity index 93% rename from public/js/build/Drawio.2a737647.js rename to public/js/build/Drawio.21a1cca4.js index 528f57f4c..a7eef9afb 100644 --- a/public/js/build/Drawio.2a737647.js +++ b/public/js/build/Drawio.21a1cca4.js @@ -1 +1 @@ -import{m as o,n as l,a as s}from"./app.256678e2.js";import{I as d}from"./IFrame.c83aa3a9.js";var u=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"drawio-content"},[a("IFrame",{ref:"frame",staticClass:"drawio-iframe",attrs:{src:e.url},on:{"on-message":e.onMessage}}),e.loadIng?a("div",{staticClass:"drawio-loading"},[a("Loading")],1):e._e()],1)},m=[];const c={name:"Drawio",components:{IFrame:d},props:{value:{type:Object,default:function(){return{}}},title:{type:String,default:""},readOnly:{type:Boolean,default:!1}},data(){return{loadIng:!0,url:null,bakData:""}},created(){let e=s;switch(s){case"zh-CHT":e="zh-tw";break}let t=this.readOnly?1:0,a=this.readOnly?0:1,r=this.themeIsDark?"dark":"kennedy",n=`?title=${this.title?encodeURIComponent(this.title):""}&chrome=${a}&lightbox=${t}&ui=${r}&lang=${e}&offline=1&pwa=0&embed=1&noLangIcon=1&noExitBtn=1&noSaveBtn=1&saveAndExit=0&spin=1&proto=json`;this.$Electron?this.url=$A.originUrl(`drawio/webapp/index.html${n}`):this.url=$A.apiUrl(`../drawio/webapp/${n}`)},mounted(){window.addEventListener("message",this.handleMessage)},beforeDestroy(){window.removeEventListener("message",this.handleMessage)},watch:{value:{handler(e){this.bakData!=$A.jsonStringify(e)&&(this.bakData=$A.jsonStringify(e),this.updateContent())},deep:!0}},computed:{...o(["themeIsDark"])},methods:{formatZoom(e){return e+"%"},updateContent(){this.$refs.frame.postMessage(JSON.stringify({action:"load",autosave:1,xml:this.value.xml}))},onMessage(e){switch(e.event){case"init":this.loadIng=!1,this.updateContent();break;case"load":typeof this.value.xml=="undefined"&&this.$refs.frame.postMessage(JSON.stringify({action:"template"}));break;case"autosave":const t={xml:e.xml};this.bakData=$A.jsonStringify(t),this.$emit("input",t);break;case"save":this.$emit("saveData");break}}}},i={};var h=l(c,u,m,!1,f,"6b690a27",null,null);function f(e){for(let t in i)this[t]=i[t]}var _=function(){return h.exports}();export{_ as default}; +import{m as o,n as l,a as s}from"./app.73f924cf.js";import{I as d}from"./IFrame.3efc17fc.js";var u=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"drawio-content"},[a("IFrame",{ref:"frame",staticClass:"drawio-iframe",attrs:{src:e.url},on:{"on-message":e.onMessage}}),e.loadIng?a("div",{staticClass:"drawio-loading"},[a("Loading")],1):e._e()],1)},m=[];const c={name:"Drawio",components:{IFrame:d},props:{value:{type:Object,default:function(){return{}}},title:{type:String,default:""},readOnly:{type:Boolean,default:!1}},data(){return{loadIng:!0,url:null,bakData:""}},created(){let e=s;switch(s){case"zh-CHT":e="zh-tw";break}let t=this.readOnly?1:0,a=this.readOnly?0:1,r=this.themeIsDark?"dark":"kennedy",n=`?title=${this.title?encodeURIComponent(this.title):""}&chrome=${a}&lightbox=${t}&ui=${r}&lang=${e}&offline=1&pwa=0&embed=1&noLangIcon=1&noExitBtn=1&noSaveBtn=1&saveAndExit=0&spin=1&proto=json`;this.$Electron?this.url=$A.originUrl(`drawio/webapp/index.html${n}`):this.url=$A.apiUrl(`../drawio/webapp/${n}`)},mounted(){window.addEventListener("message",this.handleMessage)},beforeDestroy(){window.removeEventListener("message",this.handleMessage)},watch:{value:{handler(e){this.bakData!=$A.jsonStringify(e)&&(this.bakData=$A.jsonStringify(e),this.updateContent())},deep:!0}},computed:{...o(["themeIsDark"])},methods:{formatZoom(e){return e+"%"},updateContent(){this.$refs.frame.postMessage(JSON.stringify({action:"load",autosave:1,xml:this.value.xml}))},onMessage(e){switch(e.event){case"init":this.loadIng=!1,this.updateContent();break;case"load":typeof this.value.xml=="undefined"&&this.$refs.frame.postMessage(JSON.stringify({action:"template"}));break;case"autosave":const t={xml:e.xml};this.bakData=$A.jsonStringify(t),this.$emit("input",t);break;case"save":this.$emit("saveData");break}}}},i={};var h=l(c,u,m,!1,f,"6b690a27",null,null);function f(e){for(let t in i)this[t]=i[t]}var _=function(){return h.exports}();export{_ as default}; diff --git a/public/js/build/FileContent.03a22ace.js b/public/js/build/FileContent.5ed4f509.js similarity index 92% rename from public/js/build/FileContent.03a22ace.js rename to public/js/build/FileContent.5ed4f509.js index 836b65425..438c090a2 100644 --- a/public/js/build/FileContent.03a22ace.js +++ b/public/js/build/FileContent.5ed4f509.js @@ -1 +1 @@ -import{n as r,m as c,_ as n}from"./app.256678e2.js";import{I as d}from"./IFrame.c83aa3a9.js";var h=function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("div",{staticClass:"file-history"},[t("Table",{attrs:{width:480,"max-height":e.windowHeight-180,columns:e.columns,data:e.list,loading:e.loadIng>0,"no-data-text":e.$L(e.noText),"highlight-row":"",stripe:""}}),e.total>e.pageSize?t("Page",{attrs:{total:e.total,current:e.page,"page-size":e.pageSize,disabled:e.loadIng>0,simple:!0},on:{"on-change":e.setPage,"on-page-size-change":e.setPageSize}}):e._e()],1)},u=[];const f={name:"FileHistory",props:{value:{type:Boolean,default:!1},file:{type:Object,default:()=>({})}},data(){return{loadIng:0,columns:[{title:this.$L("\u65E5\u671F"),key:"created_at",width:168},{title:this.$L("\u521B\u5EFA\u4EBA"),width:120,render:(e,{row:s})=>e("UserAvatar",{props:{showName:!0,size:22,userid:s.userid}})},{title:this.$L("\u5927\u5C0F"),key:"size",width:90,render:(e,{row:s})=>e("AutoTip",$A.bytesToSize(s.size))},{title:this.$L("\u64CD\u4F5C"),align:"center",width:100,render:(e,{index:s,row:t,column:i})=>s===0&&this.page===1?e("div","-"):e("TableAction",{props:{column:i,menu:[{label:this.$L("\u67E5\u770B"),action:"preview"},{label:this.$L("\u8FD8\u539F"),action:"restore"}]},on:{action:a=>{this.onAction(a,t)}}})}],list:[],page:1,pageSize:10,total:0,noText:""}},mounted(){},watch:{value:{handler(e){e&&this.setPage(1)},immediate:!0}},computed:{fileId(){return this.file.id||0}},methods:{getLists(){this.fileId!==0&&(this.loadIng++,this.$store.dispatch("call",{url:"file/content/history",data:{id:this.fileId,page:Math.max(this.page,1),pagesize:Math.max($A.runNum(this.pageSize),10)}}).then(({data:e})=>{this.page=e.current_page,this.total=e.total,this.list=e.data,this.noText="\u6CA1\u6709\u76F8\u5173\u7684\u6570\u636E"}).catch(()=>{this.noText="\u6570\u636E\u52A0\u8F7D\u5931\u8D25"}).finally(e=>{this.loadIng--}))},setPage(e){this.page=e,this.getLists()},setPageSize(e){this.page=1,this.pageSize=e,this.getLists()},onAction(e,s){switch(e){case"restore":this.$emit("on-restore",s);break;case"preview":const t=`/single/file/${this.fileId}?history_id=${s.id}&history_at=${s.created_at}`;this.$Electron?this.$Electron.sendMessage("windowRouter",{name:`file-${this.fileId}-${s.id}`,path:t,userAgent:"/hideenOfficeTitle/",force:!1,config:{title:$A.getFileName(this.file)+` [${s.created_at}]`,titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)},webPreferences:{nodeIntegrationInSubFrames:this.file.type==="drawio"}}):this.$isEEUiApp?$A.eeuiAppOpenPage({pageType:"app",pageTitle:$A.getFileName(this.file)+` [${s.created_at}]`,url:"web.js",params:{titleFixed:!0,allowAccess:!0,url:$A.rightDelete(window.location.href,window.location.hash)+`#${t}`}}):window.open($A.apiUrl(`..${t}`));break}}}},o={};var p=r(f,h,u,!1,v,"44e1704c",null,null);function v(e){for(let s in o)this[s]=o[s]}var _=function(){return p.exports}(),m=function(){var e=this,s=e.$createElement,t=e._self._c||s;return e.ready?t("div",{staticClass:"file-content"},[e.isPreview?t("IFrame",{staticClass:"preview-iframe",attrs:{src:e.previewUrl},on:{"on-load":e.onFrameLoad}}):e.contentDetail?[["word","excel","ppt"].includes(e.file.type)?t("EPopover",{attrs:{trigger:"click"},model:{value:e.historyShow,callback:function(i){e.historyShow=i},expression:"historyShow"}},[t("div",{staticClass:"file-content-history"},[t("FileHistory",{attrs:{value:e.historyShow,file:e.file},on:{"on-restore":e.onRestoreHistory}})],1),t("div",{ref:"officeHeader",staticClass:"office-header",attrs:{slot:"reference"},slot:"reference"})]):t("div",{staticClass:"edit-header"},[t("div",{staticClass:"header-title"},[e.equalContent?e._e():t("EPopover",{staticClass:"file-unsave-tip",model:{value:e.unsaveTip,callback:function(i){e.unsaveTip=i},expression:"unsaveTip"}},[t("div",{staticClass:"task-detail-delete-file-popover"},[t("p",[e._v(e._s(e.$L("\u672A\u4FDD\u5B58\u5F53\u524D\u4FEE\u6539\u5185\u5BB9\uFF1F")))]),t("div",{staticClass:"buttons"},[t("Button",{attrs:{size:"small",type:"text"},on:{click:e.unSaveGive}},[e._v(e._s(e.$L("\u653E\u5F03")))]),t("Button",{attrs:{size:"small",type:"primary"},on:{click:e.onSaveSave}},[e._v(e._s(e.$L("\u4FDD\u5B58")))])],1)]),t("span",{attrs:{slot:"reference"},slot:"reference"},[e._v("["+e._s(e.$L("\u672A\u4FDD\u5B58"))+"*]")])]),e._v(" "+e._s(e.fileName)+" ")],1),t("div",{staticClass:"header-user"},[t("ul",[e._l(e.editUser,function(i,a){return a<=10?t("li",{key:a},[t("UserAvatar",{attrs:{userid:i,size:28,"border-witdh":2}})],1):e._e()}),e.editUser.length>10?t("li",{staticClass:"more",attrs:{title:e.editUser.length}},[e._v(e._s(e.editUser.length>999?"...":e.editUser.length))]):e._e()],2)]),e.file.type=="document"&&e.contentDetail?t("div",{staticClass:"header-hint"},[t("ButtonGroup",{attrs:{size:"small",shape:"circle"}},[t("Button",{attrs:{type:`${e.contentDetail.type=="md"?"primary":"default"}`},on:{click:function(i){return e.setTextType("md")}}},[e._v(e._s(e.$L("MD\u7F16\u8F91\u5668")))]),t("Button",{attrs:{type:`${e.contentDetail.type!="md"?"primary":"default"}`},on:{click:function(i){return e.setTextType("text")}}},[e._v(e._s(e.$L("\u6587\u672C\u7F16\u8F91\u5668")))])],1)],1):e._e(),e.file.type=="mind"?t("div",{staticClass:"header-hint"},[e._v(" "+e._s(e.$L("\u9009\u4E2D\u8282\u70B9\uFF0C\u6309enter\u952E\u6DFB\u52A0\u540C\u7EA7\u8282\u70B9\uFF0Ctab\u952E\u6DFB\u52A0\u5B50\u8282\u70B9"))+" ")]):e._e(),e.file.type=="mind"?t("Dropdown",{staticClass:"header-hint",attrs:{trigger:"click",transfer:""},on:{"on-click":e.exportMenu}},[t("a",{attrs:{href:"javascript:void(0)"}},[e._v(e._s(e.$L("\u5BFC\u51FA"))),t("Icon",{attrs:{type:"ios-arrow-down"}})],1),t("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[t("DropdownItem",{attrs:{name:"png"}},[e._v(e._s(e.$L("\u5BFC\u51FAPNG\u56FE\u7247")))]),t("DropdownItem",{attrs:{name:"pdf"}},[e._v(e._s(e.$L("\u5BFC\u51FAPDF\u6587\u4EF6")))])],1)],1):e._e(),e.file.only_view?e._e():[t("div",{staticClass:"header-icons"},[t("ETooltip",{attrs:{disabled:e.windowSmall||e.$isEEUiApp,content:e.$L("\u6587\u4EF6\u94FE\u63A5")}},[t("div",{staticClass:"header-icon",on:{click:function(i){return e.handleClick("link")}}},[t("i",{staticClass:"taskfont"},[e._v("\uE785")])])]),t("EPopover",{attrs:{trigger:"click"},model:{value:e.historyShow,callback:function(i){e.historyShow=i},expression:"historyShow"}},[t("div",{staticClass:"file-content-history"},[t("FileHistory",{attrs:{value:e.historyShow,file:e.file},on:{"on-restore":e.onRestoreHistory}})],1),t("ETooltip",{ref:"historyTip",attrs:{slot:"reference",disabled:e.windowSmall||e.$isEEUiApp||e.historyShow,content:e.$L("\u5386\u53F2\u7248\u672C")},slot:"reference"},[t("div",{staticClass:"header-icon"},[t("i",{staticClass:"taskfont"},[e._v("\uE71D")])])])],1)],1),t("Button",{staticClass:"header-button",attrs:{disabled:e.equalContent,loading:e.loadSave>0,size:"small",type:"primary"},on:{click:function(i){return e.handleClick("save")}}},[e._v(e._s(e.$L("\u4FDD\u5B58")))])]],2),t("div",{staticClass:"content-body"},[e.historyShow?t("div",{staticClass:"content-mask"}):e._e(),e.file.type=="document"?[e.contentDetail.type=="md"?t("MDEditor",{attrs:{height:"100%"},model:{value:e.contentDetail.content,callback:function(i){e.$set(e.contentDetail,"content",i)},expression:"contentDetail.content"}}):t("TEditor",{attrs:{height:"100%"},on:{editorSave:function(i){return e.handleClick("saveBefore")}},model:{value:e.contentDetail.content,callback:function(i){e.$set(e.contentDetail,"content",i)},expression:"contentDetail.content"}})]:e.file.type=="drawio"?t("Drawio",{ref:"myFlow",attrs:{title:e.file.name},on:{saveData:function(i){return e.handleClick("saveBefore")}},model:{value:e.contentDetail,callback:function(i){e.contentDetail=i},expression:"contentDetail"}}):e.file.type=="mind"?t("Minder",{ref:"myMind",on:{saveData:function(i){return e.handleClick("saveBefore")}},model:{value:e.contentDetail,callback:function(i){e.contentDetail=i},expression:"contentDetail"}}):["code","txt"].includes(e.file.type)?t("AceEditor",{attrs:{ext:e.file.ext},on:{saveData:function(i){return e.handleClick("saveBefore")}},model:{value:e.contentDetail.content,callback:function(i){e.$set(e.contentDetail,"content",i)},expression:"contentDetail.content"}}):["word","excel","ppt"].includes(e.file.type)?t("OnlyOffice",{attrs:{documentKey:e.documentKey},on:{"on-document-ready":function(i){return e.handleClick("officeReady")}},model:{value:e.contentDetail,callback:function(i){e.contentDetail=i},expression:"contentDetail"}}):e._e()],2)]:e._e(),e.contentLoad?t("div",{staticClass:"content-load"},[t("Loading")],1):e._e(),t("Modal",{attrs:{title:e.$L("\u6587\u4EF6\u94FE\u63A5"),"mask-closable":!1},model:{value:e.linkShow,callback:function(i){e.linkShow=i},expression:"linkShow"}},[t("div",[t("div",{staticStyle:{margin:"-10px 0 8px"}},[e._v(e._s(e.$L("\u6587\u4EF6\u540D\u79F0"))+": "+e._s(e.linkData.name))]),t("Input",{ref:"linkInput",attrs:{type:"textarea",rows:3,readonly:""},on:{"on-focus":e.linkFocus},model:{value:e.linkData.url,callback:function(i){e.$set(e.linkData,"url",i)},expression:"linkData.url"}}),t("div",{staticClass:"form-tip",staticStyle:{"padding-top":"6px"}},[e._v(e._s(e.$L("\u53EF\u901A\u8FC7\u6B64\u94FE\u63A5\u6D4F\u89C8\u6587\u4EF6\u3002"))),t("a",{attrs:{href:"javascript:void(0)"},on:{click:e.linkCopy}},[e._v(e._s(e.$L("\u70B9\u51FB\u590D\u5236\u94FE\u63A5")))])])],1),t("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[t("Button",{attrs:{type:"default"},on:{click:function(i){e.linkShow=!1}}},[e._v(e._s(e.$L("\u53D6\u6D88")))]),t("Poptip",{staticStyle:{"margin-left":"8px"},attrs:{confirm:"",placement:"bottom","ok-text":e.$L("\u786E\u5B9A"),"cancel-text":e.$L("\u53D6\u6D88"),transfer:""},on:{"on-ok":function(i){return e.linkGet(!0)}}},[t("div",{attrs:{slot:"title"},slot:"title"},[t("p",[t("strong",[e._v(e._s(e.$L("\u6CE8\u610F\uFF1A\u5237\u65B0\u5C06\u5BFC\u81F4\u539F\u6765\u7684\u94FE\u63A5\u5931\u6548\uFF01")))])])]),t("Button",{attrs:{type:"primary",loading:e.linkLoad>0}},[e._v(e._s(e.$L("\u5237\u65B0")))])],1)],1)])],2):e._e()},y=[];const k=()=>n(()=>import("./index.006bde1a.js"),["js/build/index.006bde1a.js","js/build/index.03d13184.css","js/build/app.256678e2.js","js/build/app.d2a9034f.css","js/build/ImgUpload.6fde0d68.js"]),$=()=>n(()=>import("./TEditor.61cbcfed.js"),["js/build/TEditor.61cbcfed.js","js/build/app.256678e2.js","js/build/app.d2a9034f.css","js/build/ImgUpload.6fde0d68.js"]),w=()=>n(()=>import("./AceEditor.74000a06.js"),["js/build/AceEditor.74000a06.js","js/build/app.256678e2.js","js/build/app.d2a9034f.css"]),g=()=>n(()=>import("./OnlyOffice.349e25ca.js"),["js/build/OnlyOffice.349e25ca.js","js/build/OnlyOffice.d36f3069.css","js/build/app.256678e2.js","js/build/app.d2a9034f.css","js/build/IFrame.c83aa3a9.js"]),D=()=>n(()=>import("./Drawio.2a737647.js"),["js/build/Drawio.2a737647.js","js/build/Drawio.fc5c6326.css","js/build/app.256678e2.js","js/build/app.d2a9034f.css","js/build/IFrame.c83aa3a9.js"]),x=()=>n(()=>import("./Minder.7a501126.js"),["js/build/Minder.7a501126.js","js/build/Minder.f2273bdb.css","js/build/IFrame.c83aa3a9.js","js/build/app.256678e2.js","js/build/app.d2a9034f.css"]),S={name:"FileContent",components:{IFrame:d,FileHistory:_,AceEditor:w,TEditor:$,MDEditor:k,OnlyOffice:g,Drawio:D,Minder:x},props:{value:{type:Boolean,default:!1},file:{type:Object,default:()=>({})}},data(){return{ready:!1,loadSave:0,loadContent:0,unsaveTip:!1,fileExt:null,contentDetail:null,contentBak:{},editUser:[],loadPreview:!0,linkShow:!1,linkData:{},linkLoad:0,historyShow:!1,officeReady:!1}},mounted(){document.addEventListener("keydown",this.keySave),window.addEventListener("message",this.handleOfficeMessage),this.$isSubElectron&&(window.__onBeforeUnload=()=>{if(!this.equalContent)return $A.modalConfirm({content:"\u4FEE\u6539\u7684\u5185\u5BB9\u5C1A\u672A\u4FDD\u5B58\uFF0C\u786E\u5B9A\u8981\u653E\u5F03\u4FEE\u6539\u5417\uFF1F",cancelText:"\u53D6\u6D88",okText:"\u653E\u5F03",onOk:()=>{this.$Electron.sendMessage("windowDestroy")}}),!0})},beforeDestroy(){document.removeEventListener("keydown",this.keySave),window.removeEventListener("message",this.handleOfficeMessage)},watch:{value:{handler(e){e?(this.ready=!0,this.editUser=[this.userId],this.getContent()):(this.linkShow=!1,this.historyShow=!1,this.officeReady=!1,this.fileExt=null)},immediate:!0},historyShow(e){!e&&this.$refs.historyTip&&this.$refs.historyTip.updatePopper()},wsMsg:{handler(e){const{type:s,action:t,data:i}=e;switch(s){case"path":i.path=="/single/file/"+this.fileId&&(this.editUser=i.userids);break;case"file":t=="content"&&this.value&&i.id==this.fileId&&$A.modalConfirm({title:"\u66F4\u65B0\u63D0\u793A",content:"\u56E2\u961F\u6210\u5458\uFF08"+e.nickname+"\uFF09\u66F4\u65B0\u4E86\u5185\u5BB9\uFF0C
\u66F4\u65B0\u65F6\u95F4\uFF1A"+$A.formatDate("Y-m-d H:i:s",e.time)+"\u3002

\u70B9\u51FB\u3010\u786E\u5B9A\u3011\u52A0\u8F7D\u6700\u65B0\u5185\u5BB9\u3002",onOk:()=>{this.getContent()}});break}},deep:!0}},computed:{...c(["wsMsg"]),fileId(){return this.file.id||0},fileName(){return this.fileExt?$A.getFileName(Object.assign(this.file,{ext:this.fileExt})):$A.getFileName(this.file)},equalContent(){return this.contentBak==$A.jsonStringify(this.contentDetail)},contentLoad(){return this.loadContent>0||this.previewLoad},isPreview(){return this.contentDetail&&this.contentDetail.preview===!0},previewLoad(){return this.isPreview&&this.loadPreview===!0},previewUrl(){if(this.isPreview){const{name:e,key:s}=this.contentDetail;return $A.apiUrl(`../online/preview/${e}?key=${s}`)}return""}},methods:{handleOfficeMessage({data:e,source:s}){if(e.source==="onlyoffice")switch(e.action){case"ready":s.postMessage("createMenu","*");break;case"link":this.handleClick("link");break;case"history":const t=this.$refs.officeHeader;t&&(t.style.top=`${e.rect.top}px`,t.style.left=`${e.rect.left}px`,t.style.width=`${e.rect.width}px`,t.style.height=`${e.rect.height}px`,t.click());break}},onFrameLoad(){this.loadPreview=!1},keySave(e){this.value&&e.keyCode===83&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),this.onSaveSave())},getContent(){if(this.fileId===0){this.contentDetail={},this.updateBak();return}if(["word","excel","ppt"].includes(this.file.type)){this.contentDetail=$A.cloneJSON(this.file),this.updateBak();return}this.loadSave++,setTimeout(e=>{this.loadContent++},600),this.$store.dispatch("call",{url:"file/content",data:{id:this.fileId}}).then(({data:e})=>{this.contentDetail=e.content,this.updateBak()}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{this.loadSave--,this.loadContent--})},updateBak(){this.contentBak=$A.jsonStringify(this.contentDetail)},handleClick(e){switch(e){case"link":this.linkData={id:this.fileId,name:this.file.name},this.linkShow=!0,this.linkGet();break;case"saveBefore":!this.equalContent&&this.loadSave==0?this.handleClick("save"):$A.messageWarning("\u6CA1\u6709\u4EFB\u4F55\u4FEE\u6539\uFF01");break;case"save":if(this.file.only_view)return;this.updateBak(),this.loadSave++,this.$store.dispatch("call",{url:"file/content/save",method:"post",data:{id:this.fileId,content:this.contentBak}}).then(({data:s,msg:t})=>{$A.messageSuccess(t);const i={id:this.fileId,size:s.size};this.fileExt&&(i.ext=this.fileExt,this.fileExt=null),this.$store.dispatch("saveFile",i)}).catch(({msg:s})=>{$A.modalError(s),this.getContent()}).finally(s=>{this.loadSave--});break;case"officeReady":this.officeReady=!0;break}},onRestoreHistory(e){this.historyShow=!1,$A.modalConfirm({content:`\u4F60\u786E\u5B9A\u6587\u4EF6\u8FD8\u539F\u81F3\u3010${e.created_at}\u3011\u5417\uFF1F`,cancelText:"\u53D6\u6D88",okText:"\u786E\u5B9A",loading:!0,onOk:()=>new Promise((s,t)=>{this.$store.dispatch("call",{url:"file/content/restore",data:{id:this.fileId,history_id:e.id}}).then(({msg:i})=>{s(i),this.contentDetail=null,this.getContent()}).catch(({msg:i})=>{t(i)})})})},linkGet(e){this.linkLoad++,this.$store.dispatch("call",{url:"file/link",data:{id:this.linkData.id,refresh:e===!0?"yes":"no"}}).then(({data:s})=>{this.linkData=Object.assign(s,{id:this.linkData.id,name:this.linkData.name}),this.linkFocus()}).catch(({msg:s})=>{this.linkShow=!1,$A.modalError(s)}).finally(s=>{this.linkLoad--})},linkCopy(){!this.linkData.url||(this.linkFocus(),this.$copyText(this.linkData.url).then(e=>{$A.messageSuccess("\u590D\u5236\u6210\u529F")}).catch(e=>{$A.messageError("\u590D\u5236\u5931\u8D25")}))},linkFocus(){this.$nextTick(e=>{this.$refs.linkInput.focus({cursor:"all"})})},exportMenu(e){switch(this.file.type){case"mind":this.$refs.myMind.exportHandle(e,this.file.name);break}},unSaveGive(){this.getContent(),this.unsaveTip=!1},onSaveSave(){this.handleClick("save"),this.unsaveTip=!1},setTextType(e){this.fileExt=e,this.$set(this.contentDetail,"type",e)},documentKey(){return new Promise(e=>{this.$store.dispatch("call",{url:"file/content",data:{id:this.fileId,only_update_at:"yes"}}).then(({data:s})=>{e(`${s.id}-${$A.Time(s.update_at)}`)}).catch(()=>{e(0)})})}}},l={};var C=r(S,m,y,!1,L,null,null,null);function L(e){for(let s in l)this[s]=l[s]}var A=function(){return C.exports}();export{A as default}; +import{n as r,m as c,_ as n}from"./app.73f924cf.js";import{I as d}from"./IFrame.3efc17fc.js";var h=function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("div",{staticClass:"file-history"},[t("Table",{attrs:{width:480,"max-height":e.windowHeight-180,columns:e.columns,data:e.list,loading:e.loadIng>0,"no-data-text":e.$L(e.noText),"highlight-row":"",stripe:""}}),e.total>e.pageSize?t("Page",{attrs:{total:e.total,current:e.page,"page-size":e.pageSize,disabled:e.loadIng>0,simple:!0},on:{"on-change":e.setPage,"on-page-size-change":e.setPageSize}}):e._e()],1)},u=[];const f={name:"FileHistory",props:{value:{type:Boolean,default:!1},file:{type:Object,default:()=>({})}},data(){return{loadIng:0,columns:[{title:this.$L("\u65E5\u671F"),key:"created_at",width:168},{title:this.$L("\u521B\u5EFA\u4EBA"),width:120,render:(e,{row:s})=>e("UserAvatar",{props:{showName:!0,size:22,userid:s.userid}})},{title:this.$L("\u5927\u5C0F"),key:"size",width:90,render:(e,{row:s})=>e("AutoTip",$A.bytesToSize(s.size))},{title:this.$L("\u64CD\u4F5C"),align:"center",width:100,render:(e,{index:s,row:t,column:i})=>s===0&&this.page===1?e("div","-"):e("TableAction",{props:{column:i,menu:[{label:this.$L("\u67E5\u770B"),action:"preview"},{label:this.$L("\u8FD8\u539F"),action:"restore"}]},on:{action:a=>{this.onAction(a,t)}}})}],list:[],page:1,pageSize:10,total:0,noText:""}},mounted(){},watch:{value:{handler(e){e&&this.setPage(1)},immediate:!0}},computed:{fileId(){return this.file.id||0}},methods:{getLists(){this.fileId!==0&&(this.loadIng++,this.$store.dispatch("call",{url:"file/content/history",data:{id:this.fileId,page:Math.max(this.page,1),pagesize:Math.max($A.runNum(this.pageSize),10)}}).then(({data:e})=>{this.page=e.current_page,this.total=e.total,this.list=e.data,this.noText="\u6CA1\u6709\u76F8\u5173\u7684\u6570\u636E"}).catch(()=>{this.noText="\u6570\u636E\u52A0\u8F7D\u5931\u8D25"}).finally(e=>{this.loadIng--}))},setPage(e){this.page=e,this.getLists()},setPageSize(e){this.page=1,this.pageSize=e,this.getLists()},onAction(e,s){switch(e){case"restore":this.$emit("on-restore",s);break;case"preview":const t=`/single/file/${this.fileId}?history_id=${s.id}&history_at=${s.created_at}`;this.$Electron?this.$Electron.sendMessage("windowRouter",{name:`file-${this.fileId}-${s.id}`,path:t,userAgent:"/hideenOfficeTitle/",force:!1,config:{title:$A.getFileName(this.file)+` [${s.created_at}]`,titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)},webPreferences:{nodeIntegrationInSubFrames:this.file.type==="drawio"}}):this.$isEEUiApp?$A.eeuiAppOpenPage({pageType:"app",pageTitle:$A.getFileName(this.file)+` [${s.created_at}]`,url:"web.js",params:{titleFixed:!0,allowAccess:!0,url:$A.rightDelete(window.location.href,window.location.hash)+`#${t}`}}):window.open($A.apiUrl(`..${t}`));break}}}},o={};var p=r(f,h,u,!1,v,"44e1704c",null,null);function v(e){for(let s in o)this[s]=o[s]}var _=function(){return p.exports}(),m=function(){var e=this,s=e.$createElement,t=e._self._c||s;return e.ready?t("div",{staticClass:"file-content"},[e.isPreview?t("IFrame",{staticClass:"preview-iframe",attrs:{src:e.previewUrl},on:{"on-load":e.onFrameLoad}}):e.contentDetail?[["word","excel","ppt"].includes(e.file.type)?t("EPopover",{attrs:{trigger:"click"},model:{value:e.historyShow,callback:function(i){e.historyShow=i},expression:"historyShow"}},[t("div",{staticClass:"file-content-history"},[t("FileHistory",{attrs:{value:e.historyShow,file:e.file},on:{"on-restore":e.onRestoreHistory}})],1),t("div",{ref:"officeHeader",staticClass:"office-header",attrs:{slot:"reference"},slot:"reference"})]):t("div",{staticClass:"edit-header"},[t("div",{staticClass:"header-title"},[e.equalContent?e._e():t("EPopover",{staticClass:"file-unsave-tip",model:{value:e.unsaveTip,callback:function(i){e.unsaveTip=i},expression:"unsaveTip"}},[t("div",{staticClass:"task-detail-delete-file-popover"},[t("p",[e._v(e._s(e.$L("\u672A\u4FDD\u5B58\u5F53\u524D\u4FEE\u6539\u5185\u5BB9\uFF1F")))]),t("div",{staticClass:"buttons"},[t("Button",{attrs:{size:"small",type:"text"},on:{click:e.unSaveGive}},[e._v(e._s(e.$L("\u653E\u5F03")))]),t("Button",{attrs:{size:"small",type:"primary"},on:{click:e.onSaveSave}},[e._v(e._s(e.$L("\u4FDD\u5B58")))])],1)]),t("span",{attrs:{slot:"reference"},slot:"reference"},[e._v("["+e._s(e.$L("\u672A\u4FDD\u5B58"))+"*]")])]),e._v(" "+e._s(e.fileName)+" ")],1),t("div",{staticClass:"header-user"},[t("ul",[e._l(e.editUser,function(i,a){return a<=10?t("li",{key:a},[t("UserAvatar",{attrs:{userid:i,size:28,"border-witdh":2}})],1):e._e()}),e.editUser.length>10?t("li",{staticClass:"more",attrs:{title:e.editUser.length}},[e._v(e._s(e.editUser.length>999?"...":e.editUser.length))]):e._e()],2)]),e.file.type=="document"&&e.contentDetail?t("div",{staticClass:"header-hint"},[t("ButtonGroup",{attrs:{size:"small",shape:"circle"}},[t("Button",{attrs:{type:`${e.contentDetail.type=="md"?"primary":"default"}`},on:{click:function(i){return e.setTextType("md")}}},[e._v(e._s(e.$L("MD\u7F16\u8F91\u5668")))]),t("Button",{attrs:{type:`${e.contentDetail.type!="md"?"primary":"default"}`},on:{click:function(i){return e.setTextType("text")}}},[e._v(e._s(e.$L("\u6587\u672C\u7F16\u8F91\u5668")))])],1)],1):e._e(),e.file.type=="mind"?t("div",{staticClass:"header-hint"},[e._v(" "+e._s(e.$L("\u9009\u4E2D\u8282\u70B9\uFF0C\u6309enter\u952E\u6DFB\u52A0\u540C\u7EA7\u8282\u70B9\uFF0Ctab\u952E\u6DFB\u52A0\u5B50\u8282\u70B9"))+" ")]):e._e(),e.file.type=="mind"?t("Dropdown",{staticClass:"header-hint",attrs:{trigger:"click",transfer:""},on:{"on-click":e.exportMenu}},[t("a",{attrs:{href:"javascript:void(0)"}},[e._v(e._s(e.$L("\u5BFC\u51FA"))),t("Icon",{attrs:{type:"ios-arrow-down"}})],1),t("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[t("DropdownItem",{attrs:{name:"png"}},[e._v(e._s(e.$L("\u5BFC\u51FAPNG\u56FE\u7247")))]),t("DropdownItem",{attrs:{name:"pdf"}},[e._v(e._s(e.$L("\u5BFC\u51FAPDF\u6587\u4EF6")))])],1)],1):e._e(),e.file.only_view?e._e():[t("div",{staticClass:"header-icons"},[t("ETooltip",{attrs:{disabled:e.windowSmall||e.$isEEUiApp,content:e.$L("\u6587\u4EF6\u94FE\u63A5")}},[t("div",{staticClass:"header-icon",on:{click:function(i){return e.handleClick("link")}}},[t("i",{staticClass:"taskfont"},[e._v("\uE785")])])]),t("EPopover",{attrs:{trigger:"click"},model:{value:e.historyShow,callback:function(i){e.historyShow=i},expression:"historyShow"}},[t("div",{staticClass:"file-content-history"},[t("FileHistory",{attrs:{value:e.historyShow,file:e.file},on:{"on-restore":e.onRestoreHistory}})],1),t("ETooltip",{ref:"historyTip",attrs:{slot:"reference",disabled:e.windowSmall||e.$isEEUiApp||e.historyShow,content:e.$L("\u5386\u53F2\u7248\u672C")},slot:"reference"},[t("div",{staticClass:"header-icon"},[t("i",{staticClass:"taskfont"},[e._v("\uE71D")])])])],1)],1),t("Button",{staticClass:"header-button",attrs:{disabled:e.equalContent,loading:e.loadSave>0,size:"small",type:"primary"},on:{click:function(i){return e.handleClick("save")}}},[e._v(e._s(e.$L("\u4FDD\u5B58")))])]],2),t("div",{staticClass:"content-body"},[e.historyShow?t("div",{staticClass:"content-mask"}):e._e(),e.file.type=="document"?[e.contentDetail.type=="md"?t("MDEditor",{attrs:{height:"100%"},model:{value:e.contentDetail.content,callback:function(i){e.$set(e.contentDetail,"content",i)},expression:"contentDetail.content"}}):t("TEditor",{attrs:{height:"100%"},on:{editorSave:function(i){return e.handleClick("saveBefore")}},model:{value:e.contentDetail.content,callback:function(i){e.$set(e.contentDetail,"content",i)},expression:"contentDetail.content"}})]:e.file.type=="drawio"?t("Drawio",{ref:"myFlow",attrs:{title:e.file.name},on:{saveData:function(i){return e.handleClick("saveBefore")}},model:{value:e.contentDetail,callback:function(i){e.contentDetail=i},expression:"contentDetail"}}):e.file.type=="mind"?t("Minder",{ref:"myMind",on:{saveData:function(i){return e.handleClick("saveBefore")}},model:{value:e.contentDetail,callback:function(i){e.contentDetail=i},expression:"contentDetail"}}):["code","txt"].includes(e.file.type)?t("AceEditor",{attrs:{ext:e.file.ext},on:{saveData:function(i){return e.handleClick("saveBefore")}},model:{value:e.contentDetail.content,callback:function(i){e.$set(e.contentDetail,"content",i)},expression:"contentDetail.content"}}):["word","excel","ppt"].includes(e.file.type)?t("OnlyOffice",{attrs:{documentKey:e.documentKey},on:{"on-document-ready":function(i){return e.handleClick("officeReady")}},model:{value:e.contentDetail,callback:function(i){e.contentDetail=i},expression:"contentDetail"}}):e._e()],2)]:e._e(),e.contentLoad?t("div",{staticClass:"content-load"},[t("Loading")],1):e._e(),t("Modal",{attrs:{title:e.$L("\u6587\u4EF6\u94FE\u63A5"),"mask-closable":!1},model:{value:e.linkShow,callback:function(i){e.linkShow=i},expression:"linkShow"}},[t("div",[t("div",{staticStyle:{margin:"-10px 0 8px"}},[e._v(e._s(e.$L("\u6587\u4EF6\u540D\u79F0"))+": "+e._s(e.linkData.name))]),t("Input",{ref:"linkInput",attrs:{type:"textarea",rows:3,readonly:""},on:{"on-focus":e.linkFocus},model:{value:e.linkData.url,callback:function(i){e.$set(e.linkData,"url",i)},expression:"linkData.url"}}),t("div",{staticClass:"form-tip",staticStyle:{"padding-top":"6px"}},[e._v(e._s(e.$L("\u53EF\u901A\u8FC7\u6B64\u94FE\u63A5\u6D4F\u89C8\u6587\u4EF6\u3002"))),t("a",{attrs:{href:"javascript:void(0)"},on:{click:e.linkCopy}},[e._v(e._s(e.$L("\u70B9\u51FB\u590D\u5236\u94FE\u63A5")))])])],1),t("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[t("Button",{attrs:{type:"default"},on:{click:function(i){e.linkShow=!1}}},[e._v(e._s(e.$L("\u53D6\u6D88")))]),t("Poptip",{staticStyle:{"margin-left":"8px"},attrs:{confirm:"",placement:"bottom","ok-text":e.$L("\u786E\u5B9A"),"cancel-text":e.$L("\u53D6\u6D88"),transfer:""},on:{"on-ok":function(i){return e.linkGet(!0)}}},[t("div",{attrs:{slot:"title"},slot:"title"},[t("p",[t("strong",[e._v(e._s(e.$L("\u6CE8\u610F\uFF1A\u5237\u65B0\u5C06\u5BFC\u81F4\u539F\u6765\u7684\u94FE\u63A5\u5931\u6548\uFF01")))])])]),t("Button",{attrs:{type:"primary",loading:e.linkLoad>0}},[e._v(e._s(e.$L("\u5237\u65B0")))])],1)],1)])],2):e._e()},y=[];const k=()=>n(()=>import("./index.5f5fc23a.js"),["js/build/index.5f5fc23a.js","js/build/index.03d13184.css","js/build/app.73f924cf.js","js/build/app.d2a9034f.css","js/build/ImgUpload.09338bda.js"]),$=()=>n(()=>import("./TEditor.31ce405c.js"),["js/build/TEditor.31ce405c.js","js/build/app.73f924cf.js","js/build/app.d2a9034f.css","js/build/ImgUpload.09338bda.js"]),w=()=>n(()=>import("./AceEditor.5ee06b58.js"),["js/build/AceEditor.5ee06b58.js","js/build/app.73f924cf.js","js/build/app.d2a9034f.css"]),g=()=>n(()=>import("./OnlyOffice.62af8738.js"),["js/build/OnlyOffice.62af8738.js","js/build/OnlyOffice.d36f3069.css","js/build/app.73f924cf.js","js/build/app.d2a9034f.css","js/build/IFrame.3efc17fc.js"]),D=()=>n(()=>import("./Drawio.21a1cca4.js"),["js/build/Drawio.21a1cca4.js","js/build/Drawio.fc5c6326.css","js/build/app.73f924cf.js","js/build/app.d2a9034f.css","js/build/IFrame.3efc17fc.js"]),x=()=>n(()=>import("./Minder.42fb0303.js"),["js/build/Minder.42fb0303.js","js/build/Minder.f2273bdb.css","js/build/IFrame.3efc17fc.js","js/build/app.73f924cf.js","js/build/app.d2a9034f.css"]),S={name:"FileContent",components:{IFrame:d,FileHistory:_,AceEditor:w,TEditor:$,MDEditor:k,OnlyOffice:g,Drawio:D,Minder:x},props:{value:{type:Boolean,default:!1},file:{type:Object,default:()=>({})}},data(){return{ready:!1,loadSave:0,loadContent:0,unsaveTip:!1,fileExt:null,contentDetail:null,contentBak:{},editUser:[],loadPreview:!0,linkShow:!1,linkData:{},linkLoad:0,historyShow:!1,officeReady:!1}},mounted(){document.addEventListener("keydown",this.keySave),window.addEventListener("message",this.handleOfficeMessage),this.$isSubElectron&&(window.__onBeforeUnload=()=>{if(!this.equalContent)return $A.modalConfirm({content:"\u4FEE\u6539\u7684\u5185\u5BB9\u5C1A\u672A\u4FDD\u5B58\uFF0C\u786E\u5B9A\u8981\u653E\u5F03\u4FEE\u6539\u5417\uFF1F",cancelText:"\u53D6\u6D88",okText:"\u653E\u5F03",onOk:()=>{this.$Electron.sendMessage("windowDestroy")}}),!0})},beforeDestroy(){document.removeEventListener("keydown",this.keySave),window.removeEventListener("message",this.handleOfficeMessage)},watch:{value:{handler(e){e?(this.ready=!0,this.editUser=[this.userId],this.getContent()):(this.linkShow=!1,this.historyShow=!1,this.officeReady=!1,this.fileExt=null)},immediate:!0},historyShow(e){!e&&this.$refs.historyTip&&this.$refs.historyTip.updatePopper()},wsMsg:{handler(e){const{type:s,action:t,data:i}=e;switch(s){case"path":i.path=="/single/file/"+this.fileId&&(this.editUser=i.userids);break;case"file":t=="content"&&this.value&&i.id==this.fileId&&$A.modalConfirm({title:"\u66F4\u65B0\u63D0\u793A",content:"\u56E2\u961F\u6210\u5458\uFF08"+e.nickname+"\uFF09\u66F4\u65B0\u4E86\u5185\u5BB9\uFF0C
\u66F4\u65B0\u65F6\u95F4\uFF1A"+$A.formatDate("Y-m-d H:i:s",e.time)+"\u3002

\u70B9\u51FB\u3010\u786E\u5B9A\u3011\u52A0\u8F7D\u6700\u65B0\u5185\u5BB9\u3002",onOk:()=>{this.getContent()}});break}},deep:!0}},computed:{...c(["wsMsg"]),fileId(){return this.file.id||0},fileName(){return this.fileExt?$A.getFileName(Object.assign(this.file,{ext:this.fileExt})):$A.getFileName(this.file)},equalContent(){return this.contentBak==$A.jsonStringify(this.contentDetail)},contentLoad(){return this.loadContent>0||this.previewLoad},isPreview(){return this.contentDetail&&this.contentDetail.preview===!0},previewLoad(){return this.isPreview&&this.loadPreview===!0},previewUrl(){if(this.isPreview){const{name:e,key:s}=this.contentDetail;return $A.apiUrl(`../online/preview/${e}?key=${s}`)}return""}},methods:{handleOfficeMessage({data:e,source:s}){if(e.source==="onlyoffice")switch(e.action){case"ready":s.postMessage("createMenu","*");break;case"link":this.handleClick("link");break;case"history":const t=this.$refs.officeHeader;t&&(t.style.top=`${e.rect.top}px`,t.style.left=`${e.rect.left}px`,t.style.width=`${e.rect.width}px`,t.style.height=`${e.rect.height}px`,t.click());break}},onFrameLoad(){this.loadPreview=!1},keySave(e){this.value&&e.keyCode===83&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),this.onSaveSave())},getContent(){if(this.fileId===0){this.contentDetail={},this.updateBak();return}if(["word","excel","ppt"].includes(this.file.type)){this.contentDetail=$A.cloneJSON(this.file),this.updateBak();return}this.loadSave++,setTimeout(e=>{this.loadContent++},600),this.$store.dispatch("call",{url:"file/content",data:{id:this.fileId}}).then(({data:e})=>{this.contentDetail=e.content,this.updateBak()}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{this.loadSave--,this.loadContent--})},updateBak(){this.contentBak=$A.jsonStringify(this.contentDetail)},handleClick(e){switch(e){case"link":this.linkData={id:this.fileId,name:this.file.name},this.linkShow=!0,this.linkGet();break;case"saveBefore":!this.equalContent&&this.loadSave==0?this.handleClick("save"):$A.messageWarning("\u6CA1\u6709\u4EFB\u4F55\u4FEE\u6539\uFF01");break;case"save":if(this.file.only_view)return;this.updateBak(),this.loadSave++,this.$store.dispatch("call",{url:"file/content/save",method:"post",data:{id:this.fileId,content:this.contentBak}}).then(({data:s,msg:t})=>{$A.messageSuccess(t);const i={id:this.fileId,size:s.size};this.fileExt&&(i.ext=this.fileExt,this.fileExt=null),this.$store.dispatch("saveFile",i)}).catch(({msg:s})=>{$A.modalError(s),this.getContent()}).finally(s=>{this.loadSave--});break;case"officeReady":this.officeReady=!0;break}},onRestoreHistory(e){this.historyShow=!1,$A.modalConfirm({content:`\u4F60\u786E\u5B9A\u6587\u4EF6\u8FD8\u539F\u81F3\u3010${e.created_at}\u3011\u5417\uFF1F`,cancelText:"\u53D6\u6D88",okText:"\u786E\u5B9A",loading:!0,onOk:()=>new Promise((s,t)=>{this.$store.dispatch("call",{url:"file/content/restore",data:{id:this.fileId,history_id:e.id}}).then(({msg:i})=>{s(i),this.contentDetail=null,this.getContent()}).catch(({msg:i})=>{t(i)})})})},linkGet(e){this.linkLoad++,this.$store.dispatch("call",{url:"file/link",data:{id:this.linkData.id,refresh:e===!0?"yes":"no"}}).then(({data:s})=>{this.linkData=Object.assign(s,{id:this.linkData.id,name:this.linkData.name}),this.linkFocus()}).catch(({msg:s})=>{this.linkShow=!1,$A.modalError(s)}).finally(s=>{this.linkLoad--})},linkCopy(){!this.linkData.url||(this.linkFocus(),this.$copyText(this.linkData.url).then(e=>{$A.messageSuccess("\u590D\u5236\u6210\u529F")}).catch(e=>{$A.messageError("\u590D\u5236\u5931\u8D25")}))},linkFocus(){this.$nextTick(e=>{this.$refs.linkInput.focus({cursor:"all"})})},exportMenu(e){switch(this.file.type){case"mind":this.$refs.myMind.exportHandle(e,this.file.name);break}},unSaveGive(){this.getContent(),this.unsaveTip=!1},onSaveSave(){this.handleClick("save"),this.unsaveTip=!1},setTextType(e){this.fileExt=e,this.$set(this.contentDetail,"type",e)},documentKey(){return new Promise(e=>{this.$store.dispatch("call",{url:"file/content",data:{id:this.fileId,only_update_at:"yes"}}).then(({data:s})=>{e(`${s.id}-${$A.Time(s.update_at)}`)}).catch(()=>{e(0)})})}}},l={};var C=r(S,m,y,!1,L,null,null,null);function L(e){for(let s in l)this[s]=l[s]}var A=function(){return C.exports}();export{A as default}; diff --git a/public/js/build/FilePreview.af93edd1.js b/public/js/build/FilePreview.ea704215.js similarity index 76% rename from public/js/build/FilePreview.af93edd1.js rename to public/js/build/FilePreview.ea704215.js index 021eb9017..a00050c9c 100644 --- a/public/js/build/FilePreview.af93edd1.js +++ b/public/js/build/FilePreview.ea704215.js @@ -1 +1 @@ -import{n as r,_ as n}from"./app.256678e2.js";import{I as a}from"./IFrame.c83aa3a9.js";var s=function(){var e=this,i=e.$createElement,t=e._self._c||i;return t("div",{staticClass:"file-preview"},[e.isPreview?t("IFrame",{staticClass:"preview-iframe",attrs:{src:e.previewUrl},on:{"on-load":e.onFrameLoad}}):e.contentDetail?[t("div",{directives:[{name:"show",rawName:"v-show",value:e.headerShow&&!["word","excel","ppt"].includes(e.file.type),expression:"headerShow && !['word', 'excel', 'ppt'].includes(file.type)"}],staticClass:"edit-header"},[t("div",{staticClass:"header-title"},[t("div",{staticClass:"title-name"},[e._v(e._s(e.$A.getFileName(e.file)))]),t("Tag",{attrs:{color:"default"}},[e._v(e._s(e.$L("\u53EA\u8BFB")))]),t("div",{staticClass:"refresh"},[e.contentLoad?t("Loading"):t("Icon",{attrs:{type:"ios-refresh"},on:{click:e.getContent}})],1)],1),e.file.type=="mind"?t("Dropdown",{staticClass:"header-hint",attrs:{trigger:"click"},on:{"on-click":e.exportMenu}},[t("a",{attrs:{href:"javascript:void(0)"}},[e._v(e._s(e.$L("\u5BFC\u51FA"))),t("Icon",{attrs:{type:"ios-arrow-down"}})],1),t("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[t("DropdownItem",{attrs:{name:"png"}},[e._v(e._s(e.$L("\u5BFC\u51FAPNG\u56FE\u7247")))]),t("DropdownItem",{attrs:{name:"pdf"}},[e._v(e._s(e.$L("\u5BFC\u51FAPDF\u6587\u4EF6")))])],1)],1):e._e()],1),t("div",{staticClass:"content-body"},[e.file.type=="document"?[e.contentDetail.type=="md"?t("MDPreview",{attrs:{initialValue:e.contentDetail.content}}):t("TEditor",{attrs:{value:e.contentDetail.content,height:"100%",readOnly:""}})]:e.file.type=="drawio"?t("Drawio",{ref:"myFlow",attrs:{value:e.contentDetail,title:e.file.name,readOnly:""}}):e.file.type=="mind"?t("Minder",{ref:"myMind",attrs:{value:e.contentDetail,readOnly:""}}):["code","txt"].includes(e.file.type)?t("AceEditor",{attrs:{value:e.contentDetail.content,ext:e.file.ext,readOnly:""}}):["word","excel","ppt"].includes(e.file.type)?t("OnlyOffice",{attrs:{value:e.contentDetail,code:e.code,historyId:e.historyId,documentKey:e.documentKey,readOnly:""}}):e._e()],2)]:e._e(),e.contentLoad?t("div",{staticClass:"content-load"},[t("Loading")],1):e._e()],2)},l=[];const d=()=>n(()=>import("./preview.42953564.js"),["js/build/preview.42953564.js","js/build/app.256678e2.js","js/build/app.d2a9034f.css"]),c=()=>n(()=>import("./TEditor.61cbcfed.js"),["js/build/TEditor.61cbcfed.js","js/build/app.256678e2.js","js/build/app.d2a9034f.css","js/build/ImgUpload.6fde0d68.js"]),_=()=>n(()=>import("./AceEditor.74000a06.js"),["js/build/AceEditor.74000a06.js","js/build/app.256678e2.js","js/build/app.d2a9034f.css"]),p=()=>n(()=>import("./OnlyOffice.349e25ca.js"),["js/build/OnlyOffice.349e25ca.js","js/build/OnlyOffice.d36f3069.css","js/build/app.256678e2.js","js/build/app.d2a9034f.css","js/build/IFrame.c83aa3a9.js"]),u=()=>n(()=>import("./Drawio.2a737647.js"),["js/build/Drawio.2a737647.js","js/build/Drawio.fc5c6326.css","js/build/app.256678e2.js","js/build/app.d2a9034f.css","js/build/IFrame.c83aa3a9.js"]),h=()=>n(()=>import("./Minder.7a501126.js"),["js/build/Minder.7a501126.js","js/build/Minder.f2273bdb.css","js/build/IFrame.c83aa3a9.js","js/build/app.256678e2.js","js/build/app.d2a9034f.css"]),v={name:"FilePreview",components:{IFrame:a,AceEditor:_,TEditor:c,MDPreview:d,OnlyOffice:p,Drawio:u,Minder:h},props:{code:{type:String,default:""},historyId:{type:Number,default:0},file:{type:Object,default:()=>({})},headerShow:{type:Boolean,default:!0}},data(){return{loadContent:0,contentDetail:null,loadPreview:!0}},watch:{"file.id":{handler(e){e&&(this.contentDetail=null,this.getContent())},immediate:!0,deep:!0}},computed:{contentLoad(){return this.loadContent>0||this.previewLoad},isPreview(){return this.contentDetail&&this.contentDetail.preview===!0},previewLoad(){return this.isPreview&&this.loadPreview===!0},previewUrl(){if(this.isPreview){const{name:e,key:i}=this.contentDetail;return $A.apiUrl(`../online/preview/${e}?key=${i}`)}return""}},methods:{onFrameLoad(){this.loadPreview=!1},getContent(){if(["word","excel","ppt"].includes(this.file.type)){this.contentDetail=$A.cloneJSON(this.file);return}setTimeout(e=>{this.loadContent++},600),this.$store.dispatch("call",{url:"file/content",data:{id:this.code||this.file.id,history_id:this.historyId}}).then(({data:e})=>{this.contentDetail=e.content}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{this.loadContent--})},documentKey(){return new Promise(e=>{this.$store.dispatch("call",{url:"file/content",data:{id:this.code||this.file.id,only_update_at:"yes"}}).then(({data:i})=>{e(`${i.id}-${$A.Time(i.update_at)}`)}).catch(()=>{e(0)})})},exportMenu(e){switch(this.file.type){case"mind":this.$refs.myMind.exportHandle(e,this.file.name);break}}}},o={};var f=r(v,s,l,!1,m,null,null,null);function m(e){for(let i in o)this[i]=o[i]}var D=function(){return f.exports}();export{D as default}; +import{n as r,_ as n}from"./app.73f924cf.js";import{I as a}from"./IFrame.3efc17fc.js";var s=function(){var e=this,i=e.$createElement,t=e._self._c||i;return t("div",{staticClass:"file-preview"},[e.isPreview?t("IFrame",{staticClass:"preview-iframe",attrs:{src:e.previewUrl},on:{"on-load":e.onFrameLoad}}):e.contentDetail?[t("div",{directives:[{name:"show",rawName:"v-show",value:e.headerShow&&!["word","excel","ppt"].includes(e.file.type),expression:"headerShow && !['word', 'excel', 'ppt'].includes(file.type)"}],staticClass:"edit-header"},[t("div",{staticClass:"header-title"},[t("div",{staticClass:"title-name"},[e._v(e._s(e.$A.getFileName(e.file)))]),t("Tag",{attrs:{color:"default"}},[e._v(e._s(e.$L("\u53EA\u8BFB")))]),t("div",{staticClass:"refresh"},[e.contentLoad?t("Loading"):t("Icon",{attrs:{type:"ios-refresh"},on:{click:e.getContent}})],1)],1),e.file.type=="mind"?t("Dropdown",{staticClass:"header-hint",attrs:{trigger:"click"},on:{"on-click":e.exportMenu}},[t("a",{attrs:{href:"javascript:void(0)"}},[e._v(e._s(e.$L("\u5BFC\u51FA"))),t("Icon",{attrs:{type:"ios-arrow-down"}})],1),t("DropdownMenu",{attrs:{slot:"list"},slot:"list"},[t("DropdownItem",{attrs:{name:"png"}},[e._v(e._s(e.$L("\u5BFC\u51FAPNG\u56FE\u7247")))]),t("DropdownItem",{attrs:{name:"pdf"}},[e._v(e._s(e.$L("\u5BFC\u51FAPDF\u6587\u4EF6")))])],1)],1):e._e()],1),t("div",{staticClass:"content-body"},[e.file.type=="document"?[e.contentDetail.type=="md"?t("MDPreview",{attrs:{initialValue:e.contentDetail.content}}):t("TEditor",{attrs:{value:e.contentDetail.content,height:"100%",readOnly:""}})]:e.file.type=="drawio"?t("Drawio",{ref:"myFlow",attrs:{value:e.contentDetail,title:e.file.name,readOnly:""}}):e.file.type=="mind"?t("Minder",{ref:"myMind",attrs:{value:e.contentDetail,readOnly:""}}):["code","txt"].includes(e.file.type)?t("AceEditor",{attrs:{value:e.contentDetail.content,ext:e.file.ext,readOnly:""}}):["word","excel","ppt"].includes(e.file.type)?t("OnlyOffice",{attrs:{value:e.contentDetail,code:e.code,historyId:e.historyId,documentKey:e.documentKey,readOnly:""}}):e._e()],2)]:e._e(),e.contentLoad?t("div",{staticClass:"content-load"},[t("Loading")],1):e._e()],2)},l=[];const d=()=>n(()=>import("./preview.4da573ff.js"),["js/build/preview.4da573ff.js","js/build/app.73f924cf.js","js/build/app.d2a9034f.css"]),c=()=>n(()=>import("./TEditor.31ce405c.js"),["js/build/TEditor.31ce405c.js","js/build/app.73f924cf.js","js/build/app.d2a9034f.css","js/build/ImgUpload.09338bda.js"]),_=()=>n(()=>import("./AceEditor.5ee06b58.js"),["js/build/AceEditor.5ee06b58.js","js/build/app.73f924cf.js","js/build/app.d2a9034f.css"]),p=()=>n(()=>import("./OnlyOffice.62af8738.js"),["js/build/OnlyOffice.62af8738.js","js/build/OnlyOffice.d36f3069.css","js/build/app.73f924cf.js","js/build/app.d2a9034f.css","js/build/IFrame.3efc17fc.js"]),u=()=>n(()=>import("./Drawio.21a1cca4.js"),["js/build/Drawio.21a1cca4.js","js/build/Drawio.fc5c6326.css","js/build/app.73f924cf.js","js/build/app.d2a9034f.css","js/build/IFrame.3efc17fc.js"]),h=()=>n(()=>import("./Minder.42fb0303.js"),["js/build/Minder.42fb0303.js","js/build/Minder.f2273bdb.css","js/build/IFrame.3efc17fc.js","js/build/app.73f924cf.js","js/build/app.d2a9034f.css"]),v={name:"FilePreview",components:{IFrame:a,AceEditor:_,TEditor:c,MDPreview:d,OnlyOffice:p,Drawio:u,Minder:h},props:{code:{type:String,default:""},historyId:{type:Number,default:0},file:{type:Object,default:()=>({})},headerShow:{type:Boolean,default:!0}},data(){return{loadContent:0,contentDetail:null,loadPreview:!0}},watch:{"file.id":{handler(e){e&&(this.contentDetail=null,this.getContent())},immediate:!0,deep:!0}},computed:{contentLoad(){return this.loadContent>0||this.previewLoad},isPreview(){return this.contentDetail&&this.contentDetail.preview===!0},previewLoad(){return this.isPreview&&this.loadPreview===!0},previewUrl(){if(this.isPreview){const{name:e,key:i}=this.contentDetail;return $A.apiUrl(`../online/preview/${e}?key=${i}`)}return""}},methods:{onFrameLoad(){this.loadPreview=!1},getContent(){if(["word","excel","ppt"].includes(this.file.type)){this.contentDetail=$A.cloneJSON(this.file);return}setTimeout(e=>{this.loadContent++},600),this.$store.dispatch("call",{url:"file/content",data:{id:this.code||this.file.id,history_id:this.historyId}}).then(({data:e})=>{this.contentDetail=e.content}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{this.loadContent--})},documentKey(){return new Promise(e=>{this.$store.dispatch("call",{url:"file/content",data:{id:this.code||this.file.id,only_update_at:"yes"}}).then(({data:i})=>{e(`${i.id}-${$A.Time(i.update_at)}`)}).catch(()=>{e(0)})})},exportMenu(e){switch(this.file.type){case"mind":this.$refs.myMind.exportHandle(e,this.file.name);break}}}},o={};var f=r(v,s,l,!1,m,null,null,null);function m(e){for(let i in o)this[i]=o[i]}var D=function(){return f.exports}();export{D as default}; diff --git a/public/js/build/IFrame.c83aa3a9.js b/public/js/build/IFrame.3efc17fc.js similarity index 94% rename from public/js/build/IFrame.c83aa3a9.js rename to public/js/build/IFrame.3efc17fc.js index 81b2ca487..21c76d45a 100644 --- a/public/js/build/IFrame.c83aa3a9.js +++ b/public/js/build/IFrame.3efc17fc.js @@ -1 +1 @@ -import{n}from"./app.256678e2.js";var i=function(){var e=this,s=e.$createElement,r=e._self._c||s;return r("iframe",{directives:[{name:"show",rawName:"v-show",value:e.src,expression:"src"}],ref:"iframe",attrs:{src:e.src}})},a=[];const o={name:"IFrame",props:{src:{type:String,default:""}},mounted(){this.$refs.iframe.addEventListener("load",this.handleLoad),window.addEventListener("message",this.handleMessage)},beforeDestroy(){this.$refs.iframe.removeEventListener("load",this.handleLoad),window.removeEventListener("message",this.handleMessage)},methods:{handleLoad(){this.$emit("on-load")},handleMessage({data:e,source:s}){var r;s===((r=this.$refs.iframe)==null?void 0:r.contentWindow)&&(e=$A.jsonParse(e),e.source==="fileView"&&e.action==="picture"&&this.$store.dispatch("previewImage",{index:e.params.index,list:e.params.array}),this.$emit("on-message",e))},postMessage(e,s="*"){this.$refs.iframe&&this.$refs.iframe.contentWindow.postMessage(e,s)}}},t={};var m=n(o,i,a,!1,c,null,null,null);function c(e){for(let s in t)this[s]=t[s]}var l=function(){return m.exports}();export{l as I}; +import{n}from"./app.73f924cf.js";var i=function(){var e=this,s=e.$createElement,r=e._self._c||s;return r("iframe",{directives:[{name:"show",rawName:"v-show",value:e.src,expression:"src"}],ref:"iframe",attrs:{src:e.src}})},a=[];const o={name:"IFrame",props:{src:{type:String,default:""}},mounted(){this.$refs.iframe.addEventListener("load",this.handleLoad),window.addEventListener("message",this.handleMessage)},beforeDestroy(){this.$refs.iframe.removeEventListener("load",this.handleLoad),window.removeEventListener("message",this.handleMessage)},methods:{handleLoad(){this.$emit("on-load")},handleMessage({data:e,source:s}){var r;s===((r=this.$refs.iframe)==null?void 0:r.contentWindow)&&(e=$A.jsonParse(e),e.source==="fileView"&&e.action==="picture"&&this.$store.dispatch("previewImage",{index:e.params.index,list:e.params.array}),this.$emit("on-message",e))},postMessage(e,s="*"){this.$refs.iframe&&this.$refs.iframe.contentWindow.postMessage(e,s)}}},t={};var m=n(o,i,a,!1,c,null,null,null);function c(e){for(let s in t)this[s]=t[s]}var l=function(){return m.exports}();export{l as I}; diff --git a/public/js/build/ImgUpload.6fde0d68.js b/public/js/build/ImgUpload.09338bda.js similarity index 99% rename from public/js/build/ImgUpload.6fde0d68.js rename to public/js/build/ImgUpload.09338bda.js index fc300f518..d490045d2 100644 --- a/public/js/build/ImgUpload.6fde0d68.js +++ b/public/js/build/ImgUpload.09338bda.js @@ -1 +1 @@ -import{n as o}from"./app.256678e2.js";var r=function(){var t=this,i=t.$createElement,e=t._self._c||i;return e("div",{staticClass:"common-img-update"},[t._l(t.uploadList,function(s){return t.type!=="callback"?e("div",{staticClass:"imgcomp-upload-list"},[s.status==="finished"?[e("div",{staticClass:"imgcomp-upload-img",style:{"background-image":"url("+t.__thumb(s.thumb)+")"}}),e("div",{staticClass:"imgcomp-upload-list-cover"},[e("Icon",{attrs:{type:"ios-eye-outline"},nativeOn:{click:function(a){return t.handleView(s)}}}),e("Icon",{attrs:{type:"ios-trash-outline"},nativeOn:{click:function(a){return t.handleRemove(s)}}})],1)]:[s.showProgress?e("Progress",{attrs:{percent:s.percentage,"hide-info":""}}):t._e()]],2):t._e()}),e("div",{staticClass:"add-box",class:{"callback-add-box":t.type==="callback"}},[e("div",{staticClass:"add-box-icon"},[e("Icon",{attrs:{type:"md-add",size:"32"}})],1),e("div",{staticClass:"add-box-upload"},[e("div",{staticClass:"add-box-item",on:{click:t.browsePicture}},[e("span",[t._v(t._s(t.$L("\u6D4F\u89C8"))),t.type==="callback"?e("em",[t._v(t._s(t.$L("\u56FE\u7247")))]):t._e()])]),e("div",{staticClass:"add-box-item"},[e("Upload",{ref:"upload",attrs:{name:"image",accept:"image/*",action:t.actionUrl,headers:t.uploadHeaders,data:t.uploadParams,"show-upload-list":!1,"max-size":t.maxSize,format:["jpg","jpeg","gif","png"],"default-file-list":t.defaultList,"on-progress":t.handleProgress,"on-success":t.handleSuccess,"on-error":t.handleError,"on-format-error":t.handleFormatError,"on-exceeded-size":t.handleMaxSize,"before-upload":t.handleBeforeUpload,multiple:t.multiple}},[e("span",[t._v(t._s(t.$L("\u4E0A\u4F20"))),t.type==="callback"?e("em",[t._v(t._s(t.$L("\u56FE\u7247")))]):t._e()])])],1)])]),e("Modal",{staticClass:"img-upload-modal",attrs:{title:t.$L("\u6D4F\u89C8\u56FE\u7247\u7A7A\u95F4"),width:"710"},model:{value:t.browseVisible,callback:function(s){t.browseVisible=s},expression:"browseVisible"}},[t.isLoading?e("div",{staticClass:"browse-load"},[t._v(t._s(t.$L("\u52A0\u8F7D\u4E2D...")))]):e("div",{ref:"browselistbox",staticClass:"browse-list",class:t.httpType==="input"?"browse-list-disabled":""},[t.browseList.length<=0?e("div",[t._v(t._s(t.$L("\u65E0\u5185\u5BB9")))]):t._l(t.browseList,function(s){return e("div",{staticClass:"browse-item",on:{click:function(a){return t.browseItem(s)}}},[s.active?e("Icon",{staticClass:"browse-icon",attrs:{type:"ios-checkmark-circle"}}):t._e(),e("div",{staticClass:"browse-img",style:{"background-image":"url("+s.thumb+")"}}),e("div",{staticClass:"browse-title"},[t._v(t._s(s.title))])],1)})],2),e("div",{staticClass:"img-upload-foot",attrs:{slot:"footer"},slot:"footer"},[t.type!=="callback"&&t.http&&t.httpType===""?e("div",{staticClass:"img-upload-foot-input",on:{click:function(s){t.httpType="input"}}},[e("Icon",{attrs:{type:"ios-image",size:"22"}}),e("div",{staticClass:"img-upload-foot-httptitle"},[t._v(t._s(t.$L("\u81EA\u5B9A\u4E49\u56FE\u7247\u5730\u5740")))])],1):t._e(),t.type!=="callback"&&t.http&&t.httpType==="input"?e("div",{staticClass:"img-upload-foot-input"},[e("Input",{attrs:{placeholder:t.$L("\u4EE5 http:// \u6216 https:// \u5F00\u5934"),search:"","enter-button":t.$L("\u786E\u5B9A")},on:{"on-search":t.httpEnter},model:{value:t.httpValue,callback:function(s){t.httpValue=s},expression:"httpValue"}},[e("span",{staticStyle:{cursor:"pointer"},attrs:{slot:"prepend"},on:{click:function(s){t.httpType=""}},slot:"prepend"},[t._v(t._s(t.$L("\u81EA\u5B9A\u4E49\u5730\u5740"))+": ")])])],1):t._e(),t.httpType===""?e("Button",{on:{click:function(s){t.browseVisible=!1}}},[t._v(t._s(t.$L("\u5173\u95ED")))]):t._e(),t.httpType===""?e("Button",{attrs:{type:"primary"},on:{click:function(s){return t.handleCallback(!0)}}},[t._v(t._s(t.$L("\u5B8C\u6210")))]):t._e()],1)]),e("Modal",{staticClass:"img-upload-modal",attrs:{title:t.$L("\u67E5\u770B\u56FE\u7247"),draggable:""},model:{value:t.visible,callback:function(s){t.visible=s},expression:"visible"}},[e("div",{staticStyle:{"max-height":"480px",overflow:"auto"}},[e("a",{attrs:{href:t.imgVisible,target:"_blank"}},[t.visible?e("img",{staticStyle:{"max-width":"100%","max-height":"900px",display:"block",margin:"0 auto"},attrs:{src:t.imgVisible}}):t._e()])])])],2)},n=[];const h={name:"ImgUpload",props:{value:{},num:{},width:{},height:{},whcut:{},type:{},http:{type:Boolean,default:!1},otherParams:{type:Object,default:()=>({})},uploadIng:{type:Number,default:0}},data(){return{actionUrl:$A.apiUrl("system/imgupload"),multiple:this.num>1,visible:!1,browseVisible:!1,isLoading:!1,browseList:[],browseListNext:[],imgVisible:"",defaultList:this.initItems(this.value),uploadList:[],maxNum:Math.min(Math.max($A.runNum(this.num),1),99),httpValue:"",httpType:"",maxSize:2048}},mounted(){this.uploadList=this.$refs.upload.fileList,this.$emit("input",this.uploadList);let t=$A(this.$refs.browselistbox);t.scroll(()=>{let i=t[0].scrollHeight,e=t[0].scrollTop,s=t.height();if(e+s>=i&&this.browseListNext.length>0){let a=this.browseListNext;this.browseListNext=[],this.browsePictureFor(a)}})},watch:{value(t){if(typeof t=="string"){this.$emit("input",this.initItems(t));return}t!==this.$refs.upload.fileList&&(this.$refs.upload.fileList=this.initItems(t),this.uploadList=this.$refs.upload.fileList)},browseVisible(){this.httpType="",this.httpValue=""}},computed:{uploadHeaders(){return{fd:$A.getSessionStorageString("userWsFd"),token:this.userToken}},uploadParams(){let t={width:this.width,height:this.height,whcut:this.whcut};return Object.keys(this.otherParams).length>0?Object.assign(t,this.otherParams):t}},methods:{handleCallback(t){this.type==="callback"&&(t===!0?(this.$emit("on-callback",this.uploadList),this.$refs.upload.fileList=[],this.uploadList=this.$refs.upload.fileList):typeof t=="object"&&this.$emit("on-callback",[t])),this.browseVisible=!1},initItems(t){typeof t=="string"&&(t=[{url:t}]);let i=[];return $A.each(t,(e,s)=>{typeof s=="string"&&(s={url:s}),s.url&&(s.active=!0,s.status="finished",typeof s.path=="undefined"&&(s.path=s.url),typeof s.thumb=="undefined"&&(s.thumb=s.url),i.push(s))}),i},handleView(t){this.$store.dispatch("previewImage",t.url)},handleRemove(t){let i=this.$refs.upload.fileList;this.$refs.upload.fileList.splice(i.indexOf(t),1),this.$emit("input",this.$refs.upload.fileList)},handleProgress(t,i){i._uploadIng===void 0&&(i._uploadIng=!0,this.$emit("update:uploadIng",this.uploadIng+1))},handleSuccess(t,i){this.$emit("update:uploadIng",this.uploadIng-1),t.ret===1?(i.url=t.data.url,i.path=t.data.path,i.thumb=t.data.thumb,this.handleCallback(i)):($A.noticeWarning({title:this.$L("\u4E0A\u4F20\u5931\u8D25"),desc:this.$L("\u6587\u4EF6 "+i.name+" \u4E0A\u4F20\u5931\u8D25 "+t.msg)}),this.$refs.upload.fileList.pop()),this.$emit("input",this.$refs.upload.fileList)},handleError(){this.$emit("update:uploadIng",this.uploadIng-1)},handleFormatError(t){$A.noticeWarning({title:this.$L("\u6587\u4EF6\u683C\u5F0F\u4E0D\u6B63\u786E"),desc:this.$L("\u6587\u4EF6 "+t.name+" \u683C\u5F0F\u4E0D\u6B63\u786E\uFF0C\u8BF7\u4E0A\u4F20 jpg\u3001jpeg\u3001gif\u3001png \u683C\u5F0F\u7684\u56FE\u7247\u3002")})},handleMaxSize(t){$A.noticeWarning({title:this.$L("\u8D85\u51FA\u6587\u4EF6\u5927\u5C0F\u9650\u5236"),desc:this.$L("\u6587\u4EF6 "+t.name+" \u592A\u5927\uFF0C\u4E0D\u80FD\u8D85\u8FC7\uFF1A"+$A.bytesToSize(this.maxSize*1024))})},handleBeforeUpload(){let t=this.uploadList.length{let e=i.dirs;for(let s=0;s{this.browseVisible=!1,$A.noticeWarning(i)}).finally(i=>{this.isLoading=!1})},browsePictureFor(t){for(let i=0;i({})},uploadIng:{type:Number,default:0}},data(){return{actionUrl:$A.apiUrl("system/imgupload"),multiple:this.num>1,visible:!1,browseVisible:!1,isLoading:!1,browseList:[],browseListNext:[],imgVisible:"",defaultList:this.initItems(this.value),uploadList:[],maxNum:Math.min(Math.max($A.runNum(this.num),1),99),httpValue:"",httpType:"",maxSize:2048}},mounted(){this.uploadList=this.$refs.upload.fileList,this.$emit("input",this.uploadList);let t=$A(this.$refs.browselistbox);t.scroll(()=>{let i=t[0].scrollHeight,e=t[0].scrollTop,s=t.height();if(e+s>=i&&this.browseListNext.length>0){let a=this.browseListNext;this.browseListNext=[],this.browsePictureFor(a)}})},watch:{value(t){if(typeof t=="string"){this.$emit("input",this.initItems(t));return}t!==this.$refs.upload.fileList&&(this.$refs.upload.fileList=this.initItems(t),this.uploadList=this.$refs.upload.fileList)},browseVisible(){this.httpType="",this.httpValue=""}},computed:{uploadHeaders(){return{fd:$A.getSessionStorageString("userWsFd"),token:this.userToken}},uploadParams(){let t={width:this.width,height:this.height,whcut:this.whcut};return Object.keys(this.otherParams).length>0?Object.assign(t,this.otherParams):t}},methods:{handleCallback(t){this.type==="callback"&&(t===!0?(this.$emit("on-callback",this.uploadList),this.$refs.upload.fileList=[],this.uploadList=this.$refs.upload.fileList):typeof t=="object"&&this.$emit("on-callback",[t])),this.browseVisible=!1},initItems(t){typeof t=="string"&&(t=[{url:t}]);let i=[];return $A.each(t,(e,s)=>{typeof s=="string"&&(s={url:s}),s.url&&(s.active=!0,s.status="finished",typeof s.path=="undefined"&&(s.path=s.url),typeof s.thumb=="undefined"&&(s.thumb=s.url),i.push(s))}),i},handleView(t){this.$store.dispatch("previewImage",t.url)},handleRemove(t){let i=this.$refs.upload.fileList;this.$refs.upload.fileList.splice(i.indexOf(t),1),this.$emit("input",this.$refs.upload.fileList)},handleProgress(t,i){i._uploadIng===void 0&&(i._uploadIng=!0,this.$emit("update:uploadIng",this.uploadIng+1))},handleSuccess(t,i){this.$emit("update:uploadIng",this.uploadIng-1),t.ret===1?(i.url=t.data.url,i.path=t.data.path,i.thumb=t.data.thumb,this.handleCallback(i)):($A.noticeWarning({title:this.$L("\u4E0A\u4F20\u5931\u8D25"),desc:this.$L("\u6587\u4EF6 "+i.name+" \u4E0A\u4F20\u5931\u8D25 "+t.msg)}),this.$refs.upload.fileList.pop()),this.$emit("input",this.$refs.upload.fileList)},handleError(){this.$emit("update:uploadIng",this.uploadIng-1)},handleFormatError(t){$A.noticeWarning({title:this.$L("\u6587\u4EF6\u683C\u5F0F\u4E0D\u6B63\u786E"),desc:this.$L("\u6587\u4EF6 "+t.name+" \u683C\u5F0F\u4E0D\u6B63\u786E\uFF0C\u8BF7\u4E0A\u4F20 jpg\u3001jpeg\u3001gif\u3001png \u683C\u5F0F\u7684\u56FE\u7247\u3002")})},handleMaxSize(t){$A.noticeWarning({title:this.$L("\u8D85\u51FA\u6587\u4EF6\u5927\u5C0F\u9650\u5236"),desc:this.$L("\u6587\u4EF6 "+t.name+" \u592A\u5927\uFF0C\u4E0D\u80FD\u8D85\u8FC7\uFF1A"+$A.bytesToSize(this.maxSize*1024))})},handleBeforeUpload(){let t=this.uploadList.length{let e=i.dirs;for(let s=0;s{this.browseVisible=!1,$A.noticeWarning(i)}).finally(i=>{this.isLoading=!1})},browsePictureFor(t){for(let i=0;i"office_"+Math.round(Math.random()*1e4)},code:{type:String,default:""},historyId:{type:Number,default:0},value:{type:[Object,Array],default:function(){return{}}},readOnly:{type:Boolean,default:!1},documentKey:Function},data(){return{loading:!1,loadError:!1,docEditor:null}},beforeDestroy(){this.docEditor!==null&&(this.docEditor.destroyEditor(),this.docEditor=null)},computed:{...d(["userInfo","themeIsDark"]),fileType(){return this.getType(this.value.type)},fileName(){return this.value.name},fileUrl(){let e=this.code||this.value.id,t;return $A.leftExists(e,"msgFile_")?t=`dialog/msg/download/?msg_id=${$A.leftDelete(e,"msgFile_")}&token=${this.userToken}`:$A.leftExists(e,"taskFile_")?t=`project/task/filedown/?file_id=${$A.leftDelete(e,"taskFile_")}&token=${this.userToken}`:(t=`file/content/?id=${e}&token=${this.userToken}`,this.historyId>0&&(t+=`&history_id=${this.historyId}`)),t},previewUrl(){return $A.apiUrl(this.fileUrl)+"&down=preview"}},watch:{"value.id":{handler(e){!e||!$A.isDesktop()||(this.loading=!0,this.loadError=!1,$A.loadScript($A.apiUrl("../office/web-apps/apps/api/documents/api.js"),t=>{if(this.loading=!1,t!==null){this.loadError=!0;return}if(!this.documentKey){this.handleClose();return}const i=this.documentKey();i&&i.then?i.then(this.loadFile):this.loadFile()}))},immediate:!0},previewUrl:{handler(){$A.isDesktop()||(this.loading=!0)},immediate:!0}},methods:{onFrameLoad(){this.loading=!1},getType(e){switch(e){case"word":return"docx";case"excel":return"xlsx";case"ppt":return"pptx"}return e},loadFile(e=""){this.docEditor!==null&&(this.docEditor.destroyEditor(),this.docEditor=null);let t=l;switch(l){case"zh-CHT":t="zh-TW";break}let i=this.code||this.value.id,a=$A.strExists(this.fileName,".")?this.fileName:this.fileName+"."+this.fileType,s=`${this.fileType}-${e||i}`;this.historyId>0&&(s+=`-${this.historyId}`);const r={document:{fileType:this.fileType,title:a,key:s,url:`http://nginx/api/${this.fileUrl}`},editorConfig:{mode:"edit",lang:t,user:{id:String(this.userInfo.userid),name:this.userInfo.nickname},customization:{uiTheme:this.themeIsDark?"theme-dark":"theme-classic-light",forcesave:!0,help:!1},callbackUrl:`http://nginx/api/file/content/office?id=${i}&token=${this.userToken}`},events:{onDocumentReady:this.onDocumentReady}};/\/hideenOfficeTitle\//.test(window.navigator.userAgent)&&(r.document.title=" "),(async _=>{if((this.readOnly||this.historyId>0)&&(r.editorConfig.mode="view",r.editorConfig.callbackUrl=null,!r.editorConfig.user.id)){let o=await $A.IDBInt("officeViewer");o||(o=$A.randNum(1e3,99999),await $A.IDBSet("officeViewer",o)),r.editorConfig.user.id="viewer_"+o,r.editorConfig.user.name="Viewer_"+o}this.$nextTick(()=>{this.docEditor=new DocsAPI.DocEditor(this.id,r)})})()},onDocumentReady(){this.$emit("on-document-ready",this.docEditor)}}},n={};var p=f(m,u,h,!1,y,"42265d2e",null,null);function y(e){for(let t in n)this[t]=n[t]}var $=function(){return p.exports}();export{$ as default}; +import{m as d,n as f,a as l}from"./app.73f924cf.js";import{I as c}from"./IFrame.3efc17fc.js";var u=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"component-only-office"},[e.$A.isDesktop()?[e.loadError?i("Alert",{staticClass:"load-error",attrs:{type:"error","show-icon":""}},[e._v(e._s(e.$L("\u7EC4\u4EF6\u52A0\u8F7D\u5931\u8D25\uFF01")))]):e._e(),i("div",{staticClass:"placeholder",attrs:{id:e.id}})]:i("IFrame",{staticClass:"preview-iframe",attrs:{src:e.previewUrl},on:{"on-load":e.onFrameLoad}}),e.loading?i("div",{staticClass:"office-loading"},[i("Loading")],1):e._e()],2)},h=[];const m={name:"OnlyOffice",components:{IFrame:c},props:{id:{type:String,default:()=>"office_"+Math.round(Math.random()*1e4)},code:{type:String,default:""},historyId:{type:Number,default:0},value:{type:[Object,Array],default:function(){return{}}},readOnly:{type:Boolean,default:!1},documentKey:Function},data(){return{loading:!1,loadError:!1,docEditor:null}},beforeDestroy(){this.docEditor!==null&&(this.docEditor.destroyEditor(),this.docEditor=null)},computed:{...d(["userInfo","themeIsDark"]),fileType(){return this.getType(this.value.type)},fileName(){return this.value.name},fileUrl(){let e=this.code||this.value.id,t;return $A.leftExists(e,"msgFile_")?t=`dialog/msg/download/?msg_id=${$A.leftDelete(e,"msgFile_")}&token=${this.userToken}`:$A.leftExists(e,"taskFile_")?t=`project/task/filedown/?file_id=${$A.leftDelete(e,"taskFile_")}&token=${this.userToken}`:(t=`file/content/?id=${e}&token=${this.userToken}`,this.historyId>0&&(t+=`&history_id=${this.historyId}`)),t},previewUrl(){return $A.apiUrl(this.fileUrl)+"&down=preview"}},watch:{"value.id":{handler(e){!e||!$A.isDesktop()||(this.loading=!0,this.loadError=!1,$A.loadScript($A.apiUrl("../office/web-apps/apps/api/documents/api.js"),t=>{if(this.loading=!1,t!==null){this.loadError=!0;return}if(!this.documentKey){this.handleClose();return}const i=this.documentKey();i&&i.then?i.then(this.loadFile):this.loadFile()}))},immediate:!0},previewUrl:{handler(){$A.isDesktop()||(this.loading=!0)},immediate:!0}},methods:{onFrameLoad(){this.loading=!1},getType(e){switch(e){case"word":return"docx";case"excel":return"xlsx";case"ppt":return"pptx"}return e},loadFile(e=""){this.docEditor!==null&&(this.docEditor.destroyEditor(),this.docEditor=null);let t=l;switch(l){case"zh-CHT":t="zh-TW";break}let i=this.code||this.value.id,a=$A.strExists(this.fileName,".")?this.fileName:this.fileName+"."+this.fileType,s=`${this.fileType}-${e||i}`;this.historyId>0&&(s+=`-${this.historyId}`);const r={document:{fileType:this.fileType,title:a,key:s,url:`http://nginx/api/${this.fileUrl}`},editorConfig:{mode:"edit",lang:t,user:{id:String(this.userInfo.userid),name:this.userInfo.nickname},customization:{uiTheme:this.themeIsDark?"theme-dark":"theme-classic-light",forcesave:!0,help:!1},callbackUrl:`http://nginx/api/file/content/office?id=${i}&token=${this.userToken}`},events:{onDocumentReady:this.onDocumentReady}};/\/hideenOfficeTitle\//.test(window.navigator.userAgent)&&(r.document.title=" "),(async _=>{if((this.readOnly||this.historyId>0)&&(r.editorConfig.mode="view",r.editorConfig.callbackUrl=null,!r.editorConfig.user.id)){let o=await $A.IDBInt("officeViewer");o||(o=$A.randNum(1e3,99999),await $A.IDBSet("officeViewer",o)),r.editorConfig.user.id="viewer_"+o,r.editorConfig.user.name="Viewer_"+o}this.$nextTick(()=>{this.docEditor=new DocsAPI.DocEditor(this.id,r)})})()},onDocumentReady(){this.$emit("on-document-ready",this.docEditor)}}},n={};var p=f(m,u,h,!1,y,"42265d2e",null,null);function y(e){for(let t in n)this[t]=n[t]}var $=function(){return p.exports}();export{$ as default}; diff --git a/public/js/build/ProjectLog.8a343db2.js b/public/js/build/ProjectLog.461799f7.js similarity index 98% rename from public/js/build/ProjectLog.8a343db2.js rename to public/js/build/ProjectLog.461799f7.js index 12443016b..9111bc736 100644 --- a/public/js/build/ProjectLog.8a343db2.js +++ b/public/js/build/ProjectLog.461799f7.js @@ -1 +1 @@ -import{m as p,n as c}from"./app.256678e2.js";var h=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"task-priority",style:t.myStyle},[t._t("default")],2)},m=[];const _={name:"TaskPriority",props:{color:{default:"#ffffff"},background:{default:"#7DBEEA"},backgroundColor:{default:"#7DBEEA"}},data(){return{}},computed:{...p(["themeIsDark"]),myStyle(){const{color:t,background:e,backgroundColor:s,themeIsDark:a}=this;return a?{color:s||e,borderColor:s||e,backgroundColor:"transparent"}:{color:t,borderColor:s||e,backgroundColor:s||e}}}},l={};var f=c(_,h,m,!1,g,null,null,null);function g(t){for(let e in l)this[e]=l[e]}var I=function(){return f.exports}(),v={name:"ProjectLogDetail",functional:!0,props:{render:Function,item:Object},render:(t,e)=>e.props.render(t,e.props.item)},$=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{class:["project-log",t.taskId==0?"is-drawer":""]},[s("div",{staticClass:"log-title"},[t._v(t._s(t.$L("\u9879\u76EE\u52A8\u6001")))]),s("ul",{staticClass:"logs-activity"},[t._l(t.lists,function(a){return s("li",[s("div",{staticClass:"logs-date"},[t._v(t._s(t.logDate(a)))]),s("div",{staticClass:"logs-section"},[s("Timeline",t._l(a.lists,function(r,o){return s("TimelineItem",{key:o},[s("div",{staticClass:"logs-dot",attrs:{slot:"dot"},slot:"dot"},[r.userid?s("UserAvatar",{attrs:{userid:r.userid,size:18,showName:""}}):s("div",{staticClass:"avatar-wrapper common-avatar"},[s("EAvatar",{attrs:{size:18}},[t._v("A")]),s("div",{staticClass:"avatar-name auto"},[t._v(t._s(t.$L("\u7CFB\u7EDF")))])],1)],1),t._l(r.lists,function(i){return[s("div",{staticClass:"log-summary"},[s("ProjectLogDetail",{attrs:{render:t.logDetail,item:i}}),t.operationList(i).length>0?s("span",{staticClass:"log-operation"},t._l(t.operationList(i),function(n,d){return s("Button",{key:d,attrs:{size:"small"},on:{click:function(P){return t.onOperation(n)}}},[t._v(t._s(n.button))])}),1):t._e(),s("span",{staticClass:"log-time"},[t._v(t._s(i.time.ymd)+" "+t._s(i.time.segment)+" "+t._s(i.time.hi))])],1),i.project_task?s("div",{staticClass:"log-task"},[s("em",{on:{click:function(n){return t.openTask(i.project_task)}}},[t._v(t._s(t.$L("\u5173\u8054\u4EFB\u52A1"))+": "+t._s(i.project_task.name))])]):t._e()]})],2)}),1)],1)])}),t.loadIng>0&&t.showLoad?s("li",{staticClass:"logs-loading"},[s("Loading")],1):t.hasMorePages?s("li",{staticClass:"logs-more",on:{click:t.getMore}},[t._v(t._s(t.$L("\u52A0\u8F7D\u66F4\u591A")))]):t.totalNum==0?s("li",{staticClass:"logs-none",on:{click:function(a){return t.getLists(!0)}}},[t._v(t._s(t.$L("\u6CA1\u6709\u4EFB\u4F55\u52A8\u6001")))]):t._e()],2)])},k=[];const y={name:"ProjectLog",components:{ProjectLogDetail:v},props:{projectId:{type:Number,default:0},taskId:{type:Number,default:0},showLoad:{type:Boolean,default:!0}},data(){return{loadIng:0,lists:[],listPage:1,listPageSize:20,hasMorePages:!1,totalNum:-1}},mounted(){this.getLists(!0)},computed:{},watch:{projectId(){this.lists=[],this.getLists(!0)},taskId(){this.lists=[],this.getLists(!0)},loadIng(t){this.$emit("on-load-change",t>0)}},methods:{logDate(t){return $A.formatDate("m-d")==t.ymd?t.ymd+" "+this.$L("\u4ECA\u5929"):t.key},getLists(t){t===!0&&(this.listPage=1),this.loadIng++,this.$store.dispatch("call",{url:"project/log/lists",data:{project_id:this.projectId,task_id:this.taskId,page:Math.max(this.listPage,1),pagesize:Math.max($A.runNum(this.listPageSize),10)}}).then(({data:e})=>{t===!0&&(this.lists=[]),e.data.some(s=>{let a=s.time,r=a.ymd+" "+a.week,o=this.lists.find(({key:i})=>i==r);if(o){let i=o.lists.find(({userid:n})=>n==s.userid);i?i.lists.push(s):o.lists.push({userid:s.userid,lists:[s]})}else this.lists.push({key:r,ymd:s.ymd,lists:[{userid:s.userid,lists:[s]}]})}),this.hasMorePages=e.current_page{this.lists=[],this.hasMorePages=!1,this.totalNum=0}).finally(e=>{this.loadIng--})},getMore(){!this.hasMorePages||(this.hasMorePages=!1,this.listPage++,this.getLists())},logDetail(t,{detail:e,record:s}){let a=[t("span",e)];if($A.isJson(s)){if($A.isArray(s.change)){let[r,o]=s.change;a.push(t("span",": ")),r&&r!=o?(a.push(t("span",{class:"change-value"},`${r||"-"}`)),a.push(t("span"," => ")),a.push(t("span",{class:"change-value"},`${o||"-"}`))):a.push(t("span",{class:"change-value"},o||"-"))}if(s.userid){let r=$A.isArray(s.userid)?s.userid:[s.userid],o=[];r.some(i=>{/^\d+$/.test(i)?o.push(t("UserAvatar",{props:{size:18,userid:i}})):o.push(t("span",i))}),o.length>0&&a.push(t("div",{class:"detail-user"},[t("div",{class:"detail-user-wrap"},o)]))}}return t("span",{class:"log-text"},a)},operationList({id:t,record:e}){let s=[];if(!$A.isJson(e))return s;if(this.taskId>0&&$A.isJson(e.flow)){let a=$A.getMiddle(e.flow.flow_item_name,"|");a&&s.push({id:t,button:this.$L("\u91CD\u7F6E"),content:this.$L(`\u786E\u5B9A\u91CD\u7F6E\u4E3A\u3010${a}\u3011\u5417\uFF1F`)})}return s},onOperation(t){$A.modalConfirm({content:t.content,loading:!0,onOk:()=>new Promise((e,s)=>{this.$store.dispatch("call",{url:"project/task/resetfromlog",data:{id:t.id}}).then(({data:a,msg:r})=>{e(r),this.$store.dispatch("saveTask",a),this.getLists(!0)}).catch(({msg:a})=>{s(a)})})})},openTask(t){this.$store.dispatch("openTask",t)}}},u={};var L=c(y,$,k,!1,C,null,null,null);function C(t){for(let e in u)this[e]=u[e]}var A=function(){return L.exports}();export{A as P,I as T}; +import{m as p,n as c}from"./app.73f924cf.js";var h=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"task-priority",style:t.myStyle},[t._t("default")],2)},m=[];const _={name:"TaskPriority",props:{color:{default:"#ffffff"},background:{default:"#7DBEEA"},backgroundColor:{default:"#7DBEEA"}},data(){return{}},computed:{...p(["themeIsDark"]),myStyle(){const{color:t,background:e,backgroundColor:s,themeIsDark:a}=this;return a?{color:s||e,borderColor:s||e,backgroundColor:"transparent"}:{color:t,borderColor:s||e,backgroundColor:s||e}}}},l={};var f=c(_,h,m,!1,g,null,null,null);function g(t){for(let e in l)this[e]=l[e]}var I=function(){return f.exports}(),v={name:"ProjectLogDetail",functional:!0,props:{render:Function,item:Object},render:(t,e)=>e.props.render(t,e.props.item)},$=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{class:["project-log",t.taskId==0?"is-drawer":""]},[s("div",{staticClass:"log-title"},[t._v(t._s(t.$L("\u9879\u76EE\u52A8\u6001")))]),s("ul",{staticClass:"logs-activity"},[t._l(t.lists,function(a){return s("li",[s("div",{staticClass:"logs-date"},[t._v(t._s(t.logDate(a)))]),s("div",{staticClass:"logs-section"},[s("Timeline",t._l(a.lists,function(r,o){return s("TimelineItem",{key:o},[s("div",{staticClass:"logs-dot",attrs:{slot:"dot"},slot:"dot"},[r.userid?s("UserAvatar",{attrs:{userid:r.userid,size:18,showName:""}}):s("div",{staticClass:"avatar-wrapper common-avatar"},[s("EAvatar",{attrs:{size:18}},[t._v("A")]),s("div",{staticClass:"avatar-name auto"},[t._v(t._s(t.$L("\u7CFB\u7EDF")))])],1)],1),t._l(r.lists,function(i){return[s("div",{staticClass:"log-summary"},[s("ProjectLogDetail",{attrs:{render:t.logDetail,item:i}}),t.operationList(i).length>0?s("span",{staticClass:"log-operation"},t._l(t.operationList(i),function(n,d){return s("Button",{key:d,attrs:{size:"small"},on:{click:function(P){return t.onOperation(n)}}},[t._v(t._s(n.button))])}),1):t._e(),s("span",{staticClass:"log-time"},[t._v(t._s(i.time.ymd)+" "+t._s(i.time.segment)+" "+t._s(i.time.hi))])],1),i.project_task?s("div",{staticClass:"log-task"},[s("em",{on:{click:function(n){return t.openTask(i.project_task)}}},[t._v(t._s(t.$L("\u5173\u8054\u4EFB\u52A1"))+": "+t._s(i.project_task.name))])]):t._e()]})],2)}),1)],1)])}),t.loadIng>0&&t.showLoad?s("li",{staticClass:"logs-loading"},[s("Loading")],1):t.hasMorePages?s("li",{staticClass:"logs-more",on:{click:t.getMore}},[t._v(t._s(t.$L("\u52A0\u8F7D\u66F4\u591A")))]):t.totalNum==0?s("li",{staticClass:"logs-none",on:{click:function(a){return t.getLists(!0)}}},[t._v(t._s(t.$L("\u6CA1\u6709\u4EFB\u4F55\u52A8\u6001")))]):t._e()],2)])},k=[];const y={name:"ProjectLog",components:{ProjectLogDetail:v},props:{projectId:{type:Number,default:0},taskId:{type:Number,default:0},showLoad:{type:Boolean,default:!0}},data(){return{loadIng:0,lists:[],listPage:1,listPageSize:20,hasMorePages:!1,totalNum:-1}},mounted(){this.getLists(!0)},computed:{},watch:{projectId(){this.lists=[],this.getLists(!0)},taskId(){this.lists=[],this.getLists(!0)},loadIng(t){this.$emit("on-load-change",t>0)}},methods:{logDate(t){return $A.formatDate("m-d")==t.ymd?t.ymd+" "+this.$L("\u4ECA\u5929"):t.key},getLists(t){t===!0&&(this.listPage=1),this.loadIng++,this.$store.dispatch("call",{url:"project/log/lists",data:{project_id:this.projectId,task_id:this.taskId,page:Math.max(this.listPage,1),pagesize:Math.max($A.runNum(this.listPageSize),10)}}).then(({data:e})=>{t===!0&&(this.lists=[]),e.data.some(s=>{let a=s.time,r=a.ymd+" "+a.week,o=this.lists.find(({key:i})=>i==r);if(o){let i=o.lists.find(({userid:n})=>n==s.userid);i?i.lists.push(s):o.lists.push({userid:s.userid,lists:[s]})}else this.lists.push({key:r,ymd:s.ymd,lists:[{userid:s.userid,lists:[s]}]})}),this.hasMorePages=e.current_page{this.lists=[],this.hasMorePages=!1,this.totalNum=0}).finally(e=>{this.loadIng--})},getMore(){!this.hasMorePages||(this.hasMorePages=!1,this.listPage++,this.getLists())},logDetail(t,{detail:e,record:s}){let a=[t("span",e)];if($A.isJson(s)){if($A.isArray(s.change)){let[r,o]=s.change;a.push(t("span",": ")),r&&r!=o?(a.push(t("span",{class:"change-value"},`${r||"-"}`)),a.push(t("span"," => ")),a.push(t("span",{class:"change-value"},`${o||"-"}`))):a.push(t("span",{class:"change-value"},o||"-"))}if(s.userid){let r=$A.isArray(s.userid)?s.userid:[s.userid],o=[];r.some(i=>{/^\d+$/.test(i)?o.push(t("UserAvatar",{props:{size:18,userid:i}})):o.push(t("span",i))}),o.length>0&&a.push(t("div",{class:"detail-user"},[t("div",{class:"detail-user-wrap"},o)]))}}return t("span",{class:"log-text"},a)},operationList({id:t,record:e}){let s=[];if(!$A.isJson(e))return s;if(this.taskId>0&&$A.isJson(e.flow)){let a=$A.getMiddle(e.flow.flow_item_name,"|");a&&s.push({id:t,button:this.$L("\u91CD\u7F6E"),content:this.$L(`\u786E\u5B9A\u91CD\u7F6E\u4E3A\u3010${a}\u3011\u5417\uFF1F`)})}return s},onOperation(t){$A.modalConfirm({content:t.content,loading:!0,onOk:()=>new Promise((e,s)=>{this.$store.dispatch("call",{url:"project/task/resetfromlog",data:{id:t.id}}).then(({data:a,msg:r})=>{e(r),this.$store.dispatch("saveTask",a),this.getLists(!0)}).catch(({msg:a})=>{s(a)})})})},openTask(t){this.$store.dispatch("openTask",t)}}},u={};var L=c(y,$,k,!1,C,null,null,null);function C(t){for(let e in u)this[e]=u[e]}var A=function(){return L.exports}();export{A as P,I as T}; diff --git a/public/js/build/ReportDetail.54f54ccf.js b/public/js/build/ReportDetail.92eaf50d.js similarity index 95% rename from public/js/build/ReportDetail.54f54ccf.js rename to public/js/build/ReportDetail.92eaf50d.js index a249cc3c1..f945555d6 100644 --- a/public/js/build/ReportDetail.54f54ccf.js +++ b/public/js/build/ReportDetail.92eaf50d.js @@ -1 +1 @@ -import{n as o}from"./app.256678e2.js";var l=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"report-detail"},[a("div",{staticClass:"report-title"},[t._v(" "+t._s(t.data.title)+" "),t.loadIng>0?a("Icon",{staticClass:"icon-loading",attrs:{type:"ios-loading"}}):t._e()],1),a("div",{staticClass:"report-detail-context"},[a("Form",{staticClass:"report-form",attrs:{"label-width":"auto",inline:""}},[a("FormItem",{attrs:{label:t.$L("\u6C47\u62A5\u4EBA")}},[a("UserAvatar",{attrs:{userid:t.data.userid,size:28}})],1),a("FormItem",{attrs:{label:t.$L("\u63D0\u4EA4\u65F6\u95F4")}},[t._v(" "+t._s(t.data.created_at)+" ")]),a("FormItem",{attrs:{label:t.$L("\u6C47\u62A5\u5BF9\u8C61")}},[t.data.receives_user.length===0?[t._v("-")]:t._l(t.data.receives_user,function(s,i){return a("UserAvatar",{key:i,attrs:{userid:s.userid,size:28}})})],2)],1),a("Form",{staticClass:"report-form",attrs:{"label-width":"auto"}},[a("FormItem",{attrs:{label:t.$L("\u6C47\u62A5\u5185\u5BB9")}},[a("div",{staticClass:"report-content",domProps:{innerHTML:t._s(t.data.content)}})])],1)],1)])},n=[];const d={name:"ReportDetail",props:{data:{default:{}}},data(){return{loadIng:0}},watch:{"data.id":{handler(t){t>0&&this.sendRead()},immediate:!0}},methods:{sendRead(){this.loadIng++,this.$store.dispatch("call",{url:"report/read",data:{ids:[this.data.id]}}).then(()=>{}).catch(()=>{}).finally(t=>{this.loadIng--})}}},r={};var c=o(d,l,n,!1,_,null,null,null);function _(t){for(let e in r)this[e]=r[e]}var m=function(){return c.exports}();export{m as R}; +import{n as o}from"./app.73f924cf.js";var l=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"report-detail"},[a("div",{staticClass:"report-title"},[t._v(" "+t._s(t.data.title)+" "),t.loadIng>0?a("Icon",{staticClass:"icon-loading",attrs:{type:"ios-loading"}}):t._e()],1),a("div",{staticClass:"report-detail-context"},[a("Form",{staticClass:"report-form",attrs:{"label-width":"auto",inline:""}},[a("FormItem",{attrs:{label:t.$L("\u6C47\u62A5\u4EBA")}},[a("UserAvatar",{attrs:{userid:t.data.userid,size:28}})],1),a("FormItem",{attrs:{label:t.$L("\u63D0\u4EA4\u65F6\u95F4")}},[t._v(" "+t._s(t.data.created_at)+" ")]),a("FormItem",{attrs:{label:t.$L("\u6C47\u62A5\u5BF9\u8C61")}},[t.data.receives_user.length===0?[t._v("-")]:t._l(t.data.receives_user,function(s,i){return a("UserAvatar",{key:i,attrs:{userid:s.userid,size:28}})})],2)],1),a("Form",{staticClass:"report-form",attrs:{"label-width":"auto"}},[a("FormItem",{attrs:{label:t.$L("\u6C47\u62A5\u5185\u5BB9")}},[a("div",{staticClass:"report-content",domProps:{innerHTML:t._s(t.data.content)}})])],1)],1)])},n=[];const d={name:"ReportDetail",props:{data:{default:{}}},data(){return{loadIng:0}},watch:{"data.id":{handler(t){t>0&&this.sendRead()},immediate:!0}},methods:{sendRead(){this.loadIng++,this.$store.dispatch("call",{url:"report/read",data:{ids:[this.data.id]}}).then(()=>{}).catch(()=>{}).finally(t=>{this.loadIng--})}}},r={};var c=o(d,l,n,!1,_,null,null,null);function _(t){for(let e in r)this[e]=r[e]}var m=function(){return c.exports}();export{m as R}; diff --git a/public/js/build/ReportEdit.19dd4391.js b/public/js/build/ReportEdit.6f0646a1.js similarity index 94% rename from public/js/build/ReportEdit.19dd4391.js rename to public/js/build/ReportEdit.6f0646a1.js index c40e8b5ac..b49d257f3 100644 --- a/public/js/build/ReportEdit.19dd4391.js +++ b/public/js/build/ReportEdit.6f0646a1.js @@ -1 +1 @@ -import{n as s,_ as o}from"./app.256678e2.js";import{U as l}from"./UserInput.6e7e4596.js";var n=function(){var t=this,r=t.$createElement,e=t._self._c||r;return e("Form",{staticClass:"report-edit",attrs:{"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("FormItem",{attrs:{label:t.$L("\u6C47\u62A5\u7C7B\u578B")}},[e("RadioGroup",{staticClass:"report-radiogroup",attrs:{type:"button","button-style":"solid",readonly:t.id>0},on:{"on-change":t.typeChange},model:{value:t.reportData.type,callback:function(a){t.$set(t.reportData,"type",a)},expression:"reportData.type"}},[e("Radio",{attrs:{label:"weekly",disabled:t.id>0&&t.reportData.type=="daily"}},[t._v(t._s(t.$L("\u5468\u62A5")))]),e("Radio",{attrs:{label:"daily",disabled:t.id>0&&t.reportData.type=="weekly"}},[t._v(t._s(t.$L("\u65E5\u62A5")))])],1),t.id===0?e("ButtonGroup",{staticClass:"report-buttongroup"},[e("ETooltip",{attrs:{disabled:t.windowSmall||t.$isEEUiApp,content:t.prevCycleText,placement:"bottom"}},[e("Button",{attrs:{type:"primary"},on:{click:t.prevCycle}},[e("Icon",{attrs:{type:"ios-arrow-back"}})],1)],1),e("div",{staticClass:"report-buttongroup-vertical"}),e("ETooltip",{attrs:{disabled:t.windowSmall||t.$isEEUiApp||t.reportData.offset>=0,content:t.nextCycleText,placement:"bottom"}},[e("Button",{attrs:{type:"primary",disabled:t.reportData.offset>=0},on:{click:t.nextCycle}},[e("Icon",{attrs:{type:"ios-arrow-forward"}})],1)],1)],1):t._e()],1),e("FormItem",{attrs:{label:t.$L("\u6C47\u62A5\u540D\u79F0")}},[e("Input",{attrs:{disabled:""},model:{value:t.reportData.title,callback:function(a){t.$set(t.reportData,"title",a)},expression:"reportData.title"}})],1),e("FormItem",{attrs:{label:t.$L("\u6C47\u62A5\u5BF9\u8C61")}},[e("div",{staticClass:"report-users"},[e("UserInput",{attrs:{disabledChoice:[t.userId],placeholder:t.$L("\u9009\u62E9\u63A5\u6536\u4EBA"),transfer:!1},model:{value:t.reportData.receive,callback:function(a){t.$set(t.reportData,"receive",a)},expression:"reportData.receive"}}),e("a",{staticClass:"report-user-link",attrs:{href:"javascript:void(0);"},on:{click:t.getLastSubmitter}},[t.receiveLoad>0?e("Icon",{staticClass:"icon-loading",attrs:{type:"ios-loading"}}):e("Icon",{attrs:{type:"ios-share-outline"}}),t._v(" "+t._s(t.$L("\u4F7F\u7528\u6211\u4E0A\u6B21\u7684\u6C47\u62A5\u5BF9\u8C61"))+" ")],1)],1)]),e("FormItem",{staticClass:"report-content-editor",attrs:{label:t.$L("\u6C47\u62A5\u5185\u5BB9")}},[e("TEditor",{attrs:{height:"100%"},model:{value:t.reportData.content,callback:function(a){t.$set(t.reportData,"content",a)},expression:"reportData.content"}})],1),e("FormItem",{staticClass:"report-foot"},[e("Button",{staticClass:"report-bottom",attrs:{type:"primary",loading:t.loadIng>0},on:{click:t.handleSubmit}},[t._v(t._s(t.$L(t.id>0?"\u4FEE\u6539":"\u63D0\u4EA4")))])],1)],1)},p=[];const c=()=>o(()=>import("./TEditor.61cbcfed.js"),["js/build/TEditor.61cbcfed.js","js/build/app.256678e2.js","js/build/app.d2a9034f.css","js/build/ImgUpload.6fde0d68.js"]),h={name:"ReportEdit",components:{TEditor:c,UserInput:l},props:{id:{default:0}},data(){return{loadIng:0,receiveLoad:0,reportData:{sign:"",title:"",content:"",type:"weekly",receive:[],id:0,offset:0},prevCycleText:this.$L("\u4E0A\u4E00\u5468"),nextCycleText:this.$L("\u4E0B\u4E00\u5468")}},watch:{id:{handler(t){t>0?this.getDetail(t):(this.reportData.offset=0,this.reportData.type="weekly",this.reportData.receive=[],this.getTemplate())},immediate:!0}},mounted(){},methods:{handleSubmit(){this.id===0&&this.reportData.id>0?$A.modalConfirm({title:"\u8986\u76D6\u63D0\u4EA4",content:"\u4F60\u5DF2\u63D0\u4EA4\u8FC7\u6B64\u65E5\u671F\u7684\u62A5\u544A\uFF0C\u662F\u5426\u8986\u76D6\u63D0\u4EA4\uFF1F",onOk:()=>{this.doSubmit()}}):this.doSubmit()},doSubmit(){this.loadIng++,this.$store.dispatch("call",{url:"report/store",data:this.reportData,method:"post"}).then(({data:t,msg:r})=>{this.reportData.offset=0,this.reportData.type="weekly",this.reportData.receive=[],this.getTemplate(),!this.$isSubElectron&&$A.messageSuccess(r),this.$emit("saveSuccess",{data:t,msg:r})}).catch(({msg:t})=>{$A.messageError(t)}).finally(t=>{this.loadIng--})},getTemplate(){this.loadIng++,this.$store.dispatch("call",{url:"report/template",data:{type:this.reportData.type,offset:this.reportData.offset,id:this.id}}).then(({data:t})=>{t.id?(this.reportData.id=t.id,this.id>0?this.getDetail(t.id):(this.reportData.sign=t.sign,this.reportData.title=t.title,this.reportData.content=t.content)):(this.reportData.id=0,this.reportData.sign=t.sign,this.reportData.title=t.title,this.reportData.content=t.content)}).catch(({msg:t})=>{$A.messageError(t)}).finally(t=>{this.loadIng--})},typeChange(t){this.reportData.offset=0,t==="weekly"?(this.prevCycleText=this.$L("\u4E0A\u4E00\u5468"),this.nextCycleText=this.$L("\u4E0B\u4E00\u5468")):(this.prevCycleText=this.$L("\u4E0A\u4E00\u5929"),this.nextCycleText=this.$L("\u4E0B\u4E00\u5929")),this.getTemplate()},getDetail(t){this.$store.dispatch("call",{url:"report/detail",data:{id:t}}).then(({data:r})=>{this.reportData.title=r.title,this.reportData.content=r.content,this.reportData.receive=r.receives_user.map(({userid:e})=>e),this.reportData.type=r.type_val,this.reportData.id=t}).catch(({msg:r})=>{$A.messageError(r)})},prevCycle(){this.reportData.offset-=1,this.reReportData(),this.getTemplate()},nextCycle(){this.reportData.offset<0&&(this.reportData.offset+=1),this.reReportData(),this.getTemplate()},getLastSubmitter(){setTimeout(t=>{this.receiveLoad++},300),this.$store.dispatch("call",{url:"report/last_submitter"}).then(({data:t})=>{this.reportData.receive=t}).catch(({msg:t})=>{$A.messageError(t)}).finally(t=>{this.receiveLoad--})},reReportData(){this.reportData.title="",this.reportData.content="",this.reportData.receive=[],this.reportData.id=0}}},i={};var d=s(h,n,p,!1,m,null,null,null);function m(t){for(let r in i)this[r]=i[r]}var f=function(){return d.exports}();export{f as R}; +import{n as s,_ as o}from"./app.73f924cf.js";import{U as l}from"./UserInput.38753002.js";var n=function(){var t=this,r=t.$createElement,e=t._self._c||r;return e("Form",{staticClass:"report-edit",attrs:{"label-width":"auto"},nativeOn:{submit:function(a){a.preventDefault()}}},[e("FormItem",{attrs:{label:t.$L("\u6C47\u62A5\u7C7B\u578B")}},[e("RadioGroup",{staticClass:"report-radiogroup",attrs:{type:"button","button-style":"solid",readonly:t.id>0},on:{"on-change":t.typeChange},model:{value:t.reportData.type,callback:function(a){t.$set(t.reportData,"type",a)},expression:"reportData.type"}},[e("Radio",{attrs:{label:"weekly",disabled:t.id>0&&t.reportData.type=="daily"}},[t._v(t._s(t.$L("\u5468\u62A5")))]),e("Radio",{attrs:{label:"daily",disabled:t.id>0&&t.reportData.type=="weekly"}},[t._v(t._s(t.$L("\u65E5\u62A5")))])],1),t.id===0?e("ButtonGroup",{staticClass:"report-buttongroup"},[e("ETooltip",{attrs:{disabled:t.windowSmall||t.$isEEUiApp,content:t.prevCycleText,placement:"bottom"}},[e("Button",{attrs:{type:"primary"},on:{click:t.prevCycle}},[e("Icon",{attrs:{type:"ios-arrow-back"}})],1)],1),e("div",{staticClass:"report-buttongroup-vertical"}),e("ETooltip",{attrs:{disabled:t.windowSmall||t.$isEEUiApp||t.reportData.offset>=0,content:t.nextCycleText,placement:"bottom"}},[e("Button",{attrs:{type:"primary",disabled:t.reportData.offset>=0},on:{click:t.nextCycle}},[e("Icon",{attrs:{type:"ios-arrow-forward"}})],1)],1)],1):t._e()],1),e("FormItem",{attrs:{label:t.$L("\u6C47\u62A5\u540D\u79F0")}},[e("Input",{attrs:{disabled:""},model:{value:t.reportData.title,callback:function(a){t.$set(t.reportData,"title",a)},expression:"reportData.title"}})],1),e("FormItem",{attrs:{label:t.$L("\u6C47\u62A5\u5BF9\u8C61")}},[e("div",{staticClass:"report-users"},[e("UserInput",{attrs:{disabledChoice:[t.userId],placeholder:t.$L("\u9009\u62E9\u63A5\u6536\u4EBA"),transfer:!1},model:{value:t.reportData.receive,callback:function(a){t.$set(t.reportData,"receive",a)},expression:"reportData.receive"}}),e("a",{staticClass:"report-user-link",attrs:{href:"javascript:void(0);"},on:{click:t.getLastSubmitter}},[t.receiveLoad>0?e("Icon",{staticClass:"icon-loading",attrs:{type:"ios-loading"}}):e("Icon",{attrs:{type:"ios-share-outline"}}),t._v(" "+t._s(t.$L("\u4F7F\u7528\u6211\u4E0A\u6B21\u7684\u6C47\u62A5\u5BF9\u8C61"))+" ")],1)],1)]),e("FormItem",{staticClass:"report-content-editor",attrs:{label:t.$L("\u6C47\u62A5\u5185\u5BB9")}},[e("TEditor",{attrs:{height:"100%"},model:{value:t.reportData.content,callback:function(a){t.$set(t.reportData,"content",a)},expression:"reportData.content"}})],1),e("FormItem",{staticClass:"report-foot"},[e("Button",{staticClass:"report-bottom",attrs:{type:"primary",loading:t.loadIng>0},on:{click:t.handleSubmit}},[t._v(t._s(t.$L(t.id>0?"\u4FEE\u6539":"\u63D0\u4EA4")))])],1)],1)},p=[];const c=()=>o(()=>import("./TEditor.31ce405c.js"),["js/build/TEditor.31ce405c.js","js/build/app.73f924cf.js","js/build/app.d2a9034f.css","js/build/ImgUpload.09338bda.js"]),h={name:"ReportEdit",components:{TEditor:c,UserInput:l},props:{id:{default:0}},data(){return{loadIng:0,receiveLoad:0,reportData:{sign:"",title:"",content:"",type:"weekly",receive:[],id:0,offset:0},prevCycleText:this.$L("\u4E0A\u4E00\u5468"),nextCycleText:this.$L("\u4E0B\u4E00\u5468")}},watch:{id:{handler(t){t>0?this.getDetail(t):(this.reportData.offset=0,this.reportData.type="weekly",this.reportData.receive=[],this.getTemplate())},immediate:!0}},mounted(){},methods:{handleSubmit(){this.id===0&&this.reportData.id>0?$A.modalConfirm({title:"\u8986\u76D6\u63D0\u4EA4",content:"\u4F60\u5DF2\u63D0\u4EA4\u8FC7\u6B64\u65E5\u671F\u7684\u62A5\u544A\uFF0C\u662F\u5426\u8986\u76D6\u63D0\u4EA4\uFF1F",onOk:()=>{this.doSubmit()}}):this.doSubmit()},doSubmit(){this.loadIng++,this.$store.dispatch("call",{url:"report/store",data:this.reportData,method:"post"}).then(({data:t,msg:r})=>{this.reportData.offset=0,this.reportData.type="weekly",this.reportData.receive=[],this.getTemplate(),!this.$isSubElectron&&$A.messageSuccess(r),this.$emit("saveSuccess",{data:t,msg:r})}).catch(({msg:t})=>{$A.messageError(t)}).finally(t=>{this.loadIng--})},getTemplate(){this.loadIng++,this.$store.dispatch("call",{url:"report/template",data:{type:this.reportData.type,offset:this.reportData.offset,id:this.id}}).then(({data:t})=>{t.id?(this.reportData.id=t.id,this.id>0?this.getDetail(t.id):(this.reportData.sign=t.sign,this.reportData.title=t.title,this.reportData.content=t.content)):(this.reportData.id=0,this.reportData.sign=t.sign,this.reportData.title=t.title,this.reportData.content=t.content)}).catch(({msg:t})=>{$A.messageError(t)}).finally(t=>{this.loadIng--})},typeChange(t){this.reportData.offset=0,t==="weekly"?(this.prevCycleText=this.$L("\u4E0A\u4E00\u5468"),this.nextCycleText=this.$L("\u4E0B\u4E00\u5468")):(this.prevCycleText=this.$L("\u4E0A\u4E00\u5929"),this.nextCycleText=this.$L("\u4E0B\u4E00\u5929")),this.getTemplate()},getDetail(t){this.$store.dispatch("call",{url:"report/detail",data:{id:t}}).then(({data:r})=>{this.reportData.title=r.title,this.reportData.content=r.content,this.reportData.receive=r.receives_user.map(({userid:e})=>e),this.reportData.type=r.type_val,this.reportData.id=t}).catch(({msg:r})=>{$A.messageError(r)})},prevCycle(){this.reportData.offset-=1,this.reReportData(),this.getTemplate()},nextCycle(){this.reportData.offset<0&&(this.reportData.offset+=1),this.reReportData(),this.getTemplate()},getLastSubmitter(){setTimeout(t=>{this.receiveLoad++},300),this.$store.dispatch("call",{url:"report/last_submitter"}).then(({data:t})=>{this.reportData.receive=t}).catch(({msg:t})=>{$A.messageError(t)}).finally(t=>{this.receiveLoad--})},reReportData(){this.reportData.title="",this.reportData.content="",this.reportData.receive=[],this.reportData.id=0}}},i={};var d=s(h,n,p,!1,m,null,null,null);function m(t){for(let r in i)this[r]=i[r]}var f=function(){return d.exports}();export{f as R}; diff --git a/public/js/build/TEditor.61cbcfed.js b/public/js/build/TEditor.31ce405c.js similarity index 99% rename from public/js/build/TEditor.61cbcfed.js rename to public/js/build/TEditor.31ce405c.js index fc3d4f284..2c92e8404 100644 --- a/public/js/build/TEditor.61cbcfed.js +++ b/public/js/build/TEditor.31ce405c.js @@ -1,4 +1,4 @@ -import{e as PC,m as a2,a as IC,n as i2}from"./app.256678e2.js";import{I as o2}from"./ImgUpload.6fde0d68.js";var FC={exports:{}};(function(V){(function(){var Ee=function(e){if(e===null)return"null";if(e===void 0)return"undefined";var t=typeof e;return t==="object"&&(Array.prototype.isPrototypeOf(e)||e.constructor&&e.constructor.name==="Array")?"array":t==="object"&&(String.prototype.isPrototypeOf(e)||e.constructor&&e.constructor.name==="String")?"string":t},be=function(e){return["undefined","boolean","number","string","function","xml","null"].indexOf(e)!==-1},he=function(e,t){var n=Array.prototype.slice.call(e);return n.sort(t)},Ke=function(e,t){return ht(function(n,r){return e.eq(t(n),t(r))})},ht=function(e){return{eq:e}},Qt=ht(function(e,t){return e===t}),Qr=Qt,Ka=function(e){return ht(function(t,n){if(t.length!==n.length)return!1;for(var r=t.length,a=0;a-1},bt=function(e,t){for(var n=0,r=e.length;n=0;n--){var r=e[n];t(r,n)}},Yc=function(e,t){for(var n=[],r=[],a=0,i=e.length;a=0&&t=t.length&&e.substr(n,n+t.length)===t},d0=function(e,t){return Sr(e,t)?c0(e,t.length):e},yt=function(e,t){return e.indexOf(t)!==-1},Sr=function(e,t){return v0(e,t,0)},cs=function(e){return function(t){return t.replace(e,"")}},vs=cs(/^\s+|\s+$/g),m0=cs(/^\s+/g),uv=cs(/\s+$/g),Gi=function(e){return e.length>0},sv=function(e){return!Gi(e)},ds=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Pn=function(e){return function(t){return yt(t,e)}},p0=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return yt(e,"edge/")&&yt(e,"chrome")&&yt(e,"safari")&&yt(e,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,ds],search:function(e){return yt(e,"chrome")&&!yt(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return yt(e,"msie")||yt(e,"trident")}},{name:"Opera",versionRegexes:[ds,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Pn("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Pn("firefox")},{name:"Safari",versionRegexes:[ds,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(yt(e,"safari")||yt(e,"mobile/"))&&yt(e,"applewebkit")}}],g0=[{name:"Windows",search:Pn("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return yt(e,"iphone")||yt(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Pn("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Pn("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Pn("linux"),versionRegexes:[]},{name:"Solaris",search:Pn("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Pn("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Pn("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],fv={browsers:X(p0),oses:X(g0)},lv="Edge",cv="Chrome",vv="IE",dv="Opera",mv="Firefox",pv="Safari",h0=function(){return gv({current:void 0,version:Za.unknown()})},gv=function(e){var t=e.current,n=e.version,r=function(a){return function(){return t===a}};return{current:t,version:n,isEdge:r(lv),isChrome:r(cv),isIE:r(vv),isOpera:r(dv),isFirefox:r(mv),isSafari:r(pv)}},hv={unknown:h0,nu:gv,edge:X(lv),chrome:X(cv),ie:X(vv),opera:X(dv),firefox:X(mv),safari:X(pv)},bv="Windows",yv="iOS",Cv="Android",wv="Linux",Sv="OSX",Ev="Solaris",kv="FreeBSD",xv="ChromeOS",b0=function(){return Nv({current:void 0,version:Za.unknown()})},Nv=function(e){var t=e.current,n=e.version,r=function(a){return function(){return t===a}};return{current:t,version:n,isWindows:r(bv),isiOS:r(yv),isAndroid:r(Cv),isOSX:r(Sv),isLinux:r(wv),isSolaris:r(Ev),isFreeBSD:r(kv),isChromeOS:r(xv)}},Tv={unknown:b0,nu:Nv,windows:X(bv),ios:X(yv),android:X(Cv),linux:X(wv),osx:X(Sv),solaris:X(Ev),freebsd:X(kv),chromeos:X(xv)},y0=function(e,t,n){var r=fv.browsers(),a=fv.oses(),i=t.bind(function(s){return s0(r,s)}).orThunk(function(){return f0(r,e)}).fold(hv.unknown,hv.nu),o=l0(a,e).fold(Tv.unknown,Tv.nu),u=a0(o,i,e,n);return{browser:i,os:o,deviceType:u}},C0={detect:y0},w0=function(e){return window.matchMedia(e).matches},S0=fs(function(){return C0.detect(navigator.userAgent,b.from(navigator.userAgentData),w0)}),qt=function(){return S0()},Av=navigator.userAgent,ms=qt(),Ct=ms.browser,It=ms.os,pn=ms.deviceType,E0=/WebKit/.test(Av)&&!Ct.isEdge(),k0="FormData"in window&&"FileReader"in window&&"URL"in window&&!!URL.createObjectURL,x0=Av.indexOf("Windows Phone")!==-1,se={opera:Ct.isOpera(),webkit:E0,ie:Ct.isIE()||Ct.isEdge()?Ct.version.major:!1,gecko:Ct.isFirefox(),mac:It.isOSX()||It.isiOS(),iOS:pn.isiPad()||pn.isiPhone(),android:It.isAndroid(),contentEditable:!0,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:!0,range:window.getSelection&&"Range"in window,documentMode:Ct.isIE()?document.documentMode||7:10,fileApi:k0,ceFalse:!0,cacheSuffix:null,container:null,experimentalShadowDom:!1,canHaveCSP:!Ct.isIE(),desktop:pn.isDesktop(),windowsPhone:x0,browser:{current:Ct.current,version:Ct.version,isChrome:Ct.isChrome,isEdge:Ct.isEdge,isFirefox:Ct.isFirefox,isIE:Ct.isIE,isOpera:Ct.isOpera,isSafari:Ct.isSafari},os:{current:It.current,version:It.version,isAndroid:It.isAndroid,isChromeOS:It.isChromeOS,isFreeBSD:It.isFreeBSD,isiOS:It.isiOS,isLinux:It.isLinux,isOSX:It.isOSX,isSolaris:It.isSolaris,isWindows:It.isWindows},deviceType:{isDesktop:pn.isDesktop,isiPad:pn.isiPad,isiPhone:pn.isiPhone,isPhone:pn.isPhone,isTablet:pn.isTablet,isTouch:pn.isTouch,isWebView:pn.isWebView}},N0=/^\s*|\s*$/g,Rv=function(e){return e==null?"":(""+e).replace(N0,"")},Bv=function(e,t){return t?t==="array"&&us(e)?!0:typeof e===t:e!==void 0},T0=function(e,t,n){var r;for(e=e||[],t=t||",",typeof e=="string"&&(e=e.split(t)),n=n||{},r=e.length;r--;)n[e[r]]={};return n},A0=de,R0=function(e,t,n){var r=this,a,i,o,u=0;e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e);var s=e[3].match(/(^|\.)(\w+)$/i)[2],f=r.createNS(e[3].replace(/\.\w+$/,""),n);if(!f[s]){if(e[2]==="static"){f[s]=t,this.onCreate&&this.onCreate(e[2],e[3],f[s]);return}t[s]||(t[s]=function(){},u=1),f[s]=t[s],r.extend(f[s].prototype,t),e[5]&&(a=r.resolve(e[5]).prototype,i=e[5].match(/\.(\w+)$/i)[1],o=f[s],u?f[s]=function(){return a[i].apply(this,arguments)}:f[s]=function(){return this.parent=a[i],o.apply(this,arguments)},f[s].prototype[s]=f[s],r.each(a,function(l,c){f[s].prototype[c]=a[c]}),r.each(t,function(l,c){a[c]?f[s].prototype[c]=function(){return this.parent=a[c],l.apply(this,arguments)}:c!==s&&(f[s].prototype[c]=l)})),r.each(t.static,function(l,c){f[s][c]=l})}},B0=function(e){for(var t=[],n=1;n1)throw console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return Ja(r.childNodes[0])},$0=function(e,t){var n=t||document,r=n.createElement(e);return Ja(r)},L0=function(e,t){var n=t||document,r=n.createTextNode(e);return Ja(r)},Ja=function(e){if(e==null)throw new Error("Node cannot be null or undefined");return{dom:e}},F0=function(e,t,n){return b.from(e.dom.elementFromPoint(t,n)).map(Ja)},k={fromHtml:I0,fromTag:$0,fromText:L0,fromDom:Ja,fromPoint:F0},Dv=function(e,t){var n=[],r=function(i){return n.push(i),t(i)},a=t(e);do a=a.bind(r);while(a.isSome());return n},M0=function(e,t,n){return(e.compareDocumentPosition(t)&n)!==0},U0=function(e,t){return M0(e,t,Node.DOCUMENT_POSITION_CONTAINED_BY)},z0=8,Ov=9,Pv=11,ps=1,H0=3,aa=function(e,t){var n=e.dom;if(n.nodeType!==ps)return!1;var r=n;if(r.matches!==void 0)return r.matches(t);if(r.msMatchesSelector!==void 0)return r.msMatchesSelector(t);if(r.webkitMatchesSelector!==void 0)return r.webkitMatchesSelector(t);if(r.mozMatchesSelector!==void 0)return r.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},Iv=function(e){return e.nodeType!==ps&&e.nodeType!==Ov&&e.nodeType!==Pv||e.childElementCount===0},V0=function(e,t){var n=t===void 0?document:t.dom;return Iv(n)?[]:De(n.querySelectorAll(e),k.fromDom)},q0=function(e,t){var n=t===void 0?document:t.dom;return Iv(n)?b.none():b.from(n.querySelector(e)).map(k.fromDom)},Te=function(e,t){return e.dom===t.dom},W0=function(e,t){var n=e.dom,r=t.dom;return n===r?!1:n.contains(r)},j0=function(e,t){return U0(e.dom,t.dom)},Wn=function(e,t){return qt().browser.isIE()?j0(e,t):W0(e,t)};typeof window!="undefined"||Function("return this;")();var je=function(e){var t=e.dom.nodeName;return t.toLowerCase()},$v=function(e){return e.dom.nodeType},Xi=function(e){return function(t){return $v(t)===e}},K0=function(e){return $v(e)===z0||je(e)==="#comment"},Jt=Xi(ps),Wt=Xi(H0),G0=Xi(Ov),X0=Xi(Pv),Y0=function(e){return function(t){return Jt(t)&&je(t)===e}},Lv=function(e){return k.fromDom(e.dom.ownerDocument)},ia=function(e){return G0(e)?e:Lv(e)},Q0=function(e){return k.fromDom(ia(e).dom.documentElement)},Fv=function(e){return k.fromDom(ia(e).dom.defaultView)},en=function(e){return b.from(e.dom.parentNode).map(k.fromDom)},Z0=function(e,t){for(var n=Oe(t)?t:Re,r=e.dom,a=[];r.parentNode!==null&&r.parentNode!==void 0;){var i=r.parentNode,o=k.fromDom(i);if(a.push(o),n(o)===!0)break;r=i}return a},J0=function(e){var t=function(n){return ve(n,function(r){return!Te(e,r)})};return en(e).map(jt).map(t).getOr([])},Er=function(e){return b.from(e.dom.previousSibling).map(k.fromDom)},ei=function(e){return b.from(e.dom.nextSibling).map(k.fromDom)},Mv=function(e){return ji(Dv(e,Er))},Uv=function(e){return Dv(e,ei)},jt=function(e){return De(e.dom.childNodes,k.fromDom)},Yi=function(e,t){var n=e.dom.childNodes;return b.from(n[t]).map(k.fromDom)},zv=function(e){return Yi(e,0)},gs=function(e){return Yi(e,e.dom.childNodes.length-1)},Hv=function(e){return e.dom.childNodes.length},ew=function(e){var t=e.dom.head;if(t==null)throw new Error("Head is not available yet");return k.fromDom(t)},Vv=function(e){return X0(e)&&Ne(e.dom.host)},qv=Oe(Element.prototype.attachShadow)&&Oe(Node.prototype.getRootNode),tw=X(qv),kr=qv?function(e){return k.fromDom(e.dom.getRootNode())}:ia,hs=function(e){return Vv(e)?e:ew(ia(e))},nw=function(e){var t=kr(e);return Vv(t)?b.some(t):b.none()},rw=function(e){return k.fromDom(e.dom.host)},aw=function(e){if(tw()&&Ne(e.target)){var t=k.fromDom(e.target);if(Jt(t)&&iw(t)&&e.composed&&e.composedPath){var n=e.composedPath();if(n)return Pt(n)}}return b.from(e.target)},iw=function(e){return Ne(e.dom.shadowRoot)},tn=function(e,t){var n=en(e);n.each(function(r){r.dom.insertBefore(t.dom,e.dom)})},ti=function(e,t){var n=ei(e);n.fold(function(){var r=en(e);r.each(function(a){at(a,t)})},function(r){tn(r,t)})},Wv=function(e,t){var n=zv(e);n.fold(function(){at(e,t)},function(r){e.dom.insertBefore(t.dom,r.dom)})},at=function(e,t){e.dom.appendChild(t.dom)},ow=function(e,t){tn(e,t),at(t,e)},uw=function(e,t){Y(t,function(n){tn(e,n)})},Qi=function(e,t){Y(t,function(n){at(e,n)})},bs=function(e){e.dom.textContent="",Y(jt(e),function(t){tt(t)})},tt=function(e){var t=e.dom;t.parentNode!==null&&t.parentNode.removeChild(t)},jv=function(e){var t=jt(e);t.length>0&&uw(e,t),tt(e)},ni=function(e){var t=Wt(e)?e.dom.parentNode:e.dom;if(t==null||t.ownerDocument===null)return!1;var n=t.ownerDocument;return nw(k.fromDom(t)).fold(function(){return n.body.contains(t)},Kc(ni,rw))},Kv=function(e,t){var n=function(r,a){return Kv(e+r,t+a)};return{left:e,top:t,translate:n}},oa=Kv,sw=function(e){var t=e.getBoundingClientRect();return oa(t.left,t.top)},Zi=function(e,t){return e!==void 0?e:t!==void 0?t:0},fw=function(e){var t=e.dom.ownerDocument,n=t.body,r=t.defaultView,a=t.documentElement;if(n===e.dom)return oa(n.offsetLeft,n.offsetTop);var i=Zi(r==null?void 0:r.pageYOffset,a.scrollTop),o=Zi(r==null?void 0:r.pageXOffset,a.scrollLeft),u=Zi(a.clientTop,n.clientTop),s=Zi(a.clientLeft,n.clientLeft);return ys(e).translate(o-s,i-u)},ys=function(e){var t=e.dom,n=t.ownerDocument,r=n.body;return r===t?oa(r.offsetLeft,r.offsetTop):ni(e)?sw(t):oa(0,0)},Cs=function(e){var t=e!==void 0?e.dom:document,n=t.body.scrollLeft||t.documentElement.scrollLeft,r=t.body.scrollTop||t.documentElement.scrollTop;return oa(n,r)},Gv=function(e,t,n){var r=n!==void 0?n.dom:document,a=r.defaultView;a&&a.scrollTo(e,t)},Xv=function(e,t){var n=qt().browser.isSafari();n&&Oe(e.dom.scrollIntoViewIfNeeded)?e.dom.scrollIntoViewIfNeeded(!1):e.dom.scrollIntoView(t)},lw=function(e){var t=e===void 0?window:e;return qt().browser.isFirefox()?b.none():b.from(t.visualViewport)},Yv=function(e,t,n,r){return{x:e,y:t,width:n,height:r,right:e+n,bottom:t+r}},Qv=function(e){var t=e===void 0?window:e,n=t.document,r=Cs(k.fromDom(n));return lw(t).fold(function(){var a=t.document.documentElement,i=a.clientWidth,o=a.clientHeight;return Yv(r.left,r.top,i,o)},function(a){return Yv(Math.max(a.pageLeft,r.left),Math.max(a.pageTop,r.top),a.width,a.height)})},ri=function(e){return function(t){return!!t&&t.nodeType===e}},Ji=function(e){return!!e&&!Object.getPrototypeOf(e)},ae=ri(1),Kt=function(e){var t=e.map(function(n){return n.toLowerCase()});return function(n){if(n&&n.nodeName){var r=n.nodeName.toLowerCase();return Je(t,r)}return!1}},eo=function(e,t){var n=t.toLowerCase().split(" ");return function(r){if(ae(r))for(var a=0;a0})},rd=function(e){var t={},n=e.dom;if(ro(n))for(var r=0;r=e.length&&n(r)}};e.length===0?n([]):Y(e,function(o,u){o.get(i(u))})})},Dw=function(e){return _w(e,sd.nu)},fa=function(e){var t=function(c){return fa(e)},n=function(c){return fa(e)},r=function(c){return fa(c(e))},a=function(c){return fa(e)},i=function(c){c(e)},o=function(c){return c(e)},u=function(c,v){return v(e)},s=function(c){return c(e)},f=function(c){return c(e)},l=function(){return b.some(e)};return{isValue:qe,isError:Re,getOr:X(e),getOrThunk:X(e),getOrDie:X(e),or:t,orThunk:n,fold:u,map:r,mapError:a,each:i,bind:o,exists:s,forall:f,toOptional:l}},ii=function(e){var t=function(f){return f()},n=function(){return zC(String(e))()},r=Tt,a=function(f){return f()},i=function(f){return ii(e)},o=function(f){return ii(f(e))},u=function(f){return ii(e)},s=function(f,l){return f(e)};return{isValue:Re,isError:qe,getOr:Tt,getOrThunk:t,getOrDie:n,or:r,orThunk:a,fold:s,map:i,mapError:o,each:le,bind:u,exists:Re,forall:qe,toOptional:b.none}},Ow=function(e,t){return e.fold(function(){return ii(t)},fa)},fd={value:fa,error:ii,fromOption:Ow},Pw=function(e){if(!Vt(e))throw new Error("cases must be an array");if(e.length===0)throw new Error("there must be at least one case");var t=[],n={};return Y(e,function(r,a){var i=ta(r);if(i.length!==1)throw new Error("one and only one name per case");var o=i[0],u=r[o];if(n[o]!==void 0)throw new Error("duplicate key detected:"+o);if(o==="cata")throw new Error("cannot have a case named cata (sorry)");if(!Vt(u))throw new Error("case arguments must be an array");t.push(o),n[o]=function(){for(var s=[],f=0;f-1},bt=function(e,t){for(var n=0,r=e.length;n=0;n--){var r=e[n];t(r,n)}},Yc=function(e,t){for(var n=[],r=[],a=0,i=e.length;a=0&&t=t.length&&e.substr(n,n+t.length)===t},d0=function(e,t){return Sr(e,t)?c0(e,t.length):e},yt=function(e,t){return e.indexOf(t)!==-1},Sr=function(e,t){return v0(e,t,0)},cs=function(e){return function(t){return t.replace(e,"")}},vs=cs(/^\s+|\s+$/g),m0=cs(/^\s+/g),uv=cs(/\s+$/g),Gi=function(e){return e.length>0},sv=function(e){return!Gi(e)},ds=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Pn=function(e){return function(t){return yt(t,e)}},p0=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return yt(e,"edge/")&&yt(e,"chrome")&&yt(e,"safari")&&yt(e,"applewebkit")}},{name:"Chrome",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,ds],search:function(e){return yt(e,"chrome")&&!yt(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return yt(e,"msie")||yt(e,"trident")}},{name:"Opera",versionRegexes:[ds,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Pn("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Pn("firefox")},{name:"Safari",versionRegexes:[ds,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(yt(e,"safari")||yt(e,"mobile/"))&&yt(e,"applewebkit")}}],g0=[{name:"Windows",search:Pn("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return yt(e,"iphone")||yt(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Pn("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:Pn("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Pn("linux"),versionRegexes:[]},{name:"Solaris",search:Pn("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Pn("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Pn("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],fv={browsers:X(p0),oses:X(g0)},lv="Edge",cv="Chrome",vv="IE",dv="Opera",mv="Firefox",pv="Safari",h0=function(){return gv({current:void 0,version:Za.unknown()})},gv=function(e){var t=e.current,n=e.version,r=function(a){return function(){return t===a}};return{current:t,version:n,isEdge:r(lv),isChrome:r(cv),isIE:r(vv),isOpera:r(dv),isFirefox:r(mv),isSafari:r(pv)}},hv={unknown:h0,nu:gv,edge:X(lv),chrome:X(cv),ie:X(vv),opera:X(dv),firefox:X(mv),safari:X(pv)},bv="Windows",yv="iOS",Cv="Android",wv="Linux",Sv="OSX",Ev="Solaris",kv="FreeBSD",xv="ChromeOS",b0=function(){return Nv({current:void 0,version:Za.unknown()})},Nv=function(e){var t=e.current,n=e.version,r=function(a){return function(){return t===a}};return{current:t,version:n,isWindows:r(bv),isiOS:r(yv),isAndroid:r(Cv),isOSX:r(Sv),isLinux:r(wv),isSolaris:r(Ev),isFreeBSD:r(kv),isChromeOS:r(xv)}},Tv={unknown:b0,nu:Nv,windows:X(bv),ios:X(yv),android:X(Cv),linux:X(wv),osx:X(Sv),solaris:X(Ev),freebsd:X(kv),chromeos:X(xv)},y0=function(e,t,n){var r=fv.browsers(),a=fv.oses(),i=t.bind(function(s){return s0(r,s)}).orThunk(function(){return f0(r,e)}).fold(hv.unknown,hv.nu),o=l0(a,e).fold(Tv.unknown,Tv.nu),u=a0(o,i,e,n);return{browser:i,os:o,deviceType:u}},C0={detect:y0},w0=function(e){return window.matchMedia(e).matches},S0=fs(function(){return C0.detect(navigator.userAgent,b.from(navigator.userAgentData),w0)}),qt=function(){return S0()},Av=navigator.userAgent,ms=qt(),Ct=ms.browser,It=ms.os,pn=ms.deviceType,E0=/WebKit/.test(Av)&&!Ct.isEdge(),k0="FormData"in window&&"FileReader"in window&&"URL"in window&&!!URL.createObjectURL,x0=Av.indexOf("Windows Phone")!==-1,se={opera:Ct.isOpera(),webkit:E0,ie:Ct.isIE()||Ct.isEdge()?Ct.version.major:!1,gecko:Ct.isFirefox(),mac:It.isOSX()||It.isiOS(),iOS:pn.isiPad()||pn.isiPhone(),android:It.isAndroid(),contentEditable:!0,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:!0,range:window.getSelection&&"Range"in window,documentMode:Ct.isIE()?document.documentMode||7:10,fileApi:k0,ceFalse:!0,cacheSuffix:null,container:null,experimentalShadowDom:!1,canHaveCSP:!Ct.isIE(),desktop:pn.isDesktop(),windowsPhone:x0,browser:{current:Ct.current,version:Ct.version,isChrome:Ct.isChrome,isEdge:Ct.isEdge,isFirefox:Ct.isFirefox,isIE:Ct.isIE,isOpera:Ct.isOpera,isSafari:Ct.isSafari},os:{current:It.current,version:It.version,isAndroid:It.isAndroid,isChromeOS:It.isChromeOS,isFreeBSD:It.isFreeBSD,isiOS:It.isiOS,isLinux:It.isLinux,isOSX:It.isOSX,isSolaris:It.isSolaris,isWindows:It.isWindows},deviceType:{isDesktop:pn.isDesktop,isiPad:pn.isiPad,isiPhone:pn.isiPhone,isPhone:pn.isPhone,isTablet:pn.isTablet,isTouch:pn.isTouch,isWebView:pn.isWebView}},N0=/^\s*|\s*$/g,Rv=function(e){return e==null?"":(""+e).replace(N0,"")},Bv=function(e,t){return t?t==="array"&&us(e)?!0:typeof e===t:e!==void 0},T0=function(e,t,n){var r;for(e=e||[],t=t||",",typeof e=="string"&&(e=e.split(t)),n=n||{},r=e.length;r--;)n[e[r]]={};return n},A0=de,R0=function(e,t,n){var r=this,a,i,o,u=0;e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e);var s=e[3].match(/(^|\.)(\w+)$/i)[2],f=r.createNS(e[3].replace(/\.\w+$/,""),n);if(!f[s]){if(e[2]==="static"){f[s]=t,this.onCreate&&this.onCreate(e[2],e[3],f[s]);return}t[s]||(t[s]=function(){},u=1),f[s]=t[s],r.extend(f[s].prototype,t),e[5]&&(a=r.resolve(e[5]).prototype,i=e[5].match(/\.(\w+)$/i)[1],o=f[s],u?f[s]=function(){return a[i].apply(this,arguments)}:f[s]=function(){return this.parent=a[i],o.apply(this,arguments)},f[s].prototype[s]=f[s],r.each(a,function(l,c){f[s].prototype[c]=a[c]}),r.each(t,function(l,c){a[c]?f[s].prototype[c]=function(){return this.parent=a[c],l.apply(this,arguments)}:c!==s&&(f[s].prototype[c]=l)})),r.each(t.static,function(l,c){f[s][c]=l})}},B0=function(e){for(var t=[],n=1;n1)throw console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return Ja(r.childNodes[0])},$0=function(e,t){var n=t||document,r=n.createElement(e);return Ja(r)},L0=function(e,t){var n=t||document,r=n.createTextNode(e);return Ja(r)},Ja=function(e){if(e==null)throw new Error("Node cannot be null or undefined");return{dom:e}},F0=function(e,t,n){return b.from(e.dom.elementFromPoint(t,n)).map(Ja)},k={fromHtml:I0,fromTag:$0,fromText:L0,fromDom:Ja,fromPoint:F0},Dv=function(e,t){var n=[],r=function(i){return n.push(i),t(i)},a=t(e);do a=a.bind(r);while(a.isSome());return n},M0=function(e,t,n){return(e.compareDocumentPosition(t)&n)!==0},U0=function(e,t){return M0(e,t,Node.DOCUMENT_POSITION_CONTAINED_BY)},z0=8,Ov=9,Pv=11,ps=1,H0=3,aa=function(e,t){var n=e.dom;if(n.nodeType!==ps)return!1;var r=n;if(r.matches!==void 0)return r.matches(t);if(r.msMatchesSelector!==void 0)return r.msMatchesSelector(t);if(r.webkitMatchesSelector!==void 0)return r.webkitMatchesSelector(t);if(r.mozMatchesSelector!==void 0)return r.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")},Iv=function(e){return e.nodeType!==ps&&e.nodeType!==Ov&&e.nodeType!==Pv||e.childElementCount===0},V0=function(e,t){var n=t===void 0?document:t.dom;return Iv(n)?[]:De(n.querySelectorAll(e),k.fromDom)},q0=function(e,t){var n=t===void 0?document:t.dom;return Iv(n)?b.none():b.from(n.querySelector(e)).map(k.fromDom)},Te=function(e,t){return e.dom===t.dom},W0=function(e,t){var n=e.dom,r=t.dom;return n===r?!1:n.contains(r)},j0=function(e,t){return U0(e.dom,t.dom)},Wn=function(e,t){return qt().browser.isIE()?j0(e,t):W0(e,t)};typeof window!="undefined"||Function("return this;")();var je=function(e){var t=e.dom.nodeName;return t.toLowerCase()},$v=function(e){return e.dom.nodeType},Xi=function(e){return function(t){return $v(t)===e}},K0=function(e){return $v(e)===z0||je(e)==="#comment"},Jt=Xi(ps),Wt=Xi(H0),G0=Xi(Ov),X0=Xi(Pv),Y0=function(e){return function(t){return Jt(t)&&je(t)===e}},Lv=function(e){return k.fromDom(e.dom.ownerDocument)},ia=function(e){return G0(e)?e:Lv(e)},Q0=function(e){return k.fromDom(ia(e).dom.documentElement)},Fv=function(e){return k.fromDom(ia(e).dom.defaultView)},en=function(e){return b.from(e.dom.parentNode).map(k.fromDom)},Z0=function(e,t){for(var n=Oe(t)?t:Re,r=e.dom,a=[];r.parentNode!==null&&r.parentNode!==void 0;){var i=r.parentNode,o=k.fromDom(i);if(a.push(o),n(o)===!0)break;r=i}return a},J0=function(e){var t=function(n){return ve(n,function(r){return!Te(e,r)})};return en(e).map(jt).map(t).getOr([])},Er=function(e){return b.from(e.dom.previousSibling).map(k.fromDom)},ei=function(e){return b.from(e.dom.nextSibling).map(k.fromDom)},Mv=function(e){return ji(Dv(e,Er))},Uv=function(e){return Dv(e,ei)},jt=function(e){return De(e.dom.childNodes,k.fromDom)},Yi=function(e,t){var n=e.dom.childNodes;return b.from(n[t]).map(k.fromDom)},zv=function(e){return Yi(e,0)},gs=function(e){return Yi(e,e.dom.childNodes.length-1)},Hv=function(e){return e.dom.childNodes.length},ew=function(e){var t=e.dom.head;if(t==null)throw new Error("Head is not available yet");return k.fromDom(t)},Vv=function(e){return X0(e)&&Ne(e.dom.host)},qv=Oe(Element.prototype.attachShadow)&&Oe(Node.prototype.getRootNode),tw=X(qv),kr=qv?function(e){return k.fromDom(e.dom.getRootNode())}:ia,hs=function(e){return Vv(e)?e:ew(ia(e))},nw=function(e){var t=kr(e);return Vv(t)?b.some(t):b.none()},rw=function(e){return k.fromDom(e.dom.host)},aw=function(e){if(tw()&&Ne(e.target)){var t=k.fromDom(e.target);if(Jt(t)&&iw(t)&&e.composed&&e.composedPath){var n=e.composedPath();if(n)return Pt(n)}}return b.from(e.target)},iw=function(e){return Ne(e.dom.shadowRoot)},tn=function(e,t){var n=en(e);n.each(function(r){r.dom.insertBefore(t.dom,e.dom)})},ti=function(e,t){var n=ei(e);n.fold(function(){var r=en(e);r.each(function(a){at(a,t)})},function(r){tn(r,t)})},Wv=function(e,t){var n=zv(e);n.fold(function(){at(e,t)},function(r){e.dom.insertBefore(t.dom,r.dom)})},at=function(e,t){e.dom.appendChild(t.dom)},ow=function(e,t){tn(e,t),at(t,e)},uw=function(e,t){Y(t,function(n){tn(e,n)})},Qi=function(e,t){Y(t,function(n){at(e,n)})},bs=function(e){e.dom.textContent="",Y(jt(e),function(t){tt(t)})},tt=function(e){var t=e.dom;t.parentNode!==null&&t.parentNode.removeChild(t)},jv=function(e){var t=jt(e);t.length>0&&uw(e,t),tt(e)},ni=function(e){var t=Wt(e)?e.dom.parentNode:e.dom;if(t==null||t.ownerDocument===null)return!1;var n=t.ownerDocument;return nw(k.fromDom(t)).fold(function(){return n.body.contains(t)},Kc(ni,rw))},Kv=function(e,t){var n=function(r,a){return Kv(e+r,t+a)};return{left:e,top:t,translate:n}},oa=Kv,sw=function(e){var t=e.getBoundingClientRect();return oa(t.left,t.top)},Zi=function(e,t){return e!==void 0?e:t!==void 0?t:0},fw=function(e){var t=e.dom.ownerDocument,n=t.body,r=t.defaultView,a=t.documentElement;if(n===e.dom)return oa(n.offsetLeft,n.offsetTop);var i=Zi(r==null?void 0:r.pageYOffset,a.scrollTop),o=Zi(r==null?void 0:r.pageXOffset,a.scrollLeft),u=Zi(a.clientTop,n.clientTop),s=Zi(a.clientLeft,n.clientLeft);return ys(e).translate(o-s,i-u)},ys=function(e){var t=e.dom,n=t.ownerDocument,r=n.body;return r===t?oa(r.offsetLeft,r.offsetTop):ni(e)?sw(t):oa(0,0)},Cs=function(e){var t=e!==void 0?e.dom:document,n=t.body.scrollLeft||t.documentElement.scrollLeft,r=t.body.scrollTop||t.documentElement.scrollTop;return oa(n,r)},Gv=function(e,t,n){var r=n!==void 0?n.dom:document,a=r.defaultView;a&&a.scrollTo(e,t)},Xv=function(e,t){var n=qt().browser.isSafari();n&&Oe(e.dom.scrollIntoViewIfNeeded)?e.dom.scrollIntoViewIfNeeded(!1):e.dom.scrollIntoView(t)},lw=function(e){var t=e===void 0?window:e;return qt().browser.isFirefox()?b.none():b.from(t.visualViewport)},Yv=function(e,t,n,r){return{x:e,y:t,width:n,height:r,right:e+n,bottom:t+r}},Qv=function(e){var t=e===void 0?window:e,n=t.document,r=Cs(k.fromDom(n));return lw(t).fold(function(){var a=t.document.documentElement,i=a.clientWidth,o=a.clientHeight;return Yv(r.left,r.top,i,o)},function(a){return Yv(Math.max(a.pageLeft,r.left),Math.max(a.pageTop,r.top),a.width,a.height)})},ri=function(e){return function(t){return!!t&&t.nodeType===e}},Ji=function(e){return!!e&&!Object.getPrototypeOf(e)},ae=ri(1),Kt=function(e){var t=e.map(function(n){return n.toLowerCase()});return function(n){if(n&&n.nodeName){var r=n.nodeName.toLowerCase();return Je(t,r)}return!1}},eo=function(e,t){var n=t.toLowerCase().split(" ");return function(r){if(ae(r))for(var a=0;a0})},rd=function(e){var t={},n=e.dom;if(ro(n))for(var r=0;r=e.length&&n(r)}};e.length===0?n([]):Y(e,function(o,u){o.get(i(u))})})},Dw=function(e){return _w(e,sd.nu)},fa=function(e){var t=function(c){return fa(e)},n=function(c){return fa(e)},r=function(c){return fa(c(e))},a=function(c){return fa(e)},i=function(c){c(e)},o=function(c){return c(e)},u=function(c,v){return v(e)},s=function(c){return c(e)},f=function(c){return c(e)},l=function(){return b.some(e)};return{isValue:qe,isError:Re,getOr:X(e),getOrThunk:X(e),getOrDie:X(e),or:t,orThunk:n,fold:u,map:r,mapError:a,each:i,bind:o,exists:s,forall:f,toOptional:l}},ii=function(e){var t=function(f){return f()},n=function(){return zC(String(e))()},r=Tt,a=function(f){return f()},i=function(f){return ii(e)},o=function(f){return ii(f(e))},u=function(f){return ii(e)},s=function(f,l){return f(e)};return{isValue:Re,isError:qe,getOr:Tt,getOrThunk:t,getOrDie:n,or:r,orThunk:a,fold:s,map:i,mapError:o,each:le,bind:u,exists:Re,forall:qe,toOptional:b.none}},Ow=function(e,t){return e.fold(function(){return ii(t)},fa)},fd={value:fa,error:ii,fromOption:Ow},Pw=function(e){if(!Vt(e))throw new Error("cases must be an array");if(e.length===0)throw new Error("there must be at least one case");var t=[],n={};return Y(e,function(r,a){var i=ta(r);if(i.length!==1)throw new Error("one and only one name per case");var o=i[0],u=r[o];if(n[o]!==void 0)throw new Error("duplicate key detected:"+o);if(o==="cata")throw new Error("cannot have a case named cata (sorry)");if(!Vt(u))throw new Error("case arguments must be an array");t.push(o),n[o]=function(){for(var s=[],f=0;f0?h(S.fail.map(ld)):y(S.pass.map(ld))})},m=function(g){var y=B._addCacheSuffix(g);We(r,y).each(function(h){var E=--h.count;E===0&&(delete r[y],f(h.id))})},p=function(g){Y(g,function(y){m(y)})};return{load:c,loadAll:d,unload:m,unloadAll:p,_setReferrerPolicy:u}},Uw=function(){var e=new WeakMap,t=function(n,r){var a=kr(n),i=a.dom;return b.from(e.get(i)).getOrThunk(function(){var o=md(i,r);return e.set(i,o),o})};return{forElement:t}},pd=Uw(),Ge=function(){function e(t,n){this.node=t,this.rootNode=n,this.current=this.current.bind(this),this.next=this.next.bind(this),this.prev=this.prev.bind(this),this.prev2=this.prev2.bind(this)}return e.prototype.current=function(){return this.node},e.prototype.next=function(t){return this.node=this.findSibling(this.node,"firstChild","nextSibling",t),this.node},e.prototype.prev=function(t){return this.node=this.findSibling(this.node,"lastChild","previousSibling",t),this.node},e.prototype.prev2=function(t){return this.node=this.findPreviousNode(this.node,"lastChild","previousSibling",t),this.node},e.prototype.findSibling=function(t,n,r,a){var i,o;if(t){if(!a&&t[n])return t[n];if(t!==this.rootNode){if(i=t[r],i)return i;for(o=t.parentNode;o&&o!==this.rootNode;o=o.parentNode)if(i=o[r],i)return i}}},e.prototype.findPreviousNode=function(t,n,r,a){var i,o,u;if(t){if(i=t[r],this.rootNode&&i===this.rootNode)return;if(i){if(!a){for(u=i[n];u;u=u[n])if(!u[n])return u}return i}if(o=t.parentNode,o&&o!==this.rootNode)return o}},e}(),zw=["article","aside","details","div","dt","figcaption","footer","form","fieldset","header","hgroup","html","main","nav","section","summary","body","p","dl","multicol","dd","figure","address","center","blockquote","h1","h2","h3","h4","h5","h6","listing","xmp","pre","plaintext","menu","dir","ul","ol","li","hr","table","tbody","thead","tfoot","th","tr","td","caption"],Hw=["td","th"],Vw=["thead","tbody","tfoot"],qw=["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"],Ww=["h1","h2","h3","h4","h5","h6"],jw=["li","dd","dt"],Kw=["ul","ol","dl"],Gw=["pre","script","textarea","style"],Xn=function(e){var t;return function(n){return t=t||XC(e,qe),de(t,je(n))}},Xw=Xn(Ww),bn=Xn(zw),Yw=function(e){return je(e)==="table"},Bs=function(e){return Jt(e)&&!bn(e)},la=function(e){return Jt(e)&&je(e)==="br"},gd=Xn(qw),_s=Xn(Kw),ui=Xn(jw),Qw=Xn(Vw),uo=Xn(Hw),so=Xn(Gw),Zw=function(e,t,n){return io(e,t,n).isSome()},Ds="\uFEFF",At="\xA0",Jw=function(e){return e===Ds},eS=function(e){return e.replace(/\uFEFF/g,"")},nt=Ds,fo=Jw,Yn=eS,tS=ae,ca=Q,va=function(e){return ca(e)&&(e=e.parentNode),tS(e)&&e.hasAttribute("data-mce-caret")},da=function(e){return ca(e)&&fo(e.data)},$t=function(e){return va(e)||da(e)},hd=function(e){return e.firstChild!==e.lastChild||!Le(e.firstChild)},nS=function(e,t){var n=e.ownerDocument,r=n.createTextNode(nt),a=e.parentNode;if(t){var i=e.previousSibling;if(ca(i)){if($t(i))return i;if(co(i))return i.splitText(i.data.length-1)}a.insertBefore(r,e)}else{var i=e.nextSibling;if(ca(i)){if($t(i))return i;if(lo(i))return i.splitText(1),i}e.nextSibling?a.insertBefore(r,e.nextSibling):a.appendChild(r)}return r},Os=function(e){var t=e.container();return Q(t)?t.data.charAt(e.offset())===nt||e.isAtStart()&&da(t.previousSibling):!1},Ps=function(e){var t=e.container();return Q(t)?t.data.charAt(e.offset()-1)===nt||e.isAtEnd()&&da(t.nextSibling):!1},rS=function(){var e=document.createElement("br");return e.setAttribute("data-mce-bogus","1"),e},aS=function(e,t,n){var r=t.ownerDocument,a=r.createElement(e);a.setAttribute("data-mce-caret",n?"before":"after"),a.setAttribute("data-mce-bogus","all"),a.appendChild(rS());var i=t.parentNode;return n?i.insertBefore(a,t):t.nextSibling?i.insertBefore(a,t.nextSibling):i.appendChild(a),a},lo=function(e){return ca(e)&&e.data[0]===nt},co=function(e){return ca(e)&&e.data[e.data.length-1]===nt},iS=function(e){var t=e.getElementsByTagName("br"),n=t[t.length-1];xr(n)&&n.parentNode.removeChild(n)},Is=function(e){return e&&e.hasAttribute("data-mce-caret")?(iS(e),e.removeAttribute("data-mce-caret"),e.removeAttribute("data-mce-bogus"),e.removeAttribute("style"),e.removeAttribute("_moz_abspos"),e):null},bd=function(e){return va(e.startContainer)},yd=gn,oS=_e,uS=Le,sS=Q,fS=Kt(["script","style","textarea"]),Cd=Kt(["img","input","textarea","hr","iframe","video","audio","object","embed"]),lS=Kt(["table"]),cS=$t,yn=function(e){return cS(e)?!1:sS(e)?!fS(e.parentNode):Cd(e)||uS(e)||lS(e)||$s(e)},vS=function(e){return ae(e)&&e.getAttribute("unselectable")==="true"},$s=function(e){return vS(e)===!1&&oS(e)},dS=function(e,t){for(e=e.parentNode;e&&e!==t;e=e.parentNode){if($s(e))return!1;if(yd(e))return!0}return!0},mS=function(e){return $s(e)?Zt(mn(e.getElementsByTagName("*")),function(t,n){return t||yd(n)},!1)!==!0:!1},pS=function(e){return Cd(e)||mS(e)},vo=function(e,t){return yn(e)&&dS(e,t)},gS=/^[ \t\r\n]*$/,Nr=function(e){return gS.test(e)},hS=function(e,t){var n=k.fromDom(t),r=k.fromDom(e);return Zw(r,"pre,code",G(Te,n))},bS=function(e,t){return Q(e)&&Nr(e.data)&&hS(e,t)===!1},yS=function(e){return ae(e)&&e.nodeName==="A"&&!e.hasAttribute("href")&&(e.hasAttribute("name")||e.hasAttribute("id"))},mo=function(e,t){return yn(e)&&bS(e,t)===!1||yS(e)||CS(e)},CS=Zv("data-mce-bookmark"),wS=Zv("data-mce-bogus"),SS=cw("data-mce-bogus","all"),ES=function(e,t){var n=0;if(mo(e,e))return!1;var r=e.firstChild;if(!r)return!0;var a=new Ge(r,e);do{if(t){if(SS(r)){r=a.next(!0);continue}if(wS(r)){r=a.next();continue}}if(Le(r)){n++,r=a.next();continue}if(mo(r,e))return!1;r=a.next()}while(r);return n<=1},Xe=function(e,t){return t===void 0&&(t=!0),ES(e.dom,t)},kS=function(e){return e.nodeName.toLowerCase()==="span"},wd=function(e,t){return Ne(e)&&(mo(e,t)||Bs(k.fromDom(e)))},xS=function(e,t){var n=new Ge(e,t).prev(!1),r=new Ge(e,t).next(!1),a=Nt(n)||wd(n,t),i=Nt(r)||wd(r,t);return a&&i},Sd=function(e){return kS(e)&&e.getAttribute("data-mce-type")==="bookmark"},NS=function(e,t){return Q(e)&&e.data.length>0&&xS(e,t)},TS=function(e){return ae(e)?e.childNodes.length>0:!1},AS=function(e){return Es(e)||Ss(e)},Ls=function(e,t,n){var r=n||t;if(ae(t)&&Sd(t))return t;for(var a=t.childNodes,i=a.length-1;i>=0;i--)Ls(e,a[i],r);if(ae(t)){var o=t.childNodes;o.length===1&&Sd(o[0])&&t.parentNode.insertBefore(o[0],t)}return!AS(t)&&!mo(t,r)&&!TS(t)&&!NS(t,r)&&e.remove(t),t},RS=B.makeMap,po=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,go=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,BS=/[<>&\"\']/g,_S=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,DS={128:"\u20AC",130:"\u201A",131:"\u0192",132:"\u201E",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02C6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017D",145:"\u2018",146:"\u2019",147:"\u201C",148:"\u201D",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02DC",153:"\u2122",154:"\u0161",155:"\u203A",156:"\u0153",158:"\u017E",159:"\u0178"},Tr={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},OS={"<":"<",">":">","&":"&",""":'"',"'":"'"},PS=function(e){var t=k.fromTag("div").dom;return t.innerHTML=e,t.textContent||t.innerText||e},Ed=function(e,t){var n,r,a,i={};if(e){for(e=e.split(","),t=t||10,n=0;n1?"&#"+((n.charCodeAt(0)-55296)*1024+(n.charCodeAt(1)-56320)+65536)+";":Tr[n]||"&#"+n.charCodeAt(0)+";"})},Ms=function(e,t,n){return n=n||Fs,e.replace(t?po:go,function(r){return Tr[r]||n[r]||r})},$S=function(e,t){var n=Ed(t)||Fs,r=function(o,u){return o.replace(u?po:go,function(s){return Tr[s]!==void 0?Tr[s]:n[s]!==void 0?n[s]:s.length>1?"&#"+((s.charCodeAt(0)-55296)*1024+(s.charCodeAt(1)-56320)+65536)+";":"&#"+s.charCodeAt(0)+";"})},a=function(o,u){return Ms(o,u,n)},i=RS(e.replace(/\+/g,","));return i.named&&i.numeric?r:i.named?t?a:Ms:i.numeric?xd:kd},LS=function(e){return e.replace(_S,function(t,n){return n?(n.charAt(0).toLowerCase()==="x"?n=parseInt(n.substr(1),16):n=parseInt(n,10),n>65535?(n-=65536,String.fromCharCode(55296+(n>>10),56320+(n&1023))):DS[n]||String.fromCharCode(n)):OS[t]||Fs[t]||PS(t)})},Qn={encodeRaw:kd,encodeAllRaw:IS,encodeNumeric:xd,encodeNamed:Ms,getEncodeFunc:$S,decode:LS},Zn={},FS={},ma=B.makeMap,ut=B.each,Us=B.extend,Nd=B.explode,MS=B.inArray,rt=function(e,t){return e=B.trim(e),e?e.split(t||" "):[]},Td=function(e,t){var n=ma(e," ",ma(e.toUpperCase()," "));return Us(n,t)},Ad=function(e){return Td("td th li dt dd figcaption caption details summary",e.getTextBlockElements())},US=function(e){var t={},n,r,a,i,o,u,s=function(l,c,v){var d,m,p,g=function(h,E){var S={},C,x;for(C=0,x=h.length;C
");return tn(n.element,r),Up(r,function(){return tt(r)})},pN=function(e){return Up(k.fromDom(e),le)},zp=function(e,t,n,r){hN(e,function(a,i){return gN(e,t,n,r)},n)},Hp=function(e,t,n,r,a){var i={elm:r.element.dom,alignToTop:a};if(!cN(e,i)){var o=Cs(t).top;n(t,o,r,a),vN(e,i)}},gN=function(e,t,n,r){var a=k.fromDom(e.getBody()),i=k.fromDom(e.getDoc());Sw(a);var o=mN(k.fromDom(n.startContainer),n.startOffset);Hp(e,i,t,o,r),o.cleanup()},Vp=function(e,t,n,r){var a=k.fromDom(e.getDoc());Hp(e,a,n,pN(t),r)},hN=function(e,t,n){var r=n.startContainer,a=n.startOffset,i=n.endContainer,o=n.endOffset;t(k.fromDom(r),k.fromDom(i));var u=e.dom.createRng();u.setStart(r,a),u.setEnd(i,o),e.selection.setRng(n)},Qf=function(e,t,n,r){var a=e.pos;if(n)Gv(a.left,a.top,r);else{var i=a.top-t+e.height;Gv(a.left,i,r)}},qp=function(e,t,n,r,a){var i=n+t,o=r.pos.top,u=r.bottom,s=u-o>=n;if(oi){var f=s?a!==!1:a===!0;Qf(r,n,f,e)}else u>i&&!s&&Qf(r,n,a===!0,e)},Wp=function(e,t,n,r){var a=e.dom.defaultView.innerHeight;qp(e,t,a,n,r)},jp=function(e,t,n,r){var a=e.dom.defaultView.innerHeight;qp(e,t,a,n,r);var i=lN(n.element),o=Qv(window);i.topo.bottom&&Xv(n.element,r===!0)},bN=function(e,t,n){return zp(e,Wp,t,n)},yN=function(e,t,n){return Vp(e,t,Wp,n)},CN=function(e,t,n){return zp(e,jp,t,n)},wN=function(e,t,n){return Vp(e,t,jp,n)},SN=function(e,t,n){var r=e.inline?yN:wN;r(e,t,n)},Ri=function(e,t,n){var r=e.inline?bN:CN;r(e,t,n)},EN=function(){return k.fromDom(document)},kN=function(e){return e.dom.focus()},Kp=function(e){var t=kr(e).dom;return e.dom===t.activeElement},Zf=function(e){return e===void 0&&(e=EN()),b.from(e.dom.activeElement).map(k.fromDom)},xN=function(e){return Zf(kr(e)).filter(function(t){return e.dom.contains(t.dom)})},NN=function(e,t,n,r){return{start:e,soffset:t,finish:n,foffset:r}},TN={create:NN},Jf=Gn.generate([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),AN=function(e,t,n,r){return e.fold(t,n,r)},RN=function(e){return e.fold(Tt,Tt,Tt)},BN=Jf.before,_N=Jf.on,DN=Jf.after,ON={before:BN,on:_N,after:DN,cata:AN,getStart:RN},Ko=Gn.generate([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),PN=function(e){return Ko.exact(e.start,e.soffset,e.finish,e.foffset)},IN=function(e){return e.match({domRange:function(t){return k.fromDom(t.startContainer)},relative:function(t,n){return ON.getStart(t)},exact:function(t,n,r,a){return t}})},$N=Ko.domRange,LN=Ko.relative,FN=Ko.exact,MN=function(e){var t=IN(e);return Fv(t)},UN=TN.create,Gp={domRange:$N,relative:LN,exact:FN,exactFromRange:PN,getWin:MN,range:UN},zN=qt().browser,Xp=function(e,t){var n=Wt(t)?Vf(t).length:jt(t).length+1;return e>n?n:e<0?0:e},HN=function(e){return Gp.range(e.start,Xp(e.soffset,e.start),e.finish,Xp(e.foffset,e.finish))},Yp=function(e,t){return!Ji(t.dom)&&(Wn(e,t)||Te(e,t))},el=function(e){return function(t){return Yp(e,t.start)&&Yp(e,t.finish)}},Qp=function(e){return e.inline===!0||zN.isIE()},Zp=function(e){return Gp.range(k.fromDom(e.startContainer),e.startOffset,k.fromDom(e.endContainer),e.endOffset)},VN=function(e){var t=e.getSelection(),n=!t||t.rangeCount===0?b.none():b.from(t.getRangeAt(0));return n.map(Zp)},qN=function(e){var t=Fv(e);return VN(t.dom).filter(el(e))},WN=function(e,t){return b.from(t).filter(el(e)).map(HN)},jN=function(e){var t=document.createRange();try{return t.setStart(e.start.dom,e.soffset),t.setEnd(e.finish.dom,e.foffset),b.some(t)}catch{return b.none()}},Go=function(e){var t=Qp(e)?qN(k.fromDom(e.getBody())):b.none();e.bookmark=t.isSome()?t:e.bookmark},KN=function(e,t){var n=k.fromDom(e.getBody()),r=Qp(e)?b.from(t):b.none(),a=r.map(Zp).filter(el(n));e.bookmark=a.isSome()?a:e.bookmark},tl=function(e){var t=e.bookmark?e.bookmark:b.none();return t.bind(function(n){return WN(k.fromDom(e.getBody()),n)}).bind(jN)},GN=function(e){tl(e).each(function(t){return e.selection.setRng(t)})},XN=function(e){var t=e.className.toString();return t.indexOf("tox-")!==-1||t.indexOf("mce-")!==-1},Jp={isEditorUIElement:XN},YN=function(e){return e.type==="nodechange"&&e.selectionChange},QN=function(e,t){var n=function(){t.throttle()};xe.DOM.bind(document,"mouseup",n),e.on("remove",function(){xe.DOM.unbind(document,"mouseup",n)})},ZN=function(e){e.on("focusout",function(){Go(e)})},JN=function(e,t){e.on("mouseup touchend",function(n){t.throttle()})},eT=function(e,t){var n=qt().browser;n.isIE()?ZN(e):JN(e,t),e.on("keyup NodeChange",function(r){YN(r)||Go(e)})},tT=function(e){var t=cf(function(){Go(e)},0);e.on("init",function(){e.inline&&QN(e,t),eT(e,t)}),e.on("remove",function(){t.cancel()})},Bi,nl=xe.DOM,nT=function(e){return Jp.isEditorUIElement(e)},rT=function(e){var t=e.classList;return t!==void 0?t.contains("tox-edit-area")||t.contains("tox-edit-area__iframe")||t.contains("mce-content-body"):!1},Xo=function(e,t){var n=fx(e),r=nl.getParent(t,function(a){return nT(a)||(n?e.dom.is(a,n):!1)});return r!==null},aT=function(e){try{var t=kr(k.fromDom(e.getElement()));return Zf(t).fold(function(){return document.body},function(n){return n.dom})}catch{return document.body}},iT=function(e,t){var n=t.editor;tT(n),n.on("focusin",function(){var r=e.focusedEditor;r!==n&&(r&&r.fire("blur",{focusedEditor:n}),e.setActive(n),e.focusedEditor=n,n.fire("focus",{blurredEditor:r}),n.focus(!0))}),n.on("focusout",function(){ot.setEditorTimeout(n,function(){var r=e.focusedEditor;!Xo(n,aT(n))&&r===n&&(n.fire("blur",{focusedEditor:null}),e.focusedEditor=null)})}),Bi||(Bi=function(r){var a=e.activeEditor;a&&aw(r).each(function(i){i.ownerDocument===document&&i!==document.body&&!Xo(a,i)&&e.focusedEditor===a&&(a.fire("blur",{focusedEditor:null}),e.focusedEditor=null)})},nl.bind(document,"focusin",Bi))},oT=function(e,t){e.focusedEditor===t.editor&&(e.focusedEditor=null),e.activeEditor||(nl.unbind(document,"focusin",Bi),Bi=null)},uT=function(e){e.on("AddEditor",G(iT,e)),e.on("RemoveEditor",G(oT,e))},sT=function(e,t){return e.dom.getParent(t,function(n){return e.dom.getContentEditable(n)==="true"})},fT=function(e){return e.collapsed?b.from(ur(e.startContainer,e.startOffset)).map(k.fromDom):b.none()},lT=function(e,t){return fT(t).bind(function(n){return Qw(n)?b.some(n):Wn(e,n)===!1?b.some(e):b.none()})},eg=function(e,t){lT(k.fromDom(e.getBody()),t).bind(function(n){return wt(n.dom)}).fold(function(){e.selection.normalize()},function(n){return e.selection.setRng(n.toRange())})},rl=function(e){if(e.setActive)try{e.setActive()}catch{e.focus()}else e.focus()},cT=function(e){return Kp(e)||xN(e).isSome()},vT=function(e){return e.iframeElement&&Kp(k.fromDom(e.iframeElement))},dT=function(e){var t=e.getBody();return t&&cT(k.fromDom(t))},mT=function(e){var t=kr(k.fromDom(e.getElement()));return Zf(t).filter(function(n){return!rT(n.dom)&&Xo(e,n.dom)}).isSome()},Lr=function(e){return e.inline?dT(e):vT(e)},pT=function(e){return Lr(e)||mT(e)},gT=function(e){var t=e.selection,n=e.getBody(),r=t.getRng();e.quirks.refreshContentEditable(),e.bookmark!==void 0&&Lr(e)===!1&&tl(e).each(function(i){e.selection.setRng(i),r=i});var a=sT(e,t.getNode());if(e.$.contains(n,a)){rl(a),eg(e,r),al(e);return}e.inline||(se.opera||rl(n),e.getWin().focus()),(se.gecko||e.inline)&&(rl(n),eg(e,r)),al(e)},al=function(e){return e.editorManager.setActive(e)},hT=function(e,t){e.removed||(t?al(e):gT(e))},tg=function(e,t,n,r,a){var i=n?t.startContainer:t.endContainer,o=n?t.startOffset:t.endOffset;return b.from(i).map(k.fromDom).map(function(u){return!r||!t.collapsed?Yi(u,a(u,o)).getOr(u):u}).bind(function(u){return Jt(u)?b.some(u):en(u).filter(Jt)}).map(function(u){return u.dom}).getOr(e)},ng=function(e,t,n){return tg(e,t,!0,n,function(r,a){return Math.min(Hv(r),a)})},rg=function(e,t,n){return tg(e,t,!1,n,function(r,a){return a>0?a-1:a})},ag=function(e,t){for(var n=e;e&&Q(e)&&e.length===0;)e=t?e.nextSibling:e.previousSibling;return e||n},bT=function(e,t){var n,r,a;if(!t)return e;r=t.startContainer,a=t.endContainer;var i=t.startOffset,o=t.endOffset;return n=t.commonAncestorContainer,!t.collapsed&&(r===a&&o-i<2&&r.hasChildNodes()&&(n=r.childNodes[i]),r.nodeType===3&&a.nodeType===3&&(r.length===i?r=ag(r.nextSibling,!0):r=r.parentNode,o===0?a=ag(a.previousSibling,!1):a=a.parentNode,r&&r===a))?r:n&&n.nodeType===3?n.parentNode:n},yT=function(e,t,n,r){var a,i=[],o=e.getRoot();if(n=e.getParent(n||ng(o,t,t.collapsed),e.isBlock),r=e.getParent(r||rg(o,t,t.collapsed),e.isBlock),n&&n!==o&&i.push(n),n&&r&&n!==r){a=n;for(var u=new Ge(n,o);(a=u.next())&&a!==r;)e.isBlock(a)&&i.push(a)}return r&&n!==r&&r!==o&&i.push(r),i},CT=function(e,t,n){return b.from(t).map(function(r){var a=e.nodeIndex(r),i=e.createRng();return i.setStart(r.parentNode,a),i.setEnd(r.parentNode,a+1),n&&(Uf(e,i,r,!0),Uf(e,i,r,!1)),i})},il=function(e,t){return De(t,function(n){var r=e.fire("GetSelectionRange",{range:n});return r.range!==n?r.range:n})},wT={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},Yo=function(e,t,n){var r=n?"lastChild":"firstChild",a=n?"prev":"next";if(e[r])return e[r];if(e!==t){var i=e[a];if(i)return i;for(var o=e.parent;o&&o!==t;o=o.parent)if(i=o[a],i)return i}},ST=function(e){if(!Nr(e.value))return!1;var t=e.parent;return!(t&&(t.name!=="span"||t.attr("style"))&&/^[ ]+$/.test(e.value))},ig=function(e){var t=e.name==="a"&&!e.attr("href")&&e.attr("id");return e.attr("name")||e.attr("id")&&!e.firstChild||e.attr("data-mce-bookmark")||t},Xt=function(){function e(t,n){this.name=t,this.type=n,n===1&&(this.attributes=[],this.attributes.map={})}return e.create=function(t,n){var r=new e(t,wT[t]||1);return n&&Pe(n,function(a,i){r.attr(i,a)}),r},e.prototype.replace=function(t){var n=this;return t.parent&&t.remove(),n.insert(t,n),n.remove(),n},e.prototype.attr=function(t,n){var r=this,a;if(typeof t!="string")return t!=null&&Pe(t,function(o,u){r.attr(u,o)}),r;if(a=r.attributes){if(n!==void 0){if(n===null){if(t in a.map){delete a.map[t];for(var i=a.length;i--;)if(a[i].name===t)return a.splice(i,1),r}return r}if(t in a.map){for(var i=a.length;i--;)if(a[i].name===t){a[i].value=n;break}}else a.push({name:t,value:n});return a.map[t]=n,r}return a.map[t]}},e.prototype.clone=function(){var t=this,n=new e(t.name,t.type),r;if(r=t.attributes){var a=[];a.map={};for(var i=0,o=r.length;i=s.length){for(i=0,o=u.length;i=s.length||u[i]!==s[i]){r=i+1;break}}if(u.length=u.length||u[i]!==s[i]){r=i+1;break}}if(r===1)return n;for(i=0,o=u.length-(r-1);i=0;r--)if(!(f[r].length===0||f[r]===".")){if(f[r]===".."){a++;continue}if(a>0){a--;continue}i.push(f[r])}return r=s.length-a,r<=0?o=ji(i).join("/"):o=s.slice(0,r).join("/")+"/"+ji(i).join("/"),o.indexOf("/")!==0&&(o="/"+o),u&&o.lastIndexOf("/")!==o.length-1&&(o+=u),o},e.prototype.getURI=function(t){t===void 0&&(t=!1);var n;return(!this.source||t)&&(n="",t||(this.protocol?n+=this.protocol+"://":n+="//",this.userInfo&&(n+=this.userInfo+"@"),this.host&&(n+=this.host),this.port&&(n+=":"+this.port)),this.path&&(n+=this.path),this.query&&(n+="?"+this.query),this.anchor&&(n+="#"+this.anchor),this.source=n),this.source},e}(),_T=B.makeMap("button,fieldset,form,iframe,img,image,input,object,output,select,textarea"),DT=function(e){return e.indexOf("data-")===0||e.indexOf("aria-")===0},OT=fs(function(){return document.implementation.createHTMLDocument("parser")}),ul=function(e,t,n){for(var r=/<([!?\/])?([A-Za-z0-9\-_:.]+)/g,a=/(?:\s(?:[^'">]+(?:"[^"]*"|'[^']*'))*[^"'>]*(?:"[^">]*|'[^'>]*)?|\s*|\/)>/g,i=e.getShortEndedElements(),o=1,u=n;o!==0;)for(r.lastIndex=u;;){var s=r.exec(t);if(s===null)return u;if(s[1]==="!"){Sr(s[2],"--")?u=sl(t,!1,s.index+3):u=sl(t,!0,s.index+1);break}else{a.lastIndex=r.lastIndex;var f=a.exec(t);if(Ga(f)||f.index!==r.lastIndex)continue;s[1]==="/"?o-=1:de(i,s[2])||(o+=1),u=r.lastIndex+f[0].length;break}}return u},PT=function(e,t){return/^\s*\[if [\w\W]+\]>.*/.test(e.substr(t))},sl=function(e,t,n){n===void 0&&(n=0);var r=e.toLowerCase();if(r.indexOf("[if ",n)!==-1&&PT(r,n)){var a=r.indexOf("[endif]",n);return r.indexOf(">",a)}else if(t){var i=r.indexOf(">",n);return i!==-1?i:r.length}else{var o=/--!?>/g;o.lastIndex=n;var u=o.exec(e);return u?u.index+u[0].length:r.length}},IT=function(e,t){var n=e.exec(t);if(n){var r=n[1],a=n[2];return typeof r=="string"&&r.toLowerCase()==="data-mce-bogus"?a:null}else return null},Qo=function(e,t){t===void 0&&(t=Jn()),e=e||{};var n=OT(),r=n.createElement("form");e.fix_self_closing!==!1&&(e.fix_self_closing=!0);var a=e.comment?e.comment:le,i=e.cdata?e.cdata:le,o=e.text?e.text:le,u=e.start?e.start:le,s=e.end?e.end:le,f=e.pi?e.pi:le,l=e.doctype?e.doctype:le,c=function(d,m){m===void 0&&(m="html");for(var p=d.html,g,y=0,h,E,S=[],C,x,R,I,ne,W,_,ee,M,q,L,H,K,D,j,fe,pe,me=0,Ve=Qn.decode,Be=B.makeMap("src,href,data,background,action,formaction,poster,xlink:href"),lt=m==="html"?0:1,xt=function(we){var Se,Ue;for(Se=S.length;Se--&&S[Se].name!==we;);if(Se>=0){for(Ue=S.length-1;Ue>=Se;Ue--)we=S[Ue],we.valid&&s(we.name);S.length=Se}},O=function(we,Se){return o(ol(we,d),Se)},U=function(we){we!==""&&(we.charAt(0)===">"&&(we=" "+we),!e.allow_conditional_comments&&we.substr(0,3).toLowerCase()==="[if"&&(we=" "+we),a(ol(we,d)))},Z=function(we){return ol(we,d)},N=function(we,Se){var Ue=we||"",ln=!Sr(Ue,"--"),cn=sl(p,ln,Se);return we=p.substr(Se,cn-Se),U(ln?Ue+we:we),cn+1},$=function(we,Se,Ue,ln,cn){if(Se=Se.toLowerCase(),Ue=Z(Se in Fe?Se:Ve(Ue||ln||cn||"")),$e&&!ne&&DT(Se)===!1){var vn=L[Se];if(!vn&&H){for(var br=H.length;br--&&(vn=H[br],!vn.pattern.test(Se)););br===-1&&(vn=null)}if(!vn||vn.validValues&&!(Ue in vn.validValues))return}var Hc=Se==="name"||Se==="id";Hc&&we in _T&&(Ue in n||Ue in r)||Be[Se]&&!lr.isDomSafe(Ue,we,e)||ne&&(Se in Be||Se.indexOf("on")===0)||(C.map[Se]=Ue,C.push({name:Se,value:Ue}))},P=new RegExp(`<(?:(?:!--([\\w\\W]*?)--!?>)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:![Dd][Oo][Cc][Tt][Yy][Pp][Ee]([\\w\\W]*?)>)|(?:!(--)?)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([A-Za-z][A-Za-z0-9\\-_\\:\\.]*)>)|(?:([A-Za-z][A-Za-z0-9\\-_:.]*)(\\s(?:[^'">]+(?:"[^"]*"|'[^']*'))*[^"'>]*(?:"[^">]*|'[^'>]*)?|\\s*|\\/)>))`,"g"),J=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,te=t.getShortEndedElements(),ye=e.self_closing_elements||t.getSelfClosingElements(),Fe=t.getBoolAttrs(),$e=e.validate,Vn=e.remove_internals,ct=e.fix_self_closing,pt=t.getSpecialElements(),Me=p+">";g=P.exec(Me);){var Ot=g[0];if(yp.length){O(Ve(p.substr(g.index))),y=g.index+Ot.length;continue}h=h.toLowerCase(),h.charAt(0)===":"&&(h=h.substr(1)),W=h in te,ct&&ye[h]&&S.length>0&&S[S.length-1].name===h&&xt(h);var gt=IT(J,g[9]);if(gt!==null){if(gt==="all"){y=ul(t,p,P.lastIndex),P.lastIndex=y;continue}ee=!1}if(!$e||(_=t.getElementRule(h))){if(ee=!0,$e&&(L=_.attributes,H=_.attributePatterns),(q=g[9])?(ne=q.indexOf("data-mce-type")!==-1,ne&&Vn&&(ee=!1),C=[],C.map={},q.replace(J,function(we,Se,Ue,ln,cn){return $(h,Se,Ue,ln,cn),""})):(C=[],C.map={}),$e&&!ne){if(K=_.attributesRequired,D=_.attributesDefault,j=_.attributesForced,fe=_.removeEmptyAttrs,fe&&!C.length&&(ee=!1),j)for(x=j.length;x--;)M=j[x],I=M.name,pe=M.value,pe==="{$uid}"&&(pe="mce_"+me++),C.map[I]=pe,C.push({name:I,value:pe});if(D)for(x=D.length;x--;)M=D[x],I=M.name,I in C.map||(pe=M.value,pe==="{$uid}"&&(pe="mce_"+me++),C.map[I]=pe,C.push({name:I,value:pe}));if(K){for(x=K.length;x--&&!(K[x]in C.map););x===-1&&(ee=!1)}if(M=C.map["data-mce-bogus"]){if(M==="all"){y=ul(t,p,P.lastIndex),P.lastIndex=y;continue}ee=!1}}ee&&u(h,C,W)}else ee=!1;if(E=pt[h]){E.lastIndex=y=g.index+Ot.length,(g=E.exec(p))?(ee&&(R=p.substr(y,g.index-y)),y=g.index+g[0].length):(R=p.substr(y),y=p.length),ee&&(R.length>0&&O(R,!0),s(h)),P.lastIndex=y;continue}W||(!q||q.indexOf("/")!==q.length-1?S.push({name:h,valid:ee}):ee&&s(h))}else if(h=g[1])U(h);else if(h=g[2]){var Dn=lt===1||e.preserve_cdata||S.length>0&&t.isValidChild(S[S.length-1].name,"#cdata");if(Dn)i(h);else{y=N("",g.index+2),P.lastIndex=y;continue}}else if(h=g[3])l(h);else if((h=g[4])||Ot==="=0;x--)h=S[x],h.valid&&s(h.name)},v=function(d,m){m===void 0&&(m="html"),c(ET(d),m)};return{parse:v}};Qo.findEndTag=ul;var $T=function(e,t){var n=new RegExp(["\\s?("+e.join("|")+')="[^"]+"'].join("|"),"gi");return t.replace(n,"")},ug=function(e,t){for(var n=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,r=e.schema,a=$T(e.getTempAttrs(),t),i=r.getShortEndedElements(),o;o=n.exec(a);){var u=n.lastIndex,s=o[0].length,f=void 0;i[o[1]]?f=u:f=Qo.findEndTag(r,a,u),a=a.substring(0,u-s)+a.substring(f),n.lastIndex=u-s}return Yn(a)},LT=ug,FT=function(e,t){var n=ft(e),r=new RegExp("^(<"+n+"[^>]*>( | |\\s|\xA0|
|)<\\/"+n+`>[\r diff --git a/public/js/build/TaskDetail.081ddf15.js b/public/js/build/TaskDetail.3b8088db.js similarity index 99% rename from public/js/build/TaskDetail.081ddf15.js rename to public/js/build/TaskDetail.3b8088db.js index 9d5b4af1a..ef0bb04f2 100644 --- a/public/js/build/TaskDetail.081ddf15.js +++ b/public/js/build/TaskDetail.3b8088db.js @@ -1 +1 @@ -import{n as r,d as c,m as u}from"./app.256678e2.js";import h from"./TEditor.61cbcfed.js";import{P as m,T as p}from"./ProjectLog.8a343db2.js";import{U as f}from"./UserInput.6e7e4596.js";import{C as k,D as g}from"./DialogWrapper.e49b1794.js";import{T as _}from"./TaskMenu.01791002.js";var v=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("Upload",{ref:"upload",attrs:{name:"files",action:"",multiple:"",format:t.uploadFormat,"show-upload-list":!1,"max-size":t.maxSize,"on-format-error":t.handleFormatError,"on-exceeded-size":t.handleMaxSize,"before-upload":t.handleBeforeUpload}})},D=[];const w={name:"TaskUpload",props:{maxSize:{type:Number,default:1024e3}},data(){return{uploadFormat:["jpg","jpeg","png","gif","doc","docx","xls","xlsx","ppt","pptx","txt","esp","pdf","rar","zip","gz","ai","avi","bmp","cdr","eps","mov","mp3","mp4","pr","psd","svg","tif"]}},methods:{handleFormatError(t){$A.modalWarning({title:"\u6587\u4EF6\u683C\u5F0F\u4E0D\u6B63\u786E",content:"\u6587\u4EF6 "+t.name+" \u683C\u5F0F\u4E0D\u6B63\u786E\uFF0C\u4EC5\u652F\u6301\u53D1\u9001\uFF1A"+this.uploadFormat.join(",")})},handleMaxSize(t){$A.modalWarning({title:"\u8D85\u51FA\u6587\u4EF6\u5927\u5C0F\u9650\u5236",content:"\u6587\u4EF6 "+t.name+" \u592A\u5927\uFF0C\u4E0D\u80FD\u53D1\u9001\u8D85\u8FC7"+$A.bytesToSize(this.maxSize*1024)+"\u3002"})},handleBeforeUpload(t){return this.$emit("on-select-file",t),!1},handleClick(){this.$refs.upload.handleClick()}}},n={};var b=r(w,v,D,!1,C,null,null,null);function C(t){for(let a in n)this[a]=n[a]}var y=function(){return b.exports}(),A=function(){var t=this,a=t.$createElement,e=t._self._c||a;return t.ready&&t.taskDetail.parent_id>0?e("li",[e("div",{staticClass:"subtask-icon"},[e("TaskMenu",{ref:`taskMenu_${t.taskDetail.id}`,attrs:{disabled:t.taskId===0,task:t.taskDetail,"load-status":t.taskDetail.loading===!0},on:{"on-update":t.getLogLists}})],1),t.taskDetail.flow_item_name?e("div",{staticClass:"subtask-flow"},[e("span",{class:t.taskDetail.flow_item_status,on:{click:function(s){return s.stopPropagation(),t.openMenu(s,t.taskDetail)}}},[t._v(t._s(t.taskDetail.flow_item_name))])]):t._e(),e("div",{staticClass:"subtask-name"},[e("Input",{ref:"name",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:8},maxlength:255,enterkeyhint:"done"},on:{"on-blur":function(s){return t.updateBlur("name")},"on-keydown":t.onNameKeydown},model:{value:t.taskDetail.name,callback:function(s){t.$set(t.taskDetail,"name",s)},expression:"taskDetail.name"}})],1),e("DatePicker",{staticClass:"subtask-time",attrs:{open:t.timeOpen,options:t.timeOptions,format:"yyyy/MM/dd HH:mm",type:"datetimerange",placement:"bottom-end",transfer:""},on:{"on-open-change":t.timeChange,"on-clear":t.timeClear,"on-ok":t.timeOk},model:{value:t.timeValue,callback:function(s){t.timeValue=s},expression:"timeValue"}},[!t.taskDetail.complete_at&&t.taskDetail.end_at&&t.taskDetail.end_at!=t.mainEndAt?e("div",{class:["time",t.taskDetail.today?"today":"",t.taskDetail.overdue?"overdue":""],on:{click:t.openTime}},[t._v(" "+t._s(t.expiresFormat(t.taskDetail.end_at))+" ")]):e("Icon",{staticClass:"clock",attrs:{type:"ios-clock-outline"},on:{click:t.openTime}})],1),e("Poptip",{ref:"owner",staticClass:"subtask-avatar",attrs:{"popper-class":"task-detail-user-popper",title:t.$L("\u4FEE\u6539\u8D1F\u8D23\u4EBA"),width:240,placement:"bottom",transfer:""},on:{"on-popper-show":t.openOwner,"on-ok":t.onOwner}},[e("div",{attrs:{slot:"content"},slot:"content"},[e("UserInput",{attrs:{"multiple-max":10,"project-id":t.taskDetail.project_id,placeholder:t.$L("\u9009\u62E9\u4EFB\u52A1\u8D1F\u8D23\u4EBA"),transfer:!1,"max-hidden-select":""},model:{value:t.ownerData.owner_userid,callback:function(s){t.$set(t.ownerData,"owner_userid",s)},expression:"ownerData.owner_userid"}}),e("div",{staticClass:"task-detail-avatar-buttons"},[e("Button",{attrs:{size:"small",type:"primary"},on:{click:function(s){return t.$refs.owner.ok()}}},[t._v(t._s(t.$L("\u786E\u5B9A")))])],1)],1),t.getOwner.length>0?t._l(t.getOwner,function(s){return e("UserAvatar",{key:s.userid,attrs:{userid:s.userid,size:20,tooltipDisabled:""}})}):e("div",[t._v("--")])],2)],1):t.ready?e("div",{class:{"task-detail":!0,"open-dialog":t.hasOpenDialog,completed:t.taskDetail.complete_at},style:t.taskDetailStyle},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.taskDetail.id>0,expression:"taskDetail.id > 0"}],staticClass:"task-info"},[e("div",{staticClass:"head"},[e("TaskMenu",{ref:`taskMenu_${t.taskDetail.id}`,staticClass:"icon",attrs:{disabled:t.taskId===0,task:t.taskDetail,size:"medium","color-show":!1},on:{"on-update":t.getLogLists}}),t.taskDetail.flow_item_name?e("div",{staticClass:"flow"},[e("span",{class:t.taskDetail.flow_item_status,on:{click:function(s){return s.stopPropagation(),t.openMenu(s,t.taskDetail)}}},[t._v(t._s(t.taskDetail.flow_item_name))])]):t._e(),t.taskDetail.archived_at?e("div",{staticClass:"flow"},[e("span",{staticClass:"archived",on:{click:function(s){return s.stopPropagation(),t.openMenu(s,t.taskDetail)}}},[t._v(t._s(t.$L("\u5DF2\u5F52\u6863")))])]):t._e(),e("div",{staticClass:"nav"},[t.projectName?e("p",[e("span",[t._v(t._s(t.projectName))])]):t._e(),t.columnName?e("p",[e("span",[t._v(t._s(t.columnName))])]):t._e(),t.taskDetail.id?e("p",[e("span",[t._v(t._s(t.taskDetail.id))])]):t._e()]),e("div",{staticClass:"function"},[t.getOwner.length===0?e("EPopover",{attrs:{placement:"bottom"},model:{value:t.receiveShow,callback:function(s){t.receiveShow=s},expression:"receiveShow"}},[e("div",{staticClass:"task-detail-receive"},[e("div",{staticClass:"receive-title"},[e("Icon",{attrs:{type:"ios-help-circle"}}),t._v(" "+t._s(t.$L("\u786E\u8BA4\u8BA1\u5212\u65F6\u95F4\u9886\u53D6\u4EFB\u52A1"))+" ")],1),e("div",{staticClass:"receive-time"},[e("DatePicker",{attrs:{options:t.timeOptions,format:"yyyy/MM/dd HH:mm",type:"datetimerange",placeholder:t.$L("\u8BF7\u8BBE\u7F6E\u8BA1\u5212\u65F6\u95F4"),clearable:!1,editable:!1},model:{value:t.timeValue,callback:function(s){t.timeValue=s},expression:"timeValue"}})],1),e("div",{staticClass:"receive-bottom"},[e("Button",{attrs:{size:"small",type:"text"},on:{click:function(s){t.receiveShow=!1}}},[t._v("\u53D6\u6D88")]),e("Button",{attrs:{loading:t.ownerLoad>0,size:"small",type:"primary"},on:{click:function(s){return t.onOwner(!0)}}},[t._v("\u786E\u5B9A")])],1)]),e("Button",{staticClass:"pick",attrs:{slot:"reference",loading:t.ownerLoad>0,type:"primary"},slot:"reference"},[t._v(t._s(t.$L("\u6211\u8981\u9886\u53D6\u4EFB\u52A1")))])],1):t._e(),t.$Electron?e("ETooltip",{attrs:{disabled:t.windowSmall||t.$isEEUiApp,content:t.$L("\u65B0\u7A97\u53E3\u6253\u5F00")}},[e("i",{staticClass:"taskfont open",on:{click:t.openNewWin}},[t._v("\uE776")])]):t._e(),e("div",{staticClass:"menu"},[e("TaskMenu",{attrs:{disabled:t.taskId===0,task:t.taskDetail,icon:"ios-more","completed-icon":"ios-more",size:"medium","color-show":!1},on:{"on-update":t.getLogLists}})],1)],1)],1),e("div",{staticClass:"scroller scrollbar-overlay"},[e("div",{staticClass:"title"},[e("Input",{ref:"name",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:8},maxlength:255,enterkeyhint:"done"},on:{"on-blur":function(s){return t.updateBlur("name")},"on-keydown":t.onNameKeydown},model:{value:t.taskDetail.name,callback:function(s){t.$set(t.taskDetail,"name",s)},expression:"taskDetail.name"}})],1),e("div",{staticClass:"desc"},[e("TEditor",{ref:"desc",attrs:{value:t.taskContent,plugins:t.taskPlugins,options:t.taskOptions,"option-full":t.taskOptionFull,placeholder:t.$L("\u8BE6\u7EC6\u63CF\u8FF0..."),inline:""},on:{"on-blur":function(s){return t.updateBlur("content")}}})],1),e("Form",{staticClass:"items",attrs:{"label-position":"left","label-width":"auto"},nativeOn:{submit:function(s){s.preventDefault()}}},[t.taskDetail.p_name?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE6EC")]),t._v(t._s(t.$L("\u4F18\u5148\u7EA7"))+" ")]),e("ul",{staticClass:"item-content"},[e("li",[e("EDropdown",{ref:"priority",attrs:{trigger:"click",placement:"bottom"},on:{command:function(s){return t.updateData("priority",s)}}},[e("TaskPriority",{attrs:{backgroundColor:t.taskDetail.p_color}},[t._v(t._s(t.taskDetail.p_name))]),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.taskPriority,function(s,i){return e("EDropdownItem",{key:i,attrs:{command:s}},[e("i",{staticClass:"taskfont",style:{color:s.color},domProps:{innerHTML:t._s(t.taskDetail.p_name==s.name?"":"")}}),t._v(" "+t._s(s.name)+" ")])}),1)],1)],1)])]):t._e(),t.getOwner.length>0?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE6E4")]),t._v(t._s(t.$L("\u8D1F\u8D23\u4EBA"))+" ")]),e("Poptip",{ref:"owner",staticClass:"item-content user",attrs:{title:t.$L("\u4FEE\u6539\u8D1F\u8D23\u4EBA"),width:240,"popper-class":"task-detail-user-popper",placement:"bottom",transfer:""},on:{"on-popper-show":t.openOwner,"on-ok":t.onOwner}},[e("div",{attrs:{slot:"content"},slot:"content"},[e("UserInput",{attrs:{"multiple-max":10,"project-id":t.taskDetail.project_id,placeholder:t.$L("\u9009\u62E9\u4EFB\u52A1\u8D1F\u8D23\u4EBA"),transfer:!1},model:{value:t.ownerData.owner_userid,callback:function(s){t.$set(t.ownerData,"owner_userid",s)},expression:"ownerData.owner_userid"}}),e("div",{staticClass:"task-detail-avatar-buttons"},[e("Button",{attrs:{size:"small",type:"primary"},on:{click:function(s){return t.$refs.owner.ok()}}},[t._v(t._s(t.$L("\u786E\u5B9A")))])],1)],1),e("div",{staticClass:"user-list"},t._l(t.getOwner,function(s){return e("UserAvatar",{key:s.userid,attrs:{userid:s.userid,size:28,showName:t.getOwner.length===1,tooltipDisabled:""}})}),1)])],1):t._e(),t.getAssist.length>0||t.assistForce?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE63F")]),t._v(t._s(t.$L("\u534F\u52A9\u4EBA\u5458"))+" ")]),e("Poptip",{ref:"assist",staticClass:"item-content user",attrs:{title:t.$L(t.getAssist.length>0?"\u4FEE\u6539\u534F\u52A9\u4EBA\u5458":"\u6DFB\u52A0\u534F\u52A9\u4EBA\u5458"),width:280,"popper-class":"task-detail-user-popper",placement:"bottom",transfer:""},on:{"on-popper-show":t.openAssist,"on-ok":t.onAssist}},[e("div",{attrs:{slot:"content"},slot:"content"},[e("UserInput",{attrs:{"multiple-max":10,"project-id":t.taskDetail.project_id,"disabled-choice":t.assistData.disabled,placeholder:t.$L("\u9009\u62E9\u4EFB\u52A1\u534F\u52A9\u4EBA\u5458"),transfer:!1},model:{value:t.assistData.assist_userid,callback:function(s){t.$set(t.assistData,"assist_userid",s)},expression:"assistData.assist_userid"}}),e("div",{staticClass:"task-detail-avatar-buttons"},[e("Button",{attrs:{size:"small",type:"primary"},on:{click:function(s){return t.$refs.assist.ok()}}},[t._v(t._s(t.$L("\u786E\u5B9A")))])],1)],1),t.getAssist.length>0?e("div",{staticClass:"user-list"},t._l(t.getAssist,function(s){return e("UserAvatar",{key:s.userid,attrs:{userid:s.userid,size:28,showName:t.getAssist.length===1,tooltipDisabled:""}})}),1):e("div",[t._v("--")])])],1):t._e(),t.taskDetail.end_at||t.timeForce?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE6E8")]),t._v(t._s(t.$L("\u622A\u6B62\u65F6\u95F4"))+" ")]),e("ul",{staticClass:"item-content"},[e("li",[e("DatePicker",{attrs:{open:t.timeOpen,options:t.timeOptions,format:"yyyy/MM/dd HH:mm",type:"datetimerange",transfer:""},on:{"on-open-change":t.timeChange,"on-clear":t.timeClear,"on-ok":t.timeOk},model:{value:t.timeValue,callback:function(s){t.timeValue=s},expression:"timeValue"}},[e("div",{staticClass:"picker-time"},[e("div",{staticClass:"time",on:{click:t.openTime}},[t._v(t._s(t.taskDetail.end_at?t.cutTime:"--"))]),!t.taskDetail.complete_at&&t.taskDetail.end_at?[t.within24Hours(t.taskDetail.end_at)?e("Tag",{attrs:{color:"blue"}},[e("i",{staticClass:"taskfont"},[t._v("\uE71D")]),t._v(t._s(t.expiresFormat(t.taskDetail.end_at)))]):t._e(),t.isOverdue(t.taskDetail)?e("Tag",{attrs:{color:"red"}},[t._v(t._s(t.$L("\u8D85\u671F\u672A\u5B8C\u6210")))]):t._e()]:t._e()],2)])],1)])]):t._e(),t.taskDetail.loop&&t.taskDetail.loop!="never"||t.loopForce?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE93F")]),t._v(t._s(t.$L("\u91CD\u590D\u5468\u671F"))+" ")]),e("ul",{staticClass:"item-content"},[e("li",[e("EDropdown",{ref:"loop",attrs:{trigger:"click",placement:"bottom"},on:{command:function(s){return t.updateData("loop",s)}}},[e("ETooltip",{attrs:{disabled:t.windowSmall||t.$isEEUiApp||!t.taskDetail.loop_at,content:`${t.$L("\u4E0B\u4E2A\u5468\u671F")}: ${t.taskDetail.loop_at}`,placement:"right"}},[e("span",[t._v(t._s(t.$L(t.loopLabel(t.taskDetail.loop))))])]),e("EDropdownMenu",{staticClass:"task-detail-loop",attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.loops,function(s){return e("EDropdownItem",{key:s.key,attrs:{command:s.key}},[t._v(" "+t._s(t.$L(s.label))+" ")])}),1)],1)],1)])]):t._e(),t.fileList.length>0?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE6E6")]),t._v(t._s(t.$L("\u9644\u4EF6"))+" ")]),e("ul",{staticClass:"item-content file"},[t.taskDetail.file_num>50?e("li",{staticClass:"tip"},[t._v(t._s(t.$L(`\u5171${t.taskDetail.file_num}\u4E2A\u6587\u4EF6\uFF0C\u4EC5\u663E\u793A\u6700\u65B050\u4E2A`)))]):t._e(),t._l(t.fileList,function(s){return e("li",[s.id?e("img",{staticClass:"file-ext",attrs:{src:s.thumb}}):e("Loading",{staticClass:"file-load"}),e("div",{staticClass:"file-name"},[t._v(t._s(s.name))]),e("div",{staticClass:"file-size"},[t._v(t._s(t.$A.bytesToSize(s.size)))]),e("div",{staticClass:"file-menu",class:{show:s._show_menu}},[e("Icon",{attrs:{type:"md-eye"},on:{click:function(i){return t.viewFile(s)}}}),e("Icon",{attrs:{type:"md-arrow-round-down"},on:{click:function(i){return t.downFile(s)}}}),e("EPopover",{staticClass:"file-delete",model:{value:s._show_menu,callback:function(i){t.$set(s,"_show_menu",i)},expression:"file._show_menu"}},[e("div",{staticClass:"task-detail-delete-file-popover"},[e("p",[t._v(t._s(t.$L("\u4F60\u786E\u5B9A\u8981\u5220\u9664\u8FD9\u4E2A\u6587\u4EF6\u5417\uFF1F")))]),e("div",{staticClass:"buttons"},[e("Button",{attrs:{size:"small",type:"text"},on:{click:function(i){s._show_menu=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{size:"small",type:"primary"},on:{click:function(i){return t.deleteFile(s)}}},[t._v(t._s(t.$L("\u786E\u5B9A")))])],1)]),e("i",{staticClass:"taskfont del",attrs:{slot:"reference"},slot:"reference"},[t._v("\uE6EA")])])],1)],1)})],2),e("ul",{staticClass:"item-content"},[e("li",[e("div",{staticClass:"add-button",on:{click:function(s){return t.onUploadClick(!0)}}},[e("i",{staticClass:"taskfont"},[t._v("\uE6F2")]),t._v(t._s(t.$L("\u6DFB\u52A0\u9644\u4EF6"))+" ")])])])]):t._e(),t.subList.length>0||t.addsubForce?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE6F0")]),t._v(t._s(t.$L("\u5B50\u4EFB\u52A1"))+" ")]),e("ul",{staticClass:"item-content subtask"},t._l(t.subList,function(s,i){return e("TaskDetail",{key:i,ref:`subTask_${s.id}`,refInFor:!0,attrs:{"task-id":s.id,"open-task":s,"main-end-at":t.taskDetail.end_at,"can-update-blur":t.canUpdateBlur}})}),1),e("ul",{class:["item-content",t.subList.length===0?"nosub":""]},[e("li",[t.addsubShow?e("Input",{ref:"addsub",staticClass:"add-input",class:{loading:t.addsubLoad>0},attrs:{placeholder:t.$L("+ \u8F93\u5165\u5B50\u4EFB\u52A1\uFF0C\u56DE\u8F66\u6DFB\u52A0\u5B50\u4EFB\u52A1"),icon:t.addsubLoad>0?"ios-loading":"",enterkeyhint:"done"},on:{"on-blur":t.addsubChackClose,"on-keydown":t.addsubKeydown},model:{value:t.addsubName,callback:function(s){t.addsubName=s},expression:"addsubName"}}):e("div",{staticClass:"add-button",on:{click:t.addsubOpen}},[e("i",{staticClass:"taskfont"},[t._v("\uE6F2")]),t._v(t._s(t.$L("\u6DFB\u52A0\u5B50\u4EFB\u52A1"))+" ")])],1)])]):t._e()],1),t.menuList.length>0?e("div",{staticClass:"add"},[e("EDropdown",{attrs:{trigger:"click",placement:"bottom"},on:{command:t.dropAdd}},[e("div",{staticClass:"add-button"},[e("i",{staticClass:"taskfont"},[t._v("\uE6F2")]),t._v(" "+t._s(t.$L("\u6DFB\u52A0"))+" "),e("em",[t._v(t._s(t.menuText))])]),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.menuList,function(s,i){return e("EDropdownItem",{key:i,attrs:{command:s.command}},[e("div",{staticClass:"item"},[e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(s.icon)}}),t._v(t._s(t.$L(s.name))+" ")])])}),1)],1)],1):t._e()],1),e("TaskUpload",{ref:"upload",staticClass:"upload",on:{"on-select-file":t.onSelectFile}})],1),e("div",{directives:[{name:"show",rawName:"v-show",value:t.taskDetail.id>0,expression:"taskDetail.id > 0"}],staticClass:"task-dialog",style:t.dialogStyle},[t.hasOpenDialog?[t.taskId>0?e("DialogWrapper",{ref:"dialog",attrs:{"dialog-id":t.taskDetail.dialog_id}},[e("div",{staticClass:"head",attrs:{slot:"head"},slot:"head"},[e("Icon",{staticClass:"icon",attrs:{type:"ios-chatbubbles-outline"}}),e("div",{staticClass:"nav"},[e("p",{class:{active:t.navActive=="dialog"},on:{click:function(s){t.navActive="dialog"}}},[t._v(t._s(t.$L("\u804A\u5929")))]),e("p",{class:{active:t.navActive=="log"},on:{click:function(s){t.navActive="log"}}},[t._v(t._s(t.$L("\u52A8\u6001")))]),t.navActive=="log"?e("div",{staticClass:"refresh"},[t.logLoadIng?e("Loading"):e("Icon",{attrs:{type:"ios-refresh"},on:{click:t.getLogLists}})],1):t._e()])],1)]):t._e(),t.navActive=="log"&&t.taskId>0?e("ProjectLog",{ref:"log",attrs:{"task-id":t.taskDetail.id},on:{"on-load-change":t.logLoadChange}}):t._e()]:e("div",[e("div",{staticClass:"head"},[e("Icon",{staticClass:"icon",attrs:{type:"ios-chatbubbles-outline"}}),e("div",{staticClass:"nav"},[e("p",{class:{active:t.navActive=="dialog"},on:{click:function(s){t.navActive="dialog"}}},[t._v(t._s(t.$L("\u804A\u5929")))]),e("p",{class:{active:t.navActive=="log"},on:{click:function(s){t.navActive="log"}}},[t._v(t._s(t.$L("\u52A8\u6001")))]),t.navActive=="log"?e("div",{staticClass:"refresh"},[t.logLoadIng?e("Loading"):e("Icon",{attrs:{type:"ios-refresh"},on:{click:t.getLogLists}})],1):t._e()]),e("div",{staticClass:"menu"},[t.navActive=="dialog"&&t.taskDetail.msg_num>0?e("div",{staticClass:"menu-item",on:{click:function(s){return s.stopPropagation(),t.onSend("open")}}},[t.openLoad>0?e("div",{staticClass:"menu-load"},[e("Loading")],1):t._e(),t._v(" "+t._s(t.$L("\u4EFB\u52A1\u804A\u5929"))+" "),e("em",[t._v("("+t._s(t.taskDetail.msg_num>999?"999+":t.taskDetail.msg_num)+")")]),e("i",{staticClass:"taskfont"},[t._v("\uE703")])]):t._e()])],1),t.navActive=="log"&&t.taskId>0?e("ProjectLog",{ref:"log",attrs:{"task-id":t.taskDetail.id,"show-load":!1},on:{"on-load-change":t.logLoadChange}}):e("div",{staticClass:"no-dialog",on:{drop:function(s){return s.preventDefault(),t.taskPasteDrag(s,"drag")},dragover:function(s){return s.preventDefault(),t.taskDragOver(!0,s)},dragleave:function(s){return s.preventDefault(),t.taskDragOver(!1,s)}}},[e("div",{staticClass:"no-tip"},[t._v(t._s(t.$L("\u6682\u65E0\u6D88\u606F")))]),e("div",{staticClass:"no-input"},[e("ChatInput",{ref:"chatInput",attrs:{"task-id":t.taskId,loading:t.sendLoad>0,maxlength:2e5,placeholder:t.$L("\u8F93\u5165\u6D88\u606F...")},on:{"on-more":t.onEventMore,"on-file":t.onSelectFile,"on-record":t.onRecord,"on-send":t.onSend},model:{value:t.msgText,callback:function(s){t.msgText=s},expression:"msgText"}})],1),t.dialogDrag?e("div",{staticClass:"drag-over",on:{click:function(s){t.dialogDrag=!1}}},[e("div",{staticClass:"drag-text"},[t._v(t._s(t.$L("\u62D6\u52A8\u5230\u8FD9\u91CC\u53D1\u9001")))])]):t._e()])],1)],2),t.taskDetail.id?t._e():e("div",{staticClass:"task-load"},[e("Loading")],1)]):t._e()},L=[];const x={name:"TaskDetail",components:{ChatInput:k,TaskMenu:_,ProjectLog:m,DialogWrapper:g,TaskUpload:y,UserInput:f,TaskPriority:p,TEditor:h},props:{taskId:{type:Number,default:0},openTask:{type:Object,default:()=>({})},mainEndAt:{default:null},canUpdateBlur:{type:Boolean,default:!0},modalMode:{type:Boolean,default:!1}},data(){return{ready:!1,taskDetail:{},ownerData:{},ownerLoad:0,receiveShow:!1,assistForce:!1,assistData:{},assistLoad:0,addsubForce:!1,addsubShow:!1,addsubName:"",addsubLoad:0,timeForce:!1,timeOpen:!1,timeValue:[],timeOptions:{shortcuts:$A.timeOptionShortcuts()},loopForce:!1,nowTime:$A.Time(),nowInterval:null,msgText:"",msgFile:[],msgRecord:{},navActive:"dialog",logLoadIng:!1,sendLoad:0,openLoad:0,taskPlugins:["advlist autolink lists link image charmap print preview hr anchor pagebreak","searchreplace visualblocks visualchars code","insertdatetime media nonbreaking save table directionality","emoticons paste codesample","autoresize"],taskOptions:{statusbar:!1,menubar:!1,autoresize_bottom_margin:2,min_height:200,max_height:380,contextmenu:"bold italic underline forecolor backcolor | codesample | uploadImages imagePreview | preview screenload",valid_elements:"a[href|target=_blank],em,strong/b,div[align],span[style],a,br,p,img[src|alt|witdh|height],pre[class],code",toolbar:!1},taskOptionFull:{menubar:"file edit view",valid_elements:"a[href|target=_blank],em,strong/b,div[align],span[style],a,br,p,img[src|alt|witdh|height],pre[class],code",toolbar:"uploadImages | bold italic underline forecolor backcolor | codesample | preview screenload"},dialogDrag:!1,imageAttachment:!0,receiveTaskSubscribe:null,loops:[{key:"never",label:"\u4ECE\u4E0D"},{key:"day",label:"\u6BCF\u5929"},{key:"weekdays",label:"\u6BCF\u4E2A\u5DE5\u4F5C\u65E5"},{key:"week",label:"\u6BCF\u5468"},{key:"twoweeks",label:"\u6BCF\u4E24\u5468"},{key:"month",label:"\u6BCF\u6708"},{key:"year",label:"\u6BCF\u5E74"},{key:"custom",label:"\u81EA\u5B9A\u4E49"}]}},created(){const t=$A.getObject(this.$route.query,"navActive");["dialog","log"].includes(t)&&(this.navActive=t)},mounted(){this.nowInterval=setInterval(()=>{this.nowTime=$A.Time()},1e3),this.receiveTaskSubscribe=c.Store.subscribe("receiveTask",()=>{this.receiveShow=!0})},destroyed(){clearInterval(this.nowInterval),this.receiveTaskSubscribe&&(this.receiveTaskSubscribe.unsubscribe(),this.receiveTaskSubscribe=null)},computed:{...u(["cacheProjects","cacheColumns","cacheTasks","taskContents","taskFiles","taskPriority","dialogId"]),projectName(){if(!this.taskDetail.project_id)return"";if(this.taskDetail.project_name)return this.taskDetail.project_name;const t=this.cacheProjects.find(({id:a})=>a==this.taskDetail.project_id);return t?t.name:""},columnName(){if(!this.taskDetail.column_id)return"";if(this.taskDetail.column_name)return this.taskDetail.column_name;const t=this.cacheColumns.find(({id:a})=>a==this.taskDetail.column_id);return t?t.name:""},taskContent(){if(!this.taskId)return"";let t=this.taskContents.find(({task_id:a})=>a==this.taskId);return t?t.content:""},fileList(){return this.taskId?this.taskFiles.filter(({task_id:t})=>t==this.taskId).sort((t,a)=>a.id-t.id):[]},subList(){return this.taskId?this.cacheTasks.filter(t=>t.parent_id==this.taskId).sort((t,a)=>t.id-a.id):[]},hasOpenDialog(){return this.taskDetail.dialog_id>0&&this.windowLarge},dialogStyle(){const{windowHeight:t,hasOpenDialog:a}=this,e=Math.min(1100,t);if(!e)return{};if(!a)return{};const s=e>900?200:70;return{minHeight:e-s-48+"px"}},taskDetailStyle(){const{modalMode:t,windowHeight:a,hasOpenDialog:e}=this,s=Math.min(1100,a);if(t&&e){const i=s>900?200:70;return{maxHeight:s-i-30+"px"}}return{}},cutTime(){const{taskDetail:t}=this;let a=$A.Date(t.start_at,!0),e=$A.Date(t.end_at,!0),s="";return $A.formatDate("Y/m/d",a)==$A.formatDate("Y/m/d",e)?s=$A.formatDate("Y/m/d H:i",a)+" ~ "+$A.formatDate("H:i",e):$A.formatDate("Y",a)==$A.formatDate("Y",e)?(s=$A.formatDate("Y/m/d H:i",a)+" ~ "+$A.formatDate("m/d H:i",e),s=s.replace(/( 00:00| 23:59)/g,"")):(s=$A.formatDate("Y/m/d H:i",a)+" ~ "+$A.formatDate("Y/m/d H:i",e),s=s.replace(/( 00:00| 23:59)/g,"")),s},getOwner(){const{taskDetail:t}=this;return $A.isArray(t.task_user)?t.task_user.filter(({owner:a})=>a===1).sort((a,e)=>a.id-e.id):[]},getAssist(){const{taskDetail:t}=this;return $A.isArray(t.task_user)?t.task_user.filter(({owner:a})=>a!==1).sort((a,e)=>a.id-e.id):[]},menuList(){const{taskDetail:t}=this,a=[];return t.p_name||a.push({command:"priority",icon:"",name:"\u4F18\u5148\u7EA7"}),$A.isArray(t.task_user)&&t.task_user.find(({owner:e})=>e!==1)||a.push({command:"assist",icon:"",name:"\u534F\u52A9\u4EBA\u5458"}),t.end_at||a.push({command:"times",icon:"",name:"\u622A\u6B62\u65F6\u95F4"}),(!t.loop||t.loop=="never")&&a.push({command:"loop",icon:"",name:"\u91CD\u590D\u5468\u671F"}),this.fileList.length==0&&a.push({command:"file",icon:"",name:"\u9644\u4EF6"}),this.subList.length==0&&a.push({command:"subtask",icon:"",name:"\u5B50\u4EFB\u52A1"}),a},menuText(){const{menuList:t}=this;let a="";return t.length>0&&t.forEach((e,s)=>{s>0&&(a+=" / "),a+=this.$L(e.name)}),a}},watch:{openTask:{handler(t){this.taskDetail=$A.cloneJSON(t),this.__openTask&&clearTimeout(this.__openTask),this.__openTask=setTimeout(a=>{var e;return(e=this.$refs.name)==null?void 0:e.resizeTextarea()},100)},immediate:!0,deep:!0},taskId:{handler(t){t>0?this.ready=!0:(this.windowSmall&&$A.onBlur(),this.timeOpen=!1,this.timeForce=!1,this.loopForce=!1,this.assistForce=!1,this.addsubForce=!1,this.receiveShow=!1,this.$refs.owner&&this.$refs.owner.handleClose(),this.$refs.assist&&this.$refs.assist.handleClose(),this.$refs.chatInput&&this.$refs.chatInput.hidePopover())},immediate:!0},receiveShow(t){t&&(this.timeValue=this.taskDetail.end_at?[this.taskDetail.start_at,this.taskDetail.end_at]:[])}},methods:{within24Hours(t){return $A.Date(t,!0)-this.nowTime<86400},expiresFormat(t){return $A.countDownFormat(t,this.nowTime)},isOverdue(t){return t.overdue?!0:$A.Date(t.end_at,!0)e.key===t);return a?a.label:t?`\u6BCF${t}\u5929`:"\u4ECE\u4E0D"},onNameKeydown(t){t.keyCode===13&&(t.shiftKey||(t.preventDefault(),this.updateData("name")))},checkUpdate(t){let a=!1;if(this.openTask.name!=this.taskDetail.name)if(a=!0,t===!0)this.updateData("name");else return t===!1&&this.$refs.name.focus(),!0;if(this.$refs.desc&&this.$refs.desc.getContent()!=this.taskContent)if(a=!0,t===!0)this.updateData("content");else return t===!1&&this.$refs.desc.focus(),!0;if(this.addsubShow&&this.addsubName)if(a=!0,t===!0)this.onAddsub();else return t===!1&&this.$refs.addsub.focus(),!0;return this.subList.some(({id:e})=>{this.$refs[`subTask_${e}`][0].checkUpdate(t)&&(a=!0)}),a},updateBlur(t,a){this.canUpdateBlur&&this.updateData(t,a)},updateData(t,a){let e=null;switch(t){case"priority":this.$set(this.taskDetail,"p_level",a.priority),this.$set(this.taskDetail,"p_name",a.name),this.$set(this.taskDetail,"p_color",a.color),t=["p_level","p_name","p_color"];break;case"times":if(this.taskDetail.start_at&&(Math.abs($A.Time(this.taskDetail.start_at)-$A.Time(a.start_at))>60||Math.abs($A.Time(this.taskDetail.end_at)-$A.Time(a.end_at))>60)&&typeof a.desc=="undefined"){$A.modalInput({title:"\u4FEE\u6539\u4EFB\u52A1\u65F6\u95F4",placeholder:"\u8BF7\u8F93\u5165\u4FEE\u6539\u5907\u6CE8",okText:"\u786E\u5B9A",onOk:o=>o?(this.updateData("times",Object.assign(a,{desc:o})),!1):"\u8BF7\u8F93\u5165\u4FEE\u6539\u5907\u6CE8"});return}this.$set(this.taskDetail,"times",[a.start_at,a.end_at,a.desc]);break;case"loop":if(a==="custom"){this.customLoop();return}this.$set(this.taskDetail,"loop",a);break;case"content":const i=this.$refs.desc.getContent();if(i==this.taskContent)return;this.$set(this.taskDetail,"content",i),e=()=>{this.$store.dispatch("saveTaskContent",{task_id:this.taskId,content:i})};break}let s={task_id:this.taskDetail.id};($A.isArray(t)?t:[t]).forEach(i=>{let o=this.taskDetail[i],d=this.openTask[i];$A.jsonStringify(o)!=$A.jsonStringify(d)&&(s[i]=o)}),!(Object.keys(s).length<=1)&&this.$store.dispatch("taskUpdate",s).then(({msg:i})=>{$A.messageSuccess(i),typeof e=="function"&&e()}).catch(({msg:i})=>{$A.modalError(i)})},customLoop(){let t=this.taskDetail.loop||1;$A.Modal.confirm({render:a=>a("div",[a("div",{style:{fontSize:"16px",fontWeight:"500",marginBottom:"20px"}},this.$L("\u91CD\u590D\u5468\u671F")),a("Input",{style:{width:"160px",margin:"0 auto"},props:{type:"number",value:t,maxlength:3},on:{input:e=>{t=$.runNum(e)}}},[a("span",{slot:"prepend"},this.$L("\u6BCF")),a("span",{slot:"append"},this.$L("\u5929"))])]),onOk:a=>{this.$Modal.remove(),t>0&&this.updateData("loop",t)},loading:!0,okText:this.$L("\u786E\u5B9A"),cancelText:this.$L("\u53D6\u6D88")})},openOwner(){const t=this.getOwner.map(({userid:a})=>a);this.$set(this.taskDetail,"owner_userid",t),this.$set(this.ownerData,"owner_userid",t)},onOwner(t){let a={task_id:this.taskDetail.id,owner:this.ownerData.owner_userid};if(t===!0){if(this.getOwner.length>0){this.receiveShow=!1,$A.messageError("\u4EFB\u52A1\u5DF2\u88AB\u9886\u53D6");return}let e=$A.date2string(this.timeValue,"Y-m-d H:i");if(e[0]&&e[1])$A.rightExists(e[0],"00:00")&&$A.rightExists(e[1],"00:00")&&(e[1]=e[1].replace("00:00","23:59"));else{$A.messageError("\u8BF7\u8BBE\u7F6E\u8BA1\u5212\u65F6\u95F4");return}a.times=e,a.owner=this.ownerData.owner_userid=[this.userId]}$A.jsonStringify(this.taskDetail.owner_userid)!==$A.jsonStringify(this.ownerData.owner_userid)&&($A.count(a.owner)==0&&(a.owner=""),this.ownerLoad++,this.$store.dispatch("taskUpdate",a).then(({msg:e})=>{$A.messageSuccess(e),this.ownerLoad--,this.receiveShow=!1,this.$store.dispatch("getTaskOne",this.taskDetail.id).catch(()=>{})}).catch(({msg:e})=>{$A.modalError(e),this.ownerLoad--,this.receiveShow=!1}))},openAssist(){const t=this.getAssist.map(({userid:a})=>a);this.$set(this.taskDetail,"assist_userid",t),this.$set(this.assistData,"assist_userid",t),this.$set(this.assistData,"disabled",this.getOwner.map(({userid:a})=>a).filter(a=>a!=this.userId))},onAssist(){if($A.jsonStringify(this.taskDetail.assist_userid)!==$A.jsonStringify(this.assistData.assist_userid)){if(this.getOwner.find(({userid:t})=>t===this.userId)&&this.assistData.assist_userid.find(t=>t===this.userId)){$A.modalConfirm({content:"\u4F60\u5F53\u524D\u662F\u8D1F\u8D23\u4EBA\uFF0C\u786E\u5B9A\u8981\u8F6C\u4E3A\u534F\u52A9\u4EBA\u5458\u5417\uFF1F",cancelText:"\u53D6\u6D88",okText:"\u786E\u5B9A",onOk:()=>{this.onAssistConfirm()}});return}this.onAssistConfirm()}},onAssistConfirm(){let t=this.assistData.assist_userid;t.length===0&&(t=!1),this.assistLoad++,this.$store.dispatch("taskUpdate",{task_id:this.taskDetail.id,assist:t}).then(({msg:a})=>{$A.messageSuccess(a),this.assistLoad--,this.$store.dispatch("getTaskOne",this.taskDetail.id).catch(()=>{})}).catch(({msg:a})=>{$A.modalError(a),this.assistLoad--})},openTime(){this.timeOpen=!this.timeOpen,this.timeOpen&&(this.timeValue=this.taskDetail.end_at?[this.taskDetail.start_at,this.taskDetail.end_at]:[])},timeChange(t){t||(this.timeOpen=!1)},timeClear(){this.updateData("times",{start_at:!1,end_at:!1}),this.timeOpen=!1},timeOk(){let t=$A.date2string(this.timeValue,"Y-m-d H:i");t[0]&&t[1]&&$A.rightExists(t[0],"00:00")&&$A.rightExists(t[1],"00:00")&&(t[1]=t[1].replace("00:00","23:59")),this.updateData("times",{start_at:t[0],end_at:t[1]}),this.timeOpen=!1},addsubOpen(){this.addsubShow=!0,this.$nextTick(()=>{this.$refs.addsub.focus()})},addsubChackClose(){this.addsubName==""&&(this.addsubShow=!1)},addsubKeydown(t){if(t.keyCode===13){if(t.shiftKey||this.addsubLoad>0)return;t.preventDefault(),this.onAddsub()}},onAddsub(){if(this.addsubName==""){$A.messageError("\u4EFB\u52A1\u63CF\u8FF0\u4E0D\u80FD\u4E3A\u7A7A");return}this.addsubLoad++,this.$store.dispatch("taskAddSub",{task_id:this.taskDetail.id,name:this.addsubName}).then(({msg:t})=>{$A.messageSuccess(t),this.addsubLoad--,this.addsubName=""}).catch(({msg:t})=>{$A.modalError(t),this.addsubLoad--})},getLogLists(){this.navActive=="log"&&this.$refs.log.getLists(!0)},logLoadChange(t){this.logLoadIng=t},dropAdd(t){switch(t){case"priority":this.$set(this.taskDetail,"p_name",this.$L("\u672A\u8BBE\u7F6E")),this.$nextTick(()=>{this.$refs.priority.show()});break;case"assist":this.assistForce=!0,this.openAssist(),this.$nextTick(()=>{this.$refs.assist.handleClick()});break;case"times":this.timeForce=!0,this.$nextTick(()=>{this.openTime()});break;case"loop":this.loopForce=!0,this.$nextTick(()=>{this.$refs.loop.show()});break;case"file":this.onUploadClick(!0);break;case"subtask":this.addsubForce=!0,this.$nextTick(()=>{this.addsubOpen()});break}},onEventMore(t){["image","file"].includes(t)&&this.onUploadClick(!1)},onUploadClick(t){this.imageAttachment=!!t,this.$refs.upload.handleClick()},msgDialog(t=null,a=!1){this.sendLoad>0||this.openLoad>0||(a===!0?this.openLoad++:this.sendLoad++,this.$store.dispatch("call",{url:"project/task/dialog",data:{task_id:this.taskDetail.id}}).then(({data:e})=>{this.$store.dispatch("saveTask",{id:e.id,dialog_id:e.dialog_id}),this.$store.dispatch("saveDialog",e.dialog_data),$A.isSubElectron?this.resizeDialog().then(()=>{this.sendDialogMsg(t)}):this.$nextTick(()=>{if(this.windowSmall){$A.onBlur();const s={time:$A.Time()+10,msgRecord:this.msgRecord,msgFile:this.msgFile,msgText:typeof t=="string"&&t?t:this.msgText,dialogId:e.dialog_id};this.msgRecord={},this.msgFile=[],this.msgText="",this.$nextTick(i=>{this.dialogId>0&&this.$store.dispatch("openTask",0),this.$store.dispatch("openDialog",e.dialog_id).then(o=>{this.$store.state.dialogMsgTransfer=s})})}else this.sendDialogMsg(t)})}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{a===!0?this.openLoad--:this.sendLoad--}))},sendDialogMsg(t=null){this.msgFile.length>0?this.$refs.dialog.sendFileMsg(this.msgFile.map(a=>Object.assign(a,{ajaxExtraData:{image_attachment:this.imageAttachment?1:0}}))):this.msgText?this.$refs.dialog.sendMsg(this.msgText):typeof t=="string"&&t&&this.$refs.dialog.sendMsg(t),this.msgFile=[],this.msgText=""},taskPasteDrag(t,a){this.dialogDrag=!1;const e=a==="drag"?t.dataTransfer.files:t.clipboardData.files;this.msgFile=Array.prototype.slice.call(e),this.msgFile.length>0&&(t.preventDefault(),this.msgDialog())},taskDragOver(t,a){let e=this.__dialogDrag=$A.randomString(8);if(!t)setTimeout(()=>{e===this.__dialogDrag&&(this.dialogDrag=t)},150);else{if(a.dataTransfer.effectAllowed==="move")return;this.dialogDrag=!0}},onSelectFile(t){this.msgFile=$A.isArray(t)?t:[t],this.msgDialog()},onRecord(t){this.msgRecord=t,this.msgDialog()},onSend(t){this.$refs.chatInput&&this.$refs.chatInput.hidePopover(),t==="open"?this.msgDialog(null,!0):this.msgDialog(t)},deleteFile(t){this.$set(t,"_show_menu",!1),this.$store.dispatch("forgetTaskFile",t.id),this.$store.dispatch("call",{url:"project/task/filedelete",data:{file_id:t.id}}).catch(({msg:a})=>{$A.modalError(a),this.$store.dispatch("getTaskFiles",this.taskDetail.id)})},openMenu(t,a){const e=this.$refs[`taskMenu_${a.id}`];e&&e.handleClick(t)},openNewWin(){let t={title:this.taskDetail.name,titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,this.$el.clientWidth+72),height:Math.min(window.screen.availHeight,this.$el.clientHeight+72),minWidth:600,minHeight:450};this.hasOpenDialog&&(t.minWidth=800,t.minHeight=600),this.$Electron.sendMessage("windowRouter",{name:`task-${this.taskDetail.id}`,path:`/single/task/${this.taskDetail.id}?navActive=${this.navActive}`,force:!1,config:t}),this.$store.dispatch("openTask",0)},resizeDialog(){return new Promise(t=>{this.$Electron.sendMessage("windowSize",{width:Math.max(1100,this.windowWidth),height:Math.max(720,this.windowHeight),minWidth:800,minHeight:600,autoZoom:!0});let a=0,e=setInterval(()=>{a++,(this.$refs.dialog||a>20)&&(clearInterval(e),this.$refs.dialog&&t())},100)})},viewFile(t){if(["jpg","jpeg","gif","png"].includes(t.ext)){const e=this.fileList.filter(i=>["jpg","jpeg","gif","png"].includes(i.ext)),s=e.findIndex(i=>i.id===t.id);s>-1?this.$store.dispatch("previewImage",{index:s,list:e.map(i=>({src:i.path,width:i.width,height:i.height}))}):this.$store.dispatch("previewImage",{index:0,list:[{src:t.path,width:t.width,height:t.height}]});return}const a=`/single/file/task/${t.id}`;this.$Electron?this.$Electron.sendMessage("windowRouter",{name:`file-task-${t.id}`,path:a,userAgent:"/hideenOfficeTitle/",force:!1,config:{title:`${t.name} (${$A.bytesToSize(t.size)})`,titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)},webPreferences:{nodeIntegrationInSubFrames:t.ext==="drawio"}}):this.$isEEUiApp?$A.eeuiAppOpenPage({pageType:"app",pageTitle:`${t.name} (${$A.bytesToSize(t.size)})`,url:"web.js",params:{titleFixed:!0,allowAccess:!0,url:$A.rightDelete(window.location.href,window.location.hash)+`#${a}`}}):window.open($A.apiUrl(`..${a}`))},downFile(t){$A.modalConfirm({title:"\u4E0B\u8F7D\u6587\u4EF6",content:`${t.name} (${$A.bytesToSize(t.size)})`,okText:"\u7ACB\u5373\u4E0B\u8F7D",onOk:()=>{this.$store.dispatch("downUrl",$A.apiUrl(`project/task/filedown?file_id=${t.id}`))}})}}},l={};var T=r(x,A,L,!1,I,null,null,null);function I(t){for(let a in l)this[a]=l[a]}var z=function(){return T.exports}();export{z as T}; +import{n as r,d as c,m as u}from"./app.73f924cf.js";import h from"./TEditor.31ce405c.js";import{P as m,T as p}from"./ProjectLog.461799f7.js";import{U as f}from"./UserInput.38753002.js";import{C as k,D as g}from"./DialogWrapper.fc9d4c05.js";import{T as _}from"./TaskMenu.cafc760d.js";var v=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("Upload",{ref:"upload",attrs:{name:"files",action:"",multiple:"",format:t.uploadFormat,"show-upload-list":!1,"max-size":t.maxSize,"on-format-error":t.handleFormatError,"on-exceeded-size":t.handleMaxSize,"before-upload":t.handleBeforeUpload}})},D=[];const w={name:"TaskUpload",props:{maxSize:{type:Number,default:1024e3}},data(){return{uploadFormat:["jpg","jpeg","png","gif","doc","docx","xls","xlsx","ppt","pptx","txt","esp","pdf","rar","zip","gz","ai","avi","bmp","cdr","eps","mov","mp3","mp4","pr","psd","svg","tif"]}},methods:{handleFormatError(t){$A.modalWarning({title:"\u6587\u4EF6\u683C\u5F0F\u4E0D\u6B63\u786E",content:"\u6587\u4EF6 "+t.name+" \u683C\u5F0F\u4E0D\u6B63\u786E\uFF0C\u4EC5\u652F\u6301\u53D1\u9001\uFF1A"+this.uploadFormat.join(",")})},handleMaxSize(t){$A.modalWarning({title:"\u8D85\u51FA\u6587\u4EF6\u5927\u5C0F\u9650\u5236",content:"\u6587\u4EF6 "+t.name+" \u592A\u5927\uFF0C\u4E0D\u80FD\u53D1\u9001\u8D85\u8FC7"+$A.bytesToSize(this.maxSize*1024)+"\u3002"})},handleBeforeUpload(t){return this.$emit("on-select-file",t),!1},handleClick(){this.$refs.upload.handleClick()}}},n={};var b=r(w,v,D,!1,C,null,null,null);function C(t){for(let a in n)this[a]=n[a]}var y=function(){return b.exports}(),A=function(){var t=this,a=t.$createElement,e=t._self._c||a;return t.ready&&t.taskDetail.parent_id>0?e("li",[e("div",{staticClass:"subtask-icon"},[e("TaskMenu",{ref:`taskMenu_${t.taskDetail.id}`,attrs:{disabled:t.taskId===0,task:t.taskDetail,"load-status":t.taskDetail.loading===!0},on:{"on-update":t.getLogLists}})],1),t.taskDetail.flow_item_name?e("div",{staticClass:"subtask-flow"},[e("span",{class:t.taskDetail.flow_item_status,on:{click:function(s){return s.stopPropagation(),t.openMenu(s,t.taskDetail)}}},[t._v(t._s(t.taskDetail.flow_item_name))])]):t._e(),e("div",{staticClass:"subtask-name"},[e("Input",{ref:"name",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:8},maxlength:255,enterkeyhint:"done"},on:{"on-blur":function(s){return t.updateBlur("name")},"on-keydown":t.onNameKeydown},model:{value:t.taskDetail.name,callback:function(s){t.$set(t.taskDetail,"name",s)},expression:"taskDetail.name"}})],1),e("DatePicker",{staticClass:"subtask-time",attrs:{open:t.timeOpen,options:t.timeOptions,format:"yyyy/MM/dd HH:mm",type:"datetimerange",placement:"bottom-end",transfer:""},on:{"on-open-change":t.timeChange,"on-clear":t.timeClear,"on-ok":t.timeOk},model:{value:t.timeValue,callback:function(s){t.timeValue=s},expression:"timeValue"}},[!t.taskDetail.complete_at&&t.taskDetail.end_at&&t.taskDetail.end_at!=t.mainEndAt?e("div",{class:["time",t.taskDetail.today?"today":"",t.taskDetail.overdue?"overdue":""],on:{click:t.openTime}},[t._v(" "+t._s(t.expiresFormat(t.taskDetail.end_at))+" ")]):e("Icon",{staticClass:"clock",attrs:{type:"ios-clock-outline"},on:{click:t.openTime}})],1),e("Poptip",{ref:"owner",staticClass:"subtask-avatar",attrs:{"popper-class":"task-detail-user-popper",title:t.$L("\u4FEE\u6539\u8D1F\u8D23\u4EBA"),width:240,placement:"bottom",transfer:""},on:{"on-popper-show":t.openOwner,"on-ok":t.onOwner}},[e("div",{attrs:{slot:"content"},slot:"content"},[e("UserInput",{attrs:{"multiple-max":10,"project-id":t.taskDetail.project_id,placeholder:t.$L("\u9009\u62E9\u4EFB\u52A1\u8D1F\u8D23\u4EBA"),transfer:!1,"max-hidden-select":""},model:{value:t.ownerData.owner_userid,callback:function(s){t.$set(t.ownerData,"owner_userid",s)},expression:"ownerData.owner_userid"}}),e("div",{staticClass:"task-detail-avatar-buttons"},[e("Button",{attrs:{size:"small",type:"primary"},on:{click:function(s){return t.$refs.owner.ok()}}},[t._v(t._s(t.$L("\u786E\u5B9A")))])],1)],1),t.getOwner.length>0?t._l(t.getOwner,function(s){return e("UserAvatar",{key:s.userid,attrs:{userid:s.userid,size:20,tooltipDisabled:""}})}):e("div",[t._v("--")])],2)],1):t.ready?e("div",{class:{"task-detail":!0,"open-dialog":t.hasOpenDialog,completed:t.taskDetail.complete_at},style:t.taskDetailStyle},[e("div",{directives:[{name:"show",rawName:"v-show",value:t.taskDetail.id>0,expression:"taskDetail.id > 0"}],staticClass:"task-info"},[e("div",{staticClass:"head"},[e("TaskMenu",{ref:`taskMenu_${t.taskDetail.id}`,staticClass:"icon",attrs:{disabled:t.taskId===0,task:t.taskDetail,size:"medium","color-show":!1},on:{"on-update":t.getLogLists}}),t.taskDetail.flow_item_name?e("div",{staticClass:"flow"},[e("span",{class:t.taskDetail.flow_item_status,on:{click:function(s){return s.stopPropagation(),t.openMenu(s,t.taskDetail)}}},[t._v(t._s(t.taskDetail.flow_item_name))])]):t._e(),t.taskDetail.archived_at?e("div",{staticClass:"flow"},[e("span",{staticClass:"archived",on:{click:function(s){return s.stopPropagation(),t.openMenu(s,t.taskDetail)}}},[t._v(t._s(t.$L("\u5DF2\u5F52\u6863")))])]):t._e(),e("div",{staticClass:"nav"},[t.projectName?e("p",[e("span",[t._v(t._s(t.projectName))])]):t._e(),t.columnName?e("p",[e("span",[t._v(t._s(t.columnName))])]):t._e(),t.taskDetail.id?e("p",[e("span",[t._v(t._s(t.taskDetail.id))])]):t._e()]),e("div",{staticClass:"function"},[t.getOwner.length===0?e("EPopover",{attrs:{placement:"bottom"},model:{value:t.receiveShow,callback:function(s){t.receiveShow=s},expression:"receiveShow"}},[e("div",{staticClass:"task-detail-receive"},[e("div",{staticClass:"receive-title"},[e("Icon",{attrs:{type:"ios-help-circle"}}),t._v(" "+t._s(t.$L("\u786E\u8BA4\u8BA1\u5212\u65F6\u95F4\u9886\u53D6\u4EFB\u52A1"))+" ")],1),e("div",{staticClass:"receive-time"},[e("DatePicker",{attrs:{options:t.timeOptions,format:"yyyy/MM/dd HH:mm",type:"datetimerange",placeholder:t.$L("\u8BF7\u8BBE\u7F6E\u8BA1\u5212\u65F6\u95F4"),clearable:!1,editable:!1},model:{value:t.timeValue,callback:function(s){t.timeValue=s},expression:"timeValue"}})],1),e("div",{staticClass:"receive-bottom"},[e("Button",{attrs:{size:"small",type:"text"},on:{click:function(s){t.receiveShow=!1}}},[t._v("\u53D6\u6D88")]),e("Button",{attrs:{loading:t.ownerLoad>0,size:"small",type:"primary"},on:{click:function(s){return t.onOwner(!0)}}},[t._v("\u786E\u5B9A")])],1)]),e("Button",{staticClass:"pick",attrs:{slot:"reference",loading:t.ownerLoad>0,type:"primary"},slot:"reference"},[t._v(t._s(t.$L("\u6211\u8981\u9886\u53D6\u4EFB\u52A1")))])],1):t._e(),t.$Electron?e("ETooltip",{attrs:{disabled:t.windowSmall||t.$isEEUiApp,content:t.$L("\u65B0\u7A97\u53E3\u6253\u5F00")}},[e("i",{staticClass:"taskfont open",on:{click:t.openNewWin}},[t._v("\uE776")])]):t._e(),e("div",{staticClass:"menu"},[e("TaskMenu",{attrs:{disabled:t.taskId===0,task:t.taskDetail,icon:"ios-more","completed-icon":"ios-more",size:"medium","color-show":!1},on:{"on-update":t.getLogLists}})],1)],1)],1),e("div",{staticClass:"scroller scrollbar-overlay"},[e("div",{staticClass:"title"},[e("Input",{ref:"name",attrs:{type:"textarea",rows:1,autosize:{minRows:1,maxRows:8},maxlength:255,enterkeyhint:"done"},on:{"on-blur":function(s){return t.updateBlur("name")},"on-keydown":t.onNameKeydown},model:{value:t.taskDetail.name,callback:function(s){t.$set(t.taskDetail,"name",s)},expression:"taskDetail.name"}})],1),e("div",{staticClass:"desc"},[e("TEditor",{ref:"desc",attrs:{value:t.taskContent,plugins:t.taskPlugins,options:t.taskOptions,"option-full":t.taskOptionFull,placeholder:t.$L("\u8BE6\u7EC6\u63CF\u8FF0..."),inline:""},on:{"on-blur":function(s){return t.updateBlur("content")}}})],1),e("Form",{staticClass:"items",attrs:{"label-position":"left","label-width":"auto"},nativeOn:{submit:function(s){s.preventDefault()}}},[t.taskDetail.p_name?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE6EC")]),t._v(t._s(t.$L("\u4F18\u5148\u7EA7"))+" ")]),e("ul",{staticClass:"item-content"},[e("li",[e("EDropdown",{ref:"priority",attrs:{trigger:"click",placement:"bottom"},on:{command:function(s){return t.updateData("priority",s)}}},[e("TaskPriority",{attrs:{backgroundColor:t.taskDetail.p_color}},[t._v(t._s(t.taskDetail.p_name))]),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.taskPriority,function(s,i){return e("EDropdownItem",{key:i,attrs:{command:s}},[e("i",{staticClass:"taskfont",style:{color:s.color},domProps:{innerHTML:t._s(t.taskDetail.p_name==s.name?"":"")}}),t._v(" "+t._s(s.name)+" ")])}),1)],1)],1)])]):t._e(),t.getOwner.length>0?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE6E4")]),t._v(t._s(t.$L("\u8D1F\u8D23\u4EBA"))+" ")]),e("Poptip",{ref:"owner",staticClass:"item-content user",attrs:{title:t.$L("\u4FEE\u6539\u8D1F\u8D23\u4EBA"),width:240,"popper-class":"task-detail-user-popper",placement:"bottom",transfer:""},on:{"on-popper-show":t.openOwner,"on-ok":t.onOwner}},[e("div",{attrs:{slot:"content"},slot:"content"},[e("UserInput",{attrs:{"multiple-max":10,"project-id":t.taskDetail.project_id,placeholder:t.$L("\u9009\u62E9\u4EFB\u52A1\u8D1F\u8D23\u4EBA"),transfer:!1},model:{value:t.ownerData.owner_userid,callback:function(s){t.$set(t.ownerData,"owner_userid",s)},expression:"ownerData.owner_userid"}}),e("div",{staticClass:"task-detail-avatar-buttons"},[e("Button",{attrs:{size:"small",type:"primary"},on:{click:function(s){return t.$refs.owner.ok()}}},[t._v(t._s(t.$L("\u786E\u5B9A")))])],1)],1),e("div",{staticClass:"user-list"},t._l(t.getOwner,function(s){return e("UserAvatar",{key:s.userid,attrs:{userid:s.userid,size:28,showName:t.getOwner.length===1,tooltipDisabled:""}})}),1)])],1):t._e(),t.getAssist.length>0||t.assistForce?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE63F")]),t._v(t._s(t.$L("\u534F\u52A9\u4EBA\u5458"))+" ")]),e("Poptip",{ref:"assist",staticClass:"item-content user",attrs:{title:t.$L(t.getAssist.length>0?"\u4FEE\u6539\u534F\u52A9\u4EBA\u5458":"\u6DFB\u52A0\u534F\u52A9\u4EBA\u5458"),width:280,"popper-class":"task-detail-user-popper",placement:"bottom",transfer:""},on:{"on-popper-show":t.openAssist,"on-ok":t.onAssist}},[e("div",{attrs:{slot:"content"},slot:"content"},[e("UserInput",{attrs:{"multiple-max":10,"project-id":t.taskDetail.project_id,"disabled-choice":t.assistData.disabled,placeholder:t.$L("\u9009\u62E9\u4EFB\u52A1\u534F\u52A9\u4EBA\u5458"),transfer:!1},model:{value:t.assistData.assist_userid,callback:function(s){t.$set(t.assistData,"assist_userid",s)},expression:"assistData.assist_userid"}}),e("div",{staticClass:"task-detail-avatar-buttons"},[e("Button",{attrs:{size:"small",type:"primary"},on:{click:function(s){return t.$refs.assist.ok()}}},[t._v(t._s(t.$L("\u786E\u5B9A")))])],1)],1),t.getAssist.length>0?e("div",{staticClass:"user-list"},t._l(t.getAssist,function(s){return e("UserAvatar",{key:s.userid,attrs:{userid:s.userid,size:28,showName:t.getAssist.length===1,tooltipDisabled:""}})}),1):e("div",[t._v("--")])])],1):t._e(),t.taskDetail.end_at||t.timeForce?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE6E8")]),t._v(t._s(t.$L("\u622A\u6B62\u65F6\u95F4"))+" ")]),e("ul",{staticClass:"item-content"},[e("li",[e("DatePicker",{attrs:{open:t.timeOpen,options:t.timeOptions,format:"yyyy/MM/dd HH:mm",type:"datetimerange",transfer:""},on:{"on-open-change":t.timeChange,"on-clear":t.timeClear,"on-ok":t.timeOk},model:{value:t.timeValue,callback:function(s){t.timeValue=s},expression:"timeValue"}},[e("div",{staticClass:"picker-time"},[e("div",{staticClass:"time",on:{click:t.openTime}},[t._v(t._s(t.taskDetail.end_at?t.cutTime:"--"))]),!t.taskDetail.complete_at&&t.taskDetail.end_at?[t.within24Hours(t.taskDetail.end_at)?e("Tag",{attrs:{color:"blue"}},[e("i",{staticClass:"taskfont"},[t._v("\uE71D")]),t._v(t._s(t.expiresFormat(t.taskDetail.end_at)))]):t._e(),t.isOverdue(t.taskDetail)?e("Tag",{attrs:{color:"red"}},[t._v(t._s(t.$L("\u8D85\u671F\u672A\u5B8C\u6210")))]):t._e()]:t._e()],2)])],1)])]):t._e(),t.taskDetail.loop&&t.taskDetail.loop!="never"||t.loopForce?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE93F")]),t._v(t._s(t.$L("\u91CD\u590D\u5468\u671F"))+" ")]),e("ul",{staticClass:"item-content"},[e("li",[e("EDropdown",{ref:"loop",attrs:{trigger:"click",placement:"bottom"},on:{command:function(s){return t.updateData("loop",s)}}},[e("ETooltip",{attrs:{disabled:t.windowSmall||t.$isEEUiApp||!t.taskDetail.loop_at,content:`${t.$L("\u4E0B\u4E2A\u5468\u671F")}: ${t.taskDetail.loop_at}`,placement:"right"}},[e("span",[t._v(t._s(t.$L(t.loopLabel(t.taskDetail.loop))))])]),e("EDropdownMenu",{staticClass:"task-detail-loop",attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.loops,function(s){return e("EDropdownItem",{key:s.key,attrs:{command:s.key}},[t._v(" "+t._s(t.$L(s.label))+" ")])}),1)],1)],1)])]):t._e(),t.fileList.length>0?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE6E6")]),t._v(t._s(t.$L("\u9644\u4EF6"))+" ")]),e("ul",{staticClass:"item-content file"},[t.taskDetail.file_num>50?e("li",{staticClass:"tip"},[t._v(t._s(t.$L(`\u5171${t.taskDetail.file_num}\u4E2A\u6587\u4EF6\uFF0C\u4EC5\u663E\u793A\u6700\u65B050\u4E2A`)))]):t._e(),t._l(t.fileList,function(s){return e("li",[s.id?e("img",{staticClass:"file-ext",attrs:{src:s.thumb}}):e("Loading",{staticClass:"file-load"}),e("div",{staticClass:"file-name"},[t._v(t._s(s.name))]),e("div",{staticClass:"file-size"},[t._v(t._s(t.$A.bytesToSize(s.size)))]),e("div",{staticClass:"file-menu",class:{show:s._show_menu}},[e("Icon",{attrs:{type:"md-eye"},on:{click:function(i){return t.viewFile(s)}}}),e("Icon",{attrs:{type:"md-arrow-round-down"},on:{click:function(i){return t.downFile(s)}}}),e("EPopover",{staticClass:"file-delete",model:{value:s._show_menu,callback:function(i){t.$set(s,"_show_menu",i)},expression:"file._show_menu"}},[e("div",{staticClass:"task-detail-delete-file-popover"},[e("p",[t._v(t._s(t.$L("\u4F60\u786E\u5B9A\u8981\u5220\u9664\u8FD9\u4E2A\u6587\u4EF6\u5417\uFF1F")))]),e("div",{staticClass:"buttons"},[e("Button",{attrs:{size:"small",type:"text"},on:{click:function(i){s._show_menu=!1}}},[t._v(t._s(t.$L("\u53D6\u6D88")))]),e("Button",{attrs:{size:"small",type:"primary"},on:{click:function(i){return t.deleteFile(s)}}},[t._v(t._s(t.$L("\u786E\u5B9A")))])],1)]),e("i",{staticClass:"taskfont del",attrs:{slot:"reference"},slot:"reference"},[t._v("\uE6EA")])])],1)],1)})],2),e("ul",{staticClass:"item-content"},[e("li",[e("div",{staticClass:"add-button",on:{click:function(s){return t.onUploadClick(!0)}}},[e("i",{staticClass:"taskfont"},[t._v("\uE6F2")]),t._v(t._s(t.$L("\u6DFB\u52A0\u9644\u4EF6"))+" ")])])])]):t._e(),t.subList.length>0||t.addsubForce?e("FormItem",[e("div",{staticClass:"item-label",attrs:{slot:"label"},slot:"label"},[e("i",{staticClass:"taskfont"},[t._v("\uE6F0")]),t._v(t._s(t.$L("\u5B50\u4EFB\u52A1"))+" ")]),e("ul",{staticClass:"item-content subtask"},t._l(t.subList,function(s,i){return e("TaskDetail",{key:i,ref:`subTask_${s.id}`,refInFor:!0,attrs:{"task-id":s.id,"open-task":s,"main-end-at":t.taskDetail.end_at,"can-update-blur":t.canUpdateBlur}})}),1),e("ul",{class:["item-content",t.subList.length===0?"nosub":""]},[e("li",[t.addsubShow?e("Input",{ref:"addsub",staticClass:"add-input",class:{loading:t.addsubLoad>0},attrs:{placeholder:t.$L("+ \u8F93\u5165\u5B50\u4EFB\u52A1\uFF0C\u56DE\u8F66\u6DFB\u52A0\u5B50\u4EFB\u52A1"),icon:t.addsubLoad>0?"ios-loading":"",enterkeyhint:"done"},on:{"on-blur":t.addsubChackClose,"on-keydown":t.addsubKeydown},model:{value:t.addsubName,callback:function(s){t.addsubName=s},expression:"addsubName"}}):e("div",{staticClass:"add-button",on:{click:t.addsubOpen}},[e("i",{staticClass:"taskfont"},[t._v("\uE6F2")]),t._v(t._s(t.$L("\u6DFB\u52A0\u5B50\u4EFB\u52A1"))+" ")])],1)])]):t._e()],1),t.menuList.length>0?e("div",{staticClass:"add"},[e("EDropdown",{attrs:{trigger:"click",placement:"bottom"},on:{command:t.dropAdd}},[e("div",{staticClass:"add-button"},[e("i",{staticClass:"taskfont"},[t._v("\uE6F2")]),t._v(" "+t._s(t.$L("\u6DFB\u52A0"))+" "),e("em",[t._v(t._s(t.menuText))])]),e("EDropdownMenu",{attrs:{slot:"dropdown"},slot:"dropdown"},t._l(t.menuList,function(s,i){return e("EDropdownItem",{key:i,attrs:{command:s.command}},[e("div",{staticClass:"item"},[e("i",{staticClass:"taskfont",domProps:{innerHTML:t._s(s.icon)}}),t._v(t._s(t.$L(s.name))+" ")])])}),1)],1)],1):t._e()],1),e("TaskUpload",{ref:"upload",staticClass:"upload",on:{"on-select-file":t.onSelectFile}})],1),e("div",{directives:[{name:"show",rawName:"v-show",value:t.taskDetail.id>0,expression:"taskDetail.id > 0"}],staticClass:"task-dialog",style:t.dialogStyle},[t.hasOpenDialog?[t.taskId>0?e("DialogWrapper",{ref:"dialog",attrs:{"dialog-id":t.taskDetail.dialog_id}},[e("div",{staticClass:"head",attrs:{slot:"head"},slot:"head"},[e("Icon",{staticClass:"icon",attrs:{type:"ios-chatbubbles-outline"}}),e("div",{staticClass:"nav"},[e("p",{class:{active:t.navActive=="dialog"},on:{click:function(s){t.navActive="dialog"}}},[t._v(t._s(t.$L("\u804A\u5929")))]),e("p",{class:{active:t.navActive=="log"},on:{click:function(s){t.navActive="log"}}},[t._v(t._s(t.$L("\u52A8\u6001")))]),t.navActive=="log"?e("div",{staticClass:"refresh"},[t.logLoadIng?e("Loading"):e("Icon",{attrs:{type:"ios-refresh"},on:{click:t.getLogLists}})],1):t._e()])],1)]):t._e(),t.navActive=="log"&&t.taskId>0?e("ProjectLog",{ref:"log",attrs:{"task-id":t.taskDetail.id},on:{"on-load-change":t.logLoadChange}}):t._e()]:e("div",[e("div",{staticClass:"head"},[e("Icon",{staticClass:"icon",attrs:{type:"ios-chatbubbles-outline"}}),e("div",{staticClass:"nav"},[e("p",{class:{active:t.navActive=="dialog"},on:{click:function(s){t.navActive="dialog"}}},[t._v(t._s(t.$L("\u804A\u5929")))]),e("p",{class:{active:t.navActive=="log"},on:{click:function(s){t.navActive="log"}}},[t._v(t._s(t.$L("\u52A8\u6001")))]),t.navActive=="log"?e("div",{staticClass:"refresh"},[t.logLoadIng?e("Loading"):e("Icon",{attrs:{type:"ios-refresh"},on:{click:t.getLogLists}})],1):t._e()]),e("div",{staticClass:"menu"},[t.navActive=="dialog"&&t.taskDetail.msg_num>0?e("div",{staticClass:"menu-item",on:{click:function(s){return s.stopPropagation(),t.onSend("open")}}},[t.openLoad>0?e("div",{staticClass:"menu-load"},[e("Loading")],1):t._e(),t._v(" "+t._s(t.$L("\u4EFB\u52A1\u804A\u5929"))+" "),e("em",[t._v("("+t._s(t.taskDetail.msg_num>999?"999+":t.taskDetail.msg_num)+")")]),e("i",{staticClass:"taskfont"},[t._v("\uE703")])]):t._e()])],1),t.navActive=="log"&&t.taskId>0?e("ProjectLog",{ref:"log",attrs:{"task-id":t.taskDetail.id,"show-load":!1},on:{"on-load-change":t.logLoadChange}}):e("div",{staticClass:"no-dialog",on:{drop:function(s){return s.preventDefault(),t.taskPasteDrag(s,"drag")},dragover:function(s){return s.preventDefault(),t.taskDragOver(!0,s)},dragleave:function(s){return s.preventDefault(),t.taskDragOver(!1,s)}}},[e("div",{staticClass:"no-tip"},[t._v(t._s(t.$L("\u6682\u65E0\u6D88\u606F")))]),e("div",{staticClass:"no-input"},[e("ChatInput",{ref:"chatInput",attrs:{"task-id":t.taskId,loading:t.sendLoad>0,maxlength:2e5,placeholder:t.$L("\u8F93\u5165\u6D88\u606F...")},on:{"on-more":t.onEventMore,"on-file":t.onSelectFile,"on-record":t.onRecord,"on-send":t.onSend},model:{value:t.msgText,callback:function(s){t.msgText=s},expression:"msgText"}})],1),t.dialogDrag?e("div",{staticClass:"drag-over",on:{click:function(s){t.dialogDrag=!1}}},[e("div",{staticClass:"drag-text"},[t._v(t._s(t.$L("\u62D6\u52A8\u5230\u8FD9\u91CC\u53D1\u9001")))])]):t._e()])],1)],2),t.taskDetail.id?t._e():e("div",{staticClass:"task-load"},[e("Loading")],1)]):t._e()},L=[];const x={name:"TaskDetail",components:{ChatInput:k,TaskMenu:_,ProjectLog:m,DialogWrapper:g,TaskUpload:y,UserInput:f,TaskPriority:p,TEditor:h},props:{taskId:{type:Number,default:0},openTask:{type:Object,default:()=>({})},mainEndAt:{default:null},canUpdateBlur:{type:Boolean,default:!0},modalMode:{type:Boolean,default:!1}},data(){return{ready:!1,taskDetail:{},ownerData:{},ownerLoad:0,receiveShow:!1,assistForce:!1,assistData:{},assistLoad:0,addsubForce:!1,addsubShow:!1,addsubName:"",addsubLoad:0,timeForce:!1,timeOpen:!1,timeValue:[],timeOptions:{shortcuts:$A.timeOptionShortcuts()},loopForce:!1,nowTime:$A.Time(),nowInterval:null,msgText:"",msgFile:[],msgRecord:{},navActive:"dialog",logLoadIng:!1,sendLoad:0,openLoad:0,taskPlugins:["advlist autolink lists link image charmap print preview hr anchor pagebreak","searchreplace visualblocks visualchars code","insertdatetime media nonbreaking save table directionality","emoticons paste codesample","autoresize"],taskOptions:{statusbar:!1,menubar:!1,autoresize_bottom_margin:2,min_height:200,max_height:380,contextmenu:"bold italic underline forecolor backcolor | codesample | uploadImages imagePreview | preview screenload",valid_elements:"a[href|target=_blank],em,strong/b,div[align],span[style],a,br,p,img[src|alt|witdh|height],pre[class],code",toolbar:!1},taskOptionFull:{menubar:"file edit view",valid_elements:"a[href|target=_blank],em,strong/b,div[align],span[style],a,br,p,img[src|alt|witdh|height],pre[class],code",toolbar:"uploadImages | bold italic underline forecolor backcolor | codesample | preview screenload"},dialogDrag:!1,imageAttachment:!0,receiveTaskSubscribe:null,loops:[{key:"never",label:"\u4ECE\u4E0D"},{key:"day",label:"\u6BCF\u5929"},{key:"weekdays",label:"\u6BCF\u4E2A\u5DE5\u4F5C\u65E5"},{key:"week",label:"\u6BCF\u5468"},{key:"twoweeks",label:"\u6BCF\u4E24\u5468"},{key:"month",label:"\u6BCF\u6708"},{key:"year",label:"\u6BCF\u5E74"},{key:"custom",label:"\u81EA\u5B9A\u4E49"}]}},created(){const t=$A.getObject(this.$route.query,"navActive");["dialog","log"].includes(t)&&(this.navActive=t)},mounted(){this.nowInterval=setInterval(()=>{this.nowTime=$A.Time()},1e3),this.receiveTaskSubscribe=c.Store.subscribe("receiveTask",()=>{this.receiveShow=!0})},destroyed(){clearInterval(this.nowInterval),this.receiveTaskSubscribe&&(this.receiveTaskSubscribe.unsubscribe(),this.receiveTaskSubscribe=null)},computed:{...u(["cacheProjects","cacheColumns","cacheTasks","taskContents","taskFiles","taskPriority","dialogId"]),projectName(){if(!this.taskDetail.project_id)return"";if(this.taskDetail.project_name)return this.taskDetail.project_name;const t=this.cacheProjects.find(({id:a})=>a==this.taskDetail.project_id);return t?t.name:""},columnName(){if(!this.taskDetail.column_id)return"";if(this.taskDetail.column_name)return this.taskDetail.column_name;const t=this.cacheColumns.find(({id:a})=>a==this.taskDetail.column_id);return t?t.name:""},taskContent(){if(!this.taskId)return"";let t=this.taskContents.find(({task_id:a})=>a==this.taskId);return t?t.content:""},fileList(){return this.taskId?this.taskFiles.filter(({task_id:t})=>t==this.taskId).sort((t,a)=>a.id-t.id):[]},subList(){return this.taskId?this.cacheTasks.filter(t=>t.parent_id==this.taskId).sort((t,a)=>t.id-a.id):[]},hasOpenDialog(){return this.taskDetail.dialog_id>0&&this.windowLarge},dialogStyle(){const{windowHeight:t,hasOpenDialog:a}=this,e=Math.min(1100,t);if(!e)return{};if(!a)return{};const s=e>900?200:70;return{minHeight:e-s-48+"px"}},taskDetailStyle(){const{modalMode:t,windowHeight:a,hasOpenDialog:e}=this,s=Math.min(1100,a);if(t&&e){const i=s>900?200:70;return{maxHeight:s-i-30+"px"}}return{}},cutTime(){const{taskDetail:t}=this;let a=$A.Date(t.start_at,!0),e=$A.Date(t.end_at,!0),s="";return $A.formatDate("Y/m/d",a)==$A.formatDate("Y/m/d",e)?s=$A.formatDate("Y/m/d H:i",a)+" ~ "+$A.formatDate("H:i",e):$A.formatDate("Y",a)==$A.formatDate("Y",e)?(s=$A.formatDate("Y/m/d H:i",a)+" ~ "+$A.formatDate("m/d H:i",e),s=s.replace(/( 00:00| 23:59)/g,"")):(s=$A.formatDate("Y/m/d H:i",a)+" ~ "+$A.formatDate("Y/m/d H:i",e),s=s.replace(/( 00:00| 23:59)/g,"")),s},getOwner(){const{taskDetail:t}=this;return $A.isArray(t.task_user)?t.task_user.filter(({owner:a})=>a===1).sort((a,e)=>a.id-e.id):[]},getAssist(){const{taskDetail:t}=this;return $A.isArray(t.task_user)?t.task_user.filter(({owner:a})=>a!==1).sort((a,e)=>a.id-e.id):[]},menuList(){const{taskDetail:t}=this,a=[];return t.p_name||a.push({command:"priority",icon:"",name:"\u4F18\u5148\u7EA7"}),$A.isArray(t.task_user)&&t.task_user.find(({owner:e})=>e!==1)||a.push({command:"assist",icon:"",name:"\u534F\u52A9\u4EBA\u5458"}),t.end_at||a.push({command:"times",icon:"",name:"\u622A\u6B62\u65F6\u95F4"}),(!t.loop||t.loop=="never")&&a.push({command:"loop",icon:"",name:"\u91CD\u590D\u5468\u671F"}),this.fileList.length==0&&a.push({command:"file",icon:"",name:"\u9644\u4EF6"}),this.subList.length==0&&a.push({command:"subtask",icon:"",name:"\u5B50\u4EFB\u52A1"}),a},menuText(){const{menuList:t}=this;let a="";return t.length>0&&t.forEach((e,s)=>{s>0&&(a+=" / "),a+=this.$L(e.name)}),a}},watch:{openTask:{handler(t){this.taskDetail=$A.cloneJSON(t),this.__openTask&&clearTimeout(this.__openTask),this.__openTask=setTimeout(a=>{var e;return(e=this.$refs.name)==null?void 0:e.resizeTextarea()},100)},immediate:!0,deep:!0},taskId:{handler(t){t>0?this.ready=!0:(this.windowSmall&&$A.onBlur(),this.timeOpen=!1,this.timeForce=!1,this.loopForce=!1,this.assistForce=!1,this.addsubForce=!1,this.receiveShow=!1,this.$refs.owner&&this.$refs.owner.handleClose(),this.$refs.assist&&this.$refs.assist.handleClose(),this.$refs.chatInput&&this.$refs.chatInput.hidePopover())},immediate:!0},receiveShow(t){t&&(this.timeValue=this.taskDetail.end_at?[this.taskDetail.start_at,this.taskDetail.end_at]:[])}},methods:{within24Hours(t){return $A.Date(t,!0)-this.nowTime<86400},expiresFormat(t){return $A.countDownFormat(t,this.nowTime)},isOverdue(t){return t.overdue?!0:$A.Date(t.end_at,!0)e.key===t);return a?a.label:t?`\u6BCF${t}\u5929`:"\u4ECE\u4E0D"},onNameKeydown(t){t.keyCode===13&&(t.shiftKey||(t.preventDefault(),this.updateData("name")))},checkUpdate(t){let a=!1;if(this.openTask.name!=this.taskDetail.name)if(a=!0,t===!0)this.updateData("name");else return t===!1&&this.$refs.name.focus(),!0;if(this.$refs.desc&&this.$refs.desc.getContent()!=this.taskContent)if(a=!0,t===!0)this.updateData("content");else return t===!1&&this.$refs.desc.focus(),!0;if(this.addsubShow&&this.addsubName)if(a=!0,t===!0)this.onAddsub();else return t===!1&&this.$refs.addsub.focus(),!0;return this.subList.some(({id:e})=>{this.$refs[`subTask_${e}`][0].checkUpdate(t)&&(a=!0)}),a},updateBlur(t,a){this.canUpdateBlur&&this.updateData(t,a)},updateData(t,a){let e=null;switch(t){case"priority":this.$set(this.taskDetail,"p_level",a.priority),this.$set(this.taskDetail,"p_name",a.name),this.$set(this.taskDetail,"p_color",a.color),t=["p_level","p_name","p_color"];break;case"times":if(this.taskDetail.start_at&&(Math.abs($A.Time(this.taskDetail.start_at)-$A.Time(a.start_at))>60||Math.abs($A.Time(this.taskDetail.end_at)-$A.Time(a.end_at))>60)&&typeof a.desc=="undefined"){$A.modalInput({title:"\u4FEE\u6539\u4EFB\u52A1\u65F6\u95F4",placeholder:"\u8BF7\u8F93\u5165\u4FEE\u6539\u5907\u6CE8",okText:"\u786E\u5B9A",onOk:o=>o?(this.updateData("times",Object.assign(a,{desc:o})),!1):"\u8BF7\u8F93\u5165\u4FEE\u6539\u5907\u6CE8"});return}this.$set(this.taskDetail,"times",[a.start_at,a.end_at,a.desc]);break;case"loop":if(a==="custom"){this.customLoop();return}this.$set(this.taskDetail,"loop",a);break;case"content":const i=this.$refs.desc.getContent();if(i==this.taskContent)return;this.$set(this.taskDetail,"content",i),e=()=>{this.$store.dispatch("saveTaskContent",{task_id:this.taskId,content:i})};break}let s={task_id:this.taskDetail.id};($A.isArray(t)?t:[t]).forEach(i=>{let o=this.taskDetail[i],d=this.openTask[i];$A.jsonStringify(o)!=$A.jsonStringify(d)&&(s[i]=o)}),!(Object.keys(s).length<=1)&&this.$store.dispatch("taskUpdate",s).then(({msg:i})=>{$A.messageSuccess(i),typeof e=="function"&&e()}).catch(({msg:i})=>{$A.modalError(i)})},customLoop(){let t=this.taskDetail.loop||1;$A.Modal.confirm({render:a=>a("div",[a("div",{style:{fontSize:"16px",fontWeight:"500",marginBottom:"20px"}},this.$L("\u91CD\u590D\u5468\u671F")),a("Input",{style:{width:"160px",margin:"0 auto"},props:{type:"number",value:t,maxlength:3},on:{input:e=>{t=$.runNum(e)}}},[a("span",{slot:"prepend"},this.$L("\u6BCF")),a("span",{slot:"append"},this.$L("\u5929"))])]),onOk:a=>{this.$Modal.remove(),t>0&&this.updateData("loop",t)},loading:!0,okText:this.$L("\u786E\u5B9A"),cancelText:this.$L("\u53D6\u6D88")})},openOwner(){const t=this.getOwner.map(({userid:a})=>a);this.$set(this.taskDetail,"owner_userid",t),this.$set(this.ownerData,"owner_userid",t)},onOwner(t){let a={task_id:this.taskDetail.id,owner:this.ownerData.owner_userid};if(t===!0){if(this.getOwner.length>0){this.receiveShow=!1,$A.messageError("\u4EFB\u52A1\u5DF2\u88AB\u9886\u53D6");return}let e=$A.date2string(this.timeValue,"Y-m-d H:i");if(e[0]&&e[1])$A.rightExists(e[0],"00:00")&&$A.rightExists(e[1],"00:00")&&(e[1]=e[1].replace("00:00","23:59"));else{$A.messageError("\u8BF7\u8BBE\u7F6E\u8BA1\u5212\u65F6\u95F4");return}a.times=e,a.owner=this.ownerData.owner_userid=[this.userId]}$A.jsonStringify(this.taskDetail.owner_userid)!==$A.jsonStringify(this.ownerData.owner_userid)&&($A.count(a.owner)==0&&(a.owner=""),this.ownerLoad++,this.$store.dispatch("taskUpdate",a).then(({msg:e})=>{$A.messageSuccess(e),this.ownerLoad--,this.receiveShow=!1,this.$store.dispatch("getTaskOne",this.taskDetail.id).catch(()=>{})}).catch(({msg:e})=>{$A.modalError(e),this.ownerLoad--,this.receiveShow=!1}))},openAssist(){const t=this.getAssist.map(({userid:a})=>a);this.$set(this.taskDetail,"assist_userid",t),this.$set(this.assistData,"assist_userid",t),this.$set(this.assistData,"disabled",this.getOwner.map(({userid:a})=>a).filter(a=>a!=this.userId))},onAssist(){if($A.jsonStringify(this.taskDetail.assist_userid)!==$A.jsonStringify(this.assistData.assist_userid)){if(this.getOwner.find(({userid:t})=>t===this.userId)&&this.assistData.assist_userid.find(t=>t===this.userId)){$A.modalConfirm({content:"\u4F60\u5F53\u524D\u662F\u8D1F\u8D23\u4EBA\uFF0C\u786E\u5B9A\u8981\u8F6C\u4E3A\u534F\u52A9\u4EBA\u5458\u5417\uFF1F",cancelText:"\u53D6\u6D88",okText:"\u786E\u5B9A",onOk:()=>{this.onAssistConfirm()}});return}this.onAssistConfirm()}},onAssistConfirm(){let t=this.assistData.assist_userid;t.length===0&&(t=!1),this.assistLoad++,this.$store.dispatch("taskUpdate",{task_id:this.taskDetail.id,assist:t}).then(({msg:a})=>{$A.messageSuccess(a),this.assistLoad--,this.$store.dispatch("getTaskOne",this.taskDetail.id).catch(()=>{})}).catch(({msg:a})=>{$A.modalError(a),this.assistLoad--})},openTime(){this.timeOpen=!this.timeOpen,this.timeOpen&&(this.timeValue=this.taskDetail.end_at?[this.taskDetail.start_at,this.taskDetail.end_at]:[])},timeChange(t){t||(this.timeOpen=!1)},timeClear(){this.updateData("times",{start_at:!1,end_at:!1}),this.timeOpen=!1},timeOk(){let t=$A.date2string(this.timeValue,"Y-m-d H:i");t[0]&&t[1]&&$A.rightExists(t[0],"00:00")&&$A.rightExists(t[1],"00:00")&&(t[1]=t[1].replace("00:00","23:59")),this.updateData("times",{start_at:t[0],end_at:t[1]}),this.timeOpen=!1},addsubOpen(){this.addsubShow=!0,this.$nextTick(()=>{this.$refs.addsub.focus()})},addsubChackClose(){this.addsubName==""&&(this.addsubShow=!1)},addsubKeydown(t){if(t.keyCode===13){if(t.shiftKey||this.addsubLoad>0)return;t.preventDefault(),this.onAddsub()}},onAddsub(){if(this.addsubName==""){$A.messageError("\u4EFB\u52A1\u63CF\u8FF0\u4E0D\u80FD\u4E3A\u7A7A");return}this.addsubLoad++,this.$store.dispatch("taskAddSub",{task_id:this.taskDetail.id,name:this.addsubName}).then(({msg:t})=>{$A.messageSuccess(t),this.addsubLoad--,this.addsubName=""}).catch(({msg:t})=>{$A.modalError(t),this.addsubLoad--})},getLogLists(){this.navActive=="log"&&this.$refs.log.getLists(!0)},logLoadChange(t){this.logLoadIng=t},dropAdd(t){switch(t){case"priority":this.$set(this.taskDetail,"p_name",this.$L("\u672A\u8BBE\u7F6E")),this.$nextTick(()=>{this.$refs.priority.show()});break;case"assist":this.assistForce=!0,this.openAssist(),this.$nextTick(()=>{this.$refs.assist.handleClick()});break;case"times":this.timeForce=!0,this.$nextTick(()=>{this.openTime()});break;case"loop":this.loopForce=!0,this.$nextTick(()=>{this.$refs.loop.show()});break;case"file":this.onUploadClick(!0);break;case"subtask":this.addsubForce=!0,this.$nextTick(()=>{this.addsubOpen()});break}},onEventMore(t){["image","file"].includes(t)&&this.onUploadClick(!1)},onUploadClick(t){this.imageAttachment=!!t,this.$refs.upload.handleClick()},msgDialog(t=null,a=!1){this.sendLoad>0||this.openLoad>0||(a===!0?this.openLoad++:this.sendLoad++,this.$store.dispatch("call",{url:"project/task/dialog",data:{task_id:this.taskDetail.id}}).then(({data:e})=>{this.$store.dispatch("saveTask",{id:e.id,dialog_id:e.dialog_id}),this.$store.dispatch("saveDialog",e.dialog_data),$A.isSubElectron?this.resizeDialog().then(()=>{this.sendDialogMsg(t)}):this.$nextTick(()=>{if(this.windowSmall){$A.onBlur();const s={time:$A.Time()+10,msgRecord:this.msgRecord,msgFile:this.msgFile,msgText:typeof t=="string"&&t?t:this.msgText,dialogId:e.dialog_id};this.msgRecord={},this.msgFile=[],this.msgText="",this.$nextTick(i=>{this.dialogId>0&&this.$store.dispatch("openTask",0),this.$store.dispatch("openDialog",e.dialog_id).then(o=>{this.$store.state.dialogMsgTransfer=s})})}else this.sendDialogMsg(t)})}).catch(({msg:e})=>{$A.modalError(e)}).finally(e=>{a===!0?this.openLoad--:this.sendLoad--}))},sendDialogMsg(t=null){this.msgFile.length>0?this.$refs.dialog.sendFileMsg(this.msgFile.map(a=>Object.assign(a,{ajaxExtraData:{image_attachment:this.imageAttachment?1:0}}))):this.msgText?this.$refs.dialog.sendMsg(this.msgText):typeof t=="string"&&t&&this.$refs.dialog.sendMsg(t),this.msgFile=[],this.msgText=""},taskPasteDrag(t,a){this.dialogDrag=!1;const e=a==="drag"?t.dataTransfer.files:t.clipboardData.files;this.msgFile=Array.prototype.slice.call(e),this.msgFile.length>0&&(t.preventDefault(),this.msgDialog())},taskDragOver(t,a){let e=this.__dialogDrag=$A.randomString(8);if(!t)setTimeout(()=>{e===this.__dialogDrag&&(this.dialogDrag=t)},150);else{if(a.dataTransfer.effectAllowed==="move")return;this.dialogDrag=!0}},onSelectFile(t){this.msgFile=$A.isArray(t)?t:[t],this.msgDialog()},onRecord(t){this.msgRecord=t,this.msgDialog()},onSend(t){this.$refs.chatInput&&this.$refs.chatInput.hidePopover(),t==="open"?this.msgDialog(null,!0):this.msgDialog(t)},deleteFile(t){this.$set(t,"_show_menu",!1),this.$store.dispatch("forgetTaskFile",t.id),this.$store.dispatch("call",{url:"project/task/filedelete",data:{file_id:t.id}}).catch(({msg:a})=>{$A.modalError(a),this.$store.dispatch("getTaskFiles",this.taskDetail.id)})},openMenu(t,a){const e=this.$refs[`taskMenu_${a.id}`];e&&e.handleClick(t)},openNewWin(){let t={title:this.taskDetail.name,titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,this.$el.clientWidth+72),height:Math.min(window.screen.availHeight,this.$el.clientHeight+72),minWidth:600,minHeight:450};this.hasOpenDialog&&(t.minWidth=800,t.minHeight=600),this.$Electron.sendMessage("windowRouter",{name:`task-${this.taskDetail.id}`,path:`/single/task/${this.taskDetail.id}?navActive=${this.navActive}`,force:!1,config:t}),this.$store.dispatch("openTask",0)},resizeDialog(){return new Promise(t=>{this.$Electron.sendMessage("windowSize",{width:Math.max(1100,this.windowWidth),height:Math.max(720,this.windowHeight),minWidth:800,minHeight:600,autoZoom:!0});let a=0,e=setInterval(()=>{a++,(this.$refs.dialog||a>20)&&(clearInterval(e),this.$refs.dialog&&t())},100)})},viewFile(t){if(["jpg","jpeg","gif","png"].includes(t.ext)){const e=this.fileList.filter(i=>["jpg","jpeg","gif","png"].includes(i.ext)),s=e.findIndex(i=>i.id===t.id);s>-1?this.$store.dispatch("previewImage",{index:s,list:e.map(i=>({src:i.path,width:i.width,height:i.height}))}):this.$store.dispatch("previewImage",{index:0,list:[{src:t.path,width:t.width,height:t.height}]});return}const a=`/single/file/task/${t.id}`;this.$Electron?this.$Electron.sendMessage("windowRouter",{name:`file-task-${t.id}`,path:a,userAgent:"/hideenOfficeTitle/",force:!1,config:{title:`${t.name} (${$A.bytesToSize(t.size)})`,titleFixed:!0,parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)},webPreferences:{nodeIntegrationInSubFrames:t.ext==="drawio"}}):this.$isEEUiApp?$A.eeuiAppOpenPage({pageType:"app",pageTitle:`${t.name} (${$A.bytesToSize(t.size)})`,url:"web.js",params:{titleFixed:!0,allowAccess:!0,url:$A.rightDelete(window.location.href,window.location.hash)+`#${a}`}}):window.open($A.apiUrl(`..${a}`))},downFile(t){$A.modalConfirm({title:"\u4E0B\u8F7D\u6587\u4EF6",content:`${t.name} (${$A.bytesToSize(t.size)})`,okText:"\u7ACB\u5373\u4E0B\u8F7D",onOk:()=>{this.$store.dispatch("downUrl",$A.apiUrl(`project/task/filedown?file_id=${t.id}`))}})}}},l={};var T=r(x,A,L,!1,I,null,null,null);function I(t){for(let a in l)this[a]=l[a]}var z=function(){return T.exports}();export{z as T}; diff --git a/public/js/build/TaskMenu.01791002.js b/public/js/build/TaskMenu.cafc760d.js similarity index 96% rename from public/js/build/TaskMenu.01791002.js rename to public/js/build/TaskMenu.cafc760d.js index 102a10b46..0122183dd 100644 --- a/public/js/build/TaskMenu.01791002.js +++ b/public/js/build/TaskMenu.cafc760d.js @@ -1 +1 @@ -import{m as i,c as n,n as l}from"./app.256678e2.js";var r=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"task-menu-icon",on:{click:t.handleClick}},[t.loadIng?e("div",{staticClass:"loading"},[e("Loading")],1):[t.task.complete_at?e("Icon",{staticClass:"completed",attrs:{type:t.completedIcon}}):e("Icon",{staticClass:"uncomplete",attrs:{type:t.icon}})]],2)},c=[];const d={name:"TaskMenu",props:{task:{type:Object,default:()=>({})},loadStatus:{type:Boolean,default:!1},colorShow:{type:Boolean,default:!0},updateBefore:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{type:String,default:"small"},icon:{type:String,default:"md-radio-button-off"},completedIcon:{type:String,default:"md-checkmark-circle"}},computed:{...i(["loads","taskFlows"]),...n(["isLoad"]),loadIng(){return this.loadStatus?!0:this.isLoad(`task-${this.task.id}`)}},methods:{handleClick(t){this.$store.state.taskOperation={event:t,task:this.task,loadStatus:this.loadStatus,colorShow:this.colorShow,updateBefore:this.updateBefore,disabled:this.disabled,size:this.size,onUpdate:s=>{this.$emit("on-update",s)}}},updateTask(t){if(this.loadIng)return;Object.keys(t).forEach(e=>this.$set(this.task,e,t[e]));const s=Object.assign(t,{task_id:this.task.id});this.$store.dispatch("taskUpdate",s).then(({data:e,msg:o})=>{$A.messageSuccess(o),this.$store.dispatch("saveTaskBrowse",s.task_id),this.$emit("on-update",e)}).catch(({msg:e})=>{$A.modalError(e),this.$store.dispatch("getTaskOne",s.task_id).catch(()=>{})})}}},a={};var u=l(d,r,c,!1,p,null,null,null);function p(t){for(let s in a)this[s]=a[s]}var m=function(){return u.exports}();export{m as T}; +import{m as i,c as n,n as l}from"./app.73f924cf.js";var r=function(){var t=this,s=t.$createElement,e=t._self._c||s;return e("div",{staticClass:"task-menu-icon",on:{click:t.handleClick}},[t.loadIng?e("div",{staticClass:"loading"},[e("Loading")],1):[t.task.complete_at?e("Icon",{staticClass:"completed",attrs:{type:t.completedIcon}}):e("Icon",{staticClass:"uncomplete",attrs:{type:t.icon}})]],2)},c=[];const d={name:"TaskMenu",props:{task:{type:Object,default:()=>({})},loadStatus:{type:Boolean,default:!1},colorShow:{type:Boolean,default:!0},updateBefore:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{type:String,default:"small"},icon:{type:String,default:"md-radio-button-off"},completedIcon:{type:String,default:"md-checkmark-circle"}},computed:{...i(["loads","taskFlows"]),...n(["isLoad"]),loadIng(){return this.loadStatus?!0:this.isLoad(`task-${this.task.id}`)}},methods:{handleClick(t){this.$store.state.taskOperation={event:t,task:this.task,loadStatus:this.loadStatus,colorShow:this.colorShow,updateBefore:this.updateBefore,disabled:this.disabled,size:this.size,onUpdate:s=>{this.$emit("on-update",s)}}},updateTask(t){if(this.loadIng)return;Object.keys(t).forEach(e=>this.$set(this.task,e,t[e]));const s=Object.assign(t,{task_id:this.task.id});this.$store.dispatch("taskUpdate",s).then(({data:e,msg:o})=>{$A.messageSuccess(o),this.$store.dispatch("saveTaskBrowse",s.task_id),this.$emit("on-update",e)}).catch(({msg:e})=>{$A.modalError(e),this.$store.dispatch("getTaskOne",s.task_id).catch(()=>{})})}}},a={};var u=l(d,r,c,!1,p,null,null,null);function p(t){for(let s in a)this[s]=a[s]}var m=function(){return u.exports}();export{m as T}; diff --git a/public/js/build/UpdateLog.da8e7dae.js b/public/js/build/UpdateLog.90942793.js similarity index 94% rename from public/js/build/UpdateLog.da8e7dae.js rename to public/js/build/UpdateLog.90942793.js index e7f6d9220..6473dc3d1 100644 --- a/public/js/build/UpdateLog.da8e7dae.js +++ b/public/js/build/UpdateLog.90942793.js @@ -1 +1 @@ -import{n as s,p as r}from"./app.256678e2.js";var u=function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("Modal",{attrs:{fullscreen:t.uplogFull,"class-name":"update-log"},model:{value:t.uplogShow,callback:function(l){t.uplogShow=l},expression:"uplogShow"}},[e("div",{attrs:{slot:"header"},slot:"header"},[e("div",{staticClass:"uplog-head"},[e("div",{staticClass:"uplog-title"},[t._v(t._s(t.$L("\u66F4\u65B0\u65E5\u5FD7")))]),t.updateVer?e("Tag",{attrs:{color:"volcano"}},[t._v(t._s(t.updateVer))]):t._e()],1)]),e("MarkdownPreview",{staticClass:"uplog-body scrollbar-overlay",attrs:{initialValue:t.updateLog}}),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(l){t.uplogFull=!t.uplogFull}}},[t._v(t._s(t.$L(t.uplogFull?"\u7F29\u5C0F\u67E5\u770B":"\u5168\u5C4F\u67E5\u770B")))])],1)],1)},n=[];const p={name:"UpdateLog",components:{MarkdownPreview:r},props:{value:{type:Boolean,default:!1},updateVer:{},updateLog:{}},data(){return{uplogShow:!1,uplogFull:!1}},watch:{value:{handler(t){this.uplogShow=t},immediate:!0},uplogShow(t){this.$emit("input",t)}}},a={};var i=s(p,u,n,!1,c,null,null,null);function c(t){for(let o in a)this[o]=a[o]}var v=function(){return i.exports}();export{v as U}; +import{n as s,p as r}from"./app.73f924cf.js";var u=function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("Modal",{attrs:{fullscreen:t.uplogFull,"class-name":"update-log"},model:{value:t.uplogShow,callback:function(l){t.uplogShow=l},expression:"uplogShow"}},[e("div",{attrs:{slot:"header"},slot:"header"},[e("div",{staticClass:"uplog-head"},[e("div",{staticClass:"uplog-title"},[t._v(t._s(t.$L("\u66F4\u65B0\u65E5\u5FD7")))]),t.updateVer?e("Tag",{attrs:{color:"volcano"}},[t._v(t._s(t.updateVer))]):t._e()],1)]),e("MarkdownPreview",{staticClass:"uplog-body scrollbar-overlay",attrs:{initialValue:t.updateLog}}),e("div",{staticClass:"adaption",attrs:{slot:"footer"},slot:"footer"},[e("Button",{attrs:{type:"default"},on:{click:function(l){t.uplogFull=!t.uplogFull}}},[t._v(t._s(t.$L(t.uplogFull?"\u7F29\u5C0F\u67E5\u770B":"\u5168\u5C4F\u67E5\u770B")))])],1)],1)},n=[];const p={name:"UpdateLog",components:{MarkdownPreview:r},props:{value:{type:Boolean,default:!1},updateVer:{},updateLog:{}},data(){return{uplogShow:!1,uplogFull:!1}},watch:{value:{handler(t){this.uplogShow=t},immediate:!0},uplogShow(t){this.$emit("input",t)}}},a={};var i=s(p,u,n,!1,c,null,null,null);function c(t){for(let o in a)this[o]=a[o]}var v=function(){return i.exports}();export{v as U}; diff --git a/public/js/build/UserInput.6e7e4596.js b/public/js/build/UserInput.38753002.js similarity index 98% rename from public/js/build/UserInput.6e7e4596.js rename to public/js/build/UserInput.38753002.js index 2c8827c29..434dbd0a4 100644 --- a/public/js/build/UserInput.6e7e4596.js +++ b/public/js/build/UserInput.38753002.js @@ -1 +1 @@ -import{n as r,d as c}from"./app.256678e2.js";var u=function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("div",{class:["common-user",e.maxHiddenClass]},[t("Select",{ref:"select",attrs:{transfer:e.transfer,placeholder:e.placeholder,size:e.size,loading:e.loadIng>0,"loading-text":e.$L("\u52A0\u8F7D\u4E2D..."),"default-label":e.value,"default-event-object":!0,"multiple-max":e.multipleMax,"multiple-uncancelable":e.uncancelable,"remote-method":e.remoteMethod,multiple:"",filterable:"","transfer-class-name":"common-user-transfer"},on:{"on-query-change":e.searchUser,"on-open-change":e.openChange},model:{value:e.selects,callback:function(i){e.selects=i},expression:"selects"}},[e.multipleMax?t("div",{staticClass:"user-drop-prepend",attrs:{slot:"drop-prepend"},slot:"drop-prepend"},[t("div",{staticClass:"user-drop-text"},[e._v(" "+e._s(e.$L("\u6700\u591A\u53EA\u80FD\u9009\u62E9"+e.multipleMax+"\u4E2A"))+" "),e.selects.length?t("em",[e._v("("+e._s(e.$L(`\u5DF2\u9009${e.selects.length}\u4E2A`))+")")]):e._e()]),t("Checkbox",{staticClass:"user-drop-check",on:{"on-change":e.onMultipleChange},model:{value:e.multipleCheck,callback:function(i){e.multipleCheck=i},expression:"multipleCheck"}})],1):e._e(),e._t("option-prepend"),e._l(e.list,function(i,l){return t("Option",{key:l,attrs:{value:i.userid,"key-value":`${i.email}|${i.pinyin}`,label:i.nickname,avatar:i.userimg,disabled:e.isDisabled(i.userid)}},[t("div",{staticClass:"user-input-option"},[t("div",{staticClass:"user-input-avatar"},[t("EAvatar",{staticClass:"avatar",attrs:{src:i.userimg}})],1),i.bot?t("div",{staticClass:"taskfont user-input-bot"},[e._v("\uE68C")]):e._e(),t("div",{staticClass:"user-input-nickname"},[e._v(e._s(i.nickname))]),t("div",{staticClass:"user-input-userid"},[e._v("ID: "+e._s(i.userid))])])])})],2),e.loadIng>0?t("div",{staticClass:"common-user-loading"},[t("Loading")],1):e._e()],1)},h=[];const o={name:"UserInput",props:{value:{type:[String,Number,Array],default:""},uncancelable:{type:Array,default:()=>[]},disabledChoice:{type:Array,default:()=>[]},placeholder:{default:""},size:{default:"default"},transfer:{type:Boolean,default:!0},multipleMax:{type:Number},maxHiddenInput:{type:Boolean,default:!0},maxHiddenSelect:{type:Boolean,default:!1},projectId:{type:Number,default:0},noProjectId:{type:Number,default:0},dialogId:{type:Number,default:0},showBot:{type:Boolean,default:!1}},data(){return{loadIng:0,selects:[],list:[],multipleCheck:!1,searchKey:null,searchHistory:[],subscribe:null}},mounted(){this.subscribe=c.Store.subscribe("cacheUserActive",e=>{let s=this.list.findIndex(({userid:t})=>t==e.userid);s>-1&&(this.$set(this.list,s,Object.assign({},this.list[s],e)),this.handleSelectData())})},beforeDestroy(){this.subscribe&&(this.subscribe.unsubscribe(),this.subscribe=null)},computed:{maxHiddenClass(){const{multipleMax:e,maxHiddenInput:s,selects:t}=this;return e&&s&&t.length>=e?"hidden-input":""}},watch:{value:{handler(){const e=this._tmpId=$A.randomString(6);setTimeout(()=>{e===this._tmpId&&this.valueChange()},10)},immediate:!0},selects(e){this.$emit("input",e),this.maxHiddenSelect&&e.length>=this.maxHiddenSelect&&this.$refs.select&&this.$refs.select.hideMenu(),this.calcMultipleSelect()}},methods:{searchUser(e){typeof e!="string"&&(e=""),this.searchKey=e;const s=this.searchHistory.find(t=>t.key==e);s&&(this.list=s.data,this.calcMultipleSelect()),s||this.loadIng++,setTimeout(()=>{if(this.searchKey!=e){s||this.loadIng--;return}this.$store.dispatch("call",{url:"users/search",data:{keys:{key:e,project_id:this.projectId,no_project_id:this.noProjectId,dialog_id:this.dialogId,bot:this.showBot?2:0},take:50}}).then(({data:t})=>{this.list=t,this.calcMultipleSelect();const i=this.searchHistory.findIndex(n=>n.key==e),l={key:e,data:t,time:$A.Time()};i>-1?this.searchHistory.splice(i,1,l):this.searchHistory.push(l)}).catch(({msg:t})=>{this.list=[],this.calcMultipleSelect(),$A.messageWarning(t)}).finally(t=>{s||this.loadIng--})},this.searchHistory.length>0?300:0)},isDisabled(e){return this.disabledChoice.length===0?!1:this.disabledChoice.includes(e)},openChange(e){e&&this.$nextTick(this.searchUser),this.calcMultipleSelect()},remoteMethod(){},valueChange(){this.selects!=this.value&&($A.isArray(this.value)?this.selects=$A.cloneJSON(this.value):this.value?this.selects=[this.value]:this.selects=[],this.selects.some(e=>{this.list.find(s=>s.userid==e)||(this.list.push({userid:e,nickname:e}),this.calcMultipleSelect(),this.$store.dispatch("getUserBasic",{userid:e}))}))},handleSelectData(){this.__handleSelectTimeout&&clearTimeout(this.__handleSelectTimeout),this.__handleSelectTimeout=setTimeout(()=>{if(!this.$refs.select)return;const e=this.$refs.select.getValue();e&&e.some(s=>{const t=this.list.find(({userid:i})=>i==s.value);t&&(this.$set(s,"label",t.nickname),this.$set(s,"avatar",t.userimg))})},100)},calcMultipleSelect(){this.multipleMax&&this.list.length>0?(this.calcMultipleTime&&clearTimeout(this.calcMultipleTime),this.calcMultipleTime=setTimeout(e=>{let s=!0;this.$refs.select.selectOptions.some(({componentInstance:t})=>{this.selects.includes(t.value)||(s=!1)}),this.multipleCheck=s},10)):this.multipleCheck=!1},onMultipleChange(e){if(e){let s=this.multipleMax-this.selects.length;this.$refs.select.selectOptions.some(({componentInstance:t})=>{if(this.multipleMax&&s<=0)return this.$nextTick(i=>{$A.messageWarning("\u5DF2\u8D85\u8FC7\u6700\u5927\u9009\u62E9\u6570\u91CF"),this.multipleCheck=!1}),!0;this.selects.includes(t.value)||(t.select(),s--)})}else this.selects=[]}}},a={};var d=r(o,u,h,!1,p,null,null,null);function p(e){for(let s in a)this[s]=a[s]}var f=function(){return d.exports}();export{f as U}; +import{n as r,d as c}from"./app.73f924cf.js";var u=function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("div",{class:["common-user",e.maxHiddenClass]},[t("Select",{ref:"select",attrs:{transfer:e.transfer,placeholder:e.placeholder,size:e.size,loading:e.loadIng>0,"loading-text":e.$L("\u52A0\u8F7D\u4E2D..."),"default-label":e.value,"default-event-object":!0,"multiple-max":e.multipleMax,"multiple-uncancelable":e.uncancelable,"remote-method":e.remoteMethod,multiple:"",filterable:"","transfer-class-name":"common-user-transfer"},on:{"on-query-change":e.searchUser,"on-open-change":e.openChange},model:{value:e.selects,callback:function(i){e.selects=i},expression:"selects"}},[e.multipleMax?t("div",{staticClass:"user-drop-prepend",attrs:{slot:"drop-prepend"},slot:"drop-prepend"},[t("div",{staticClass:"user-drop-text"},[e._v(" "+e._s(e.$L("\u6700\u591A\u53EA\u80FD\u9009\u62E9"+e.multipleMax+"\u4E2A"))+" "),e.selects.length?t("em",[e._v("("+e._s(e.$L(`\u5DF2\u9009${e.selects.length}\u4E2A`))+")")]):e._e()]),t("Checkbox",{staticClass:"user-drop-check",on:{"on-change":e.onMultipleChange},model:{value:e.multipleCheck,callback:function(i){e.multipleCheck=i},expression:"multipleCheck"}})],1):e._e(),e._t("option-prepend"),e._l(e.list,function(i,l){return t("Option",{key:l,attrs:{value:i.userid,"key-value":`${i.email}|${i.pinyin}`,label:i.nickname,avatar:i.userimg,disabled:e.isDisabled(i.userid)}},[t("div",{staticClass:"user-input-option"},[t("div",{staticClass:"user-input-avatar"},[t("EAvatar",{staticClass:"avatar",attrs:{src:i.userimg}})],1),i.bot?t("div",{staticClass:"taskfont user-input-bot"},[e._v("\uE68C")]):e._e(),t("div",{staticClass:"user-input-nickname"},[e._v(e._s(i.nickname))]),t("div",{staticClass:"user-input-userid"},[e._v("ID: "+e._s(i.userid))])])])})],2),e.loadIng>0?t("div",{staticClass:"common-user-loading"},[t("Loading")],1):e._e()],1)},h=[];const o={name:"UserInput",props:{value:{type:[String,Number,Array],default:""},uncancelable:{type:Array,default:()=>[]},disabledChoice:{type:Array,default:()=>[]},placeholder:{default:""},size:{default:"default"},transfer:{type:Boolean,default:!0},multipleMax:{type:Number},maxHiddenInput:{type:Boolean,default:!0},maxHiddenSelect:{type:Boolean,default:!1},projectId:{type:Number,default:0},noProjectId:{type:Number,default:0},dialogId:{type:Number,default:0},showBot:{type:Boolean,default:!1}},data(){return{loadIng:0,selects:[],list:[],multipleCheck:!1,searchKey:null,searchHistory:[],subscribe:null}},mounted(){this.subscribe=c.Store.subscribe("cacheUserActive",e=>{let s=this.list.findIndex(({userid:t})=>t==e.userid);s>-1&&(this.$set(this.list,s,Object.assign({},this.list[s],e)),this.handleSelectData())})},beforeDestroy(){this.subscribe&&(this.subscribe.unsubscribe(),this.subscribe=null)},computed:{maxHiddenClass(){const{multipleMax:e,maxHiddenInput:s,selects:t}=this;return e&&s&&t.length>=e?"hidden-input":""}},watch:{value:{handler(){const e=this._tmpId=$A.randomString(6);setTimeout(()=>{e===this._tmpId&&this.valueChange()},10)},immediate:!0},selects(e){this.$emit("input",e),this.maxHiddenSelect&&e.length>=this.maxHiddenSelect&&this.$refs.select&&this.$refs.select.hideMenu(),this.calcMultipleSelect()}},methods:{searchUser(e){typeof e!="string"&&(e=""),this.searchKey=e;const s=this.searchHistory.find(t=>t.key==e);s&&(this.list=s.data,this.calcMultipleSelect()),s||this.loadIng++,setTimeout(()=>{if(this.searchKey!=e){s||this.loadIng--;return}this.$store.dispatch("call",{url:"users/search",data:{keys:{key:e,project_id:this.projectId,no_project_id:this.noProjectId,dialog_id:this.dialogId,bot:this.showBot?2:0},take:50}}).then(({data:t})=>{this.list=t,this.calcMultipleSelect();const i=this.searchHistory.findIndex(n=>n.key==e),l={key:e,data:t,time:$A.Time()};i>-1?this.searchHistory.splice(i,1,l):this.searchHistory.push(l)}).catch(({msg:t})=>{this.list=[],this.calcMultipleSelect(),$A.messageWarning(t)}).finally(t=>{s||this.loadIng--})},this.searchHistory.length>0?300:0)},isDisabled(e){return this.disabledChoice.length===0?!1:this.disabledChoice.includes(e)},openChange(e){e&&this.$nextTick(this.searchUser),this.calcMultipleSelect()},remoteMethod(){},valueChange(){this.selects!=this.value&&($A.isArray(this.value)?this.selects=$A.cloneJSON(this.value):this.value?this.selects=[this.value]:this.selects=[],this.selects.some(e=>{this.list.find(s=>s.userid==e)||(this.list.push({userid:e,nickname:e}),this.calcMultipleSelect(),this.$store.dispatch("getUserBasic",{userid:e}))}))},handleSelectData(){this.__handleSelectTimeout&&clearTimeout(this.__handleSelectTimeout),this.__handleSelectTimeout=setTimeout(()=>{if(!this.$refs.select)return;const e=this.$refs.select.getValue();e&&e.some(s=>{const t=this.list.find(({userid:i})=>i==s.value);t&&(this.$set(s,"label",t.nickname),this.$set(s,"avatar",t.userimg))})},100)},calcMultipleSelect(){this.multipleMax&&this.list.length>0?(this.calcMultipleTime&&clearTimeout(this.calcMultipleTime),this.calcMultipleTime=setTimeout(e=>{let s=!0;this.$refs.select.selectOptions.some(({componentInstance:t})=>{this.selects.includes(t.value)||(s=!1)}),this.multipleCheck=s},10)):this.multipleCheck=!1},onMultipleChange(e){if(e){let s=this.multipleMax-this.selects.length;this.$refs.select.selectOptions.some(({componentInstance:t})=>{if(this.multipleMax&&s<=0)return this.$nextTick(i=>{$A.messageWarning("\u5DF2\u8D85\u8FC7\u6700\u5927\u9009\u62E9\u6570\u91CF"),this.multipleCheck=!1}),!0;this.selects.includes(t.value)||(t.select(),s--)})}else this.selects=[]}}},a={};var d=r(o,u,h,!1,p,null,null,null);function p(e){for(let s in a)this[s]=a[s]}var f=function(){return d.exports}();export{f as U}; diff --git a/public/js/build/app.256678e2.js b/public/js/build/app.256678e2.js deleted file mode 100644 index 6da4c5079..000000000 --- a/public/js/build/app.256678e2.js +++ /dev/null @@ -1,341 +0,0 @@ -var UI={languageTypes:{zh:"\u7B80\u4F53\u4E2D\u6587","zh-CHT":"\u7E41\u9AD4\u4E2D\u6587",en:"English",ko:"\uD55C\uAD6D\uC5B4",ja:"\u65E5\u672C\u8A9E",de:"Deutsch",fr:"Fran\xE7ais",id:"Indonesia"},replaceArgumentsLanguage(n,o){let l=1;for(;n.indexOf("(*)")!==-1;)typeof o[l]=="object"?n=n.replace("(*)",""):n=n.replace("(*)",o[l]),l++;return n},replaceEscape(n){return!n||n==""?"":n.replace(/\(\*\)/g,"~%~").replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&").replace(/~%~/g,"(.*?)")},getLanguage(){let n=window.localStorage.getItem("__language:type__");if(typeof n=="string"&&typeof this.languageTypes[n]!="undefined")return n;n="en";let o=((window.navigator.language||navigator.userLanguage)+"").toLowerCase();switch(o){case"zh":case"cn":case"zh-cn":n="zh";break;case"zh-tw":case"zh-tr":case"zh-hk":case"zh-cnt":case"zh-cht":n="zh-CHT";break;default:typeof this.languageTypes[o]!="undefined"&&(n=o);break}return window.localStorage.setItem("__language:type__",n),n}};const Lc=UI,KI=Lc.languageTypes,Ba=Lc.getLanguage(),Ss={};function UH(n){if(!$A.isArray(n))return;const o=Object.assign(Object.keys(KI));n.some(l=>{let a=-1;l.key&&o.some(i=>{const r=l[i]||l.general||null;r&&typeof window.LANGUAGE_DATA[i]!="undefined"&&(a=window.LANGUAGE_DATA[i].push(r)-1)}),a>-1&&(window.LANGUAGE_DATA.key[l.key]=a)})}function KH(n){n!==void 0&&$A.modalConfirm({content:"\u5207\u6362\u8BED\u8A00\u9700\u8981\u5237\u65B0\u540E\u751F\u6548\uFF0C\u662F\u5426\u786E\u5B9A\u5237\u65B0\uFF1F",cancelText:"\u53D6\u6D88",okText:"\u786E\u5B9A",onOk:()=>{window.localStorage.setItem("__language:type__",n),$A.reloadUrl()}})}function gp(n){var l;if(typeof arguments[1]!="undefined")return gp(Lc.replaceArgumentsLanguage(n,arguments));if(typeof n!="string"||!n||typeof window.LANGUAGE_DATA=="undefined"||typeof window.LANGUAGE_DATA.key=="undefined"||typeof window.LANGUAGE_DATA[Ba]=="undefined")return n;const o=window.LANGUAGE_DATA.key[n]||-1;if(o>-1)return window.LANGUAGE_DATA[Ba][o]||n;if(typeof Ss[n]=="undefined"){Ss[n]=!1;for(let a in window.LANGUAGE_DATA.key)if(a.indexOf("(*)")>-1){const i=new RegExp("^"+Lc.replaceEscape(a)+"$","g");if(i.test(n)){let r=0;const c=window.LANGUAGE_DATA.key[a],f=(l=window.LANGUAGE_DATA[Ba][c]||a)==null?void 0:l.replace(/\(\*\)/g,function(){return"$"+ ++r});Ss[n]={rege:i,value:f};break}}}return Ss[n]?n.replace(Ss[n].rege,Ss[n].value):(window.systemInfo.debug==="yes"&&setTimeout(a=>{try{let i="__language:Undefined__",r=JSON.parse(window.localStorage.getItem(i)||"[]");$A.isArray(r)||(r=[]);let c=null;r.find(v=>(c=new RegExp("^"+v.replace(/\(\*\)/g,"(.*?)")+"$","g"),!!n.match(c)))||(r.push(n),window.localStorage.setItem(i,JSON.stringify(r)))}catch{}},10),n)}var Gi=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function GI(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function yp(n){if(n.__esModule)return n;var o=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(n).forEach(function(l){var a=Object.getOwnPropertyDescriptor(n,l);Object.defineProperty(o,l,a.get?a:{enumerable:!0,get:function(){return n[l]}})}),o}function Ku(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Gx={exports:{}};/*! - * jQuery JavaScript Library v3.6.1 - * https://jquery.com/ - * - * Includes Sizzle.js - * https://sizzlejs.com/ - * - * Copyright OpenJS Foundation and other contributors - * Released under the MIT license - * https://jquery.org/license - * - * Date: 2022-08-26T17:52Z - */(function(n){(function(o,l){n.exports=o.document?l(o,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return l(a)}})(typeof window!="undefined"?window:Gi,function(o,l){var a=[],i=Object.getPrototypeOf,r=a.slice,c=a.flat?function(S){return a.flat.call(S)}:function(S){return a.concat.apply([],S)},f=a.push,v=a.indexOf,e={},m=e.toString,d=e.hasOwnProperty,p=d.toString,_=p.call(Object),g={},y=function(A){return typeof A=="function"&&typeof A.nodeType!="number"&&typeof A.item!="function"},b=function(A){return A!=null&&A===A.window},E=o.document,T={type:!0,src:!0,nonce:!0,noModule:!0};function w(S,A,F){F=F||E;var j,q,ee=F.createElement("script");if(ee.text=S,A)for(j in T)q=A[j]||A.getAttribute&&A.getAttribute(j),q&&ee.setAttribute(j,q);F.head.appendChild(ee).parentNode.removeChild(ee)}function D(S){return S==null?S+"":typeof S=="object"||typeof S=="function"?e[m.call(S)]||"object":typeof S}var k="3.6.1",x=function(S,A){return new x.fn.init(S,A)};x.fn=x.prototype={jquery:k,constructor:x,length:0,toArray:function(){return r.call(this)},get:function(S){return S==null?r.call(this):S<0?this[S+this.length]:this[S]},pushStack:function(S){var A=x.merge(this.constructor(),S);return A.prevObject=this,A},each:function(S){return x.each(this,S)},map:function(S){return this.pushStack(x.map(this,function(A,F){return S.call(A,F,A)}))},slice:function(){return this.pushStack(r.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(x.grep(this,function(S,A){return(A+1)%2}))},odd:function(){return this.pushStack(x.grep(this,function(S,A){return A%2}))},eq:function(S){var A=this.length,F=+S+(S<0?A:0);return this.pushStack(F>=0&&F0&&A-1 in S}var I=function(S){var A,F,j,q,ee,le,$e,Oe,He,Ze,ft,Xe,nt,Nt,Qt,Lt,jn,Fn,br,Cn="sizzle"+1*new Date,qt=S.document,ir=0,un=0,Tn=ps(),ra=ps(),fs=ps(),Cr=ps(),Wi=function(me,Te){return me===Te&&(ft=!0),0},Ei={}.hasOwnProperty,Xn=[],ci=Xn.pop,xr=Xn.push,Di=Xn.push,oo=Xn.slice,Hi=function(me,Te){for(var Re=0,it=me.length;Re+~]|"+vn+")"+vn+"*"),xl=new RegExp(vn+"|>"),xa=new RegExp(hs),nf=new RegExp("^"+Oi+"$"),wa={ID:new RegExp("^#("+Oi+")"),CLASS:new RegExp("^\\.("+Oi+")"),TAG:new RegExp("^("+Oi+"|[*])"),ATTR:new RegExp("^"+bl),PSEUDO:new RegExp("^"+hs),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+vn+"*(even|odd|(([+-]|)(\\d*)n|)"+vn+"*(?:([+-]|)"+vn+"*(\\d+)|))"+vn+"*\\)|)","i"),bool:new RegExp("^(?:"+lo+")$","i"),needsContext:new RegExp("^"+vn+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+vn+"*((?:-\\d)?\\d*)"+vn+"*\\)|)(?=[^-]|$)","i")},Ir=/HTML$/i,rf=/^(?:input|select|textarea|button)$/i,uo=/^h\d$/i,Sa=/^[^{]+\{\s*\[native \w/,af=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,co=/[+~]/,ti=new RegExp("\\\\[\\da-fA-F]{1,6}"+vn+"?|\\\\([^\\r\\n\\f])","g"),$r=function(me,Te){var Re="0x"+me.slice(1)-65536;return Te||(Re<0?String.fromCharCode(Re+65536):String.fromCharCode(Re>>10|55296,Re&1023|56320))},fo=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ho=function(me,Te){return Te?me==="\0"?"\uFFFD":me.slice(0,-1)+"\\"+me.charCodeAt(me.length-1).toString(16)+" ":"\\"+me},po=function(){Xe()},sf=ms(function(me){return me.disabled===!0&&me.nodeName.toLowerCase()==="fieldset"},{dir:"parentNode",next:"legend"});try{Di.apply(Xn=oo.call(qt.childNodes),qt.childNodes),Xn[qt.childNodes.length].nodeType}catch{Di={apply:Xn.length?function(Te,Re){xr.apply(Te,oo.call(Re))}:function(Te,Re){for(var it=Te.length,Ke=0;Te[it++]=Re[Ke++];);Te.length=it-1}}}function wn(me,Te,Re,it){var Ke,lt,ht,St,Ot,Wt,Dt,Gt=Te&&Te.ownerDocument,sn=Te?Te.nodeType:9;if(Re=Re||[],typeof me!="string"||!me||sn!==1&&sn!==9&&sn!==11)return Re;if(!it&&(Xe(Te),Te=Te||nt,Qt)){if(sn!==11&&(Ot=af.exec(me)))if(Ke=Ot[1]){if(sn===9)if(ht=Te.getElementById(Ke)){if(ht.id===Ke)return Re.push(ht),Re}else return Re;else if(Gt&&(ht=Gt.getElementById(Ke))&&br(Te,ht)&&ht.id===Ke)return Re.push(ht),Re}else{if(Ot[2])return Di.apply(Re,Te.getElementsByTagName(me)),Re;if((Ke=Ot[3])&&F.getElementsByClassName&&Te.getElementsByClassName)return Di.apply(Re,Te.getElementsByClassName(Ke)),Re}if(F.qsa&&!Cr[me+" "]&&(!Lt||!Lt.test(me))&&(sn!==1||Te.nodeName.toLowerCase()!=="object")){if(Dt=me,Gt=Te,sn===1&&(xl.test(me)||Cl.test(me))){for(Gt=co.test(me)&&ia(Te.parentNode)||Te,(Gt!==Te||!F.scope)&&((St=Te.getAttribute("id"))?St=St.replace(fo,ho):Te.setAttribute("id",St=Cn)),Wt=le(me),lt=Wt.length;lt--;)Wt[lt]=(St?"#"+St:":scope")+" "+Ea(Wt[lt]);Dt=Wt.join(",")}try{return Di.apply(Re,Gt.querySelectorAll(Dt)),Re}catch{Cr(me,!0)}finally{St===Cn&&Te.removeAttribute("id")}}}return Oe(me.replace(Ca,"$1"),Te,Re,it)}function ps(){var me=[];function Te(Re,it){return me.push(Re+" ")>j.cacheLength&&delete Te[me.shift()],Te[Re+" "]=it}return Te}function Ar(me){return me[Cn]=!0,me}function dr(me){var Te=nt.createElement("fieldset");try{return!!me(Te)}catch{return!1}finally{Te.parentNode&&Te.parentNode.removeChild(Te),Te=null}}function vs(me,Te){for(var Re=me.split("|"),it=Re.length;it--;)j.attrHandle[Re[it]]=Te}function vo(me,Te){var Re=Te&&me,it=Re&&me.nodeType===1&&Te.nodeType===1&&me.sourceIndex-Te.sourceIndex;if(it)return it;if(Re){for(;Re=Re.nextSibling;)if(Re===Te)return-1}return me?1:-1}function of(me){return function(Te){var Re=Te.nodeName.toLowerCase();return Re==="input"&&Te.type===me}}function lf(me){return function(Te){var Re=Te.nodeName.toLowerCase();return(Re==="input"||Re==="button")&&Te.type===me}}function wl(me){return function(Te){return"form"in Te?Te.parentNode&&Te.disabled===!1?"label"in Te?"label"in Te.parentNode?Te.parentNode.disabled===me:Te.disabled===me:Te.isDisabled===me||Te.isDisabled!==!me&&sf(Te)===me:Te.disabled===me:"label"in Te?Te.disabled===me:!1}}function ki(me){return Ar(function(Te){return Te=+Te,Ar(function(Re,it){for(var Ke,lt=me([],Re.length,Te),ht=lt.length;ht--;)Re[Ke=lt[ht]]&&(Re[Ke]=!(it[Ke]=Re[Ke]))})})}function ia(me){return me&&typeof me.getElementsByTagName!="undefined"&&me}F=wn.support={},ee=wn.isXML=function(me){var Te=me&&me.namespaceURI,Re=me&&(me.ownerDocument||me).documentElement;return!Ir.test(Te||Re&&Re.nodeName||"HTML")},Xe=wn.setDocument=function(me){var Te,Re,it=me?me.ownerDocument||me:qt;return it==nt||it.nodeType!==9||!it.documentElement||(nt=it,Nt=nt.documentElement,Qt=!ee(nt),qt!=nt&&(Re=nt.defaultView)&&Re.top!==Re&&(Re.addEventListener?Re.addEventListener("unload",po,!1):Re.attachEvent&&Re.attachEvent("onunload",po)),F.scope=dr(function(Ke){return Nt.appendChild(Ke).appendChild(nt.createElement("div")),typeof Ke.querySelectorAll!="undefined"&&!Ke.querySelectorAll(":scope fieldset div").length}),F.attributes=dr(function(Ke){return Ke.className="i",!Ke.getAttribute("className")}),F.getElementsByTagName=dr(function(Ke){return Ke.appendChild(nt.createComment("")),!Ke.getElementsByTagName("*").length}),F.getElementsByClassName=Sa.test(nt.getElementsByClassName),F.getById=dr(function(Ke){return Nt.appendChild(Ke).id=Cn,!nt.getElementsByName||!nt.getElementsByName(Cn).length}),F.getById?(j.filter.ID=function(Ke){var lt=Ke.replace(ti,$r);return function(ht){return ht.getAttribute("id")===lt}},j.find.ID=function(Ke,lt){if(typeof lt.getElementById!="undefined"&&Qt){var ht=lt.getElementById(Ke);return ht?[ht]:[]}}):(j.filter.ID=function(Ke){var lt=Ke.replace(ti,$r);return function(ht){var St=typeof ht.getAttributeNode!="undefined"&&ht.getAttributeNode("id");return St&&St.value===lt}},j.find.ID=function(Ke,lt){if(typeof lt.getElementById!="undefined"&&Qt){var ht,St,Ot,Wt=lt.getElementById(Ke);if(Wt){if(ht=Wt.getAttributeNode("id"),ht&&ht.value===Ke)return[Wt];for(Ot=lt.getElementsByName(Ke),St=0;Wt=Ot[St++];)if(ht=Wt.getAttributeNode("id"),ht&&ht.value===Ke)return[Wt]}return[]}}),j.find.TAG=F.getElementsByTagName?function(Ke,lt){if(typeof lt.getElementsByTagName!="undefined")return lt.getElementsByTagName(Ke);if(F.qsa)return lt.querySelectorAll(Ke)}:function(Ke,lt){var ht,St=[],Ot=0,Wt=lt.getElementsByTagName(Ke);if(Ke==="*"){for(;ht=Wt[Ot++];)ht.nodeType===1&&St.push(ht);return St}return Wt},j.find.CLASS=F.getElementsByClassName&&function(Ke,lt){if(typeof lt.getElementsByClassName!="undefined"&&Qt)return lt.getElementsByClassName(Ke)},jn=[],Lt=[],(F.qsa=Sa.test(nt.querySelectorAll))&&(dr(function(Ke){var lt;Nt.appendChild(Ke).innerHTML="
",Ke.querySelectorAll("[msallowcapture^='']").length&&Lt.push("[*^$]="+vn+`*(?:''|"")`),Ke.querySelectorAll("[selected]").length||Lt.push("\\["+vn+"*(?:value|"+lo+")"),Ke.querySelectorAll("[id~="+Cn+"-]").length||Lt.push("~="),lt=nt.createElement("input"),lt.setAttribute("name",""),Ke.appendChild(lt),Ke.querySelectorAll("[name='']").length||Lt.push("\\["+vn+"*name"+vn+"*="+vn+`*(?:''|"")`),Ke.querySelectorAll(":checked").length||Lt.push(":checked"),Ke.querySelectorAll("a#"+Cn+"+*").length||Lt.push(".#.+[+~]"),Ke.querySelectorAll("\\\f"),Lt.push("[\\r\\n\\f]")}),dr(function(Ke){Ke.innerHTML="";var lt=nt.createElement("input");lt.setAttribute("type","hidden"),Ke.appendChild(lt).setAttribute("name","D"),Ke.querySelectorAll("[name=d]").length&&Lt.push("name"+vn+"*[*^$|!~]?="),Ke.querySelectorAll(":enabled").length!==2&&Lt.push(":enabled",":disabled"),Nt.appendChild(Ke).disabled=!0,Ke.querySelectorAll(":disabled").length!==2&&Lt.push(":enabled",":disabled"),Ke.querySelectorAll("*,:x"),Lt.push(",.*:")})),(F.matchesSelector=Sa.test(Fn=Nt.matches||Nt.webkitMatchesSelector||Nt.mozMatchesSelector||Nt.oMatchesSelector||Nt.msMatchesSelector))&&dr(function(Ke){F.disconnectedMatch=Fn.call(Ke,"*"),Fn.call(Ke,"[s!='']:x"),jn.push("!=",hs)}),Lt=Lt.length&&new RegExp(Lt.join("|")),jn=jn.length&&new RegExp(jn.join("|")),Te=Sa.test(Nt.compareDocumentPosition),br=Te||Sa.test(Nt.contains)?function(Ke,lt){var ht=Ke.nodeType===9?Ke.documentElement:Ke,St=lt&<.parentNode;return Ke===St||!!(St&&St.nodeType===1&&(ht.contains?ht.contains(St):Ke.compareDocumentPosition&&Ke.compareDocumentPosition(St)&16))}:function(Ke,lt){if(lt){for(;lt=lt.parentNode;)if(lt===Ke)return!0}return!1},Wi=Te?function(Ke,lt){if(Ke===lt)return ft=!0,0;var ht=!Ke.compareDocumentPosition-!lt.compareDocumentPosition;return ht||(ht=(Ke.ownerDocument||Ke)==(lt.ownerDocument||lt)?Ke.compareDocumentPosition(lt):1,ht&1||!F.sortDetached&<.compareDocumentPosition(Ke)===ht?Ke==nt||Ke.ownerDocument==qt&&br(qt,Ke)?-1:lt==nt||lt.ownerDocument==qt&&br(qt,lt)?1:Ze?Hi(Ze,Ke)-Hi(Ze,lt):0:ht&4?-1:1)}:function(Ke,lt){if(Ke===lt)return ft=!0,0;var ht,St=0,Ot=Ke.parentNode,Wt=lt.parentNode,Dt=[Ke],Gt=[lt];if(!Ot||!Wt)return Ke==nt?-1:lt==nt?1:Ot?-1:Wt?1:Ze?Hi(Ze,Ke)-Hi(Ze,lt):0;if(Ot===Wt)return vo(Ke,lt);for(ht=Ke;ht=ht.parentNode;)Dt.unshift(ht);for(ht=lt;ht=ht.parentNode;)Gt.unshift(ht);for(;Dt[St]===Gt[St];)St++;return St?vo(Dt[St],Gt[St]):Dt[St]==qt?-1:Gt[St]==qt?1:0}),nt},wn.matches=function(me,Te){return wn(me,null,null,Te)},wn.matchesSelector=function(me,Te){if(Xe(me),F.matchesSelector&&Qt&&!Cr[Te+" "]&&(!jn||!jn.test(Te))&&(!Lt||!Lt.test(Te)))try{var Re=Fn.call(me,Te);if(Re||F.disconnectedMatch||me.document&&me.document.nodeType!==11)return Re}catch{Cr(Te,!0)}return wn(Te,nt,null,[me]).length>0},wn.contains=function(me,Te){return(me.ownerDocument||me)!=nt&&Xe(me),br(me,Te)},wn.attr=function(me,Te){(me.ownerDocument||me)!=nt&&Xe(me);var Re=j.attrHandle[Te.toLowerCase()],it=Re&&Ei.call(j.attrHandle,Te.toLowerCase())?Re(me,Te,!Qt):void 0;return it!==void 0?it:F.attributes||!Qt?me.getAttribute(Te):(it=me.getAttributeNode(Te))&&it.specified?it.value:null},wn.escape=function(me){return(me+"").replace(fo,ho)},wn.error=function(me){throw new Error("Syntax error, unrecognized expression: "+me)},wn.uniqueSort=function(me){var Te,Re=[],it=0,Ke=0;if(ft=!F.detectDuplicates,Ze=!F.sortStable&&me.slice(0),me.sort(Wi),ft){for(;Te=me[Ke++];)Te===me[Ke]&&(it=Re.push(Ke));for(;it--;)me.splice(Re[it],1)}return Ze=null,me},q=wn.getText=function(me){var Te,Re="",it=0,Ke=me.nodeType;if(Ke){if(Ke===1||Ke===9||Ke===11){if(typeof me.textContent=="string")return me.textContent;for(me=me.firstChild;me;me=me.nextSibling)Re+=q(me)}else if(Ke===3||Ke===4)return me.nodeValue}else for(;Te=me[it++];)Re+=q(Te);return Re},j=wn.selectors={cacheLength:50,createPseudo:Ar,match:wa,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(me){return me[1]=me[1].replace(ti,$r),me[3]=(me[3]||me[4]||me[5]||"").replace(ti,$r),me[2]==="~="&&(me[3]=" "+me[3]+" "),me.slice(0,4)},CHILD:function(me){return me[1]=me[1].toLowerCase(),me[1].slice(0,3)==="nth"?(me[3]||wn.error(me[0]),me[4]=+(me[4]?me[5]+(me[6]||1):2*(me[3]==="even"||me[3]==="odd")),me[5]=+(me[7]+me[8]||me[3]==="odd")):me[3]&&wn.error(me[0]),me},PSEUDO:function(me){var Te,Re=!me[6]&&me[2];return wa.CHILD.test(me[0])?null:(me[3]?me[2]=me[4]||me[5]||"":Re&&xa.test(Re)&&(Te=le(Re,!0))&&(Te=Re.indexOf(")",Re.length-Te)-Re.length)&&(me[0]=me[0].slice(0,Te),me[2]=Re.slice(0,Te)),me.slice(0,3))}},filter:{TAG:function(me){var Te=me.replace(ti,$r).toLowerCase();return me==="*"?function(){return!0}:function(Re){return Re.nodeName&&Re.nodeName.toLowerCase()===Te}},CLASS:function(me){var Te=Tn[me+" "];return Te||(Te=new RegExp("(^|"+vn+")"+me+"("+vn+"|$)"))&&Tn(me,function(Re){return Te.test(typeof Re.className=="string"&&Re.className||typeof Re.getAttribute!="undefined"&&Re.getAttribute("class")||"")})},ATTR:function(me,Te,Re){return function(it){var Ke=wn.attr(it,me);return Ke==null?Te==="!=":Te?(Ke+="",Te==="="?Ke===Re:Te==="!="?Ke!==Re:Te==="^="?Re&&Ke.indexOf(Re)===0:Te==="*="?Re&&Ke.indexOf(Re)>-1:Te==="$="?Re&&Ke.slice(-Re.length)===Re:Te==="~="?(" "+Ke.replace(ef," ")+" ").indexOf(Re)>-1:Te==="|="?Ke===Re||Ke.slice(0,Re.length+1)===Re+"-":!1):!0}},CHILD:function(me,Te,Re,it,Ke){var lt=me.slice(0,3)!=="nth",ht=me.slice(-4)!=="last",St=Te==="of-type";return it===1&&Ke===0?function(Ot){return!!Ot.parentNode}:function(Ot,Wt,Dt){var Gt,sn,xn,Ht,Vn,er,fr=lt!==ht?"nextSibling":"previousSibling",ln=Ot.parentNode,zr=St&&Ot.nodeName.toLowerCase(),Oa=!Dt&&!St,wr=!1;if(ln){if(lt){for(;fr;){for(Ht=Ot;Ht=Ht[fr];)if(St?Ht.nodeName.toLowerCase()===zr:Ht.nodeType===1)return!1;er=fr=me==="only"&&!er&&"nextSibling"}return!0}if(er=[ht?ln.firstChild:ln.lastChild],ht&&Oa){for(Ht=ln,xn=Ht[Cn]||(Ht[Cn]={}),sn=xn[Ht.uniqueID]||(xn[Ht.uniqueID]={}),Gt=sn[me]||[],Vn=Gt[0]===ir&&Gt[1],wr=Vn&&Gt[2],Ht=Vn&&ln.childNodes[Vn];Ht=++Vn&&Ht&&Ht[fr]||(wr=Vn=0)||er.pop();)if(Ht.nodeType===1&&++wr&&Ht===Ot){sn[me]=[ir,Vn,wr];break}}else if(Oa&&(Ht=Ot,xn=Ht[Cn]||(Ht[Cn]={}),sn=xn[Ht.uniqueID]||(xn[Ht.uniqueID]={}),Gt=sn[me]||[],Vn=Gt[0]===ir&&Gt[1],wr=Vn),wr===!1)for(;(Ht=++Vn&&Ht&&Ht[fr]||(wr=Vn=0)||er.pop())&&!((St?Ht.nodeName.toLowerCase()===zr:Ht.nodeType===1)&&++wr&&(Oa&&(xn=Ht[Cn]||(Ht[Cn]={}),sn=xn[Ht.uniqueID]||(xn[Ht.uniqueID]={}),sn[me]=[ir,wr]),Ht===Ot)););return wr-=Ke,wr===it||wr%it===0&&wr/it>=0}}},PSEUDO:function(me,Te){var Re,it=j.pseudos[me]||j.setFilters[me.toLowerCase()]||wn.error("unsupported pseudo: "+me);return it[Cn]?it(Te):it.length>1?(Re=[me,me,"",Te],j.setFilters.hasOwnProperty(me.toLowerCase())?Ar(function(Ke,lt){for(var ht,St=it(Ke,Te),Ot=St.length;Ot--;)ht=Hi(Ke,St[Ot]),Ke[ht]=!(lt[ht]=St[Ot])}):function(Ke){return it(Ke,0,Re)}):it}},pseudos:{not:Ar(function(me){var Te=[],Re=[],it=$e(me.replace(Ca,"$1"));return it[Cn]?Ar(function(Ke,lt,ht,St){for(var Ot,Wt=it(Ke,null,St,[]),Dt=Ke.length;Dt--;)(Ot=Wt[Dt])&&(Ke[Dt]=!(lt[Dt]=Ot))}):function(Ke,lt,ht){return Te[0]=Ke,it(Te,null,ht,Re),Te[0]=null,!Re.pop()}}),has:Ar(function(me){return function(Te){return wn(me,Te).length>0}}),contains:Ar(function(me){return me=me.replace(ti,$r),function(Te){return(Te.textContent||q(Te)).indexOf(me)>-1}}),lang:Ar(function(me){return nf.test(me||"")||wn.error("unsupported lang: "+me),me=me.replace(ti,$r).toLowerCase(),function(Te){var Re;do if(Re=Qt?Te.lang:Te.getAttribute("xml:lang")||Te.getAttribute("lang"))return Re=Re.toLowerCase(),Re===me||Re.indexOf(me+"-")===0;while((Te=Te.parentNode)&&Te.nodeType===1);return!1}}),target:function(me){var Te=S.location&&S.location.hash;return Te&&Te.slice(1)===me.id},root:function(me){return me===Nt},focus:function(me){return me===nt.activeElement&&(!nt.hasFocus||nt.hasFocus())&&!!(me.type||me.href||~me.tabIndex)},enabled:wl(!1),disabled:wl(!0),checked:function(me){var Te=me.nodeName.toLowerCase();return Te==="input"&&!!me.checked||Te==="option"&&!!me.selected},selected:function(me){return me.parentNode&&me.parentNode.selectedIndex,me.selected===!0},empty:function(me){for(me=me.firstChild;me;me=me.nextSibling)if(me.nodeType<6)return!1;return!0},parent:function(me){return!j.pseudos.empty(me)},header:function(me){return uo.test(me.nodeName)},input:function(me){return rf.test(me.nodeName)},button:function(me){var Te=me.nodeName.toLowerCase();return Te==="input"&&me.type==="button"||Te==="button"},text:function(me){var Te;return me.nodeName.toLowerCase()==="input"&&me.type==="text"&&((Te=me.getAttribute("type"))==null||Te.toLowerCase()==="text")},first:ki(function(){return[0]}),last:ki(function(me,Te){return[Te-1]}),eq:ki(function(me,Te,Re){return[Re<0?Re+Te:Re]}),even:ki(function(me,Te){for(var Re=0;ReTe?Te:Re;--it>=0;)me.push(it);return me}),gt:ki(function(me,Te,Re){for(var it=Re<0?Re+Te:Re;++it1?function(Te,Re,it){for(var Ke=me.length;Ke--;)if(!me[Ke](Te,Re,it))return!1;return!0}:me[0]}function uf(me,Te,Re){for(var it=0,Ke=Te.length;it-1&&(ht[Dt]=!(St[Dt]=sn))}}else ln=Da(ln===St?ln.splice(Vn,ln.length):ln),Ke?Ke(null,St,ln,Wt):Di.apply(St,ln)})}function _s(me){for(var Te,Re,it,Ke=me.length,lt=j.relative[me[0].type],ht=lt||j.relative[" "],St=lt?1:0,Ot=ms(function(Gt){return Gt===Te},ht,!0),Wt=ms(function(Gt){return Hi(Te,Gt)>-1},ht,!0),Dt=[function(Gt,sn,xn){var Ht=!lt&&(xn||sn!==He)||((Te=sn).nodeType?Ot(Gt,sn,xn):Wt(Gt,sn,xn));return Te=null,Ht}];St1&&_o(Dt),St>1&&Ea(me.slice(0,St-1).concat({value:me[St-2].type===" "?"*":""})).replace(Ca,"$1"),Re,St0,it=me.length>0,Ke=function(lt,ht,St,Ot,Wt){var Dt,Gt,sn,xn=0,Ht="0",Vn=lt&&[],er=[],fr=He,ln=lt||it&&j.find.TAG("*",Wt),zr=ir+=fr==null?1:Math.random()||.1,Oa=ln.length;for(Wt&&(He=ht==nt||ht||Wt);Ht!==Oa&&(Dt=ln[Ht])!=null;Ht++){if(it&&Dt){for(Gt=0,!ht&&Dt.ownerDocument!=nt&&(Xe(Dt),St=!Qt);sn=me[Gt++];)if(sn(Dt,ht||nt,St)){Ot.push(Dt);break}Wt&&(ir=zr)}Re&&((Dt=!sn&&Dt)&&xn--,lt&&Vn.push(Dt))}if(xn+=Ht,Re&&Ht!==xn){for(Gt=0;sn=Te[Gt++];)sn(Vn,er,ht,St);if(lt){if(xn>0)for(;Ht--;)Vn[Ht]||er[Ht]||(er[Ht]=ci.call(Ot));er=Da(er)}Di.apply(Ot,er),Wt&&!lt&&er.length>0&&xn+Te.length>1&&wn.uniqueSort(Ot)}return Wt&&(ir=zr,He=fr),Vn};return Re?Ar(Ke):Ke}return $e=wn.compile=function(me,Te){var Re,it=[],Ke=[],lt=fs[me+" "];if(!lt){for(Te||(Te=le(me)),Re=Te.length;Re--;)lt=_s(Te[Re]),lt[Cn]?it.push(lt):Ke.push(lt);lt=fs(me,Sl(Ke,it)),lt.selector=me}return lt},Oe=wn.select=function(me,Te,Re,it){var Ke,lt,ht,St,Ot,Wt=typeof me=="function"&&me,Dt=!it&&le(me=Wt.selector||me);if(Re=Re||[],Dt.length===1){if(lt=Dt[0]=Dt[0].slice(0),lt.length>2&&(ht=lt[0]).type==="ID"&&Te.nodeType===9&&Qt&&j.relative[lt[1].type]){if(Te=(j.find.ID(ht.matches[0].replace(ti,$r),Te)||[])[0],Te)Wt&&(Te=Te.parentNode);else return Re;me=me.slice(lt.shift().value.length)}for(Ke=wa.needsContext.test(me)?0:lt.length;Ke--&&(ht=lt[Ke],!j.relative[St=ht.type]);)if((Ot=j.find[St])&&(it=Ot(ht.matches[0].replace(ti,$r),co.test(lt[0].type)&&ia(Te.parentNode)||Te))){if(lt.splice(Ke,1),me=it.length&&Ea(lt),!me)return Di.apply(Re,it),Re;break}}return(Wt||$e(me,Dt))(it,Te,!Qt,Re,!Te||co.test(me)&&ia(Te.parentNode)||Te),Re},F.sortStable=Cn.split("").sort(Wi).join("")===Cn,F.detectDuplicates=!!ft,Xe(),F.sortDetached=dr(function(me){return me.compareDocumentPosition(nt.createElement("fieldset"))&1}),dr(function(me){return me.innerHTML="",me.firstChild.getAttribute("href")==="#"})||vs("type|href|height|width",function(me,Te,Re){if(!Re)return me.getAttribute(Te,Te.toLowerCase()==="type"?1:2)}),(!F.attributes||!dr(function(me){return me.innerHTML="",me.firstChild.setAttribute("value",""),me.firstChild.getAttribute("value")===""}))&&vs("value",function(me,Te,Re){if(!Re&&me.nodeName.toLowerCase()==="input")return me.defaultValue}),dr(function(me){return me.getAttribute("disabled")==null})||vs(lo,function(me,Te,Re){var it;if(!Re)return me[Te]===!0?Te.toLowerCase():(it=me.getAttributeNode(Te))&&it.specified?it.value:null}),wn}(o);x.find=I,x.expr=I.selectors,x.expr[":"]=x.expr.pseudos,x.uniqueSort=x.unique=I.uniqueSort,x.text=I.getText,x.isXMLDoc=I.isXML,x.contains=I.contains,x.escapeSelector=I.escape;var M=function(S,A,F){for(var j=[],q=F!==void 0;(S=S[A])&&S.nodeType!==9;)if(S.nodeType===1){if(q&&x(S).is(F))break;j.push(S)}return j},L=function(S,A){for(var F=[];S;S=S.nextSibling)S.nodeType===1&&S!==A&&F.push(S);return F},V=x.expr.match.needsContext;function R(S,A){return S.nodeName&&S.nodeName.toLowerCase()===A.toLowerCase()}var B=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function W(S,A,F){return y(A)?x.grep(S,function(j,q){return!!A.call(j,q,j)!==F}):A.nodeType?x.grep(S,function(j){return j===A!==F}):typeof A!="string"?x.grep(S,function(j){return v.call(A,j)>-1!==F}):x.filter(A,S,F)}x.filter=function(S,A,F){var j=A[0];return F&&(S=":not("+S+")"),A.length===1&&j.nodeType===1?x.find.matchesSelector(j,S)?[j]:[]:x.find.matches(S,x.grep(A,function(q){return q.nodeType===1}))},x.fn.extend({find:function(S){var A,F,j=this.length,q=this;if(typeof S!="string")return this.pushStack(x(S).filter(function(){for(A=0;A1?x.uniqueSort(F):F},filter:function(S){return this.pushStack(W(this,S||[],!1))},not:function(S){return this.pushStack(W(this,S||[],!0))},is:function(S){return!!W(this,typeof S=="string"&&V.test(S)?x(S):S||[],!1).length}});var G,pe=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,be=x.fn.init=function(S,A,F){var j,q;if(!S)return this;if(F=F||G,typeof S=="string")if(S[0]==="<"&&S[S.length-1]===">"&&S.length>=3?j=[null,S,null]:j=pe.exec(S),j&&(j[1]||!A))if(j[1]){if(A=A instanceof x?A[0]:A,x.merge(this,x.parseHTML(j[1],A&&A.nodeType?A.ownerDocument||A:E,!0)),B.test(j[1])&&x.isPlainObject(A))for(j in A)y(this[j])?this[j](A[j]):this.attr(j,A[j]);return this}else return q=E.getElementById(j[2]),q&&(this[0]=q,this.length=1),this;else return!A||A.jquery?(A||F).find(S):this.constructor(A).find(S);else{if(S.nodeType)return this[0]=S,this.length=1,this;if(y(S))return F.ready!==void 0?F.ready(S):S(x)}return x.makeArray(S,this)};be.prototype=x.fn,G=x(E);var he=/^(?:parents|prev(?:Until|All))/,J={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({has:function(S){var A=x(S,this),F=A.length;return this.filter(function(){for(var j=0;j-1:F.nodeType===1&&x.find.matchesSelector(F,S))){ee.push(F);break}}return this.pushStack(ee.length>1?x.uniqueSort(ee):ee)},index:function(S){return S?typeof S=="string"?v.call(x(S),this[0]):v.call(this,S.jquery?S[0]:S):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(S,A){return this.pushStack(x.uniqueSort(x.merge(this.get(),x(S,A))))},addBack:function(S){return this.add(S==null?this.prevObject:this.prevObject.filter(S))}});function de(S,A){for(;(S=S[A])&&S.nodeType!==1;);return S}x.each({parent:function(S){var A=S.parentNode;return A&&A.nodeType!==11?A:null},parents:function(S){return M(S,"parentNode")},parentsUntil:function(S,A,F){return M(S,"parentNode",F)},next:function(S){return de(S,"nextSibling")},prev:function(S){return de(S,"previousSibling")},nextAll:function(S){return M(S,"nextSibling")},prevAll:function(S){return M(S,"previousSibling")},nextUntil:function(S,A,F){return M(S,"nextSibling",F)},prevUntil:function(S,A,F){return M(S,"previousSibling",F)},siblings:function(S){return L((S.parentNode||{}).firstChild,S)},children:function(S){return L(S.firstChild)},contents:function(S){return S.contentDocument!=null&&i(S.contentDocument)?S.contentDocument:(R(S,"template")&&(S=S.content||S),x.merge([],S.childNodes))}},function(S,A){x.fn[S]=function(F,j){var q=x.map(this,A,F);return S.slice(-5)!=="Until"&&(j=F),j&&typeof j=="string"&&(q=x.filter(j,q)),this.length>1&&(J[S]||x.uniqueSort(q),he.test(S)&&q.reverse()),this.pushStack(q)}});var K=/[^\x20\t\r\n\f]+/g;function ue(S){var A={};return x.each(S.match(K)||[],function(F,j){A[j]=!0}),A}x.Callbacks=function(S){S=typeof S=="string"?ue(S):x.extend({},S);var A,F,j,q,ee=[],le=[],$e=-1,Oe=function(){for(q=q||S.once,j=A=!0;le.length;$e=-1)for(F=le.shift();++$e-1;)ee.splice(Xe,1),Xe<=$e&&$e--}),this},has:function(Ze){return Ze?x.inArray(Ze,ee)>-1:ee.length>0},empty:function(){return ee&&(ee=[]),this},disable:function(){return q=le=[],ee=F="",this},disabled:function(){return!ee},lock:function(){return q=le=[],!F&&!A&&(ee=F=""),this},locked:function(){return!!q},fireWith:function(Ze,ft){return q||(ft=ft||[],ft=[Ze,ft.slice?ft.slice():ft],le.push(ft),A||Oe()),this},fire:function(){return He.fireWith(this,arguments),this},fired:function(){return!!j}};return He};function Se(S){return S}function ye(S){throw S}function De(S,A,F,j){var q;try{S&&y(q=S.promise)?q.call(S).done(A).fail(F):S&&y(q=S.then)?q.call(S,A,F):A.apply(void 0,[S].slice(j))}catch(ee){F.apply(void 0,[ee])}}x.extend({Deferred:function(S){var A=[["notify","progress",x.Callbacks("memory"),x.Callbacks("memory"),2],["resolve","done",x.Callbacks("once memory"),x.Callbacks("once memory"),0,"resolved"],["reject","fail",x.Callbacks("once memory"),x.Callbacks("once memory"),1,"rejected"]],F="pending",j={state:function(){return F},always:function(){return q.done(arguments).fail(arguments),this},catch:function(ee){return j.then(null,ee)},pipe:function(){var ee=arguments;return x.Deferred(function(le){x.each(A,function($e,Oe){var He=y(ee[Oe[4]])&&ee[Oe[4]];q[Oe[1]](function(){var Ze=He&&He.apply(this,arguments);Ze&&y(Ze.promise)?Ze.promise().progress(le.notify).done(le.resolve).fail(le.reject):le[Oe[0]+"With"](this,He?[Ze]:arguments)})}),ee=null}).promise()},then:function(ee,le,$e){var Oe=0;function He(Ze,ft,Xe,nt){return function(){var Nt=this,Qt=arguments,Lt=function(){var Fn,br;if(!(Ze=Oe&&(Xe!==ye&&(Nt=void 0,Qt=[Fn]),ft.rejectWith(Nt,Qt))}};Ze?jn():(x.Deferred.getStackHook&&(jn.stackTrace=x.Deferred.getStackHook()),o.setTimeout(jn))}}return x.Deferred(function(Ze){A[0][3].add(He(0,Ze,y($e)?$e:Se,Ze.notifyWith)),A[1][3].add(He(0,Ze,y(ee)?ee:Se)),A[2][3].add(He(0,Ze,y(le)?le:ye))}).promise()},promise:function(ee){return ee!=null?x.extend(ee,j):j}},q={};return x.each(A,function(ee,le){var $e=le[2],Oe=le[5];j[le[1]]=$e.add,Oe&&$e.add(function(){F=Oe},A[3-ee][2].disable,A[3-ee][3].disable,A[0][2].lock,A[0][3].lock),$e.add(le[3].fire),q[le[0]]=function(){return q[le[0]+"With"](this===q?void 0:this,arguments),this},q[le[0]+"With"]=$e.fireWith}),j.promise(q),S&&S.call(q,q),q},when:function(S){var A=arguments.length,F=A,j=Array(F),q=r.call(arguments),ee=x.Deferred(),le=function($e){return function(Oe){j[$e]=this,q[$e]=arguments.length>1?r.call(arguments):Oe,--A||ee.resolveWith(j,q)}};if(A<=1&&(De(S,ee.done(le(F)).resolve,ee.reject,!A),ee.state()==="pending"||y(q[F]&&q[F].then)))return ee.then();for(;F--;)De(q[F],le(F),ee.reject);return ee.promise()}});var re=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;x.Deferred.exceptionHook=function(S,A){o.console&&o.console.warn&&S&&re.test(S.name)&&o.console.warn("jQuery.Deferred exception: "+S.message,S.stack,A)},x.readyException=function(S){o.setTimeout(function(){throw S})};var ie=x.Deferred();x.fn.ready=function(S){return ie.then(S).catch(function(A){x.readyException(A)}),this},x.extend({isReady:!1,readyWait:1,ready:function(S){(S===!0?--x.readyWait:x.isReady)||(x.isReady=!0,!(S!==!0&&--x.readyWait>0)&&ie.resolveWith(E,[x]))}}),x.ready.then=ie.then;function X(){E.removeEventListener("DOMContentLoaded",X),o.removeEventListener("load",X),x.ready()}E.readyState==="complete"||E.readyState!=="loading"&&!E.documentElement.doScroll?o.setTimeout(x.ready):(E.addEventListener("DOMContentLoaded",X),o.addEventListener("load",X));var se=function(S,A,F,j,q,ee,le){var $e=0,Oe=S.length,He=F==null;if(D(F)==="object"){q=!0;for($e in F)se(S,A,$e,F[$e],!0,ee,le)}else if(j!==void 0&&(q=!0,y(j)||(le=!0),He&&(le?(A.call(S,j),A=null):(He=A,A=function(Ze,ft,Xe){return He.call(x(Ze),Xe)})),A))for(;$e1,null,!0)},removeData:function(S){return this.each(function(){et.remove(this,S)})}}),x.extend({queue:function(S,A,F){var j;if(S)return A=(A||"fx")+"queue",j=Ee.get(S,A),F&&(!j||Array.isArray(F)?j=Ee.access(S,A,x.makeArray(F)):j.push(F)),j||[]},dequeue:function(S,A){A=A||"fx";var F=x.queue(S,A),j=F.length,q=F.shift(),ee=x._queueHooks(S,A),le=function(){x.dequeue(S,A)};q==="inprogress"&&(q=F.shift(),j--),q&&(A==="fx"&&F.unshift("inprogress"),delete ee.stop,q.call(S,le,ee)),!j&&ee&&ee.empty.fire()},_queueHooks:function(S,A){var F=A+"queueHooks";return Ee.get(S,F)||Ee.access(S,F,{empty:x.Callbacks("once memory").add(function(){Ee.remove(S,[A+"queue",F])})})}}),x.fn.extend({queue:function(S,A){var F=2;return typeof S!="string"&&(A=S,S="fx",F--),arguments.length\x20\t\r\n\f]*)/i,$t=/^$|^module$|\/(?:java|ecma)script/i;(function(){var S=E.createDocumentFragment(),A=S.appendChild(E.createElement("div")),F=E.createElement("input");F.setAttribute("type","radio"),F.setAttribute("checked","checked"),F.setAttribute("name","t"),A.appendChild(F),g.checkClone=A.cloneNode(!0).cloneNode(!0).lastChild.checked,A.innerHTML="",g.noCloneChecked=!!A.cloneNode(!0).lastChild.defaultValue,A.innerHTML="",g.option=!!A.lastChild})();var Kt={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};Kt.tbody=Kt.tfoot=Kt.colgroup=Kt.caption=Kt.thead,Kt.th=Kt.td,g.option||(Kt.optgroup=Kt.option=[1,""]);function yt(S,A){var F;return typeof S.getElementsByTagName!="undefined"?F=S.getElementsByTagName(A||"*"):typeof S.querySelectorAll!="undefined"?F=S.querySelectorAll(A||"*"):F=[],A===void 0||A&&R(S,A)?x.merge([S],F):F}function Bt(S,A){for(var F=0,j=S.length;F-1){q&&q.push(ee);continue}if(He=fe(ee),le=yt(ft.appendChild(ee),"script"),He&&Bt(le),F)for(Ze=0;ee=le[Ze++];)$t.test(ee.type||"")&&F.push(ee)}return ft}var Zn=/^([^.]*)(?:\.(.+)|)/;function yn(){return!0}function hn(){return!1}function Qn(S,A){return S===cn()==(A==="focus")}function cn(){try{return E.activeElement}catch{}}function Nn(S,A,F,j,q,ee){var le,$e;if(typeof A=="object"){typeof F!="string"&&(j=j||F,F=void 0);for($e in A)Nn(S,$e,F,j,A[$e],ee);return S}if(j==null&&q==null?(q=F,j=F=void 0):q==null&&(typeof F=="string"?(q=j,j=void 0):(q=j,j=F,F=void 0)),q===!1)q=hn;else if(!q)return S;return ee===1&&(le=q,q=function(Oe){return x().off(Oe),le.apply(this,arguments)},q.guid=le.guid||(le.guid=x.guid++)),S.each(function(){x.event.add(this,A,q,j,F)})}x.event={global:{},add:function(S,A,F,j,q){var ee,le,$e,Oe,He,Ze,ft,Xe,nt,Nt,Qt,Lt=Ee.get(S);if(!!Be(S))for(F.handler&&(ee=F,F=ee.handler,q=ee.selector),q&&x.find.matchesSelector(ne,q),F.guid||(F.guid=x.guid++),(Oe=Lt.events)||(Oe=Lt.events=Object.create(null)),(le=Lt.handle)||(le=Lt.handle=function(jn){return typeof x!="undefined"&&x.event.triggered!==jn.type?x.event.dispatch.apply(S,arguments):void 0}),A=(A||"").match(K)||[""],He=A.length;He--;)$e=Zn.exec(A[He])||[],nt=Qt=$e[1],Nt=($e[2]||"").split(".").sort(),nt&&(ft=x.event.special[nt]||{},nt=(q?ft.delegateType:ft.bindType)||nt,ft=x.event.special[nt]||{},Ze=x.extend({type:nt,origType:Qt,data:j,handler:F,guid:F.guid,selector:q,needsContext:q&&x.expr.match.needsContext.test(q),namespace:Nt.join(".")},ee),(Xe=Oe[nt])||(Xe=Oe[nt]=[],Xe.delegateCount=0,(!ft.setup||ft.setup.call(S,j,Nt,le)===!1)&&S.addEventListener&&S.addEventListener(nt,le)),ft.add&&(ft.add.call(S,Ze),Ze.handler.guid||(Ze.handler.guid=F.guid)),q?Xe.splice(Xe.delegateCount++,0,Ze):Xe.push(Ze),x.event.global[nt]=!0)},remove:function(S,A,F,j,q){var ee,le,$e,Oe,He,Ze,ft,Xe,nt,Nt,Qt,Lt=Ee.hasData(S)&&Ee.get(S);if(!(!Lt||!(Oe=Lt.events))){for(A=(A||"").match(K)||[""],He=A.length;He--;){if($e=Zn.exec(A[He])||[],nt=Qt=$e[1],Nt=($e[2]||"").split(".").sort(),!nt){for(nt in Oe)x.event.remove(S,nt+A[He],F,j,!0);continue}for(ft=x.event.special[nt]||{},nt=(j?ft.delegateType:ft.bindType)||nt,Xe=Oe[nt]||[],$e=$e[2]&&new RegExp("(^|\\.)"+Nt.join("\\.(?:.*\\.|)")+"(\\.|$)"),le=ee=Xe.length;ee--;)Ze=Xe[ee],(q||Qt===Ze.origType)&&(!F||F.guid===Ze.guid)&&(!$e||$e.test(Ze.namespace))&&(!j||j===Ze.selector||j==="**"&&Ze.selector)&&(Xe.splice(ee,1),Ze.selector&&Xe.delegateCount--,ft.remove&&ft.remove.call(S,Ze));le&&!Xe.length&&((!ft.teardown||ft.teardown.call(S,Nt,Lt.handle)===!1)&&x.removeEvent(S,nt,Lt.handle),delete Oe[nt])}x.isEmptyObject(Oe)&&Ee.remove(S,"handle events")}},dispatch:function(S){var A,F,j,q,ee,le,$e=new Array(arguments.length),Oe=x.event.fix(S),He=(Ee.get(this,"events")||Object.create(null))[Oe.type]||[],Ze=x.event.special[Oe.type]||{};for($e[0]=Oe,A=1;A=1)){for(;He!==this;He=He.parentNode||this)if(He.nodeType===1&&!(S.type==="click"&&He.disabled===!0)){for(ee=[],le={},F=0;F-1:x.find(q,this,null,[He]).length),le[q]&&ee.push(j);ee.length&&$e.push({elem:He,handlers:ee})}}return He=this,Oe\s*$/g;function oe(S,A){return R(S,"table")&&R(A.nodeType!==11?A:A.firstChild,"tr")&&x(S).children("tbody")[0]||S}function ke(S){return S.type=(S.getAttribute("type")!==null)+"/"+S.type,S}function Ne(S){return(S.type||"").slice(0,5)==="true/"?S.type=S.type.slice(5):S.removeAttribute("type"),S}function Ge(S,A){var F,j,q,ee,le,$e,Oe;if(A.nodeType===1){if(Ee.hasData(S)&&(ee=Ee.get(S),Oe=ee.events,Oe)){Ee.remove(A,"handle events");for(q in Oe)for(F=0,j=Oe[q].length;F1&&typeof nt=="string"&&!g.checkClone&&_r.test(nt))return S.each(function(Qt){var Lt=S.eq(Qt);Nt&&(A[0]=nt.call(this,Qt,Lt.html())),tt(Lt,A,F,j)});if(ft&&(q=gn(A,S[0].ownerDocument,!1,S,j),ee=q.firstChild,q.childNodes.length===1&&(q=ee),ee||j)){for(le=x.map(yt(q,"script"),ke),$e=le.length;Ze0&&Bt(le,!Oe&&yt(S,"script")),$e},cleanData:function(S){for(var A,F,j,q=x.event.special,ee=0;(F=S[ee])!==void 0;ee++)if(Be(F)){if(A=F[Ee.expando]){if(A.events)for(j in A.events)q[j]?x.event.remove(F,j):x.removeEvent(F,j,A.handle);F[Ee.expando]=void 0}F[et.expando]&&(F[et.expando]=void 0)}}}),x.fn.extend({detach:function(S){return dt(this,S,!0)},remove:function(S){return dt(this,S)},text:function(S){return se(this,function(A){return A===void 0?x.text(this):this.empty().each(function(){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&(this.textContent=A)})},null,S,arguments.length)},append:function(){return tt(this,arguments,function(S){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var A=oe(this,S);A.appendChild(S)}})},prepend:function(){return tt(this,arguments,function(S){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var A=oe(this,S);A.insertBefore(S,A.firstChild)}})},before:function(){return tt(this,arguments,function(S){this.parentNode&&this.parentNode.insertBefore(S,this)})},after:function(){return tt(this,arguments,function(S){this.parentNode&&this.parentNode.insertBefore(S,this.nextSibling)})},empty:function(){for(var S,A=0;(S=this[A])!=null;A++)S.nodeType===1&&(x.cleanData(yt(S,!1)),S.textContent="");return this},clone:function(S,A){return S=S==null?!1:S,A=A==null?S:A,this.map(function(){return x.clone(this,S,A)})},html:function(S){return se(this,function(A){var F=this[0]||{},j=0,q=this.length;if(A===void 0&&F.nodeType===1)return F.innerHTML;if(typeof A=="string"&&!zn.test(A)&&!Kt[(Ft.exec(A)||["",""])[1].toLowerCase()]){A=x.htmlPrefilter(A);try{for(;j=0&&(Oe+=Math.max(0,Math.ceil(S["offset"+A[0].toUpperCase()+A.slice(1)]-ee-Oe-$e-.5))||0),Oe}function Si(S,A,F){var j=It(S),q=!g.boxSizingReliable()||F,ee=q&&x.css(S,"boxSizing",!1,j)==="border-box",le=ee,$e=zt(S,A,j),Oe="offset"+A[0].toUpperCase()+A.slice(1);if(bt.test($e)){if(!F)return $e;$e="auto"}return(!g.boxSizingReliable()&&ee||!g.reliableTrDimensions()&&R(S,"tr")||$e==="auto"||!parseFloat($e)&&x.css(S,"display",!1,j)==="inline")&&S.getClientRects().length&&(ee=x.css(S,"boxSizing",!1,j)==="border-box",le=Oe in S,le&&($e=S[Oe])),$e=parseFloat($e)||0,$e+oi(S,A,F||(ee?"border":"content"),le,j,$e)+"px"}x.extend({cssHooks:{opacity:{get:function(S,A){if(A){var F=zt(S,"opacity");return F===""?"1":F}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(S,A,F,j){if(!(!S||S.nodeType===3||S.nodeType===8||!S.style)){var q,ee,le,$e=Ie(A),Oe=wt.test(A),He=S.style;if(Oe||(A=rr($e)),le=x.cssHooks[A]||x.cssHooks[$e],F!==void 0){if(ee=typeof F,ee==="string"&&(q=H.exec(F))&&q[1]&&(F=qe(S,A,q),ee="number"),F==null||F!==F)return;ee==="number"&&!Oe&&(F+=q&&q[3]||(x.cssNumber[$e]?"":"px")),!g.clearCloneStyle&&F===""&&A.indexOf("background")===0&&(He[A]="inherit"),(!le||!("set"in le)||(F=le.set(S,F,j))!==void 0)&&(Oe?He.setProperty(A,F):He[A]=F)}else return le&&"get"in le&&(q=le.get(S,!1,j))!==void 0?q:He[A]}},css:function(S,A,F,j){var q,ee,le,$e=Ie(A),Oe=wt.test(A);return Oe||(A=rr($e)),le=x.cssHooks[A]||x.cssHooks[$e],le&&"get"in le&&(q=le.get(S,!0,F)),q===void 0&&(q=zt(S,A,j)),q==="normal"&&A in ji&&(q=ji[A]),F===""||F?(ee=parseFloat(q),F===!0||isFinite(ee)?ee||0:q):q}}),x.each(["height","width"],function(S,A){x.cssHooks[A]={get:function(F,j,q){if(j)return Mr.test(x.css(F,"display"))&&(!F.getClientRects().length||!F.getBoundingClientRect().width)?At(F,Pr,function(){return Si(F,A,q)}):Si(F,A,q)},set:function(F,j,q){var ee,le=It(F),$e=!g.scrollboxSize()&&le.position==="absolute",Oe=$e||q,He=Oe&&x.css(F,"boxSizing",!1,le)==="border-box",Ze=q?oi(F,A,q,He,le):0;return He&&$e&&(Ze-=Math.ceil(F["offset"+A[0].toUpperCase()+A.slice(1)]-parseFloat(le[A])-oi(F,A,"border",!1,le)-.5)),Ze&&(ee=H.exec(j))&&(ee[3]||"px")!=="px"&&(F.style[A]=j,j=x.css(F,A)),qr(F,j,Ze)}}}),x.cssHooks.marginLeft=bn(g.reliableMarginLeft,function(S,A){if(A)return(parseFloat(zt(S,"marginLeft"))||S.getBoundingClientRect().left-At(S,{marginLeft:0},function(){return S.getBoundingClientRect().left}))+"px"}),x.each({margin:"",padding:"",border:"Width"},function(S,A){x.cssHooks[S+A]={expand:function(F){for(var j=0,q={},ee=typeof F=="string"?F.split(" "):[F];j<4;j++)q[S+Z[j]+A]=ee[j]||ee[j-2]||ee[0];return q}},S!=="margin"&&(x.cssHooks[S+A].set=qr)}),x.fn.extend({css:function(S,A){return se(this,function(F,j,q){var ee,le,$e={},Oe=0;if(Array.isArray(j)){for(ee=It(F),le=j.length;Oe1)}});function Hn(S,A,F,j,q){return new Hn.prototype.init(S,A,F,j,q)}x.Tween=Hn,Hn.prototype={constructor:Hn,init:function(S,A,F,j,q,ee){this.elem=S,this.prop=F,this.easing=q||x.easing._default,this.options=A,this.start=this.now=this.cur(),this.end=j,this.unit=ee||(x.cssNumber[F]?"":"px")},cur:function(){var S=Hn.propHooks[this.prop];return S&&S.get?S.get(this):Hn.propHooks._default.get(this)},run:function(S){var A,F=Hn.propHooks[this.prop];return this.options.duration?this.pos=A=x.easing[this.easing](S,this.options.duration*S,0,1,this.options.duration):this.pos=A=S,this.now=(this.end-this.start)*A+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),F&&F.set?F.set(this):Hn.propHooks._default.set(this),this}},Hn.prototype.init.prototype=Hn.prototype,Hn.propHooks={_default:{get:function(S){var A;return S.elem.nodeType!==1||S.elem[S.prop]!=null&&S.elem.style[S.prop]==null?S.elem[S.prop]:(A=x.css(S.elem,S.prop,""),!A||A==="auto"?0:A)},set:function(S){x.fx.step[S.prop]?x.fx.step[S.prop](S):S.elem.nodeType===1&&(x.cssHooks[S.prop]||S.elem.style[rr(S.prop)]!=null)?x.style(S.elem,S.prop,S.now+S.unit):S.elem[S.prop]=S.now}}},Hn.propHooks.scrollTop=Hn.propHooks.scrollLeft={set:function(S){S.elem.nodeType&&S.elem.parentNode&&(S.elem[S.prop]=S.now)}},x.easing={linear:function(S){return S},swing:function(S){return .5-Math.cos(S*Math.PI)/2},_default:"swing"},x.fx=Hn.prototype.init,x.fx.step={};var yr,li,ui=/^(?:toggle|show|hide)$/,ve=/queueHooks$/;function Ae(){li&&(E.hidden===!1&&o.requestAnimationFrame?o.requestAnimationFrame(Ae):o.setTimeout(Ae,x.fx.interval),x.fx.tick())}function Ce(){return o.setTimeout(function(){yr=void 0}),yr=Date.now()}function je(S,A){var F,j=0,q={height:S};for(A=A?1:0;j<4;j+=2-A)F=Z[j],q["margin"+F]=q["padding"+F]=S;return A&&(q.opacity=q.width=S),q}function We(S,A,F){for(var j,q=(ut.tweeners[A]||[]).concat(ut.tweeners["*"]),ee=0,le=q.length;ee1)},removeAttr:function(S){return this.each(function(){x.removeAttr(this,S)})}}),x.extend({attr:function(S,A,F){var j,q,ee=S.nodeType;if(!(ee===3||ee===8||ee===2)){if(typeof S.getAttribute=="undefined")return x.prop(S,A,F);if((ee!==1||!x.isXMLDoc(S))&&(q=x.attrHooks[A.toLowerCase()]||(x.expr.match.bool.test(A)?_t:void 0)),F!==void 0){if(F===null){x.removeAttr(S,A);return}return q&&"set"in q&&(j=q.set(S,F,A))!==void 0?j:(S.setAttribute(A,F+""),F)}return q&&"get"in q&&(j=q.get(S,A))!==null?j:(j=x.find.attr(S,A),j==null?void 0:j)}},attrHooks:{type:{set:function(S,A){if(!g.radioValue&&A==="radio"&&R(S,"input")){var F=S.value;return S.setAttribute("type",A),F&&(S.value=F),A}}}},removeAttr:function(S,A){var F,j=0,q=A&&A.match(K);if(q&&S.nodeType===1)for(;F=q[j++];)S.removeAttribute(F)}}),_t={set:function(S,A,F){return A===!1?x.removeAttr(S,F):S.setAttribute(F,F),F}},x.each(x.expr.match.bool.source.match(/\w+/g),function(S,A){var F=vt[A]||x.find.attr;vt[A]=function(j,q,ee){var le,$e,Oe=q.toLowerCase();return ee||($e=vt[Oe],vt[Oe]=le,le=F(j,q,ee)!=null?Oe:null,vt[Oe]=$e),le}});var pt=/^(?:input|select|textarea|button)$/i,kt=/^(?:a|area)$/i;x.fn.extend({prop:function(S,A){return se(this,x.prop,S,A,arguments.length>1)},removeProp:function(S){return this.each(function(){delete this[x.propFix[S]||S]})}}),x.extend({prop:function(S,A,F){var j,q,ee=S.nodeType;if(!(ee===3||ee===8||ee===2))return(ee!==1||!x.isXMLDoc(S))&&(A=x.propFix[A]||A,q=x.propHooks[A]),F!==void 0?q&&"set"in q&&(j=q.set(S,F,A))!==void 0?j:S[A]=F:q&&"get"in q&&(j=q.get(S,A))!==null?j:S[A]},propHooks:{tabIndex:{get:function(S){var A=x.find.attr(S,"tabindex");return A?parseInt(A,10):pt.test(S.nodeName)||kt.test(S.nodeName)&&S.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(x.propHooks.selected={get:function(S){var A=S.parentNode;return A&&A.parentNode&&A.parentNode.selectedIndex,null},set:function(S){var A=S.parentNode;A&&(A.selectedIndex,A.parentNode&&A.parentNode.selectedIndex)}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this});function Yt(S){var A=S.match(K)||[];return A.join(" ")}function tn(S){return S.getAttribute&&S.getAttribute("class")||""}function mt(S){return Array.isArray(S)?S:typeof S=="string"?S.match(K)||[]:[]}x.fn.extend({addClass:function(S){var A,F,j,q,ee,le;return y(S)?this.each(function($e){x(this).addClass(S.call(this,$e,tn(this)))}):(A=mt(S),A.length?this.each(function(){if(j=tn(this),F=this.nodeType===1&&" "+Yt(j)+" ",F){for(ee=0;ee-1;)F=F.replace(" "+q+" "," ");le=Yt(F),j!==le&&this.setAttribute("class",le)}}):this):this.attr("class","")},toggleClass:function(S,A){var F,j,q,ee,le=typeof S,$e=le==="string"||Array.isArray(S);return y(S)?this.each(function(Oe){x(this).toggleClass(S.call(this,Oe,tn(this),A),A)}):typeof A=="boolean"&&$e?A?this.addClass(S):this.removeClass(S):(F=mt(S),this.each(function(){if($e)for(ee=x(this),q=0;q-1)return!0;return!1}});var Dn=/\r/g;x.fn.extend({val:function(S){var A,F,j,q=this[0];return arguments.length?(j=y(S),this.each(function(ee){var le;this.nodeType===1&&(j?le=S.call(this,ee,x(this).val()):le=S,le==null?le="":typeof le=="number"?le+="":Array.isArray(le)&&(le=x.map(le,function($e){return $e==null?"":$e+""})),A=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],(!A||!("set"in A)||A.set(this,le,"value")===void 0)&&(this.value=le))})):q?(A=x.valHooks[q.type]||x.valHooks[q.nodeName.toLowerCase()],A&&"get"in A&&(F=A.get(q,"value"))!==void 0?F:(F=q.value,typeof F=="string"?F.replace(Dn,""):F==null?"":F)):void 0}}),x.extend({valHooks:{option:{get:function(S){var A=x.find.attr(S,"value");return A!=null?A:Yt(x.text(S))}},select:{get:function(S){var A,F,j,q=S.options,ee=S.selectedIndex,le=S.type==="select-one",$e=le?null:[],Oe=le?ee+1:q.length;for(ee<0?j=Oe:j=le?ee:0;j-1)&&(F=!0);return F||(S.selectedIndex=-1),ee}}}}),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(S,A){if(Array.isArray(A))return S.checked=x.inArray(x(S).val(),A)>-1}},g.checkOn||(x.valHooks[this].get=function(S){return S.getAttribute("value")===null?"on":S.value})}),g.focusin="onfocusin"in o;var rn=/^(?:focusinfocus|focusoutblur)$/,In=function(S){S.stopPropagation()};x.extend(x.event,{trigger:function(S,A,F,j){var q,ee,le,$e,Oe,He,Ze,ft,Xe=[F||E],nt=d.call(S,"type")?S.type:S,Nt=d.call(S,"namespace")?S.namespace.split("."):[];if(ee=ft=le=F=F||E,!(F.nodeType===3||F.nodeType===8)&&!rn.test(nt+x.event.triggered)&&(nt.indexOf(".")>-1&&(Nt=nt.split("."),nt=Nt.shift(),Nt.sort()),Oe=nt.indexOf(":")<0&&"on"+nt,S=S[x.expando]?S:new x.Event(nt,typeof S=="object"&&S),S.isTrigger=j?2:3,S.namespace=Nt.join("."),S.rnamespace=S.namespace?new RegExp("(^|\\.)"+Nt.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,S.result=void 0,S.target||(S.target=F),A=A==null?[S]:x.makeArray(A,[S]),Ze=x.event.special[nt]||{},!(!j&&Ze.trigger&&Ze.trigger.apply(F,A)===!1))){if(!j&&!Ze.noBubble&&!b(F)){for($e=Ze.delegateType||nt,rn.test($e+nt)||(ee=ee.parentNode);ee;ee=ee.parentNode)Xe.push(ee),le=ee;le===(F.ownerDocument||E)&&Xe.push(le.defaultView||le.parentWindow||o)}for(q=0;(ee=Xe[q++])&&!S.isPropagationStopped();)ft=ee,S.type=q>1?$e:Ze.bindType||nt,He=(Ee.get(ee,"events")||Object.create(null))[S.type]&&Ee.get(ee,"handle"),He&&He.apply(ee,A),He=Oe&&ee[Oe],He&&He.apply&&Be(ee)&&(S.result=He.apply(ee,A),S.result===!1&&S.preventDefault());return S.type=nt,!j&&!S.isDefaultPrevented()&&(!Ze._default||Ze._default.apply(Xe.pop(),A)===!1)&&Be(F)&&Oe&&y(F[nt])&&!b(F)&&(le=F[Oe],le&&(F[Oe]=null),x.event.triggered=nt,S.isPropagationStopped()&&ft.addEventListener(nt,In),F[nt](),S.isPropagationStopped()&&ft.removeEventListener(nt,In),x.event.triggered=void 0,le&&(F[Oe]=le)),S.result}},simulate:function(S,A,F){var j=x.extend(new x.Event,F,{type:S,isSimulated:!0});x.event.trigger(j,null,A)}}),x.fn.extend({trigger:function(S,A){return this.each(function(){x.event.trigger(S,A,this)})},triggerHandler:function(S,A){var F=this[0];if(F)return x.event.trigger(S,A,F,!0)}}),g.focusin||x.each({focus:"focusin",blur:"focusout"},function(S,A){var F=function(j){x.event.simulate(A,j.target,x.event.fix(j))};x.event.special[A]={setup:function(){var j=this.ownerDocument||this.document||this,q=Ee.access(j,A);q||j.addEventListener(S,F,!0),Ee.access(j,A,(q||0)+1)},teardown:function(){var j=this.ownerDocument||this.document||this,q=Ee.access(j,A)-1;q?Ee.access(j,A,q):(j.removeEventListener(S,F,!0),Ee.remove(j,A))}}});var cr=o.location,qn={guid:Date.now()},Yn=/\?/;x.parseXML=function(S){var A,F;if(!S||typeof S!="string")return null;try{A=new o.DOMParser().parseFromString(S,"text/xml")}catch{}return F=A&&A.getElementsByTagName("parsererror")[0],(!A||F)&&x.error("Invalid XML: "+(F?x.map(F.childNodes,function(j){return j.textContent}).join(` -`):S)),A};var ei=/\[\]$/,ct=/\r?\n/g,Vi=/^(?:submit|button|image|reset|file)$/i,to=/^(?:input|select|textarea|keygen)/i;function zi(S,A,F,j){var q;if(Array.isArray(A))x.each(A,function(ee,le){F||ei.test(S)?j(S,le):zi(S+"["+(typeof le=="object"&&le!=null?ee:"")+"]",le,F,j)});else if(!F&&D(A)==="object")for(q in A)zi(S+"["+q+"]",A[q],F,j);else j(S,A)}x.param=function(S,A){var F,j=[],q=function(ee,le){var $e=y(le)?le():le;j[j.length]=encodeURIComponent(ee)+"="+encodeURIComponent($e==null?"":$e)};if(S==null)return"";if(Array.isArray(S)||S.jquery&&!x.isPlainObject(S))x.each(S,function(){q(this.name,this.value)});else for(F in S)zi(F,S[F],A,q);return j.join("&")},x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var S=x.prop(this,"elements");return S?x.makeArray(S):this}).filter(function(){var S=this.type;return this.name&&!x(this).is(":disabled")&&to.test(this.nodeName)&&!Vi.test(S)&&(this.checked||!Rt.test(S))}).map(function(S,A){var F=x(this).val();return F==null?null:Array.isArray(F)?x.map(F,function(j){return{name:A.name,value:j.replace(ct,`\r -`)}}):{name:A.name,value:F.replace(ct,`\r -`)}}).get()}});var Gd=/%20/g,Yd=/#.*$/,vl=/([?&])_=[^&]*/,us=/^(.*?):[ \t]*([^\r\n]*)$/mg,ml=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,_l=/^(?:GET|HEAD)$/,Xd=/^\/\//,gl={},no={},ro="*/".concat("*"),ta=E.createElement("a");ta.href=cr.href;function io(S){return function(A,F){typeof A!="string"&&(F=A,A="*");var j,q=0,ee=A.toLowerCase().match(K)||[];if(y(F))for(;j=ee[q++];)j[0]==="+"?(j=j.slice(1)||"*",(S[j]=S[j]||[]).unshift(F)):(S[j]=S[j]||[]).push(F)}}function ao(S,A,F,j){var q={},ee=S===no;function le($e){var Oe;return q[$e]=!0,x.each(S[$e]||[],function(He,Ze){var ft=Ze(A,F,j);if(typeof ft=="string"&&!ee&&!q[ft])return A.dataTypes.unshift(ft),le(ft),!1;if(ee)return!(Oe=ft)}),Oe}return le(A.dataTypes[0])||!q["*"]&&le("*")}function so(S,A){var F,j,q=x.ajaxSettings.flatOptions||{};for(F in A)A[F]!==void 0&&((q[F]?S:j||(j={}))[F]=A[F]);return j&&x.extend(!0,S,j),S}function cs(S,A,F){for(var j,q,ee,le,$e=S.contents,Oe=S.dataTypes;Oe[0]==="*";)Oe.shift(),j===void 0&&(j=S.mimeType||A.getResponseHeader("Content-Type"));if(j){for(q in $e)if($e[q]&&$e[q].test(j)){Oe.unshift(q);break}}if(Oe[0]in F)ee=Oe[0];else{for(q in F){if(!Oe[0]||S.converters[q+" "+Oe[0]]){ee=q;break}le||(le=q)}ee=ee||le}if(ee)return ee!==Oe[0]&&Oe.unshift(ee),F[ee]}function Jd(S,A,F,j){var q,ee,le,$e,Oe,He={},Ze=S.dataTypes.slice();if(Ze[1])for(le in S.converters)He[le.toLowerCase()]=S.converters[le];for(ee=Ze.shift();ee;)if(S.responseFields[ee]&&(F[S.responseFields[ee]]=A),!Oe&&j&&S.dataFilter&&(A=S.dataFilter(A,S.dataType)),Oe=ee,ee=Ze.shift(),ee){if(ee==="*")ee=Oe;else if(Oe!=="*"&&Oe!==ee){if(le=He[Oe+" "+ee]||He["* "+ee],!le){for(q in He)if($e=q.split(" "),$e[1]===ee&&(le=He[Oe+" "+$e[0]]||He["* "+$e[0]],le)){le===!0?le=He[q]:He[q]!==!0&&(ee=$e[0],Ze.unshift($e[1]));break}}if(le!==!0)if(le&&S.throws)A=le(A);else try{A=le(A)}catch(ft){return{state:"parsererror",error:le?ft:"No conversion from "+Oe+" to "+ee}}}}return{state:"success",data:A}}x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:cr.href,type:"GET",isLocal:ml.test(cr.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":ro,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(S,A){return A?so(so(S,x.ajaxSettings),A):so(x.ajaxSettings,S)},ajaxPrefilter:io(gl),ajaxTransport:io(no),ajax:function(S,A){typeof S=="object"&&(A=S,S=void 0),A=A||{};var F,j,q,ee,le,$e,Oe,He,Ze,ft,Xe=x.ajaxSetup({},A),nt=Xe.context||Xe,Nt=Xe.context&&(nt.nodeType||nt.jquery)?x(nt):x.event,Qt=x.Deferred(),Lt=x.Callbacks("once memory"),jn=Xe.statusCode||{},Fn={},br={},Cn="canceled",qt={readyState:0,getResponseHeader:function(un){var Tn;if(Oe){if(!ee)for(ee={};Tn=us.exec(q);)ee[Tn[1].toLowerCase()+" "]=(ee[Tn[1].toLowerCase()+" "]||[]).concat(Tn[2]);Tn=ee[un.toLowerCase()+" "]}return Tn==null?null:Tn.join(", ")},getAllResponseHeaders:function(){return Oe?q:null},setRequestHeader:function(un,Tn){return Oe==null&&(un=br[un.toLowerCase()]=br[un.toLowerCase()]||un,Fn[un]=Tn),this},overrideMimeType:function(un){return Oe==null&&(Xe.mimeType=un),this},statusCode:function(un){var Tn;if(un)if(Oe)qt.always(un[qt.status]);else for(Tn in un)jn[Tn]=[jn[Tn],un[Tn]];return this},abort:function(un){var Tn=un||Cn;return F&&F.abort(Tn),ir(0,Tn),this}};if(Qt.promise(qt),Xe.url=((S||Xe.url||cr.href)+"").replace(Xd,cr.protocol+"//"),Xe.type=A.method||A.type||Xe.method||Xe.type,Xe.dataTypes=(Xe.dataType||"*").toLowerCase().match(K)||[""],Xe.crossDomain==null){$e=E.createElement("a");try{$e.href=Xe.url,$e.href=$e.href,Xe.crossDomain=ta.protocol+"//"+ta.host!=$e.protocol+"//"+$e.host}catch{Xe.crossDomain=!0}}if(Xe.data&&Xe.processData&&typeof Xe.data!="string"&&(Xe.data=x.param(Xe.data,Xe.traditional)),ao(gl,Xe,A,qt),Oe)return qt;He=x.event&&Xe.global,He&&x.active++===0&&x.event.trigger("ajaxStart"),Xe.type=Xe.type.toUpperCase(),Xe.hasContent=!_l.test(Xe.type),j=Xe.url.replace(Yd,""),Xe.hasContent?Xe.data&&Xe.processData&&(Xe.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&(Xe.data=Xe.data.replace(Gd,"+")):(ft=Xe.url.slice(j.length),Xe.data&&(Xe.processData||typeof Xe.data=="string")&&(j+=(Yn.test(j)?"&":"?")+Xe.data,delete Xe.data),Xe.cache===!1&&(j=j.replace(vl,"$1"),ft=(Yn.test(j)?"&":"?")+"_="+qn.guid+++ft),Xe.url=j+ft),Xe.ifModified&&(x.lastModified[j]&&qt.setRequestHeader("If-Modified-Since",x.lastModified[j]),x.etag[j]&&qt.setRequestHeader("If-None-Match",x.etag[j])),(Xe.data&&Xe.hasContent&&Xe.contentType!==!1||A.contentType)&&qt.setRequestHeader("Content-Type",Xe.contentType),qt.setRequestHeader("Accept",Xe.dataTypes[0]&&Xe.accepts[Xe.dataTypes[0]]?Xe.accepts[Xe.dataTypes[0]]+(Xe.dataTypes[0]!=="*"?", "+ro+"; q=0.01":""):Xe.accepts["*"]);for(Ze in Xe.headers)qt.setRequestHeader(Ze,Xe.headers[Ze]);if(Xe.beforeSend&&(Xe.beforeSend.call(nt,qt,Xe)===!1||Oe))return qt.abort();if(Cn="abort",Lt.add(Xe.complete),qt.done(Xe.success),qt.fail(Xe.error),F=ao(no,Xe,A,qt),!F)ir(-1,"No Transport");else{if(qt.readyState=1,He&&Nt.trigger("ajaxSend",[qt,Xe]),Oe)return qt;Xe.async&&Xe.timeout>0&&(le=o.setTimeout(function(){qt.abort("timeout")},Xe.timeout));try{Oe=!1,F.send(Fn,ir)}catch(un){if(Oe)throw un;ir(-1,un)}}function ir(un,Tn,ra,fs){var Cr,Wi,Ei,Xn,ci,xr=Tn;Oe||(Oe=!0,le&&o.clearTimeout(le),F=void 0,q=fs||"",qt.readyState=un>0?4:0,Cr=un>=200&&un<300||un===304,ra&&(Xn=cs(Xe,qt,ra)),!Cr&&x.inArray("script",Xe.dataTypes)>-1&&x.inArray("json",Xe.dataTypes)<0&&(Xe.converters["text script"]=function(){}),Xn=Jd(Xe,Xn,qt,Cr),Cr?(Xe.ifModified&&(ci=qt.getResponseHeader("Last-Modified"),ci&&(x.lastModified[j]=ci),ci=qt.getResponseHeader("etag"),ci&&(x.etag[j]=ci)),un===204||Xe.type==="HEAD"?xr="nocontent":un===304?xr="notmodified":(xr=Xn.state,Wi=Xn.data,Ei=Xn.error,Cr=!Ei)):(Ei=xr,(un||!xr)&&(xr="error",un<0&&(un=0))),qt.status=un,qt.statusText=(Tn||xr)+"",Cr?Qt.resolveWith(nt,[Wi,xr,qt]):Qt.rejectWith(nt,[qt,xr,Ei]),qt.statusCode(jn),jn=void 0,He&&Nt.trigger(Cr?"ajaxSuccess":"ajaxError",[qt,Xe,Cr?Wi:Ei]),Lt.fireWith(nt,[qt,xr]),He&&(Nt.trigger("ajaxComplete",[qt,Xe]),--x.active||x.event.trigger("ajaxStop")))}return qt},getJSON:function(S,A,F){return x.get(S,A,F,"json")},getScript:function(S,A){return x.get(S,void 0,A,"script")}}),x.each(["get","post"],function(S,A){x[A]=function(F,j,q,ee){return y(j)&&(ee=ee||q,q=j,j=void 0),x.ajax(x.extend({url:F,type:A,dataType:ee,data:j,success:q},x.isPlainObject(F)&&F))}}),x.ajaxPrefilter(function(S){var A;for(A in S.headers)A.toLowerCase()==="content-type"&&(S.contentType=S.headers[A]||"")}),x._evalUrl=function(S,A,F){return x.ajax({url:S,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(j){x.globalEval(j,A,F)}})},x.fn.extend({wrapAll:function(S){var A;return this[0]&&(y(S)&&(S=S.call(this[0])),A=x(S,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&A.insertBefore(this[0]),A.map(function(){for(var F=this;F.firstElementChild;)F=F.firstElementChild;return F}).append(this)),this},wrapInner:function(S){return y(S)?this.each(function(A){x(this).wrapInner(S.call(this,A))}):this.each(function(){var A=x(this),F=A.contents();F.length?F.wrapAll(S):A.append(S)})},wrap:function(S){var A=y(S);return this.each(function(F){x(this).wrapAll(A?S.call(this,F):S)})},unwrap:function(S){return this.parent(S).not("body").each(function(){x(this).replaceWith(this.childNodes)}),this}}),x.expr.pseudos.hidden=function(S){return!x.expr.pseudos.visible(S)},x.expr.pseudos.visible=function(S){return!!(S.offsetWidth||S.offsetHeight||S.getClientRects().length)},x.ajaxSettings.xhr=function(){try{return new o.XMLHttpRequest}catch{}};var Zd={0:200,1223:204},na=x.ajaxSettings.xhr();g.cors=!!na&&"withCredentials"in na,g.ajax=na=!!na,x.ajaxTransport(function(S){var A,F;if(g.cors||na&&!S.crossDomain)return{send:function(j,q){var ee,le=S.xhr();if(le.open(S.type,S.url,S.async,S.username,S.password),S.xhrFields)for(ee in S.xhrFields)le[ee]=S.xhrFields[ee];S.mimeType&&le.overrideMimeType&&le.overrideMimeType(S.mimeType),!S.crossDomain&&!j["X-Requested-With"]&&(j["X-Requested-With"]="XMLHttpRequest");for(ee in j)le.setRequestHeader(ee,j[ee]);A=function($e){return function(){A&&(A=F=le.onload=le.onerror=le.onabort=le.ontimeout=le.onreadystatechange=null,$e==="abort"?le.abort():$e==="error"?typeof le.status!="number"?q(0,"error"):q(le.status,le.statusText):q(Zd[le.status]||le.status,le.statusText,(le.responseType||"text")!=="text"||typeof le.responseText!="string"?{binary:le.response}:{text:le.responseText},le.getAllResponseHeaders()))}},le.onload=A(),F=le.onerror=le.ontimeout=A("error"),le.onabort!==void 0?le.onabort=F:le.onreadystatechange=function(){le.readyState===4&&o.setTimeout(function(){A&&F()})},A=A("abort");try{le.send(S.hasContent&&S.data||null)}catch($e){if(A)throw $e}},abort:function(){A&&A()}}}),x.ajaxPrefilter(function(S){S.crossDomain&&(S.contents.script=!1)}),x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(S){return x.globalEval(S),S}}}),x.ajaxPrefilter("script",function(S){S.cache===void 0&&(S.cache=!1),S.crossDomain&&(S.type="GET")}),x.ajaxTransport("script",function(S){if(S.crossDomain||S.scriptAttrs){var A,F;return{send:function(j,q){A=x("