diff --git a/.gitignore b/.gitignore index eb3f4b4a4..329c6926d 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ /public/.user.ini /storage/*.key /config/LICENSE +/config/PGP_* /vendor /build /tmp diff --git a/CHANGELOG.md b/CHANGELOG.md index 95c89345f..b06804f19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ All notable changes to this project will be documented in this file. +## [0.25.48] + +### 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..ecd829957 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,10 +47,21 @@ 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'); self::$doo->initialize("/var/www", $token, $language); + // + $priPath = config_path("PGP_PRIVATE"); + $pubPath = config_path("PGP_PUBLIC"); + if (!file_exists($priPath) || !file_exists($pubPath)) { + $data = self::pgpGenerateKeyPair("doo", "admin@admin.com", self::$passphrase); + file_put_contents($priPath, $data['private_key']); + file_put_contents($pubPath, $data['public_key']); + } } /** @@ -299,4 +312,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 9d879cdf1..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.rc7" - 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/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/jsencrypt.min.js b/public/js/jsencrypt.min.js new file mode 100644 index 000000000..174916b33 --- /dev/null +++ b/public/js/jsencrypt.min.js @@ -0,0 +1,2 @@ +/*! For license information please see jsencrypt.min.js.LICENSE.txt */ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.JSEncrypt=e():t.JSEncrypt=e()}(window,(()=>(()=>{var t={155:t=>{var e,i,r=t.exports={};function n(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function o(t){if(e===setTimeout)return setTimeout(t,0);if((e===n||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(i){try{return e.call(null,t,0)}catch(i){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:n}catch(t){e=n}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(t){i=s}}();var h,a=[],u=!1,c=-1;function f(){u&&h&&(u=!1,h.length?a=h.concat(a):c=-1,a.length&&l())}function l(){if(!u){var t=o(f);u=!0;for(var e=a.length;e;){for(h=a,a=[];++c1)for(var i=1;i{for(var r in e)i.o(e,r)&&!i.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var r={};return(()=>{"use strict";function t(t){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(t)}function e(t,e){return t&e}function n(t,e){return t|e}function s(t,e){return t^e}function o(t,e){return t&~e}function h(t){if(0==t)return-1;var e=0;return 0==(65535&t)&&(t>>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function a(t){for(var e=0;0!=t;)t&=t-1,++e;return e}i.d(r,{default:()=>ot});var u,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function f(t){var e,i,r="";for(e=0;e+3<=t.length;e+=3)i=parseInt(t.substring(e,e+3),16),r+=c.charAt(i>>6)+c.charAt(63&i);for(e+1==t.length?(i=parseInt(t.substring(e,e+1),16),r+=c.charAt(i<<2)):e+2==t.length&&(i=parseInt(t.substring(e,e+2),16),r+=c.charAt(i>>2)+c.charAt((3&i)<<4));(3&r.length)>0;)r+="=";return r}function l(e){var i,r="",n=0,s=0;for(i=0;i>2),s=3&o,n=1):1==n?(r+=t(s<<2|o>>4),s=15&o,n=2):2==n?(r+=t(s),r+=t(o>>2),s=3&o,n=3):(r+=t(s<<2|o>>4),r+=t(15&o),n=0))}return 1==n&&(r+=t(s<<2)),r}var p,g={decode:function(t){var e;if(void 0===p){var i="= \f\n\r\t \u2028\u2029";for(p=Object.create(null),e=0;e<64;++e)p["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)]=e;for(p["-"]=62,p._=63,e=0;e=4?(r[r.length]=n>>16,r[r.length]=n>>8&255,r[r.length]=255&n,n=0,s=0):n<<=6}}switch(s){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:r[r.length]=n>>10;break;case 3:r[r.length]=n>>16,r[r.length]=n>>8&255}return r},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(t){var e=g.re.exec(t);if(e)if(e[1])t=e[1];else{if(!e[2])throw new Error("RegExp out of sync");t=e[2]}return g.decode(t)}},d=1e13,v=function(){function t(t){this.buf=[+t||0]}return t.prototype.mulAdd=function(t,e){var i,r,n=this.buf,s=n.length;for(i=0;i0&&(n[i]=e)},t.prototype.sub=function(t){var e,i,r=this.buf,n=r.length;for(e=0;e=0;--r)i+=(d+e[r]).toString().substring(1);return i},t.prototype.valueOf=function(){for(var t=this.buf,e=0,i=t.length-1;i>=0;--i)e=e*d+t[i];return e},t.prototype.simplify=function(){var t=this.buf;return 1==t.length?t[0]:this},t}(),m=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,y=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function b(t,e){return t.length>e&&(t=t.substring(0,e)+"…"),t}var T,S=function(){function t(e,i){this.hexDigits="0123456789ABCDEF",e instanceof t?(this.enc=e.enc,this.pos=e.pos):(this.enc=e,this.pos=i)}return t.prototype.get=function(t){if(void 0===t&&(t=this.pos++),t>=this.enc.length)throw new Error("Requesting byte offset ".concat(t," on a stream of length ").concat(this.enc.length));return"string"==typeof this.enc?this.enc.charCodeAt(t):this.enc[t]},t.prototype.hexByte=function(t){return this.hexDigits.charAt(t>>4&15)+this.hexDigits.charAt(15&t)},t.prototype.hexDump=function(t,e,i){for(var r="",n=t;n176)return!1}return!0},t.prototype.parseStringISO=function(t,e){for(var i="",r=t;r191&&n<224?String.fromCharCode((31&n)<<6|63&this.get(r++)):String.fromCharCode((15&n)<<12|(63&this.get(r++))<<6|63&this.get(r++))}return i},t.prototype.parseStringBMP=function(t,e){for(var i,r,n="",s=t;s127,s=n?255:0,o="";r==s&&++t4){for(o=r,i<<=3;0==(128&(+o^s));)o=+o<<1,--i;o="("+i+" bit)\n"}n&&(r-=256);for(var h=new v(r),a=t+1;a=a;--u)s+=h>>u&1?"1":"0";if(s.length>i)return n+b(s,i)}return n+s},t.prototype.parseOctetString=function(t,e,i){if(this.isASCII(t,e))return b(this.parseStringISO(t,e),i);var r=e-t,n="("+r+" byte)\n";r>(i/=2)&&(e=t+i);for(var s=t;si&&(n+="…"),n},t.prototype.parseOID=function(t,e,i){for(var r="",n=new v,s=0,o=t;oi)return b(r,i);n=new v,s=0}}return s>0&&(r+=".incomplete"),r},t}(),E=function(){function t(t,e,i,r,n){if(!(r instanceof w))throw new Error("Invalid tag value.");this.stream=t,this.header=e,this.length=i,this.tag=r,this.sub=n}return t.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},t.prototype.content=function(t){if(void 0===this.tag)return null;void 0===t&&(t=1/0);var e=this.posContent(),i=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+i,t);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(e)?"false":"true";case 2:return this.stream.parseInteger(e,e+i);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(e,e+i,t);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(e,e+i,t);case 6:return this.stream.parseOID(e,e+i,t);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return b(this.stream.parseStringUTF(e,e+i),t);case 18:case 19:case 20:case 21:case 22:case 26:return b(this.stream.parseStringISO(e,e+i),t);case 30:return b(this.stream.parseStringBMP(e,e+i),t);case 23:case 24:return this.stream.parseTime(e,e+i,23==this.tag.tagNumber)}return null},t.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},t.prototype.toPrettyString=function(t){void 0===t&&(t="");var e=t+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(e+="+"),e+=this.length,this.tag.tagConstructed?e+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(e+=" (encapsulates)"),e+="\n",null!==this.sub){t+=" ";for(var i=0,r=this.sub.length;i6)throw new Error("Length over 48 bits not supported at position "+(t.pos-1));if(0===i)return null;e=0;for(var r=0;r>6,this.tagConstructed=0!=(32&e),this.tagNumber=31&e,31==this.tagNumber){var i=new v;do{e=t.get(),i.mulAdd(128,127&e)}while(128&e);this.tagNumber=i.simplify()}}return t.prototype.isUniversal=function(){return 0===this.tagClass},t.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},t}(),D=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],x=(1<<26)/D[D.length-1],R=function(){function i(t,e,i){null!=t&&("number"==typeof t?this.fromNumber(t,e,i):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}return i.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var i;if(16==e)i=4;else if(8==e)i=3;else if(2==e)i=1;else if(32==e)i=5;else{if(4!=e)return this.toRadix(e);i=2}var r,n=(1<0)for(a>a)>0&&(s=!0,o=t(r));h>=0;)a>(a+=this.DB-i)):(r=this[h]>>(a-=i)&n,a<=0&&(a+=this.DB,--h)),r>0&&(s=!0),s&&(o+=t(r));return s?o:"0"},i.prototype.negate=function(){var t=I();return i.ZERO.subTo(this,t),t},i.prototype.abs=function(){return this.s<0?this.negate():this},i.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var i=this.t;if(0!=(e=i-t.t))return this.s<0?-e:e;for(;--i>=0;)if(0!=(e=this[i]-t[i]))return e;return 0},i.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+C(this[this.t-1]^this.s&this.DM)},i.prototype.mod=function(t){var e=I();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(i.ZERO)>0&&t.subTo(e,e),e},i.prototype.modPowInt=function(t,e){var i;return i=t<256||e.isEven()?new O(e):new A(e),this.exp(t,i)},i.prototype.clone=function(){var t=I();return this.copyTo(t),t},i.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<>24},i.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},i.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},i.prototype.toByteArray=function(){var t=this.t,e=[];e[0]=this.s;var i,r=this.DB-t*this.DB%8,n=0;if(t-- >0)for(r>r)!=(this.s&this.DM)>>r&&(e[n++]=i|this.s<=0;)r<8?(i=(this[t]&(1<>(r+=this.DB-8)):(i=this[t]>>(r-=8)&255,r<=0&&(r+=this.DB,--t)),0!=(128&i)&&(i|=-256),0==n&&(128&this.s)!=(128&i)&&++n,(n>0||i!=this.s)&&(e[n++]=i);return e},i.prototype.equals=function(t){return 0==this.compareTo(t)},i.prototype.min=function(t){return this.compareTo(t)<0?this:t},i.prototype.max=function(t){return this.compareTo(t)>0?this:t},i.prototype.and=function(t){var i=I();return this.bitwiseTo(t,e,i),i},i.prototype.or=function(t){var e=I();return this.bitwiseTo(t,n,e),e},i.prototype.xor=function(t){var e=I();return this.bitwiseTo(t,s,e),e},i.prototype.andNot=function(t){var e=I();return this.bitwiseTo(t,o,e),e},i.prototype.not=function(){for(var t=I(),e=0;e=this.t?0!=this.s:0!=(this[e]&1<1){var c=I();for(r.sqrTo(o[1],c);h<=u;)o[h]=I(),r.mulTo(c,o[h-2],o[h]),h+=2}var f,l,p=t.t-1,g=!0,d=I();for(n=C(t[p])-1;p>=0;){for(n>=a?f=t[p]>>n-a&u:(f=(t[p]&(1<0&&(f|=t[p-1]>>this.DB+n-a)),h=i;0==(1&f);)f>>=1,--h;if((n-=h)<0&&(n+=this.DB,--p),g)o[f].copyTo(s),g=!1;else{for(;h>1;)r.sqrTo(s,d),r.sqrTo(d,s),h-=2;h>0?r.sqrTo(s,d):(l=s,s=d,d=l),r.mulTo(d,o[f],s)}for(;p>=0&&0==(t[p]&1<=0?(r.subTo(n,r),e&&s.subTo(h,s),o.subTo(a,o)):(n.subTo(r,n),e&&h.subTo(s,h),a.subTo(o,a))}return 0!=n.compareTo(i.ONE)?i.ZERO:a.compareTo(t)>=0?a.subtract(t):a.signum()<0?(a.addTo(t,a),a.signum()<0?a.add(t):a):a},i.prototype.pow=function(t){return this.exp(t,new B)},i.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),i=t.s<0?t.negate():t.clone();if(e.compareTo(i)<0){var r=e;e=i,i=r}var n=e.getLowestSetBit(),s=i.getLowestSetBit();if(s<0)return e;for(n0&&(e.rShiftTo(s,e),i.rShiftTo(s,i));e.signum()>0;)(n=e.getLowestSetBit())>0&&e.rShiftTo(n,e),(n=i.getLowestSetBit())>0&&i.rShiftTo(n,i),e.compareTo(i)>=0?(e.subTo(i,e),e.rShiftTo(1,e)):(i.subTo(e,i),i.rShiftTo(1,i));return s>0&&i.lShiftTo(s,i),i},i.prototype.isProbablePrime=function(t){var e,i=this.abs();if(1==i.t&&i[0]<=D[D.length-1]){for(e=0;e=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},i.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+this.DV:this.t=0},i.prototype.fromString=function(t,e){var r;if(16==e)r=4;else if(8==e)r=3;else if(256==e)r=8;else if(2==e)r=1;else if(32==e)r=5;else{if(4!=e)return void this.fromRadix(t,e);r=2}this.t=0,this.s=0;for(var n=t.length,s=!1,o=0;--n>=0;){var h=8==r?255&+t[n]:q(t,n);h<0?"-"==t.charAt(n)&&(s=!0):(s=!1,0==o?this[this.t++]=h:o+r>this.DB?(this[this.t-1]|=(h&(1<>this.DB-o):this[this.t-1]|=h<=this.DB&&(o-=this.DB))}8==r&&0!=(128&+t[0])&&(this.s=-1,o>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==t;)--this.t},i.prototype.dlShiftTo=function(t,e){var i;for(i=this.t-1;i>=0;--i)e[i+t]=this[i];for(i=t-1;i>=0;--i)e[i]=0;e.t=this.t+t,e.s=this.s},i.prototype.drShiftTo=function(t,e){for(var i=t;i=0;--h)e[h+s+1]=this[h]>>r|o,o=(this[h]&n)<=0;--h)e[h]=0;e[s]=o,e.t=this.t+s+1,e.s=this.s,e.clamp()},i.prototype.rShiftTo=function(t,e){e.s=this.s;var i=Math.floor(t/this.DB);if(i>=this.t)e.t=0;else{var r=t%this.DB,n=this.DB-r,s=(1<>r;for(var o=i+1;o>r;r>0&&(e[this.t-i-1]|=(this.s&s)<>=this.DB;if(t.t>=this.DB;r+=this.s}else{for(r+=this.s;i>=this.DB;r-=t.s}e.s=r<0?-1:0,r<-1?e[i++]=this.DV+r:r>0&&(e[i++]=r),e.t=i,e.clamp()},i.prototype.multiplyTo=function(t,e){var r=this.abs(),n=t.abs(),s=r.t;for(e.t=s+n.t;--s>=0;)e[s]=0;for(s=0;s=0;)t[i]=0;for(i=0;i=e.DV&&(t[i+e.t]-=e.DV,t[i+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(i,e[i],t,2*i,0,1)),t.s=0,t.clamp()},i.prototype.divRemTo=function(t,e,r){var n=t.abs();if(!(n.t<=0)){var s=this.abs();if(s.t0?(n.lShiftTo(u,o),s.lShiftTo(u,r)):(n.copyTo(o),s.copyTo(r));var c=o.t,f=o[c-1];if(0!=f){var l=f*(1<1?o[c-2]>>this.F2:0),p=this.FV/l,g=(1<=0&&(r[r.t++]=1,r.subTo(y,r)),i.ONE.dlShiftTo(c,y),y.subTo(o,o);o.t=0;){var b=r[--v]==f?this.DM:Math.floor(r[v]*p+(r[v-1]+d)*g);if((r[v]+=o.am(0,b,r,m,0,c))0&&r.rShiftTo(u,r),h<0&&i.ZERO.subTo(r,r)}}},i.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},i.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},i.prototype.exp=function(t,e){if(t>4294967295||t<1)return i.ONE;var r=I(),n=I(),s=e.convert(this),o=C(t)-1;for(s.copyTo(r);--o>=0;)if(e.sqrTo(r,n),(t&1<0)e.mulTo(n,s,r);else{var h=r;r=n,n=h}return e.revert(r)},i.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},i.prototype.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),i=Math.pow(t,e),r=H(i),n=I(),s=I(),o="";for(this.divRemTo(r,n,s);n.signum()>0;)o=(i+s.intValue()).toString(t).substr(1)+o,n.divRemTo(r,n,s);return s.intValue().toString(t)+o},i.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var r=this.chunkSize(e),n=Math.pow(e,r),s=!1,o=0,h=0,a=0;a=r&&(this.dMultiply(n),this.dAddOffset(h,0),o=0,h=0))}o>0&&(this.dMultiply(Math.pow(e,o)),this.dAddOffset(h,0)),s&&i.ZERO.subTo(this,this)},i.prototype.fromNumber=function(t,e,r){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(i.ONE.shiftLeft(t-1),n,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(i.ONE.shiftLeft(t-1),this);else{var s=[],o=7&t;s.length=1+(t>>3),e.nextBytes(s),o>0?s[0]&=(1<>=this.DB;if(t.t>=this.DB;r+=this.s}else{for(r+=this.s;i>=this.DB;r+=t.s}e.s=r<0?-1:0,r>0?e[i++]=r:r<-1&&(e[i++]=this.DV+r),e.t=i,e.clamp()},i.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},i.prototype.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},i.prototype.multiplyLowerTo=function(t,e,i){var r=Math.min(this.t+t.t,e);for(i.s=0,i.t=r;r>0;)i[--r]=0;for(var n=i.t-this.t;r=0;)i[r]=0;for(r=Math.max(e-this.t,0);r0)if(0==e)i=this[0]%t;else for(var r=this.t-1;r>=0;--r)i=(e*i+this[r])%t;return i},i.prototype.millerRabin=function(t){var e=this.subtract(i.ONE),r=e.getLowestSetBit();if(r<=0)return!1;var n=e.shiftRight(r);(t=t+1>>1)>D.length&&(t=D.length);for(var s=I(),o=0;o0&&(i.rShiftTo(o,i),r.rShiftTo(o,r));var h=function(){(s=i.getLowestSetBit())>0&&i.rShiftTo(s,i),(s=r.getLowestSetBit())>0&&r.rShiftTo(s,r),i.compareTo(r)>=0?(i.subTo(r,i),i.rShiftTo(1,i)):(r.subTo(i,r),r.rShiftTo(1,r)),i.signum()>0?setTimeout(h,0):(o>0&&r.lShiftTo(o,r),setTimeout((function(){e(r)}),0))};setTimeout(h,10)}},i.prototype.fromNumberAsync=function(t,e,r,s){if("number"==typeof e)if(t<2)this.fromInt(1);else{this.fromNumber(t,r),this.testBit(t-1)||this.bitwiseTo(i.ONE.shiftLeft(t-1),n,this),this.isEven()&&this.dAddOffset(1,0);var o=this,h=function(){o.dAddOffset(2,0),o.bitLength()>t&&o.subTo(i.ONE.shiftLeft(t-1),o),o.isProbablePrime(e)?setTimeout((function(){s()}),0):setTimeout(h,0)};setTimeout(h,0)}else{var a=[],u=7&t;a.length=1+(t>>3),e.nextBytes(a),u>0?a[0]&=(1<=0?t.mod(this.m):t},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},t.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),A=function(){function t(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<0&&this.m.subTo(e,e),e},t.prototype.revert=function(t){var e=I();return t.copyTo(e),this.reduce(e),e},t.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&t.DM;for(t[i=e+this.m.t]+=this.m.am(0,r,t,e,0,this.m.t);t[i]>=t.DV;)t[i]-=t.DV,t[++i]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}(),V=function(){function t(t){this.m=t,this.r2=I(),this.q3=I(),R.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t)}return t.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=I();return t.copyTo(e),this.reduce(e),e},t.prototype.revert=function(t){return t},t.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},t.prototype.mulTo=function(t,e,i){t.multiplyTo(e,i),this.reduce(i)},t.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},t}();function I(){return new R(null)}function N(t,e){return new R(t,e)}var P="undefined"!=typeof navigator;P&&"Microsoft Internet Explorer"==navigator.appName?(R.prototype.am=function(t,e,i,r,n,s){for(var o=32767&e,h=e>>15;--s>=0;){var a=32767&this[t],u=this[t++]>>15,c=h*a+u*o;n=((a=o*a+((32767&c)<<15)+i[r]+(1073741823&n))>>>30)+(c>>>15)+h*u+(n>>>30),i[r++]=1073741823&a}return n},T=30):P&&"Netscape"!=navigator.appName?(R.prototype.am=function(t,e,i,r,n,s){for(;--s>=0;){var o=e*this[t++]+i[r]+n;n=Math.floor(o/67108864),i[r++]=67108863&o}return n},T=26):(R.prototype.am=function(t,e,i,r,n,s){for(var o=16383&e,h=e>>14;--s>=0;){var a=16383&this[t],u=this[t++]>>14,c=h*a+u*o;n=((a=o*a+((16383&c)<<14)+i[r]+n)>>28)+(c>>14)+h*u,i[r++]=268435455&a}return n},T=28),R.prototype.DB=T,R.prototype.DM=(1<>>16)&&(t=e,i+=16),0!=(e=t>>8)&&(t=e,i+=8),0!=(e=t>>4)&&(t=e,i+=4),0!=(e=t>>2)&&(t=e,i+=2),0!=(e=t>>1)&&(t=e,i+=1),i}R.ZERO=H(0),R.ONE=H(1);var F,U,K=function(){function t(){this.i=0,this.j=0,this.S=[]}return t.prototype.init=function(t){var e,i,r;for(e=0;e<256;++e)this.S[e]=e;for(i=0,e=0;e<256;++e)i=i+this.S[e]+t[e%t.length]&255,r=this.S[e],this.S[e]=this.S[i],this.S[i]=r;this.i=0,this.j=0},t.prototype.next=function(){var t;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,t=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=t,this.S[t+this.S[this.i]&255]},t}(),k=null;if(null==k){k=[],U=0;var _=void 0;if("undefined"!=typeof window&&window.crypto&&window.crypto.getRandomValues){var z=new Uint32Array(256);for(window.crypto.getRandomValues(z),_=0;_=256||U>=256)window.removeEventListener?window.removeEventListener("mousemove",G,!1):window.detachEvent&&window.detachEvent("onmousemove",G);else try{var e=t.x+t.y;k[U++]=255&e,Z+=1}catch(t){}};"undefined"!=typeof window&&(window.addEventListener?window.addEventListener("mousemove",G,!1):window.attachEvent&&window.attachEvent("onmousemove",G))}function $(){if(null==F){for(F=new K;U<256;){var t=Math.floor(65536*Math.random());k[U++]=255&t}for(F.init(k),U=0;U0&&e.length>0?(this.n=N(t,16),this.e=parseInt(e,16)):console.error("Invalid RSA public key")},t.prototype.encrypt=function(t){var e=this.n.bitLength()+7>>3,i=function(t,e){if(e=0&&e>0;){var n=t.charCodeAt(r--);n<128?i[--e]=n:n>127&&n<2048?(i[--e]=63&n|128,i[--e]=n>>6|192):(i[--e]=63&n|128,i[--e]=n>>6&63|128,i[--e]=n>>12|224)}i[--e]=0;for(var s=new Y,o=[];e>2;){for(o[0]=0;0==o[0];)s.nextBytes(o);i[--e]=o[0]}return i[--e]=2,i[--e]=0,new R(i)}(t,e);if(null==i)return null;var r=this.doPublic(i);if(null==r)return null;for(var n=r.toString(16),s=n.length,o=0;o<2*e-s;o++)n="0"+n;return n},t.prototype.setPrivate=function(t,e,i){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=N(t,16),this.e=parseInt(e,16),this.d=N(i,16)):console.error("Invalid RSA private key")},t.prototype.setPrivateEx=function(t,e,i,r,n,s,o,h){null!=t&&null!=e&&t.length>0&&e.length>0?(this.n=N(t,16),this.e=parseInt(e,16),this.d=N(i,16),this.p=N(r,16),this.q=N(n,16),this.dmp1=N(s,16),this.dmq1=N(o,16),this.coeff=N(h,16)):console.error("Invalid RSA private key")},t.prototype.generate=function(t,e){var i=new Y,r=t>>1;this.e=parseInt(e,16);for(var n=new R(e,16);;){for(;this.p=new R(t-r,1,i),0!=this.p.subtract(R.ONE).gcd(n).compareTo(R.ONE)||!this.p.isProbablePrime(10););for(;this.q=new R(r,1,i),0!=this.q.subtract(R.ONE).gcd(n).compareTo(R.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var s=this.p;this.p=this.q,this.q=s}var o=this.p.subtract(R.ONE),h=this.q.subtract(R.ONE),a=o.multiply(h);if(0==a.gcd(n).compareTo(R.ONE)){this.n=this.p.multiply(this.q),this.d=n.modInverse(a),this.dmp1=this.d.mod(o),this.dmq1=this.d.mod(h),this.coeff=this.q.modInverse(this.p);break}}},t.prototype.decrypt=function(t){var e=N(t,16),i=this.doPrivate(e);return null==i?null:function(t,e){for(var i=t.toByteArray(),r=0;r=i.length)return null;for(var n="";++r191&&s<224?(n+=String.fromCharCode((31&s)<<6|63&i[r+1]),++r):(n+=String.fromCharCode((15&s)<<12|(63&i[r+1])<<6|63&i[r+2]),r+=2)}return n}(i,this.n.bitLength()+7>>3)},t.prototype.generateAsync=function(t,e,i){var r=new Y,n=t>>1;this.e=parseInt(e,16);var s=new R(e,16),o=this,h=function(){var e=function(){if(o.p.compareTo(o.q)<=0){var t=o.p;o.p=o.q,o.q=t}var e=o.p.subtract(R.ONE),r=o.q.subtract(R.ONE),n=e.multiply(r);0==n.gcd(s).compareTo(R.ONE)?(o.n=o.p.multiply(o.q),o.d=s.modInverse(n),o.dmp1=o.d.mod(e),o.dmq1=o.d.mod(r),o.coeff=o.q.modInverse(o.p),setTimeout((function(){i()}),0)):setTimeout(h,0)},a=function(){o.q=I(),o.q.fromNumberAsync(n,1,r,(function(){o.q.subtract(R.ONE).gcda(s,(function(t){0==t.compareTo(R.ONE)&&o.q.isProbablePrime(10)?setTimeout(e,0):setTimeout(a,0)}))}))},u=function(){o.p=I(),o.p.fromNumberAsync(t-n,1,r,(function(){o.p.subtract(R.ONE).gcda(s,(function(t){0==t.compareTo(R.ONE)&&o.p.isProbablePrime(10)?setTimeout(a,0):setTimeout(u,0)}))}))};setTimeout(u,0)};setTimeout(h,0)},t.prototype.sign=function(t,e,i){var r=function(t,e){if(e15)throw"ASN.1 length too long to represent by 8x: n = "+t.toString(16);return(128+i).toString(16)+e},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},W.asn1.DERAbstractString=function(t){W.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(this.s)},this.setStringHex=function(t){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&("string"==typeof t?this.setString(t):void 0!==t.str?this.setString(t.str):void 0!==t.hex&&this.setStringHex(t.hex))},Q.lang.extend(W.asn1.DERAbstractString,W.asn1.ASN1Object),W.asn1.DERAbstractTime=function(t){W.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(t){return utc=t.getTime()+6e4*t.getTimezoneOffset(),new Date(utc)},this.formatDate=function(t,e,i){var r=this.zeroPadding,n=this.localDateToUTC(t),s=String(n.getFullYear());"utc"==e&&(s=s.substr(2,2));var o=s+r(String(n.getMonth()+1),2)+r(String(n.getDate()),2)+r(String(n.getHours()),2)+r(String(n.getMinutes()),2)+r(String(n.getSeconds()),2);if(!0===i){var h=n.getMilliseconds();if(0!=h){var a=r(String(h),3);o=o+"."+(a=a.replace(/[0]+$/,""))}}return o+"Z"},this.zeroPadding=function(t,e){return t.length>=e?t:new Array(e-t.length+1).join("0")+t},this.getString=function(){return this.s},this.setString=function(t){this.hTLV=null,this.isModified=!0,this.s=t,this.hV=stohex(t)},this.setByDateValue=function(t,e,i,r,n,s){var o=new Date(Date.UTC(t,e-1,i,r,n,s,0));this.setByDate(o)},this.getFreshValueHex=function(){return this.hV}},Q.lang.extend(W.asn1.DERAbstractTime,W.asn1.ASN1Object),W.asn1.DERAbstractStructured=function(t){W.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array=t},this.appendASN1Object=function(t){this.hTLV=null,this.isModified=!0,this.asn1Array.push(t)},this.asn1Array=new Array,void 0!==t&&void 0!==t.array&&(this.asn1Array=t.array)},Q.lang.extend(W.asn1.DERAbstractStructured,W.asn1.ASN1Object),W.asn1.DERBoolean=function(){W.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},Q.lang.extend(W.asn1.DERBoolean,W.asn1.ASN1Object),W.asn1.DERInteger=function(t){W.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(t){this.hTLV=null,this.isModified=!0,this.hV=W.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t)},this.setByInteger=function(t){var e=new R(String(t),10);this.setByBigInteger(e)},this.setValueHex=function(t){this.hV=t},this.getFreshValueHex=function(){return this.hV},void 0!==t&&(void 0!==t.bigint?this.setByBigInteger(t.bigint):void 0!==t.int?this.setByInteger(t.int):"number"==typeof t?this.setByInteger(t):void 0!==t.hex&&this.setValueHex(t.hex))},Q.lang.extend(W.asn1.DERInteger,W.asn1.ASN1Object),W.asn1.DERBitString=function(t){if(void 0!==t&&void 0!==t.obj){var e=W.asn1.ASN1Util.newObject(t.obj);t.hex="00"+e.getEncodedHex()}W.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(t){this.hTLV=null,this.isModified=!0,this.hV=t},this.setUnusedBitsAndHexValue=function(t,e){if(t<0||7=2?(n[n.length]=s,s=0,o=0):s<<=4}}if(o)throw new Error("Hex encoding incomplete: 4 bits missing");return n}(t):g.unarmor(t),n=E.decode(r);if(3===n.sub.length&&(n=n.sub[2].sub[0]),9===n.sub.length){e=n.sub[1].getHexStringValue(),this.n=N(e,16),i=n.sub[2].getHexStringValue(),this.e=parseInt(i,16);var s=n.sub[3].getHexStringValue();this.d=N(s,16);var o=n.sub[4].getHexStringValue();this.p=N(o,16);var h=n.sub[5].getHexStringValue();this.q=N(h,16);var a=n.sub[6].getHexStringValue();this.dmp1=N(a,16);var c=n.sub[7].getHexStringValue();this.dmq1=N(c,16);var f=n.sub[8].getHexStringValue();this.coeff=N(f,16)}else{if(2!==n.sub.length)return!1;if(n.sub[0].sub){var l=n.sub[1].sub[0];e=l.sub[0].getHexStringValue(),this.n=N(e,16),i=l.sub[1].getHexStringValue(),this.e=parseInt(i,16)}else e=n.sub[0].getHexStringValue(),this.n=N(e,16),i=n.sub[1].getHexStringValue(),this.e=parseInt(i,16)}return!0}catch(t){return!1}},e.prototype.getPrivateBaseKey=function(){var t={array:[new W.asn1.DERInteger({int:0}),new W.asn1.DERInteger({bigint:this.n}),new W.asn1.DERInteger({int:this.e}),new W.asn1.DERInteger({bigint:this.d}),new W.asn1.DERInteger({bigint:this.p}),new W.asn1.DERInteger({bigint:this.q}),new W.asn1.DERInteger({bigint:this.dmp1}),new W.asn1.DERInteger({bigint:this.dmq1}),new W.asn1.DERInteger({bigint:this.coeff})]};return new W.asn1.DERSequence(t).getEncodedHex()},e.prototype.getPrivateBaseKeyB64=function(){return f(this.getPrivateBaseKey())},e.prototype.getPublicBaseKey=function(){var t=new W.asn1.DERSequence({array:[new W.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new W.asn1.DERNull]}),e=new W.asn1.DERSequence({array:[new W.asn1.DERInteger({bigint:this.n}),new W.asn1.DERInteger({int:this.e})]}),i=new W.asn1.DERBitString({hex:"00"+e.getEncodedHex()});return new W.asn1.DERSequence({array:[t,i]}).getEncodedHex()},e.prototype.getPublicBaseKeyB64=function(){return f(this.getPublicBaseKey())},e.wordwrap=function(t,e){if(!t)return t;var i="(.{1,"+(e=e||64)+"})( +|$\n?)|(.{1,"+e+"})";return t.match(RegExp(i,"g")).join("\n")},e.prototype.getPrivateKey=function(){var t="-----BEGIN RSA PRIVATE KEY-----\n";return(t+=e.wordwrap(this.getPrivateBaseKeyB64())+"\n")+"-----END RSA PRIVATE KEY-----"},e.prototype.getPublicKey=function(){var t="-----BEGIN PUBLIC KEY-----\n";return(t+=e.wordwrap(this.getPublicBaseKeyB64())+"\n")+"-----END PUBLIC KEY-----"},e.hasPublicKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")},e.hasPrivateKeyProperty=function(t){return(t=t||{}).hasOwnProperty("n")&&t.hasOwnProperty("e")&&t.hasOwnProperty("d")&&t.hasOwnProperty("p")&&t.hasOwnProperty("q")&&t.hasOwnProperty("dmp1")&&t.hasOwnProperty("dmq1")&&t.hasOwnProperty("coeff")},e.prototype.parsePropertiesFrom=function(t){this.n=t.n,this.e=t.e,t.hasOwnProperty("d")&&(this.d=t.d,this.p=t.p,this.q=t.q,this.dmp1=t.dmp1,this.dmq1=t.dmq1,this.coeff=t.coeff)},e}(J),nt=i(155),st=void 0!==nt?null===(et=nt.env)||void 0===et?void 0:"3.3.1":void 0;const ot=function(){function t(t){void 0===t&&(t={}),t=t||{},this.default_key_size=t.default_key_size?parseInt(t.default_key_size,10):1024,this.default_public_exponent=t.default_public_exponent||"010001",this.log=t.log||!1,this.key=null}return t.prototype.setKey=function(t){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new rt(t)},t.prototype.setPrivateKey=function(t){this.setKey(t)},t.prototype.setPublicKey=function(t){this.setKey(t)},t.prototype.decrypt=function(t){try{return this.getKey().decrypt(l(t))}catch(t){return!1}},t.prototype.encrypt=function(t){try{return f(this.getKey().encrypt(t))}catch(t){return!1}},t.prototype.sign=function(t,e,i){try{return f(this.getKey().sign(t,e,i))}catch(t){return!1}},t.prototype.verify=function(t,e,i){try{return this.getKey().verify(t,l(e),i)}catch(t){return!1}},t.prototype.getKey=function(t){if(!this.key){if(this.key=new rt,t&&"[object Function]"==={}.toString.call(t))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,t);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},t.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},t.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},t.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},t.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},t.version=st,t}()})(),r.default})())); \ No newline at end of file diff --git a/resources/assets/js/app.js b/resources/assets/js/app.js index 2d504fbcf..34434b0b2 100644 --- a/resources/assets/js/app.js +++ b/resources/assets/js/app.js @@ -212,7 +212,7 @@ store.dispatch("init").then(action => { $A.Notice = app.$Notice; $A.Modal = app.$Modal; - if (action === "clearCacheSuccess") { + if (action === "handleClearCache") { $A.messageSuccess("清除成功"); } }) diff --git a/resources/assets/js/functions/common.js b/resources/assets/js/functions/common.js index 28ec2f24d..1de05775b 100755 --- a/resources/assets/js/functions/common.js +++ b/resources/assets/js/functions/common.js @@ -36,13 +36,26 @@ const localforage = require("localforage"); * 是否在数组里 * @param key * @param array + * @param regular * @returns {boolean|*} */ - inArray(key, array) { + inArray(key, array, regular = false) { if (!this.isArray(array)) { return false; } - return array.includes(key); + if (regular) { + return !!array.find(item => { + if (item && item.indexOf("*")) { + const rege = new RegExp("^" + item.replace(/[-\/\\^$+?.()|[\]{}]/g, '\\$&').replace(/\*/g, '.*') + "$", "g") + if (rege.test(key)) { + return true + } + } + return item == key + }); + } else { + return array.includes(key); + } }, /** diff --git a/resources/assets/js/pages/login.vue b/resources/assets/js/pages/login.vue index 51b58254e..9c2342994 100644 --- a/resources/assets/js/pages/login.vue +++ b/resources/assets/js/pages/login.vue @@ -514,23 +514,23 @@ export default { this.invite = $A.trim(this.invite) // if (!$A.isEmail(this.email)) { - $A.messageWarning("请输入正确的邮箱地址"); - this.$refs.email.focus(); - return; + $A.messageWarning("请输入正确的邮箱地址") + this.$refs.email.focus() + return } if (!this.password) { - $A.messageWarning("请输入密码"); - this.$refs.password.focus(); - return; + $A.messageWarning("请输入密码") + this.$refs.password.focus() + return } if (this.loginType == 'reg') { if (this.password != this.password2) { - $A.messageWarning("确认密码输入不一致"); - this.$refs.password2.focus(); - return; + $A.messageWarning("确认密码输入不一致") + this.$refs.password2.focus() + return } } - this.loadIng++; + this.loadIng++ this.$store.dispatch("call", { url: 'users/login', data: { @@ -542,35 +542,39 @@ export default { }, }).then(({data}) => { $A.IDBSave("cacheLoginEmail", this.email) - this.codeNeed = false; - this.$store.dispatch("handleClearCache", data).then(this.goNext); + this.codeNeed = false + this.$store.dispatch("handleClearCache", data).then(this.goNext) }).catch(({data, msg}) => { if (data.code === 'email') { - this.loginType = 'login'; - $A.modalWarning(msg); + this.loginType = 'login' + $A.modalWarning(msg) } else { - $A.modalError(msg); + $A.modalError({ + content: msg, + onOk: _ => { + this.$refs.code.focus() + } + }) } if (data.code === 'need') { - this.reCode(); - this.codeNeed = true; - this.$refs.code.focus(); + this.reCode() + this.codeNeed = true } }).finally(_ => { - this.loadIng--; - }); + this.loadIng-- + }) }) }, goNext() { - this.loginJump = true; - const fromUrl = decodeURIComponent($A.getObject(this.$route.query, 'from')); + this.loginJump = true + const fromUrl = decodeURIComponent($A.getObject(this.$route.query, 'from')) if (fromUrl) { $A.IDBSet("clearCache", "login").then(_ => { - window.location.replace(fromUrl); + window.location.replace(fromUrl) }) } else { - this.goForward({name: 'manage-dashboard'}, true); + this.goForward({name: 'manage-dashboard'}, true) } }, diff --git a/resources/assets/js/pages/manage.vue b/resources/assets/js/pages/manage.vue index e7726c6b6..48c7969b7 100644 --- a/resources/assets/js/pages/manage.vue +++ b/resources/assets/js/pages/manage.vue @@ -742,8 +742,7 @@ export default { Store.set('updateNotification', null); return; case 'clearCache': - this.$store.dispatch("handleClearCache", null).then(async () => { - await $A.IDBSet("clearCache", "handle") + $A.IDBSet("clearCache", "handle").then(_ => { $A.reloadUrl() }); return; diff --git a/resources/assets/js/pages/manage/components/DialogWrapper.vue b/resources/assets/js/pages/manage/components/DialogWrapper.vue index 014c07513..401d981fc 100644 --- a/resources/assets/js/pages/manage/components/DialogWrapper.vue +++ b/resources/assets/js/pages/manage/components/DialogWrapper.vue @@ -166,7 +166,7 @@ @on-emoji="onEmoji" @on-show-emoji-user="onShowEmojiUser">